- Implemented the 'monitor' command for coordinator role to handle monitoring events, task completion, and pipeline management. - Created role specifications for the coordinator, detailing responsibilities, command execution protocols, and session management. - Added role specifications for the analyst, discussant, explorer, and synthesizer in the ultra-analyze skill, defining their context loading, analysis, and synthesis processes.
2.7 KiB
prefix, inner_loop, message_types
| prefix | inner_loop | message_types | ||||||
|---|---|---|---|---|---|---|---|---|
| TDFIX | true |
|
Tech Debt Executor
Debt cleanup executor. Apply remediation plan actions in worktree: refactor code, update dependencies, add tests, add documentation. Batch-delegate to code-developer subagent, self-validate after each batch.
Phase 2: Load Remediation Plan
| Input | Source | Required |
|---|---|---|
| Session path | task description (regex: session:\s*(.+)) |
Yes |
| .msg/meta.json | /.msg/meta.json | Yes |
| Remediation plan | /plan/remediation-plan.json | Yes |
| Worktree info | meta.json:worktree.path, worktree.branch | Yes |
| Context accumulator | From prior TDFIX tasks (inner loop) | Yes (inner loop) |
- Extract session path from task description
- Read .msg/meta.json for worktree path and branch
- Read remediation-plan.json, extract all actions from plan phases
- Group actions by type: refactor, restructure, add-tests, update-deps, add-docs
- Split large groups (> 10 items) into sub-batches of 10
- For inner loop (fix-verify cycle): load context_accumulator from prior TDFIX tasks, parse review/validation feedback for specific issues
Batch order: refactor -> update-deps -> add-tests -> add-docs -> restructure
Phase 3: Execute Fixes
For each batch, delegate to code-developer subagent (synchronous, run_in_background: false):
Worktree constraint: ALL file operations and commands must execute within worktree path. Use cd "<worktree-path>" && ... prefix for all Bash commands.
Per-batch delegation:
- Provide batch type prompt (refactor/update-deps/add-tests/add-docs/restructure)
- List all items with file paths, descriptions, and fix steps
- Enforce: read files before modifying, minimal changes, backward compatibility, no new features, no suppressions
Fix Results Tracking:
| Field | Description |
|---|---|
| items_fixed | Count of successfully fixed items |
| items_failed | Count of failed items |
| items_remaining | Remaining items count |
| batches_completed | Completed batch count |
| files_modified | Array of modified file paths |
| errors | Array of error messages |
After each batch, verify file modifications via git diff --name-only in worktree.
Phase 4: Self-Validation
All commands in worktree:
| Check | Command | Pass Criteria |
|---|---|---|
| Syntax | tsc --noEmit or python -m py_compile |
No new errors |
| Lint | eslint --no-error-on-unmatched-pattern |
No new errors |
Write <session>/fixes/fix-log.json with fix results. Update .msg/meta.json with fix_results.
Append to context_accumulator for next TDFIX task (inner loop): files modified, fixes applied, validation results, discovered caveats.