superwiki 0.1.6 → 0.1.7

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sw",
3
3
  "description": "An LLM-maintained wiki and task tracker in docs/ for coding agents. Obsidian friendly, with a static viewer.",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "wiki",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sw",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "An LLM-maintained wiki and task tracker in docs/ for coding agents. Obsidian friendly, with a static viewer.",
5
5
  "license": "MIT",
6
6
  "skills": "./skills/",
package/README.md CHANGED
@@ -195,8 +195,10 @@ A project's `docs/` folder is plain markdown and keeps working as an Obsidian va
195
195
  | `sw-ingest` | file a source into the wiki |
196
196
  | `sw-plan` | plan a task with the planner subagent and get your approval |
197
197
  | `sw-implement` | run a task with the implementer subagent, have it reviewed if the task asks for that, and record the result |
198
+ | `sw-run` | work through several tasks in a row, unattended: plan, implement, review and record each, and stop when one needs you |
198
199
  | `sw-explain` | explain a task: what, why, dependencies, what it unblocks |
199
200
  | `sw-triage` | for a problem: seen before? lessons, likely causes |
201
+ | `sw-board` | refresh the task list in `index.md` from the task files |
200
202
  | `sw-lint` | structural checks by script, semantic review on request |
201
203
  | `sw-visualize` | open the viewer |
202
204
  | `sw-stats` | what the current session has cost: tokens, context, steps and tool calls, per agent |
@@ -218,6 +220,9 @@ Shown as typed in Claude Code. In Codex, write `$sw-plan` instead of `/sw-plan`.
218
220
 
219
221
  /sw-implement P-15 run P-15; refuses if a dependency is not done
220
222
  /sw-implement continue what is in progress, or pick a ready task
223
+ /sw-run the backend tasks, commit after each
224
+ one task after another without asking at each step;
225
+ stops when a task needs you, and reports what it decided
221
226
 
222
227
  /sw-explain M-06 what M-06 is, why it exists, what it waits on and unblocks
223
228
  /sw-triage photo uploads hang at 100% on mobile since yesterday
@@ -226,6 +231,7 @@ Shown as typed in Claude Code. In Codex, write `$sw-plan` instead of `/sw-plan`.
226
231
  file a source and summarise it into the wiki
227
232
 
228
233
  /sw-config plan with opus, implement with sonnet, review with opus
234
+ /sw-board refresh the task list in index.md after you edited tasks by hand
229
235
  /sw-lint check links, frontmatter and task dependencies
230
236
  /sw-visualize open the task board and the wiki in the browser
231
237
  /sw-stats what this session has cost so far, per agent
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Refresh the task list in docs/index.md from the task files
3
+ ---
4
+
5
+ Use the sw-board skill. User arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Work through several tasks one after another, unattended: plan, implement, review and record each
3
+ ---
4
+
5
+ Use the sw-run skill. User arguments: $ARGUMENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superwiki",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Agent skills that turn docs/ into an LLM-maintained wiki and task tracker. Obsidian-friendly. Works with Claude Code, Codex and Copilot CLI.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: sw-board
3
+ description: Use when the user wants the task list in docs/index.md refreshed, updated or rebuilt, says the index is out of date after editing tasks by hand, or invokes sw-board or sw:board.
4
+ ---
5
+
6
+ # sw-board
7
+
8
+ Rewrites the task list at the top of `docs/index.md` from the task files. One command; do not read the task files or write the list yourself.
9
+
10
+ Run from the project root:
11
+
12
+ ```bash
13
+ node docs/.sw/sw.mjs board
14
+ ```
15
+
16
+ It prints whether the list changed and the counts. Tell the user that, in one line. Only its own section of `index.md` is rewritten; what the user wrote around it stays.
17
+
18
+ The list is a view. A task's status lives in the frontmatter of `docs/tasks/<ID>.md`: to change what the list shows, change the task file and run the command again. Never edit the list by hand.
19
+
20
+ ## If it fails
21
+
22
+ | Output | Do |
23
+ | --- | --- |
24
+ | `unknown command board` | the project's `docs/.sw/sw.mjs` is older than this skill; offer to run sw-init, which updates it and writes the list |
25
+ | `this vault has no task module` | say so; sw-init with `--tasks` adds it |
26
+ | `docs/index.md is missing` | offer to run sw-init |
27
+
28
+ If the user asks what is ready, what blocks a task or how many are done, answer with `node docs/.sw/sw.mjs ready|check <ID>|status` instead of reading the list.
@@ -37,9 +37,11 @@ No tool lets a skill change the model of the running session, so the skills hand
37
37
 
38
38
  When the user asks to set a model:
39
39
 
40
- 1. Ask only for what is missing: role, tool, model. If they name a model without a tool, infer the tool from the model family and say which you chose. Use the model name exactly as that tool spells it; do not translate names between tools.
41
- 2. Run the `model` command. Show its output.
42
- 3. Say that a tool picks up new agent files when its next session starts.
40
+ 1. **See what is set**: `show`.
41
+ 2. **Settle role, tool and model.** Ask only for what is missing. If they name a model without a tool, infer the tool from the model family and say which you chose. Use the model name exactly as that tool spells it; do not translate names between tools.
42
+ 3. **Change only what differs.** If the role already runs that model, change nothing and say so. A tool's short name and the full name of its current version (`opus` and the newest Opus) are the same model: do not rewrite one into the other.
43
+ 4. **Run the `model` command** and show its output.
44
+ 5. **Say when it takes effect**: a tool picks up new agent files when its next session starts.
43
45
 
44
46
  After Superwiki itself is updated, run `sync` once: the roles' instructions are part of the agent files.
45
47
 
@@ -44,6 +44,7 @@ Skills. Use these without being asked. For work in this vault they come before a
44
44
  {{#tasks}}
45
45
  - Planning a task, or the user asks what to work on next: `sw-plan`.
46
46
  - 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.
47
+ - Several tasks in a row without the user at each step: `sw-run`.
47
48
  - A question about a task (what, why, what it blocks): `sw-explain`.
48
49
  {{/tasks}}
49
50
  - A bug, failure or unexpected behavior is reported: `sw-triage` first, before any debugging.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: sw-run
3
+ description: Use when the user wants several Superwiki tasks worked through one after another without being asked at each step (run the backlog, do all tasks of an area, keep going until done or blocked, act as orchestrator), or invokes sw-run or sw:run.
4
+ ---
5
+
6
+ # sw-run
7
+
8
+ Works through tasks in order, unattended: for each one, plan it if it needs a plan, implement it, have it reviewed if it requires that, record it, and go on to the next. You are the orchestrator. Every piece of work goes to a subagent with a clean context; your session holds only the queue, the reports and the decisions.
9
+
10
+ Each task is run exactly as sw-implement runs it. This skill adds what a run of many needs: answers agreed once at the start, decisions you make in the user's place and write down, and rules for when to stop.
11
+
12
+ Run commands from the project root.
13
+
14
+ ## Before the first task
15
+
16
+ 1. **Scope.** Which tasks: an area, a list of ids, or everything that becomes ready. Take it from the user's message. Default order is the order of `node docs/.sw/sw.mjs ready`.
17
+ 2. **Standing answers.** The user will not be asked again, so these are settled now. Ask only for the ones their message leaves open, in one question:
18
+
19
+ | Question | If the user does not say |
20
+ | --- | --- |
21
+ | May plans be approved without them? | yes; that is what unattended means |
22
+ | Which `needs:` checks (starting services, changing data) may run? | none |
23
+ | Commit after each task? Push? | no commit, no push |
24
+ | Go on with other tasks when one stops? | no; stop the run |
25
+
26
+ 3. **Check that the run can do what was agreed**, before any task is touched:
27
+ - `node docs/.sw/sw.mjs lint`: errors are fixed or reported first.
28
+ - Commits were agreed: run one harmless git command. If the project's settings or the tool refuse git, say so now. Do not start a run whose terms cannot be met, and do not look for another way to run the refused command.
29
+ - The working tree holds changes that belong to no task of this run: say what they are and ask once whether to leave them or commit them first.
30
+ 4. **A clean session per task.** You cannot open a new session; a fresh subagent per role is the clean context. If the user asked for sessions, say this is how it is done.
31
+
32
+ ## Each task
33
+
34
+ 1. **Next task**: `node docs/.sw/sw.mjs ready`. A task in progress comes first, then the first ready task in scope. None left: go to "The report".
35
+ 2. **Run it as sw-implement does**: gate, mark it started, checks that need the environment, implementer, judge the report, review if required, record, task list. Load sw-implement once and follow it for every task. What differs in a run:
36
+
37
+ | In sw-implement or sw-plan | In a run |
38
+ | --- | --- |
39
+ | a task that is not small: "recommend sw-plan and let the user choose" | plan it. Mark the task started first, then dispatch the planner as sw-plan step 4 says |
40
+ | the planner's `Questions` go to the user | answer each with the planner's assumed answer, unless the task file, a wiki page or a recorded lesson says otherwise (`node docs/.sw/sw.mjs search <words>`). Write every answer into the task's "Notes" as `decided without the user: ...` |
41
+ | the plan waits for approval | approve it, if that was agreed, with a log entry that says it was approved under the run's standing answer |
42
+ | a `differs` item is the user's call | send it back to the implementer once with the task's wording. Still differs: stop |
43
+ | offers after a task (wiki pages, lessons, follow-up tasks) | do not ask and do not act. List them in the report |
44
+
45
+ 3. **Close the task.** Commit, if agreed: only the files this task changed, message `<ID>: <title>`. Push only if agreed. A refused commit or push stops the run.
46
+ 4. **Check your own size**: `node docs/.sw/sw.mjs stats`, row `main`. If its `peak` is above 200k tokens, stop here, between tasks: every further step would pay for all of it. Tell the user to start a new session and run sw-run again; the queue is in the files, so nothing is lost.
47
+
48
+ ## When to stop
49
+
50
+ Stop the run, leave the task `in-progress` with what is open in its "Notes", and report. Do not skip the task and take the next one unless that was agreed and the next task does not depend on it.
51
+
52
+ - A requirement is `not met` or still `differs` after one more round with the implementer.
53
+ - The review still says `changes needed` after two rounds.
54
+ - The task cannot be verified without a `needs:` check that was not allowed.
55
+ - A commit or push that was agreed is refused.
56
+ - `lint` reports an error after the task was recorded.
57
+ - Your `peak` is above 200k (this one is between tasks, with nothing left open).
58
+
59
+ ## Keeping the run cheap
60
+
61
+ A run pays for the orchestrator's context once per step, for every task. What keeps it small:
62
+
63
+ - **A fresh subagent for every task and every role.** Never continue the agent that planned or implemented the previous task.
64
+ - **Prompts as the role files ask**: task id, date, project root, the checks it may run, the standing answers that concern it. No reading lists and no project summary; each role knows what to read.
65
+ - **Reports, not files.** Do not read code, plans or the other tasks' files. `ready`, `check` and `explain` answer what you need about the queue.
66
+ - **One load of each skill.** Do not load a skill again to re-read it.
67
+ - **Edit frontmatter with your edit tool**, not with `sed` or another text substitution: a pattern that does not match fails silently and the status is then wrong without an error.
68
+
69
+ ## The report
70
+
71
+ At the end, or when the run stops:
72
+
73
+ 1. A table: task, outcome, review verdict, commit.
74
+ 2. **Decisions made without the user**, one line each with the task id. This is the list the user must read.
75
+ 3. What stopped the run, if it stopped, and what would let it continue.
76
+ 4. Offers and open findings collected along the way.
77
+ 5. `node docs/.sw/sw.mjs stats`, as printed.
78
+ 6. What is ready next.
79
+
80
+ ## Common mistakes
81
+
82
+ - Asking the user mid-run something the standing answers cover, or not asking at the start something they do not.
83
+ - Deciding a `needs:` check may run because the run is unattended. Unattended means fewer questions, not more permission.
84
+ - Piling several tasks into one uncommitted tree after a commit was refused.
85
+ - Running one long subagent that plans, implements and reviews a task. Measured on a real project, such an agent reached a context of almost a million tokens and sent over ten times what the three separate roles sent on another task of the same project.
86
+ - Carrying on past 200k because the next task looks small.