@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,419 @@
1
+ ---
2
+ name: weave-prd
3
+ description: Generate or revise prd.md for an active Weave change. Use when the user wants to convert exploration, discussion, sessions, or product interview context into a product requirements document.
4
+ last_changed_in: 0.1.0
5
+ ---
6
+
7
+ # Weave PRD
8
+
9
+ This skill converts available Weave product context into a product requirements document.
10
+
11
+ Use `exploration.md` when it exists and is useful, but do not require it. If product context is missing or insufficient, interview the user until the PRD can stand alone. Ask the user when a missing answer would materially change product scope, user behavior, permissions, rollout, or acceptance.
12
+
13
+ ---
14
+
15
+ # Operating Principles
16
+
17
+ - Treat `exploration.md` as a preferred source when it exists and is useful.
18
+ - Do not require `exploration.md` before generating or revising `prd.md`.
19
+ - Use current discussion, PRD session notes, knowledge context, and focused product interview questions when exploration context is missing or insufficient.
20
+ - Treat `weave-prd` as entering or resuming the PRD lane for the active change.
21
+ - Treat `prd.md` as a living product artifact.
22
+ - Create `prd.md` when it does not exist.
23
+ - Revise `prd.md` in place when it already exists.
24
+ - Use `wiki/knowledge/` as product and domain context.
25
+ - Use other change artifacts as supporting context.
26
+ - Do not blindly replace the PRD with a fresh draft.
27
+ - Do not write an implementation plan.
28
+ - Do not include code-level design, schema details, API contracts, or test strategy unless needed to explain current product behavior.
29
+ - Make reasonable assumptions for minor gaps and document them in `Assumptions`.
30
+ - Put unresolved product decisions in `Open Questions`.
31
+
32
+ ---
33
+
34
+ # Resolve Context
35
+
36
+ Start by discovering the current Weave session:
37
+
38
+ ```bash
39
+ weave workspace --json
40
+ ```
41
+
42
+ Use the cwd-dispatched workspace or repo context returned by `weave workspace --json` as the boundary for context loading. In workspace mode, the workspace root owns the change store and registered sub-repos in `repos[]` are implementation locations inside that single context. In repo mode, the active session's folders are the boundary.
43
+
44
+ Resolve the target change:
45
+
46
+ 1. If the user provided a change id, slug, title fragment, or other change hint, run:
47
+
48
+ ```bash
49
+ weave change status "<change-hint>" --json
50
+ ```
51
+
52
+ 2. Otherwise, run:
53
+
54
+ ```bash
55
+ weave change current --json
56
+ weave change status --json
57
+ ```
58
+
59
+ If no active or hinted change can be resolved, stop and say:
60
+
61
+ ```text
62
+ No active Weave change found. Run `weave change new` or `weave change switch`, then run `weave-prd` again.
63
+ ```
64
+
65
+ After resolving the active change, set local artifact context:
66
+
67
+ ```bash
68
+ weave artifact current set prd --json
69
+ ```
70
+
71
+ This writes local Weave session state only. It does not write repo-tracked artifacts.
72
+
73
+ Identify the change folder under the resolved workspace or repo context:
74
+
75
+ ```text
76
+ wiki/changes/<change-id>/
77
+ ```
78
+
79
+ In workspace mode there is one change context: the workspace root. In repo mode, do not assume every session folder is relevant; use the resolved change status and available artifacts to identify which contexts apply.
80
+
81
+ ---
82
+
83
+ # Required Read Order
84
+
85
+ For each relevant change folder, read files in this order.
86
+
87
+ ## 1. Product Context
88
+
89
+ Read when present:
90
+
91
+ ```text
92
+ wiki/changes/<change-id>/exploration.md
93
+ ```
94
+
95
+ Treat `exploration.md` as thin context when it is:
96
+
97
+ - missing
98
+ - blank or whitespace-only
99
+ - scaffold-only with headings but no substantive content
100
+ - explicitly marked `PRD Readiness` as `Not ready`
101
+
102
+ Do not stop solely because exploration is thin or missing. Use same-lane session notes, current discussion, knowledge context, and product interview questions until `prd.md` can stand alone. Do not write `exploration.md` from this skill.
103
+
104
+ ## 2. Current PRD Baseline
105
+
106
+ Check:
107
+
108
+ ```text
109
+ wiki/changes/<change-id>/prd.md
110
+ ```
111
+
112
+ If `prd.md` exists, read it as the baseline to revise. Preserve still-valid content. Do not discard existing sections just because the latest exploration is shorter.
113
+
114
+ If `prd.md` does not exist, create it from the available context.
115
+
116
+ ## 3. PRD Resume Context
117
+
118
+ Read relevant session files when present:
119
+
120
+ ```text
121
+ wiki/changes/<change-id>/sessions/*-prd.md
122
+ ```
123
+
124
+ Load PRD session files newest-first. Use the latest `## Next Resume Point` to decide whether to continue synthesis, ask a blocking product question, or revise a specific PRD section.
125
+
126
+ Rules:
127
+
128
+ - Read `prd.md` before session notes. The live artifact is canonical current truth.
129
+ - Use session notes for rationale, unresolved points, user preferences, agent recommendations, and where to resume.
130
+ - Use older PRD session files only when needed to understand rationale or unresolved decisions.
131
+ - If session notes conflict with `prd.md`, prefer `prd.md` unless the latest session records an explicit newer user decision.
132
+ - If the user gives an explicit direction, follow it over the stored resume point.
133
+
134
+ At the start of resumed PRD work, briefly state what was loaded:
135
+
136
+ ```text
137
+ Resuming PRD for <change-id>.
138
+ Loaded prd.md and <N> PRD session note(s).
139
+ Latest resume point: <summary>
140
+ ```
141
+
142
+ If `prd.md` does not exist, skip PRD session resume and create the initial PRD from exploration context.
143
+
144
+ ## 4. Change Metadata and Supporting Artifacts
145
+
146
+ Read when present:
147
+
148
+ ```text
149
+ wiki/changes/<change-id>/status.yml
150
+ wiki/changes/<change-id>/decisions.md
151
+ wiki/changes/<change-id>/contracts.md
152
+ wiki/changes/<change-id>/handoff.md
153
+ wiki/changes/<change-id>/implementation.md
154
+ wiki/changes/<change-id>/tasks.md
155
+ ```
156
+
157
+ Use these as supporting context. If artifacts conflict, prefer the latest explicit product decision from `exploration.md` or `decisions.md`. Record important conflicts in `Assumptions`, `Open Questions`, or `Revision History`.
158
+
159
+ ## 5. Knowledge Context
160
+
161
+ Read Weave knowledge files when present:
162
+
163
+ ```text
164
+ wiki/knowledge/index.md
165
+ wiki/knowledge/README.md
166
+ wiki/knowledge/domains/**/index.md
167
+ wiki/knowledge/domains/**/features/**/behavior.md
168
+ wiki/knowledge/domains/**/domain-wide/**
169
+ wiki/knowledge/shared/**/behavior.md
170
+ wiki/knowledge/**/source-map.md
171
+ ```
172
+
173
+ Load only knowledge domains that appear relevant to the change. Use knowledge to align terminology, workflows, permissions, and existing product behavior.
174
+
175
+ ## 6. Repo Documentation
176
+
177
+ If Weave knowledge is thin or missing, inspect existing repo documentation for product context:
178
+
179
+ ```text
180
+ CONTEXT.md
181
+ CONTEXT-MAP.md
182
+ docs/
183
+ docs/adr/
184
+ ```
185
+
186
+ Use repo documentation only to clarify domain behavior and terminology.
187
+
188
+ ---
189
+
190
+ # Create Or Revise
191
+
192
+ ## When `prd.md` Is Missing
193
+
194
+ Create a complete PRD from the exploration and supporting context.
195
+
196
+ Start the file with artifact frontmatter:
197
+
198
+ ```yaml
199
+ ---
200
+ artifact: prd
201
+ status: draft
202
+ owner: product
203
+ created_at: <YYYY-MM-DDTHH:mm:ss.sssZ>
204
+ updated_at: <YYYY-MM-DDTHH:mm:ss.sssZ>
205
+ reviewed_at: null
206
+ approved_at: null
207
+ approved_by: null
208
+ source: exploration.md
209
+ ---
210
+ ```
211
+
212
+ Use UTC ISO timestamps for `created_at` and `updated_at`.
213
+
214
+ Add `Revision History` with an initial entry:
215
+
216
+ ```md
217
+ ## Revision History
218
+
219
+ - <YYYY-MM-DD>: Initial PRD generated from `exploration.md`.
220
+ ```
221
+
222
+ ## When `prd.md` Exists
223
+
224
+ Revise the existing PRD in place.
225
+
226
+ Follow these rules:
227
+
228
+ - Preserve still-valid existing content.
229
+ - Preserve existing artifact lifecycle frontmatter unless the user explicitly asks to change review or approval metadata.
230
+ - If the existing PRD has no frontmatter, add compatible `artifact: prd` frontmatter without removing existing content.
231
+ - Add new workflows, requirements, edge cases, acceptance criteria, and rollout notes from newer exploration context.
232
+ - If scope expanded, update Goals, Proposed Product Behavior, User Workflows, User Stories, Functional Requirements, Edge Cases, Acceptance Criteria, Rollout Considerations, and Open Questions as needed.
233
+ - If scope narrowed, move removed behavior to `Non-Goals` or `Out of Scope` instead of silently deleting it.
234
+ - If a previous requirement is superseded, update the requirement and mention the change in `Revision History`.
235
+ - If new context contradicts older PRD content, prefer the latest explicit product decision and record the superseded point in `Revision History`, `Assumptions`, or `Open Questions`.
236
+ - If the latest exploration describes a substantially different change, stop and say:
237
+
238
+ ```text
239
+ The latest exploration appears to describe a different change than the existing PRD. Create a new Weave change, or explicitly confirm that this PRD should be repurposed.
240
+ ```
241
+
242
+ Add a dated `Revision History` entry summarizing the update. Keep entries concise and product-facing.
243
+
244
+ ---
245
+
246
+ # Synthesis Rules
247
+
248
+ Convert the exploration into a PRD that can stand alone without the conversation history.
249
+
250
+ The PRD should be understandable by Product, Design, Engineering, QA, Customer Success, and Support.
251
+
252
+ When writing:
253
+
254
+ - Preserve concrete decisions from `exploration.md`.
255
+ - Preserve domain language from `wiki/knowledge/`.
256
+ - Separate goals from non-goals.
257
+ - Convert scenarios into user workflows, requirements, and acceptance criteria.
258
+ - Convert ambiguity into either an assumption or an open question.
259
+ - Include product-relevant technical constraints only as behavioral implications.
260
+ - Avoid implementation planning.
261
+ - Avoid speculative requirements not supported by the source context.
262
+
263
+ If the context is incomplete but a reasonable product assumption is safe, proceed and document it.
264
+
265
+ If a gap would materially change product scope, user behavior, permissions, rollout, or acceptance, do not invent the answer. Add it to `Open Questions`.
266
+
267
+ ---
268
+
269
+ # Output Path
270
+
271
+ Write the completed or revised PRD to:
272
+
273
+ ```text
274
+ wiki/changes/<change-id>/prd.md
275
+ ```
276
+
277
+ Use Markdown.
278
+
279
+ Do not write any other files.
280
+ Setting local artifact context with `weave artifact current set prd --json` is allowed because it updates local session state, not repo-tracked change artifacts.
281
+
282
+ ---
283
+
284
+ # Lifecycle Progress
285
+
286
+ After successfully writing or revising `prd.md`, run:
287
+
288
+ ```bash
289
+ weave change progress prd --source exploration --source sessions --json
290
+ ```
291
+
292
+ Pass only sources that actually informed the PRD. Examples:
293
+
294
+ ```bash
295
+ weave change progress prd --source discussion --json
296
+ weave change progress prd --source exploration --source sessions --json
297
+ ```
298
+
299
+ If lifecycle progress fails, do not rewrite `prd.md` just to recover. Report the progress failure in the completion response so the user can rerun the command or inspect `status.yml`.
300
+
301
+ ---
302
+
303
+ # PRD Template
304
+
305
+ Use the structure defined in `prd-template.md` (sibling to this `SKILL.md`).
306
+
307
+ The template lives at `<agent-skills-dir>/weave-prd/prd-template.md` after install. Read it as the canonical PRD section structure when creating or revising `prd.md`. If the user has modified the template, follow the user's modified structure.
308
+
309
+ ---
310
+
311
+ # Completion Response
312
+
313
+ After writing `prd.md`, respond with:
314
+
315
+ ```text
316
+ Created PRD: wiki/changes/<change-id>/prd.md
317
+ ```
318
+
319
+ or:
320
+
321
+ ```text
322
+ Revised PRD: wiki/changes/<change-id>/prd.md
323
+ ```
324
+
325
+ Then include:
326
+
327
+ ```text
328
+ Sources used:
329
+ - exploration.md
330
+ - <other artifacts read>
331
+ - <knowledge files read>
332
+
333
+ Assumptions: <count>
334
+ Open questions: <count>
335
+ ```
336
+
337
+ If multiple relevant contexts were processed (repo mode with multiple session folders), list each created or revised PRD separately. In workspace mode, the workspace root is the single context.
338
+
339
+ ---
340
+
341
+ # Silent Weave Command Output
342
+
343
+ Weave skills run Weave CLI commands silently by default. Use command results
344
+ as internal context, not response content.
345
+
346
+ Do not show raw stdout, JSON payloads, command echoes, lifecycle payloads,
347
+ internal state-write confirmations, or verbatim notice text unless the user
348
+ explicitly asks for diagnostic output.
349
+
350
+ Surface only information that changes what the user or agent should do next:
351
+ blockers, failures, missing relevant repos, branch or task outcomes,
352
+ lifecycle failures, package-outdated notices, relevant outdated or modified
353
+ skills, and user-required actions.
354
+
355
+ Notice handling:
356
+
357
+ - `package_outdated`: show only when present. Say exactly:
358
+ `A newer Weave version is available. Run \`weave status\` for details, then upgrade Weave when convenient.`
359
+ - `skills_outdated`: suppress unrelated skills. If the invoked skill is outdated, say:
360
+ `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.`
361
+ - `skills_outdated`: if multiple skills used in this workflow are outdated, say:
362
+ `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.`
363
+ - `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:
364
+ `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.`
365
+ - `skills_modified`: if the user asks to update skills and installed skills have local edits, say:
366
+ `Some installed skills have local edits. \`weave agent update\` may skip or protect them; run \`weave status\` or \`weave agent diff\` before updating.`
367
+
368
+ Do not say `Notices: ...`, `The command returned notices`, raw
369
+ `notices[].message`, full notice JSON, or full skill lists unless the user
370
+ asks for diagnostics.
371
+
372
+ ---
373
+
374
+ # Lifecycle Staleness Verification
375
+
376
+ Before calling `weave change progress`, verify content-sync of every artifact
377
+ that would otherwise be marked stale by the default pessimistic propagation.
378
+
379
+ The `--source` arguments of `weave change progress` declare causal influence,
380
+ not strict-DAG dependency. Pessimistic staleness propagation is the safe default,
381
+ not the only correct answer. When the clarification this skill just performed is
382
+ narrowly contained (a typo fix, a sentence rewording, an open-question
383
+ resolution), dependents may already be in content sync; flagging them stale
384
+ creates churn the user did not ask for.
385
+
386
+ Procedure:
387
+
388
+ 1. Identify the set of structural dependents of the lane being progressed. Read
389
+ `wiki/changes/<change-id>/status.yml` and compute which lanes list this
390
+ lane in their `artifacts.<lane>.sources`.
391
+ 2. For each dependent lane, read both the dependent artifact and the artifact
392
+ just being progressed. Decide whether the change you just made invalidates
393
+ the dependent's content. The judgement is binary per lane: invalidates, or
394
+ does not invalidate.
395
+ 3. Select the appropriate progress invocation:
396
+
397
+ - Every dependent is invalidated (or there are no dependents):
398
+ `weave change progress <lane> --source <list> --json` (default, no new flags)
399
+ - No dependent is invalidated:
400
+ `weave change progress <lane> --source <list> --no-invalidate --json`
401
+ - Some dependents are invalidated, some are not:
402
+ `weave change progress <lane> --source <list> --invalidate=<comma-list> --json`
403
+
404
+ 4. If a previously-stale dependent is now in content sync (because the upstream
405
+ change has been absorbed but the stale flag still lingers from an earlier
406
+ pessimistic propagation), clear it explicitly:
407
+
408
+ `weave change clear-stale <lane> --reason "<one-sentence verification>" --json`
409
+
410
+ Always pass `--reason` so the audit entry in `stale_history` carries the
411
+ verification rationale. Do not clear flags without reading both artifacts.
412
+
413
+ 5. Never edit `status.yml` by hand to manipulate stale state. Use the CLI.
414
+
415
+ Failure mode: if you are uncertain whether a dependent is in content sync,
416
+ prefer the pessimistic default (omit `--no-invalidate` and `--invalidate`).
417
+ The user can always run `weave-clarify <lane>` later. A false-positive stale
418
+ flag is recoverable; silently leaving a real downstream artifact mismatched is
419
+ not.
@@ -0,0 +1,186 @@
1
+ # <Feature / Change Name> PRD
2
+
3
+ ## Problem Statement
4
+
5
+ Describe the problem from the user's perspective.
6
+
7
+ Include:
8
+ - who is facing the problem
9
+ - what they are trying to accomplish
10
+ - what is painful, missing, broken, slow, risky, or confusing today
11
+ - why this problem matters
12
+
13
+ ## Goals
14
+
15
+ List the outcomes this change should achieve.
16
+
17
+ ## Non-Goals
18
+
19
+ List what this PRD explicitly does not cover.
20
+
21
+ ## Actors
22
+
23
+ List the people, roles, or systems involved.
24
+
25
+ ## Current Behavior
26
+
27
+ Describe how this works today, based on the exploration and knowledge context.
28
+
29
+ Include:
30
+ - current workflow
31
+ - current limitations
32
+ - current workarounds
33
+ - current user pain points
34
+
35
+ ## Proposed Product Behavior
36
+
37
+ Describe the desired product experience.
38
+
39
+ Focus on what the product should do, not how engineering should build it.
40
+
41
+ ## User Workflows
42
+
43
+ Describe the major workflows step by step.
44
+
45
+ Use separate subsections for different actors or scenarios.
46
+
47
+ ### Workflow: <Actor> <does something>
48
+
49
+ 1. <Actor> opens...
50
+ 2. <Actor> selects...
51
+ 3. System shows...
52
+ 4. <Actor> confirms...
53
+ 5. System saves...
54
+
55
+ ## User Stories
56
+
57
+ Provide a numbered list.
58
+
59
+ Each user story should follow this format:
60
+
61
+ 1. As an <actor>, I want <feature/behavior>, so that <benefit>.
62
+
63
+ Cover:
64
+ - happy path
65
+ - empty states
66
+ - error states
67
+ - permission differences
68
+ - admin behavior
69
+ - notifications
70
+ - visibility
71
+ - edge cases
72
+ - rollout or migration behavior, if relevant
73
+
74
+ ## Functional Requirements
75
+
76
+ List concrete product requirements.
77
+
78
+ Use clear language:
79
+
80
+ - The system should...
81
+ - The user should be able to...
82
+ - The system should prevent...
83
+ - The system should show...
84
+ - The system should notify...
85
+
86
+ ## Permissions and Access Control
87
+
88
+ Describe who can view, create, edit, delete, approve, submit, configure, or export.
89
+
90
+ Include restrictions where relevant.
91
+
92
+ ## States and Lifecycle
93
+
94
+ Include this section only if the change has meaningful states.
95
+
96
+ Describe:
97
+ - possible states
98
+ - state transitions
99
+ - who or what triggers each transition
100
+ - invalid transitions
101
+ - final states
102
+
103
+ ## Notifications and Visibility
104
+
105
+ Describe what users see and when.
106
+
107
+ Include:
108
+ - in-app notifications
109
+ - email notifications
110
+ - Slack or third-party notifications, if relevant
111
+ - visibility rules
112
+ - status indicators
113
+
114
+ ## Edge Cases
115
+
116
+ List important edge cases and expected product behavior.
117
+
118
+ Examples:
119
+ - missing data
120
+ - deleted users
121
+ - permission changes
122
+ - duplicate actions
123
+ - partial completion
124
+ - conflicting actions
125
+ - expired states
126
+ - large data volume
127
+ - retry or failure scenarios
128
+
129
+ ## Acceptance Criteria
130
+
131
+ Use checkboxes.
132
+
133
+ - [ ] User can...
134
+ - [ ] System prevents...
135
+ - [ ] Admin can...
136
+ - [ ] Permissions are respected for...
137
+ - [ ] Empty states are handled for...
138
+ - [ ] Error states are handled for...
139
+
140
+ ## Rollout Considerations
141
+
142
+ Describe product rollout expectations.
143
+
144
+ Include:
145
+ - internal rollout
146
+ - beta or customer rollout
147
+ - existing customer impact
148
+ - migration or backfill expectations, if product-relevant
149
+ - communication needs
150
+
151
+ ## Analytics and Success Metrics
152
+
153
+ Describe how success will be measured.
154
+
155
+ Examples:
156
+ - adoption rate
157
+ - completion rate
158
+ - time saved
159
+ - error reduction
160
+ - support ticket reduction
161
+ - feature usage
162
+ - conversion or retention impact
163
+
164
+ ## Revision History
165
+
166
+ Record concise dated entries for initial generation and subsequent revisions.
167
+
168
+ ## Assumptions
169
+
170
+ List assumptions made while writing or revising this PRD.
171
+
172
+ Do not hide uncertainty inside requirements.
173
+
174
+ ## Open Questions
175
+
176
+ List unresolved questions.
177
+
178
+ Only include questions that affect product behavior, user experience, permissions, scope, rollout, or acceptance.
179
+
180
+ ## Out of Scope
181
+
182
+ List things that should not be handled as part of this PRD.
183
+
184
+ ## Further Notes
185
+
186
+ Add useful context for Product, Design, Engineering, QA, Support, or Customer Success.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: weave-prepare
3
+ description: Prepare task execution branches for an active Weave change without implementing, verifying, committing, pushing, or opening PRs.
4
+ last_changed_in: 0.1.0
5
+ ---
6
+
7
+ # Weave Prepare
8
+
9
+ Use this skill when the user wants to prepare local branches for selected `T#` tasks in an active Weave change.
10
+
11
+ Prepare means branch readiness only. It does not implement code, run verification, change task statuses, commit, push, open PRs, stash, discard changes, or create remote branches.
12
+
13
+ # Silent Weave Command Output
14
+
15
+ Weave skills run Weave CLI commands silently by default. Use command results
16
+ as internal context, not response content.
17
+
18
+ Do not show raw stdout, JSON payloads, command echoes, lifecycle payloads,
19
+ internal state-write confirmations, or verbatim notice text unless the user
20
+ explicitly asks for diagnostic output.
21
+
22
+ Surface only information that changes what the user or agent should do next:
23
+ blockers, failures, missing relevant repos, branch or task outcomes,
24
+ lifecycle failures, package-outdated notices, relevant outdated or modified
25
+ skills, and user-required actions.
26
+
27
+ Notice handling:
28
+
29
+ - `package_outdated`: show only when present. Say exactly:
30
+ `A newer Weave version is available. Run \`weave status\` for details, then upgrade Weave when convenient.`
31
+ - `skills_outdated`: suppress unrelated skills. If the invoked skill is outdated, say:
32
+ `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.`
33
+ - `skills_outdated`: if multiple skills used in this workflow are outdated, say:
34
+ `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.`
35
+ - `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:
36
+ `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.`
37
+ - `skills_modified`: if the user asks to update skills and installed skills have local edits, say:
38
+ `Some installed skills have local edits. \`weave agent update\` may skip or protect them; run \`weave status\` or \`weave agent diff\` before updating.`
39
+
40
+ Do not say `Notices: ...`, `The command returned notices`, raw
41
+ `notices[].message`, full notice JSON, or full skill lists unless the user
42
+ asks for diagnostics.
43
+
44
+ # Resolve Context
45
+
46
+ Start with Tier 1 context commands:
47
+
48
+ ```bash
49
+ weave workspace --json
50
+ weave change current --json
51
+ weave change status --json
52
+ ```
53
+
54
+ If there is no active change, stop and say that the user needs `weave change new` or `weave change switch` first.
55
+
56
+ # Selector Handling
57
+
58
+ The CLI owns all branch movement and `status.yml` writes. Do not hand-edit `status.yml` and do not run git checkout commands yourself for this workflow.
59
+
60
+ Map user input as follows:
61
+
62
+ - `all` -> `weave task prepare --all --json`
63
+ - Task ids such as `T1` or `T1 T3` -> `weave task prepare T1 T3 --json`
64
+ - A single non-task, non-`all` value such as `backend` -> `weave task prepare --scope backend --json`
65
+
66
+ If the user invokes `/weave-prepare` without arguments, ask what to prepare. Derive suggestions from `wiki/changes/<change-id>/tasks.md`: include `all`, available `Scope` values, and available `T#` task ids. Do not default to `all`.
67
+
68
+ # Run Prepare
69
+
70
+ Run exactly one prepare command after resolving the selector:
71
+
72
+ ```bash
73
+ weave task prepare <selector> --json
74
+ ```
75
+
76
+ If the global `weave` command is unavailable in this repo, use the local development form:
77
+
78
+ ```bash
79
+ npm run dev -- task prepare <selector> --json
80
+ ```
81
+
82
+ # Summarize Results
83
+
84
+ Summarize the JSON result in user terms:
85
+
86
+ - Change id and branch.
87
+ - Selected tasks.
88
+ - Prepared repos and branch actions: `created`, `checked_out`, `already_active`.
89
+ - Skipped non-git repos with `skipped_not_git`.
90
+ - Blockers, if any, with the repo/task target and reason.
91
+
92
+ If status is `blocked`, state that no selected implementation repo branches were moved by the prepare command. Remind the user that dirty work on the expected branch is allowed, but dirty work on another branch must be resolved by the user.
93
+
94
+ Always close by stating that prepare did not implement, verify, commit, push, open a PR, stash, discard changes, or update task statuses.