@weave-tools/weave-it 0.1.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/LICENSE +21 -0
- package/README.md +868 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.js +4538 -0
- package/dist/cli.js.map +1 -0
- package/package.json +65 -0
- package/templates/opencode/commands/weave-architect.md +7 -0
- package/templates/opencode/commands/weave-capture.md +7 -0
- package/templates/opencode/commands/weave-clarify.md +7 -0
- package/templates/opencode/commands/weave-execute.md +7 -0
- package/templates/opencode/commands/weave-explore.md +7 -0
- package/templates/opencode/commands/weave-issues.md +7 -0
- package/templates/opencode/commands/weave-knowledge.md +7 -0
- package/templates/opencode/commands/weave-new.md +7 -0
- package/templates/opencode/commands/weave-next.md +7 -0
- package/templates/opencode/commands/weave-prd.md +7 -0
- package/templates/opencode/commands/weave-prepare.md +7 -0
- package/templates/skills/weave-architect/SKILL.md +291 -0
- package/templates/skills/weave-architect/api-contract-template.md +21 -0
- package/templates/skills/weave-architect/frontend-backend-template.md +21 -0
- package/templates/skills/weave-architect/index-template.md +24 -0
- package/templates/skills/weave-architect/schema-template.md +21 -0
- package/templates/skills/weave-capture/SKILL.md +398 -0
- package/templates/skills/weave-clarify/SKILL.md +513 -0
- package/templates/skills/weave-execute/SKILL.md +215 -0
- package/templates/skills/weave-explore/SKILL.md +434 -0
- package/templates/skills/weave-issues/SKILL.md +441 -0
- package/templates/skills/weave-knowledge/SKILL.md +161 -0
- package/templates/skills/weave-knowledge/knowledge-templates.md +63 -0
- package/templates/skills/weave-new/SKILL.md +76 -0
- package/templates/skills/weave-next/SKILL.md +216 -0
- package/templates/skills/weave-prd/SKILL.md +419 -0
- package/templates/skills/weave-prd/prd-template.md +186 -0
- package/templates/skills/weave-prepare/SKILL.md +94 -0
package/README.md
ADDED
|
@@ -0,0 +1,868 @@
|
|
|
1
|
+
# Weave-It
|
|
2
|
+
|
|
3
|
+
Weave-It is a TypeScript CLI package. The npm package is `@weave-tools/weave-it` and the CLI binary is `weave`.
|
|
4
|
+
|
|
5
|
+
## What Is Weave?
|
|
6
|
+
|
|
7
|
+
Weave is an SDLC tool for AI-assisted software teams. It is designed to work with agents and coding tools like Claude, Codex, OpenCode, and similar systems.
|
|
8
|
+
|
|
9
|
+
The goal is to give AI tools durable project context across the full software lifecycle:
|
|
10
|
+
|
|
11
|
+
- Product discovery and requirements
|
|
12
|
+
- Engineering planning and implementation
|
|
13
|
+
- Cross-repo code exploration
|
|
14
|
+
- QA notes, validation, and handoff
|
|
15
|
+
- Long-lived product and technical knowledge
|
|
16
|
+
|
|
17
|
+
Each repo can contain a committed `wiki/` folder that acts like an LLM-friendly wiki for that repo. Weave also maintains committed metadata in `.weave/` and a temporary local session so agents can understand which folders/repos should be considered together for the current task.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
Install the CLI globally from npm:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g @weave-tools/weave-it
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then verify it works:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
weave --help
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Optional: install `codebase-memory-mcp` if you want coding agents to use indexed codebase context while working with Weave-managed repos:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g codebase-memory-mcp
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After installing it, configure or restart your coding agent and index the project. See the [`codebase-memory-mcp` GitHub documentation](https://github.com/DeusData/codebase-memory-mcp) for further setup. Weave works without this MCP; it just gives compatible agents a faster way to search architecture, symbols, and call relationships before reading source files.
|
|
40
|
+
|
|
41
|
+
## Requirements
|
|
42
|
+
|
|
43
|
+
- Node.js `>=22.12`
|
|
44
|
+
- npm
|
|
45
|
+
|
|
46
|
+
If you use `nvm`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
nvm use 22
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Setup
|
|
53
|
+
|
|
54
|
+
Install dependencies from the project root:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Development Commands
|
|
61
|
+
|
|
62
|
+
Run the CLI from source:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm run dev -- <command>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Examples:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm run dev -- --help
|
|
72
|
+
npm run dev -- init --help
|
|
73
|
+
npm run dev -- init --yes
|
|
74
|
+
npm run dev -- workspace --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Typecheck:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm run typecheck
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Run tests:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm test
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Build:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run build
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Recommended verification before opening a PR:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npm run typecheck
|
|
99
|
+
npm test
|
|
100
|
+
npm run build
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Test The CLI As `weave`
|
|
104
|
+
|
|
105
|
+
The package exposes this binary in `package.json`:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
"bin": {
|
|
109
|
+
"weave": "./dist/cli.js"
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
To test the installed command shape locally:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm run build
|
|
117
|
+
npm link
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Then run:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
weave --help
|
|
124
|
+
weave init --yes
|
|
125
|
+
weave workspace
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
After code changes, run `npm run build` again so the linked command uses the latest compiled output.
|
|
129
|
+
|
|
130
|
+
To remove the local global link:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm unlink -g @weave-tools/weave-it
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Supported CLI Commands
|
|
137
|
+
|
|
138
|
+
## `weave init`
|
|
139
|
+
|
|
140
|
+
Initializes Weave in repo mode or workspace mode and starts a new temporary session.
|
|
141
|
+
|
|
142
|
+
- Repo mode is the default. Use it when you want Weave to code/reference only the current repo or folder.
|
|
143
|
+
- Workspace mode is for multi-repo or multi-folder work. It creates a workspace with the shared `wiki/` and `.weave/` metadata.
|
|
144
|
+
- When workspace mode runs inside an existing git repo, Weave creates the workspace beside that repo, moves the repo into the workspace, adds the repo directory to the workspace `.gitignore`, and registers it in `.weave/workspace.yml`.
|
|
145
|
+
- After workspace-mode init, open the created workspace path in your editor.
|
|
146
|
+
|
|
147
|
+
V1 workspace mode only creates the workspace and adopts the current repo when detected. Arbitrary attach, clone, migration, skill rewrites, and workspace-aware change commands are deferred.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
weave init [options]
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Options:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
--id <id> folder id
|
|
157
|
+
--kind <kind> folder kind, defaults to app
|
|
158
|
+
--mode <mode> init mode: repo or workspace; defaults to repo with --yes
|
|
159
|
+
--workspace-name <name> workspace name for workspace mode
|
|
160
|
+
--workspace-path <path> workspace path for workspace mode outside a git repo
|
|
161
|
+
--yes accept defaults and skip prompts
|
|
162
|
+
-h, --help display help for command
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Examples:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
weave init --id weave-it --kind package --yes
|
|
169
|
+
weave init --mode repo --yes
|
|
170
|
+
weave init --mode workspace --workspace-name peoplebox-platform
|
|
171
|
+
weave init --mode workspace --workspace-name peoplebox-platform --workspace-path ../peoplebox-platform
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
From source:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
npm run dev -- init --id weave-it --kind package --yes
|
|
178
|
+
npm run dev -- init --mode workspace --workspace-name peoplebox-platform
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## `weave add <path>`
|
|
182
|
+
|
|
183
|
+
Adds a folder to the current Weave context. Behavior depends on whether the active directory is in **repo mode** or **workspace mode** (detected via `.weave/workspace.yml`).
|
|
184
|
+
|
|
185
|
+
**Repo mode** (default when no workspace or `mode: repo`):
|
|
186
|
+
|
|
187
|
+
- Adds the folder to the ephemeral session in `~/.cache/weave/current-session.yml` only.
|
|
188
|
+
|
|
189
|
+
**Workspace mode** (`mode: workspace` in `.weave/workspace.yml`):
|
|
190
|
+
|
|
191
|
+
- Accepts a filesystem **path** or a **git URL**.
|
|
192
|
+
- URL: runs `git clone` into the workspace root (directory name from the URL basename).
|
|
193
|
+
- Path inside the workspace: registers in place.
|
|
194
|
+
- Path outside the workspace: moves the folder into the workspace root, then registers.
|
|
195
|
+
- Updates `.weave/workspace.yml` `repos` and appends the folder to the workspace `.gitignore`.
|
|
196
|
+
- Records `remote.origin.url` when the folder has a `.git/`.
|
|
197
|
+
- Does not add sub-repos to `session.folders`.
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
weave add [options] <path-or-url>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Arguments:
|
|
204
|
+
|
|
205
|
+
```text
|
|
206
|
+
path-or-url folder path or git remote URL (workspace mode only for URLs)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Options:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
--id <id> folder id (workspace: repos.<id> key; repo mode: session folder id)
|
|
213
|
+
--kind <kind> folder kind, defaults to app
|
|
214
|
+
-h, --help display help for command
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Examples:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Repo mode: add another repo to the local session
|
|
221
|
+
weave add ../backend --id backend --kind api
|
|
222
|
+
|
|
223
|
+
# Workspace mode: register a folder already inside the workspace
|
|
224
|
+
weave add ./billing --kind app
|
|
225
|
+
|
|
226
|
+
# Workspace mode: clone by URL
|
|
227
|
+
weave add git@github.com:org/billing.git
|
|
228
|
+
|
|
229
|
+
# Workspace mode: adopt a sibling repo into the workspace
|
|
230
|
+
weave add ../external-tooling
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
From source:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npm run dev -- add ../backend --id backend --kind api
|
|
237
|
+
npm run dev -- add git@github.com:org/billing.git
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## `weave workspace`
|
|
241
|
+
|
|
242
|
+
Shows what is around you. Behavior depends on whether the current working directory sits inside a Weave workspace.
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
weave workspace [options]
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
Options:
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
--json print machine-readable JSON
|
|
252
|
+
-h, --help display help for command
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
`weave workspace` walks up from the current directory looking for `.weave/workspace.yml`:
|
|
256
|
+
|
|
257
|
+
- **Workspace mode** (a `workspace.yml` with `mode: workspace` is found at or above `cwd`): prints the workspace name, its root path, and the repos registered in `workspace.yml.repos`. An active Weave session is not required.
|
|
258
|
+
- **Repo mode** (no workspace.yml above `cwd`, or its `mode` is not `workspace`, or the file is malformed): prints the current Weave session folders. Requires an active session.
|
|
259
|
+
|
|
260
|
+
Examples:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
weave workspace
|
|
264
|
+
weave workspace --json
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
JSON shape in workspace mode:
|
|
268
|
+
|
|
269
|
+
```json
|
|
270
|
+
{
|
|
271
|
+
"session": { "status": "active", "updated_at": "..." } | null,
|
|
272
|
+
"workspace": {
|
|
273
|
+
"name": "peoplebox-platform",
|
|
274
|
+
"path": "/path/to/peoplebox-platform",
|
|
275
|
+
"mode": "workspace"
|
|
276
|
+
},
|
|
277
|
+
"repos": [
|
|
278
|
+
{ "id": "billing", "path": "billing", "kind": "app", "remote": "git@github.com:org/billing.git" }
|
|
279
|
+
],
|
|
280
|
+
"folders": []
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
JSON shape in repo mode:
|
|
285
|
+
|
|
286
|
+
```json
|
|
287
|
+
{
|
|
288
|
+
"session": { "status": "active", "updated_at": "..." },
|
|
289
|
+
"workspace": null,
|
|
290
|
+
"repos": [],
|
|
291
|
+
"folders": [
|
|
292
|
+
{
|
|
293
|
+
"id": "frontend",
|
|
294
|
+
"path": "/path/to/frontend",
|
|
295
|
+
"kind": "app",
|
|
296
|
+
"wiki": "/path/to/frontend/wiki",
|
|
297
|
+
"metadata": "/path/to/frontend/.weave"
|
|
298
|
+
}
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
A teammate cloning the workspace fresh can run `weave workspace` immediately from inside the clone to see the registered repos, without ever running `weave init`.
|
|
304
|
+
|
|
305
|
+
From source:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
npm run dev -- workspace
|
|
309
|
+
npm run dev -- workspace --json
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## `weave change`
|
|
313
|
+
|
|
314
|
+
Creates, inspects, and switches durable change folders under `wiki/changes/`.
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
weave change new "<title>" [options]
|
|
318
|
+
weave change list [options]
|
|
319
|
+
weave change current [options]
|
|
320
|
+
weave change status [change] [options]
|
|
321
|
+
weave change progress <lane> [options]
|
|
322
|
+
weave change clear-stale <lane> [options]
|
|
323
|
+
weave change switch <change> [options]
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
`weave change new` creates a change id in the form `{YYMMDD}-{XXXX}-{slug}`, writes `status.yml` and `exploration.md`, creates or checks out the matching git branch, and records the new change as current in the local Weave session:
|
|
327
|
+
|
|
328
|
+
```text
|
|
329
|
+
change/{change-id}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Change and artifact commands are cwd-dispatched. Weave walks up from the current directory to `.weave/workspace.yml`; in workspace mode the workspace root owns `wiki/changes/`, and in repo mode the repo root owns `wiki/changes/`. Running from a nested workspace repo or repo subdirectory operates on that containing Weave root.
|
|
333
|
+
|
|
334
|
+
Active change state is local workspace/session state. It is stored outside the repo so it does not appear in commits or pull requests.
|
|
335
|
+
|
|
336
|
+
Options for `new`:
|
|
337
|
+
|
|
338
|
+
```text
|
|
339
|
+
--type <type> change type: feat, fix, refactor, docs, test, ci, or chore; defaults to feat
|
|
340
|
+
--slug <slug> change slug override
|
|
341
|
+
--json print machine-readable JSON
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Options for `list`, `current`, `status`, and `switch`:
|
|
345
|
+
|
|
346
|
+
```text
|
|
347
|
+
--json print machine-readable JSON
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Options for `progress`:
|
|
351
|
+
|
|
352
|
+
```text
|
|
353
|
+
lane exploration, prd, architecture, or issues
|
|
354
|
+
--source <source> repeatable source dependency: exploration, prd, architecture, discussion, sessions, or codebase
|
|
355
|
+
--no-invalidate suppress all downstream stale propagation for this call
|
|
356
|
+
--invalidate <list> mark only this comma-separated subset of dependent lanes stale (e.g. issues,architecture)
|
|
357
|
+
--json print machine-readable JSON
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Options for `clear-stale`:
|
|
361
|
+
|
|
362
|
+
```text
|
|
363
|
+
lane exploration, prd, architecture, or issues
|
|
364
|
+
--reason <reason> one-sentence verification rationale recorded in stale_history
|
|
365
|
+
--json print machine-readable JSON
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Examples:
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
weave change new "Analytics of reviews"
|
|
372
|
+
weave change new "Fix review import" --type fix --slug review-import
|
|
373
|
+
weave change list
|
|
374
|
+
weave change current
|
|
375
|
+
weave change status
|
|
376
|
+
weave change progress prd --source exploration --source sessions --json
|
|
377
|
+
weave change status 260522-f3q9-review-analytics
|
|
378
|
+
weave change switch f3q9
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
From source:
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
npm run dev -- change new "Analytics of reviews"
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
`weave change list` is a clean index and marks the active change with `*`. `weave change current` shows the active change and can recover missing session state from a matching `change/{id}` branch. `weave change status` reports metadata and branch alignment. `weave change switch` is the explicit way to move to another existing change.
|
|
388
|
+
|
|
389
|
+
`weave change progress <lane>` records lifecycle progress for the active change. `stage` is orientation for the furthest progressed lane; it does not prove skipped upstream artifacts were created. `artifacts` records the source graph used for stale invalidation:
|
|
390
|
+
|
|
391
|
+
```yaml
|
|
392
|
+
stage: architecture
|
|
393
|
+
artifacts:
|
|
394
|
+
prd:
|
|
395
|
+
sources:
|
|
396
|
+
- exploration
|
|
397
|
+
- sessions
|
|
398
|
+
updated_at: "2026-05-31T04:00:00.000Z"
|
|
399
|
+
architecture:
|
|
400
|
+
sources:
|
|
401
|
+
- prd
|
|
402
|
+
- codebase
|
|
403
|
+
updated_at: "2026-05-31T04:05:00.000Z"
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Pass each source with repeatable `--source` flags. Source lists are replaced on each progress call for that lane.
|
|
407
|
+
|
|
408
|
+
`stale` records source-aware dependents that should be refreshed after a source lane changes:
|
|
409
|
+
|
|
410
|
+
```yaml
|
|
411
|
+
stage: issues
|
|
412
|
+
stale:
|
|
413
|
+
architecture:
|
|
414
|
+
invalidated_by: prd
|
|
415
|
+
invalidated_at: "2026-05-31T04:06:16.000Z"
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Weave-managed artifact-writing skills call `progress` after successful live artifact writes. Existing changes without `artifacts` or `stale` continue to work and are treated as having no recorded dependencies or stale lanes.
|
|
419
|
+
|
|
420
|
+
Default propagation marks every transitive downstream lane stale. Skills following the **Lifecycle Staleness Verification Protocol** (embedded in `weave-prd`, `weave-architect`, `weave-clarify`, `weave-issues`, and `weave-capture`) first read the dependent artifacts and decide per-lane whether the upstream change actually invalidates them:
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
# default: every downstream lane goes stale
|
|
424
|
+
weave change progress prd --source exploration --json
|
|
425
|
+
|
|
426
|
+
# narrow clarification, no dependent invalidated
|
|
427
|
+
weave change progress prd --source exploration --no-invalidate --json
|
|
428
|
+
|
|
429
|
+
# only `issues` is invalidated, not `architecture`
|
|
430
|
+
weave change progress prd --source exploration --invalidate=issues --json
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
If a previously-stale lane is now in content sync (verified by reading both artifacts), clear the flag with an audit-trail entry:
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
weave change clear-stale architecture --reason "Wording typo in prd; architecture references unchanged" --json
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Each clear appends a record to `status.yml.stale_history` with `lane`, `invalidated_by`, `invalidated_at`, `cleared_at`, and `reason`. Never hand-edit `status.yml` to change stale state; use the CLI.
|
|
440
|
+
|
|
441
|
+
If a target is not a git repo, Weave still writes the change artifacts and reports branch creation as skipped. `switch` and `propagate` block when affected git repos have uncommitted changes; `new` does not block so already-started local work can be captured as a new change.
|
|
442
|
+
|
|
443
|
+
## `weave status`
|
|
444
|
+
|
|
445
|
+
Shows the installed `@weave-tools/weave-it` package version, the bundled skill versions, and any notices for the current repo.
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
weave status [options]
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Options:
|
|
452
|
+
|
|
453
|
+
```text
|
|
454
|
+
--json print machine-readable JSON
|
|
455
|
+
-h, --help display help for command
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
`weave status` is the explicit, detailed view of:
|
|
459
|
+
|
|
460
|
+
- the installed `@weave-tools/weave-it` npm package version,
|
|
461
|
+
- the latest cached `@weave-tools/weave-it` version from the npm registry (refreshed at most once every 24h),
|
|
462
|
+
- every installed skill, the package version it was installed from, the current bundled package version, and a per-skill state (`current`, `outdated`, `modified`, `missing`),
|
|
463
|
+
- the same `notices` array that Tier 1 commands return in `--json` mode.
|
|
464
|
+
|
|
465
|
+
Use it whenever a notice points you here:
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
weave status
|
|
469
|
+
weave status --json
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
## Notices
|
|
473
|
+
|
|
474
|
+
The five Tier 1 commands surface a stable `notices` array in their `--json` output and, in interactive TTY mode, print a one-line stderr footer that tells the user there are notices and to run `weave status`:
|
|
475
|
+
|
|
476
|
+
```text
|
|
477
|
+
weave workspace
|
|
478
|
+
weave change current
|
|
479
|
+
weave change status
|
|
480
|
+
weave change new
|
|
481
|
+
weave status
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
Notice kinds:
|
|
485
|
+
|
|
486
|
+
```text
|
|
487
|
+
package_outdated a newer @weave-tools/weave-it npm version is cached locally
|
|
488
|
+
skills_modified one or more installed SKILL.md files differ from the manifest hash
|
|
489
|
+
skills_outdated one or more installed skills were installed from an older @weave-tools/weave-it version than the current bundled skills
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Notices are computed in parallel with the command's normal work; missing network, an unwritable `~/.weave/cache`, or a stripped-down npm registry response all degrade gracefully to an empty array.
|
|
493
|
+
|
|
494
|
+
Suppress notices everywhere with either:
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
NO_UPDATE_NOTIFIER=1 weave change current
|
|
498
|
+
WEAVE_NO_NOTICES=1 weave change current
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
Non-Tier-1 commands (`agent install`, `agent update`, `change list`, `change progress`, etc.) never include a `notices` field.
|
|
502
|
+
|
|
503
|
+
## Skill Versioning
|
|
504
|
+
|
|
505
|
+
Every bundled `SKILL.md` template carries a `last_changed_in` frontmatter field recording the `@weave-tools/weave-it` package version of the last substantive change to that skill:
|
|
506
|
+
|
|
507
|
+
```yaml
|
|
508
|
+
---
|
|
509
|
+
name: weave-prd
|
|
510
|
+
description: Generate or revise prd.md ...
|
|
511
|
+
last_changed_in: 0.1.0
|
|
512
|
+
---
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
When a skill is installed, the version is stamped into `.weave/agents.yml` as `installed_from`. The `skills_outdated` notice fires when the bundled version is newer than the recorded `installed_from`. Run `weave agent update <agent>` to bring untouched skills up to date, or `weave agent reset <agent> <skill>` to overwrite a locally-modified copy.
|
|
516
|
+
|
|
517
|
+
Maintainers bump `last_changed_in` for every skill that changed since the previous git tag with:
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
npm run release:bump-skills
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
The script reads `package.json`'s `version`, diffs each `templates/skills/<name>/SKILL.md` against the most recent reachable git tag, and only updates skills with real changes. It never commits or tags on its own.
|
|
524
|
+
|
|
525
|
+
## Plan Mode Protocol (design-discussion skills)
|
|
526
|
+
|
|
527
|
+
`weave-explore`, `weave-prd`, `weave-architect`, and `weave-clarify` ship with an embedded **Plan Mode Protocol** because every supported agent harness (Claude, Cursor, Codex, opencode) blocks filesystem writes in plan mode / ask mode. The protocol defers `weave artifact current set <lane>` until the user accepts the plan and the harness allows mutations:
|
|
528
|
+
|
|
529
|
+
- In plan/ask mode the skill declares `Lane: <lane>` at the top of the plan output and ends with `On plan acceptance, the first action will be: weave artifact current set <lane> --json`.
|
|
530
|
+
- The first agent-mode action after acceptance runs the deferred `weave artifact current set <lane> --json` call before continuing the skill's discovery and work.
|
|
531
|
+
|
|
532
|
+
The protocol text is enforced byte-identically across all four skills by a test against the canonical constant in `src/lib/skill-template-checks.ts`.
|
|
533
|
+
|
|
534
|
+
## `weave agent`
|
|
535
|
+
|
|
536
|
+
Installs and manages Weave Agent Skills for supported coding agents.
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
weave agent <install|update|diff|reset> <agent> [skill]
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Agents:
|
|
543
|
+
|
|
544
|
+
```text
|
|
545
|
+
codex install Agent Skills to .agents/skills
|
|
546
|
+
cursor install Agent Skills to .agents/skills
|
|
547
|
+
claude install Agent Skills to .claude/skills
|
|
548
|
+
opencode install Agent Skills to .agents/skills and slash commands to .opencode/commands
|
|
549
|
+
all install every supported integration
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
Examples:
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
weave agent install opencode
|
|
556
|
+
weave agent update opencode
|
|
557
|
+
weave agent diff opencode weave-explore
|
|
558
|
+
weave agent reset opencode weave-explore
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
`install` and `update` protect user edits. They update files only when the current file still matches the last Weave-installed hash in `.weave/agents.yml`. If a user edits an installed skill or command wrapper, Weave skips it. `reset` is the explicit overwrite path.
|
|
562
|
+
|
|
563
|
+
## Using Weave Skills
|
|
564
|
+
|
|
565
|
+
Weave ships Agent Skills for change discovery, requirements, implementation planning, and change workflow scaffolding. Each skill starts by running `weave workspace --json` and uses `wiki/knowledge/**` plus `wiki/changes/**` as durable context.
|
|
566
|
+
|
|
567
|
+
Skills:
|
|
568
|
+
|
|
569
|
+
```text
|
|
570
|
+
weave-new start a new change exploration from a title or topic
|
|
571
|
+
weave-capture capture the current discussion into an artifact or session-only note
|
|
572
|
+
weave-explore stress-test product requirements and PRD readiness
|
|
573
|
+
weave-prd generate or revise a PRD from the active exploration
|
|
574
|
+
weave-architect generate or revise engineering architecture from the active PRD
|
|
575
|
+
weave-next answer what to do next for the active change
|
|
576
|
+
weave-clarify clarify an existing exploration, PRD, or architecture artifact
|
|
577
|
+
weave-issues create or reconcile local tasks.md implementation tasks (T#), QA findings (QF#), and refactors (R#)
|
|
578
|
+
weave-knowledge update current-state knowledge specs for an active change
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
Every bundled skill carries a `# Surface Weave Notices` section telling the agent to forward any non-empty `notices` array from Tier 1 commands to the user verbatim, near the top of its response. The notice-surfacing block is byte-identical across all skills.
|
|
582
|
+
|
|
583
|
+
Install them for one agent:
|
|
584
|
+
|
|
585
|
+
```bash
|
|
586
|
+
weave agent install claude
|
|
587
|
+
weave agent install cursor
|
|
588
|
+
weave agent install codex
|
|
589
|
+
weave agent install opencode
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
Or install every supported integration:
|
|
593
|
+
|
|
594
|
+
```bash
|
|
595
|
+
weave agent install all
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
Install targets:
|
|
599
|
+
|
|
600
|
+
```text
|
|
601
|
+
claude .claude/skills/<skill>/SKILL.md
|
|
602
|
+
cursor .agents/skills/<skill>/SKILL.md
|
|
603
|
+
codex .agents/skills/<skill>/SKILL.md
|
|
604
|
+
opencode .agents/skills/<skill>/SKILL.md
|
|
605
|
+
opencode .opencode/commands/<skill>.md
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### Claude Code
|
|
609
|
+
|
|
610
|
+
Install:
|
|
611
|
+
|
|
612
|
+
```bash
|
|
613
|
+
weave agent install claude
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
Then start Claude Code in the repo and ask:
|
|
617
|
+
|
|
618
|
+
```text
|
|
619
|
+
/weave-new "Analytics of reviews"
|
|
620
|
+
/weave-capture
|
|
621
|
+
/weave-capture session
|
|
622
|
+
/weave-capture session prd
|
|
623
|
+
/weave-explore "Analytics of reviews"
|
|
624
|
+
/weave-prd
|
|
625
|
+
/weave-architect
|
|
626
|
+
/weave-next
|
|
627
|
+
/weave-clarify prd
|
|
628
|
+
/weave-issues "Create local tasks.md from the active PRD"
|
|
629
|
+
/weave-knowledge
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
### Cursor
|
|
633
|
+
|
|
634
|
+
Install:
|
|
635
|
+
|
|
636
|
+
```bash
|
|
637
|
+
weave agent install cursor
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
Then ask Cursor Agent from the repo:
|
|
641
|
+
|
|
642
|
+
```text
|
|
643
|
+
/weave-new "Analytics of reviews"
|
|
644
|
+
/weave-capture
|
|
645
|
+
/weave-capture session
|
|
646
|
+
/weave-capture session prd
|
|
647
|
+
/weave-explore "Analytics of reviews"
|
|
648
|
+
/weave-prd
|
|
649
|
+
/weave-architect
|
|
650
|
+
/weave-next
|
|
651
|
+
/weave-clarify prd
|
|
652
|
+
/weave-issues "Create local tasks.md from the active PRD"
|
|
653
|
+
/weave-knowledge
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
### Codex
|
|
657
|
+
|
|
658
|
+
Install:
|
|
659
|
+
|
|
660
|
+
```bash
|
|
661
|
+
weave agent install codex
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
Then ask Codex from the repo:
|
|
665
|
+
|
|
666
|
+
```text
|
|
667
|
+
$weave-new "Analytics of reviews"
|
|
668
|
+
$weave-capture
|
|
669
|
+
$weave-capture session
|
|
670
|
+
$weave-capture session prd
|
|
671
|
+
$weave-explore "Analytics of reviews"
|
|
672
|
+
$weave-prd
|
|
673
|
+
$weave-architect
|
|
674
|
+
$weave-next
|
|
675
|
+
$weave-clarify prd
|
|
676
|
+
$weave-issues "Create local tasks.md from the active PRD"
|
|
677
|
+
$weave-knowledge
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### opencode
|
|
681
|
+
|
|
682
|
+
Install:
|
|
683
|
+
|
|
684
|
+
```bash
|
|
685
|
+
weave agent install opencode
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
Then invoke the slash command in opencode:
|
|
689
|
+
|
|
690
|
+
```text
|
|
691
|
+
/weave-new "Analytics of reviews"
|
|
692
|
+
/weave-capture
|
|
693
|
+
/weave-capture session
|
|
694
|
+
/weave-capture session prd
|
|
695
|
+
/weave-explore "Analytics of reviews"
|
|
696
|
+
/weave-prd
|
|
697
|
+
/weave-architect
|
|
698
|
+
/weave-next
|
|
699
|
+
/weave-clarify prd
|
|
700
|
+
/weave-issues "Create local tasks.md from the active PRD"
|
|
701
|
+
/weave-knowledge
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
Or invoke the skill naturally:
|
|
705
|
+
|
|
706
|
+
```text
|
|
707
|
+
Use the weave-explore skill for Analytics of reviews.
|
|
708
|
+
Use the weave-capture skill to capture this session without updating artifacts.
|
|
709
|
+
Use the weave-prd skill to generate the PRD.
|
|
710
|
+
Use the weave-architect skill to generate the engineering design.
|
|
711
|
+
Use the weave-next skill to decide what to run next.
|
|
712
|
+
Use the weave-clarify skill to revise the active PRD after scope changes.
|
|
713
|
+
Use the weave-knowledge skill to update current-state knowledge after the change.
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
Bare `weave-capture` writes a structured session note, promotes pending lane session context, and merges durable content into the current live artifact. If the live artifact is missing, bare capture considers all matching lane session notes; if the artifact exists, it considers matching session notes newer than the artifact `updated_at` timestamp. `weave-capture session` writes only a lane-aware session note using the current artifact context, and `weave-capture session prd` or another explicit lane stores the note under that lane without updating live artifacts. Downstream skills keep using live artifacts as canonical context in v1; they do not scan pending session notes before running.
|
|
717
|
+
|
|
718
|
+
`weave-next` is read-only and advisory. It summarizes the active change, artifact state, current artifact context, and recent resume notes, then recommends the next Weave skill without writing artifacts or invoking the recommendation automatically.
|
|
719
|
+
|
|
720
|
+
`weave-clarify` is for refining an existing change artifact when scope, requirements, assumptions, or decisions change midstream. It updates one selected artifact at a time, such as `exploration.md`, `prd.md`, legacy `architecture.md`, or folder-mode `architecture/index.md` plus architecture facets, and reports follow-up artifacts that should be clarified separately. Use `weave-prd` and `weave-architect` for initial design work; use `weave-capture` to persist architecture discussions and `weave-clarify` when an existing artifact needs a focused amendment or architecture facet restructure.
|
|
721
|
+
|
|
722
|
+
`weave-knowledge` updates current-state behavioral specs under `wiki/knowledge/**` and writes change-local provenance to `wiki/changes/<change-id>/knowledge-delta.md`. It creates missing standard knowledge files when needed, but does not silently reorganize user-authored knowledge.
|
|
723
|
+
|
|
724
|
+
Knowledge freshness is tracked through the CLI-owned lifecycle command:
|
|
725
|
+
|
|
726
|
+
```bash
|
|
727
|
+
weave change knowledge pending --reason "Knowledge impact not resolved yet"
|
|
728
|
+
weave change knowledge updated --domain performance-reviews --shared approvals --file wiki/knowledge/domains/performance-reviews/domain-wide/approvals.md --delta wiki/changes/<change-id>/knowledge-delta.md --reason "Updated current approval behavior"
|
|
729
|
+
weave change knowledge none --delta wiki/changes/<change-id>/knowledge-delta.md --reason "No durable behavior impact"
|
|
730
|
+
weave change knowledge stale --invalidated-by prd --reason "PRD changed after knowledge was updated"
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
`weave change knowledge <status>` supports `pending`, `stale`, `updated`, and `none`, plus repeatable `--domain`, `--shared`, and `--file` flags and optional `--delta`, `--reason`, `--invalidated-by`, and `--json`.
|
|
734
|
+
|
|
735
|
+
The standard knowledge structure is scaffolded progressively:
|
|
736
|
+
|
|
737
|
+
```text
|
|
738
|
+
wiki/knowledge/
|
|
739
|
+
index.md
|
|
740
|
+
README.md
|
|
741
|
+
domains/
|
|
742
|
+
README.md
|
|
743
|
+
<domain>/
|
|
744
|
+
index.md
|
|
745
|
+
features/<feature>/behavior.md
|
|
746
|
+
domain-wide/
|
|
747
|
+
source-map.md
|
|
748
|
+
shared/
|
|
749
|
+
README.md
|
|
750
|
+
<shared-behavior>/behavior.md
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
V1 provides scaffold/docs guidance and skill contract tests for this structure. It does not add a CLI validation command for knowledge folders.
|
|
754
|
+
|
|
755
|
+
Claude Code, Cursor, and opencode use slash commands such as `/weave-explore`, `/weave-prd`, `/weave-architect`, `/weave-next`, `/weave-clarify`, and `/weave-knowledge`. Codex uses `$weave-explore`, `$weave-prd`, `$weave-architect`, `$weave-next`, `$weave-clarify`, and `$weave-knowledge` to explicitly invoke installed skills. opencode gets small slash-command wrappers that delegate to the portable skills in `.agents/skills`; Weave does not install `.opencode/skills` by default.
|
|
756
|
+
|
|
757
|
+
## `weave skills` and `weave skill`
|
|
758
|
+
|
|
759
|
+
Lists and prints bundled Weave skills.
|
|
760
|
+
|
|
761
|
+
```bash
|
|
762
|
+
weave skills list
|
|
763
|
+
weave skill show weave-new
|
|
764
|
+
weave skill show weave-explore
|
|
765
|
+
weave skill show weave-prd
|
|
766
|
+
weave skill show weave-architect
|
|
767
|
+
weave skill show weave-next
|
|
768
|
+
weave skill show weave-clarify
|
|
769
|
+
weave skill show weave-issues
|
|
770
|
+
weave skill show weave-knowledge
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
## Project Structure
|
|
774
|
+
|
|
775
|
+
```text
|
|
776
|
+
src/
|
|
777
|
+
cli.ts
|
|
778
|
+
commands/
|
|
779
|
+
add.ts
|
|
780
|
+
agent.ts
|
|
781
|
+
change.ts
|
|
782
|
+
init.ts
|
|
783
|
+
skills.ts
|
|
784
|
+
workspace.ts
|
|
785
|
+
lib/
|
|
786
|
+
add-folder.ts
|
|
787
|
+
agent-skills.ts
|
|
788
|
+
changes.ts
|
|
789
|
+
files.ts
|
|
790
|
+
folders.ts
|
|
791
|
+
git.ts
|
|
792
|
+
ids.ts
|
|
793
|
+
init-workspace.ts
|
|
794
|
+
session-state.ts
|
|
795
|
+
show-workspace.ts
|
|
796
|
+
sync.ts
|
|
797
|
+
weave-scaffold.ts
|
|
798
|
+
templates/
|
|
799
|
+
opencode/
|
|
800
|
+
commands/
|
|
801
|
+
skills/
|
|
802
|
+
tests/
|
|
803
|
+
agent-skills.test.ts
|
|
804
|
+
cli-skills.test.ts
|
|
805
|
+
changes.test.ts
|
|
806
|
+
init.test.ts
|
|
807
|
+
.weave/
|
|
808
|
+
agents.yml
|
|
809
|
+
sync.yml
|
|
810
|
+
wiki/
|
|
811
|
+
knowledge/
|
|
812
|
+
changes/
|
|
813
|
+
weave-it/
|
|
814
|
+
implementation-plan.md
|
|
815
|
+
opencode-skills-implementation-plan.md
|
|
816
|
+
skills-implementation-plan.md
|
|
817
|
+
weave-init-v1.md
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
## Contribution Notes
|
|
821
|
+
|
|
822
|
+
- Keep changes small and focused.
|
|
823
|
+
- Add or update tests for behavior changes.
|
|
824
|
+
- Do not commit `node_modules/`, `dist/`, coverage output, or local machine state.
|
|
825
|
+
- Source files use ESM imports with `.js` specifiers because TypeScript is configured with `NodeNext` module resolution.
|
|
826
|
+
- Use `apply_patch` or normal editor changes for source edits, then run typecheck, tests, and build.
|
|
827
|
+
|
|
828
|
+
## Releasing
|
|
829
|
+
|
|
830
|
+
Releases are cut manually by a maintainer with npm publish access and push access to the repo. Each release is a single `npm version` bump that also stamps skill versions, followed by a push and publish.
|
|
831
|
+
|
|
832
|
+
1. Ensure the working tree is clean and all prep is committed.
|
|
833
|
+
2. Choose the bump level and create the version commit and tag in one step. The committed `.npmrc` (`tag-version-prefix=""`) produces bare-number tags such as `1.0.0`, not `v1.0.0`:
|
|
834
|
+
|
|
835
|
+
```bash
|
|
836
|
+
npm version <patch|minor|major> --message "release: %s"
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
This bumps `version` in `package.json`, runs the `version` lifecycle hook (which stamps `last_changed_in` on every skill changed since the previous tag and stages `templates/skills`), creates one commit `release: <version>`, and creates the matching bare git tag.
|
|
840
|
+
|
|
841
|
+
3. Push the commit and the tag:
|
|
842
|
+
|
|
843
|
+
```bash
|
|
844
|
+
git push --follow-tags
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
4. Publish to npm. The `prepublishOnly` hook runs typecheck, tests, and build before anything is uploaded, so a failing gate aborts the publish:
|
|
848
|
+
|
|
849
|
+
```bash
|
|
850
|
+
npm publish
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
5. Verify the release:
|
|
854
|
+
|
|
855
|
+
```bash
|
|
856
|
+
npm view @weave-tools/weave-it
|
|
857
|
+
npm install -g @weave-tools/weave-it && weave --help
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
6. Optionally refresh this clone's own installed skill copies so local dogfooding matches what shipped:
|
|
861
|
+
|
|
862
|
+
```bash
|
|
863
|
+
weave agent update --all
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
## License
|
|
867
|
+
|
|
868
|
+
This project is licensed under the MIT License. See [LICENSE](./LICENSE) for the full text.
|