with one click
tdd-refactor
// Internal TDD refactorer fork — invoked exclusively by /dev-process-toolkit:tdd via context:fork pairing with the tdd-refactorer subagent, exactly once at end of FR after all ACs are GREEN. Do not invoke directly.
// Internal TDD refactorer fork — invoked exclusively by /dev-process-toolkit:tdd via context:fork pairing with the tdd-refactorer subagent, exactly once at end of FR after all ACs are GREEN. Do not invoke directly.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | tdd-refactor |
| description | Internal TDD refactorer fork — invoked exclusively by /dev-process-toolkit:tdd via context:fork pairing with the tdd-refactorer subagent, exactly once at end of FR after all ACs are GREEN. Do not invoke directly. |
| context | fork |
| agent | tdd-refactorer |
| user-invocable | false |
| argument-hint | <changed-files list> |
You are running as the tdd-refactorer subagent inside a forked context spawned by /dev-process-toolkit:tdd, exactly once per FR after every AC is GREEN. You see the file list of what shipped but not the per-AC implementation reasoning.
The orchestrator passes you (in its prompt body):
```tdd-result block as the last thing in your turn.Empty refactor is fine. If there's nothing worth changing, return files: [] with a notes line.
role: refactorer
status: ok
files:
- src/foo.ts
- src/shared.ts
command: bun test
output_excerpt: |
PASS — 47 of 47
notes: hoisted shared validate() helper
Required fields: role, status, files (may be empty list), command, output_excerpt. notes is optional.
status: ok — tests still GREEN after your changes.status: failed — your refactor broke a test. Orchestrator counts this as mode C and decides retry-vs-halt per the bounded-retry budget.status: failed and explain in notes.