@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.
Files changed (34) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +868 -0
  3. package/dist/cli.d.ts +5 -0
  4. package/dist/cli.js +4538 -0
  5. package/dist/cli.js.map +1 -0
  6. package/package.json +65 -0
  7. package/templates/opencode/commands/weave-architect.md +7 -0
  8. package/templates/opencode/commands/weave-capture.md +7 -0
  9. package/templates/opencode/commands/weave-clarify.md +7 -0
  10. package/templates/opencode/commands/weave-execute.md +7 -0
  11. package/templates/opencode/commands/weave-explore.md +7 -0
  12. package/templates/opencode/commands/weave-issues.md +7 -0
  13. package/templates/opencode/commands/weave-knowledge.md +7 -0
  14. package/templates/opencode/commands/weave-new.md +7 -0
  15. package/templates/opencode/commands/weave-next.md +7 -0
  16. package/templates/opencode/commands/weave-prd.md +7 -0
  17. package/templates/opencode/commands/weave-prepare.md +7 -0
  18. package/templates/skills/weave-architect/SKILL.md +291 -0
  19. package/templates/skills/weave-architect/api-contract-template.md +21 -0
  20. package/templates/skills/weave-architect/frontend-backend-template.md +21 -0
  21. package/templates/skills/weave-architect/index-template.md +24 -0
  22. package/templates/skills/weave-architect/schema-template.md +21 -0
  23. package/templates/skills/weave-capture/SKILL.md +398 -0
  24. package/templates/skills/weave-clarify/SKILL.md +513 -0
  25. package/templates/skills/weave-execute/SKILL.md +215 -0
  26. package/templates/skills/weave-explore/SKILL.md +434 -0
  27. package/templates/skills/weave-issues/SKILL.md +441 -0
  28. package/templates/skills/weave-knowledge/SKILL.md +161 -0
  29. package/templates/skills/weave-knowledge/knowledge-templates.md +63 -0
  30. package/templates/skills/weave-new/SKILL.md +76 -0
  31. package/templates/skills/weave-next/SKILL.md +216 -0
  32. package/templates/skills/weave-prd/SKILL.md +419 -0
  33. package/templates/skills/weave-prd/prd-template.md +186 -0
  34. package/templates/skills/weave-prepare/SKILL.md +94 -0
@@ -0,0 +1,441 @@
1
+ ---
2
+ name: weave-issues
3
+ description: Break an architecture, implementation plan, spec, PRD, or referenced context into local implementation tasks in tasks.md using tracer-bullet vertical slices.
4
+ last_changed_in: 0.1.0
5
+ ---
6
+
7
+ # To Local Tasks
8
+
9
+ Break a plan into independently-grabbable local tasks using vertical slices (tracer bullets).
10
+
11
+ `weave-issues` creates or reconciles:
12
+
13
+ ```text
14
+ wiki/changes/<change-id>/tasks.md
15
+ ```
16
+
17
+ It does not publish, close, comment on, label, or otherwise mutate external issue trackers. External issue URLs, issue numbers, and local paths may be used as read-only source context only.
18
+
19
+ ## Process
20
+
21
+ ### 1. Gather Context
22
+
23
+ Work from whatever is already in the conversation context. If the user passes an issue reference, URL, issue number, or local path as an argument, read it as source context when available. Do not mutate the referenced tracker item or file.
24
+
25
+ If the user invokes `weave-issues <scope>`, treat `<scope>` as a free-form planning and ownership label for this run.
26
+
27
+ Common examples are `backend`, `frontend`, and `full-stack`, but do not enforce a fixed taxonomy. Preserve the user's language unless it is ambiguous.
28
+
29
+ Scope is not a repo name, architecture facet name, technical layer, lifecycle lane, or artifact target. `weave-issues backend` means generate or reconcile backend-owned tracer-bullet implementation slices using all relevant source context. `weave-issues frontend` means generate or reconcile frontend-owned tracer-bullet implementation slices using all relevant source context.
30
+
31
+ A scoped run may still propose `Scope: full-stack` tasks when the smallest independently verifiable behavior crosses backend and frontend boundaries. Do not force a naturally full-stack behavior into fake backend-only or frontend-only tasks.
32
+
33
+ For a Weave change, prefer durable change artifacts before drafting tasks:
34
+
35
+ - Read `wiki/changes/<change-id>/prd.md` as the product contract when present.
36
+ - Read the architecture artifact as the engineering design when present: legacy `wiki/changes/<change-id>/architecture.md` or folder-mode `wiki/changes/<change-id>/architecture/index.md` plus direct child `architecture/*.md` facets.
37
+ - Read `wiki/changes/<change-id>/status.yml` when present to check stale lifecycle state.
38
+ - Read existing `wiki/changes/<change-id>/tasks.md` when present so reruns can reconcile instead of replacing blindly.
39
+ - If both PRD and architecture exist, use `prd.md` for user behavior and acceptance, and the architecture artifact for technical sequencing, affected systems, risks, rollout, observability, and testing strategy.
40
+ - If `status.yml.stale.architecture` exists, warn that architecture is stale from its recorded sources and ask for explicit confirmation before creating or reconciling tasks. If the user does not explicitly confirm, stop and recommend `weave-architect`.
41
+ - Do not assume architecture is stale merely because `prd.md` changed; rely on source-aware stale state in `status.yml`.
42
+
43
+ When a scope is provided, still read all source context relevant to that scoped ownership boundary. Do not read only a same-named architecture facet and do not assume the scope is a repo selector. For example, `weave-issues backend` may need `architecture/backend.md`, `architecture/frontend.md`, `architecture/api-contract.md`, `architecture/index.md`, repo docs, and existing frontend or full-stack tasks to detect coordination needs or conflicts.
44
+
45
+ Task generation may use any sufficiently concrete plan or context, including PRD, architecture, implementation plan, spec, sessions, discussion, codebase findings, local paths, or external issue references.
46
+
47
+ PRD and architecture are optional sources, not prerequisites. When either exists, `weave-issues` acts as a downstream consistency gate:
48
+
49
+ - Verify generated tasks cover all concrete PRD use cases, acceptance criteria, non-goals, and edge cases that are relevant to implementation.
50
+ - Verify generated tasks cover architecture decisions, facet-specific responsibilities, rollout, data migration, API contracts, observability, testing, and risks that require implementation work.
51
+ - Verify PRD and architecture are mutually coherent. If they conflict, stop before writing tasks and ask the user whether to clarify PRD or architecture first.
52
+ - If architecture folder mode exists, review `architecture/index.md` and each substantive facet file; do not only read the index.
53
+ - Include a `## Coverage Review` section in `tasks.md` summarizing PRD coverage, architecture coverage, and PRD/Architecture sync. If a source is absent, state that it was absent instead of treating that as a blocker.
54
+
55
+ ### 2. Explore The Codebase
56
+
57
+ Explore the codebase enough to understand current implementation conventions before drafting tasks. Issue titles and task descriptions should use the project's domain glossary vocabulary and respect ADRs in the area being touched.
58
+
59
+ In workspace mode, use registered `repos[]` as implementation-location evidence, not as separate task artifact targets. For repos that appear relevant to the requested scope or source context, identify:
60
+
61
+ - repo id or name
62
+ - repo kind when known
63
+ - likely code anchors
64
+ - likely test or verification anchors
65
+ - which task scope(s) the repo appears relevant to
66
+
67
+ Do not create per-repo task files. The only task artifact remains `wiki/changes/<change-id>/tasks.md`.
68
+
69
+ Also inspect testing conventions:
70
+
71
+ - package scripts or documented test commands
72
+ - test directories and file naming
73
+ - existing test helpers or fixtures
74
+ - manual, smoke, or build verification conventions
75
+
76
+ If a usable automated test base exists, code-affecting tasks should include relevant automated test expectations and verification commands. If no usable automated test base exists, missing tests should not block task generation by itself; include explicit manual or smoke verification expectations instead.
77
+
78
+ Do not require strict test-first TDD wording. Preserve vertical-slice completeness by making each task verifiable in the way that fits the repo.
79
+
80
+ ### 3. Classify Discovered Work
81
+
82
+ Within an active change, `tasks.md` section selection is driven by the category of each discovered work item, not by the change's declared `status.yml.type`. `T#` implementation tasks remain the backbone. Classify each work item before drafting it:
83
+
84
+ - A defect observed during the change becomes a `QF#` entry in the `## QA Findings` section.
85
+ - Structural cleanup with no observable behavior change becomes an `R#` entry in the `## Refactors` section.
86
+ - Everything else (planned work, chore, perf, docs, tech-debt, etc.) becomes a `T#` task, optionally tagged via `Origin`.
87
+
88
+ `QF#` and `R#` are observation-style records: they capture why and what, and link to the `T#` task(s) that carry the work out. An `R#` may be logged-but-deferred without a `T#` yet. `weave-issues` does not impose special refactor routing or escalation; the user decides whether to escalate a refactor or split it into its own change.
89
+
90
+ ### 4. Draft Vertical-Slice Tasks
91
+
92
+ Break the plan into **tracer bullet** tasks. Each task is a thin vertical slice that cuts through all relevant integration layers end-to-end, not a horizontal slice of one layer.
93
+
94
+ Scoped tasks must remain tracer bullets. A scope narrows planning ownership; it does not permit horizontal layer tasks.
95
+
96
+ Bad backend slices:
97
+
98
+ - Add database table
99
+ - Add service method
100
+ - Add endpoint
101
+
102
+ Good backend slice:
103
+
104
+ - Allow API consumers to create pending workspace invitations
105
+
106
+ Bad frontend slices:
107
+
108
+ - Add component
109
+ - Add route
110
+ - Wire API client
111
+
112
+ Good frontend slice:
113
+
114
+ - Let admins submit workspace invitations from settings
115
+
116
+ Good full-stack slice:
117
+
118
+ - Let admins create a pending workspace invitation from workspace settings
119
+
120
+ DB work usually belongs inside the relevant backend-owned behavior slice. Mobile work may use the team's normal frontend/client scope language. Contract and API boundary work should usually be captured as `Coordination` on the relevant task unless the user naturally provides a separate scope label.
121
+
122
+ Slices may be `HITL` or `AFK`. HITL slices require human interaction, such as an architectural decision or a design review. AFK slices can be implemented and merged without human interaction. Prefer AFK over HITL where possible.
123
+
124
+ <vertical-slice-rules>
125
+ - Each slice delivers a narrow but complete path through the relevant layers.
126
+ - Each slice is demoable or verifiable on its own.
127
+ - Prefer many thin slices over a few thick ones.
128
+ - Include automated test expectations when a usable test base exists.
129
+ - Include manual or smoke verification when automated tests are unavailable.
130
+ </vertical-slice-rules>
131
+
132
+ Generated tasks start as `todo` unless a real blocker is already known. Do not assign `not_tested` during task generation; implementers apply `not_tested` later if implementation appears complete but automated verification could not be completed.
133
+
134
+ ### 5. Quiz The User
135
+
136
+ Present the proposed breakdown as a numbered list before writing `tasks.md`. For each slice, show:
137
+
138
+ - **Title**: short descriptive name
139
+ - **Type**: HITL / AFK
140
+ - **Scope**: backend, frontend, full-stack, or the user-provided label
141
+ - **Primary repo**: main implementation location, or `workspace` / `None` when not repo-specific
142
+ - **Repos**: all repos expected to be touched, or `None`
143
+ - **Architecture refs**: architecture files or facets that explain the task, when known
144
+ - **Blocked by**: which other slices, if any, must complete first
145
+ - **User stories covered**: which user stories this addresses, if the source material has them
146
+ - **Repo-local or full-stack**: whether the slice is contained in one repo/scope or crosses repos/scopes
147
+
148
+ Ask the user:
149
+
150
+ - Does the granularity feel right? (too coarse / too fine)
151
+ - Are the dependency relationships correct?
152
+ - Should any slices be merged or split further?
153
+ - Are the correct slices marked as HITL and AFK?
154
+ - Are the scopes and repo mappings correct?
155
+ - Should any backend/frontend scoped task become full-stack, or vice versa?
156
+ - Are any repo/code anchors missing or misleading?
157
+
158
+ Iterate until the user approves the breakdown.
159
+
160
+ ### 6. Write Or Reconcile Local `tasks.md`
161
+
162
+ After the user approves, create or reconcile:
163
+
164
+ ```text
165
+ wiki/changes/<change-id>/tasks.md
166
+ ```
167
+
168
+ Do not create `issues.md`.
169
+
170
+ If `tasks.md` does not exist, create it using the canonical shape below.
171
+
172
+ If `tasks.md` already exists:
173
+
174
+ - read the current task file and current source context
175
+ - propose a reconciliation summary before writing
176
+ - preserve statuses and checked acceptance criteria when task intent still maps cleanly
177
+ - keep stable IDs for unchanged task intent
178
+ - assign new IDs to new tasks
179
+ - do not reuse invalidated task IDs
180
+ - mark obsolete tasks as `invalid` instead of deleting them
181
+ - remove invalid tasks from the active task index
182
+ - list invalid tasks in a separate `## Invalid Tasks` section with reasons
183
+ - write only after explicit user approval
184
+
185
+ If `tasks.md` already exists and the user invoked a scope:
186
+
187
+ - read the existing `tasks.md` before drafting
188
+ - preserve unrelated scope tasks unless the current scope reveals a direct conflict
189
+ - reconcile tasks in the requested scope
190
+ - preserve stable IDs when task intent still maps cleanly
191
+ - preserve statuses and checked acceptance criteria when intent still maps cleanly
192
+ - add new scoped tasks with new IDs
193
+ - mark obsolete tasks in the requested scope as `invalid` rather than deleting them
194
+ - do not reuse invalidated task IDs
195
+ - if a scoped run discovers a genuinely cross-backend/frontend behavior, propose a `Scope: full-stack` task instead of forcing it into backend-only or frontend-only tasks
196
+ - if the scoped plan conflicts with another scope's existing task or architecture assumption, stop before writing and ask whether to clarify PRD or architecture first
197
+
198
+ Do not create `tasks/<repo>/tasks.md`, per-repo task artifacts, per-repo task statuses inside `Repo Involvement`, or rigid scope legends. Do not split a tracer bullet into backend/frontend tasks merely because multiple repos are involved. Split only when each resulting task is independently meaningful and verifiable.
199
+
200
+ Append-first, preview-before-write, and stable-ID reconciliation apply to `QF#` and `R#` entries the same way they apply to `T#` tasks. `T#`, `QF#`, and `R#` use independent ID namespaces; do not reuse invalidated IDs across any of them. A deferred `R#` may exist without a `T#` task.
201
+
202
+ <tasks-template>
203
+ ---
204
+ artifact: tasks
205
+ status: draft
206
+ owner: engineering
207
+ created_at: <YYYY-MM-DDTHH:mm:ss.sssZ>
208
+ updated_at: <YYYY-MM-DDTHH:mm:ss.sssZ>
209
+ source: <primary-source>
210
+ ---
211
+
212
+ # Tasks: <Change Title>
213
+
214
+ ## Source Context
215
+
216
+ - PRD: `<path>` when used
217
+ - Architecture: `<path>` when used
218
+ - Sessions: `<path>` when used
219
+ - Codebase: `<summary or path>` when used
220
+ - External references: `<url or issue number>` when used as read-only context
221
+ - Local references: `<path>` when used as source context
222
+
223
+ ## Local Tracking Status
224
+
225
+ External issue publishing status: not used. This change tracks implementation locally in this file.
226
+
227
+ ## Status Legend
228
+
229
+ - `todo`: ready to pick up when blockers are done
230
+ - `in_progress`: currently being implemented
231
+ - `blocked`: cannot proceed without the listed blocker or decision
232
+ - `done`: implemented and verified
233
+ - `not_tested`: implementation appears complete, but automated verification could not be completed
234
+ - `invalid`: no longer applies after source context changed
235
+
236
+ ## Active Task Index
237
+
238
+ | ID | Status | Type | Scope | Primary repo | Repos | Title | Blocked by |
239
+ | --- | --- | --- | --- | --- | --- | --- | --- |
240
+ | T1 | todo | AFK | <scope> | <repo or workspace> | <repos or None> | <title> | None |
241
+
242
+ ## T1: <Title>
243
+
244
+ Status: todo
245
+
246
+ Type: AFK
247
+
248
+ Scope: <backend | frontend | full-stack | user-provided label>
249
+
250
+ Primary repo: <repo id or workspace>
251
+
252
+ Repos: <repo ids, or None>
253
+
254
+ Architecture refs: <relevant architecture files/facets, or None>
255
+
256
+ Coordination: <none or concrete cross-scope note>
257
+
258
+ Blocked by: None - can start immediately
259
+
260
+ User stories covered: <ids or None>
261
+
262
+ Origin: <none | qa_finding | refactor>
263
+
264
+ Related finding: <none | QF# | R#>
265
+
266
+ ### What to build
267
+
268
+ Describe the end-to-end behavior for this vertical slice. Avoid layer-by-layer implementation unless the source material requires it.
269
+
270
+ ### Repo Involvement
271
+
272
+ Include this section for multi-repo tasks or when implementation location would otherwise be ambiguous. Omit it for obvious single-repo tasks.
273
+
274
+ | Repo | Scope | Role | Likely code anchors | Test/verification anchors |
275
+ | --- | --- | --- | --- | --- |
276
+ | <repo> | <scope> | <what this repo contributes to the behavior> | <paths or "inspect repo docs/code"> | <tests/checks or "inspect repo test conventions"> |
277
+
278
+ `Repo Involvement` is implementation guidance only; it is not subtask tracking and must not include per-repo statuses.
279
+
280
+ ### Acceptance Criteria
281
+
282
+ - [ ] Criterion 1
283
+ - [ ] Criterion 2
284
+ - [ ] Criterion 3
285
+
286
+ ### Verification
287
+
288
+ - Automated tests: <command and expectation, or "not available; no usable test base found">
289
+ - Manual/smoke check: <expected check when relevant>
290
+
291
+ ## QA Findings
292
+
293
+ Finding Status Legend:
294
+
295
+ - `new`: reported but not yet triaged
296
+ - `accepted`: triaged and accepted as a real defect
297
+ - `fixed`: implementation believed to address the defect
298
+ - `verified`: fix confirmed by re-test
299
+ - `duplicate`: already covered by another finding
300
+ - `not_reproducible`: could not be reproduced
301
+ - `out_of_scope`: real but not part of this change
302
+ - `invalid`: no longer applies after source context changed
303
+
304
+ | ID | Status | Severity | Source | Related Task | Summary |
305
+ | --- | --- | --- | --- | --- | --- |
306
+
307
+ None.
308
+
309
+ ## Refactors
310
+
311
+ Refactor Status Legend:
312
+
313
+ - `proposed`: identified but not yet accepted
314
+ - `accepted`: agreed to do as part of this change
315
+ - `deferred`: logged for later; no `T#` yet
316
+ - `done`: completed and verified behavior-preserving
317
+ - `out_of_scope`: real but not part of this change
318
+ - `invalid`: no longer applies after source context changed
319
+
320
+ | ID | Status | Scope | Related Tasks | Summary |
321
+ | --- | --- | --- | --- | --- |
322
+
323
+ None.
324
+
325
+ ## Invalid Tasks
326
+
327
+ None.
328
+
329
+ ## Verification
330
+
331
+ Not run yet.
332
+ </tasks-template>
333
+
334
+ ### 7. Record Lifecycle Progress
335
+
336
+ After local tasks are successfully created or reconciled, run lifecycle progress for the `issues` lane with the existing source IDs that actually informed `tasks.md`.
337
+
338
+ Supported source IDs are:
339
+
340
+ ```text
341
+ exploration
342
+ prd
343
+ architecture
344
+ discussion
345
+ sessions
346
+ codebase
347
+ ```
348
+
349
+ Examples:
350
+
351
+ ```bash
352
+ weave change progress issues --source architecture --json
353
+ weave change progress issues --source prd --source codebase --json
354
+ weave change progress issues --source discussion --source sessions --json
355
+ ```
356
+
357
+ Do not use unsupported source IDs such as `external`, `reference`, or `local_path`. Concrete external issue references and local paths belong in the `## Source Context` section of `tasks.md`.
358
+
359
+ If lifecycle progress fails, do not recreate tasks just to recover. Report the progress failure so the user can rerun the command or inspect `status.yml`.
360
+
361
+ ---
362
+
363
+ # Silent Weave Command Output
364
+
365
+ Weave skills run Weave CLI commands silently by default. Use command results
366
+ as internal context, not response content.
367
+
368
+ Do not show raw stdout, JSON payloads, command echoes, lifecycle payloads,
369
+ internal state-write confirmations, or verbatim notice text unless the user
370
+ explicitly asks for diagnostic output.
371
+
372
+ Surface only information that changes what the user or agent should do next:
373
+ blockers, failures, missing relevant repos, branch or task outcomes,
374
+ lifecycle failures, package-outdated notices, relevant outdated or modified
375
+ skills, and user-required actions.
376
+
377
+ Notice handling:
378
+
379
+ - `package_outdated`: show only when present. Say exactly:
380
+ `A newer Weave version is available. Run \`weave status\` for details, then upgrade Weave when convenient.`
381
+ - `skills_outdated`: suppress unrelated skills. If the invoked skill is outdated, say:
382
+ `The installed \`<skill-name>\` skill appears older than the bundled template. Run \`weave status\` for details, then \`weave agent update --all\` when you want to refresh installed skills.`
383
+ - `skills_outdated`: if multiple skills used in this workflow are outdated, say:
384
+ `Some installed skills used in this workflow appear older than the bundled templates: \`<skill-a>\`, \`<skill-b>\`. Run \`weave status\` for details, then \`weave agent update --all\` when you want to refresh them.`
385
+ - `skills_modified`: suppress unless the invoked skill is modified locally or the user is asking about skill updates. If the invoked skill is modified, say:
386
+ `The installed \`<skill-name>\` skill has local edits, so its behavior may differ from the bundled template. Run \`weave status\` or \`weave agent diff\` if you want to inspect the difference.`
387
+ - `skills_modified`: if the user asks to update skills and installed skills have local edits, say:
388
+ `Some installed skills have local edits. \`weave agent update\` may skip or protect them; run \`weave status\` or \`weave agent diff\` before updating.`
389
+
390
+ Do not say `Notices: ...`, `The command returned notices`, raw
391
+ `notices[].message`, full notice JSON, or full skill lists unless the user
392
+ asks for diagnostics.
393
+
394
+ ---
395
+
396
+ # Lifecycle Staleness Verification
397
+
398
+ Before calling `weave change progress`, verify content-sync of every artifact
399
+ that would otherwise be marked stale by the default pessimistic propagation.
400
+
401
+ The `--source` arguments of `weave change progress` declare causal influence,
402
+ not strict-DAG dependency. Pessimistic staleness propagation is the safe default,
403
+ not the only correct answer. When the clarification this skill just performed is
404
+ narrowly contained (a typo fix, a sentence rewording, an open-question
405
+ resolution), dependents may already be in content sync; flagging them stale
406
+ creates churn the user did not ask for.
407
+
408
+ Procedure:
409
+
410
+ 1. Identify the set of structural dependents of the lane being progressed. Read
411
+ `wiki/changes/<change-id>/status.yml` and compute which lanes list this
412
+ lane in their `artifacts.<lane>.sources`.
413
+ 2. For each dependent lane, read both the dependent artifact and the artifact
414
+ just being progressed. Decide whether the change you just made invalidates
415
+ the dependent's content. The judgement is binary per lane: invalidates, or
416
+ does not invalidate.
417
+ 3. Select the appropriate progress invocation:
418
+
419
+ - Every dependent is invalidated (or there are no dependents):
420
+ `weave change progress <lane> --source <list> --json` (default, no new flags)
421
+ - No dependent is invalidated:
422
+ `weave change progress <lane> --source <list> --no-invalidate --json`
423
+ - Some dependents are invalidated, some are not:
424
+ `weave change progress <lane> --source <list> --invalidate=<comma-list> --json`
425
+
426
+ 4. If a previously-stale dependent is now in content sync (because the upstream
427
+ change has been absorbed but the stale flag still lingers from an earlier
428
+ pessimistic propagation), clear it explicitly:
429
+
430
+ `weave change clear-stale <lane> --reason "<one-sentence verification>" --json`
431
+
432
+ Always pass `--reason` so the audit entry in `stale_history` carries the
433
+ verification rationale. Do not clear flags without reading both artifacts.
434
+
435
+ 5. Never edit `status.yml` by hand to manipulate stale state. Use the CLI.
436
+
437
+ Failure mode: if you are uncertain whether a dependent is in content sync,
438
+ prefer the pessimistic default (omit `--no-invalidate` and `--invalidate`).
439
+ The user can always run `weave-clarify <lane>` later. A false-positive stale
440
+ flag is recoverable; silently leaving a real downstream artifact mismatched is
441
+ not.
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: weave-knowledge
3
+ description: Update current-state Weave knowledge specs and change-local knowledge delta for an active change.
4
+ last_changed_in: 0.1.0
5
+ ---
6
+
7
+ # Weave Knowledge
8
+
9
+ Use this skill when the user wants to update the knowledge base after a completed change, bug fix, feature addition, removal, or behavior clarification.
10
+
11
+ Knowledge is current-state behavior. Historical provenance stays in `wiki/changes/**`.
12
+
13
+ # Behavior Rules
14
+
15
+ - Do not require Plan Mode.
16
+ - Do not create a new change unless the user explicitly asks for one.
17
+ - Do not hand-edit `status.yml`; use `weave change knowledge <status>`.
18
+ - Do not store raw transcripts.
19
+ - Do not silently move, rename, delete, or reorganize existing user-authored knowledge files.
20
+ - You may create missing standard folders and files when they are needed for the active knowledge update.
21
+ - Prefer current behavior over historical narrative.
22
+ - Keep source anchors specific enough for a future agent to verify behavior in code or tests.
23
+
24
+ # Resolve Context
25
+
26
+ Start by discovering the current Weave session and active change:
27
+
28
+ ```bash
29
+ weave workspace --json
30
+ weave change current --json
31
+ weave change status --json
32
+ ```
33
+
34
+ If no active change exists, stop and say:
35
+
36
+ ```text
37
+ No active Weave change found. Knowledge updates normally need change provenance. Start or switch a change, then run `weave-knowledge` again.
38
+ ```
39
+
40
+ # Read Context
41
+
42
+ For each active-change target, read:
43
+
44
+ ```text
45
+ wiki/changes/<change-id>/status.yml
46
+ wiki/changes/<change-id>/exploration.md
47
+ wiki/changes/<change-id>/prd.md
48
+ wiki/changes/<change-id>/architecture.md
49
+ wiki/changes/<change-id>/architecture/index.md
50
+ wiki/changes/<change-id>/architecture/*.md
51
+ wiki/changes/<change-id>/tasks.md
52
+ wiki/changes/<change-id>/sessions/*.md
53
+ ```
54
+
55
+ Architecture may be legacy file mode or folder mode. If `architecture/` exists, read `architecture/index.md` and direct child facet files as architecture context. If both `architecture.md` and `architecture/` exist, report the conflict and avoid treating either as the sole canonical architecture source.
56
+
57
+ Read relevant knowledge files when present:
58
+
59
+ ```text
60
+ wiki/knowledge/index.md
61
+ wiki/knowledge/README.md
62
+ wiki/knowledge/domains/**/index.md
63
+ wiki/knowledge/domains/**/features/**/behavior.md
64
+ wiki/knowledge/domains/**/domain-wide/**
65
+ wiki/knowledge/shared/**/behavior.md
66
+ wiki/knowledge/**/source-map.md
67
+ ```
68
+
69
+ Inspect source anchors, tests, config, jobs, and integrations only as needed to ground the behavior.
70
+
71
+ # Target Selection
72
+
73
+ Use `domains/` for product or system areas that users naturally name.
74
+
75
+ Use `features/` for independently understandable behavior inside a domain.
76
+
77
+ Use `domain-wide/` for behavior that coordinates multiple features inside one domain.
78
+
79
+ Use `shared/` for behavior reused across multiple domains.
80
+
81
+ If multiple targets are plausible, summarize the candidates and ask the user to choose before writing.
82
+
83
+ # Templates
84
+
85
+ Use the structures defined in `knowledge-templates.md` (sibling to this `SKILL.md`).
86
+
87
+ The template reference lives at `<agent-skills-dir>/weave-knowledge/knowledge-templates.md` after install. Read it as the canonical knowledge file structure when creating or revising knowledge artifacts. If the user has modified the template reference, follow the user's modified structures.
88
+
89
+ # Write Knowledge
90
+
91
+ Create or update:
92
+
93
+ ```text
94
+ wiki/changes/<change-id>/knowledge-delta.md
95
+ wiki/knowledge/**
96
+ ```
97
+
98
+ When there is durable behavior impact:
99
+
100
+ - update current-state specs under `wiki/knowledge/**`
101
+ - create or update `knowledge-delta.md`
102
+ - call `weave change knowledge updated`
103
+
104
+ Example:
105
+
106
+ ```bash
107
+ 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 review approval behavior." --json
108
+ ```
109
+
110
+ When there is no durable knowledge impact:
111
+
112
+ - write a no-impact rationale in `knowledge-delta.md`
113
+ - call `weave change knowledge none --delta wiki/changes/<change-id>/knowledge-delta.md --reason "<reason>" --json`
114
+
115
+ When knowledge impact cannot be resolved yet:
116
+
117
+ - explain the blocker
118
+ - call `weave change knowledge pending --reason "<reason>" --json` when useful
119
+
120
+ # Completion Response
121
+
122
+ Report:
123
+
124
+ ```text
125
+ Knowledge delta: wiki/changes/<change-id>/knowledge-delta.md
126
+ Knowledge files updated: <files or none>
127
+ Knowledge status: <pending|stale|updated|none>
128
+ ```
129
+
130
+ ---
131
+
132
+ # Silent Weave Command Output
133
+
134
+ Weave skills run Weave CLI commands silently by default. Use command results
135
+ as internal context, not response content.
136
+
137
+ Do not show raw stdout, JSON payloads, command echoes, lifecycle payloads,
138
+ internal state-write confirmations, or verbatim notice text unless the user
139
+ explicitly asks for diagnostic output.
140
+
141
+ Surface only information that changes what the user or agent should do next:
142
+ blockers, failures, missing relevant repos, branch or task outcomes,
143
+ lifecycle failures, package-outdated notices, relevant outdated or modified
144
+ skills, and user-required actions.
145
+
146
+ Notice handling:
147
+
148
+ - `package_outdated`: show only when present. Say exactly:
149
+ `A newer Weave version is available. Run \`weave status\` for details, then upgrade Weave when convenient.`
150
+ - `skills_outdated`: suppress unrelated skills. If the invoked skill is outdated, say:
151
+ `The installed \`<skill-name>\` skill appears older than the bundled template. Run \`weave status\` for details, then \`weave agent update --all\` when you want to refresh installed skills.`
152
+ - `skills_outdated`: if multiple skills used in this workflow are outdated, say:
153
+ `Some installed skills used in this workflow appear older than the bundled templates: \`<skill-a>\`, \`<skill-b>\`. Run \`weave status\` for details, then \`weave agent update --all\` when you want to refresh them.`
154
+ - `skills_modified`: suppress unless the invoked skill is modified locally or the user is asking about skill updates. If the invoked skill is modified, say:
155
+ `The installed \`<skill-name>\` skill has local edits, so its behavior may differ from the bundled template. Run \`weave status\` or \`weave agent diff\` if you want to inspect the difference.`
156
+ - `skills_modified`: if the user asks to update skills and installed skills have local edits, say:
157
+ `Some installed skills have local edits. \`weave agent update\` may skip or protect them; run \`weave status\` or \`weave agent diff\` before updating.`
158
+
159
+ Do not say `Notices: ...`, `The command returned notices`, raw
160
+ `notices[].message`, full notice JSON, or full skill lists unless the user
161
+ asks for diagnostics.
@@ -0,0 +1,63 @@
1
+ `behavior.md` is the core current-state spec:
2
+
3
+ ```md
4
+ # <Feature Or Shared Behavior>
5
+
6
+ ## Purpose
7
+ ## Current Behavior
8
+ ## Domain Model
9
+ ## Configuration Dimensions
10
+ ## Behavioral Rules
11
+ ## Decision Tables
12
+ ## Lifecycle
13
+ ## Permissions And Visibility
14
+ ## Integrations And Side Effects
15
+ ## Edge Cases
16
+ ## Invariants
17
+ ## Source Anchors
18
+ ## Change History
19
+ ## Open Questions
20
+ ```
21
+
22
+ Not every section must be populated. Strongly prefer `Purpose`, `Current Behavior`, `Source Anchors`, and `Change History`.
23
+
24
+ `decision-tables.md` is optional and focused on permutations:
25
+
26
+ ```md
27
+ # <Feature> Decision Tables
28
+
29
+ ## Table: <Scenario>
30
+
31
+ | Dimension | Value | Outcome |
32
+ | --- | --- | --- |
33
+
34
+ ## Notes
35
+ ## Source Anchors
36
+ ```
37
+
38
+ `source-map.md` connects behavior to reality:
39
+
40
+ ```md
41
+ # <Domain Or Feature> Source Map
42
+
43
+ ## Core Product Surfaces
44
+ ## Source Anchors
45
+ ## Tests
46
+ ## Config And Flags
47
+ ## Jobs And Side Effects
48
+ ## External Integrations
49
+ ## Ownership Notes
50
+ ```
51
+
52
+ `knowledge-delta.md` is the per-change bridge:
53
+
54
+ ```md
55
+ # Knowledge Delta
56
+
57
+ ## Durable Behavior Changes
58
+ ## Affected Knowledge Areas
59
+ ## Knowledge Files Updated
60
+ ## No-Impact Rationale
61
+ ## Source Evidence
62
+ ## Follow-Up Knowledge Work
63
+ ```