dig-burrow 1.2.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.
@@ -0,0 +1,184 @@
1
+ # Burrow Workflow
2
+
3
+ Burrow is an infinitely nestable card tool. You interpret natural language, call CLI operations, and present results.
4
+
5
+ CLI path: `node .claude/burrow/burrow-tools.cjs`
6
+
7
+ ## Invariants (NEVER violate)
8
+
9
+ 1. **Never remove without confirmation** -- Always ask "Remove 'X' and its N children?" before running remove.
10
+ 2. **Never modify data without explicit user request** -- Read operations are safe; write operations require clear user intent.
11
+ 3. **Always clarify ambiguous card references** -- If a title matches multiple cards, list them and ask which one.
12
+ 4. **Never repeat tool output** -- The Bash tool output is already visible to the user. NEVER echo, repeat, or reformat it as text. After a read-only CLI call, say nothing.
13
+ 5. **Never show raw JSON unless the user asks for it** -- The Read tool is used for internal data loading. Never output JSON to the user.
14
+
15
+ ## The 3-Step Flow
16
+
17
+ Every `/burrow` invocation follows this sequence. No exceptions.
18
+
19
+ ### Step 1: LOAD (silent)
20
+
21
+ Read `cards.json` directly using the Read tool to load the tree into agent memory. The Read tool output is invisible to the user, making this truly silent.
22
+
23
+ - **Skip if already loaded**: If the agent has already read `cards.json` in this conversation and no mutation has occurred since, skip this step.
24
+ - **Read on first use or after mutation**: `.planning/burrow/cards.json` using the Read tool (NOT the CLI).
25
+ - **Card ID detection**: An 8-character hex string at the start of user arguments (e.g., `a1b2c3d4`).
26
+ - **NEVER use Bash/CLI for loading.** Bash output is visible to the user. The Read tool is not.
27
+ - **JSON structure**: The file contains an array of card objects. Each card has `id`, `title`, `children` (nested array), and optional `body`, `createdAt`, `archived`.
28
+
29
+ ### Step 2: THINK
30
+
31
+ Using the loaded tree, interpret the user's request.
32
+
33
+ - **No request** (`/burrow` or `/burrow <id>`): Intent is "show this view."
34
+ - **Natural language request**: Resolve card references by matching titles against the in-memory tree.
35
+ - **Ambiguous references**: List matches with IDs and parent context, ask which one.
36
+ - **Missing card references**: Offer to create it.
37
+ - **Questions/analysis** (counting, filtering, searching): Answer directly from the in-memory tree. No CLI call needed — the agent already has the data.
38
+
39
+ ### Step 3: EXECUTE
40
+
41
+ Perform the action.
42
+
43
+ - **For views**: Run `read [id]` (pretty-print). Say nothing after — the output is the presentation.
44
+ - **For mutations** (add, edit, remove, move, archive, unarchive): Run the CLI command, then one-line confirmation. After mutation, re-LOAD by reading `cards.json` with the Read tool to sync agent memory.
45
+ - **For questions/analysis**: Respond with the answer directly. No CLI call needed.
46
+ - **For multi-step operations**: Run all mutations in a single Bash call by chaining with `&&`, summarize changes in plain English, then run one `read` to show end state.
47
+ - **For bulk operations**: Confirm before executing. Example: "This will archive 5 cards under 'bugs'. Proceed?"
48
+
49
+ ## Command Reference
50
+
51
+ All commands invoked as: `node .claude/burrow/burrow-tools.cjs <command> [args]`
52
+
53
+ | Command | Usage | Description |
54
+ |---------|-------|-------------|
55
+ | read | `read [id] [--depth N] [--full] [--include-archived] [--archived-only]` | View a card. Default depth 1. |
56
+ | add | `add --title "..." [--parent <id>] [--body "..."] [--at N]` | Create a card. --at N places at 0-based position. |
57
+ | edit | `edit <id> [--title "..."] [--body "..."]` | Modify a card. |
58
+ | remove | `remove <id>` | Remove card and all descendants. Requires confirmation. |
59
+ | move | `move <id> --to <parent-id> [--at N]` | Move card. --at N places at 0-based position. Omit --to to reorder within current parent. |
60
+ | archive | `archive <id>` | Archive card and descendants. |
61
+ | unarchive | `unarchive <id>` | Restore card and descendants. |
62
+ | find | `find <query>` | Fuzzy search cards by title. Returns IDs and paths. |
63
+ | dump | `dump` | Alias for `read --depth 0` (full tree). |
64
+ | path | `path <id>` | Show ancestry from root to card. |
65
+
66
+ ## Position Translation
67
+
68
+ The --at flag uses 0-based indexing. When users reference positions in natural language,
69
+ translate to 0-based index before constructing the CLI command.
70
+
71
+ | User says | --at value | Rule |
72
+ |-----------|------------|------|
73
+ | "first", "top", "beginning" | --at 0 | Always 0 |
74
+ | "second" | --at 1 | Ordinal minus 1 |
75
+ | "third" | --at 2 | Ordinal minus 1 |
76
+ | "position N" / "slot N" | --at (N-1) | Human position minus 1 |
77
+ | "last", "end", "bottom" | omit --at | Default append behavior |
78
+ | "before card X" | --at (index of X) | Look up X's current index |
79
+ | "after card X" | --at (index of X + 1) | Look up X's current index, add 1 |
80
+
81
+ The agent resolves positions during THINK (Step 2) by inspecting the in-memory tree
82
+ to find the target container's children array and computing the correct index.
83
+
84
+ ## Rendering Rules
85
+
86
+ - The Bash tool output is already visible to the user. NEVER repeat or re-output CLI results as text. The tool call IS the presentation.
87
+ - After a CLI call, say nothing unless there's something the user needs to act on. Do not echo, summarize, or reformat the output.
88
+ - For read-only operations (read, dump, path): run the CLI command and stop. No text output after.
89
+ - For mutations (add, edit, remove, move, archive, unarchive): run the CLI command, then optionally add a one-line confirmation like "Added 'X' under Y." — but NEVER repeat the tree output.
90
+ - For multi-step operations: write a plain English summary of changes, then run one `read` command to show the end state.
91
+ - Default depth is 1 (card + direct children).
92
+
93
+ ## Transparency
94
+
95
+ When showing what command will be run, use the format: "Running: `burrow <command> <args>`"
96
+
97
+ ## Tone and Style
98
+
99
+ Functional and terse. No personality, no burrow metaphors, no excessive commentary.
100
+
101
+ - Good: "Added 'OAuth bug' under Bugs."
102
+ - Bad: "I've successfully created a new card titled 'OAuth bug' and placed it under the Bugs section for you!"
103
+
104
+ ## Worked Examples
105
+
106
+ ### Example 1: Simple view (no args)
107
+
108
+ **User:** `/burrow`
109
+
110
+ **Agent behavior:**
111
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
112
+ 2. THINK: No request — intent is "show root view."
113
+ 3. EXECUTE: Run `node .claude/burrow/burrow-tools.cjs read`. Stop.
114
+
115
+ ### Example 2: Scoped view
116
+
117
+ **User:** `/burrow a1b2c3d4`
118
+
119
+ **Agent behavior:**
120
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
121
+ 2. THINK: No request — intent is "show this card."
122
+ 3. EXECUTE: Run `node .claude/burrow/burrow-tools.cjs read a1b2c3d4`. Stop.
123
+
124
+ ### Example 3: Question answered from memory
125
+
126
+ **User:** `/burrow how many cards have the letter K in the title?`
127
+
128
+ **Agent behavior:**
129
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
130
+ 2. THINK: Scan in-memory tree for titles containing "K" or "k". Count: 7.
131
+ 3. EXECUTE: Respond with the answer directly. No CLI call needed.
132
+
133
+ ### Example 4: Scoped question
134
+
135
+ **User:** `/burrow a1b2c3d4 how many children does this have?`
136
+
137
+ **Agent behavior:**
138
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
139
+ 2. THINK: Count children in the loaded subtree.
140
+ 3. EXECUTE: Respond with the answer directly.
141
+
142
+ ### Example 5: Card creation
143
+
144
+ **User:** `/burrow add a card called OAuth bug under bugs`
145
+
146
+ **Agent behavior:**
147
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
148
+ 2. THINK: Match "bugs" → `a1b2c3d4` "Bugs".
149
+ 3. EXECUTE: Run `node .claude/burrow/burrow-tools.cjs add --title "OAuth bug" --parent a1b2c3d4`. Then re-LOAD by reading `cards.json` with the Read tool.
150
+
151
+ ### Example 6: Multi-step operation
152
+
153
+ **User:** `/burrow move all the auth cards under security`
154
+
155
+ **Agent behavior:**
156
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
157
+ 2. THINK: Match "auth" — finds 3 cards. Match "security" → `f1f2f3f4`.
158
+ 3. Confirm: "This will move 3 cards (Login flow, OAuth integration, Session handling) under Security. Proceed?"
159
+ 4. User confirms.
160
+ 5. EXECUTE: Run each move command. Summarize: "Moved 3 cards under Security."
161
+ 6. Re-LOAD by reading `cards.json` with the Read tool. Run `read f1f2f3f4 --depth 2` to show end state.
162
+
163
+ ### Example 7: Ambiguity resolution
164
+
165
+ **User:** `/burrow archive the login card`
166
+
167
+ **Agent behavior:**
168
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
169
+ 2. THINK: Match "login" — multiple matches:
170
+ - `a1a1a1a1` Login page (Frontend)
171
+ - `b2b2b2b2` Login bug (Bugs)
172
+ - `c3c3c3c3` Login flow (Auth)
173
+ 3. Ask: "Multiple cards match 'login'. Which one?" (list with IDs and parents)
174
+ 4. User selects "Login bug".
175
+ 5. EXECUTE: Run `node .claude/burrow/burrow-tools.cjs archive b2b2b2b2`. Stop.
176
+
177
+ ### Example 8: Position-based insertion
178
+
179
+ **User:** `/burrow add "Urgent fix" under bugs, make it first`
180
+
181
+ **Agent behavior:**
182
+ 1. LOAD: Read `.planning/burrow/cards.json` using the Read tool (silent).
183
+ 2. THINK: Match "bugs" -> `a1b2c3d4` "Bugs". "First" -> --at 0.
184
+ 3. EXECUTE: Run `node .claude/burrow/burrow-tools.cjs add --title "Urgent fix" --parent a1b2c3d4 --at 0`. Then re-LOAD.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:add
3
+ description: Add a new card to burrow
4
+ argument-hint: "--title \"card title\" [--parent <id>] [--body \"content\"]"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Add a card to burrow with the given flags.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs add $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:archive
3
+ description: Archive a card and its descendants
4
+ argument-hint: "<id>"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Archive a burrow card.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs archive $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:dump
3
+ description: Show full tree at all depths
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Dump the entire burrow tree.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs dump`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:edit
3
+ description: Edit a card's title or body
4
+ argument-hint: "<id> [--title \"new title\"] [--body \"new body\"]"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Edit a burrow card with the given flags.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs edit $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: burrow:help
3
+ description: Show burrow command reference
4
+ argument-hint: ""
5
+ allowed-tools: []
6
+ ---
7
+ Output the following command reference:
8
+
9
+ ## Burrow Commands
10
+
11
+ | Command | Description |
12
+ |---------|-------------|
13
+ | `/burrow [request]` | Natural language -- describe what you want |
14
+ | `/burrow:read [id] [--depth N]` | View cards (root at depth 1 if no args) |
15
+ | `/burrow:add --title "..." [--parent id] [--body "..."]` | Add a card |
16
+ | `/burrow:edit id [--title "..."] [--body "..."]` | Edit a card |
17
+ | `/burrow:move id --to parent-id` | Move a card |
18
+ | `/burrow:remove id` | Remove a card (with confirmation) |
19
+ | `/burrow:archive id` | Archive a card |
20
+ | `/burrow:unarchive id` | Restore an archived card |
21
+ | `/burrow:dump` | Full tree view (all depths) |
22
+ | `/burrow:help` | This reference |
23
+
24
+ ### Examples
25
+
26
+ - `/burrow show me my bugs` -- natural language via `/burrow`
27
+ - `/burrow:add --title "fix login" --parent a1b2c3d4` -- add under a specific card
28
+ - `/burrow:read a1b2c3d4 --depth 2` -- view card with 2 levels of children
29
+ - `/burrow:dump` -- see everything
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:move
3
+ description: Move a card to a different parent
4
+ argument-hint: "<id> --to <parent-id> [--at N]"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Move a burrow card to a new parent.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs move $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:read
3
+ description: View cards in burrow
4
+ argument-hint: "[<id>] [--depth N] [--full] [--include-archived] [--archived-only]"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Show burrow cards. With no arguments, shows root at depth 1.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs read $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:remove
3
+ description: Delete a card and its descendants
4
+ argument-hint: "<id>"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Ask the user to confirm before running the remove command. Show what will be removed by running `node .claude/burrow/burrow-tools.cjs read <id>` first.
9
+
10
+ After confirmation, run: `node .claude/burrow/burrow-tools.cjs remove $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: burrow:unarchive
3
+ description: Restore an archived card and its descendants
4
+ argument-hint: "<id>"
5
+ allowed-tools:
6
+ - Bash
7
+ ---
8
+ Unarchive a burrow card.
9
+
10
+ Run: `node .claude/burrow/burrow-tools.cjs unarchive $ARGUMENTS`
11
+
12
+ Do not repeat the CLI output — it is already visible to the user. Say nothing after read-only commands.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: burrow:update
3
+ description: Update burrow to the latest version
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ ---
9
+ Update burrow to the latest version from npm.
10
+
11
+ Steps:
12
+ 1. Run: `npx create-burrow --yes`
13
+ 2. Report the result to the user.
14
+
15
+ This fetches the latest published version of burrow from npm and runs the installer in non-interactive mode. Your existing cards.json data is always preserved during upgrades.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: burrow
3
+ description: Interact with Burrow using natural language -- add, view, move, archive cards
4
+ argument-hint: "[card-id] [natural language request]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ ---
9
+ <execution_context>
10
+ @./.claude/burrow/workflows/burrow.md
11
+ </execution_context>
12
+
13
+ <context>
14
+ User request: $ARGUMENTS
15
+ CLI path: node .claude/burrow/burrow-tools.cjs
16
+ </context>
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mrmatos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,285 @@
1
+ # Burrow
2
+
3
+ There's a hole in the ground next to your project. Chuck any thought into it — it's stored before you finish the sentence. Need it back? Already there.
4
+
5
+ Burrow is an infinitely nestable card store for [Claude Code](https://claude.ai/claude-code). Cards contain cards contain cards, as deep as you want. The agent navigates the whole thing so you never have to (unless you want to).
6
+
7
+ > "throw a note on the OAuth issue — redirect is broken again"
8
+ >
9
+ > "move everything from backlog into sprint"
10
+ >
11
+ > "what's left under bugs? show me the details"
12
+
13
+ You talk. The agent traverses, renders, and manipulates. One file, one source of truth, zero ceremony.
14
+
15
+ ## How it works
16
+
17
+ One recursive data structure. That's it.
18
+
19
+ ```
20
+ burrow › Mock
21
+
22
+ ────────────────────────────────────────
23
+ Mock
24
+ ────────────────────────────────────────
25
+ id: 2bdb294a
26
+ created: 2026-03-08 (1d ago)
27
+ archived: no
28
+ ────────────────────────────────────────
29
+ children: 3 cards (14 total)
30
+ ├─ [82c35e2c] Backend Services (9) 1d ago
31
+ │ ├─ [8698f27b] Auth API (6) + 1d ago
32
+ │ │ ├─ [7d274551] Token Refresh Flow (3) + 1d ago
33
+ │ │ └─ [a91b72bb] Rate Limiter (1) 1d ago
34
+ │ └─ [1a763ccd] Data Pipeline (1) 1d ago
35
+ │ └─ [df36b887] ETL Jobs 1d ago
36
+ ├─ [4f42eb4e] Frontend App (6) 1d ago
37
+ │ ├─ [e044cc9f] Dashboard (4) 1d ago
38
+ │ │ ├─ [f7ee4392] Widget Grid + 1d ago
39
+ │ │ └─ [69f7e0d4] Charts (2) 1d ago
40
+ │ └─ [5a9daea7] Settings Page + 1d ago
41
+ └─ [cbe50a76] DevOps (2) 1d ago
42
+ └─ [c5b5131a] CI/CD (1) 1d ago
43
+ └─ [dd4fc5d8] GitHub Actions +
44
+ ────────────────────────────────────────
45
+ body:
46
+ Demo data for showcasing nested tree rendering at various depths.
47
+ ────────────────────────────────────────
48
+ ```
49
+
50
+ Every card has a title and a body. The body holds whatever you want — a description, repro steps, a decision rationale, agent instructions, bug details...
51
+
52
+ But every card can also contain child cards, and every child can contain more children. There are no buckets, tags, categories, or priorities — the structure IS the organization. A "bug tracker" is just a card called "bugs" with children. A "shopping list" is another top-level card. You decide what the tree means.
53
+
54
+ The agent picks the depth, the focus, and the rendering. You just ask.
55
+
56
+ ## Setup
57
+
58
+ Requires [Claude Code](https://docs.anthropic.com/en/docs/claude-code) already installed on your project.
59
+
60
+ ```bash
61
+ git clone https://github.com/mrmatos6837/burrow.git
62
+ node burrow/install.cjs ~/your-project
63
+ ```
64
+
65
+ This copies the source and commands into your project, creates `.planning/burrow/cards.json`, and appends a Burrow section to your `CLAUDE.md` that tells the agent how to use burrow — reading it on session start, storing persistent instructions as cards, and routing all mutations through the CLI.
66
+
67
+ That's it. Open Claude Code and say `/burrow` to get started.
68
+
69
+ **What gets installed:**
70
+
71
+ ```
72
+ .claude/burrow/ # source code (lib/, CLI entry point)
73
+ .claude/commands/burrow.md # /burrow slash command
74
+ .claude/commands/burrow/ # shortcut commands (/burrow:add, etc.)
75
+ .planning/burrow/cards.json # your data (commit this)
76
+ CLAUDE.md # agent instructions (appended, not overwritten)
77
+ ```
78
+
79
+ **Requirements:** Node.js v19+ — zero npm dependencies.
80
+
81
+ ## Usage
82
+
83
+ Use `/burrow` with natural language:
84
+
85
+ ```
86
+ /burrow add a login crash bug under auth — "happens after OAuth redirect"
87
+ /burrow move everything from backlog into sprint
88
+ /burrow archive all the v1 stuff, it shipped
89
+ /burrow show me what's left under bugs with full details
90
+ ```
91
+
92
+ Or use the shortcut commands directly:
93
+
94
+ ```
95
+ /burrow:add /burrow:read /burrow:dump
96
+ /burrow:edit /burrow:move /burrow:archive
97
+ /burrow:remove /burrow:unarchive /burrow:help
98
+ ```
99
+
100
+ All data lives in a single file: `.planning/burrow/cards.json`. The agent reads it into memory, resolves your references, and calls the CLI. You never touch JSON.
101
+
102
+ ## Agent Memory
103
+
104
+ Say "remember to always use bun" or "don't forget — the API key comes from vault" and it becomes a card. The agent reads burrow on every session start, so persistent instructions survive context resets. No separate memory system, no markdown files drifting out of sync — just cards.
105
+
106
+ ## CLI Reference
107
+
108
+ Under the hood, everything goes through `burrow-tools.cjs`. The agent calls it for you, but you can run it directly too:
109
+
110
+ ```bash
111
+ node .claude/burrow/burrow-tools.cjs <command> [options]
112
+ ```
113
+
114
+ ### Reading
115
+
116
+ ```bash
117
+ read # show top-level cards
118
+ read <id> # show a card and its direct children
119
+ read <id> --depth 3 # show 3 levels of nesting
120
+ read <id> --depth 0 # show the entire subtree (no limit)
121
+ read <id> --full # show full card bodies (no truncation)
122
+ read --include-archived # include archived cards in output
123
+ read --archived-only # show only archived cards
124
+ dump # show everything: full tree, full bodies
125
+ ```
126
+
127
+ `read` with no ID shows the root. With an ID, it focuses on that card and shows breadcrumb ancestry. The default depth is 1 (direct children only).
128
+
129
+ `dump` is shorthand for `read --depth 0 --full` — the "show me everything" command.
130
+
131
+ Bodies longer than 200 characters are truncated unless you pass `--full`.
132
+
133
+ ### Creating
134
+
135
+ ```bash
136
+ add --title "Bug tracker" # add to root
137
+ add --title "Login crash" --parent <id> # add as child
138
+ add --title "First" --body "Details here" # add with body
139
+ add --title "Urgent" --parent <id> --at 0 # insert at position
140
+ ```
141
+
142
+ `--at` takes a 0-based index. `--at 0` puts the card first, omitting it appends to the end.
143
+
144
+ ### Editing
145
+
146
+ ```bash
147
+ edit <id> --title "New title"
148
+ edit <id> --body "Updated description"
149
+ edit <id> --title "New" --body "Both at once"
150
+ ```
151
+
152
+ Only the fields you pass get changed. Everything else stays the same.
153
+
154
+ ### Moving
155
+
156
+ ```bash
157
+ move <id> --to <parent-id> # move to a different parent
158
+ move <id> --to root # move to root level
159
+ move <id> --at 0 # reorder within current parent (move to first)
160
+ move <id> --to <parent-id> --at 2 # move to parent at specific position
161
+ ```
162
+
163
+ `--to` sets the destination parent. `--at` sets the position (0-based). Use `--at` alone to reorder within the current parent without moving.
164
+
165
+ The CLI prevents cycles — you can't move a card into its own subtree.
166
+
167
+ ### Archiving
168
+
169
+ ```bash
170
+ archive <id> # archive card and all descendants
171
+ unarchive <id> # restore card and all descendants
172
+ ```
173
+
174
+ Archiving cascades — archiving a parent archives its entire subtree. Unarchiving restores the whole subtree. Archived cards are hidden from `read` by default.
175
+
176
+ ### Deleting
177
+
178
+ ```bash
179
+ remove <id> # permanently delete card and all descendants
180
+ ```
181
+
182
+ This is permanent — the card and its entire subtree are gone. But `cards.json` is tracked in git, and every write creates a `.bak` file with the previous state, so recovery is always possible.
183
+
184
+ ### Finding
185
+
186
+ ```bash
187
+ find <query> # search card titles (case-insensitive)
188
+ path <id> # show ancestry path from root to card
189
+ ```
190
+
191
+ `find` searches all active (non-archived) card titles and returns matches with their full path. `path` shows the breadcrumb trail: `burrow > parent > child [id]`.
192
+
193
+ ### Card Schema
194
+
195
+ Every card has this shape:
196
+
197
+ ```json
198
+ {
199
+ "id": "8eaff688",
200
+ "title": "Card title",
201
+ "created": "2026-03-07T19:08:41.051Z",
202
+ "archived": false,
203
+ "body": "Free-form text, any length",
204
+ "children": []
205
+ }
206
+ ```
207
+
208
+ IDs are 8-character hex strings, generated automatically. Timestamps are ISO 8601. The body field is free-form — use it for descriptions, notes, agent instructions, whatever you want.
209
+
210
+ ### Tree Output
211
+
212
+ The pretty-printed tree shows indicators after each card title:
213
+
214
+ ```
215
+ ├─ [8698f27b] Auth API (6) + 1d ago
216
+ ```
217
+
218
+ - `(N)` — active descendant count (hidden when 0)
219
+ - `+` — card has a body (read the card to see it)
220
+ - `[archived]` — card is archived (only visible with `--include-archived`)
221
+ - `1d ago` — relative age, right-aligned
222
+
223
+ ## Why
224
+
225
+ AI agents working on your project need to track state — tasks, decisions, context. But reading scattered files is expensive, so they cache. Caches drift. Markdown summaries go stale. Multiple files representing the same data fall out of sync. I've [measured it](field-reports/agent-state-drift.md): a 29% failure rate keeping two representations of the same data in sync, with silent drift accumulating over 24 hours before anyone notices.
226
+
227
+ What if you made the source of truth so cheap to read that caching was pointless?
228
+
229
+ A flat TODO list wasn't enough. A full-blown project tracker was too much. I needed something in between — a place to throw structured thoughts without ceremony, that the agent could read and write as naturally as I could talk to it.
230
+
231
+ That's Burrow. One file, one read, one truth — it's just JSON. Zero dependencies, near-instant reads. No caches to invalidate. No sync steps to skip. No secondary updates to forget.
232
+
233
+ Consistent, reliable, fast and infinitely extensible.
234
+
235
+ ## Uninstall
236
+
237
+ Delete the files and it's gone. No background processes, no global state, nothing to clean up.
238
+
239
+ ```bash
240
+ rm -rf .claude/burrow .claude/commands/burrow.md .claude/commands/burrow .planning/burrow
241
+ ```
242
+
243
+ Then remove the "Burrow — Agent Memory" section from your `CLAUDE.md`.
244
+
245
+ ## Privacy
246
+
247
+ Burrow data is meant to be committed to git. Anything stored in cards is visible to anyone with repo access. Avoid storing secrets, credentials, or sensitive personal information.
248
+
249
+ ## FAQ
250
+
251
+ **What's `cards.json.bak`?**
252
+
253
+ Every time burrow writes, it saves the previous version as `.bak` before touching the real file. The actual write goes to a `.tmp` file first, then gets atomically renamed to `cards.json` — so your data is either the old version or the new version, never half-written. The `.bak` is a bonus rollback if you ever need it. It's in `.gitignore` by default.
254
+
255
+ **Can I lose data?**
256
+
257
+ Burrow uses atomic writes (tmp file + rename), which is the safest way to write files on disk. Your data won't corrupt from a crash or killed process. The `.bak` file is there as an extra safety net.
258
+
259
+ **Can multiple agents use the same burrow?**
260
+
261
+ There's no file locking yet, so two agents writing at the same time could overwrite each other. If you make sure they don't write simultaneously, it works fine. Use at your own risk.
262
+
263
+ **How big can the tree get?**
264
+
265
+ No artificial limits — it's just JSON. The practical ceiling is when the file gets too large for the agent to read in one shot, which is thousands of cards. You'll run out of things to track before you hit it.
266
+
267
+ **Should I commit cards.json?**
268
+
269
+ Yes, that's the point. It's your project state, version-controlled like everything else.
270
+
271
+ **Can I edit cards.json by hand?**
272
+
273
+ You can, it's just JSON. But the CLI handles IDs, timestamps, and structure for you. If you edit manually, make sure the schema stays valid.
274
+
275
+ **Does it work with other AI agents?**
276
+
277
+ Right now it's built for Claude Code. The slash commands and workflow file are Claude-specific. The CLI itself (`burrow-tools.cjs`) is just a Node script — any agent that can run shell commands could use it, but the integration layer would need to be built.
278
+
279
+ ## Contributing
280
+
281
+ Issues and PRs welcome.
282
+
283
+ ## License
284
+
285
+ TBD