fix: strengthen signal.json prompt to prevent premature writes

Agents sometimes write signal.json before finishing output files,
causing work to be silently discarded. Replace weak "As your final
action" with explicit CRITICAL warning explaining the completion
trigger mechanism.
This commit is contained in:
Lukas May
2026-03-07 00:51:25 +01:00
parent c3fb000f92
commit 3885a96c9d

View File

@@ -6,7 +6,7 @@
export const SIGNAL_FORMAT = `
<signal_format>
As your final action, write \`.cw/output/signal.json\`:
CRITICAL: Write \`.cw/output/signal.json\` as your ABSOLUTE LAST action. The system monitors this file as a completion trigger — writing it before your output files causes your work to be silently discarded.
- Done: \`{ "status": "done" }\`
- Need clarification: \`{ "status": "questions", "questions": [{ "id": "q1", "question": "..." }] }\`
- Unrecoverable error: \`{ "status": "error", "error": "..." }\` — include the actual error output, stack trace, or repro steps, not just a summary