recursive-board 0.1.2 → 0.3.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recursive-board",
3
- "version": "0.1.2",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "wi: the CLI that owns every write into a Recursive Board vault",
6
6
  "author": "vic-cio",
@@ -16,12 +16,14 @@
16
16
  "wi": "./dist/wi/wi.js"
17
17
  },
18
18
  "files": [
19
- "dist/wi/"
19
+ "dist/wi/",
20
+ "skills/"
20
21
  ],
21
22
  "scripts": {
22
23
  "test": "npm run typecheck && node --test 'src/**/*.test.ts' 'scripts/**/*.test.ts'",
23
24
  "test:unit": "node --test 'src/**/*.test.ts' 'scripts/**/*.test.ts'",
24
25
  "fixture": "node scripts/fixture.ts",
26
+ "bench": "node scripts/bench.ts",
25
27
  "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.plugin.json",
26
28
  "wi": "node ./src/cli/wi.ts",
27
29
  "build": "node build/plugin.mjs && node build/wi.mjs",
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: recursive-board
3
+ description: Read and change work items in a Recursive Board vault through the `wi` CLI. Use when asked what is on a board, backlog or agenda; to add, tick, move, archive or remove a card; to break work into child items; or to take on and work a card. Also use whenever the working directory holds a `Boards/` folder or a `.wi.json` file.
4
+ ---
5
+
6
+ # recursive-board
7
+
8
+ A Recursive Board vault stores each work item as one Markdown file. `wi` owns work-item metadata
9
+ and applies the same rules as the Obsidian plugin. Edit card body text directly when the workflow
10
+ below calls for it.
11
+
12
+ ## Setup
13
+
14
+ After installing the `recursive-board` npm package, run `wi setup` once. It copies this skill to
15
+ both `~/.claude/skills/recursive-board/` and `~/.agents/skills/recursive-board/`, detects vaults
16
+ from Obsidian's registry, and saves the selected default vault. Use `wi setup --vault <path>` to
17
+ select a vault directly, or `wi setup --yes --vault <path>` for unattended setup. Setup keeps
18
+ symlinked development installs and refuses to replace an unmanaged skill folder unless passed
19
+ `--force`.
20
+
21
+ ## Before the first write
22
+
23
+ If the vault root has an `AGENTS.md`, read it. The vault owner's rules there (what you may
24
+ delete, how to name cards) take priority over this page.
25
+
26
+ ## Reaching the vault
27
+
28
+ `wi` finds the vault in this order: `--vault <path>`, `$WI_VAULT`, the nearest folder above the
29
+ working directory that holds `.wi.json` or `Boards/`, this Git repo's pointer, then
30
+ `defaultVault` in `~/.config/wi/config.json` (or `$XDG_CONFIG_HOME/wi/config.json`). To set a
31
+ repo pointer, run `wi here --vault <path> --board <ref>` once from that repo. It is stored in
32
+ user config outside the repo, keyed by Git's common directory, so linked worktrees share it.
33
+ Run `wi here` to print the current repo's pointer. With a pointer, `wi new` defaults to its board
34
+ and `wi children` can omit the reference. Explicit `--parent` and `wi children <ref>` still work.
35
+
36
+ `wi --help` is the full command reference. Read it for any flag this page does not name.
37
+
38
+ ## Reading
39
+
40
+ A `<ref>` is an id (`wi-3k9p`), a filename, or a title. Use the id once you have it: it is exact
41
+ and survives a rename.
42
+
43
+ ```bash
44
+ wi children <root> --tree # the whole tree under a root item
45
+ wi children <ref> # one board, grouped by status
46
+ wi children <ref> --status doing # one column
47
+ wi children # use the repo pointer's board
48
+ ```
49
+
50
+ Add `--json` when you parse the result. A card's own text (objective, criteria, notes) is in
51
+ its file in the work-item folder (`Boards/` by default). Read the file.
52
+
53
+ ## Writing
54
+
55
+ ```bash
56
+ wi new "<title>" --parent <ref> --objective <text> --context <text> --criteria <text> --criteria <text>
57
+ [--status backlog] [--priority <n>] # 1 is the highest
58
+ wi status <ref> <backlog|options|doing|done>
59
+ wi note <ref> "<result>" [--agent <name>] # one dated line under Notes
60
+ wi area <ref> # mark a card as an area
61
+ wi area <ref> --off # remove the area mark
62
+ wi claim <ref> --agent <name> # assign and move to doing in one write
63
+ wi release <ref> --reason <text> [--where <branch-or-path>]
64
+ wi move <ref> --to <new parent ref>
65
+ wi archive <ref> # --undo reverses it
66
+ wi promote <ref> # render this item's children as a board
67
+ wi demote <ref> # render this item's children as a checklist
68
+ wi rm <ref> --recursive --dry-run # read what it lists, then run it without --dry-run
69
+ ```
70
+
71
+ In Obsidian, use **Promote** at the top of any child card to give it its own board, even before it has children. The child-count line at the top of a note jumps to its checklist below the body.
72
+
73
+ - Write a new title as an imperative phrase that names its subject ("Price the demolition lines
74
+ for 35b", not "Price demolition"). It becomes the filename. `wi` turns unsafe characters into
75
+ hyphens and adds the id to a clashing filename, and says so.
76
+ - Give every new card its brief in the `wi new` command: one `--objective`, a `--context` per
77
+ source or fact, a `--criteria` per checkable result. `wi` warns when the brief is missing.
78
+ - Record progress with `wi note`. It locks the card, so a dispatcher and its worker can write
79
+ at the same moment. Leave the frontmatter to `wi`.
80
+ - The first child a card gets turns the card into a board, unless the vault sets
81
+ `autoPromote: false`.
82
+ - To untick a done item, set it back to its `prev_status`.
83
+ - `wi area <ref>` marks the item as an area and keeps its status. It removes `prev_status` and refuses a card with an agent. Convert it back with `wi area <ref> --off`; its status stays the same.
84
+ - A dispatcher claims cards from options for its workers. `wi claim` refuses a card claimed by a
85
+ different agent, a done card, a `blocked: true` card, or a board with a child in doing that
86
+ someone else works. `wi children` marks a blocked card `[blocked]`. One
87
+ agent can hold a card and its current subtask. A repeat by the same agent in doing writes nothing.
88
+ - `wi status <ref> done` says when that was the parent's last open child. Check the parent's own
89
+ criteria, then close it.
90
+ - Before starting a worker, a dispatcher runs `wi agents`. It counts agents, not cards, and lists
91
+ each agent's doing cards. The dispatcher holds off when `activeAgents` reaches `maxAgents`;
92
+ `null` means no limit is set. `WI_MAX_AGENTS` overrides the vault setting for one run. This
93
+ limit is advisory: `wi claim` does not enforce it.
94
+ - A dispatcher records each event on the card (start, finish, retry, stop) with
95
+ `wi note <card> "<event>" --agent <its name>`.
96
+ - When a worker stops, its dispatcher runs `wi release` with a reason and, when available, the
97
+ branch or worktree path. Release clears the agent, returns the card to options, and records the
98
+ continuation location in Notes.
99
+ - If the vault sets `areaTags`, `wi` keeps an `area/...` tag on each card. Leave it to `wi`. After
100
+ `wi move` or `wi area`, run `wi retag`.
101
+ - Run `wi validate` after a batch of writes. Exit 0 is clean. Exit 1 lists what broke.
102
+
103
+ ## Writing a card
104
+
105
+ A card has one deliverable. When a card names more than one, give each deliverable its own child
106
+ card with `wi new "<title>" --parent <card>` and its own brief. Do this when you write the card, or before you or a
107
+ worker start it. The children are the todo list: move each child to done when it is finished. The
108
+ parent is done when every child is done. A worker reads its card's open children as its scope, so
109
+ the board shows what is still open.
110
+
111
+ ## Working under a dispatcher
112
+
113
+ A worker is an agent that a dispatcher (a script or another agent) started on one card. The owner
114
+ follows the work on the board, so the board is the live record of what each worker does now. Use
115
+ your own agent name everywhere `<me>` appears.
116
+
117
+ 1. Claim the card: `wi claim <card> --agent <me>`. Read its body and its open children.
118
+ 2. Split it before you start when it holds more than one deliverable. Make each step a child with
119
+ a full brief: `wi new "<title>" --parent <card> --objective ... --criteria ...`. Set
120
+ `--priority` when the order matters.
121
+ 3. Work one child at a time, live:
122
+ 1. `wi claim <child> --agent <me>` before its work starts.
123
+ 2. Do the work.
124
+ 3. `wi note <child> "<result, and where it is>"`.
125
+ 4. `wi status <child> done`.
126
+ 4. Note a decision or a blocker on the card as it happens, with `wi note`.
127
+ 5. When the card's criteria are met, note the result and run `wi status <card> done`. When you
128
+ cannot go on, run `wi release <card> --reason <why> --where <location>`.
129
+ 6. Run `wi validate`.
130
+
131
+ The board is the log of the work, not a report written after it. Each claim comes before its
132
+ work, so a card sits in doing for as long as its work takes.
133
+
134
+ ## Working a card
135
+
136
+ For `/recursive-board <card> <instruction>`, use the instruction to clarify the request and the
137
+ card's Objective, Context and Acceptance Criteria as the brief. These steps are for a session with
138
+ its owner present. In a Git repo, steps 3 to 5 use a branch; elsewhere, record where the result
139
+ is.
140
+
141
+ 1. Resolve the vault and board from the repo map (`wi here`). If the repo has no entry, ask once
142
+ which board to use, then record it with `wi here --board <board> --vault <vault>`.
143
+ 2. Read the card body. If Objective or Acceptance Criteria is missing, write a proposed brief in
144
+ the card and ask for approval; wait before doing the work.
145
+ 3. Claim it with `wi claim <card> --agent <agent name>`. In a Git repo, work on a new
146
+ `card/<slug>` branch, run the repo's tests and commit the result. Track subtasks as in
147
+ "Working under a dispatcher", step 3.
148
+ 4. If the work is too large or cannot finish, stop with a split proposal or continuation note in
149
+ your report, then run `wi release <card> --reason <reason> --where <branch-or-path>`. Let the
150
+ dispatcher decide whether to create child cards.
151
+ 5. When finished, run `wi note <card> "<result, and its branch or location>"`. Leave the card in
152
+ `doing` and stop for review. Merge, push and publish wait for the owner's verdict.
153
+
154
+ ## Outcomes
155
+
156
+ `wi` prints the change it made, for example `wi-3k9p Write the release notes doing → done`.
157
+ Report that line to the user. A refusal (exit 2) names its reason. It is a rule doing its job:
158
+ read it and change the approach. Do not work around it with a file tool.