ultra-builder-pro-cli 0.14.0 → 0.16.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 (163) hide show
  1. package/.ultra-template/docs/research/README.md +11 -7
  2. package/.ultra-template/specs/architecture.md +36 -36
  3. package/.ultra-template/specs/discovery.md +46 -33
  4. package/.ultra-template/specs/product.md +38 -29
  5. package/.ultra-template/specs/research-distillate.md +48 -0
  6. package/.ultra-template/tasks/contexts/TEMPLATE.md +11 -28
  7. package/CHANGELOG.md +77 -1
  8. package/README.md +46 -24
  9. package/adapters/_shared/codex-assets.cjs +6 -2
  10. package/adapters/_shared/file-ops.cjs +6 -2
  11. package/adapters/_shared/handbook.cjs +2 -1
  12. package/adapters/claude.js +3 -2
  13. package/adapters/codex.js +1 -0
  14. package/adapters/kimi.js +3 -2
  15. package/adapters/opencode.js +3 -2
  16. package/agents/review-coordinator.md +9 -6
  17. package/commands/ultra-change.md +1 -1
  18. package/commands/ultra-plan.md +1 -1
  19. package/commands/ultra-research.md +1 -1
  20. package/commands/ultra-think.md +2 -2
  21. package/docs/AGENT-CONTEXT.md +43 -19
  22. package/docs/ARCHITECTURE.md +54 -13
  23. package/docs/PLAN.zh-CN.md +4 -2
  24. package/docs/ROADMAP.md +10 -4
  25. package/docs/RUNTIME-COMPAT-MATRIX.md +4 -4
  26. package/docs/STATE-DB-ACCESS-POLICY.md +33 -29
  27. package/docs/USER-HANDBOOK-CONTRACT.md +8 -2
  28. package/docs/WORKFLOW-LIFECYCLE.md +342 -0
  29. package/hooks/README.md +6 -1
  30. package/hooks/health_check.py +12 -3
  31. package/hooks/subagent_tracker.py +52 -77
  32. package/mcp-server/hook-event.cjs +34 -0
  33. package/mcp-server/lib/archive-journal.cjs +17 -5
  34. package/mcp-server/lib/baseline-workflow.cjs +158 -18
  35. package/mcp-server/lib/change-workflow.cjs +598 -85
  36. package/mcp-server/lib/context-spine.cjs +305 -25
  37. package/mcp-server/lib/decision-dialogue.cjs +713 -0
  38. package/mcp-server/lib/doctor.cjs +42 -3
  39. package/mcp-server/lib/init-project.cjs +210 -16
  40. package/mcp-server/lib/plan-store.cjs +4 -1
  41. package/mcp-server/lib/pricing.cjs +7 -10
  42. package/mcp-server/lib/project-breadcrumb.cjs +15 -0
  43. package/mcp-server/lib/projector.cjs +57 -3
  44. package/mcp-server/lib/spec-learning.cjs +79 -2
  45. package/mcp-server/lib/state-db.cjs +168 -8
  46. package/mcp-server/lib/state-ops.cjs +160 -9
  47. package/mcp-server/lib/workflow-state.cjs +2305 -0
  48. package/mcp-server/server.cjs +215 -15
  49. package/orchestrator/daemon.cjs +1 -2
  50. package/orchestrator/dispatch-rules.cjs +5 -31
  51. package/orchestrator/planner/plan-builder.cjs +21 -12
  52. package/package.json +13 -3
  53. package/skills/ultra-change/SKILL.md +94 -80
  54. package/skills/ultra-change/references/change-contract.md +36 -0
  55. package/skills/ultra-deliver/SKILL.md +76 -79
  56. package/skills/ultra-deliver/references/baseline-reconciliation.md +20 -0
  57. package/skills/ultra-dev/SKILL.md +62 -59
  58. package/skills/ultra-doctor/SKILL.md +61 -82
  59. package/skills/ultra-init/SKILL.md +101 -103
  60. package/skills/ultra-init/references/brownfield-adoption.md +2 -2
  61. package/skills/ultra-plan/SKILL.md +99 -85
  62. package/skills/ultra-plan/references/semantic-preflight.md +18 -0
  63. package/skills/ultra-research/SKILL.md +102 -60
  64. package/skills/ultra-research/references/00-problem-validation.md +36 -0
  65. package/skills/ultra-research/references/01-opportunity-discovery.md +33 -0
  66. package/skills/ultra-research/references/02-market-assessment.md +30 -0
  67. package/skills/ultra-research/references/03-competitive-landscape.md +31 -0
  68. package/skills/ultra-research/references/04-product-strategy.md +32 -0
  69. package/skills/ultra-research/references/05-assumptions-validation.md +31 -0
  70. package/skills/ultra-research/references/10-user-personas.md +29 -0
  71. package/skills/ultra-research/references/11-user-scenarios.md +28 -0
  72. package/skills/ultra-research/references/20-user-stories.md +30 -0
  73. package/skills/ultra-research/references/21-features-scope.md +29 -0
  74. package/skills/ultra-research/references/22-success-metrics.md +28 -0
  75. package/skills/ultra-research/references/30-architecture-context.md +30 -0
  76. package/skills/ultra-research/references/31-solution-strategy.md +28 -0
  77. package/skills/ultra-research/references/32-building-blocks.md +28 -0
  78. package/skills/ultra-research/references/40-deployment.md +29 -0
  79. package/skills/ultra-research/references/41-quality-risks.md +28 -0
  80. package/skills/ultra-research/references/99-synthesis.md +35 -0
  81. package/skills/ultra-review/SKILL.md +63 -73
  82. package/skills/ultra-review/references/review-modes.md +27 -0
  83. package/skills/ultra-review/references/unified-schema.md +25 -0
  84. package/skills/ultra-review/scripts/review_wait.py +40 -3
  85. package/skills/ultra-status/SKILL.md +41 -41
  86. package/skills/ultra-test/SKILL.md +54 -55
  87. package/skills/ultra-think/SKILL.md +26 -12
  88. package/skills/ultra-think/references/decision-dialogue.md +130 -0
  89. package/skills/ultra-verify/SKILL.md +1 -1
  90. package/skills/ultra-verify/references/{confidence-system.md → evidence-status.md} +3 -3
  91. package/spec/cli-protocol.md +17 -3
  92. package/spec/mcp-tools.yaml +683 -64
  93. package/spec/schemas/baseline-reconciliation.v1.schema.json +73 -0
  94. package/spec/schemas/delivery-report.v1.schema.json +111 -0
  95. package/spec/schemas/mcp-tools.schema.json +1 -1
  96. package/spec/schemas/state-db.sql +140 -1
  97. package/spec/schemas/tasks.v4.5.schema.json +8 -1
  98. package/spec/schemas/test-report.v1.schema.json +194 -0
  99. package/ultra-tools/cli.cjs +1 -1
  100. package/ultra-tools/commands/migrate.cjs +3 -3
  101. package/ultra-tools/commands/status.cjs +228 -12
  102. package/.ultra-template/delivery-report.json +0 -9
  103. package/.ultra-template/test-report.json +0 -8
  104. package/adapters/_shared/tests/file-ops.test.cjs +0 -54
  105. package/adapters/_shared/tests/frontmatter.test.cjs +0 -47
  106. package/adapters/_shared/tests/handbook.test.cjs +0 -101
  107. package/adapters/_shared/tests/path-rewrite.test.cjs +0 -60
  108. package/adapters/_shared/tests/provenance.test.cjs +0 -133
  109. package/adapters/_shared/tests/resolve-target.test.cjs +0 -75
  110. package/adapters/_shared/tests/runtime-assets.test.cjs +0 -149
  111. package/adapters/_shared/tests/settings-merge.test.cjs +0 -85
  112. package/adapters/_shared/tests/validate.test.cjs +0 -30
  113. package/adapters/tests/claude.test.cjs +0 -138
  114. package/adapters/tests/codex-hook.test.cjs +0 -142
  115. package/adapters/tests/codex.test.cjs +0 -430
  116. package/adapters/tests/kimi-hook.test.cjs +0 -149
  117. package/adapters/tests/kimi.test.cjs +0 -259
  118. package/adapters/tests/opencode.test.cjs +0 -357
  119. package/mcp-server/lib/archive-journal.test.cjs +0 -35
  120. package/mcp-server/lib/baseline-workflow.test.cjs +0 -477
  121. package/mcp-server/lib/change-workflow.test.cjs +0 -971
  122. package/mcp-server/lib/context-spine.test.cjs +0 -93
  123. package/mcp-server/lib/doctor.test.cjs +0 -148
  124. package/mcp-server/lib/plan-store.test.cjs +0 -132
  125. package/mcp-server/lib/prd-parser.test.cjs +0 -82
  126. package/mcp-server/lib/project-breadcrumb.test.cjs +0 -112
  127. package/mcp-server/lib/runtime-state.test.cjs +0 -92
  128. package/mcp-server/lib/spec-learning.test.cjs +0 -67
  129. package/mcp-server/lib/state-db.test.cjs +0 -314
  130. package/mcp-server/lib/task-expander.test.cjs +0 -169
  131. package/mcp-server/lib/topo.test.cjs +0 -158
  132. package/mcp-server/tests/circuit-breaker.test.cjs +0 -125
  133. package/mcp-server/tests/commit-hash-flow.test.cjs +0 -117
  134. package/mcp-server/tests/concurrency-update.test.cjs +0 -96
  135. package/mcp-server/tests/concurrency.test.cjs +0 -112
  136. package/mcp-server/tests/db-ops.test.cjs +0 -121
  137. package/mcp-server/tests/init-project.test.cjs +0 -393
  138. package/mcp-server/tests/migrate.test.cjs +0 -232
  139. package/mcp-server/tests/projector.test.cjs +0 -162
  140. package/mcp-server/tests/server-contract.test.cjs +0 -1467
  141. package/mcp-server/tests/staleness.test.cjs +0 -190
  142. package/mcp-server/tests/state-db.test.cjs +0 -106
  143. package/mcp-server/tests/state-ops.test.cjs +0 -449
  144. package/mcp-server/tests/tagged-tasks.test.cjs +0 -163
  145. package/mcp-server/tests/telemetry.test.cjs +0 -219
  146. package/orchestrator/planner/plan-builder.test.cjs +0 -165
  147. package/orchestrator/tests/auto-merge.test.cjs +0 -216
  148. package/orchestrator/tests/daemon.test.cjs +0 -311
  149. package/orchestrator/tests/dispatch-rules.test.cjs +0 -124
  150. package/orchestrator/tests/parallel-orchestrator.test.cjs +0 -233
  151. package/orchestrator/tests/phase-8b-gate.test.cjs +0 -183
  152. package/orchestrator/tests/recovery.test.cjs +0 -190
  153. package/orchestrator/tests/session-runner.test.cjs +0 -314
  154. package/orchestrator/tests/skill-miner.test.cjs +0 -147
  155. package/orchestrator/tests/worktree-manager.test.cjs +0 -148
  156. package/skills/ultra-research/references/architecture.md +0 -38
  157. package/skills/ultra-research/references/problem-product.md +0 -39
  158. package/skills/ultra-research/references/quality-delivery.md +0 -34
  159. package/skills/ultra-research/references/synthesis.md +0 -38
  160. package/skills/ultra-research/references/users-scope.md +0 -40
  161. package/ultra-tools/legacy-memory.test.cjs +0 -80
  162. package/ultra-tools/status-command.test.cjs +0 -181
  163. package/ultra-tools/system-command.test.cjs +0 -309
@@ -0,0 +1,18 @@
1
+ # Semantic planning preflight
2
+
3
+ Before task decomposition, read the normalized Change Contract and the current
4
+ change-bound research records.
5
+
6
+ 1. Resolve every blocking `unresolved_decision` or return to `ultra-change`.
7
+ 2. When research is recorded, verify one completed run has the same mode and selected
8
+ step set. Re-run stale or missing evidence through `ultra-research`.
9
+ 3. Build a coverage ledger from Change acceptance ids to task acceptance ids.
10
+ 4. Bind every task to an accepted id, semantic record id, semantic source ref, or real
11
+ Markdown anchor through `trace_to`.
12
+ 5. Check that every task reaches a public consumer and owns its error, documentation,
13
+ verification, and recovery obligations.
14
+ 6. Validate dependencies and ensure a quick profile contains exactly one task.
15
+
16
+ Treat the MCP completion result as the final planning gate. It derives the coverage
17
+ matrix from durable records and rejects unresolved decisions, missing research,
18
+ uncovered acceptance, orphan tasks, incomplete contracts, or invalid topology.
@@ -1,75 +1,117 @@
1
1
  ---
2
2
  name: ultra-research
3
- description: Turn uncertain product or architecture intent into evidence-backed baseline specifications with explicit decisions and traceable acceptance. Use when an Ultra project has unresolved requirements that are not ready for planning.
3
+ description: Establish or extend an evidence-backed Ultra product and architecture baseline through the complete semantic research workflow, with resumable step state and traceable outputs. Use when initialization routes to research, baseline evidence is incomplete, or the owner explicitly requests bounded research for an active change.
4
4
  ---
5
5
 
6
- # Build a validated baseline
6
+ # Establish research authority without overwhelming the owner
7
7
 
8
- Research only the uncertainty that blocks a durable product, architecture, or delivery
9
- decision. Do not force a fixed discovery ceremony onto a well-defined change.
8
+ Use host reasoning to discover facts and synthesize artifacts. Use Ultra MCP for run
9
+ position, decision authority, output digests, blockers, and convergence. Read
10
+ `../ultra-think/references/decision-dialogue.md` before asking any owner question.
11
+ Never ask MCP to generate research content.
10
12
 
11
- ## Preflight
13
+ ## Bind the run
12
14
 
13
- 1. Require an initialized `.ultra/specs/` directory and call `baseline.get`. Route to
14
- `ultra-init` when state or the baseline is absent. Preserve its mode and id.
15
- 2. Read the current specification files and repository evidence before asking the
16
- user to repeat known facts.
17
- 3. Define the intended deliverable, unresolved decisions, and evidence standard.
18
- 4. Select only the research lanes that the uncertainty requires:
19
- - problem and product: `references/problem-product.md`;
20
- - users and scope: `references/users-scope.md`;
21
- - architecture: `references/architecture.md`;
22
- - quality and delivery: `references/quality-delivery.md`;
23
- - final traceability: `references/synthesis.md`.
15
+ 1. Call `baseline.get`. Route absent, migrated, unreadable, or corrupt authority to
16
+ `ultra-init` or `ultra-doctor` as reported.
17
+ 2. Call `workflow.list` for `kind: "research"` and the bound baseline or change. Resume
18
+ the active, blocked, or ready run; use `workflow.get` before doing more work.
19
+ 3. When no run exists:
20
+ - start `full` for an initial greenfield baseline;
21
+ - start `adoption` for a brownfield baseline;
22
+ - use `product`, `feature`, `architecture`, or `custom` only when the owner
23
+ explicitly selected that bounded scope for an active change.
24
24
 
25
- Read a reference completely only when its lane is selected. Do not load all lanes by
26
- default.
25
+ Never infer an MVP, reduced product posture, skipped step, or release phase. Full and
26
+ adoption modes execute all seventeen semantic steps. A custom run records every
27
+ excluded step and its selection reason in DB.
27
28
 
28
- ## Evidence discipline
29
+ ## Preserve complete semantic coverage
29
30
 
30
- - Prefer the current checkout and existing project artifacts for repository facts.
31
- - Browse only when a claim is external, unstable, or requires primary-source support.
32
- - Prefer official and primary sources; cite each consequential external claim near the
33
- statement it supports.
34
- - Separate observed facts, evidence-backed inferences, user decisions, and unresolved
35
- assumptions.
36
- - Do not manufacture confidence percentages, market numbers, personas, competitors,
37
- or options when evidence does not support them.
31
+ Read only the reference matching `workflow.next_step.step_id`:
38
32
 
39
- ## Workflow
33
+ | Step | Reference |
34
+ |---|---|
35
+ | `00-problem-validation` | `references/00-problem-validation.md` |
36
+ | `01-opportunity-discovery` | `references/01-opportunity-discovery.md` |
37
+ | `02-market-assessment` | `references/02-market-assessment.md` |
38
+ | `03-competitive-landscape` | `references/03-competitive-landscape.md` |
39
+ | `04-product-strategy` | `references/04-product-strategy.md` |
40
+ | `05-assumptions-validation` | `references/05-assumptions-validation.md` |
41
+ | `10-user-personas` | `references/10-user-personas.md` |
42
+ | `11-user-scenarios` | `references/11-user-scenarios.md` |
43
+ | `20-user-stories` | `references/20-user-stories.md` |
44
+ | `21-features-scope` | `references/21-features-scope.md` |
45
+ | `22-success-metrics` | `references/22-success-metrics.md` |
46
+ | `30-architecture-context` | `references/30-architecture-context.md` |
47
+ | `31-solution-strategy` | `references/31-solution-strategy.md` |
48
+ | `32-building-blocks` | `references/32-building-blocks.md` |
49
+ | `40-deployment` | `references/40-deployment.md` |
50
+ | `41-quality-risks` | `references/41-quality-risks.md` |
51
+ | `99-synthesis` | `references/99-synthesis.md` |
40
52
 
41
- 1. Build a short research agenda from the selected lanes and the decisions they must
42
- unlock.
43
- 2. Gather evidence before recommending a direction. Ask one concise question when a
44
- user decision is load-bearing; batch independent low-impact questions only when it
45
- improves flow.
46
- 3. Present material tradeoffs before recording a decision. Comparisons are appropriate
47
- only when real alternatives share meaningful criteria.
48
- 4. Update the relevant baseline specification sections. Preserve source links,
49
- decisions, rejected alternatives when useful, acceptance criteria, and explicit
50
- open questions. Do not duplicate the same narrative across several files.
51
- 5. Validate cross-document consistency and trace each required behavior from problem
52
- or constraint to acceptance and architecture.
53
- 6. Use `references/synthesis.md` for the completion check.
54
- 7. Record unresolved evidence as the baseline gap ledger: `baseline_blocker`,
55
- `documentation_drift`, `known_defect`, `technical_debt`, `unknown`, or
56
- `future_change`. Keep accepted non-blocking work out of the implementation backlog
57
- until the owner selects it.
58
- 8. Call `baseline.record` with the complete current specification list, bounded evidence
59
- references, actual verification results, provider metadata, explicit unknowns,
60
- classification, and the full gap ledger. Use the returned repository revision for
61
- convergence.
62
- 9. Present the baseline, open gaps, dirty-worktree state, and any known-red verification
63
- to the owner. After explicit approval, call `baseline.converge`, setting acceptance
64
- flags only for the exact known-red or dirty snapshot approved by the owner. Resolve
65
- deterministic blockers before routing.
53
+ The seventeen steps are an internal completeness contract, not a questionnaire or the
54
+ default user interface. For each selected step:
66
55
 
67
- ## Completion gate
56
+ 1. Read only its reference and inspect repository, specification, runtime, tests, and
57
+ current primary-source evidence. Do not ask the owner to repeat observable facts.
58
+ 2. Separate `Observed`, `Verified`, `Decided`, and `Unknown`. Resolve evidence-answerable
59
+ unknowns autonomously and record evidence-backed `not_applicable` results.
60
+ 3. If a load-bearing owner decision remains, start or resume one decision thread bound
61
+ to this research workflow. Open the earliest dependent decision, present only that
62
+ question, and STOP. Do not update specifications or complete the workflow step while
63
+ its checkpoint is unconfirmed.
64
+ 4. After a coherent decision cluster, prepare one checkpoint. Present the compact
65
+ shared understanding and affected specifications, obtain approval, and apply the
66
+ accepted decisions.
67
+ 5. Update only the relevant baseline specification or active-change research artifact.
68
+ Preserve evidence, decisions, drift, and unknowns without copying conversation text.
69
+ Write the accepted cluster to the stable
70
+ `.ultra/docs/decisions/<thread-id>.md` projection and confirm its checkpoint with
71
+ that digest. Do not bind an intermediate shared specification that later research
72
+ steps are expected to extend.
73
+ 6. Write one immutable step report at
74
+ `.ultra/docs/research/<workflow-id>/<step-id>.md`. It must have a title and the
75
+ sections `Evidence`, `Specification updates`, and `Decisions and unknowns`. Link
76
+ specification anchors and external sources; do not copy transcripts or provider
77
+ payloads.
78
+ 7. Call `workflow.step` with `completed`, bounded evidence references, that step report
79
+ as `research-step-report`, material decisions, and one or more `semantic_records`.
80
+ Each record has a stable `id`, the step-specific `kind` and `attributes` named in
81
+ its reference, a status (`observed`, `verified`, `decided`, `accepted`, `unknown`,
82
+ or `not_applicable`), a concise summary, evidence refs, optional typed links, and a
83
+ project-relative `source_ref` using `path#anchor`. Use the immutable step report as
84
+ the source when later edits could change a shared specification. MCP verifies the
85
+ anchor and stores its digest; `not_applicable` requires an evidence-backed rationale.
86
+ 8. For `99-synthesis` in `full` or `adoption` mode, also bind the current
87
+ `discovery.md`, `product.md`, `architecture.md`, and `research-distillate.md` as
88
+ outputs. This freezes the exact researched baseline without making the reports a
89
+ second specification authority.
90
+ 9. If evidence or owner authority is missing, call `workflow.step` with `blocked` and
91
+ specific blocker codes. Resume that same step after resolution; never skip a
92
+ required step to obtain a ready state.
68
93
 
69
- Research is complete when the selected scope has enough evidence for planning, every
70
- material decision is recorded, required acceptance is testable, architecture respects
71
- known constraints, and unresolved items are either blocking or explicitly outside the
72
- accepted scope.
94
+ ## Converge
73
95
 
74
- Route a converged baseline to `ultra-plan`. Do not create business tasks, write raw
75
- SQLite, or maintain a second condensed specification that can drift from the baseline.
96
+ When all selected steps are ready, call `workflow.complete` and read the completed run
97
+ back. Missing or stale output blocks completion.
98
+
99
+ For initial or adoption research, call `baseline.record` with discovery, product, and
100
+ architecture specification refs; current repository revision and scope; bounded source,
101
+ docs, runtime, test, deployment, and external evidence; actual verification commands
102
+ and results; unknowns; the complete gap ledger; classification; and external provider
103
+ metadata references. Do not store prompts, transcripts, memory, or graph content.
104
+
105
+ Present the recorded revision, worktree snapshot, known failures, blockers, and gaps.
106
+ Only after explicit owner approval call `baseline.converge`. Reuse the final research
107
+ checkpoint approval when it names this exact recorded revision, worktree snapshot,
108
+ known failures, blockers, and gaps; do not ask for an equivalent approval again. If
109
+ that snapshot changed, prepare one refreshed checkpoint instead. Accept known-red or a
110
+ dirty worktree only when that exact snapshot was approved. Convergence must verify the
111
+ completed full/adoption research run and current output digests.
112
+
113
+ Return a compact checkpoint: workflow id, completed/selected semantic coverage,
114
+ current decision or blocker, baseline state, open gaps, approval state, and one route.
115
+ Do not print all seventeen report paths unless requested; they remain discoverable
116
+ through workflow state. A ready initial baseline routes to `ultra-change`; bounded
117
+ change research returns to its breadcrumb and then `ultra-plan` when ready.
@@ -0,0 +1,36 @@
1
+ # Problem validation
2
+
3
+ Use for workflow step `00-problem-validation`.
4
+
5
+ ## Objective
6
+
7
+ Establish the problem, affected actor, current workaround, consequence, and available
8
+ demand evidence. In brownfield adoption, describe the behavior the current system
9
+ already serves before discussing future intent.
10
+
11
+ ## Evidence
12
+
13
+ - Inspect existing product documents, user-facing entry points, support evidence, and
14
+ runtime behavior before asking the owner for facts already present.
15
+ - Treat an owner statement as a decision or claim, not as observed user evidence.
16
+ - Record absent evidence as `Unknown`; do not invent demand, urgency, or a target user.
17
+ - Use external research only when a consequential claim depends on current facts.
18
+
19
+ ## Record
20
+
21
+ Update `discovery.md` with `Observed`, `Verified`, `Decided`, and `Unknown` entries for:
22
+
23
+ - problem and affected actor;
24
+ - current workaround and consequence;
25
+ - demand or usage evidence;
26
+ - the narrowest owner-approved problem boundary;
27
+ - unresolved validation needs.
28
+
29
+ Link the updated specification anchor from the immutable step report required by the
30
+ orchestrator. A missing load-bearing fact becomes a blocker or baseline gap, not a
31
+ guessed answer.
32
+
33
+ ## Semantic record
34
+
35
+ Use kind `problem`. Record `actor`, `current_workaround`, `consequence`, and
36
+ `evidence_status`.
@@ -0,0 +1,33 @@
1
+ # Opportunity discovery
2
+
3
+ Use for workflow step `01-opportunity-discovery`.
4
+
5
+ ## Objective
6
+
7
+ Connect the validated problem to desired outcomes and evidence-backed opportunities.
8
+ Describe opportunities from the actor's perspective rather than as a feature list.
9
+
10
+ ## Evidence
11
+
12
+ - Derive current outcomes from observed workflows, existing behavior, interviews, or
13
+ owner decisions.
14
+ - Preserve causal links between a problem, an unmet outcome, and its evidence.
15
+ - Do not force rankings, solution brainstorming, or a fixed number of opportunities.
16
+ - Record opportunities that lack evidence as unknown or future research.
17
+
18
+ ## Record
19
+
20
+ Update `discovery.md` with:
21
+
22
+ - desired outcomes and their evidence;
23
+ - opportunity statements and affected actors;
24
+ - constraints or dependencies;
25
+ - owner-decided priority when one exists;
26
+ - rejected or deferred opportunities only when that decision is durable.
27
+
28
+ Complete the step with the evidence used and the updated output path.
29
+
30
+ ## Semantic record
31
+
32
+ Use kind `opportunity`. Record `actor`, `desired_outcome`, and `evidence_status`. Link
33
+ the record to its problem when that relation is established.
@@ -0,0 +1,30 @@
1
+ # Market assessment
2
+
3
+ Use for workflow step `02-market-assessment`.
4
+
5
+ ## Objective
6
+
7
+ Record only market facts that materially affect product scope, economics, regulation,
8
+ or delivery. For an internal tool or a brownfield system with no market decision, state
9
+ that boundary and retain the evidence supporting it.
10
+
11
+ ## Evidence
12
+
13
+ - Prefer current primary sources, filings, official statistics, and directly observed
14
+ commercial data.
15
+ - Preserve source date, geography, segment definition, and calculation assumptions.
16
+ - Do not manufacture TAM, growth rates, pricing, or false numeric precision.
17
+ - Separate externally verified facts from owner targets and estimates.
18
+
19
+ ## Record
20
+
21
+ Update `discovery.md` with relevant segment boundaries, commercial or operational
22
+ constraints, source-backed measurements, assumptions, and unknowns. Include a sizing
23
+ model only when the decision genuinely depends on one and the inputs are defensible.
24
+
25
+ Link source references and the updated specification anchor from the immutable step
26
+ report required by the orchestrator.
27
+
28
+ ## Semantic record
29
+
30
+ Use kind `market_constraint`. Record `constraint`, `decision_impact`, and `freshness`.
@@ -0,0 +1,31 @@
1
+ # Competitive landscape
2
+
3
+ Use for workflow step `03-competitive-landscape`.
4
+
5
+ ## Objective
6
+
7
+ Identify the alternatives actors actually use and the consequences for strategy.
8
+ Alternatives may include direct products, adjacent tools, manual workflows, or doing
9
+ nothing.
10
+
11
+ ## Evidence
12
+
13
+ - Use current product documentation, pricing, repositories, filings, or observed user
14
+ workflows.
15
+ - Evaluate only criteria that change the decision at hand.
16
+ - Do not create a ceremonial matrix, fixed competitor count, or unsupported claim of
17
+ superiority.
18
+ - Distinguish a verified capability from marketing language and inference.
19
+
20
+ ## Record
21
+
22
+ Update `discovery.md` with the relevant alternatives, evidence, meaningful differences,
23
+ switching constraints, and durable strategy implications. Record an unknown when a
24
+ credible alternative cannot be verified.
25
+
26
+ Complete the step with evidence references and the updated output path.
27
+
28
+ ## Semantic record
29
+
30
+ Use kind `alternative`. Record `category`, `switching_constraint`, and
31
+ `strategy_implication`.
@@ -0,0 +1,32 @@
1
+ # Product strategy
2
+
3
+ Use for workflow step `04-product-strategy`.
4
+
5
+ ## Objective
6
+
7
+ Turn accepted evidence into a product direction, target boundary, value proposition,
8
+ and explicit tradeoffs.
9
+
10
+ ## Evidence and decisions
11
+
12
+ - Derive constraints from prior research and current system behavior.
13
+ - Ask the owner when a scope, customer, business, or risk decision is load-bearing.
14
+ - Do not infer an MVP, reduced scope, release phase, or commercial posture.
15
+ - Record exclusions only when the owner or an accepted constraint establishes them.
16
+
17
+ ## Record
18
+
19
+ Update `discovery.md` with:
20
+
21
+ - product direction and intended actors;
22
+ - value delivered through observable behavior;
23
+ - chosen tradeoffs and their rationale;
24
+ - constraints, exclusions, and unresolved decisions;
25
+ - any defensibility claim with its supporting evidence.
26
+
27
+ Complete the step with decision and evidence references plus the updated output path.
28
+
29
+ ## Semantic record
30
+
31
+ Use kind `strategy_decision`. Record `tradeoff` and `rationale`, then link the decision
32
+ to the problems, opportunities, or constraints that support it.
@@ -0,0 +1,31 @@
1
+ # Assumptions and validation
2
+
3
+ Use for workflow step `05-assumptions-validation`.
4
+
5
+ ## Objective
6
+
7
+ Make load-bearing assumptions visible and define the smallest credible evidence needed
8
+ to confirm or reject them.
9
+
10
+ ## Method
11
+
12
+ - Extract assumptions from problem, opportunity, market, alternative, and strategy
13
+ claims.
14
+ - Separate already verified facts from assumptions and owner decisions.
15
+ - Prioritize by consequence and uncertainty only when prioritization affects the next
16
+ action; do not assign arbitrary scores.
17
+ - Define a validation signal, evidence source, decision rule, owner, and recovery path.
18
+
19
+ ## Record
20
+
21
+ Update `discovery.md` with the assumption ledger and validation state. Map unresolved
22
+ load-bearing assumptions to blocking unknowns or gaps. Keep non-blocking future work
23
+ out of the implementation task graph until the owner selects it.
24
+
25
+ Link evidence and the updated specification anchor from the immutable step report
26
+ required by the orchestrator.
27
+
28
+ ## Semantic record
29
+
30
+ Use kind `assumption`. Record `category`, `consequence`, `validation_signal`,
31
+ `success_rule`, `failure_rule`, and `ambiguous_rule`.
@@ -0,0 +1,29 @@
1
+ # Actors and jobs
2
+
3
+ Use for workflow step `10-user-personas`.
4
+
5
+ ## Objective
6
+
7
+ Describe evidence-backed actors, their jobs, operating context, goals, constraints, and
8
+ adoption barriers. A role or actor model is sufficient; do not invent demographic
9
+ personas.
10
+
11
+ ## Evidence
12
+
13
+ - Prefer observed workflows, access roles, support evidence, usage data, and owner
14
+ decisions.
15
+ - Link each actor to a real entry point or intended behavior.
16
+ - Mark unverified motivations and pain points as unknown.
17
+ - In brownfield adoption, document the actors represented by current code and runtime,
18
+ even when product research is incomplete.
19
+
20
+ ## Record
21
+
22
+ Update `product.md` with actor identity, job, context, current workflow, desired outcome,
23
+ constraints, and evidence. Record priority only when it is an accepted decision.
24
+
25
+ Complete the step with evidence references and the updated output path.
26
+
27
+ ## Semantic record
28
+
29
+ Use kind `actor`. Record `job`, `current_workflow`, `goal`, and `constraint`.
@@ -0,0 +1,28 @@
1
+ # User scenarios
2
+
3
+ Use for workflow step `11-user-scenarios`.
4
+
5
+ ## Objective
6
+
7
+ Trace the important current and intended journeys from trigger through outcome,
8
+ including failure and recovery.
9
+
10
+ ## Method
11
+
12
+ - Bind each scenario to an evidence-backed actor and entry point.
13
+ - Describe the current path before proposing a changed path in brownfield adoption.
14
+ - Include state changes, external systems, permissions, and observable outcomes.
15
+ - Do not force a fixed scenario count or emotional narrative.
16
+
17
+ ## Record
18
+
19
+ Update `product.md` with scenario id, actor, trigger, preconditions, current or intended
20
+ flow, success outcome, failure outcome, recovery, and evidence. Mark gaps where runtime
21
+ behavior and documentation disagree.
22
+
23
+ Complete the step with evidence references and the updated output path.
24
+
25
+ ## Semantic record
26
+
27
+ Use kind `scenario`. Record `actor_id`, `trigger`, `preconditions`, `flow`, `success`,
28
+ `failure`, and `recovery`.
@@ -0,0 +1,30 @@
1
+ # Behavioral requirements and acceptance
2
+
3
+ Use for workflow step `20-user-stories`.
4
+
5
+ ## Objective
6
+
7
+ Translate accepted scenarios into testable behavior without prematurely designing the
8
+ implementation.
9
+
10
+ ## Method
11
+
12
+ - Use stable requirement identifiers.
13
+ - State preconditions, action, observable result, error behavior, and recovery where
14
+ relevant.
15
+ - Trace every requirement to a scenario, constraint, or owner decision.
16
+ - Preserve current delivered behavior separately from proposed behavior.
17
+ - Do not use priority labels as a substitute for explicit scope decisions.
18
+
19
+ ## Record
20
+
21
+ Update `product.md` with requirements and acceptance criteria that can map to an
22
+ executable check or deliberate manual evidence. Record unknown behavior instead of
23
+ writing vague acceptance.
24
+
25
+ Complete the step with evidence references and the updated output path.
26
+
27
+ ## Semantic record
28
+
29
+ Use kind `requirement`. Record `preconditions`, `action`, `observable_result`,
30
+ `error_recovery`, and `verification`. Link it to its accepted scenario or decision.
@@ -0,0 +1,29 @@
1
+ # Capability and scope boundary
2
+
3
+ Use for workflow step `21-features-scope`.
4
+
5
+ ## Objective
6
+
7
+ Group accepted behavior into coherent capabilities and record what is included,
8
+ excluded, deferred, or unresolved.
9
+
10
+ ## Rules
11
+
12
+ - Preserve the owner's stated product and release posture.
13
+ - Never infer an MVP, reduced version, phase label, or omission from implementation
14
+ convenience.
15
+ - Trace included capabilities to requirements and observable outcomes.
16
+ - Record dependencies, migrations, compatibility, and operational obligations inside
17
+ the capability that owns them.
18
+ - Keep speculative future ideas outside the active scope unless selected.
19
+
20
+ ## Record
21
+
22
+ Update `product.md` with capability boundaries, included requirements, explicit
23
+ exclusions and rationale, dependencies, and unresolved scope decisions.
24
+
25
+ Complete the step with decision evidence and the updated output path.
26
+
27
+ ## Semantic record
28
+
29
+ Use kind `capability`. Record `requirement_ids`, `scope_status`, and `rationale`.
@@ -0,0 +1,28 @@
1
+ # Outcomes and measurements
2
+
3
+ Use for workflow step `22-success-metrics`.
4
+
5
+ ## Objective
6
+
7
+ Define how the owner will know the accepted behavior and product outcome are working,
8
+ including signals that would reveal harmful optimization.
9
+
10
+ ## Method
11
+
12
+ - Derive measurements from accepted outcomes and available instrumentation.
13
+ - State definition, source, observation window, owner, and decision use.
14
+ - Separate current measurements, target decisions, and unavailable telemetry.
15
+ - Do not invent baselines, targets, or a single north-star metric.
16
+
17
+ ## Record
18
+
19
+ Update `product.md` with outcome measures, operational measures, guardrails, evidence
20
+ availability, and unresolved instrumentation needs. A metric that cannot be observed
21
+ must be recorded as a gap or explicit future change.
22
+
23
+ Complete the step with evidence references and the updated output path.
24
+
25
+ ## Semantic record
26
+
27
+ Use kind `metric`. Record `definition`, `source`, `window`, `owner`, and
28
+ `decision_use`.
@@ -0,0 +1,30 @@
1
+ # Architecture context
2
+
3
+ Use for workflow step `30-architecture-context`.
4
+
5
+ ## Objective
6
+
7
+ Establish current system boundaries, quality goals, constraints, actors, external
8
+ systems, and data flows.
9
+
10
+ ## Evidence
11
+
12
+ - Inspect code entry points, configuration, schemas, deployment assets, tests, and
13
+ runtime evidence.
14
+ - Separate observed architecture from intended architecture.
15
+ - Record permissions, data sensitivity, compliance, and organizational constraints
16
+ when they affect the design.
17
+ - Do not infer a greenfield architecture over an existing system.
18
+
19
+ ## Record
20
+
21
+ Update `architecture.md` with system context, external dependencies, trust boundaries,
22
+ data flows, quality goals, constraints, and evidence. Record documentation drift when
23
+ the current checkout contradicts an existing diagram or claim.
24
+
25
+ Complete the step with source or runtime evidence and the updated output path.
26
+
27
+ ## Semantic record
28
+
29
+ Use kind `architecture_context`. Record `boundary`, `inputs_outputs`,
30
+ `trust_authority`, and `consumers`.
@@ -0,0 +1,28 @@
1
+ # Solution strategy
2
+
3
+ Use for workflow step `31-solution-strategy`.
4
+
5
+ ## Objective
6
+
7
+ Record architecture decisions that satisfy accepted behavior and constraints while
8
+ preserving current repository patterns where they remain valid.
9
+
10
+ ## Method
11
+
12
+ - Search for existing implementations and dependencies before proposing new ones.
13
+ - Evaluate alternatives only when more than one credible choice remains and the choice
14
+ materially affects the contract.
15
+ - Record decision drivers, chosen direction, consequences, compatibility, and recovery.
16
+ - Do not force a new stack, fixed option count, scoring model, or arbitrary preference.
17
+
18
+ ## Record
19
+
20
+ Update `architecture.md` with accepted strategy decisions and their evidence. Preserve
21
+ unresolved decisions as blockers rather than selecting on the owner's behalf.
22
+
23
+ Complete the step with decision evidence and the updated output path.
24
+
25
+ ## Semantic record
26
+
27
+ Use kind `architecture_decision`. Record `drivers`, `direction`, `consequences`,
28
+ `compatibility`, and `recovery`.
@@ -0,0 +1,28 @@
1
+ # Building blocks and runtime paths
2
+
3
+ Use for workflow step `32-building-blocks`.
4
+
5
+ ## Objective
6
+
7
+ Map responsibilities, contracts, data ownership, consumers, and runtime behavior across
8
+ the current or accepted architecture.
9
+
10
+ ## Method
11
+
12
+ - Start from real modules and live entry points in brownfield adoption.
13
+ - Define boundaries by responsibility and authority, not by an imposed layer diagram.
14
+ - Trace key scenarios through validation, domain behavior, persistence, integrations,
15
+ observable output, failure, and recovery.
16
+ - Identify unreachable scaffolding, duplicate authority, and undocumented coupling.
17
+
18
+ ## Record
19
+
20
+ Update `architecture.md` with building blocks, public contracts, ownership, dependencies,
21
+ runtime paths, error paths, and evidence. Link each proposed block to a consumer.
22
+
23
+ Complete the step with source evidence and the updated output path.
24
+
25
+ ## Semantic record
26
+
27
+ Use kind `runtime_path`. Record `entry_point`, `state_side_effects`,
28
+ `observable_result`, `failure_recovery`, and `consumers`.