Prepare the current active task for completion (Phase 1 of task completion workflow)
Validates task completion readiness through automated checks and multi-agent code review.
/plugin marketplace add cahaseler/cc-track/plugin install cc-track@cc-track-marketplaceRun validation checks and multi-agent spec-focused code review to ensure the task is ready for completion.
git branch --show-currentgit diff --statRun the prepare-completion script:
bun "${CLAUDE_PLUGIN_ROOT}/skills/cc-track-tools/scripts/prepare-completion.ts"
The script will:
Note: The script no longer runs code review - that's handled by the multi-agent review in Step 2.
The script returns JSON output. Parse and present the results:
If validation failed:
data.validationbunx biome check --write or fix manually/cc-track:prepare-completion againIf validation passed:
Launch the multi-agent spec-focused code review using the Task tool.
Identify Active Spec:
## Active Task section with @.cc-track/specs/NNN-feature-name/ reference.cc-track/specs/109-feature-name/)Gather Context for Agents:
Before launching agents, gather the following:
## Active Task sectiongit diff main --name-only to get list of changed filesContext to Pass to All Agents:
Every agent prompt MUST include:
Launch All 8 Review Agents in Parallel:
Use the Task tool to launch these agents simultaneously. Include the context above in each prompt.
spec-compliance-reviewer (haiku)
plan-adherence-reviewer (haiku)
task-completion-reviewer (haiku)
bug-scanner (sonnet)
guidelines-reviewer (haiku)
comment-compliance-reviewer (haiku)
duplication-detector (haiku)
dead-code-detector (haiku)
IMPORTANT: Launch all 8 agents in a single message with multiple Task tool calls for parallel execution.
Execution mode: Use foreground parallel (do NOT use run_in_background: true):
run_in_background parameterThis is different from the pipeline pattern in /cc-track:tasks - here we need ALL results before proceeding to deduplication, so foreground parallel is correct.
After all agents complete:
Issue N:
- Reviewers: [list of agents that found this]
- Description: [what the issue is]
- Location: [file:line]
- Observation: [evidence from reviewer]
If no issues found by any reviewer: Skip to Step 7 with "No issues found - clean review!"
For each unique issue, launch a parallel issue-scorer agent (Haiku) to validate it.
IMPORTANT: Launch ALL scoring agents in a single message for parallel execution.
For each issue, prompt the scorer with:
Spec folder: {spec_folder_path}
Issue: {description}
Location: {file:line}
Reported by: {reviewer(s)}
Observation: {what the reviewer observed}
After all scorers complete:
# Code Review Results
## Validated Issues
| # | Score | Reviewer(s) | Issue | Location |
|---|-------|-------------|-------|----------|
| 1 | 100 | bug-scanner | SQL injection vulnerability | api/users.ts:42 |
| 2 | 75 | spec-compliance | FR-003 not fully implemented | lib/auth.ts:156 |
| 3 | 50 | comments | Outdated comment | utils/helper.ts:23 |
## Issue Details
### Issue 1: SQL injection vulnerability (Score: 100)
- **Location:** api/users.ts:42
- **Reported by:** bug-scanner
- **Observation:** User input concatenated directly into query
- **Scorer justification:** Confirmed - query uses string interpolation with unsanitized input
### Issue 2: FR-003 not fully implemented (Score: 75)
- **Location:** lib/auth.ts:156
- **Reported by:** spec-compliance
- **Observation:** Spec requires token refresh, but only token generation exists
- **Scorer justification:** Verified - refresh endpoint is mentioned in spec but not implemented
[Continue for all issues >= 50]
## Filtered Out (Score < 50)
- [N] issues were filtered as unverified or false positives
After filtering and scoring, route based on how many validated issues were found:
ā
Clean review! No issues found with score >= 50.
Task is ready for completion. Run /cc-track:complete-task to finalize.
Remind about documentation updates:
.cc-track/decision_log.md for any architectural decisions.cc-track/system_patterns.md for new patterns establishedPresent the single issue inline:
š Found 1 validated issue:
### {Issue Title} (Score: {score})
- **Location:** {file:line}
- **Reported by:** {reviewer(s)}
- **Observation:** {evidence}
- **Scorer justification:** {justification}
Would you like me to fix this issue, or proceed to /cc-track:complete-task?
Wait for user direction before proceeding. If they want it fixed, implement the fix and remind them to re-run /cc-track:prepare-completion to verify.
š Found {N} validated issues. Invoking /cc-track:fix-issues for structured triage.
Then invoke the /cc-track:fix-issues command using the SlashCommand tool. The fix-issues command will:
issue-log.md in the spec folder