|
1 | 1 | --- |
2 | 2 | name: implement |
3 | | -description: Disciplined per-commit workflow. Sequential spawn loop — greybeard, builder, intern/tester, critic. Use for substantial commit-sized landings, not tiny bounded edits. |
| 3 | +description: Disciplined per-commit workflow with greybeard review, a build gate, and a critic loop. Use when each commit should be reviewed and verified before it lands. |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Implement |
7 | 7 |
|
8 | | -How to land substantial, commit-sized work. Tiny / single-file / one-route / clear bounded product edits: DIY — do not load this loop. |
| 8 | +How to produce reviewed, verified commits. Load when each commit should go through architectural review, build verification, and code critique before it lands. |
9 | 9 |
|
10 | | -When this recipe runs: spawn directors, wait for reports, decide the next spawn from those reports. Sequential by design (one unit at a time). Do not invent a worker-count or fan-out ceiling. Track units with `manage_tasks`. |
| 10 | +This is a standalone skill, not part of dispatch. The caller defines what work to do and where the commit boundaries are. This skill defines _how_ each commit gets produced. |
11 | 11 |
|
12 | | -Closed directors: `greybeard`, `builder`, `intern`, `tester`, `critic`. Never a catch-all worker. |
| 12 | +Tiny / single-file / one-route / clear bounded edits do not need this loop. |
13 | 13 |
|
14 | 14 | ## Prerequisites |
15 | 15 |
|
16 | | -Load `style` and `philosophy` via `use_skill` on the primary **before spawning**. Copy those conventions into every worker brief (workers do not mount `use_skill`). |
| 16 | +Load `style` and `philosophy` first. Follow their conventions throughout. Workers do not mount `use_skill` — copy those conventions into any worker brief. |
17 | 17 |
|
18 | 18 | ## Tracking |
19 | 19 |
|
20 | 20 | Track commit-sized units with `manage_tasks`. One item per unit that will become a commit. |
21 | 21 |
|
22 | | -- Before starting: create an item for each unit from the caller's instructions. |
23 | | -- When a unit begins: mark it in progress. |
24 | | -- When critic is clean and the build gate passed: mark it done. |
25 | | -- New work that surfaces → append a `manage_tasks` item and run the full loop. |
| 22 | +- Before starting: create an item for each unit from the caller's instructions |
| 23 | +- When a unit begins: mark it in progress |
| 24 | +- When critic is clean and the build gate passed: mark it done |
| 25 | +- New work that surfaces → append an item and run the full loop |
26 | 26 |
|
27 | | -## Per-commit spawn loop |
| 27 | +## Per-commit workflow |
28 | 28 |
|
29 | | -For each unit, run these steps in order. Do not skip. When this loop is running, do not DIY the unit — spawn builder. |
| 29 | +For each unit, run these steps in order. Do not skip. |
30 | 30 |
|
31 | | -### 1. Review — greybeard |
| 31 | +### 1. Greybeard — approach |
32 | 32 |
|
33 | 33 | `task(agent="greybeard")` on the approach before any code is written. |
34 | 34 |
|
35 | 35 | Send: what will change and why, files expected, design decisions and trade-offs, uncertainties. |
36 | 36 |
|
37 | | -Adjust the plan from the report, then spawn builder. Greybeard is for approach, not execution. |
| 37 | +If greybeard identifies problems, adjust before implementing. A different approach deserves a serious look. Disagreement needs a reason. Greybeard is for approach, not execution. |
38 | 38 |
|
39 | | -### 2. Implement — builder |
| 39 | +### 2. Implement and test |
40 | 40 |
|
41 | | -`task(agent="builder")` with a typed brief: `intent`, `success_criteria`, `do_not`, `report_focus`. |
42 | | - |
43 | | -- **Bug fixes:** start from a failing test — write the repro, confirm it fails, fix, confirm it passes. If the test does not fail first, the bug is not understood. |
| 41 | +- **Bug fixes:** write a failing repro first, confirm it fails, fix, confirm it passes. If the test does not fail first, the bug is not understood. |
44 | 42 | - **Features:** tests ship with the change. Assert the new behavior, not merely that the process did not crash. |
45 | 43 |
|
| 44 | +Follow the repository's existing test conventions. If there are no tests, ask what framework to use before proceeding. |
| 45 | + |
46 | 46 | Keep scope to this unit. Additional work becomes a later `manage_tasks` item. |
47 | 47 |
|
48 | | -### 3. Build gate — intern or tester |
| 48 | +### 3. Build gate |
| 49 | + |
| 50 | +Run the project's full pipeline (`make`, or format / lint / build / test). `task(agent="intern")` for a mechanical full pipeline, or `task(agent="tester")` for suite / repro evidence. |
49 | 51 |
|
50 | | -`task(agent="intern")` or `task(agent="tester")` for the project build/test gate (`make`, or the project's full pipeline: format, lint, build, test). |
| 52 | +Do not move forward with a broken build. Failures from this unit → fix and re-run. Pre-existing unrelated failures → Blockers and stop. Do not substitute a partial compile for the full gate. |
51 | 53 |
|
52 | | -- `intern` — mechanical full pipeline |
53 | | -- `tester` — suite / repro |
| 54 | +### 4. Commit |
54 | 55 |
|
55 | | -Do not move forward with a broken build. Failures from this unit → re-dispatch builder. Pre-existing unrelated failures → Blockers and stop. Do not substitute a partial compile for the full gate. |
| 56 | +Create the commit. Follow `style`. Tests land in the same commit as the implementation. |
56 | 57 |
|
57 | | -### 4. Critic |
| 58 | +### 5. Critic loop |
58 | 59 |
|
59 | | -`task(agent="critic")` on the diff. Include the intent agreed with greybeard so critic evaluates plan vs execution. Limit findings to this unit; pre-existing issues in touched files are out of scope unless they block the gate. |
| 60 | +`task(agent="critic")` on `git show HEAD`. Include the intent agreed with greybeard so critic evaluates plan vs execution. Limit findings to this unit. |
60 | 61 |
|
61 | | -Blocking findings → re-dispatch builder with those findings in `success_criteria` / `do_not`, then re-run the gate and critic. Close the loop; if still blocked, report Blockers — do not loop forever. |
| 62 | +Blocking findings → fix, re-run the gate, land the fix on the right commit (amend HEAD, or edit-in-place via `git-rebase` for an earlier commit), then re-run critic. Close the loop; if still blocked, report Blockers — do not loop forever. |
62 | 63 |
|
63 | 64 | When critic is clean (or remaining findings are acknowledged judgment calls), mark the unit done and start the next. |
64 | 65 |
|
65 | 66 | ## Non-negotiables |
66 | 67 |
|
67 | | -- Tiny / single-file / one-route / clear bounded edits: DIY. This recipe is for substantial units — when running it, spawn builder; do not DIY the coding. |
68 | | -- Spawn `greybeard` → `builder` → `intern`|`tester` → `critic` via `task(agent=…)`. |
69 | | -- Track only with `manage_tasks`. |
70 | 68 | - Do not shortcut the loop. Skipping greybeard "because this is simple" or critic "because the build passed" defeats the recipe. |
71 | 69 | - Build must pass before treating a unit as done. |
72 | 70 | - Do not invent a worker-count or fan-out ceiling. |
| 71 | +- Track only with `manage_tasks`. |
73 | 72 |
|
74 | 73 | ## Report |
75 | 74 |
|
76 | | -When the requested units are done (or blocked), synthesize for the operator: |
| 75 | +When the requested units are done (or blocked): |
77 | 76 |
|
78 | 77 | ## Summary |
79 | 78 |
|
|
0 commit comments