superwiki 0.1.0 → 0.1.2
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +63 -23
- package/package.json +1 -1
- package/skills/sw-config/SKILL.md +5 -5
- package/skills/sw-config/assets/implementer.md +39 -10
- package/skills/sw-config/assets/planner.md +52 -17
- package/skills/sw-config/scripts/config.mjs +161 -86
- package/skills/sw-implement/SKILL.md +24 -14
- package/skills/sw-init/assets/agents-block.md +22 -5
- package/skills/sw-init/assets/sw.mjs +360 -165
- package/skills/sw-init/assets/templates/guide.md +32 -0
- package/skills/sw-init/assets/templates/page.md +1 -0
- package/skills/sw-init/assets/templates/plan.md +11 -4
- package/skills/sw-init/assets/viewer.html +7 -2
- package/skills/sw-init/scripts/init.mjs +1 -1
- package/skills/sw-migrate/SKILL.md +2 -2
- package/skills/sw-plan/SKILL.md +19 -17
|
@@ -5,7 +5,7 @@ description: Use when the user wants to implement, build, execute, start or cont
|
|
|
5
5
|
|
|
6
6
|
# sw-implement
|
|
7
7
|
|
|
8
|
-
Runs one task. You keep the task's status true and judge the result; an implementer subagent, running the model set in sw-config, does the work from the task and plan files.
|
|
8
|
+
Runs one task. You keep the task's status true and judge the result; an implementer subagent, running the model set in sw-config, does the work from the task and plan files. You do not read the code or the plan: the report is your input.
|
|
9
9
|
|
|
10
10
|
Run commands from the project root. `<skill-dir>` is the directory this SKILL.md is in.
|
|
11
11
|
|
|
@@ -16,31 +16,41 @@ Run commands from the project root. `<skill-dir>` is the directory this SKILL.md
|
|
|
16
16
|
- `can start: no open deps: ...`: stop. Tell the user which tasks block it and offer to run the first blocker instead; do not run it unasked. Do not start the task anyway, and do not edit `deps` to get past this.
|
|
17
17
|
- `can start: n/a, status is in-progress`: this is a continuation; skip step 3.
|
|
18
18
|
- `can start: n/a, status is done` or `cancelled`: stop and ask what the user wants.
|
|
19
|
-
- `plan:
|
|
19
|
+
- `plan: ... (draft, not approved)`: stop; the plan needs the user's approval (sw-plan).
|
|
20
|
+
- `plan: none`: fine for a small task (one area, three "Done when" items or fewer, nothing open in its notes, a few files). For anything larger, recommend sw-plan first and let the user choose.
|
|
20
21
|
3. **Mark it started** before any work: in the frontmatter of `docs/tasks/<ID>.md` set `status: in-progress` and `started:` today. Append `## [date] task | <ID> started` to `docs/log.md`, in the layout its last entries use.
|
|
21
|
-
4. **
|
|
22
|
+
4. **Checks that need the environment.** If the task has a plan, look for `needs:` in it: `grep -n 'needs:' docs/plans/<ID>-plan.md`. Each hit is a check that starts services or changes data. Ask the user which of them the implementer may run; without a yes, none.
|
|
23
|
+
5. **Dispatch the implementer.** Its prompt is the task id, the project root if it is not your working directory, and which `needs:` checks it may run. Do not paste the plan into the prompt; it reads the files.
|
|
22
24
|
|
|
23
25
|
| Tool | How |
|
|
24
|
-
|
|
25
|
-
| Claude Code | agent `sw-implementer`. If it is not among your agent types, use a general-purpose agent,
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Claude Code | agent `sw-implementer`. If it is not among your agent types, use a general-purpose agent, tell it to read `<skill-dir>/../sw-config/assets/implementer.md` first and follow it, and pass the model from `models.implement.claude` in `docs/.sw/config.json` if set |
|
|
26
28
|
| Codex | spawn the custom agent `sw_implementer` |
|
|
27
29
|
| Copilot CLI | `task` tool with agent `sw-implementer` |
|
|
28
30
|
| No subagents available, or the agent is not defined | follow `implementer.md` yourself, in this session, and tell the user the configured model was not used |
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
6. **Judge the report.** Its `Requirements:` list must name every "Done when" item and every scope, state or constraint item of the task; compare it with the task file.
|
|
33
|
+
- `met` needs evidence: a command or test and its result. Re-run one verification command yourself when the evidence is vague.
|
|
34
|
+
- `not met`, or missing from the list: the task is not done.
|
|
35
|
+
- `differs`: the implementer built something other than what the task says. That is the user's call: show it and ask. Until they accept it, the item is not met.
|
|
36
|
+
7. **Record the outcome.**
|
|
32
37
|
|
|
33
38
|
| Outcome | Task file | Log entry |
|
|
34
|
-
|
|
35
|
-
| Every
|
|
36
|
-
|
|
|
37
|
-
|
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| Every requirement met or accepted, and `check <ID>` says `can finish: yes` | `status: done`, `finished:` today | `task \| <ID> done`, then one body line on what was verified |
|
|
41
|
+
| Requirements met but soft deps open | stays `in-progress` | `task \| <ID> waiting on <ids>` |
|
|
42
|
+
| Anything not met, unverified or awaiting the user's call | stays `in-progress`; add what is left to "Notes" | `task \| <ID> blocked: <reason>` |
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
8. **Keep the area guide, if the area has one.** `node docs/.sw/sw.mjs explain <ID>` prints `area guide:` with a path or `none`.
|
|
45
|
+
- A guide exists: add the report's `Guide:` lines to it, one line per fact under Layout, Patterns, Verify or Gotchas. Replace a line the new fact corrects, and keep the page under 60 lines.
|
|
46
|
+
- No guide: do nothing. A guide is worth starting once several tasks in an area have needed the same facts; if the user asks for one, create `docs/wiki/guide-<area, lowercase>.md` from `docs/.sw/templates/guide.md` and list it in `index.md`.
|
|
47
|
+
9. **File what else was learned.** If the implementer reported a decision or constraint the wiki should hold, offer to save it as a wiki page (`type: decision` or `concept`) and add it to `index.md`. If the task fixed a problem whose cause is now known, offer a `type: lesson` page (Symptom, Cause, Fix, How to notice it earlier); sw-triage finds these later. If it reported follow-up work, offer to create the tasks. These are separate offers: act on each only when the user says yes to that one.
|
|
48
|
+
10. **Report** to the user: outcome, each requirement with its evidence, anything that differs from the task, files changed, and which tasks this unblocked (`node docs/.sw/sw.mjs ready`). Commit only if the user asks.
|
|
41
49
|
|
|
42
50
|
## Common mistakes
|
|
43
51
|
|
|
44
|
-
- Marking `done` because the implementer said so. Done means every
|
|
52
|
+
- Marking `done` because the implementer said so. Done means every requirement has evidence.
|
|
53
|
+
- Accepting a `differs` item on the user's behalf. A sensible alternative is still not what the task asked for.
|
|
45
54
|
- Starting work before the task file says `in-progress`. If the session dies, nobody knows the task was touched.
|
|
46
55
|
- Letting the implementer edit the task file or the log. One writer for status: you.
|
|
56
|
+
- Reading the plan or the code "to follow along". The implementer already paid for that.
|
|
@@ -11,19 +11,36 @@
|
|
|
11
11
|
- `docs/tasks/<ID>.md`: one task per file. `docs/plans/<ID>-plan.md`: its plan, if any.
|
|
12
12
|
{{/tasks}}
|
|
13
13
|
- Anything else under `docs/` belongs to other tools. Leave it alone.
|
|
14
|
+
- File formats: `docs/.sw/templates/`.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Wiki:
|
|
16
17
|
|
|
17
18
|
- Link vault pages as `[[file-name]]`; file names are unique across the vault. Use normal markdown links for `raw/` files and URLs, and plain paths for code.
|
|
18
19
|
- When you add or rename a wiki page, update its line in `index.md`.
|
|
19
20
|
- Answer questions from the wiki, index first. Offer to save an answer worth keeping as a wiki page.
|
|
21
|
+
{{^tasks}}
|
|
22
|
+
- When you change the project, append one `change` entry to `log.md`: what changed and why, in a line.
|
|
23
|
+
- `node docs/.sw/sw.mjs search <words>` finds where something is mentioned; `lint` checks links and frontmatter. Neither needs you to read files. Run `lint` after you add, rename or relink pages.
|
|
24
|
+
{{/tasks}}
|
|
20
25
|
{{#tasks}}
|
|
21
|
-
|
|
26
|
+
|
|
27
|
+
Tasks:
|
|
28
|
+
|
|
29
|
+
- A task's status lives only in its frontmatter. Before you start: `status: in-progress` and `started:`. When its "Done when" list is met: `status: done` and `finished:`. Each change of status gets a `task` entry in `log.md`.
|
|
22
30
|
- Do not start a task while any of its `deps` is not done.
|
|
31
|
+
- If `explain <ID>` names an area guide (`docs/wiki/guide-<area>.md`), read it before you change code for the task: where things are, patterns, how to verify. Afterwards add the facts it was missing, one line each.
|
|
32
|
+
- Work that belongs to no task (a quick fix, a small request) needs no task file. Append one `change` entry to `log.md` instead: what changed and why, in a line.
|
|
23
33
|
- `node docs/.sw/sw.mjs status|ready|check <ID>|explain <ID>|search <words>|next-id <AREA>|lint` answers overview, startable tasks, blockers, a task's place in the chain, where something is mentioned, new ids and structural checks without reading files. Run `lint` after you add, rename or relink pages.
|
|
24
34
|
{{/tasks}}
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
|
|
36
|
+
Skills. Use these without being asked. For work in this vault they come before any other planning, implementing or debugging skill:
|
|
37
|
+
|
|
38
|
+
{{#tasks}}
|
|
39
|
+
- Planning a task, or the user asks what to work on next: `sw-plan`.
|
|
40
|
+
- Implementing a task: `sw-implement`. A change that needs no plan and touches one or two files may be done directly, under the task rules above.
|
|
41
|
+
- A question about a task (what, why, what it blocks): `sw-explain`.
|
|
27
42
|
{{/tasks}}
|
|
28
|
-
-
|
|
43
|
+
- A bug, failure or unexpected behavior is reported: `sw-triage` first, before any debugging.
|
|
44
|
+
- A source to file (article, notes, transcript, URL): `sw-ingest`.
|
|
45
|
+
- If a skill is not installed, follow the rules above by hand.
|
|
29
46
|
<!-- sw:end -->
|