Improvement: protect plan files from review deletion #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The review/resolve pipeline can delete plan files created by
/workflows:plan.Note: this might be heavy-handed, so I'm open to feedback. But deleting such a valuable artifact seems like a no-no :)
When running the full pipeline (plan → work → review → resolve → compound), the review step's parallel agents — specifically
code-simplicity-reviewer(YAGNI) andgit-history-analyzer— can flagdocs/plans/*.mdfiles as unnecessary cleanup candidates. The resolve step then executes those findings, deleting the plan file and addingdocs/plans/to.gitignore.This directly contradicts
/workflows:work, which treats plans as living documents and checks off tasks inside them as work progresses.Fix
Rather than a single guardrail that could be bypassed, this adds protection at four layers in the pipeline:
commands/workflows/review.mdagents/review/code-simplicity-reviewer.mddocs/plans/anddocs/solutions/agents/research/git-history-analyzer.mdcommands/resolve_todo_parallel.mdwont_fixany todo targeting these pathsThe same protection covers
docs/solutions/*.mdsince those are also pipeline-managed artifacts.Testing
This was discovered while running the full compound-engineering pipeline on a fresh Rails project. The plan file (
docs/plans/2026-01-31-feat-projects-crud-plan.md, 750 lines) was deleted by the resolve step after being flagged as P3 cleanup by two review agents.Workaround (adding a note to
CLAUDE.md) confirmed the root cause — agents respect explicit instructions but had no built-in awareness of pipeline artifacts.Fixes #140