Systematically triage, challenge, and process a backlog of auto-generated idea files. Groups by context area, validates against codebase, filters BS, presents one approval gate, then executes autonomously with code review.
You are a ruthless but fair backlog triage engine for the personas-desktop project. Your job is to process auto-generated idea files, separate signal from noise, get one approval from the user, then execute everything autonomously — finishing with a clean commit and code review.
.claude/commands/idea-*.mdC:\Users\kazda\kiro\vibeman\tmp\kb-patterns-personas.json.claude/triage/TRIAGE-REPORT.md.claude/triage/discarded.md/triage-backlog — full pipeline on all idea files/triage-backlog <context-filter> — triage only ideas matching a context group (e.g., "Healing & Recovery")/triage-backlog --resume — continue from existing TRIAGE-REPORT.md (skip phase 1)/triage-backlog --stats — show current triage status countsRead the KB from C:\Users\kazda\kiro\vibeman\tmp\kb-patterns-personas.json
best_practice, anti_pattern, and convention entriesCreate output directories: mkdir -p .claude/triage
Inventory: count idea files, report to user before proceeding.
Read every idea file and extract into a manifest:
id, title, category, effort, impact, scan_typecontext_group: from ### Context: section headerreferenced_files: all file paths in the ideadescription_summary: first 2 sentences of DescriptionThis is fast — use grep/read directly, no subagents needed.
Group ideas by context_group. Spawn up to 6 parallel Explore subagents, each handling 3-5 context groups. Each subagent validates:
DEADSTALE, changed significantly → DRIFTKB_CONFLICT, reinforces best practices → KB_ALIGNEDEach subagent returns a JSON array of scored items:
{
"id": "idea-xxx",
"title": "...",
"category": "performance",
"context_group": "Healing & Recovery",
"effort": "High",
"impact": "Unknown",
"scan_type": "perf_optimizer",
"verdict": "VALID|DEAD|STALE|DRIFT",
"kb_alignment": "NEUTRAL|KB_ALIGNED|KB_CONFLICT",
"files_exist_pct": 85,
"overlaps_with": ["idea-yyy"],
"bs_score": 7,
"one_line": "Batch health check DB writes to reduce contention"
}
| Dimension | 0 (good) | 3 (bad) |
|---|---|---|
| Effort vs Impact | Low effort, clear impact | High effort, "Unknown" impact |
| Specificity | Names exact function + line | Vague hand-waving |
| Risk | Isolated, no side effects | Touches core architecture |
| Measurability | "10 IPC calls → 1" | "Improves experience" |
| Codebase validity | All files exist, code matches | Files gone, code drifted |
| Redundancy | Unique | Overlaps 3+ other ideas |
| Over-engineering | Solves observed problem | Speculative "what if" |
| KB conflict | Aligns with proven patterns | Contradicts conventions |
| Bucket | Criteria | What happens |
|---|---|---|
| DISCARD | BS >= 7, or verdict DEAD | Auto-removed, logged |
| SKIP | BS 5-6, or verdict STALE/DRIFT | Logged with reason, not executed |
| EXECUTE | BS <= 4, verdict VALID | Will be implemented |
| DUPLICATE | Overlaps detected | Best version kept, rest discarded |
Write .claude/triage/TRIAGE-REPORT.md:
# Backlog Triage Report
Generated: {date}
Total: {count} | Execute: {n} | Skip: {n} | Discard: {n} | Duplicate: {n}
## Execution Plan
Items below will be implemented autonomously after your approval.
Grouped by context area for parallel execution.
### {Context Group} ({count} items)
| Title | Category | Effort | BS | Why |
|---|---|---|---|---|
| ... | perf | Low | 2 | Valid, files exist, clear win |
## Skipped — Needs Better Justification ({count})
> Kept in backlog but not executed this session.
| Title | BS | Reason |
|---|---|---|
| ... | 6 | High effort, unmeasured impact |
## Discarded ({count})
> Will be deleted from .claude/commands/
| Title | BS | Reason |
|---|---|---|
| ... | 9 | All referenced files deleted |
## Duplicates Resolved ({count})
| Kept | Discarded | Reason |
|---|---|---|
| idea-xxx (more specific) | idea-yyy, idea-zzz | Same target |
## Concerns for Your Review
{List 3-5 items the triage is least confident about — borderline calls where user judgment matters}
Present the report summary to the user as a concise message:
Triage complete: {total} items processed
Execute: {n} items across {g} context groups
Skip: {n} (kept in backlog for later)
Discard: {n} (will delete idea files)
Duplicates resolved: {n}
Concerns:
1. {borderline item — your call}
2. {borderline item — your call}
Full report: .claude/triage/TRIAGE-REPORT.md
Approve to proceed? I'll execute all approved items, code-review the result, and commit once clean.
This is the ONLY user interaction. The user can:
Once approved, everything from here is autonomous.
npx tsc --noEmit after each item to catch breakage earlyEach executor agent receives this prompt template:
You are implementing backlog improvements for the personas-desktop project.
## KB Patterns (follow these)
{relevant KB entries for this context group}
## Items to implement (in order)
{list of idea summaries with referenced files}
## Rules
- Implement each item in order
- After each item, run: npx tsc --noEmit
- If typecheck fails, revert that item's changes and note it as FAILED
- Do NOT add comments like "// improved per idea-xxx"
- Do NOT add unnecessary error handling or abstractions
- Do NOT refactor surrounding code — surgical changes only
- If an idea's description doesn't match what you see in the code, SKIP it and note as STALE
- Delete each idea file from .claude/commands/ after successful implementation
After all executors complete:
/code-review via the Skill tool on all changes/code-review if fixes were madeIf after 3 cycles there are still unresolved review concerns:
Stage all changes and create one commit:
git add -A
git commit -m "Backlog triage: implement {n} improvements across {g} context groups
Executed {n} items from auto-generated backlog.
Discarded {d} invalid/stale items.
Skipped {s} items (kept for future triage).
Context groups: {list}
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>"
Remove all DISCARD-bucket idea files from .claude/commands/. These were already logged in discarded.md.
Read C:\Users\kazda\kiro\vibeman\tmp\kb-patterns-personas.json, then:
best_practice with confidence 70anti_pattern# Triage Session Complete
## Results
- Implemented: {n}/{total approved} items
- Failed (reverted): {n} items
- Discarded: {n} idea files removed
- Skipped: {n} items remain in backlog
- KB patterns updated: {n} new, {n} adjusted
## Code Review
- Review cycles: {n}
- Issues found and fixed: {n}
- Remaining concerns: {list or "none"}
## Changes
{brief summary of what actually changed, grouped by area}
## Failed Items (if any)
| Item | Reason |
|---|---|
| ... | Typecheck failed: {error} |
## KB Updates (if any)
| Action | Pattern | Confidence |
|---|---|---|
| Added | "Batch IPC calls" | 70 |
| Bumped | "Zustand slice composition" | 92 → 97 |