Problem
The ordered prompt-block pipeline (#105) exports identityBlock and a safety-preamble slot, but production prompts never use them: identityBlock appears only in packages/ai-claude-compat/src/index.ts (re-export) — role identity is scattered inline in session guidance ("You are the Worker…"), and no safety-preamble text exists anywhere in the built subagent prompts. The decomposition's block 1 (identity + safety preamble) is unrepresented.
What
Add a shared default safety-preamble to defaultContractBlocks() (or route each role's first line through identityBlock) so every production subagent prompt carries the identity + safety preamble the harness leads with. Keep it provider-agnostic, short, and behavioral (no policy the loop can't honor).
Constraints (per CLAUDE.md)
Portable ESM, strict TS, paired *.test.ts; primitives in compat, wiring in aitm.
Acceptance criteria
- Every production subagent prompt (planner/worker/reviewer/editor/ci-fix/take-over) contains the identity + safety-preamble block.
bun test + node --test + biome + tsc all green (both packages).
Found during the post-epic-#100 parity verification pass (A1). P2 follow-up.
Part of #196.
Problem
The ordered prompt-block pipeline (#105) exports
identityBlockand a safety-preamble slot, but production prompts never use them:identityBlockappears only inpackages/ai-claude-compat/src/index.ts(re-export) — role identity is scattered inline in session guidance ("You are the Worker…"), and no safety-preamble text exists anywhere in the built subagent prompts. The decomposition's block 1 (identity + safety preamble) is unrepresented.What
Add a shared default safety-preamble to
defaultContractBlocks()(or route each role's first line throughidentityBlock) so every production subagent prompt carries the identity + safety preamble the harness leads with. Keep it provider-agnostic, short, and behavioral (no policy the loop can't honor).Constraints (per CLAUDE.md)
Portable ESM, strict TS, paired
*.test.ts; primitives in compat, wiring in aitm.Acceptance criteria
bun test+node --test+ biome + tsc all green (both packages).Found during the post-epic-#100 parity verification pass (A1). P2 follow-up.
Part of #196.