@kamilmarzynski/scifi 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +232 -0
- package/dist/skills/sf-bug/manifest.d.ts +2 -0
- package/dist/skills/sf-bug/manifest.js +6 -0
- package/dist/skills/sf-bug/manifest.js.map +1 -0
- package/dist/skills/sf-change/manifest.d.ts +2 -0
- package/dist/skills/sf-change/manifest.js +6 -0
- package/dist/skills/sf-change/manifest.js.map +1 -0
- package/dist/skills/sf-code-review/manifest.d.ts +2 -0
- package/dist/skills/sf-code-review/manifest.js +5 -0
- package/dist/skills/sf-code-review/manifest.js.map +1 -0
- package/dist/skills/sf-continue/manifest.d.ts +2 -0
- package/dist/skills/sf-continue/manifest.js +6 -0
- package/dist/skills/sf-continue/manifest.js.map +1 -0
- package/dist/skills/sf-feature/manifest.d.ts +2 -0
- package/dist/skills/sf-feature/manifest.js +6 -0
- package/dist/skills/sf-feature/manifest.js.map +1 -0
- package/dist/skills/sf-fix/manifest.d.ts +2 -0
- package/dist/skills/sf-fix/manifest.js +6 -0
- package/dist/skills/sf-fix/manifest.js.map +1 -0
- package/dist/skills/sf-handover/manifest.d.ts +2 -0
- package/dist/skills/sf-handover/manifest.js +5 -0
- package/dist/skills/sf-handover/manifest.js.map +1 -0
- package/dist/skills/sf-implement/manifest.d.ts +2 -0
- package/dist/skills/sf-implement/manifest.js +6 -0
- package/dist/skills/sf-implement/manifest.js.map +1 -0
- package/dist/skills/sf-plan/manifest.d.ts +2 -0
- package/dist/skills/sf-plan/manifest.js +6 -0
- package/dist/skills/sf-plan/manifest.js.map +1 -0
- package/dist/skills/sf-plan-review/manifest.d.ts +2 -0
- package/dist/skills/sf-plan-review/manifest.js +5 -0
- package/dist/skills/sf-plan-review/manifest.js.map +1 -0
- package/dist/skills/sf-receiving-review/manifest.d.ts +2 -0
- package/dist/skills/sf-receiving-review/manifest.js +5 -0
- package/dist/skills/sf-receiving-review/manifest.js.map +1 -0
- package/dist/skills/sf-spec-review/manifest.d.ts +2 -0
- package/dist/skills/sf-spec-review/manifest.js +5 -0
- package/dist/skills/sf-spec-review/manifest.js.map +1 -0
- package/dist/skills/sf-tdd/manifest.d.ts +2 -0
- package/dist/skills/sf-tdd/manifest.js +5 -0
- package/dist/skills/sf-tdd/manifest.js.map +1 -0
- package/dist/skills/sf-verification/manifest.d.ts +2 -0
- package/dist/skills/sf-verification/manifest.js +5 -0
- package/dist/skills/sf-verification/manifest.js.map +1 -0
- package/dist/src/cli/commands/bug.d.ts +2 -0
- package/dist/src/cli/commands/bug.js +58 -0
- package/dist/src/cli/commands/bug.js.map +1 -0
- package/dist/src/cli/commands/finish.d.ts +2 -0
- package/dist/src/cli/commands/finish.js +43 -0
- package/dist/src/cli/commands/finish.js.map +1 -0
- package/dist/src/cli/commands/fix.d.ts +2 -0
- package/dist/src/cli/commands/fix.js +60 -0
- package/dist/src/cli/commands/fix.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts +2 -0
- package/dist/src/cli/commands/init.js +92 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/commands/list.d.ts +2 -0
- package/dist/src/cli/commands/list.js +52 -0
- package/dist/src/cli/commands/list.js.map +1 -0
- package/dist/src/cli/commands/plan-ready.d.ts +2 -0
- package/dist/src/cli/commands/plan-ready.js +27 -0
- package/dist/src/cli/commands/plan-ready.js.map +1 -0
- package/dist/src/cli/commands/plan.d.ts +2 -0
- package/dist/src/cli/commands/plan.js +43 -0
- package/dist/src/cli/commands/plan.js.map +1 -0
- package/dist/src/cli/commands/spec-ready.d.ts +2 -0
- package/dist/src/cli/commands/spec-ready.js +27 -0
- package/dist/src/cli/commands/spec-ready.js.map +1 -0
- package/dist/src/cli/commands/spec.d.ts +2 -0
- package/dist/src/cli/commands/spec.js +46 -0
- package/dist/src/cli/commands/spec.js.map +1 -0
- package/dist/src/cli/commands/start.d.ts +2 -0
- package/dist/src/cli/commands/start.js +27 -0
- package/dist/src/cli/commands/start.js.map +1 -0
- package/dist/src/cli/commands/status.d.ts +2 -0
- package/dist/src/cli/commands/status.js +62 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/task.d.ts +2 -0
- package/dist/src/cli/commands/task.js +64 -0
- package/dist/src/cli/commands/task.js.map +1 -0
- package/dist/src/cli/commands/worktree.d.ts +2 -0
- package/dist/src/cli/commands/worktree.js +33 -0
- package/dist/src/cli/commands/worktree.js.map +1 -0
- package/dist/src/cli/index.d.ts +3 -0
- package/dist/src/cli/index.js +106 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/core/bugs/create.d.ts +13 -0
- package/dist/src/core/bugs/create.js +28 -0
- package/dist/src/core/bugs/create.js.map +1 -0
- package/dist/src/core/bugs/frontmatter.d.ts +7 -0
- package/dist/src/core/bugs/frontmatter.js +65 -0
- package/dist/src/core/bugs/frontmatter.js.map +1 -0
- package/dist/src/core/bugs/id.d.ts +1 -0
- package/dist/src/core/bugs/id.js +4 -0
- package/dist/src/core/bugs/id.js.map +1 -0
- package/dist/src/core/bugs/paths.d.ts +2 -0
- package/dist/src/core/bugs/paths.js +8 -0
- package/dist/src/core/bugs/paths.js.map +1 -0
- package/dist/src/core/bugs/types.d.ts +12 -0
- package/dist/src/core/bugs/types.js +3 -0
- package/dist/src/core/bugs/types.js.map +1 -0
- package/dist/src/core/fixes/create.d.ts +11 -0
- package/dist/src/core/fixes/create.js +43 -0
- package/dist/src/core/fixes/create.js.map +1 -0
- package/dist/src/core/fixes/frontmatter.d.ts +7 -0
- package/dist/src/core/fixes/frontmatter.js +50 -0
- package/dist/src/core/fixes/frontmatter.js.map +1 -0
- package/dist/src/core/fixes/id.d.ts +1 -0
- package/dist/src/core/fixes/id.js +4 -0
- package/dist/src/core/fixes/id.js.map +1 -0
- package/dist/src/core/fixes/list.d.ts +8 -0
- package/dist/src/core/fixes/list.js +43 -0
- package/dist/src/core/fixes/list.js.map +1 -0
- package/dist/src/core/fixes/paths.d.ts +2 -0
- package/dist/src/core/fixes/paths.js +9 -0
- package/dist/src/core/fixes/paths.js.map +1 -0
- package/dist/src/core/fixes/transition.d.ts +9 -0
- package/dist/src/core/fixes/transition.js +26 -0
- package/dist/src/core/fixes/transition.js.map +1 -0
- package/dist/src/core/fixes/types.d.ts +9 -0
- package/dist/src/core/fixes/types.js +2 -0
- package/dist/src/core/fixes/types.js.map +1 -0
- package/dist/src/core/init/config.d.ts +6 -0
- package/dist/src/core/init/config.js +18 -0
- package/dist/src/core/init/config.js.map +1 -0
- package/dist/src/core/init/install-skills.d.ts +8 -0
- package/dist/src/core/init/install-skills.js +14 -0
- package/dist/src/core/init/install-skills.js.map +1 -0
- package/dist/src/core/init/prompt-harness.d.ts +8 -0
- package/dist/src/core/init/prompt-harness.js +19 -0
- package/dist/src/core/init/prompt-harness.js.map +1 -0
- package/dist/src/core/init/scaffold.d.ts +5 -0
- package/dist/src/core/init/scaffold.js +91 -0
- package/dist/src/core/init/scaffold.js.map +1 -0
- package/dist/src/core/init/types.d.ts +5 -0
- package/dist/src/core/init/types.js +2 -0
- package/dist/src/core/init/types.js.map +1 -0
- package/dist/src/core/output/emit.d.ts +8 -0
- package/dist/src/core/output/emit.js +50 -0
- package/dist/src/core/output/emit.js.map +1 -0
- package/dist/src/core/output/errors.d.ts +14 -0
- package/dist/src/core/output/errors.js +36 -0
- package/dist/src/core/output/errors.js.map +1 -0
- package/dist/src/core/output/index.d.ts +4 -0
- package/dist/src/core/output/index.js +4 -0
- package/dist/src/core/output/index.js.map +1 -0
- package/dist/src/core/output/tty.d.ts +1 -0
- package/dist/src/core/output/tty.js +4 -0
- package/dist/src/core/output/tty.js.map +1 -0
- package/dist/src/core/package-root.d.ts +1 -0
- package/dist/src/core/package-root.js +18 -0
- package/dist/src/core/package-root.js.map +1 -0
- package/dist/src/core/skills/catalog.d.ts +6 -0
- package/dist/src/core/skills/catalog.js +69 -0
- package/dist/src/core/skills/catalog.js.map +1 -0
- package/dist/src/core/skills/harness/adapter.d.ts +15 -0
- package/dist/src/core/skills/harness/adapter.js +31 -0
- package/dist/src/core/skills/harness/adapter.js.map +1 -0
- package/dist/src/core/skills/harness/claude-code.d.ts +2 -0
- package/dist/src/core/skills/harness/claude-code.js +37 -0
- package/dist/src/core/skills/harness/claude-code.js.map +1 -0
- package/dist/src/core/skills/harness/register-defaults.d.ts +1 -0
- package/dist/src/core/skills/harness/register-defaults.js +4 -0
- package/dist/src/core/skills/harness/register-defaults.js.map +1 -0
- package/dist/src/core/skills/harness/registry.d.ts +3 -0
- package/dist/src/core/skills/harness/registry.js +22 -0
- package/dist/src/core/skills/harness/registry.js.map +1 -0
- package/dist/src/core/skills/types.d.ts +18 -0
- package/dist/src/core/skills/types.js +9 -0
- package/dist/src/core/skills/types.js.map +1 -0
- package/dist/src/core/slugify.d.ts +2 -0
- package/dist/src/core/slugify.js +13 -0
- package/dist/src/core/slugify.js.map +1 -0
- package/dist/src/core/specs/create.d.ts +11 -0
- package/dist/src/core/specs/create.js +35 -0
- package/dist/src/core/specs/create.js.map +1 -0
- package/dist/src/core/specs/id.d.ts +1 -0
- package/dist/src/core/specs/id.js +4 -0
- package/dist/src/core/specs/id.js.map +1 -0
- package/dist/src/core/specs/lifecycle.d.ts +17 -0
- package/dist/src/core/specs/lifecycle.js +97 -0
- package/dist/src/core/specs/lifecycle.js.map +1 -0
- package/dist/src/core/specs/list.d.ts +6 -0
- package/dist/src/core/specs/list.js +43 -0
- package/dist/src/core/specs/list.js.map +1 -0
- package/dist/src/core/specs/metadata.d.ts +3 -0
- package/dist/src/core/specs/metadata.js +13 -0
- package/dist/src/core/specs/metadata.js.map +1 -0
- package/dist/src/core/specs/paths.d.ts +3 -0
- package/dist/src/core/specs/paths.js +13 -0
- package/dist/src/core/specs/paths.js.map +1 -0
- package/dist/src/core/specs/plan-session.d.ts +18 -0
- package/dist/src/core/specs/plan-session.js +24 -0
- package/dist/src/core/specs/plan-session.js.map +1 -0
- package/dist/src/core/specs/transition.d.ts +8 -0
- package/dist/src/core/specs/transition.js +33 -0
- package/dist/src/core/specs/transition.js.map +1 -0
- package/dist/src/core/specs/types.d.ts +17 -0
- package/dist/src/core/specs/types.js +8 -0
- package/dist/src/core/specs/types.js.map +1 -0
- package/dist/src/core/specs/worktree.d.ts +10 -0
- package/dist/src/core/specs/worktree.js +32 -0
- package/dist/src/core/specs/worktree.js.map +1 -0
- package/dist/src/core/tasks/frontmatter.d.ts +7 -0
- package/dist/src/core/tasks/frontmatter.js +53 -0
- package/dist/src/core/tasks/frontmatter.js.map +1 -0
- package/dist/src/core/tasks/list.d.ts +2 -0
- package/dist/src/core/tasks/list.js +18 -0
- package/dist/src/core/tasks/list.js.map +1 -0
- package/dist/src/core/tasks/paths.d.ts +2 -0
- package/dist/src/core/tasks/paths.js +11 -0
- package/dist/src/core/tasks/paths.js.map +1 -0
- package/dist/src/core/tasks/transition.d.ts +8 -0
- package/dist/src/core/tasks/transition.js +30 -0
- package/dist/src/core/tasks/transition.js.map +1 -0
- package/dist/src/core/tasks/types.d.ts +8 -0
- package/dist/src/core/tasks/types.js +2 -0
- package/dist/src/core/tasks/types.js.map +1 -0
- package/package.json +67 -0
- package/skills/sf-bug/DISPATCH-CODE-REVIEW.md +22 -0
- package/skills/sf-bug/body.md +117 -0
- package/skills/sf-bug/manifest.ts +8 -0
- package/skills/sf-change/body.md +178 -0
- package/skills/sf-change/manifest.ts +8 -0
- package/skills/sf-code-review/body.md +155 -0
- package/skills/sf-code-review/manifest.ts +7 -0
- package/skills/sf-continue/body.md +90 -0
- package/skills/sf-continue/manifest.ts +8 -0
- package/skills/sf-feature/ADR-TEMPLATE.md +16 -0
- package/skills/sf-feature/DISPATCH-SPEC-REVIEW.md +16 -0
- package/skills/sf-feature/SPEC-TEMPLATE.md +37 -0
- package/skills/sf-feature/body.md +145 -0
- package/skills/sf-feature/manifest.ts +8 -0
- package/skills/sf-fix/DISPATCH-CODE-REVIEW.md +25 -0
- package/skills/sf-fix/body.md +174 -0
- package/skills/sf-fix/manifest.ts +8 -0
- package/skills/sf-handover/body.md +67 -0
- package/skills/sf-handover/manifest.ts +7 -0
- package/skills/sf-implement/DISPATCH-CODE-REVIEW.md +19 -0
- package/skills/sf-implement/DISPATCH-HANDOVER.md +19 -0
- package/skills/sf-implement/DISPATCH-IMPLEMENTER.md +36 -0
- package/skills/sf-implement/body.md +147 -0
- package/skills/sf-implement/manifest.ts +8 -0
- package/skills/sf-plan/ADR-TEMPLATE.md +16 -0
- package/skills/sf-plan/DESIGN-TEMPLATE.md +54 -0
- package/skills/sf-plan/DISPATCH-PLAN-REVIEW.md +17 -0
- package/skills/sf-plan/TASK-TEMPLATE.md +30 -0
- package/skills/sf-plan/body.md +162 -0
- package/skills/sf-plan/manifest.ts +8 -0
- package/skills/sf-plan-review/body.md +90 -0
- package/skills/sf-plan-review/manifest.ts +7 -0
- package/skills/sf-receiving-review/body.md +73 -0
- package/skills/sf-receiving-review/manifest.ts +7 -0
- package/skills/sf-spec-review/body.md +83 -0
- package/skills/sf-spec-review/manifest.ts +7 -0
- package/skills/sf-tdd/body.md +120 -0
- package/skills/sf-tdd/manifest.ts +7 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Dispatch template: task implementer
|
|
2
|
+
|
|
3
|
+
Dispatch a subagent to implement ONE task test-first. Replace `{FEATURE_PATH}`
|
|
4
|
+
with the feature directory, `{TASK_SLUG}` with the task, and `{TASK_BODY}` with
|
|
5
|
+
the full inlined contents of the task file (do not make the subagent search for
|
|
6
|
+
it). Pick the model from the task's size — a single-file task with a complete
|
|
7
|
+
spec runs on a cheap model; multi-file or judgment-heavy tasks need a stronger
|
|
8
|
+
one. The TDD discipline lives in `sf-tdd`; do not restate it here.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
You are implementing one task from an approved plan. Load and follow the `sf-tdd` skill.
|
|
12
|
+
|
|
13
|
+
Task: {TASK_SLUG} (feature: {FEATURE_PATH})
|
|
14
|
+
|
|
15
|
+
--- task ---
|
|
16
|
+
{TASK_BODY}
|
|
17
|
+
--- end task ---
|
|
18
|
+
|
|
19
|
+
Reference only as needed (do not implement anything outside this task):
|
|
20
|
+
- {FEATURE_PATH}/spec.md — the contract.
|
|
21
|
+
- {FEATURE_PATH}/design.md — modules, seams, test strategy.
|
|
22
|
+
- docs/scifi/CONTEXT.md — glossary (ubiquitous language).
|
|
23
|
+
|
|
24
|
+
Build exactly this task, test-first per sf-tdd. Stay inside the task's scope —
|
|
25
|
+
no extra features, no unrelated refactors. Run the task's Validation step and
|
|
26
|
+
commit when green.
|
|
27
|
+
|
|
28
|
+
Report back with a status line, a one-line summary, and — when you committed —
|
|
29
|
+
a `Commit:` line giving the SHA(s) you produced (or `<base>..HEAD`) so the
|
|
30
|
+
orchestrator can hand the exact range to code review:
|
|
31
|
+
- DONE — built, tests green, validation passes, committed.
|
|
32
|
+
- DONE_WITH_CONCERNS — done, but flag doubts about correctness or scope.
|
|
33
|
+
- NEEDS_CONTEXT — name exactly what information is missing.
|
|
34
|
+
- BLOCKED — state what stops you.
|
|
35
|
+
Do not mark the task done — the orchestrator does that after code review.
|
|
36
|
+
```
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# sf-implement
|
|
2
|
+
|
|
3
|
+
You orchestrate the implementation of ONE plan-ready feature. You do not write
|
|
4
|
+
the feature's code yourself. You dispatch a fresh subagent per task, gate each
|
|
5
|
+
on a code review, and drive the whole feature to done. Your context stays clean
|
|
6
|
+
for coordination; each subagent gets exactly the context it needs and nothing
|
|
7
|
+
from your history.
|
|
8
|
+
|
|
9
|
+
Where `sf-plan` produced `design.md` and a set of tasks, you execute them.
|
|
10
|
+
|
|
11
|
+
## Long-term memory you must read
|
|
12
|
+
|
|
13
|
+
Before dispatching anything, read enough to brief subagents precisely:
|
|
14
|
+
|
|
15
|
+
- `<path>/spec.md` — the contract the feature must satisfy.
|
|
16
|
+
- `<path>/design.md` — the technical design: modules, seams, test strategy.
|
|
17
|
+
- `<path>/tasks/*.md` — the tasks you will dispatch.
|
|
18
|
+
- `docs/scifi/CONTEXT.md` — the ubiquitous-language glossary; referenced by
|
|
19
|
+
subagents, so know where it is to point them at it.
|
|
20
|
+
|
|
21
|
+
`<path>` is the feature directory (`docs/scifi/specs/<slug>/`).
|
|
22
|
+
|
|
23
|
+
## Flow
|
|
24
|
+
|
|
25
|
+
### 1. Start the feature
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
scifi start <slug> --json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Transitions `plan-ready → in-progress`. Starting a feature that is *already*
|
|
32
|
+
`in-progress` is an idempotent no-op, so a resumed run (e.g. routed here by
|
|
33
|
+
`sf-continue`) passes straight through. If it errors `PRECONDITION_FAILED`, the
|
|
34
|
+
feature has not been planned yet — stop and tell the user to finish `sf-plan`
|
|
35
|
+
first.
|
|
36
|
+
|
|
37
|
+
**Record the base commit.** Capture the current `HEAD` SHA now (`git rev-parse
|
|
38
|
+
HEAD`) — call it `{BASE}`. It is the point the feature's work branches from, so
|
|
39
|
+
`{BASE}..HEAD` is the whole-feature range you hand to handover later. On a
|
|
40
|
+
resumed run, `{BASE}` is the last commit *before* this feature's first task
|
|
41
|
+
commit; recover it from the git log if you no longer have it. The feature's
|
|
42
|
+
branch and worktree already exist (created by `sf-feature`); confirm you are
|
|
43
|
+
inside it — `scifi status <slug> --json` reports the `worktree` path. The CLI
|
|
44
|
+
does not run git; commits are yours and the implementers'.
|
|
45
|
+
|
|
46
|
+
### 2. Build the task order
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
scifi task list <slug> --json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Each task reports `{ slug, status, dependsOn }`. Use `depends-on` to order the
|
|
53
|
+
work: a task is **runnable** only when every task it depends on is `done`.
|
|
54
|
+
|
|
55
|
+
Execution is **serial** — one implementer subagent at a time, even when two
|
|
56
|
+
tasks have no dependency between them. `depends-on` controls *order*, not
|
|
57
|
+
concurrency; dispatching implementers in parallel against one working tree
|
|
58
|
+
causes file conflicts. Walk the tasks in dependency order, skipping any already
|
|
59
|
+
`done` (so a resumed run picks up where it stopped).
|
|
60
|
+
|
|
61
|
+
### 3. Per task: dispatch → review → done
|
|
62
|
+
|
|
63
|
+
For each runnable task, in order:
|
|
64
|
+
|
|
65
|
+
1. **Mark in-progress.**
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
scifi task start <slug> <task>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. **Dispatch the implementer.** Use `DISPATCH-IMPLEMENTER.md` (ships beside
|
|
72
|
+
this skill). Inline the full task body into the prompt — do **not** make the
|
|
73
|
+
subagent hunt for it — and give it the reference paths (spec, design,
|
|
74
|
+
context). The implementer loads `sf-tdd` and builds the task
|
|
75
|
+
test-first.
|
|
76
|
+
|
|
77
|
+
3. **Handle the implementer's status:**
|
|
78
|
+
- `DONE` — proceed to review.
|
|
79
|
+
- `DONE_WITH_CONCERNS` — read the concerns. Correctness/scope concerns: fix
|
|
80
|
+
before review. Observations: note and proceed.
|
|
81
|
+
- `NEEDS_CONTEXT` — provide the missing context, re-dispatch.
|
|
82
|
+
- `BLOCKED` — assess: more context (re-dispatch), too large (split the task),
|
|
83
|
+
or the plan itself is wrong (escalate to the user). Never blindly re-run
|
|
84
|
+
the same dispatch unchanged.
|
|
85
|
+
|
|
86
|
+
4. **Review gate (single review).** Dispatch a code-review subagent with
|
|
87
|
+
`DISPATCH-CODE-REVIEW.md`, which loads the `sf-code-review` skill. Fill
|
|
88
|
+
`{COMMIT_RANGE}` with the commit(s) the implementer reported for this task
|
|
89
|
+
(its `Commit:` line), plus `{FEATURE_PATH}` and `{TASK_SLUG}`. Hand its
|
|
90
|
+
report to the *same* implementer subagent to act on, governed by
|
|
91
|
+
`sf-receiving-review` with **review type: code**. Re-review until the verdict
|
|
92
|
+
is **Pass** or **With fixes**; a **Fail** re-loops. On **With fixes**, the
|
|
93
|
+
implementer addresses the Minor items (or you defer them with the user's ok)
|
|
94
|
+
before the task is marked done. Do not skip this and do not review it
|
|
95
|
+
yourself.
|
|
96
|
+
|
|
97
|
+
5. **Mark done.**
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
scifi task done <slug> <task>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
This unlocks dependents. Move to the next runnable task.
|
|
104
|
+
|
|
105
|
+
Run continuously — do not stop to ask "should I continue?" between tasks. Stop
|
|
106
|
+
only for a `BLOCKED` you cannot resolve, a genuine ambiguity, or all tasks done.
|
|
107
|
+
|
|
108
|
+
### 4. Handover
|
|
109
|
+
|
|
110
|
+
After every task is `done`:
|
|
111
|
+
|
|
112
|
+
- Dispatch the handover subagent with `DISPATCH-HANDOVER.md`, which loads the
|
|
113
|
+
`sf-handover` skill. Fill `{COMMIT_RANGE}` with `{BASE}..HEAD` — the base
|
|
114
|
+
commit you recorded in step 1 through the current `HEAD`, i.e. the whole
|
|
115
|
+
feature's work. It verifies the whole feature against `spec.md` and `design.md`
|
|
116
|
+
and runs a final quality check over the complete change — there is no separate
|
|
117
|
+
whole-feature code review; the per-task reviews already cleared each task.
|
|
118
|
+
- Route every finding back to a fix subagent; the orchestrator coordinates but
|
|
119
|
+
does not fix substantial issues itself. Only trivially small fixes are yours.
|
|
120
|
+
Handover's verdict is **Pass** or **Fail** (no "With fixes") — re-dispatch
|
|
121
|
+
until it is **Pass**.
|
|
122
|
+
- When handover passes, read `docs/scifi/HANDOVER.md` if it exists and run the
|
|
123
|
+
finishing actions it defines, in order — smoke tests, PR creation, invoking
|
|
124
|
+
any skills it points to. These run here at the orchestrator's top level (not
|
|
125
|
+
inside a subagent) so irreversible or visible actions stay visible. If the
|
|
126
|
+
file is absent, there are no finishing actions and you go straight to finish.
|
|
127
|
+
|
|
128
|
+
### 5. Finish
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
scifi finish <slug> --json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Transitions `in-progress → done`. Run this **last** — after handover passes and
|
|
135
|
+
after every `HANDOVER.md` action (PR creation included) has completed. This is
|
|
136
|
+
the end of the implement stage.
|
|
137
|
+
|
|
138
|
+
## Hard rules
|
|
139
|
+
|
|
140
|
+
- Never dispatch two implementer subagents at once — serial only.
|
|
141
|
+
- Never mark a task done before its code review clears (**Pass**, or **With
|
|
142
|
+
fixes** with its Minor items handled).
|
|
143
|
+
- Never let a subagent read your session history — construct its context from
|
|
144
|
+
the task and the reference files.
|
|
145
|
+
- Never call `scifi finish` while a handover finding is open or a `HANDOVER.md`
|
|
146
|
+
action is still pending.
|
|
147
|
+
- Never implement a task's feature code yourself — that is the subagent's job.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-implement",
|
|
5
|
+
description:
|
|
6
|
+
"Orchestrate implementation of a plan-ready feature. Dispatches one TDD subagent per task in dependency order, gates each on code review, then runs handover (sf-handover verification + optional HANDOVER.md actions) before finish.",
|
|
7
|
+
argumentHint: "[feature-slug]",
|
|
8
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# NNNN: <short decision title>
|
|
2
|
+
|
|
3
|
+
- Status: Accepted
|
|
4
|
+
- Date: <YYYY-MM-DD>
|
|
5
|
+
|
|
6
|
+
## Context
|
|
7
|
+
|
|
8
|
+
<The forces at play: the problem, the constraints, and the alternatives that existed.>
|
|
9
|
+
|
|
10
|
+
## Decision
|
|
11
|
+
|
|
12
|
+
<The choice that was made, stated plainly.>
|
|
13
|
+
|
|
14
|
+
## Consequences
|
|
15
|
+
|
|
16
|
+
<What becomes easier, what becomes harder, what we are now committed to.>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Design: <title>
|
|
2
|
+
|
|
3
|
+
- **Slug:** <slug>
|
|
4
|
+
- **Spec:** ./spec.md
|
|
5
|
+
- **Status:** draft
|
|
6
|
+
|
|
7
|
+
## Approach
|
|
8
|
+
|
|
9
|
+
<!-- One or two paragraphs. The shape of the solution and why this shape. -->
|
|
10
|
+
|
|
11
|
+
## Modules
|
|
12
|
+
|
|
13
|
+
<!--
|
|
14
|
+
For each module in the design:
|
|
15
|
+
### <module name>
|
|
16
|
+
- **Responsibility:** what it does (one sentence).
|
|
17
|
+
- **Interface:** what callers must know — key types, invariants, errors, ordering.
|
|
18
|
+
- **Why deep:** the behavior it hides behind that interface. If you cannot
|
|
19
|
+
answer this, the module is probably shallow — reconsider it.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
## Seams and data flow
|
|
23
|
+
|
|
24
|
+
<!-- Where the interfaces live, what crosses them, and in which direction.
|
|
25
|
+
A small diagram or numbered flow is fine. -->
|
|
26
|
+
|
|
27
|
+
## Architecture & context impact
|
|
28
|
+
|
|
29
|
+
- **Modules touched:** <!-- existing code this changes -->
|
|
30
|
+
- **New seams introduced:** <!-- new interfaces / boundaries, if any -->
|
|
31
|
+
- **ADRs:** <!-- decision records written or affected by this work; "none" if none -->
|
|
32
|
+
- **New CONTEXT.md terms:** <!-- terms added to the glossary; "none" if none -->
|
|
33
|
+
|
|
34
|
+
## Acceptance criteria coverage
|
|
35
|
+
|
|
36
|
+
<!-- Map each in-scope acceptance criterion from spec.md to the module(s) and
|
|
37
|
+
task(s) that satisfy it. Every criterion must appear here. -->
|
|
38
|
+
|
|
39
|
+
| Acceptance criterion | Satisfied by |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| | |
|
|
42
|
+
|
|
43
|
+
## Edge cases & failure modes
|
|
44
|
+
|
|
45
|
+
<!-- Error states, boundaries, and how the design handles each. -->
|
|
46
|
+
|
|
47
|
+
## Test strategy
|
|
48
|
+
|
|
49
|
+
<!-- How this gets verified: unit vs integration, what to fake vs hit for real,
|
|
50
|
+
what proves each acceptance criterion. Tasks inherit from this. -->
|
|
51
|
+
|
|
52
|
+
## Open questions
|
|
53
|
+
|
|
54
|
+
<!-- Unresolved items. Empty before plan-ready unless explicitly accepted. -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Dispatch template: plan review
|
|
2
|
+
|
|
3
|
+
Dispatch a subagent with the prompt below. Replace `{FEATURE_PATH}` with the
|
|
4
|
+
feature directory returned by `scifi plan` (e.g.
|
|
5
|
+
`docs/scifi/specs/<slug>`). The review criteria and output format live in the
|
|
6
|
+
`sf-plan-review` skill — do not restate them here.
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
You are reviewing an implementation plan. Load and follow the `sf-plan-review` skill.
|
|
10
|
+
|
|
11
|
+
This is a PLAN review (not a spec review, not a code review).
|
|
12
|
+
Feature to review: {FEATURE_PATH}
|
|
13
|
+
|
|
14
|
+
Read {FEATURE_PATH}/design.md, {FEATURE_PATH}/spec.md, every file under
|
|
15
|
+
{FEATURE_PATH}/tasks/, plus docs/scifi/CONTEXT.md, then return your report and
|
|
16
|
+
verdict exactly as the sf-plan-review skill defines.
|
|
17
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: <TASK-id>
|
|
3
|
+
slug: <task-slug>
|
|
4
|
+
status: pending
|
|
5
|
+
depends-on: []
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# <task title>
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
|
|
12
|
+
<!-- One outcome this task delivers. A vertical slice, not a layer. -->
|
|
13
|
+
|
|
14
|
+
## Tests first
|
|
15
|
+
|
|
16
|
+
<!-- The test(s) that prove this task, written before the implementation.
|
|
17
|
+
Name them concretely: what they assert and where they live. -->
|
|
18
|
+
|
|
19
|
+
## Work
|
|
20
|
+
|
|
21
|
+
<!-- The implementation steps, kept tight. Reference the design module(s). -->
|
|
22
|
+
|
|
23
|
+
## Validation
|
|
24
|
+
|
|
25
|
+
<!-- The command or observable outcome that proves this task is done,
|
|
26
|
+
e.g. `npm test path/to.test.ts`, or a CLI invocation and its expected output. -->
|
|
27
|
+
|
|
28
|
+
## Satisfies
|
|
29
|
+
|
|
30
|
+
<!-- The spec acceptance criterion (or design section) this task serves. -->
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# sf-plan
|
|
2
|
+
|
|
3
|
+
You run a technical planning session for ONE feature whose spec is already
|
|
4
|
+
spec-ready. The session ends with a written `design.md`, a set of task files,
|
|
5
|
+
and the feature marked plan-ready. This is planning only — no implementation.
|
|
6
|
+
|
|
7
|
+
Where `sf-feature` grilled *what* to build, you grill *how* to build it: the
|
|
8
|
+
module shape, the seams, the order of work. Same hard, friendly interrogation —
|
|
9
|
+
now against the codebase itself.
|
|
10
|
+
|
|
11
|
+
## Long-term memory
|
|
12
|
+
|
|
13
|
+
Before planning, read:
|
|
14
|
+
|
|
15
|
+
- `<path>/spec.md` — the approved spec. This is the contract you plan against.
|
|
16
|
+
- `docs/scifi/CONTEXT.md` — the project's ubiquitous language (canonical
|
|
17
|
+
glossary of domain terms).
|
|
18
|
+
|
|
19
|
+
`<path>` is the feature directory (`docs/scifi/specs/<slug>/`). When the design
|
|
20
|
+
introduces a new domain term, define it in `CONTEXT.md` and apply the edit live
|
|
21
|
+
once the user approves.
|
|
22
|
+
|
|
23
|
+
Run this session inside the feature's worktree (created by `sf-feature`);
|
|
24
|
+
`scifi status <slug> --json` reports its `worktree` path. On a resumed run,
|
|
25
|
+
enter that worktree before reading or writing anything.
|
|
26
|
+
|
|
27
|
+
For prior architectural decisions, grep
|
|
28
|
+
`docs/scifi/adr/` on demand — see "Architecture Decision Records" below.
|
|
29
|
+
|
|
30
|
+
## Architecture Decision Records
|
|
31
|
+
|
|
32
|
+
Decisions live in `docs/scifi/adr/` as numbered records `NNNN-slug.md`. The
|
|
33
|
+
directory is lazy — it does not exist until the first record.
|
|
34
|
+
|
|
35
|
+
- **Read on demand.** When the design touches an area that may already carry a
|
|
36
|
+
recorded decision, grep `docs/scifi/adr/` for relevant keywords — the same
|
|
37
|
+
instinct as walking the code before asking. Do not contradict a recorded
|
|
38
|
+
decision without surfacing it to the user.
|
|
39
|
+
- **Write sparingly.** Record an ADR only when ALL THREE hold:
|
|
40
|
+
1. Difficult reversal — meaningful cost to changing course later.
|
|
41
|
+
2. Non-obvious rationale — a future reader will question the choice.
|
|
42
|
+
3. Genuine trade-offs — real alternatives existed; one was chosen deliberately.
|
|
43
|
+
A routine, obvious, or easily-reversed choice gets no ADR.
|
|
44
|
+
- **Numbering.** Run `ls docs/scifi/adr/` and take `max + 1`, zero-padded (e.g.
|
|
45
|
+
`0007`). If the directory is absent, start at `0001` and create it. Copy
|
|
46
|
+
`ADR-TEMPLATE.md` (ships beside this skill) into the new file and fill it.
|
|
47
|
+
|
|
48
|
+
## Design for depth
|
|
49
|
+
|
|
50
|
+
Your goal is **deep modules**: a lot of behavior behind a narrow interface.
|
|
51
|
+
Push back on shallow ones, where the interface is as complex as what it hides.
|
|
52
|
+
Keep this lens through the whole session:
|
|
53
|
+
|
|
54
|
+
- **Module** — any unit with an interface and an implementation.
|
|
55
|
+
- **Interface** — everything a caller must know: types, invariants, errors,
|
|
56
|
+
ordering, config. Keep it small; hide the rest.
|
|
57
|
+
- **Depth** — behavior per unit of interface. High is good.
|
|
58
|
+
- **Seam** — where an interface lives; the point you can swap behavior.
|
|
59
|
+
- **Locality** — change, bugs, and knowledge concentrated in one place.
|
|
60
|
+
- **Deletion test** — would deleting this module *concentrate* complexity
|
|
61
|
+
(it earns its keep) or just *scatter* it (it is shallow glue)?
|
|
62
|
+
|
|
63
|
+
Prefer fewer, deeper modules over many shallow ones. Distrust a "utils" grab
|
|
64
|
+
bag, a pure function extracted only so a test can reach it, or a class that
|
|
65
|
+
just forwards calls. Confront the design against the codebase and relevant ADRs
|
|
66
|
+
(grep `docs/scifi/adr/`): does it fit the existing seams, or does it quietly cut
|
|
67
|
+
new ones?
|
|
68
|
+
|
|
69
|
+
## Flow
|
|
70
|
+
|
|
71
|
+
### 1. Open the planning session
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
scifi plan <slug> --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Read the result:
|
|
78
|
+
|
|
79
|
+
- `ready-to-plan` — fresh start, no design or tasks yet. Begin planning.
|
|
80
|
+
- `in-progress` — partial design/tasks already exist. Read them; continue from
|
|
81
|
+
where they stop, or rewrite if the approach changed. Ask the user.
|
|
82
|
+
- `already-planned` — the feature is past spec-ready. Confirm with the user
|
|
83
|
+
whether to refine the existing plan or start over before touching anything.
|
|
84
|
+
- If it errors `PRECONDITION_FAILED`, the spec is not ready — stop and tell the
|
|
85
|
+
user to finish `sf-feature` first.
|
|
86
|
+
|
|
87
|
+
### 2. Grill the design (this is the real work)
|
|
88
|
+
|
|
89
|
+
Interrogate until you can write a design with no hand-waving. One question at a
|
|
90
|
+
time, concrete either/or where possible.
|
|
91
|
+
|
|
92
|
+
- Walk the relevant code first — answer from the codebase before asking.
|
|
93
|
+
- Drive toward: the module breakdown, each module's interface, where the seams
|
|
94
|
+
are, what data flows across them, the failure modes, and what stays out.
|
|
95
|
+
- Apply the depth lens above to every proposed module. Name shallow modules and
|
|
96
|
+
propose deeper alternatives.
|
|
97
|
+
- Confront the design against the spec's acceptance criteria and any relevant
|
|
98
|
+
ADRs. Every criterion must be satisfiable by the design.
|
|
99
|
+
- When a new domain term appears, propose the `CONTEXT.md` edit and apply it
|
|
100
|
+
once the user agrees. When planning settles a hard, non-obvious architectural
|
|
101
|
+
decision, record an ADR (see above).
|
|
102
|
+
|
|
103
|
+
You are convinced when every section of the design template has a real answer
|
|
104
|
+
and every acceptance criterion maps to part of the design.
|
|
105
|
+
|
|
106
|
+
### 3. Write the design
|
|
107
|
+
|
|
108
|
+
- Copy `DESIGN-TEMPLATE.md` (ships beside this skill) into `<path>/design.md`
|
|
109
|
+
and fill every section from the grilling.
|
|
110
|
+
- No `TBD` / `TODO`. Unresolved items go under "Open questions", not scattered
|
|
111
|
+
as placeholders.
|
|
112
|
+
|
|
113
|
+
### 4. Decompose into tasks
|
|
114
|
+
|
|
115
|
+
Break the design into task files under `<path>/tasks/`, one file per task,
|
|
116
|
+
using `TASK-TEMPLATE.md` (ships beside this skill).
|
|
117
|
+
|
|
118
|
+
- **Test-first.** Each task delivers a vertical slice and names the tests that
|
|
119
|
+
prove it. Implementation without a failing test first is not a task.
|
|
120
|
+
- **Phase order** via `depends-on` (there is no phase field — ordering is the
|
|
121
|
+
dependency graph; independent tasks run in parallel):
|
|
122
|
+
1. contracts / scaffolding — interfaces, types, seams.
|
|
123
|
+
2. core behavior — the deep modules.
|
|
124
|
+
3. edge cases — error states, boundaries.
|
|
125
|
+
4. hardening — integration, observability, docs.
|
|
126
|
+
- Each task: a single clear goal, its `depends-on`, a **validation step**
|
|
127
|
+
(the command or observable outcome that proves it done), and a link to the
|
|
128
|
+
spec acceptance criterion it serves.
|
|
129
|
+
- Every in-scope acceptance criterion must be covered by at least one task.
|
|
130
|
+
- Frontmatter is exactly: `id`, `slug`, `status: pending`, `depends-on: []`.
|
|
131
|
+
Filename is `<task-slug>.md`.
|
|
132
|
+
|
|
133
|
+
### 5. Review loop (gate)
|
|
134
|
+
|
|
135
|
+
- Dispatch the review subagent using `DISPATCH-PLAN-REVIEW.md` (ships beside
|
|
136
|
+
this skill), filling in the feature path.
|
|
137
|
+
- Process its report with the `sf-receiving-review` skill, passing **review
|
|
138
|
+
type: plan**. That skill governs how you act on the findings.
|
|
139
|
+
- Re-dispatch until the verdict is **Pass** or **With fixes**; a **Fail**
|
|
140
|
+
re-loops. On **With fixes**, address the Minor items (or defer them with the
|
|
141
|
+
user's ok) before finalizing. Do not skip this.
|
|
142
|
+
|
|
143
|
+
### 6. Finalize
|
|
144
|
+
|
|
145
|
+
- Only after the review passes, run:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
scifi plan-ready <slug> --json
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- This validates that `<path>/design.md` and at least one task file exist,
|
|
152
|
+
and transitions the feature `spec-ready → plan-ready`.
|
|
153
|
+
- If it errors `PRECONDITION_FAILED`, an artifact is missing or misplaced —
|
|
154
|
+
write it under `<path>` and retry.
|
|
155
|
+
- This is the end of planning. Implementation happens later via `sf-implement`.
|
|
156
|
+
|
|
157
|
+
## Hard rules
|
|
158
|
+
|
|
159
|
+
- Never run `scifi plan-ready` before `sf-plan-review` passes.
|
|
160
|
+
- Never write `design.md` while any template section is unanswered.
|
|
161
|
+
- Never leave an in-scope acceptance criterion without a task.
|
|
162
|
+
- Never invent project facts — read the code and docs, or ask.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-plan",
|
|
5
|
+
description:
|
|
6
|
+
"Deep technical planning from approved spec.md. Writes design.md + tasks/. Greps docs/scifi/adr/ for context; records an ADR for hard, non-obvious decisions.",
|
|
7
|
+
argumentHint: "[feature-slug]",
|
|
8
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# sf-plan-review
|
|
2
|
+
|
|
3
|
+
You are a critic. You were dispatched to review ONE feature's implementation
|
|
4
|
+
plan before it is marked plan-ready. You do not write the plan and you do not
|
|
5
|
+
implement anything. You read, you judge, you report back to the agent that
|
|
6
|
+
dispatched you.
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
The dispatching agent gives you the feature directory (e.g.
|
|
11
|
+
`docs/scifi/specs/<slug>`). If `design.md` is missing, say so and stop.
|
|
12
|
+
|
|
13
|
+
## What to read
|
|
14
|
+
|
|
15
|
+
- `<path>/design.md` — the technical design under review.
|
|
16
|
+
- `<path>/spec.md` — the approved contract the design must satisfy.
|
|
17
|
+
- `<path>/tasks/*.md` — the task breakdown.
|
|
18
|
+
- `docs/scifi/CONTEXT.md` — the project's ubiquitous language (canonical
|
|
19
|
+
glossary of domain terms).
|
|
20
|
+
|
|
21
|
+
Read all of them before judging. Never invent project facts; if something is
|
|
22
|
+
unknowable from these files, flag it as a question instead of assuming.
|
|
23
|
+
|
|
24
|
+
## What to check
|
|
25
|
+
|
|
26
|
+
- **Spec coverage** — every in-scope acceptance criterion in `spec.md` is
|
|
27
|
+
satisfied by the design and covered by at least one task. A criterion with no
|
|
28
|
+
home is a defect.
|
|
29
|
+
- **Module depth** — are the modules deep (real behavior behind a narrow
|
|
30
|
+
interface) or shallow (interface as complex as the implementation, pass-through
|
|
31
|
+
classes, a "utils" dumping ground, functions extracted only to be tested)?
|
|
32
|
+
Apply the deletion test: would deleting a module concentrate complexity or just
|
|
33
|
+
scatter it? Flag shallow modules and leaky seams.
|
|
34
|
+
- **Seam declaration** — does the design cut new seams (a new boundary,
|
|
35
|
+
dependency, or communication pattern) without declaring them under
|
|
36
|
+
"Architecture & context impact"? An undeclared new seam is a defect. Judge
|
|
37
|
+
against the design's own declarations, not an external architecture doc.
|
|
38
|
+
- **Task quality** — each task is a vertical slice with tests named first, has a
|
|
39
|
+
concrete validation step, and links to what it satisfies. `depends-on` forms a
|
|
40
|
+
sane order (contracts → core → edges → hardening) with no cycle and no task
|
|
41
|
+
depending on something never defined.
|
|
42
|
+
- **Naming / glossary** — domain terms used but not in `CONTEXT.md` (ubiquitous
|
|
43
|
+
language) and not proposed for it. A naming-consistency check, not structural.
|
|
44
|
+
- **Edge cases** — failure modes the spec or design names but no task handles.
|
|
45
|
+
- **Placeholders** — any `TBD` / `TODO` / empty section. Open questions are
|
|
46
|
+
allowed only under the "Open questions" heading, never as a stand-in for a
|
|
47
|
+
decision that should have been made.
|
|
48
|
+
|
|
49
|
+
## How to report
|
|
50
|
+
|
|
51
|
+
Open with a header that names what this is, so the receiving agent applies the
|
|
52
|
+
right lens: **`Plan review of <path>`**. Then use this exact shape:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
# Plan review of <path>
|
|
56
|
+
|
|
57
|
+
### Strengths
|
|
58
|
+
- <what the plan gets right — be specific; accurate praise earns trust>
|
|
59
|
+
|
|
60
|
+
### Issues
|
|
61
|
+
|
|
62
|
+
#### Critical (must fix)
|
|
63
|
+
- Where: <design section / task file / quoted line>
|
|
64
|
+
Problem: <what is wrong>
|
|
65
|
+
Fix: <concrete change, or the exact question to ask the user>
|
|
66
|
+
|
|
67
|
+
#### Important (should fix)
|
|
68
|
+
- ...
|
|
69
|
+
|
|
70
|
+
#### Minor (nice to have)
|
|
71
|
+
- ...
|
|
72
|
+
|
|
73
|
+
### Verdict: Pass | Fail | With fixes
|
|
74
|
+
<one-line technical reason>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Calibration:
|
|
78
|
+
|
|
79
|
+
- **Pass** — every acceptance criterion covered, modules are deep, new seams
|
|
80
|
+
declared, tasks ordered and validated, no placeholders. No
|
|
81
|
+
Critical or Important issues.
|
|
82
|
+
- **With fixes** — only Minor issues remain; the plan is sound enough to proceed
|
|
83
|
+
once they are addressed.
|
|
84
|
+
- **Fail** — any Critical or Important issue. An uncovered acceptance criterion,
|
|
85
|
+
a shallow core module, an undeclared new seam, a dependency cycle, or a
|
|
86
|
+
placeholder is always at least Important.
|
|
87
|
+
|
|
88
|
+
Be specific — quote the line, name the task file. The receiving agent acts on
|
|
89
|
+
your list directly, so vague feedback wastes a round trip. Do not mark nitpicks
|
|
90
|
+
as Critical. Do not edit any file yourself.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# sf-receiving-review
|
|
2
|
+
|
|
3
|
+
You just got a review back — from an `sf-*-review` subagent or from a human.
|
|
4
|
+
This skill is how you act on it. Review is technical evaluation, not a social
|
|
5
|
+
ritual. Verify before you implement; push back when the reviewer is wrong.
|
|
6
|
+
|
|
7
|
+
The dispatcher tells you the **review type** (spec, plan, or code). It sets the
|
|
8
|
+
lens:
|
|
9
|
+
|
|
10
|
+
- **spec review** — you are fixing `spec.md`: ambiguity, acceptance criteria,
|
|
11
|
+
scope, architecture/context conflicts. You edit the spec, not source.
|
|
12
|
+
- **plan review** — you are fixing `design.md` and the task files: module depth,
|
|
13
|
+
seams, spec coverage, task ordering/validation. You edit the plan, not source.
|
|
14
|
+
- **code review** — you are fixing the implementation: bugs, tests, structure.
|
|
15
|
+
|
|
16
|
+
## The pattern
|
|
17
|
+
|
|
18
|
+
1. **Read** the whole review before reacting. Do not start fixing mid-list.
|
|
19
|
+
2. **Restate** each finding in your own words. If any item is unclear, STOP and
|
|
20
|
+
ask the dispatcher/user — do not implement a partial understanding. Items
|
|
21
|
+
are often related; a wrong guess on one corrupts the others.
|
|
22
|
+
3. **Verify** each finding against reality (the spec, the code, the
|
|
23
|
+
architecture/context docs). A reviewer can be wrong or lack context.
|
|
24
|
+
4. **Evaluate** for THIS project — not a generic ideal. A "best practice" that
|
|
25
|
+
fights the existing architecture or adds an unused feature (YAGNI) is not an
|
|
26
|
+
improvement.
|
|
27
|
+
5. **Respond** with a technical acknowledgment or reasoned pushback. No
|
|
28
|
+
performative agreement.
|
|
29
|
+
6. **Implement** one finding at a time, in severity order. Re-verify after each.
|
|
30
|
+
|
|
31
|
+
## Order of work
|
|
32
|
+
|
|
33
|
+
- **Critical / blocking** first — wrong requirement, broken behavior, security.
|
|
34
|
+
- **Important** next — missing criteria, scope gaps, weak error handling.
|
|
35
|
+
- **Minor** last, or defer with the user's ok.
|
|
36
|
+
|
|
37
|
+
Clarify everything unclear BEFORE you start. Then fix top-down.
|
|
38
|
+
|
|
39
|
+
## When to push back
|
|
40
|
+
|
|
41
|
+
Push back — with reasoning, not defensiveness — when the finding:
|
|
42
|
+
|
|
43
|
+
- contradicts a real constraint in the architecture/context docs,
|
|
44
|
+
- breaks existing behavior,
|
|
45
|
+
- adds something nothing uses (YAGNI),
|
|
46
|
+
- is wrong for this stack, or
|
|
47
|
+
- misunderstands the full context.
|
|
48
|
+
|
|
49
|
+
How: state the technical reason, point at the spec/code/doc that proves it, ask
|
|
50
|
+
a specific question. If it is an architectural disagreement, surface it to the
|
|
51
|
+
user rather than deciding alone.
|
|
52
|
+
|
|
53
|
+
If you pushed back and were wrong: say so in one line and fix it. No apology
|
|
54
|
+
paragraph, no defending the pushback.
|
|
55
|
+
|
|
56
|
+
## Forbidden
|
|
57
|
+
|
|
58
|
+
- "You're absolutely right!" / "Great point!" / "Thanks for catching that!" —
|
|
59
|
+
any performative agreement or gratitude. Just state the fix.
|
|
60
|
+
- Implementing before verifying.
|
|
61
|
+
- Batching fixes without re-checking each.
|
|
62
|
+
- Marking real blockers as minor to avoid work, or nitpicks as critical.
|
|
63
|
+
|
|
64
|
+
## Closing the loop
|
|
65
|
+
|
|
66
|
+
After you have addressed (fixed or reasonably pushed back on) every Critical and
|
|
67
|
+
Important finding, hand control back to the flow that dispatched you — e.g.
|
|
68
|
+
`sf-feature` re-runs `sf-spec-review` to confirm the verdict before it proceeds.
|
|
69
|
+
|
|
70
|
+
The gate advances on **Pass** or **With fixes**; only **Fail** loops. A **With
|
|
71
|
+
fixes** verdict means no Critical or Important issues remain — clear it by
|
|
72
|
+
resolving the Minor items it lists, or by deferring them with the user's explicit
|
|
73
|
+
ok. Never advance while a Critical or Important finding is open.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-receiving-review",
|
|
5
|
+
description:
|
|
6
|
+
"How to act on a review (spec, plan, or code). Verify before implementing, fix by severity, push back with technical reasoning when the reviewer is wrong.",
|
|
7
|
+
};
|