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/README.md +47 -8
- package/dist/wi/wi.js +1289 -126
- package/package.json +4 -2
- package/skills/recursive-board/SKILL.md +158 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Recursive Board
|
|
2
2
|
|
|
3
|
+
> **Install with your agent.** Paste this prompt into your coding agent: "Check that Node.js 20.12 or later is installed, run `npm install --global recursive-board`, then run `wi setup`."
|
|
4
|
+
|
|
3
5
|
Recursive Board turns a folder of Markdown files in an Obsidian vault into a hierarchical work board. Each work item is one Markdown file. Its parent link defines where it belongs.
|
|
4
6
|
|
|
5
7
|
**Markdown is canonical. The plugin is a view, never the database.** The plugin renders and edits work items in Obsidian. The `wi` command-line tool supports scripts and agents. Both use the same schema and rules.
|
|
@@ -21,29 +23,49 @@ Each work item is a Markdown file in the configured work-item folder. The defaul
|
|
|
21
23
|
| `updated` | Last-updated date in `YYYY-MM-DD` form. |
|
|
22
24
|
| `board` | Set to `true` to render this item's children as a board. Otherwise omit it. |
|
|
23
25
|
| `prev_status` | Previous status recorded when an item moves to `done`; cleared when it leaves `done`. |
|
|
26
|
+
| `area` | Set to `true` for an ongoing area. Areas keep a status and have no `prev_status`. |
|
|
24
27
|
|
|
25
28
|
Optional fields include `owner`, `agent`, `priority`, `due`, `blocked`, `depends_on`, `tags`, and `archived`. Unknown frontmatter keys are preserved. `wi validate` reports them as warnings.
|
|
26
29
|
|
|
27
30
|
An item with `board: true` renders its children in status columns. Any other item renders its children as a checklist. The plugin reads the item's frontmatter and generates the view; the Markdown files remain the source of truth.
|
|
28
31
|
|
|
32
|
+
Every child card has a **Promote** control at the top, even before it has children. Promote it to give its own children a board. A one-line child count at the top jumps to the checklist below the note.
|
|
33
|
+
|
|
29
34
|
## Vault configuration
|
|
30
35
|
|
|
31
|
-
Place an optional `.wi.json` file at the vault root to choose the work-item folder, default parent,
|
|
36
|
+
Place an optional `.wi.json` file at the vault root to choose the work-item folder, default parent, extra sections for new items, the dispatcher's advisory agent limit, and whether `wi new` promotes a parent:
|
|
32
37
|
|
|
33
38
|
```json
|
|
34
39
|
{
|
|
35
40
|
"workItemFolder": "Boards",
|
|
36
41
|
"defaultRoot": "Project",
|
|
37
|
-
"extraSections": ["References", "Risks"]
|
|
42
|
+
"extraSections": ["References", "Risks"],
|
|
43
|
+
"maxAgents": 3,
|
|
44
|
+
"autoPromote": true,
|
|
45
|
+
"areaTags": false
|
|
38
46
|
}
|
|
39
47
|
```
|
|
40
48
|
|
|
41
49
|
`workItemFolder` is a vault-relative folder path. It defaults to `Boards`. `defaultRoot` is the filename stem of a root work item. It defaults to `null`, which means `wi new` needs an explicit `--parent`. `extraSections` is an array of non-empty, single-line headings. It defaults to `[]`. Each heading is added after the built-in template sections with an empty `- ` starter. The setting applies to `wi new`, `wi template write`, and items created in the plugin. Invalid values make `.wi.json` fail to load.
|
|
42
50
|
|
|
43
|
-
`
|
|
51
|
+
`maxAgents` is a non-negative whole number, or `null` for no limit. The plugin settings tab writes it to `.wi.json`. `WI_MAX_AGENTS` overrides it for one CLI run. `wi agents` prints the effective limit, the number of distinct agents with a card in doing, and each claimed doing card. An agent that holds a card and its current subtask counts once. The limit is advisory: dispatchers use the count to decide whether to start a worker, and `wi claim` still succeeds over the limit.
|
|
52
|
+
|
|
53
|
+
`autoPromote` is `true` or `false`. It defaults to `true`. When `wi new` gives a card its first child, it also sets `board: true` on that card, so the children show as a board. It never changes a root, an area, a card that already has children, or a card that has a `board` key. Items added in Obsidian are not promoted: a person who adds to a checklist chose a checklist.
|
|
54
|
+
|
|
55
|
+
`areaTags` is `true` or `false`. It defaults to `false`. When it is `true`, each work item under an area carries one tag that names its areas from the top down, such as `area/work/web-site`. `wi new` and the board's add row write it, `wi validate` warns when one is stale, and `wi retag` fixes them. `wi graph` turns the tags into graph colours. The board hides `area/` chips.
|
|
56
|
+
|
|
57
|
+
`wi setup` writes the selected vault to the user config at `$XDG_CONFIG_HOME/wi/config.json`, or `~/.config/wi/config.json` when `XDG_CONFIG_HOME` is unset. The format is `{"defaultVault":"/absolute/path/to/vault"}`. Vault detection uses Obsidian's registry on macOS, Linux, and Windows. `--vault <path>` selects a vault directly, and `--yes --vault <path>` runs without prompts.
|
|
58
|
+
|
|
59
|
+
`wi` finds the vault from `--vault <path>`, then `$WI_VAULT`, then the nearest folder with `.wi.json` or `Boards/`, then the current Git repo's pointer, then `defaultVault` in `~/.config/wi/config.json` (or `$XDG_CONFIG_HOME/wi/config.json`). Use `wi here --vault <path> --board <ref>` once in a repo to save its vault and board outside the repo. The pointer is keyed by Git's common directory, so linked worktrees share it. Run `wi here` to print the current repo's pointer.
|
|
44
60
|
|
|
45
61
|
## Start a board
|
|
46
62
|
|
|
63
|
+
### Create one in Obsidian
|
|
64
|
+
|
|
65
|
+
Enable Recursive Board in an empty vault. Use the **Create your first board** button in the notice, or run **Create your first board** from the command palette. Enter a name (the default is `Main`). The plugin creates the board, adds a starter card that explains how to move it, and opens the board.
|
|
66
|
+
|
|
67
|
+
### Manual fallback
|
|
68
|
+
|
|
47
69
|
1. Create the file `Boards/Project.md` with this content. A root item has no `parent` and no `status`:
|
|
48
70
|
|
|
49
71
|
```markdown
|
|
@@ -81,13 +103,14 @@ Reload Obsidian after replacing plugin files. If your vault syncs its `.obsidian
|
|
|
81
103
|
```sh
|
|
82
104
|
npm install --global recursive-board
|
|
83
105
|
wi --help
|
|
106
|
+
wi setup
|
|
84
107
|
```
|
|
85
108
|
|
|
86
|
-
Run `wi` inside a vault, pass `--vault <path>`, or set `
|
|
109
|
+
Run `wi` inside a vault, pass `--vault <path>`, set `WI_VAULT`, or set a repo pointer with `wi here`. Commands accept a work-item id, filename, or title as a reference. An id takes precedence when references are ambiguous. Add `--json` for machine-readable output. The `--vault <path>` and `--json` flags apply to all commands. With a repo pointer, `wi new` uses its board when `--parent` is omitted, and `wi children` uses it when the reference is omitted.
|
|
87
110
|
|
|
88
111
|
## Use with coding agents
|
|
89
112
|
|
|
90
|
-
`skills/recursive-board/SKILL.md` teaches an agent to read and change a vault through `wi`.
|
|
113
|
+
`skills/recursive-board/SKILL.md` teaches an agent to read and change a vault through `wi`. `wi setup` installs copies into `~/.claude/skills/recursive-board/` and `~/.agents/skills/recursive-board/`. It leaves symlinked development installs alone and refuses to replace an unmanaged folder unless you pass `--force`. From a source checkout, `npm run install:skill` links the skill and `wi` into `~/.local/bin`.
|
|
91
114
|
|
|
92
115
|
## Install the Git validation hook
|
|
93
116
|
|
|
@@ -105,24 +128,40 @@ The pre-commit hook runs `wi validate` and stops a commit when the vault has err
|
|
|
105
128
|
|
|
106
129
|
| Command | What it does |
|
|
107
130
|
| --- | --- |
|
|
108
|
-
| `wi
|
|
109
|
-
| `wi
|
|
131
|
+
| `wi setup [--yes] [--vault <path>] [--force]` | Installs the agent skill, selects and saves a default vault, and offers the Git validation hook for a Git vault. `--yes` requires `--vault` and asks no questions. |
|
|
132
|
+
| `wi new <title> [--parent <ref>] [--status <status>] [--template <name>] [--owner <name>] [--agent <name>] [--priority <number>] [--objective <text>] [--context <text>]... [--criteria <text>]... [--strict]` | Creates a work item under the given parent. If `--parent` is omitted, uses the repo pointer's board, then `defaultRoot` from `.wi.json`. The brief flags fill the body: repeat `--context` for each paragraph and `--criteria` for each criterion. It warns when the card has no Objective or Acceptance Criteria, and `--strict` refuses the card instead. Unsafe filename characters in the title become hyphens; a filename clash adds the id suffix and never overwrites. See `autoPromote`. |
|
|
133
|
+
| `wi status <ref> <status>` | Changes an item's status. Use `backlog`, `options`, `doing`, or `done`. Leaving `done` clears the recorded previous status. When the item was its parent's last open child, it says so; it does not close the parent. |
|
|
134
|
+
| `wi note <ref> <text> [--agent <name>]` | Appends `- <date> <time>, <agent>: <text>` under the card's Notes. The agent defaults to the card's agent. The write re-reads the card under a lock, so two notes at the same moment both survive. |
|
|
135
|
+
| `wi area <ref> [--off]` | Marks a card as an area or removes the area mark. The current status stays in place. Conversion refuses a card with an agent. |
|
|
136
|
+
| `wi claim <ref> --agent <name>` | Claims a card for an agent and moves it to doing in one write. Refuses a different agent, a done card, or a board with a child in doing that another agent or a person works. It also refuses a card with `blocked: true`, which `wi children` marks `[blocked]`. An agent can hold a card and its current subtask at once. Repeating an active claim by the same agent writes nothing. |
|
|
137
|
+
| `wi agents` | Prints the configured agent limit, the number of distinct agents with a card in doing, and each claimed doing card. `--json` returns `maxAgents`, `activeAgents` and `claims`. |
|
|
138
|
+
| `wi release <ref> --reason <text> [--where <branch-or-path>]` | Clears the agent, moves the card to options, and adds a dated line to Notes with the reason and optional work location. Refuses an unclaimed card. |
|
|
110
139
|
| `wi move <ref> --to <ref>` | Changes the item's parent. Its status stays the same, and its children move with it. |
|
|
111
140
|
| `wi archive <ref> [--undo]` | Archives an item. `--undo` unarchives it. Archived items are hidden from normal reads; descendants are hidden with an archived parent. |
|
|
141
|
+
| `wi retag [--dry-run]` | Needs `areaTags`. Gives every work item the area tag its place in the tree calls for, and removes stale ones. Run it after `wi move` or `wi area`; both say when tags are stale. |
|
|
142
|
+
| `wi graph` | Needs `areaTags`. Writes two colour groups per area into `.obsidian/graph.json`: a shade for boards and areas, and a lighter one for cards. A sub-area is a lighter shade of its top area. Your own groups stay, after the area groups. Close the graph view first, because Obsidian may write over the file. |
|
|
143
|
+
| `wi promote <ref>` / `wi demote <ref>` | Makes an item a board or a card again. Promotion sets `board: true`; demotion removes the `board` key. |
|
|
112
144
|
| `wi rm <ref> [--recursive] [--dry-run]` | Moves an item to the vault's `.trash` folder. Use `--dry-run` to preview. Items with children require `--recursive`. |
|
|
113
|
-
| `wi children <ref> [--status <status>] [--tree] [--archived]` | Lists an item's children. `--status` filters by status, `--tree` shows descendants, and `--archived` includes archived items. |
|
|
145
|
+
| `wi children [<ref>] [--status <status>] [--tree] [--archived]` | Lists an item's children. If the ref is omitted, uses the repo pointer's board. `--status` filters by status, `--tree` shows descendants, and `--archived` includes archived items. |
|
|
114
146
|
| `wi validate` | Checks work-item structure and reports errors and warnings. Exits with code 1 when it finds errors. |
|
|
115
147
|
| `wi hook install\|uninstall\|status [--vault <path>]` | Installs, removes, or inspects the Git pre-commit validation hook. `install --force` replaces an unrelated hook. |
|
|
148
|
+
| `wi here [--board <ref>] [--vault <path>]` | Prints this Git repo's pointer, or sets it in user config. Linked worktrees share the pointer. |
|
|
149
|
+
|
|
116
150
|
| `wi template [list\|write]` | Lists available templates, or writes the code's templates into `Templates/` with `wi template write`. Defaults to `list`. |
|
|
117
151
|
| `wi --help` or `wi help` | Prints usage, options, and notes. |
|
|
118
152
|
| `wi --version` | Prints the installed CLI version. |
|
|
119
153
|
|
|
154
|
+
`wi new --template area` creates an area in `backlog` by default. Pass `--status` to choose its
|
|
155
|
+
starting status. Areas appear in their status column. Areas in options or doing also appear in the area bar; a backlog or done area stays in its column only.
|
|
156
|
+
|
|
120
157
|
`wi move`, `wi rm`, and `wi archive` refuse to run when a hidden non-Markdown file is in the work-item folder. The index cannot read that file, so it may be missing a work item. Let the sync client finish downloading it or remove the stray file, then retry. There is no force option. `wi new` still creates the item and warns on stderr because a new id or filename may clash with an unread file. `wi validate` reports a warning if `defaultRoot` names no root item.
|
|
121
158
|
|
|
122
159
|
## For agents
|
|
123
160
|
|
|
124
161
|
Use `wi` for work-item changes. Do not edit work-item Markdown directly with scripts or bulk text tools. Use `wi validate` to check the vault after changes. `wi rm` moves items into `.trash`; removing a parent requires `--recursive`. Use `wi rm <ref> --dry-run` to review the affected items first.
|
|
125
162
|
|
|
163
|
+
A dispatcher runs `wi agents` before starting workers and holds off when `activeAgents` reaches `maxAgents`; `null` means there is no configured limit. Set `WI_MAX_AGENTS` for a one-run override. The limit is advisory, and `wi claim` does not enforce it. A dispatcher assigns a card with `wi claim <ref> --agent <name>`. If that worker stops, the dispatcher runs `wi release <ref> --reason <text> [--where <branch-or-path>]` so the next worker can find the unfinished work. Keep a card in doing until its work is accepted.
|
|
164
|
+
|
|
126
165
|
## Development
|
|
127
166
|
|
|
128
167
|
Requirements: Node.js 23.6 or later and npm. The tests run the TypeScript source directly, which needs type stripping. The built `wi` runs on Node.js 20.12 or later.
|