@wefter/opencode 0.1.0 → 0.2.1

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 (49) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +23 -9
  3. package/docs/ARCHITECTURE.md +8 -12
  4. package/docs/INSTALLATION.md +2 -1
  5. package/docs/SAFETY_MODEL.md +1 -1
  6. package/docs/SELF_AUDIT.md +37 -0
  7. package/docs/WORKFLOWS.md +7 -3
  8. package/package.json +2 -2
  9. package/schemas/documentation-audit-profile.schema.json +9 -1
  10. package/schemas/product-shaping-config.schema.json +63 -0
  11. package/schemas/product-shaping-contract.schema.json +204 -0
  12. package/schemas/product-shaping-profile.schema.json +39 -0
  13. package/schemas/product-shaping-run-manifest.schema.json +103 -0
  14. package/schemas/wefter.config.schema.json +46 -15
  15. package/schemas/work-unit-config.schema.json +12 -5
  16. package/schemas/workflow-manifest.schema.json +10 -0
  17. package/src/cli/main.js +857 -19
  18. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-audit-orchestrator.md.tmpl +14 -10
  19. package/src/workflows/documentation-audit/templates/opencode/agent/wefter-doc-auditor.md.tmpl +3 -0
  20. package/src/workflows/documentation-audit/templates/opencode/skills/documentation-audit/SKILL.md.tmpl +1 -0
  21. package/src/workflows/documentation-audit/templates/prompts/auditor-prompt.md +1 -0
  22. package/src/workflows/product-shaping/README.md +1241 -3
  23. package/src/workflows/product-shaping/compatibility.md +33 -0
  24. package/src/workflows/product-shaping/contracts/product-spec-contract.json +250 -0
  25. package/src/workflows/product-shaping/templates/default-config.json +34 -0
  26. package/src/workflows/product-shaping/templates/default-profile.json +48 -0
  27. package/src/workflows/product-shaping/templates/documentation-audit/workflow-self-audit-auditor-prompt.md +117 -0
  28. package/src/workflows/product-shaping/templates/documentation-audit-profile.json +80 -0
  29. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-auditor.md.tmpl +22 -0
  30. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-domain-modeler.md.tmpl +31 -0
  31. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-intake-analyst.md.tmpl +31 -0
  32. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-orchestrator.md.tmpl +48 -0
  33. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-reference-researcher.md.tmpl +29 -0
  34. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-release-planner.md.tmpl +34 -0
  35. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-repairer.md.tmpl +25 -0
  36. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-shaper.md.tmpl +31 -0
  37. package/src/workflows/product-shaping/templates/opencode/agent/wefter-product-validator.md.tmpl +23 -0
  38. package/src/workflows/product-shaping/templates/opencode/skills/product-shaping/SKILL.md.tmpl +45 -0
  39. package/src/workflows/product-shaping/templates/prompts/domain-modeler-prompt.md +27 -0
  40. package/src/workflows/product-shaping/templates/prompts/intake-prompt.md +30 -0
  41. package/src/workflows/product-shaping/templates/prompts/product-auditor-prompt.md +53 -0
  42. package/src/workflows/product-shaping/templates/prompts/product-repairer-prompt.md +25 -0
  43. package/src/workflows/product-shaping/templates/prompts/product-shaper-prompt.md +26 -0
  44. package/src/workflows/product-shaping/templates/prompts/product-validator-prompt.md +55 -0
  45. package/src/workflows/product-shaping/templates/prompts/reference-research-prompt.md +25 -0
  46. package/src/workflows/product-shaping/templates/prompts/release-planner-prompt.md +34 -0
  47. package/src/workflows/product-shaping/workflow.json +26 -3
  48. package/src/workflows/technical-shaping/README.md +2 -0
  49. package/src/workflows/technical-shaping/workflow.json +4 -0
@@ -1,7 +1,1245 @@
1
1
  # Product Shaping
2
2
 
3
- Planned workflow for turning an initial idea into product documentation that agents can use without guessing.
3
+ Product Shaping is the Wefter workflow that turns raw product intent into product specifications that are explicit, auditable and ready to become implementation deliverables.
4
4
 
5
- Target outputs include product vision, domain model, operational flow, feature catalog, release scope, acceptance criteria, explicit decisions and open questions.
5
+ The workflow must not jump from idea to code. It must create a layered product specification where each file has one responsibility, clear boundaries, known precedence and a defined consumer.
6
6
 
7
- This module is intentionally registered now so the Wefter architecture can grow without renaming workflow IDs later.
7
+ By default, product specifications belong under `.wefter/specs/`. Projects may override these paths during installation or through workflow config, but agents must never hardcode `docs/` as the default destination.
8
+
9
+ ## Central Rule
10
+
11
+ No agent may move from raw idea to implementation planning without passing through product-shaped specs.
12
+
13
+ The product-shaping workflow ends at `DELIVERABLES.md`. Detailed task specs belong to the delivery implementation workflow.
14
+
15
+ The only valid handoff from product shaping to delivery implementation is the configured `DELIVERABLES.md`. Other product specs are source documents for cross-checking, validation and context; they are not direct implementation plans.
16
+
17
+ Agents must not implement or plan implementation directly from the product-shaping README, `IDEA_BRIEF.md`, `FEATURE_CATALOG.md`, `SCOPE.md`, `DOMAIN_SPEC.md` or `ACCEPTANCE_CRITERIA.md`. They must first produce or consume the configured `DELIVERABLES.md`, then cross-check that handoff against the relevant source specs.
18
+
19
+ Migration note:
20
+
21
+ The current executable implementation engine may still be named `work-unit-implementation` while Wefter migrates to the target `delivery-implementation` vocabulary. Conceptually, product shaping targets `DELIVERABLES.md` and delivery implementation. During migration, `work-unit-implementation` is treated as the legacy implementation engine, not the product-shaping vocabulary.
22
+
23
+ ## Source Of Truth And Enforcement
24
+
25
+ This README is the primary doctrine for the product-shaping workflow inside the Wefter repository. It defines what each product spec file is, why it exists, what its limits are, which agents use it, and which rules must stop execution.
26
+
27
+ The installed workflow must not rely on this README alone for enforcement. When Wefter is installed into a user's repository, the workflow rules must be reinforced by executable and operational artifacts:
28
+
29
+ | Layer | Responsibility |
30
+ | --- | --- |
31
+ | Workflow README | Defines the doctrine and source-of-truth responsibilities for product-shaping files. |
32
+ | Workflow config | Defines repository-specific paths, release id, gates and enabled behavior. |
33
+ | Schemas | Validate config, profile and run manifest shape. |
34
+ | Prompt templates | Instruct each agent to create, use and validate files according to this doctrine. |
35
+ | OpenCode agents | Constrain writes to configured spec/run roots and reinforce role boundaries, execution order and stop conditions. Role-specific ownership is enforced by agent instructions, prompts, validators and tests because release ids and configured paths are dynamic. |
36
+ | Run manifests | Record the exact run, paths, prompts, outputs and handoff artifacts. |
37
+ | Validators and gates | Block publication or implementation handoff when required files, rules or decisions are missing. |
38
+ | Tests | Prevent regressions in installed paths, templates, command behavior and safety rules. |
39
+
40
+ The user's product specs are the source of truth for that user's product. This README is the source of truth for how Wefter must create, organize, validate and consume those specs.
41
+
42
+ Hard rule:
43
+
44
+ If an agent, prompt, schema, config default or CLI command contradicts this README, the implementation artifact is wrong and must be repaired unless this README is intentionally updated first.
45
+
46
+ ## Default Paths
47
+
48
+ Wefter must be self-contained by default. Product shaping must use these repository-relative roots unless the user explicitly overrides them in config:
49
+
50
+ ```text
51
+ .wefter/
52
+ specs/
53
+ workflows/
54
+ runs/
55
+ ```
56
+
57
+ | Root | Responsibility |
58
+ | --- | --- |
59
+ | `.wefter/specs/` | Versioned product specifications produced and consumed by Wefter. |
60
+ | `.wefter/workflows/` | Installed workflow process docs, configs, profiles and prompt templates. |
61
+ | `.wefter/runs/` | Runtime artifacts generated by workflow executions. |
62
+
63
+ Hard rules:
64
+
65
+ 1. Product specs must not be written to `docs/` by default.
66
+ 2. Runtime artifacts must not be written to `.audit/` by default for product shaping.
67
+ 3. Workflow templates and process files must not be mixed with product specs.
68
+ 4. Runtime run outputs must not be mixed with versioned product specs.
69
+ 5. Any non-default path, including `docs/` or `.audit/`, must come from explicit repository config.
70
+
71
+ ## OpenCode Exceptions
72
+
73
+ OpenCode integration still requires a small number of files outside `.wefter/` because OpenCode discovers project commands, agents and skills from its own configuration paths:
74
+
75
+ ```text
76
+ .opencode/
77
+ agent/
78
+ wefter-*.md
79
+ skills/
80
+ <workflow-name>/
81
+ SKILL.md
82
+ opencode.json
83
+ ```
84
+
85
+ Those files are integration adapters only.
86
+
87
+ | Path | Responsibility |
88
+ | --- | --- |
89
+ | `opencode.json` | Registers OpenCode commands and points to installed Wefter agents/skills. |
90
+ | `.opencode/agent/wefter-*.md` | Defines OpenCode agent roles, permissions and orchestration instructions. |
91
+ | `.opencode/skills/<workflow-name>/SKILL.md` | Teaches OpenCode when and how to invoke the installed Wefter workflow. |
92
+
93
+ Hard rules:
94
+
95
+ 1. OpenCode files must not contain product specs.
96
+ 2. OpenCode files must not contain run outputs.
97
+ 3. OpenCode files must not become the source of truth for product-shaping doctrine.
98
+ 4. OpenCode files may summarize workflow rules only to enforce execution behavior.
99
+ 5. If OpenCode files conflict with this README, the OpenCode files are wrong unless this README was intentionally changed first.
100
+ 6. Product intent, workflow config, generated specs and runtime artifacts must remain contained in `.wefter/` by default.
101
+ 7. If a future OpenCode version can load all required agents, skills and commands from `.wefter/`, Wefter should reduce or remove these exceptions.
102
+
103
+ ## Vocabulary
104
+
105
+ Use this vocabulary consistently:
106
+
107
+ ```text
108
+ idea -> product specs -> release -> deliverable -> task
109
+ ```
110
+
111
+ | Term | Meaning |
112
+ | --- | --- |
113
+ | Idea | Raw product input: transcript, notes, prompt, conversation, customer context or initial concept. |
114
+ | Product specs | Structured product documentation under `.wefter/specs/`. |
115
+ | Release | A defined delivery scope, such as `01_mvp`. |
116
+ | Deliverable | A small, ordered, verifiable unit of delivery inside a release. |
117
+ | Task | The smallest executable unit generated by delivery implementation. |
118
+
119
+ Vocabulary transition rules:
120
+
121
+ ```text
122
+ idea becomes product specs
123
+ product specs define releases
124
+ releases are decomposed into deliverables
125
+ deliverables are decomposed into tasks by delivery implementation
126
+ ```
127
+
128
+ Deliverable vs task boundary:
129
+
130
+ | Level | Owns | Must not contain |
131
+ | --- | --- | --- |
132
+ | Deliverable | Outcome, scope, out of scope, dependencies, source specs, acceptance criteria, risk areas, human gate triggers and expected verification. | File-by-file implementation steps, code edits, test-first sequence, detailed task checklist or executor instructions. |
133
+ | Task | Concrete executable step produced by delivery implementation, with implementation requirements, approval scenarios, tests and review evidence. | Product scope changes, release redefinition or unapproved domain decisions. |
134
+
135
+ A deliverable says what bounded result must be delivered and how readiness will be recognized. A task says exactly what to change, test and review to deliver part of that result.
136
+
137
+ Hard rules:
138
+
139
+ 1. These terms are not interchangeable.
140
+ 2. A product spec is not a release commitment unless it is included in `SCOPE.md`.
141
+ 3. A release item is not a deliverable until it appears in the configured `DELIVERABLES.md`.
142
+ 4. A deliverable is not a task and must not contain task-level implementation detail.
143
+ 5. A task must not be created by product shaping; tasks are created only by delivery implementation.
144
+ 6. `Release` is the canonical Wefter term for a defined delivery scope; legacy terms such as `phase` may appear only as compatibility vocabulary and must be mapped to `release` when Wefter artifacts are generated.
145
+ 7. Legacy terms such as `work unit` or `slice` may appear only as migration or compatibility vocabulary and must be mapped to `deliverable` when Wefter artifacts are generated.
146
+
147
+ ## Hard Rules For Agents
148
+
149
+ These rules are mandatory. If an agent cannot satisfy them, it must stop, write the blocker to the expected run artifact and ask for a human decision or documentation repair.
150
+
151
+ 1. Each product spec file has exactly one primary responsibility.
152
+ 2. Do not duplicate the responsibility of another file.
153
+ 3. Do not hide unresolved decisions inside narrative text.
154
+ 4. Unresolved questions must be recorded in `discovery/OPEN_QUESTIONS.md`.
155
+ 5. Closed product decisions must be recorded in `product/PRODUCT_DECISIONS.md`.
156
+ 6. `PRODUCT_VISION.md` must not contain a detailed feature catalog, roadmap, domain rules, acceptance criteria or technical decisions.
157
+ 7. `FEATURE_CATALOG.md` must not become a backlog, delivery promise or release scope.
158
+ 8. `MODULE_ROADMAP.md` must not become a calendar, sprint plan or delivery commitment.
159
+ 9. `SCOPE.md` is the source of truth for what enters and does not enter a release.
160
+ 10. `DOMAIN_SPEC.md` is the source of truth for closed release behavior and domain rules.
161
+ 11. `ACCEPTANCE_CRITERIA.md` is the source of truth for how release readiness is verified.
162
+ 12. `DELIVERABLES.md` is the handoff from product shaping to delivery implementation.
163
+ 13. `DELIVERABLES.md` must not contain detailed task specs.
164
+ 14. Task specs must be created only by delivery implementation.
165
+ 15. If two files conflict, do not choose silently. Record the conflict and stop for repair or human decision.
166
+ 16. Do not invent product, scope, domain, security or persistence decisions to unblock the flow.
167
+ 17. Every decision-relevant inference or generated requirement must cite source material, market reference, explicit assumption or recorded decision.
168
+ 18. Future scope must be marked as future or out of release scope.
169
+ 19. A release cannot be marked ready for delivery implementation while blocking open questions remain.
170
+ 20. Product shaping is complete only after adversarial review and final validation pass with no blocking findings.
171
+
172
+ ## Hard Rule Enforcement
173
+
174
+ Every `Hard rule` or `Hard rules` block in this README is binding for agents, prompts, validators and future implementation code.
175
+
176
+ Violation handling:
177
+
178
+ 1. If a rule is violated in a draft artifact, the agent must record the violation and repair the draft before publication.
179
+ 2. If a rule is violated in an approved/versioned spec, the agent must stop and require documentation repair before using that spec as source of truth.
180
+ 3. If a rule is violated by unresolved product ambiguity, the agent must record the issue in `discovery/OPEN_QUESTIONS.md` and require a human decision when it blocks the target release.
181
+ 4. If a rule is violated by a conflict between source files, the agent must record the conflict, cite the conflicting files and apply the precedence rules only to classify the conflict, not to silently erase it.
182
+ 5. If a rule is violated by generated prompts, agents, schemas, configs, manifests or CLI defaults, the derived artifact must be repaired or this README must be intentionally updated first.
183
+ 6. If a rule is violated during delivery implementation, execution must stop before creating or advancing tasks until the product handoff is repaired or explicitly approved by gate.
184
+
185
+ Hard rules are not suggestions, style guidance or best-effort checks. They are stop conditions.
186
+
187
+ ## Documentation Drift Prevention
188
+
189
+ Product shaping creates a chain of dependent specs. Agents must treat changes to upstream files as potential invalidation of downstream files.
190
+
191
+ Dependency chain:
192
+
193
+ ```text
194
+ SOURCE_MATERIALS.md
195
+ -> IDEA_BRIEF.md
196
+ -> PRODUCT_VISION.md
197
+ -> FEATURE_CATALOG.md
198
+ -> MODULE_ROADMAP.md
199
+ -> DOMAIN_MODEL.md / OPERATIONAL_FLOW.md / PRODUCT_DECISIONS.md
200
+ -> SCOPE.md
201
+ -> DOMAIN_SPEC.md
202
+ -> ACCEPTANCE_CRITERIA.md
203
+ -> DELIVERABLES.md
204
+ ```
205
+
206
+ Hard rules:
207
+
208
+ 1. If an upstream spec changes, agents must review affected downstream specs before declaring the workflow consistent.
209
+ 2. If a downstream spec depends on an outdated upstream statement, agents must mark the downstream spec as drifted and repair or block publication.
210
+ 3. If a product decision changes scope, behavior, priority or tradeoff, agents must update `PRODUCT_DECISIONS.md` and review `SCOPE.md`, `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md` and `DELIVERABLES.md` for impact.
211
+ 4. If an open question is resolved, agents must update `OPEN_QUESTIONS.md`, record any resulting decision in `PRODUCT_DECISIONS.md` when decision-relevant and review impacted specs.
212
+ 5. If a reference-derived capability changes status, agents must review `FEATURE_CATALOG.md`, `MODULE_ROADMAP.md` and target release scope.
213
+ 6. If a release scope changes, agents must review `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md` and `DELIVERABLES.md` before handoff.
214
+ 7. If `DOMAIN_SPEC.md` changes, agents must review `ACCEPTANCE_CRITERIA.md`, `DELIVERABLES.md` and future technical shaping inputs.
215
+ 8. If `ACCEPTANCE_CRITERIA.md` changes, agents must review `DELIVERABLES.md` before delivery implementation.
216
+ 9. If a drift cannot be repaired automatically without inventing decisions, agents must stop and require documentation repair or human decision.
217
+ 10. Documentation audit findings about drift must not be ignored during product shaping validation.
218
+
219
+ ## Persistent Product Spec Tree
220
+
221
+ The default product spec tree is:
222
+
223
+ ```text
224
+ .wefter/specs/
225
+ README.md
226
+ PRODUCT_VISION.md
227
+ discovery/
228
+ SOURCE_MATERIALS.md
229
+ IDEA_BRIEF.md
230
+ OPEN_QUESTIONS.md
231
+ references/
232
+ README.md
233
+ <reference>.md
234
+ product/
235
+ FEATURE_CATALOG.md
236
+ MODULE_ROADMAP.md
237
+ DOMAIN_MODEL.md
238
+ OPERATIONAL_FLOW.md
239
+ PRODUCT_DECISIONS.md
240
+ releases/
241
+ README.md
242
+ <release-id>/
243
+ README.md
244
+ SCOPE.md
245
+ DOMAIN_SPEC.md
246
+ ACCEPTANCE_CRITERIA.md
247
+ DELIVERABLES.md
248
+ ```
249
+
250
+ Tree rules:
251
+
252
+ 1. This tree is the default product-shaping output tree only.
253
+ 2. Technical specs such as `TECHNICAL_DECISIONS.md`, `DOMAIN_GLOSSARY.md` and `DATA_CONTRACT.md` belong to technical shaping, not product shaping.
254
+ 3. Runtime artifacts belong under `.wefter/runs/`, not `.wefter/specs/`.
255
+ 4. Installed workflow docs, configs, profiles and templates belong under `.wefter/workflows/`, not `.wefter/specs/`.
256
+ 5. Projects may override this tree in config, but generated product specs must preserve the same document responsibilities.
257
+
258
+ ## Optional Extensions And Out-Of-Scope Docs
259
+
260
+ The required tree is intentionally limited. Product shaping must not add mandatory documents unless they are necessary across most Wefter projects.
261
+
262
+ Optional product spec extensions may be configured for project-specific needs, such as:
263
+
264
+ ```text
265
+ personas or user research
266
+ pricing or packaging notes
267
+ go-to-market notes
268
+ support or operations notes
269
+ regulatory notes
270
+ competitive positioning
271
+ ```
272
+
273
+ Hard rules:
274
+
275
+ 1. Optional product docs must be explicitly configured or approved; agents must not create them ad hoc.
276
+ 2. Optional product docs must declare their relationship to the required source-of-truth files.
277
+ 3. Optional product docs must not override `SCOPE.md`, `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md` or `DELIVERABLES.md`.
278
+ 4. Technical docs belong to technical shaping unless they are brief product constraints recorded as assumptions or decisions.
279
+ 5. Delivery plans, task specs, task logs, task reviews and implementation validation belong to delivery implementation, not product shaping.
280
+
281
+ ## File Contracts
282
+
283
+ ### `.wefter/specs/README.md`
284
+
285
+ Why it exists:
286
+
287
+ This file is the map of documentation responsibilities. It tells agents which file owns which kind of product knowledge and prevents documentation drift.
288
+
289
+ It is the first versioned product spec artifact. It may be created from a Wefter template before content-specific agents start writing product specs.
290
+
291
+ Limits:
292
+
293
+ It must not contain detailed product rules, feature lists, roadmap content, release scope or technical decisions. It is an index and responsibility contract.
294
+
295
+ Creation order:
296
+
297
+ Create first, before final product spec files.
298
+
299
+ If the file is missing, agents must create it before writing any other product spec file.
300
+
301
+ Usage order:
302
+
303
+ Read first by every agent that works with product specs.
304
+
305
+ Used by:
306
+
307
+ All product-shaping agents, documentation audit, documentation repair, technical shaping and delivery planning.
308
+
309
+ Minimum content:
310
+
311
+ ```text
312
+ Purpose of the spec tree
313
+ Configured spec root
314
+ Release path convention
315
+ Document responsibility table
316
+ Source-of-truth and precedence summary
317
+ Rules for open questions and product decisions
318
+ Rules for custom paths and compatibility vocabulary
319
+ Handoff rule to DELIVERABLES.md
320
+ ```
321
+
322
+ Hard rule:
323
+
324
+ If an agent does not know where information belongs, it must consult this file. If the destination is still unclear, record the issue in `discovery/OPEN_QUESTIONS.md`.
325
+
326
+ Agents must not create ad hoc product spec files outside the documented tree unless the configured workflow explicitly allows custom output paths.
327
+
328
+ ### `.wefter/specs/discovery/SOURCE_MATERIALS.md`
329
+
330
+ Why it exists:
331
+
332
+ This file catalogs raw material used for shaping: transcript, notes, prompts, links, conversations, screenshots, documents and user-provided files.
333
+
334
+ It is mandatory even when no external file was provided. In that case, it must record the available conversational input, user request, manually entered idea, or state explicitly that no source material was provided beyond the current prompt.
335
+
336
+ Limits:
337
+
338
+ It must not interpret the product, define scope, synthesize features or make product decisions. It records sources and context only.
339
+
340
+ Creation order:
341
+
342
+ Create immediately after `.wefter/specs/README.md`.
343
+
344
+ Usage order:
345
+
346
+ Use before `IDEA_BRIEF.md`.
347
+
348
+ Used by:
349
+
350
+ `wefter-product-intake-analyst`, `wefter-product-auditor`, `wefter-product-validator` and `wefter-product-repairer`.
351
+
352
+ Minimum content:
353
+
354
+ ```text
355
+ Source id
356
+ Source type: transcript | note | prompt | conversation | link | file | screenshot | other
357
+ Source location or path when available
358
+ Capture date or provided date when available
359
+ Neutral summary of the source
360
+ Relevant quoted excerpts or precise references when available
361
+ Known limitations, missing context or uncertainty
362
+ Usage restrictions or privacy notes when applicable
363
+ ```
364
+
365
+ Hard rule:
366
+
367
+ No decision-relevant product idea or generated requirement may appear in final specs unless it is traceable to `SOURCE_MATERIALS.md`, a market reference or a recorded product decision.
368
+
369
+ ### `.wefter/specs/discovery/IDEA_BRIEF.md`
370
+
371
+ Why it exists:
372
+
373
+ This file turns raw input into an initial product understanding: problem, target users, jobs to be done, context, goal, constraints, assumptions and non-goals.
374
+
375
+ Limits:
376
+
377
+ It must not list detailed features, define releases, close domain behavior or decide technical stack.
378
+
379
+ Creation order:
380
+
381
+ Create after `SOURCE_MATERIALS.md`.
382
+
383
+ Usage order:
384
+
385
+ Use before market reference research and before `PRODUCT_VISION.md`.
386
+
387
+ Used by:
388
+
389
+ `wefter-product-reference-researcher`, `wefter-product-shaper`, `wefter-product-release-planner` and product auditors.
390
+
391
+ Minimum content:
392
+
393
+ ```text
394
+ Problem statement
395
+ Target users or customer segments
396
+ User context and current workflow
397
+ Jobs to be done
398
+ Desired product outcome
399
+ Current alternatives or manual workarounds when known
400
+ Constraints and assumptions
401
+ Explicit non-goals
402
+ Source material references
403
+ Open questions created from the brief
404
+ ```
405
+
406
+ Hard rule:
407
+
408
+ If the brief does not clearly state problem, user and expected value, the workflow must stop before creating roadmap or release scope.
409
+
410
+ ### `.wefter/specs/discovery/OPEN_QUESTIONS.md`
411
+
412
+ Why it exists:
413
+
414
+ This file keeps uncertainty visible. It separates open questions from closed decisions.
415
+
416
+ Limits:
417
+
418
+ It must not become a backlog or long-form discussion log. Each question must include impact, owner when known, status and whether it blocks the target release.
419
+
420
+ Creation order:
421
+
422
+ Create with `IDEA_BRIEF.md` and keep updated throughout product shaping.
423
+
424
+ Usage order:
425
+
426
+ Check at every gate before publishing candidate artifacts.
427
+
428
+ Used by:
429
+
430
+ All agents, especially `wefter-product-orchestrator`, `wefter-product-validator`, `wefter-product-repairer` and the delivery planner.
431
+
432
+ Minimum content:
433
+
434
+ ```text
435
+ Question id
436
+ Question
437
+ Context and source reference
438
+ Affected files or decisions
439
+ Impact if unresolved
440
+ Blocks target release: yes | no | unknown
441
+ Known options or candidate answers
442
+ Owner or decision maker when known
443
+ Status: open | answered | deferred | obsolete
444
+ Resolution and linked product decision when answered
445
+ ```
446
+
447
+ Hard rule:
448
+
449
+ If a question affects release scope, domain behavior, acceptance criteria or deliverables, it must be listed here. Agents must not resolve it silently.
450
+
451
+ Open or deferred questions with `Blocks target release: yes` block completion. A deferred question can pass the target-release gate only when it is explicitly marked `Blocks target release: no`.
452
+
453
+ ### `.wefter/specs/references/README.md`
454
+
455
+ Why it exists:
456
+
457
+ This file maps the references researched for the product and explains why each reference matters.
458
+
459
+ Limits:
460
+
461
+ It must not consolidate all features, replace individual reference files or act as the feature catalog.
462
+
463
+ Creation order:
464
+
465
+ Create during reference research, before or immediately after individual reference files.
466
+
467
+ Usage order:
468
+
469
+ Use before consolidating features.
470
+
471
+ Used by:
472
+
473
+ `wefter-product-reference-researcher`, `wefter-product-shaper` and product auditors.
474
+
475
+ Minimum content:
476
+
477
+ ```text
478
+ Research purpose
479
+ Selection criteria for references
480
+ Reference map table
481
+ For each reference: name, file path, category, primary focus, relevance, research date, freshness status
482
+ Explicit exclusions or skipped reference types when relevant
483
+ Rules for using references as inspiration, not commitments
484
+ ```
485
+
486
+ Hard rule:
487
+
488
+ Every individual reference file must be listed here with its `references/<reference>.md` path, focus and relevance. Zero individual references are valid only when this file explicitly states that no references were used or researched and explains why.
489
+
490
+ ### `.wefter/specs/references/<reference>.md`
491
+
492
+ Why it exists:
493
+
494
+ Each file records analysis of one competitor, product, tool, workflow, market category or relevant reference.
495
+
496
+ Limits:
497
+
498
+ It must not treat external claims as permanent truth. It must not convert competitor behavior into product requirements automatically.
499
+
500
+ Creation order:
501
+
502
+ Create during market reference research, after `IDEA_BRIEF.md`.
503
+
504
+ Usage order:
505
+
506
+ Use before `FEATURE_CATALOG.md`.
507
+
508
+ Used by:
509
+
510
+ `wefter-product-reference-researcher`, `wefter-product-shaper` and product auditors.
511
+
512
+ Minimum content:
513
+
514
+ ```text
515
+ Name
516
+ Research date
517
+ Reference URL or source
518
+ Primary focus
519
+ Target users
520
+ Observed capabilities
521
+ Notable differentiators
522
+ Limitations or risks
523
+ Applicable ideas
524
+ Ideas not applicable
525
+ Confidence and freshness notes
526
+ ```
527
+
528
+ Each file must distinguish observed claims, agent inferences and product opportunities. Observed claims should cite the source where possible. Agent inferences must be marked as inferences. Product opportunities must remain candidates until they are evaluated in `FEATURE_CATALOG.md` or `PRODUCT_DECISIONS.md`.
529
+
530
+ Hard rule:
531
+
532
+ Every feature derived from a reference must be marked as inspiration, not commitment.
533
+
534
+ ### `.wefter/specs/PRODUCT_VISION.md`
535
+
536
+ Why it exists:
537
+
538
+ This file defines the product at the macro level: objective, direction, pillars, scope rule and positioning.
539
+
540
+ Limits:
541
+
542
+ It must not contain a detailed feature catalog, roadmap, release scope, domain rules, acceptance criteria or technical decisions.
543
+
544
+ Creation order:
545
+
546
+ Create after `IDEA_BRIEF.md` and initial references.
547
+
548
+ Usage order:
549
+
550
+ Use before feature catalog, roadmap, release scope and deliverable shaping.
551
+
552
+ Used by:
553
+
554
+ All agents. It is the macro product compass.
555
+
556
+ Minimum content:
557
+
558
+ ```text
559
+ Product objective
560
+ Target users or customer segments
561
+ Problem and value summary
562
+ Product direction
563
+ Product pillars
564
+ Macro non-goals
565
+ Scope rule explaining which details belong in other files
566
+ Source references to idea brief, decisions or references
567
+ ```
568
+
569
+ Hard rule:
570
+
571
+ If a later artifact contradicts `PRODUCT_VISION.md`, the agent must record a finding and stop until the contradiction is repaired or an explicit product decision supersedes it.
572
+
573
+ ### `.wefter/specs/product/FEATURE_CATALOG.md`
574
+
575
+ Why it exists:
576
+
577
+ This file centralizes possible product capabilities from the idea, references and product decisions.
578
+
579
+ Limits:
580
+
581
+ It is not a backlog, not a roadmap, not release scope and not a delivery promise.
582
+
583
+ Creation order:
584
+
585
+ Create after `PRODUCT_VISION.md` and market references.
586
+
587
+ Usage order:
588
+
589
+ Use before `MODULE_ROADMAP.md` and `SCOPE.md`.
590
+
591
+ Used by:
592
+
593
+ `wefter-product-shaper`, `wefter-product-release-planner`, product auditors and validators.
594
+
595
+ Minimum content:
596
+
597
+ ```text
598
+ Catalog purpose and non-backlog rule
599
+ Feature id
600
+ Feature name
601
+ Capability description
602
+ Source: idea | reference | decision | inference
603
+ Status: candidate | core | future | rejected | needs-decision
604
+ Rationale
605
+ Relevant references or source ids
606
+ Known dependencies
607
+ Release relevance when known
608
+ Reason if rejected or deferred
609
+ ```
610
+
611
+ Hard rule:
612
+
613
+ Every feature must have exactly one status: `candidate`, `core`, `future`, `rejected` or `needs-decision`. A feature without status cannot become release scope, and a feature marked `future`, `rejected` or `needs-decision` cannot enter `SCOPE.md` without an explicit product decision.
614
+
615
+ ### `.wefter/specs/product/MODULE_ROADMAP.md`
616
+
617
+ Why it exists:
618
+
619
+ This file organizes product evolution into modules and releases by conceptual priority and dependency. Legacy phase vocabulary may be referenced only as compatibility language.
620
+
621
+ Limits:
622
+
623
+ It is not a calendar, sprint plan, timeline or closed delivery commitment. It must not list every feature in detail.
624
+
625
+ Creation order:
626
+
627
+ Create after `FEATURE_CATALOG.md`.
628
+
629
+ Usage order:
630
+
631
+ Use before choosing and shaping the initial release.
632
+
633
+ Used by:
634
+
635
+ `wefter-product-release-planner`, product auditors and deliverable shaping.
636
+
637
+ Minimum content:
638
+
639
+ ```text
640
+ Roadmap purpose and non-schedule rule
641
+ Module or release sequence
642
+ For each module/release: objective, included capability groups, dependencies, rationale, expected maturity
643
+ Candidate initial release
644
+ Future modules explicitly marked as future
645
+ Known sequencing risks
646
+ References to feature catalog items or product decisions
647
+ ```
648
+
649
+ Hard rule:
650
+
651
+ The roadmap defines relative sequence and conceptual dependencies only. Dates and commitments do not belong here.
652
+
653
+ ### `.wefter/specs/product/DOMAIN_MODEL.md`
654
+
655
+ Why it exists:
656
+
657
+ This file describes conceptual business entities, relationships and modeling principles.
658
+
659
+ Limits:
660
+
661
+ It is not a database schema, migration plan, ORM model or technical naming glossary. It does not replace `DOMAIN_SPEC.md`.
662
+
663
+ Creation order:
664
+
665
+ Create after vision, feature catalog and initial roadmap.
666
+
667
+ Usage order:
668
+
669
+ Use before `DOMAIN_SPEC.md` and later before technical data contracts.
670
+
671
+ Used by:
672
+
673
+ `wefter-product-domain-modeler`, `wefter-product-release-planner`, technical shaping and delivery planning.
674
+
675
+ Minimum content:
676
+
677
+ ```text
678
+ Modeling principles
679
+ Core business entities
680
+ Entity responsibilities
681
+ Relationships and cardinality at conceptual level
682
+ Lifecycle notes for important entities
683
+ Business invariants
684
+ Terms and definitions in business language
685
+ Out-of-model or future concepts when relevant
686
+ References to source specs and product decisions
687
+ ```
688
+
689
+ Hard rule:
690
+
691
+ Names here are business/conceptual names. Final technical names belong to technical shaping.
692
+
693
+ ### `.wefter/specs/product/OPERATIONAL_FLOW.md`
694
+
695
+ Why it exists:
696
+
697
+ This file describes the target operational flow end to end, including actors, states, inputs, outputs and major steps.
698
+
699
+ Limits:
700
+
701
+ It may describe future flow, but future steps must be explicitly marked. It does not close release scope by itself.
702
+
703
+ Creation order:
704
+
705
+ Create after or in parallel with `DOMAIN_MODEL.md`.
706
+
707
+ Usage order:
708
+
709
+ Use before `SCOPE.md`, `DOMAIN_SPEC.md` and `ACCEPTANCE_CRITERIA.md`.
710
+
711
+ Used by:
712
+
713
+ `wefter-product-domain-modeler`, `wefter-product-release-planner`, acceptance shaping and auditors.
714
+
715
+ Minimum content:
716
+
717
+ ```text
718
+ Flow purpose and target scenario
719
+ Actors and responsibilities
720
+ Trigger events
721
+ Preconditions
722
+ Main operational steps
723
+ State/status transitions when conceptually relevant
724
+ Alternate flows and exceptions
725
+ Inputs and outputs per major step
726
+ Future or out-of-release steps explicitly marked
727
+ References to domain model, scope candidates or product decisions
728
+ ```
729
+
730
+ Hard rule:
731
+
732
+ Any operational step outside the target release must be marked as future or out of release scope.
733
+
734
+ ### `.wefter/specs/product/PRODUCT_DECISIONS.md`
735
+
736
+ Why it exists:
737
+
738
+ This file records closed product decisions, assumptions, risks and impacts so knowledge does not remain only in chats or temporary run artifacts.
739
+
740
+ Limits:
741
+
742
+ It is not a changelog, backlog or full scope document. It should not repeat complete specs.
743
+
744
+ Creation order:
745
+
746
+ Create during product shaping and update whenever decisions are made. It may be created before its nominal position if decisions appear early.
747
+
748
+ Usage order:
749
+
750
+ Read before validation, repair, release planning and deliverable shaping.
751
+
752
+ Used by:
753
+
754
+ All agents.
755
+
756
+ Minimum content:
757
+
758
+ ```text
759
+ Decision id
760
+ Status: accepted | superseded | rejected
761
+ Date or decision timestamp when known
762
+ Context and source references
763
+ Decision statement
764
+ Alternatives considered
765
+ Rationale
766
+ Impact on scope, domain, acceptance, roadmap or deliverables
767
+ Affected files
768
+ Follow-up actions
769
+ Supersedes or superseded by when applicable
770
+ ```
771
+
772
+ Hard rule:
773
+
774
+ Every accepted decision that changes scope, behavior, priority, tradeoff or product direction must be recorded here. Proposed but unresolved decisions belong in `OPEN_QUESTIONS.md` until accepted or rejected.
775
+
776
+ ### `.wefter/specs/releases/README.md`
777
+
778
+ Why it exists:
779
+
780
+ This file explains release organization and the relationship between release-level files.
781
+
782
+ Limits:
783
+
784
+ It must not define detailed scope or behavior for one release.
785
+
786
+ Creation order:
787
+
788
+ Create before the first release folder.
789
+
790
+ Usage order:
791
+
792
+ Read before files under `releases/<release-id>/`.
793
+
794
+ Used by:
795
+
796
+ `wefter-product-release-planner`, validators and delivery orchestrators.
797
+
798
+ Minimum content:
799
+
800
+ ```text
801
+ Release organization purpose
802
+ Release id convention
803
+ Release directory/path convention
804
+ Release map table
805
+ For each release: id, title, status, objective, path, relationship to roadmap
806
+ Compatibility notes for custom paths such as docs/phases
807
+ Rule that release-specific detail belongs inside releases/<release-id>/
808
+ ```
809
+
810
+ Hard rule:
811
+
812
+ If a project uses a custom release path, such as `docs/phases`, that must come from config, not from hardcoded agent assumptions.
813
+
814
+ ### `.wefter/specs/releases/<release-id>/README.md`
815
+
816
+ Why it exists:
817
+
818
+ This file indexes one release and declares precedence for that release's documents.
819
+
820
+ Limits:
821
+
822
+ It must not replace `SCOPE.md`, `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md` or `DELIVERABLES.md`.
823
+
824
+ Creation order:
825
+
826
+ Create when opening a release.
827
+
828
+ Usage order:
829
+
830
+ Read first inside a release folder.
831
+
832
+ Used by:
833
+
834
+ Release planner, validator, technical shaping and delivery planning.
835
+
836
+ Minimum content:
837
+
838
+ ```text
839
+ Release id and title
840
+ Release status
841
+ Release objective summary
842
+ File index for SCOPE.md, DOMAIN_SPEC.md, ACCEPTANCE_CRITERIA.md and DELIVERABLES.md
843
+ Source-of-truth responsibility table
844
+ Precedence summary for release files
845
+ Handoff rule to DELIVERABLES.md
846
+ Known blockers or links to OPEN_QUESTIONS.md
847
+ ```
848
+
849
+ Hard rule:
850
+
851
+ It must declare which file owns release scope, domain behavior, acceptance and implementation deliverable handoff.
852
+
853
+ ### `.wefter/specs/releases/<release-id>/SCOPE.md`
854
+
855
+ Why it exists:
856
+
857
+ This file defines the release commitment: objective, expected result, included scope, excluded scope, tradeoffs and boundaries.
858
+
859
+ Limits:
860
+
861
+ It must not define all detailed domain rules, task specs or technical stack.
862
+
863
+ Creation order:
864
+
865
+ Create after roadmap, domain model and operational flow are sufficiently clear.
866
+
867
+ Usage order:
868
+
869
+ Use before `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md` and `DELIVERABLES.md`.
870
+
871
+ Used by:
872
+
873
+ Release planner, domain shaper, acceptance shaper, delivery planner and auditors.
874
+
875
+ Minimum content:
876
+
877
+ ```text
878
+ Release objective
879
+ Expected outcome
880
+ Included scope
881
+ Explicit out of scope
882
+ Accepted tradeoffs
883
+ Assumptions
884
+ Dependencies and preconditions
885
+ Open blockers or linked open questions
886
+ Scope boundaries by domain or capability group
887
+ References to roadmap, feature catalog and product decisions
888
+ ```
889
+
890
+ Hard rule:
891
+
892
+ Nothing may enter `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md` or `DELIVERABLES.md` if it is outside `SCOPE.md`, unless the artifact records an explicit pending scope change requiring human decision.
893
+
894
+ ### `.wefter/specs/releases/<release-id>/DOMAIN_SPEC.md`
895
+
896
+ Why it exists:
897
+
898
+ This file closes release domain behavior: operational entities, rules, states, conceptual permissions, validations, invariants and meaningful alternate flows.
899
+
900
+ Limits:
901
+
902
+ It is not a data contract, UI spec, task plan or stack decision document.
903
+
904
+ Creation order:
905
+
906
+ Create after `SCOPE.md`.
907
+
908
+ Usage order:
909
+
910
+ Use before `ACCEPTANCE_CRITERIA.md`, technical data contracts and `DELIVERABLES.md`.
911
+
912
+ Used by:
913
+
914
+ Domain modeler, acceptance shaper, technical shaping, delivery planner and auditors.
915
+
916
+ Minimum content:
917
+
918
+ ```text
919
+ Release domain responsibility
920
+ Closed domain decisions
921
+ Entities and concepts in release scope
922
+ Domain rules and invariants
923
+ State/status model when applicable
924
+ Allowed transitions when applicable
925
+ Conceptual permissions and actor capabilities
926
+ Validations and invalid states
927
+ Alternate flows and exceptions
928
+ Audit/history expectations when relevant
929
+ Explicit unresolved domain questions if any
930
+ References to SCOPE.md, DOMAIN_MODEL.md, OPERATIONAL_FLOW.md and PRODUCT_DECISIONS.md
931
+ ```
932
+
933
+ Hard rule:
934
+
935
+ An unresolved domain rule cannot become an implementable deliverable without a human gate.
936
+
937
+ ### `.wefter/specs/releases/<release-id>/ACCEPTANCE_CRITERIA.md`
938
+
939
+ Why it exists:
940
+
941
+ This file turns scope and domain behavior into verifiable release readiness criteria.
942
+
943
+ Limits:
944
+
945
+ It must not redefine scope or introduce domain rules that are not present in `DOMAIN_SPEC.md` or `PRODUCT_DECISIONS.md`.
946
+
947
+ Creation order:
948
+
949
+ Create after `DOMAIN_SPEC.md`.
950
+
951
+ Usage order:
952
+
953
+ Use before `DELIVERABLES.md` and during implementation traceability.
954
+
955
+ Used by:
956
+
957
+ Release planner, delivery planner, implementation planner, task reviewer and validator.
958
+
959
+ Minimum content:
960
+
961
+ ```text
962
+ Acceptance objective
963
+ Definition of release accepted
964
+ End-to-end acceptance flows
965
+ Preconditions for each flow
966
+ Expected outcomes for each flow
967
+ Acceptance criteria by domain area
968
+ Cross-cutting acceptance rules
969
+ Negative or invalid scenarios when relevant
970
+ Out-of-acceptance scenarios
971
+ Traceability to SCOPE.md and DOMAIN_SPEC.md
972
+ Definition of release ready for delivery implementation
973
+ ```
974
+
975
+ Hard rule:
976
+
977
+ Every criterion must be testable, observable or otherwise objectively verifiable. Vague criteria must be rewritten or recorded as open questions.
978
+
979
+ ### `.wefter/specs/releases/<release-id>/DELIVERABLES.md`
980
+
981
+ Why it exists:
982
+
983
+ This file converts the release into ordered, small, verifiable deliverables ready for delivery implementation.
984
+
985
+ Limits:
986
+
987
+ It must not contain task specs, code, detailed implementation plans or task-level TDD requirements. Those belong to the implementation workflow.
988
+
989
+ Creation order:
990
+
991
+ Create last in product shaping.
992
+
993
+ Usage order:
994
+
995
+ Use first by delivery implementation.
996
+
997
+ Used by:
998
+
999
+ Delivery orchestrator, delivery planner, plan auditors and validators.
1000
+
1001
+ Hard rule:
1002
+
1003
+ Every deliverable must include goal, scope, out of scope, dependencies, source docs, acceptance criteria, risk areas, human gate triggers and expected verification.
1004
+
1005
+ Every deliverable must have a stable id in the heading `## Deliverable <id>: <title>` and exactly one status: `candidate`, `ready`, `blocked`, `deferred` or `done`. Only `ready` deliverables may enter delivery implementation without an additional human gate.
1006
+
1007
+ Recommended deliverable format:
1008
+
1009
+ ```md
1010
+ ## Deliverable 00: <title>
1011
+
1012
+ Status: candidate | ready | blocked | deferred | done
1013
+ Type: functional | technical | foundation | validation | documentation | migration | integration | security
1014
+
1015
+ ### Goal
1016
+
1017
+ ### Scope
1018
+
1019
+ ### Out Of Scope
1020
+
1021
+ ### Dependencies
1022
+
1023
+ ### Source Docs
1024
+
1025
+ ### Acceptance Criteria
1026
+
1027
+ ### Risk Areas
1028
+
1029
+ ### Human Gate Triggers
1030
+
1031
+ ### Expected Verification
1032
+ ```
1033
+
1034
+ ## Hard Creation Order
1035
+
1036
+ Agents must create product specs in this order unless resuming an existing run with already-created artifacts:
1037
+
1038
+ ```text
1039
+ 1. README.md
1040
+ 2. discovery/SOURCE_MATERIALS.md
1041
+ 3. discovery/IDEA_BRIEF.md
1042
+ 4. discovery/OPEN_QUESTIONS.md
1043
+ 5. references/<reference>.md files when used
1044
+ 6. references/README.md, including an explicit no-reference statement when none are used
1045
+ 7. PRODUCT_VISION.md
1046
+ 8. product/FEATURE_CATALOG.md
1047
+ 9. product/MODULE_ROADMAP.md
1048
+ 10. product/DOMAIN_MODEL.md
1049
+ 11. product/OPERATIONAL_FLOW.md
1050
+ 12. product/PRODUCT_DECISIONS.md
1051
+ 13. releases/README.md
1052
+ 14. releases/<release-id>/README.md
1053
+ 15. releases/<release-id>/SCOPE.md
1054
+ 16. releases/<release-id>/DOMAIN_SPEC.md
1055
+ 17. releases/<release-id>/ACCEPTANCE_CRITERIA.md
1056
+ 18. releases/<release-id>/DELIVERABLES.md
1057
+ ```
1058
+
1059
+ The numbered order lists fixed required files plus the conditional reference-file step. Machine-readable `creationOrder` contracts list fixed required files only; dynamic reference files are represented by the `references/<reference>.md` collection rule and must be created before `references/README.md` when used.
1060
+
1061
+ `OPEN_QUESTIONS.md` and `PRODUCT_DECISIONS.md` are living documents. They may be updated at any point, but they must not be skipped.
1062
+
1063
+ ## Hard Utilization Order
1064
+
1065
+ Agents that consume product specs for validation, repair, technical shaping or delivery implementation must read files in this order unless a prompt explicitly narrows scope:
1066
+
1067
+ ```text
1068
+ 1. .wefter/specs/README.md
1069
+ 2. .wefter/specs/releases/<release-id>/README.md
1070
+ 3. .wefter/specs/PRODUCT_VISION.md
1071
+ 4. .wefter/specs/product/PRODUCT_DECISIONS.md
1072
+ 5. .wefter/specs/releases/<release-id>/SCOPE.md
1073
+ 6. .wefter/specs/releases/<release-id>/DOMAIN_SPEC.md
1074
+ 7. .wefter/specs/releases/<release-id>/ACCEPTANCE_CRITERIA.md
1075
+ 8. .wefter/specs/releases/<release-id>/DELIVERABLES.md
1076
+ 9. .wefter/specs/product/DOMAIN_MODEL.md
1077
+ 10. .wefter/specs/product/OPERATIONAL_FLOW.md
1078
+ 11. .wefter/specs/product/FEATURE_CATALOG.md
1079
+ 12. .wefter/specs/product/MODULE_ROADMAP.md
1080
+ 13. .wefter/specs/discovery/OPEN_QUESTIONS.md
1081
+ 14. .wefter/specs/discovery/IDEA_BRIEF.md
1082
+ 15. .wefter/specs/references/
1083
+ ```
1084
+
1085
+ Creation order moves from raw input to refined release handoff. Utilization order starts from responsibility and release source-of-truth files, then moves outward to context.
1086
+
1087
+ ## Precedence Rules
1088
+
1089
+ When files conflict, agents must apply these precedence rules to classify the conflict. They must not silently rewrite history or choose a side without recording the issue.
1090
+
1091
+ Release-level precedence:
1092
+
1093
+ ```text
1094
+ SCOPE.md > DOMAIN_SPEC.md > ACCEPTANCE_CRITERIA.md > DELIVERABLES.md
1095
+ ```
1096
+
1097
+ Product-level precedence:
1098
+
1099
+ ```text
1100
+ PRODUCT_VISION.md > MODULE_ROADMAP.md > FEATURE_CATALOG.md
1101
+ ```
1102
+
1103
+ Decision precedence:
1104
+
1105
+ ```text
1106
+ PRODUCT_DECISIONS.md supersedes older narrative text only when the decision is explicit, dated or otherwise clearly recorded.
1107
+ ```
1108
+
1109
+ Blocking question rule:
1110
+
1111
+ ```text
1112
+ OPEN_QUESTIONS.md with open or deferred release-blocking questions blocks completion regardless of file precedence.
1113
+ ```
1114
+
1115
+ Precedence classifies which file should be repaired or superseded. It does not authorize agents to silently rewrite, ignore or delete conflicting information.
1116
+
1117
+ Hard conflict examples:
1118
+
1119
+ ```text
1120
+ ACCEPTANCE_CRITERIA.md requires behavior outside SCOPE.md -> conflict.
1121
+ DELIVERABLES.md implements item excluded by SCOPE.md -> conflict.
1122
+ DOMAIN_SPEC.md closes a behavior still blocking in OPEN_QUESTIONS.md -> conflict.
1123
+ FEATURE_CATALOG.md marks a future feature but SCOPE.md includes it without decision -> conflict.
1124
+ ```
1125
+
1126
+ ## Agent Responsibilities
1127
+
1128
+ | Agent | Primary files |
1129
+ | --- | --- |
1130
+ | `wefter-product-orchestrator` | All product-shaping files and run artifacts. |
1131
+ | `wefter-product-intake-analyst` | `SOURCE_MATERIALS.md`, `IDEA_BRIEF.md`, `OPEN_QUESTIONS.md`. |
1132
+ | `wefter-product-reference-researcher` | `IDEA_BRIEF.md`, `references/README.md`, `references/<reference>.md`. |
1133
+ | `wefter-product-shaper` | `PRODUCT_VISION.md`, `FEATURE_CATALOG.md`, `MODULE_ROADMAP.md`. |
1134
+ | `wefter-product-domain-modeler` | `DOMAIN_MODEL.md`, `OPERATIONAL_FLOW.md`, `DOMAIN_SPEC.md`. |
1135
+ | `wefter-product-release-planner` | `SCOPE.md`, `ACCEPTANCE_CRITERIA.md`, `DELIVERABLES.md`. |
1136
+ | `wefter-product-auditor` | All files, with focus on contradiction, omission, overreach and ambiguity. |
1137
+ | `wefter-product-validator` | All files, with focus on readiness for delivery implementation. |
1138
+ | `wefter-product-repairer` | Candidate or approved artifacts only, never raw source materials. |
1139
+ | Delivery planner | `DELIVERABLES.md`, `SCOPE.md`, `DOMAIN_SPEC.md`, `ACCEPTANCE_CRITERIA.md`, `PRODUCT_DECISIONS.md`. |
1140
+
1141
+ Agent role boundaries:
1142
+
1143
+ | Agent | Must not do |
1144
+ | --- | --- |
1145
+ | `wefter-product-orchestrator` | Must not invent product decisions to keep the run moving. |
1146
+ | `wefter-product-intake-analyst` | Must not create roadmap, release scope, deliverables or technical decisions. |
1147
+ | `wefter-product-reference-researcher` | Must not convert competitor behavior into requirements or commitments. |
1148
+ | `wefter-product-shaper` | Must not close release scope or domain behavior without release/domain artifacts. |
1149
+ | `wefter-product-domain-modeler` | Must not create database schema, migrations, ORM models or final technical names. |
1150
+ | `wefter-product-release-planner` | Must not create task specs, code instructions or delivery plans. |
1151
+ | `wefter-product-auditor` | Must not edit product specs while auditing. |
1152
+ | `wefter-product-validator` | Must not pass validation with blocking open questions, unresolved conflicts or missing required files. |
1153
+ | `wefter-product-repairer` | Must not change raw source materials or erase conflict evidence. |
1154
+ | Delivery planner | Must not redefine product scope, domain behavior or acceptance criteria. |
1155
+
1156
+ Hard rule:
1157
+
1158
+ When an agent encounters work outside its role boundary, it must record the required handoff, blocker or follow-up instead of performing the work directly.
1159
+
1160
+ ## Completion Gate
1161
+
1162
+ Product shaping is complete only when all conditions are true:
1163
+
1164
+ 1. Every required file exists at the configured spec path.
1165
+ 2. Every required file respects its responsibility and limits.
1166
+ 3. `OPEN_QUESTIONS.md` contains no unresolved blocker for the target release.
1167
+ 4. `PRODUCT_VISION.md` is consistent with release direction.
1168
+ 5. `SCOPE.md` clearly defines included and excluded release scope.
1169
+ 6. `DOMAIN_SPEC.md` covers the complete release scope.
1170
+ 7. `ACCEPTANCE_CRITERIA.md` verifies behavior from `DOMAIN_SPEC.md` without redefining scope.
1171
+ 8. `DELIVERABLES.md` covers release acceptance criteria without becoming task specs.
1172
+ 9. Adversarial review has no blocking findings.
1173
+ 10. Every deliverable intended for implementation is marked `ready`.
1174
+ 11. Final validation states the release is ready for delivery implementation.
1175
+
1176
+ The completion gate has two enforcement layers.
1177
+
1178
+ Deterministic CLI and evidence checks owned by `wefter product validate`:
1179
+
1180
+ - Required configured files exist.
1181
+ - `OPEN_QUESTIONS.md` contains no open or deferred release-blocking question.
1182
+ - `DELIVERABLES.md` has valid ready statuses and required fields.
1183
+ - `DELIVERABLES.md` does not contain obvious task, code or task-level TDD markers.
1184
+ - Adversarial review and final validation evidence exist at the canonical paths inside the selected run and contain passing evidence. These evidence gates are mandatory for completion.
1185
+
1186
+ Semantic checks owned by product auditor, product validator and human decisions:
1187
+
1188
+ - Required files respect their responsibility and limits.
1189
+ - `PRODUCT_VISION.md` is consistent with release direction.
1190
+ - `SCOPE.md` clearly defines included and excluded release scope.
1191
+ - `DOMAIN_SPEC.md` covers the complete release scope.
1192
+ - `ACCEPTANCE_CRITERIA.md` verifies behavior from `DOMAIN_SPEC.md` without redefining scope.
1193
+ - `DELIVERABLES.md` covers release acceptance criteria without becoming detailed implementation planning beyond deterministic markers.
1194
+ - Applicable documentation-audit drift findings are resolved, marked not applicable or recorded as blockers/human decisions.
1195
+
1196
+ `wefter product validate` is the deterministic gate plus verification that required prompt/human semantic evidence exists and declares pass. It must not pretend to prove semantic coverage by regex.
1197
+
1198
+ ## Doctrine Stability Criteria
1199
+
1200
+ This README is stable enough to derive schemas, configs, prompts, agents and tests only when all conditions are true:
1201
+
1202
+ 1. Every required product spec file has a contract.
1203
+ 2. Every file contract defines why the file exists, limits, creation order, usage order, consumers, minimum content and hard rules.
1204
+ 3. The default tree is self-contained under `.wefter/specs/` and separates specs, workflows and runs.
1205
+ 4. The vocabulary is consistent with `idea -> product specs -> release -> deliverable -> task`.
1206
+ 5. Legacy vocabulary appears only as migration or compatibility language.
1207
+ 6. Creation order and utilization order are explicit and non-conflicting.
1208
+ 7. Precedence rules and conflict examples are explicit.
1209
+ 8. Drift prevention rules cover upstream and downstream spec changes.
1210
+ 9. Agent responsibilities and role boundaries are explicit.
1211
+ 10. Completion gate and delivery handoff rules are explicit.
1212
+ 11. No known TODO, placeholder or unresolved doctrine question remains in this README.
1213
+ 12. Any remaining decision that requires human approval is recorded outside the README as a task result or open question.
1214
+
1215
+ ## Handoff To Delivery Implementation
1216
+
1217
+ The only product-shaping handoff artifact for implementation is:
1218
+
1219
+ ```text
1220
+ .wefter/specs/releases/<release-id>/DELIVERABLES.md
1221
+ ```
1222
+
1223
+ Delivery implementation must consume one configured deliverable from `DELIVERABLES.md` and cross-check it against:
1224
+
1225
+ ```text
1226
+ .wefter/specs/releases/<release-id>/SCOPE.md
1227
+ .wefter/specs/releases/<release-id>/DOMAIN_SPEC.md
1228
+ .wefter/specs/releases/<release-id>/ACCEPTANCE_CRITERIA.md
1229
+ .wefter/specs/product/PRODUCT_DECISIONS.md
1230
+ ```
1231
+
1232
+ The implementation workflow turns one deliverable into:
1233
+
1234
+ ```text
1235
+ delivery-plan.md
1236
+ traceability-matrix.md
1237
+ verification-plan.md
1238
+ gate-assessment.md
1239
+ task-specs/
1240
+ task logs
1241
+ task reviews
1242
+ final validation
1243
+ ```
1244
+
1245
+ Agents must not create task specs during product shaping. If a product-shaping agent identifies likely tasks, it must either keep them at deliverable granularity or record them as implementation notes inside the appropriate deliverable without task-level detail.