journal-writer
Phase 6 and escalation agent. Writes candid failure entries to docs/journal/ with root cause and lessons.
| Source | .claude/agents/journal-writer.md |
| Owner | docs |
| Runtime | claude-code |
| Risk | medium |
| Writes | docs/journal/YYMMDD-title.md |
The journal-writer documents what went wrong, what was tried and what was learned. It owns docs/journal/ exclusively.
It runs on sonnet. Tools: Read, Grep, Glob, Bash, Edit, Write. Per-runtime model pins are on Agent models.
When to use
It runs in Phase 6 (Reflect) after documenter and analyst, and during escalations at any phase:
- Tests still fail after self-healing is exhausted (3 failed attempts by the developer).
- The security agent issues a BLOCK verdict.
- A production bug, failed or stalled refactor, performance issue that blocks a release, integration failure, or an architectural decision that proved problematic.
It is not used for routine project documentation.
Entry format
Each entry goes to docs/journal/YYMMDD-title.md with date, severity (Critical, High or Medium), component and status (Open, Investigating, Resolved or Mitigated), then the sections What Happened, The Brutal Truth, What Was Tried, Root Cause, Lessons Learned and Next Steps. Entries cite files, line numbers, error messages and commit hashes, and every entry answers how to prevent the failure next time. Entries feed the analyst's pattern extraction.
Limits
It records only what happened and includes no credentials. It does not edit source, tests, plans, reviews or deploy configs, and does not write under docs/architecture/ or tasks/.