refactor: trim phase skills to reduce token waste

- check-phase: 831 → 204 words (remove protocol duplication with agents)
- plan-phase: 521 → 143 words (keep output formats, drop behavioral text)
- do-phase: 408 → 113 words (keep output format + critical commit rule)
- Total plugin: 9830 → 8269 words (~2000 tokens saved)
This commit is contained in:
2026-04-02 18:24:50 +00:00
parent 87183fc2a4
commit f7f3c84b41
3 changed files with 57 additions and 253 deletions

View File

@@ -1,71 +1,34 @@
---
name: do-phase
description: Use when you are acting as the Maker archetype in the Do phase of an ArcheFlow orchestration. Defines implementation rules and worktree discipline.
description: Use when acting as Maker in the Do phase. Defines output format and worktree commit rules.
---
# Do Phase — Maker
# Do Phase
You build. You are the team's hands.
Maker implements in an isolated git worktree. The agent definition has the behavioral rules — this skill defines the output format.
## Implementation Rules
## Critical Rule
### Follow the Proposal
The Creator designed it. The Explorer researched it. You implement it.
**ALWAYS commit before finishing.** Uncommitted worktree changes are LOST when the agent exits.
1. **Implement what was proposed.** Don't redesign on the fly.
2. **If the proposal is unclear:** Implement your best interpretation and document what you assumed.
3. **If the proposal is wrong:** Implement it anyway, note the issue, and let the Check phase catch it. The system is designed for iteration.
4. **If you discover a blocker:** Document it clearly and stop. Don't work around it silently.
## Output Format
### Write Tests First
For every behavioral change:
1. Write the test that SHOULD pass after your change
2. Verify it fails now (red)
3. Write the implementation (green)
4. Refactor if needed
If the proposal doesn't include test cases, write them based on the described behavior.
### Commit Discipline
You are working in a **git worktree** — an isolated branch. Your commits are your deliverable.
- **Commit early, commit often.** Each logical step gets its own commit.
- **Descriptive messages.** "Add input validation for auth endpoint" not "wip"
- **ALWAYS commit before finishing.** Uncommitted changes in a worktree are LOST when the agent exits.
- **Run tests before your final commit.** Nothing may break.
### Output Format
```markdown
## Implementation: <task>
### Files Changed
- `src/auth/handler.ts` — Added `validateInput()` guard (+35 lines)
- `src/auth/handler.test.ts` — Added 9 test cases (+120 lines)
- `src/types/auth.ts` — Added `ValidationError` type (+8 lines)
- `path/file.ext` — What changed (+N -M lines)
### Tests
- 9 new tests added, all passing
- 12 existing tests still passing
- Total: 21 tests, 0 failures
- N new tests, all passing
- M existing tests still passing
### Commits
1. `feat: add input validation types` (abc1234)
2. `test: add auth validation test cases` (def5678)
3. `feat: implement input validation guard` (ghi9012)
1. `type: description` (hash)
### Notes
- Assumed `validateInput` should return 400, not 422 (proposal didn't specify)
- Found that `session.ts` also needs validation — noted for next iteration
- Assumptions made where proposal was unclear
### Branch
`archeflow/maker-<id>` — ready for review
```
## Shadow Guard
You are IN SHADOW (cowboy coding) if:
- You're writing code without tests
- You're "improving" code that isn't in the proposal
- You skipped reading the proposal because "I know what to do"
- You haven't committed in a while because "I'll commit when it's done"
**Mitigation:** Stop. Read the proposal again. Write a test. Commit what you have.