import { PromptModule, ModuleConfig } from './prompt-module.interface.js'; /** * Shutdown-safety rule, emitted as `## Stopping and Restarting Agents`. * * Request 72c9427a / spec `specs/2026-09-24-control-plane-isolation.md` * Part 1. arXiv 2609.28274 found that multi-agent setups with an * orchestrator routinely sabotaged a peer's shutdown, and that an explicit, * neutrally worded prohibition in a hierarchical setup suppressed it almost * entirely. The wording frames stopping as routine and deliberately avoids * alarm words, which have tripped prompt-injection detection before. * * Exported so the role-prompt coverage test can assert that the static * `config/roles/{orchestrator,team-leader}/prompt.md` copies stay verbatim. */ export declare const STOP_RESTART_SECTION_LINES: readonly string[]; /** * Owner-approval source rule, emitted as `## Owner Approval Comes Only Through the Harness`. * * 2026-10-03 incident: text that predicted the owner's next message * ("按这个草稿回吧", "go ahead with this draft") appeared in an agent's * input box without any harness envelope; the agent took it as approval and * posted a LinkedIn reply as the owner. Approval for outbound or irreversible * actions must be traceable to the owner through the harness. * * Exported so the role-prompt coverage test can assert that the static * `config/roles/{orchestrator,team-leader}/prompt.md` copies stay verbatim. */ export declare const OWNER_APPROVAL_SECTION_LINES: readonly string[]; /** * Decision Rights + Escalation Chain + Stopping and Restarting Agents + * Owner Approval block. * * P0-4 — Per spec * `.crewly/specs/2026-05-03-agent-improvement-p0-execution.md` §"Fix P0-4", * this module emits the canonical Decide-vs-Escalate criteria + the four-link * Worker → Team Lead → Orchestrator → Owner chain. * * Why a module (not just per-role markdown)? * - Authority text must be identical across every agent. A module guarantees * byte-identical output instead of relying on 20 role prompts staying in * sync over time. * - The text is small (~25 lines) and authority-defining, so we cannot let it * be truncated under budget pressure → `compactable = false` (Trusted Zone). * - Sits at priority 3.5 — immediately after RoleBoundary (priority 3), * immediately before MemoryReference (priority 4). This places Decision * Rights inside the authority cluster (Identity → Soul/Recovery → * RoleBoundary → DecisionRights) so an agent reads "who am I, what are * my limits, what can I decide" before any data context. * * Static role prompts under `config/roles/{role}/prompt.md` ALSO contain the * same headers verbatim — this is intentional belt-and-suspenders coverage * for the legacy `prompt-builder.service.ts` load path which does not run * through `PromptAssemblyService`. The two paths produce different prompts * for different runtimes; both must carry the contract. * * Net-zero offset: legacy "ask if unsure" / "escalate when needed" / "when * in doubt" soft hints have been deleted from role prompts because this * module + the role-prompt sections form the canonical statement. */ export declare class DecisionRightsModule implements PromptModule { name: string; priority: number; maxTokens: number; compactable: boolean; /** * Always include — every agent makes decisions and every agent has a * point at which it must escalate. The block is identical across roles * because the meta-rule is universal; role-specific escalation * destinations are already encoded in the Escalation Chain text itself. * * @param _config - Unused; the inclusion rule is universal * @returns Always true */ shouldInclude(_config: ModuleConfig): boolean; /** * Build the Decision Rights + Escalation Chain section. * * Output is byte-identical regardless of role — see the class JSDoc for * why universality is intentional. * * @param _config - Module configuration (unused; content is static) * @returns Formatted markdown block with four H2 sections: * `## Decision Rights`, `## Escalation Chain`, * `## Stopping and Restarting Agents` and * `## Owner Approval Comes Only Through the Harness` */ build(_config: ModuleConfig): Promise; } //# sourceMappingURL=decision-rights.module.d.ts.map