Skip to content

Commit 9f93f54

Browse files
TrevorHinesleyAxl Ottle
andauthored
Improvement: protect plan files from review deletion (#142)
* fix: protect plan and solution files from review/resolve deletion The review/resolve pipeline could flag docs/plans/*.md and docs/solutions/*.md files for deletion, contradicting /workflows:work which treats them as living documents. Adds protection at three layers: - review.md: Protected Artifacts section + synthesis filter - code-simplicity-reviewer.md: YAGNI exception for pipeline artifacts - resolve_todo_parallel.md: Safety check to skip/wont_fix such todos Fixes #140 * fix: protect plan and solution files from review/resolve deletion The review/resolve pipeline could flag docs/plans/*.md and docs/solutions/*.md files for deletion, contradicting /workflows:work which treats them as living documents. Adds protection at four layers: - review.md: Protected Artifacts section and synthesis filter - code-simplicity-reviewer.md: YAGNI exception for pipeline artifacts - resolve_todo_parallel.md: Skip and wont_fix todos targeting these paths - git-history-analyzer.md: Note not to characterize them as unnecessary Fixes #140 --------- Co-authored-by: Axl Ottle <axl@Axls-Virtual-Machine.local>
1 parent 36e7f3a commit 9f93f54

4 files changed

Lines changed: 17 additions & 0 deletions

File tree

plugins/compound-engineering/agents/research/git-history-analyzer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ When analyzing, consider:
4040
- The evolution of coding patterns and practices over time
4141

4242
Your insights should help developers understand not just what the code does, but why it evolved to its current state, informing better decisions for future changes.
43+
44+
Note that files in `docs/plans/` and `docs/solutions/` are compound-engineering pipeline artifacts created by `/workflows:plan`. They are intentional, permanent living documents — do not recommend their removal or characterize them as unnecessary.

plugins/compound-engineering/agents/review/code-simplicity-reviewer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ When reviewing code, you will:
3333
- Eliminate extensibility points without clear use cases
3434
- Question generic solutions for specific problems
3535
- Remove "just in case" code
36+
- Never flag `docs/plans/*.md` or `docs/solutions/*.md` for removal — these are compound-engineering pipeline artifacts created by `/workflows:plan` and used as living documents by `/workflows:work`
3637

3738
6. **Optimize for Readability**:
3839
- Prefer self-documenting code over comments

plugins/compound-engineering/commands/resolve_todo_parallel.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Resolve all TODO comments using parallel processing.
1212

1313
Get all unresolved TODOs from the /todos/\*.md directory
1414

15+
If any todo recommends deleting, removing, or gitignoring files in `docs/plans/` or `docs/solutions/`, skip it and mark it as `wont_fix`. These are compound-engineering pipeline artifacts that are intentional and permanent.
16+
1517
### 2. Plan
1618

1719
Create a TodoWrite list of all unresolved items grouped by type.Make sure to look at dependencies that might occur and prioritize the ones needed by others. For example, if you need to change a name, you must wait to do the others. Output a mermaid flow diagram showing how we can do this. Can we do everything in parallel? Do we need to do one first that leads to others in parallel? I'll put the to-dos in the mermaid diagram flow‑wise so the agent knows how to proceed in order.

plugins/compound-engineering/commands/workflows/review.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ Ensure that the code is ready for analysis (either in worktree or on current bra
4848

4949
</task_list>
5050

51+
#### Protected Artifacts
52+
53+
<protected_artifacts>
54+
The following paths are compound-engineering pipeline artifacts and must never be flagged for deletion, removal, or gitignore by any review agent:
55+
56+
- `docs/plans/*.md` — Plan files created by `/workflows:plan`. These are living documents that track implementation progress (checkboxes are checked off by `/workflows:work`).
57+
- `docs/solutions/*.md` — Solution documents created during the pipeline.
58+
59+
If a review agent flags any file in these directories for cleanup or removal, discard that finding during synthesis. Do not create a todo for it.
60+
</protected_artifacts>
61+
5162
#### Parallel Agents to review the PR:
5263

5364
<parallel_tasks>
@@ -207,6 +218,7 @@ Remove duplicates, prioritize by severity and impact.
207218
<synthesis_tasks>
208219

209220
- [ ] Collect findings from all parallel agents
221+
- [ ] Discard any findings that recommend deleting or gitignoring files in `docs/plans/` or `docs/solutions/` (see Protected Artifacts above)
210222
- [ ] Categorize by type: security, performance, architecture, quality, etc.
211223
- [ ] Assign severity levels: 🔴 CRITICAL (P1), 🟡 IMPORTANT (P2), 🔵 NICE-TO-HAVE (P3)
212224
- [ ] Remove duplicate or overlapping findings

0 commit comments

Comments
 (0)