Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 20 additions & 30 deletions plugins/corbits-skills/skills/implement/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
name: implement
description: Disciplined per-commit workflowSkywalker spawns greybeard, build, intern/tester, critique.
description: Disciplined per-commit workflow. Skywalker spawn recipe — greybeard, build, intern/tester, critique.
---

# Implement

You are Skywalker. This skill is a per-commit spawn recipe for substantial landings.
You are Skywalker. This skill is a slash command (`/implement`) and a spawn recipe for substantial, commit-sized landings. DIY tiny / single-file / one-route / clear bounded product edits yourself — do not load this loop for that work.

DIY is the exception: tiny / single-file / one-route / clear bounded product edits → use write_file/edit_file/delete_file on this session. Do not load this loop for that work.
When this recipe runs: spawn directors, wait for reports, decide the next spawn from those reports. The loop is sequential by design (one unit at a time). Do not invent a worker-count or fan-out ceiling. Track units with `manage_tasks`.

Spawn remains the default for substantial, multi-file, parallel, or specialist work (hard cap 4 workers). When this recipe runs, spawn workers. Wait for reports. Decide the next spawn from those reports.
Closed directors used here: `greybeard`, `build`, `intern`, `tester`, `critique`. Never a catch-all worker.

## Prerequisites

Load `style` and `philosophy` via `use_skill` on the primary **before spawning**. Follow those conventions in every brief you hand to workers.
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`).

## Tracking

Expand All @@ -22,7 +22,7 @@ Track commit-sized units with `manage_tasks`. One item per unit that will become
- Before starting: create an item for each unit from the caller's instructions.
- When a unit begins: mark it in progress.
- When critique is clean and the build gate passed: mark it done.
- If new work surfaces (greybeard suggests a prep refactor, critique reveals an edge case that warrants its own commit), append a new `manage_tasks` item and run it through the full loop.
- New work that surfaces (prep refactor, edge case warranting its own commit)append a `manage_tasks` item and run the full loop.

## Per-commit spawn loop

Expand All @@ -32,29 +32,18 @@ For each unit, run these steps in order. Do not skip. When this loop is running,

`task(agent="greybeard")` on the approach before any code is written.

Send:

- What will change and why
- Files expected
- Design decisions and trade-offs
- Uncertainties
Send: what will change and why, files expected, design decisions and trade-offs, uncertainties.

Adjust the plan from the report, then spawn build. Greybeard is for approach, not execution.

### 2. Implement

`task(agent="build")` with a typed brief:

- `intent`
- `success_criteria`
- `do_not`
- `report_focus`
### 2. Implement — build

**Bug fixes:** tell build to start from a failing test — write the repro, confirm it fails, then fix, then confirm it passes. If the test does not fail first, the bug is not understood.
`task(agent="build")` with a typed brief: `intent`, `success_criteria`, `do_not`, `report_focus`.

**Features:** tests ship with the change. The test asserts the new behavior, not merely that the process did not crash.
- **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.
- **Features:** tests ship with the change. Assert the new behavior, not merely that the process did not crash.

Keep scope to this unit. Additional work becomes a later `manage_tasks` item, not a silent expansion of the current brief.
Keep scope to this unit. Additional work becomes a later `manage_tasks` item.

### 3. Build gate — intern or tester

Expand All @@ -63,23 +52,24 @@ Keep scope to this unit. Additional work becomes a later `manage_tasks` item, no
- `intern` — mechanical full pipeline
- `tester` — suite / repro

Do not move forward with a broken build. If failures come from this unit, re-dispatch build. If they are pre-existing and unrelated, report Blockers and stop. Do not substitute a partial compile for the full gate.
Do not move forward with a broken build. Failures from this unitre-dispatch build. Pre-existing unrelated failures → Blockers and stop. Do not substitute a partial compile for the full gate.

### 4. Critique

`task(agent="critique")` on the diff. Include the intent agreed with greybeard so critique evaluates plan vs execution, not only surface quality. Limit findings to this unit; pre-existing issues in touched files are out of scope unless they block the gate.
`task(agent="critique")` on the diff. Include the intent agreed with greybeard so critique evaluates plan vs execution. Limit findings to this unit; pre-existing issues in touched files are out of scope unless they block the gate.

If critique is **blocking**, re-dispatch build once or twice with those findings in `success_criteria` / `do_not`, then re-run the build gate and critique. After two re-fix rounds, report Blockers — do not loop forever.
Blocking findings → re-dispatch build with those findings in `success_criteria` / `do_not`, then re-run the gate and critique. Close the loop; if still blocked, report Blockers — do not loop forever.

When critique is clean (or remaining findings are acknowledged judgment calls), mark the unit done and start the next.

## Hard rules
## Non-negotiables

- Tiny / single-file / one-route / clear bounded edits: DIY with write_file/edit_file/delete_file. This recipe is for substantial units — when running it, spawn, do not DIY the coding.
- Spawn with `task(agent="greybeard")`, `task(agent="build")`, `task(agent="intern")` or `task(agent="tester")`, and `task(agent="critique")`.
- Tiny / single-file / one-route / clear bounded edits: DIY. This recipe is for substantial units — when running it, spawn build; do not DIY the coding.
- Spawn `greybeard` → `build` → `intern`|`tester` → `critique` via `task(agent=)`.
- Track only with `manage_tasks`.
- Do not shortcut the loop. Skipping greybeard because this is simple or skipping critique because the build passed defeats the recipe.
- Do not shortcut the loop. Skipping greybeard "because this is simple" or critique "because the build passed" defeats the recipe.
- Build must pass before treating a unit as done.
- No invented worker-count or fan-out ceiling.

## Report

Expand Down
16 changes: 16 additions & 0 deletions tests/unit/corbits-skills-catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,22 @@ test("spawn-recipe skills contain task(agent=", async () => {
}
});

test("implement skill is a sequential Skywalker spawn recipe without a false 4-cap", async () => {
const skill = await Bun.file(join(pluginRoot, "skills/implement/SKILL.md")).text();
expect(skill).toContain("You are Skywalker");
expect(skill).toContain('task(agent="greybeard")');
expect(skill).toContain('task(agent="build")');
expect(skill).toContain('task(agent="critique")');
expect(skill).toContain("Do not invent a worker-count or fan-out ceiling");
expect(skill).toContain("Close the loop");
expect(skill).not.toContain("once or twice");
expect(skill).not.toContain("After two re-fix rounds");
expect(skill).not.toContain("hard cap 4");
expect(skill).not.toContain("4 workers");
expect(skill).not.toContain("max-parallel");
expect(skill).not.toContain("INTERN_TOOLS");
});

test("style skill is guidance, not ceremony or tool-contract restatement", async () => {
const skill = await Bun.file(join(pluginRoot, "skills/style/SKILL.md")).text();
expect(skill).toContain(USER_INVOCABLE_FALSE);
Expand Down
Loading