@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,90 @@
|
|
|
1
|
+
# sf-continue
|
|
2
|
+
|
|
3
|
+
Work on a feature was put down — maybe mid-grill, maybe mid-build — and you are
|
|
4
|
+
picking it back up. Your job is orientation, not execution: read where the
|
|
5
|
+
feature actually is, name the next workflow step, and hand control to the skill
|
|
6
|
+
that owns it. You do the *least* work needed to point at the right next move.
|
|
7
|
+
|
|
8
|
+
You are a router. `sf-feature`, `sf-plan`, and `sf-implement` do the real work
|
|
9
|
+
and each resumes from its own partial state. You decide which one, and where it
|
|
10
|
+
should pick up.
|
|
11
|
+
|
|
12
|
+
## Flow
|
|
13
|
+
|
|
14
|
+
### 1. Identify the feature and enter its workspace
|
|
15
|
+
|
|
16
|
+
- `/sf-continue <slug>` — treat the argument as an exact feature slug.
|
|
17
|
+
- `/sf-continue <description>` or no argument — discover candidates from **both**
|
|
18
|
+
`scifi list --json` (features whose specs are on the current checkout) **and**
|
|
19
|
+
`git worktree list` (an in-flight feature lives on its own `feat/<slug>` branch
|
|
20
|
+
and will *not* appear in `scifi list` run from the default checkout). Match by
|
|
21
|
+
slug and title. If one obviously fits, name it; if several could, present them
|
|
22
|
+
and **confirm the pick with the user**. Never guess silently.
|
|
23
|
+
- **Enter the feature's worktree before reading its state.** An in-flight
|
|
24
|
+
feature's `docs/scifi/specs/<slug>/.scifi.json` exists only on its `feat/<slug>`
|
|
25
|
+
branch — not in the default checkout. Run `git worktree list`; if
|
|
26
|
+
`.worktrees/feat-<slug>` (branch `feat/<slug>`) exists, enter it and read state
|
|
27
|
+
from there. Running `scifi status <slug>` from the default checkout would
|
|
28
|
+
otherwise report `NOT_FOUND` for a feature that is merely on another branch.
|
|
29
|
+
- Conclude the feature does **not** exist only when *both* hold: no `feat/<slug>`
|
|
30
|
+
worktree exists **and** `scifi status <slug>` returns `NOT_FOUND` from a
|
|
31
|
+
checkout that would contain it (e.g. the default branch for a merged feature).
|
|
32
|
+
Then say so and point the user at `sf-feature`. A `NOT_FOUND` while a matching
|
|
33
|
+
worktree exists just means you are in the wrong checkout — enter the worktree
|
|
34
|
+
and re-read; never route the user to start a new feature in that case.
|
|
35
|
+
|
|
36
|
+
### 2. Read the state
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
scifi status <slug> --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Run this **from inside the feature's worktree** (entered in step 1). Read
|
|
43
|
+
`status`, the `artifacts` inventory (`artifacts.spec`, `artifacts.design`,
|
|
44
|
+
`artifacts.taskCount`), the per-task statuses in `tasks[]`, and `fixes[]` — each
|
|
45
|
+
fix carries its own `status`, so filter for the open ones. That single call
|
|
46
|
+
tells you everything you need to route. Do not start reading or editing the
|
|
47
|
+
spec/design yourself — the owning skill will. The `worktree`/`branch` fields
|
|
48
|
+
confirm the workspace you entered.
|
|
49
|
+
|
|
50
|
+
### 3. Route by lifecycle status
|
|
51
|
+
|
|
52
|
+
Map the state to the next step. The lifecycle is
|
|
53
|
+
`created → spec-ready → plan-ready → in-progress → done`.
|
|
54
|
+
|
|
55
|
+
| Status | What the inventory shows | Where it actually stands | Next move |
|
|
56
|
+
| --- | --- | --- | --- |
|
|
57
|
+
| `created` | `spec` missing | container made, spec never written | **`sf-feature`** — resume the grill and write `spec.md`. The container already exists, so skip its create step (`scifi spec` would `CONFLICT`); grill, write the spec, review, then `scifi spec-ready`. |
|
|
58
|
+
| `created` | `spec` present | spec drafted but never gated | **`sf-feature`** — finish it: run `sf-spec-review`, then `scifi spec-ready`. |
|
|
59
|
+
| `spec-ready` | no `design`, no tasks | spec gated, planning not begun | **`sf-plan`** — start planning. |
|
|
60
|
+
| `spec-ready` | some `design`/tasks | planning interrupted | **`sf-plan`** — it detects the partial state and resumes. |
|
|
61
|
+
| `plan-ready` | — | planned, build not begun | **`sf-implement`** — it runs `scifi start` and begins. |
|
|
62
|
+
| `in-progress` | tasks mixed (pending/in-progress/done) | build interrupted | **`sf-implement`** — it skips `done` tasks and resumes at the next runnable one. |
|
|
63
|
+
| `in-progress` | all tasks `done` | build finished, not closed out | **`sf-implement`**'s finish path — final `sf-handover` verification, then `scifi finish`. |
|
|
64
|
+
| `done` | open `fixes` | feature closed but a fix is open | **`sf-fix`** — resolve the open fix (it blocks `scifi finish`). |
|
|
65
|
+
| `done` | no open fixes | nothing to continue | Say so. For new scope use `sf-change`; for a defect use `sf-fix`. |
|
|
66
|
+
|
|
67
|
+
### 4. Hand off
|
|
68
|
+
|
|
69
|
+
Tell the user, in a sentence or two: where the feature stands, what the next
|
|
70
|
+
step is, and which skill owns it. Then invoke that skill.
|
|
71
|
+
|
|
72
|
+
**Pause where a human handoff is required.** Spec and planning sessions
|
|
73
|
+
(`sf-feature`, `sf-plan`) are interactive grills — the user drives them. Hand
|
|
74
|
+
control over and let them resume; do not autonomously grill on their behalf. The
|
|
75
|
+
build (`sf-implement`) resumes on its own. Where the next step is a human action
|
|
76
|
+
the tool cannot take (e.g. anything in `docs/scifi/HANDOVER.md`), name it and
|
|
77
|
+
stop rather than guessing.
|
|
78
|
+
|
|
79
|
+
## Hard rules
|
|
80
|
+
|
|
81
|
+
- Never route from anything but the live `scifi status` output — not memory, not
|
|
82
|
+
the directory listing alone.
|
|
83
|
+
- Never treat a `NOT_FOUND` as "feature missing" until you have checked
|
|
84
|
+
`git worktree list` for a `feat/<slug>` worktree and read status from inside
|
|
85
|
+
it. An in-flight feature is invisible to `scifi status` from the default
|
|
86
|
+
checkout — routing such a user to `sf-feature` would start a duplicate.
|
|
87
|
+
- Never re-create a container that already exists; a `created` feature resumes
|
|
88
|
+
inside `sf-feature` without `scifi spec`.
|
|
89
|
+
- Never silently pick a feature when the match is ambiguous — confirm first.
|
|
90
|
+
- Never do the next step's deep work here — orient and hand off.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-continue",
|
|
5
|
+
description:
|
|
6
|
+
"Resume an interrupted feature. Reads `scifi status <slug> --json`, determines the next workflow step from lifecycle status, and runs the matching skill, pausing where human handoff is required.",
|
|
7
|
+
argumentHint: "[feature-slug | description]",
|
|
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,16 @@
|
|
|
1
|
+
# Dispatch template: spec review
|
|
2
|
+
|
|
3
|
+
Dispatch a subagent with the prompt below. Replace `{SPEC_PATH}` with the path
|
|
4
|
+
returned by `scifi spec` (e.g. `docs/scifi/specs/<slug>/spec.md`). The
|
|
5
|
+
review criteria and output format live in the `sf-spec-review` skill — do not
|
|
6
|
+
restate them here.
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
You are reviewing a spec. Load and follow the `sf-spec-review` skill.
|
|
10
|
+
|
|
11
|
+
This is a SPEC review (not a code review).
|
|
12
|
+
Spec to review: {SPEC_PATH}
|
|
13
|
+
|
|
14
|
+
Read the spec plus docs/scifi/CONTEXT.md,
|
|
15
|
+
then return your report and verdict exactly as the sf-spec-review skill defines.
|
|
16
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Spec: <title>
|
|
2
|
+
|
|
3
|
+
- **Slug:** <slug>
|
|
4
|
+
- **Status:** draft
|
|
5
|
+
|
|
6
|
+
## Problem / Why
|
|
7
|
+
|
|
8
|
+
What problem does this solve, for whom, and why now? One or two paragraphs.
|
|
9
|
+
Ground it in a real need, not a solution looking for a problem.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
### In scope
|
|
14
|
+
|
|
15
|
+
- <what this feature will do>
|
|
16
|
+
|
|
17
|
+
### Out of scope (non-goals)
|
|
18
|
+
|
|
19
|
+
- <what this feature explicitly will NOT do>
|
|
20
|
+
|
|
21
|
+
## Acceptance criteria
|
|
22
|
+
|
|
23
|
+
Testable checklist. Each item must be verifiable as done or not done.
|
|
24
|
+
|
|
25
|
+
- [ ] <criterion>
|
|
26
|
+
- [ ] <criterion>
|
|
27
|
+
|
|
28
|
+
## Architecture & Context impact
|
|
29
|
+
|
|
30
|
+
- **Modules touched:** <files / areas this work changes>
|
|
31
|
+
- **New CONTEXT.md terms:** <terms added, or "none">
|
|
32
|
+
- **ADRs:** <decision records written or affected by this work, or "none">
|
|
33
|
+
|
|
34
|
+
## Edge cases & open questions
|
|
35
|
+
|
|
36
|
+
- **Edge cases:** <error states, boundaries, tricky inputs>
|
|
37
|
+
- **Open questions:** <anything unresolved — must be empty or owned before spec-ready>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# sf-feature
|
|
2
|
+
|
|
3
|
+
You run a grilling session for ONE feature. The session ends with a written
|
|
4
|
+
`spec.md` and the feature marked spec-ready. This is spec creation only — no
|
|
5
|
+
plan, no code.
|
|
6
|
+
|
|
7
|
+
The skill is inspired by hard, friendly grilling: you interrogate the idea
|
|
8
|
+
until it is unambiguous, confronting it against what the project already is.
|
|
9
|
+
|
|
10
|
+
## Long-term memory
|
|
11
|
+
|
|
12
|
+
Before grilling, read `docs/scifi/CONTEXT.md` (if present) — the project's
|
|
13
|
+
ubiquitous language: the canonical glossary of domain terms. Use it to keep
|
|
14
|
+
naming consistent. When the feature introduces a new domain term, define it in
|
|
15
|
+
`CONTEXT.md` and apply the edit live once the user approves.
|
|
16
|
+
|
|
17
|
+
For prior architectural decisions, see "Architecture Decision Records" below —
|
|
18
|
+
grep them on demand rather than reading one big doc up front.
|
|
19
|
+
|
|
20
|
+
## Architecture Decision Records
|
|
21
|
+
|
|
22
|
+
Decisions live in `docs/scifi/adr/` as numbered records `NNNN-slug.md`. The
|
|
23
|
+
directory is lazy — it does not exist until the first record.
|
|
24
|
+
|
|
25
|
+
- **Read on demand.** When the feature touches an area that may already carry a
|
|
26
|
+
recorded decision, grep `docs/scifi/adr/` for relevant keywords — the same
|
|
27
|
+
instinct as grepping the codebase while grilling. Do not contradict a recorded
|
|
28
|
+
decision without surfacing it to the user.
|
|
29
|
+
- **Write sparingly.** Record an ADR only when ALL THREE hold:
|
|
30
|
+
1. Difficult reversal — meaningful cost to changing course later.
|
|
31
|
+
2. Non-obvious rationale — a future reader will question the choice.
|
|
32
|
+
3. Genuine trade-offs — real alternatives existed; one was chosen deliberately.
|
|
33
|
+
A routine, obvious, or easily-reversed choice gets no ADR.
|
|
34
|
+
- **Numbering.** Run `ls docs/scifi/adr/` and take `max + 1`, zero-padded (e.g.
|
|
35
|
+
`0007`). If the directory is absent, start at `0001` and create it. Copy
|
|
36
|
+
`ADR-TEMPLATE.md` (ships beside this skill) into the new file and fill it.
|
|
37
|
+
|
|
38
|
+
## Flow
|
|
39
|
+
|
|
40
|
+
### 1. Name and create (or reopen) the container
|
|
41
|
+
|
|
42
|
+
**If you were sent here to resume or reopen an existing feature** — by
|
|
43
|
+
`sf-continue` on a `created` feature, or by `sf-change` rolling a feature back to
|
|
44
|
+
the spec stage — the container already exists. Do **not** run `scifi spec`; it
|
|
45
|
+
would `CONFLICT`. Confirm the feature with `scifi status <slug> --json`; its
|
|
46
|
+
worktree is reported as `worktree` (fallback: `.worktrees/feat-<slug>`). Enter
|
|
47
|
+
that worktree and go straight to grilling against the spec that is already
|
|
48
|
+
there. Skip the rest of this step.
|
|
49
|
+
|
|
50
|
+
**Otherwise, for genuinely new work,** create the container:
|
|
51
|
+
|
|
52
|
+
- Derive a short kebab-case slug from the request (e.g. `google-auth`).
|
|
53
|
+
- If the user pasted an issue reference instead of a description — an issue
|
|
54
|
+
number, a URL, a Jira ticket, anything — resolve it however is appropriate
|
|
55
|
+
for that tracker to recover the actual request, then derive the slug.
|
|
56
|
+
- **Create the feature's branch and worktree (this is automatic now).** From the
|
|
57
|
+
repository's default/integration branch, run (the commands below show it as
|
|
58
|
+
`main` — substitute your repo's actual default branch if it differs):
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
git worktree add -b feat/<slug> .worktrees/feat-<slug> main
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
This gives the feature an isolated workspace so several features can be in
|
|
65
|
+
flight at once without colliding. Work from inside `.worktrees/feat-<slug>`
|
|
66
|
+
for the rest of this skill and for planning and implementation. If the path
|
|
67
|
+
already exists, the feature was started before — treat this as the reopen case
|
|
68
|
+
above instead of creating a second worktree.
|
|
69
|
+
- Create the container:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
scifi spec <slug> --title "<human title>" --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
- `<slug>` is the kebab-case folder name. `--title` is optional prose.
|
|
76
|
+
- `--json` gives you a structured result. Read `path` from it — that is the
|
|
77
|
+
feature directory. Your spec goes at `<path>/spec.md`.
|
|
78
|
+
- On success the status is `created`.
|
|
79
|
+
- If it errors with `CONFLICT`, the slug already exists. If you meant to start
|
|
80
|
+
new work, pick a different slug; do not overwrite. If you actually meant to
|
|
81
|
+
revise that feature, this is the reopen case above — work against the
|
|
82
|
+
existing `<path>` instead of creating.
|
|
83
|
+
- Record the workspace on the feature so status and resume can find it:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
scifi worktree set <slug> --branch feat/<slug> --path .worktrees/feat-<slug>
|
|
87
|
+
```
|
|
88
|
+
- Tell the user the slug you picked and the path.
|
|
89
|
+
|
|
90
|
+
### 2. Grill (this is the real work)
|
|
91
|
+
|
|
92
|
+
Interrogate until you can fill EVERY section of the spec template with no
|
|
93
|
+
gaps. Do not write the spec before then.
|
|
94
|
+
|
|
95
|
+
- One question at a time. Prefer concrete either/or questions.
|
|
96
|
+
- Confront the idea against the codebase and any relevant ADRs (grep
|
|
97
|
+
`docs/scifi/adr/`). If it contradicts a recorded decision or existing
|
|
98
|
+
structure, surface it.
|
|
99
|
+
- Drive toward: the real problem, what is explicitly out of scope, testable
|
|
100
|
+
acceptance criteria, the edge cases that will bite, and which modules the
|
|
101
|
+
work touches.
|
|
102
|
+
- When you hit a new domain term, propose the `CONTEXT.md` edit and apply it
|
|
103
|
+
once the user agrees. When the grilling settles a hard, non-obvious
|
|
104
|
+
architectural decision, record an ADR (see above).
|
|
105
|
+
|
|
106
|
+
You are convinced when every template section below has a real answer, not a
|
|
107
|
+
placeholder.
|
|
108
|
+
|
|
109
|
+
### 3. Write the spec
|
|
110
|
+
|
|
111
|
+
- Copy `SPEC-TEMPLATE.md` (ships beside this skill) into `<path>/spec.md` —
|
|
112
|
+
where `<path>` is the directory returned by `scifi spec` — and fill every
|
|
113
|
+
section from the grilling.
|
|
114
|
+
- No `TBD` / `TODO` left behind. Unresolved items go under "Open questions",
|
|
115
|
+
not scattered as placeholders.
|
|
116
|
+
|
|
117
|
+
### 4. Review loop (gate)
|
|
118
|
+
|
|
119
|
+
- Dispatch the review subagent using `DISPATCH-SPEC-REVIEW.md` (ships beside
|
|
120
|
+
this skill), filling in the spec path.
|
|
121
|
+
- Process its report with the `sf-receiving-review` skill, passing **review
|
|
122
|
+
type: spec**. That skill governs how you act on the findings.
|
|
123
|
+
- Re-dispatch until the verdict is **Pass** or **With fixes**; a **Fail**
|
|
124
|
+
re-loops. On **With fixes**, address the Minor items (or defer them with the
|
|
125
|
+
user's ok) before finalizing. Do not skip this.
|
|
126
|
+
|
|
127
|
+
### 5. Finalize
|
|
128
|
+
|
|
129
|
+
- Only after the review passes, run:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
scifi spec-ready <slug> --json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
- This validates that `<path>/spec.md` exists and transitions the feature
|
|
136
|
+
`created → spec-ready`.
|
|
137
|
+
- If it errors with `PRECONDITION_FAILED` (spec.md missing), you put the spec
|
|
138
|
+
in the wrong place — write it to `<path>/spec.md` and retry.
|
|
139
|
+
- This is the end of spec creation. Planning happens later via `sf-plan`.
|
|
140
|
+
|
|
141
|
+
## Hard rules
|
|
142
|
+
|
|
143
|
+
- Never run `scifi spec-ready` before `sf-spec-review` passes.
|
|
144
|
+
- Never write `spec.md` while any template section is still unanswered.
|
|
145
|
+
- Never invent project facts — read the docs or ask.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-feature",
|
|
5
|
+
description:
|
|
6
|
+
"Start grilling session for new feature. Greps docs/scifi/adr/ for relevant decisions; records an ADR only for hard, non-obvious choices. Writes spec.md.",
|
|
7
|
+
argumentHint: "[title]",
|
|
8
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Dispatch template: tracked-fix code review
|
|
2
|
+
|
|
3
|
+
Dispatch a subagent to review the fix before it is resolved. Replace
|
|
4
|
+
`{COMMIT_RANGE}` with the commit(s) the fix produced (a SHA or `<base>..HEAD`),
|
|
5
|
+
`{CHANGE_BRIEF}` with the root cause and the solution the user agreed to (a
|
|
6
|
+
sentence or two), and `{FEATURE_PATH}` with the owning feature directory (e.g.
|
|
7
|
+
`docs/scifi/specs/<slug>`). There is no task file — this is a **fix-mode**
|
|
8
|
+
review, but the feature's spec/design are available as original intent. The
|
|
9
|
+
criteria and output format live in the `sf-code-review` skill — do not restate
|
|
10
|
+
them here.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
You are reviewing a tracked fix. Load and follow the `sf-code-review` skill.
|
|
14
|
+
|
|
15
|
+
This is a CODE review in FIX MODE (no task file; an owning feature exists).
|
|
16
|
+
Changes to review: {COMMIT_RANGE}
|
|
17
|
+
Agreed change (the contract): {CHANGE_BRIEF}
|
|
18
|
+
Owning feature: {FEATURE_PATH}
|
|
19
|
+
|
|
20
|
+
Judge the change against the brief: it implements the agreed solution and only
|
|
21
|
+
that, a regression test reproduces the defect and now guards it, and it does not
|
|
22
|
+
reintroduce a deviation from {FEATURE_PATH}/spec.md or {FEATURE_PATH}/design.md.
|
|
23
|
+
Use docs/scifi/CONTEXT.md for glossary context if it exists. Return your report
|
|
24
|
+
and verdict exactly as the sf-code-review skill defines.
|
|
25
|
+
```
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# sf-fix
|
|
2
|
+
|
|
3
|
+
You run down ONE defect in an EXISTING feature and drive it to a fix. Unlike
|
|
4
|
+
`sf-bug`, the work is anchored to a specific feature — you diagnose against that
|
|
5
|
+
feature's original intent (its `spec.md`, `design.md`, and ADRs) — and it leaves
|
|
6
|
+
a tracked artifact: a fix recorded under the feature, which blocks `scifi finish`
|
|
7
|
+
until you resolve it.
|
|
8
|
+
|
|
9
|
+
The session has two halves separated by a hard seam: first you investigate
|
|
10
|
+
*together* until the cause is understood and a fix is chosen, then you implement
|
|
11
|
+
that fix test-first under review. You do not start fixing until the user agrees
|
|
12
|
+
on which solution to build.
|
|
13
|
+
|
|
14
|
+
## The Iron Law
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
IDENTIFY FEATURE → INVESTIGATE → REPORT → AGREE → TRACK → FIX → RESOLVE.
|
|
18
|
+
NEVER FIX BEFORE THE USER AGREES.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Flow
|
|
22
|
+
|
|
23
|
+
### 1. Identify the feature
|
|
24
|
+
|
|
25
|
+
The fix must attach to one feature. Resolve it before anything else.
|
|
26
|
+
|
|
27
|
+
- `/sf-fix <slug>` — treat the argument as an exact feature slug.
|
|
28
|
+
- `/sf-fix <description>` — you were given prose, not a slug. Discover candidates
|
|
29
|
+
from **both** `scifi list --json` and `git worktree list` (an in-flight feature
|
|
30
|
+
lives on its own `feat/<slug>` branch and will not appear in `scifi list` from
|
|
31
|
+
the default checkout). Match candidate features by slug and title. Present your
|
|
32
|
+
best match (or the candidates, if ambiguous) and **confirm the pick with the
|
|
33
|
+
user**. Never guess silently.
|
|
34
|
+
- **Locate the feature, then confirm it exists.** Run `git worktree list`; if a
|
|
35
|
+
`feat/<slug>` worktree exists, read `scifi status <slug>` from inside it. Only
|
|
36
|
+
when *no* matching worktree exists **and** `scifi status <slug>` returns
|
|
37
|
+
`NOT_FOUND` from a checkout that would contain it is the feature truly absent —
|
|
38
|
+
then stop: a defect with no owning feature goes to `sf-bug` (untracked), real
|
|
39
|
+
new work to `sf-feature`. A `NOT_FOUND` while a `feat/<slug>` worktree exists
|
|
40
|
+
just means you are in the wrong checkout, not that the feature is gone.
|
|
41
|
+
|
|
42
|
+
Once identified, read the feature's `spec.md` and `design.md`, and grep
|
|
43
|
+
`docs/scifi/adr/` for decisions touching the area. Diagnosis is grounded in the
|
|
44
|
+
feature's original intent.
|
|
45
|
+
|
|
46
|
+
**Warn if the feature is not `done`.** A defect in an in-progress feature usually
|
|
47
|
+
belongs in `sf-implement`'s own review loop, not a separate tracked fix. Say so,
|
|
48
|
+
and proceed only if the user confirms `sf-fix` is what they want.
|
|
49
|
+
|
|
50
|
+
Create an isolated workspace for the fix before investigating (the base branch
|
|
51
|
+
shows as `main` — substitute your repo's default branch if it differs):
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
git worktree add -b fix/<slug> .worktrees/fix-<slug> main
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
where `<slug>` is the feature slug (or a short fix-specific slug if you are
|
|
58
|
+
fixing several defects in one feature). Work inside it; open the PR from it.
|
|
59
|
+
|
|
60
|
+
### 2. Capture the symptom
|
|
61
|
+
|
|
62
|
+
Pin the symptom in the user's words: the error text *verbatim*, the wrong
|
|
63
|
+
output, the failing case. Quote it; do not paraphrase. Note the conditions —
|
|
64
|
+
environment, data, version, steps.
|
|
65
|
+
|
|
66
|
+
### 3. Investigate
|
|
67
|
+
|
|
68
|
+
Reproduce, then find the root cause. One hypothesis at a time.
|
|
69
|
+
|
|
70
|
+
- **Reproduce** by the smallest path you can. If you cannot make it happen on
|
|
71
|
+
demand, say so and gather more — an unreproducible defect is not ready to fix.
|
|
72
|
+
- **Diagnose**: state a single hypothesis in one sentence, confirm or kill it by
|
|
73
|
+
*reading the code* and adding observation (a log, a probe), not by editing a
|
|
74
|
+
fix and watching the symptom move. When a hypothesis is wrong, record what you
|
|
75
|
+
learned and form the next.
|
|
76
|
+
- **Confront against the feature.** Check the behavior against `spec.md` and
|
|
77
|
+
`design.md`. A deviation from the original design is itself a strong lead — and
|
|
78
|
+
if the spec is what's wrong, that is a finding, not a code fix.
|
|
79
|
+
|
|
80
|
+
You have the root cause when you can trace the full chain from trigger to symptom
|
|
81
|
+
and point at the line that is wrong and say why. Investigate openly with the
|
|
82
|
+
user — share what you find as you find it.
|
|
83
|
+
|
|
84
|
+
### 4. Report and propose (the gate)
|
|
85
|
+
|
|
86
|
+
Stop and bring it back to the user. Present:
|
|
87
|
+
|
|
88
|
+
- **The issue** — the root cause in plain language: what is actually wrong and
|
|
89
|
+
why it produces the symptom. Not the symptom restated.
|
|
90
|
+
- **A few solutions** — typically two or three. For each: what it changes, the
|
|
91
|
+
trade-off, and the blast radius. Be honest about a quick patch vs. a deeper fix
|
|
92
|
+
that removes the cause for good. Recommend one and say why.
|
|
93
|
+
|
|
94
|
+
Debug it together. Fold in pushback and re-propose. Do not move on until the user
|
|
95
|
+
has chosen a solution. If this turns out to be a missing feature or a design
|
|
96
|
+
change, stop and route it to `sf-feature` — that is not a fix.
|
|
97
|
+
|
|
98
|
+
### 5. Track
|
|
99
|
+
|
|
100
|
+
Only *after* the user has chosen, record the tracked artifact:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
scifi fix create "<description>" --feature <slug> --json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Read the returned `id` (e.g. `FIX-0001`) — you need it to resolve the fix later.
|
|
107
|
+
Creating it here, after agreement, keeps the recorded description accurate to the
|
|
108
|
+
fix you are about to build.
|
|
109
|
+
|
|
110
|
+
### 6. Fix, test-first under review
|
|
111
|
+
|
|
112
|
+
Implement the chosen solution — and only that solution.
|
|
113
|
+
|
|
114
|
+
- **Hold `sf-tdd`.** The defect becomes its first failing test: write a test that
|
|
115
|
+
reproduces it through the public interface at the smallest scope that captures
|
|
116
|
+
it, watch it fail for the *right* reason (the root cause from step 3), then make
|
|
117
|
+
it pass with the minimal change at the cause. Keep the full suite green.
|
|
118
|
+
- **Review gate.** Dispatch a code-review subagent with `DISPATCH-CODE-REVIEW.md`
|
|
119
|
+
(ships beside this skill) — a fix-mode review: you pass the **change brief**
|
|
120
|
+
(the root cause and the agreed solution) and the owning feature path, not a
|
|
121
|
+
task file. Act on its report under `sf-receiving-review` with **review type:
|
|
122
|
+
code**. Re-review until the verdict is **Pass** or **With fixes**; a **Fail**
|
|
123
|
+
re-loops. On **With fixes**, address the Minor items (or defer them with the
|
|
124
|
+
user's ok) before accepting. Do not skip it and do not review your own fix.
|
|
125
|
+
|
|
126
|
+
### 7. Record and resolve
|
|
127
|
+
|
|
128
|
+
- Write a **lightweight record** into the fix file body (the file at the `path`
|
|
129
|
+
from step 5): the root cause in one or two sentences, the chosen solution, and
|
|
130
|
+
the regression test that now guards it. Keep it short — this is an audit trail,
|
|
131
|
+
not a spec.
|
|
132
|
+
- Close the artifact:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
scifi fix resolve <slug> <id>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
This transitions the fix `open → resolved` and unblocks `scifi finish`. Use
|
|
139
|
+
`scifi fix wont-fix <slug> <id>` only if the agreed outcome was deliberately
|
|
140
|
+
not to fix — record why in the body first.
|
|
141
|
+
|
|
142
|
+
## When you are stuck
|
|
143
|
+
|
|
144
|
+
| Problem | Move |
|
|
145
|
+
| --- | --- |
|
|
146
|
+
| Can't reproduce | Shrink the variables: pin env, data, version one at a time. |
|
|
147
|
+
| Many possible causes | Bisect — halve the suspect surface each step, don't scan it. |
|
|
148
|
+
| Symptom moves when you touch it | You patched downstream of the cause. Go upstream. |
|
|
149
|
+
| Fix contradicts the feature's spec/design | Surface it — the spec may be the thing that's wrong. |
|
|
150
|
+
| User picks a patch over the real fix | Build it — but record the leftover cause as known debt. |
|
|
151
|
+
|
|
152
|
+
## Done
|
|
153
|
+
|
|
154
|
+
The fix is done when:
|
|
155
|
+
|
|
156
|
+
- the target feature is identified and its context read,
|
|
157
|
+
- you can state the root cause in one sentence,
|
|
158
|
+
- the user agreed on the solution you built,
|
|
159
|
+
- a test reproduces the defect, which you watched fail then pass,
|
|
160
|
+
- the code review cleared (**Pass**, or **With fixes** with its Minor items
|
|
161
|
+
handled) and the full suite is green,
|
|
162
|
+
- the fix file carries the lightweight record and is transitioned to `resolved`
|
|
163
|
+
(or `wont-fix`).
|
|
164
|
+
|
|
165
|
+
## Hard rules
|
|
166
|
+
|
|
167
|
+
- Never start fixing before the user has chosen a solution.
|
|
168
|
+
- Never fix without first identifying and reading the target feature.
|
|
169
|
+
- Never present the symptom as the cause.
|
|
170
|
+
- Never ship a fix with no failing test behind it.
|
|
171
|
+
- Never leave the tracked fix `open`/`in-progress` once the work is settled —
|
|
172
|
+
resolve it or mark it wont-fix.
|
|
173
|
+
- Never mark a fix resolved before the code review clears (**Pass**, or **With
|
|
174
|
+
fixes** with its Minor items handled).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-fix",
|
|
5
|
+
description:
|
|
6
|
+
"Fix a defect in an existing feature: diagnose against its spec/design with the user, agree on a solution, then fix it test-first under review and record a tracked fix.",
|
|
7
|
+
argumentHint: "[feature-slug | description]",
|
|
8
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# sf-handover
|
|
2
|
+
|
|
3
|
+
You are the final subagent of one feature's implementation. Every task is built
|
|
4
|
+
and its per-task code review passed. Your job is to verify the *completed*
|
|
5
|
+
feature against its contract and apply a final quality pass, then report back.
|
|
6
|
+
You do not fix anything — you read, you judge, you report. The orchestrator
|
|
7
|
+
(`sf-implement`) routes your findings to a fix subagent and re-dispatches you
|
|
8
|
+
until your verdict is **Pass**.
|
|
9
|
+
|
|
10
|
+
Your context is clean: build everything you need from the inputs below, not from
|
|
11
|
+
any session history.
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
|
|
15
|
+
The orchestrator gives you:
|
|
16
|
+
|
|
17
|
+
- `{FEATURE_PATH}` — the feature directory (e.g. `docs/scifi/specs/<slug>`).
|
|
18
|
+
- `{COMMIT_RANGE}` — the full range of the feature's work (e.g. `<base>..HEAD`).
|
|
19
|
+
|
|
20
|
+
Read as your contract:
|
|
21
|
+
|
|
22
|
+
- `{FEATURE_PATH}/spec.md` — what the feature must satisfy.
|
|
23
|
+
- `{FEATURE_PATH}/design.md` — the technical design: modules, seams, strategy.
|
|
24
|
+
- `docs/scifi/CONTEXT.md` — the ubiquitous-language glossary.
|
|
25
|
+
- The diff for `{COMMIT_RANGE}` — the whole change, across all tasks.
|
|
26
|
+
|
|
27
|
+
Optionally, if it exists:
|
|
28
|
+
|
|
29
|
+
- `docs/scifi/HANDOVER.md` — user-defined finishing actions (smoke tests, PR
|
|
30
|
+
creation, pointers to process skills). You do **not** run these — the
|
|
31
|
+
orchestrator does. Read it only so you can list what remains (see Output).
|
|
32
|
+
|
|
33
|
+
If `{FEATURE_PATH}/spec.md` or `design.md` is missing, stop and say so — you
|
|
34
|
+
cannot verify without the contract.
|
|
35
|
+
|
|
36
|
+
## Checks (always run)
|
|
37
|
+
|
|
38
|
+
1. **Spec compliance.** Walk every requirement in `spec.md`. For each, point to
|
|
39
|
+
where the implementation satisfies it. Flag any requirement that is missing,
|
|
40
|
+
partial, or contradicted.
|
|
41
|
+
|
|
42
|
+
2. **Design compliance.** Confirm the change is built along the modules and
|
|
43
|
+
seams `design.md` describes. Flag drift: responsibilities placed in the wrong
|
|
44
|
+
unit, seams that leak, a structure that diverges from the agreed design
|
|
45
|
+
without justification.
|
|
46
|
+
|
|
47
|
+
3. **Final quality check.** Look across the whole change for what no single task
|
|
48
|
+
owns: cross-task coherence, integration seams, placeholders presented as
|
|
49
|
+
finished work, silent failures, and whether the project's required checks are
|
|
50
|
+
green. Run the suite and build if that is how this repo confirms green.
|
|
51
|
+
|
|
52
|
+
## HANDOVER.md awareness
|
|
53
|
+
|
|
54
|
+
If `docs/scifi/HANDOVER.md` exists, list the finishing actions it defines so the
|
|
55
|
+
orchestrator can run them after you pass. Do not execute them yourself — some
|
|
56
|
+
are irreversible or externally visible (PR creation, pushes) and stay at the
|
|
57
|
+
orchestrator's top level.
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
Report back exactly:
|
|
62
|
+
|
|
63
|
+
- **Verdict:** `Pass` or `Fail`.
|
|
64
|
+
- **Findings:** a list, each tied to the check it came from (spec / design /
|
|
65
|
+
quality). Empty on `Pass`.
|
|
66
|
+
- **Handover actions:** the actions from `HANDOVER.md` the orchestrator should
|
|
67
|
+
run, in order — or "none" if the file is absent or empty.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SkillManifest } from "scifi/skill-types";
|
|
2
|
+
|
|
3
|
+
export const manifest: SkillManifest = {
|
|
4
|
+
id: "sf-handover",
|
|
5
|
+
description:
|
|
6
|
+
"Final implementation subagent. Verifies the completed feature against spec + design and runs a quality check before handover. Aware of the optional HANDOVER.md finishing actions the orchestrator runs.",
|
|
7
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Dispatch template: per-task code review
|
|
2
|
+
|
|
3
|
+
Dispatch a subagent to review ONE completed task before it is marked done.
|
|
4
|
+
Replace `{FEATURE_PATH}` with the feature directory, `{TASK_SLUG}` with the task,
|
|
5
|
+
and `{COMMIT_RANGE}` with the commit(s) the implementer produced (e.g. a SHA or
|
|
6
|
+
`<base>..HEAD`). The review criteria and output format live in the
|
|
7
|
+
`sf-code-review` skill — do not restate them here.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
You are reviewing the implementation of one task. Load and follow the `sf-code-review` skill.
|
|
11
|
+
|
|
12
|
+
This is a CODE review (not a spec review, not a plan review).
|
|
13
|
+
Task under review: {TASK_SLUG} (feature: {FEATURE_PATH})
|
|
14
|
+
Changes to review: {COMMIT_RANGE}
|
|
15
|
+
|
|
16
|
+
Judge the change against {FEATURE_PATH}/design.md and the task's own
|
|
17
|
+
acceptance/validation, with docs/scifi/CONTEXT.md for glossary context. Return
|
|
18
|
+
your report and verdict exactly as the sf-code-review skill defines.
|
|
19
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Dispatch template: handover
|
|
2
|
+
|
|
3
|
+
Dispatch the final subagent once every task is `done`, before `scifi finish`.
|
|
4
|
+
Replace `{FEATURE_PATH}` with the feature directory and `{COMMIT_RANGE}` with the
|
|
5
|
+
full range of the feature's work (e.g. `<branch-base>..HEAD`). The checks and
|
|
6
|
+
output format live in the `sf-handover` skill — do not restate them here.
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
You are running handover for a complete feature implementation. Load and follow the `sf-handover` skill.
|
|
10
|
+
|
|
11
|
+
Feature: {FEATURE_PATH}
|
|
12
|
+
Changes to verify: {COMMIT_RANGE}
|
|
13
|
+
|
|
14
|
+
Verify the whole feature against {FEATURE_PATH}/spec.md and
|
|
15
|
+
{FEATURE_PATH}/design.md, plus docs/scifi/CONTEXT.md, and run the final quality
|
|
16
|
+
check the skill defines. If docs/scifi/HANDOVER.md exists, list its finishing
|
|
17
|
+
actions for the orchestrator to run — do not execute them. Return your verdict,
|
|
18
|
+
findings, and handover actions exactly as the sf-handover skill defines.
|
|
19
|
+
```
|