Triage code review issues one-by-one with Fix/Defer/Dismiss/Discuss options
Triages code review issues one-by-one with Fix/Defer/Dismiss/Discuss options and logs decisions.
/plugin marketplace add cahaseler/cc-track/plugin install cc-track@cc-track-marketplaceWalk through code review issues one-by-one with structured decision options. Creates an audit trail in issue-log.md.
Read CLAUDE.md to find the active spec folder:
## Active Task section with @.cc-track/specs/NNN-feature-name/ reference.cc-track/specs/109-feature-name/)If no active spec found, inform the user and stop.
Check if issues are already in the conversation context (from /cc-track:prepare-completion).
If issues are in context: Use them directly - they should include:
If no issues in context: Inform user this command expects issues from a prior review:
This command expects code review issues in context. Please run /cc-track:prepare-completion first to generate issues, or describe the issues you want to triage.
Read existing files to filter issues that were already triaged in a prior run:
Check issue-log.md (if exists at {spec_folder}/issue-log.md):
Check backlog.md (at .cc-track/backlog.md):
Filter the issue list:
IMPORTANT: Only filter issues that have a documented prior human decision. Do NOT filter issues based on your assessment that they are "unrelated to the current spec" or "pre-existing". If an issue was discovered by review agents and hasn't been triaged before, it MUST be presented to the human. Whether it's relevant or should be deferred is the human's decision to make during triage.
All {N} issues have already been triaged in previous runs.
- Fixed: {X}
- Dismissed: {Y}
- Deferred: {Z}
Ready to proceed to /cc-track:complete-task or re-run /cc-track:prepare-completion to check for new issues.
Stop here.If issue-log.md doesn't exist: Create it with this structure:
# Issue Log: {Feature Name}
**Spec:** {NNN-feature-name}
**Generated:** {timestamp}
**Status:** in_progress
## Summary
| # | Score | Status | Location | Decision | Action |
|---|-------|--------|----------|----------|--------|
## Issues
If issue-log.md exists: Read it and prepare to append new issues.
Add each NEW issue to the file:
Before starting triage, use the TodoWrite tool to set up tracking:
This ensures the triage process is visible in the todo list and fixes are tracked.
Before presenting issues to the user, scan for trivial fixes that don't need human decision-making.
Criteria for "Just Fix It":
Examples of "Just Fix It" candidates:
Process:
## Auto-Fixed Trivial Issues
The following {N} trivial issues were fixed under the "Just Fix It" protocol:
1. **{Issue title}** ({location})
- Changed: {brief description of change}
2. **{Issue title}** ({location})
- Changed: {brief description of change}
These were unambiguous, single-file fixes with low risk. Continuing to triage remaining issues...
If no "Just Fix It" candidates: Skip this step silently and proceed to triage.
Important: When in doubt, don't "Just Fix It" - present to the user instead. This protocol is for truly trivial fixes only.
For each NEW issue (sorted by score, highest first):
## Issue {N} of {Total}: {Title}
**Score:** {score}/100
**Location:** {file:line}
**Reported by:** {reviewer(s)}
**Description:** {what's wrong}
**Observation:** {evidence from reviewer}
**Scorer justification:** {why this score}
Use the AskUserQuestion tool with these options. Always include a recommendation as the first option based on your analysis:
Choosing the recommended option:
question: "How would you like to handle this issue?"
header: "Decision"
options:
- label: "{Recommended option} (Recommended)"
description: "{Standard description} - {Brief reason for recommendation}"
- label: "Fix"
description: "Add to fix list - will be implemented via subagent after triage"
- label: "Defer"
description: "Add to backlog for future work - not blocking completion"
- label: "Dismiss"
description: "False positive or acceptable as-is - no action needed"
- label: "Discuss"
description: "Investigate further before deciding"
multiSelect: false
Example with recommendation:
options:
- label: "Fix (Recommended)"
description: "Add to fix list - Score 100, clear security issue with straightforward fix"
- label: "Defer"
description: "Add to backlog for future work - not blocking completion"
- label: "Dismiss"
description: "False positive or acceptable as-is - no action needed"
- label: "Discuss"
description: "Investigate further before deciding"
If Fix:
If Defer:
.cc-track/backlog.md with format:
- [{timestamp}] [From {spec-id}] {issue title} - {location} (Deferred: {rationale})
If Dismiss:
If Discuss:
subagent_type: "cc-track:researcher" to investigate technical questionssubagent_type: "Explore" to search the codebase for related patterns or contextAfter all issues are triaged:
## Triage Complete
**Issues to Fix ({N}):**
1. {Issue title} - {location}
2. {Issue title} - {location}
...
**Deferred to Backlog ({N}):**
- {Issue title} - {rationale}
...
**Dismissed ({N}):**
- {Issue title} - {rationale}
...
Update issue-log.md Status from "in_progress" to "triaged".
If no fixes needed:
No fixes to execute. Ready to proceed to /cc-track:complete-task.
If fixes exist:
Ready to implement {N} fixes. Proceeding in order...
Execution approach - prefer subagents for straightforward fixes:
For each fix in your todo list:
subagent_type: "cc-track:implementer" to implement the fixSubagent prompt for implementer:
Fix this code review issue:
- Issue: {description}
- Location: {file:line}
- Observation: {evidence}
- Expected fix: {what needs to change}
Read the file, implement the fix, and confirm what was changed.
After all fixes:
All {N} fixes implemented. Issue log updated.
Update issue-log.md Status to "resolved" if all Fix items are complete.
Remind user:
Fixes complete. Please re-run /cc-track:prepare-completion to verify:
- All fixes are correct
- No new issues introduced
- Ready for task completion