Add plan review workflow with hook enforcement#148
Conversation
Introduce an automated plan review gate before ExitPlanMode: - review-plan.md: Add Step 6 to persist reviews as .review.md files with YAML frontmatter; support reading prior review files for --updated delta assessment; add issue numbering for cross-referencing with /revise-plan - revise-plan.md: New skill to read review feedback, display it, collect user overrides, and revise the plan in plan mode - check-plan-review.sh: PreToolUse hook that blocks ExitPlanMode unless a .review.md sibling exists for the current plan (sentinel + fallback) - settings.json: Register the hook - CLAUDE.md: Document the in-plan-mode review workflow with review/revise loop, skip-with-marker option, and rollback instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Overall assessment: Executive summary
Methodology Code Quality
Performance Maintainability
Tech Debt Security Documentation/Tests
|
Add Step 4b to review-plan.md to display the full plan before the structured review. Update revise-plan.md Step 3 to show both the plan and review together. Clarify in CLAUDE.md that the review agent's output includes the plan content via Step 4b. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment Executive Summary
Methodology Code Quality
Performance Maintainability Tech Debt
Security Documentation/Tests
Tests not run (workflow/docs change only). |
…tion Fix P1 bug where skip-review path in revise-plan.md didn't write the .last-reviewed sentinel, allowing stale sentinels to pass the hook. Add validate_review_plan_field() to check-plan-review.sh to verify the review file's YAML plan: field matches the expected plan path. Also fix dangling cross-reference, add verification checklist, and remove leftover plan text from review-plan.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
- Add review file touch after plan revision to prevent staleness gate from blocking the documented revise-plan flow (P1) - Clarify plan: field path-matching requirements in review-plan.md (P2) - Fix BSD sed incompatibility in validate_review_plan_field (already applied) - Remove stale escaping limitation comment now that deny() sanitizes (P3) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive Summary
Methodology Code Quality
Performance Maintainability Tech Debt Security Documentation/Tests
Tests not run (not requested). |
- Add guard in check-plan-review.sh to detect when the sentinel points to an older plan but a newer unreviewed plan exists in the directory - Update Known limitations comment to reflect the new guard - Add verification checklist items 10-12 for stale-sentinel scenarios - Quote <plan-path> variable in revise-plan.md staleness-check example Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive Summary
Methodology
Code Quality
Performance
Maintainability
Tech Debt
Security
Documentation/Tests
|
… guard - Make review file write a hard requirement (review-plan.md, revise-plan.md, CLAUDE.md): if the write fails, report an error and stop instead of warning. Add mkdir -p before writes to prevent missing-directory failures. - Remove overly aggressive "newer plan exists" guard from check-plan-review.sh that caused false denials in multi-plan workflows. Revert Known Limitations comment to original form and remove related checklist items. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment Executive Summary
Methodology Code Quality
Performance Maintainability
Tech Debt Security Documentation/Tests |
…les, scope constraint to project files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Executive Summary
Methodology Code Quality
Performance Maintainability Tech Debt Security Documentation/Tests
|
…mated hook tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/ai-review |
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall assessment: Looks good Executive Summary
Methodology Code Quality
Performance Maintainability Tech Debt Security Documentation/Tests |
Summary
/review-plannow saves structured reviews as.review.mdfiles with YAML frontmatter (verdict, issue counts, flags) alongside the plan file, and writes a sentinel for the hook/revise-planskill: reads review feedback, displays it in the terminal, collects user overrides (accept/dismiss/modify per-issue), enters plan mode for revision, and appends audit trail as## Revision Notescheck-plan-review.shblocks plan approval unless a.review.mdsibling exists (sentinel-first, fallback to most recent plan)/revise-plandirectives--updateddelta from review files: when conversation context is compressed between rounds, the prior.review.mdfile is read for delta assessmentMethodology references (required if estimator / math changes)
Validation
Security / privacy
Generated with Claude Code