@duypham93/openkit 0.2.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 (178) hide show
  1. package/.opencode/README.md +47 -0
  2. package/.opencode/install-manifest.json +41 -0
  3. package/.opencode/lib/artifact-scaffolder.js +111 -0
  4. package/.opencode/lib/contract-consistency.js +218 -0
  5. package/.opencode/lib/parallel-execution-rules.js +261 -0
  6. package/.opencode/lib/runtime-paths.js +95 -0
  7. package/.opencode/lib/runtime-summary.js +82 -0
  8. package/.opencode/lib/state-guard.js +99 -0
  9. package/.opencode/lib/task-board-rules.js +375 -0
  10. package/.opencode/lib/work-item-store.js +280 -0
  11. package/.opencode/lib/workflow-state-controller.js +1739 -0
  12. package/.opencode/lib/workflow-state-rules.js +331 -0
  13. package/.opencode/opencode.json +93 -0
  14. package/.opencode/package.json +3 -0
  15. package/.opencode/tests/artifact-scaffolder.test.js +733 -0
  16. package/.opencode/tests/multi-work-item-runtime.test.js +369 -0
  17. package/.opencode/tests/parallel-execution-runtime.test.js +259 -0
  18. package/.opencode/tests/session-start-hook.test.js +357 -0
  19. package/.opencode/tests/state-guard.test.js +124 -0
  20. package/.opencode/tests/task-board-rules.test.js +204 -0
  21. package/.opencode/tests/work-item-store.test.js +380 -0
  22. package/.opencode/tests/workflow-behavior.test.js +149 -0
  23. package/.opencode/tests/workflow-contract-consistency.test.js +387 -0
  24. package/.opencode/tests/workflow-state-cli.test.js +1275 -0
  25. package/.opencode/tests/workflow-state-controller.test.js +1038 -0
  26. package/.opencode/work-items/feature-001/state.json +70 -0
  27. package/.opencode/work-items/index.json +13 -0
  28. package/.opencode/workflow-state.js +489 -0
  29. package/.opencode/workflow-state.json +70 -0
  30. package/AGENTS.md +265 -0
  31. package/README.md +401 -0
  32. package/agents/architect-agent.md +63 -0
  33. package/agents/ba-agent.md +56 -0
  34. package/agents/code-reviewer.md +77 -0
  35. package/agents/fullstack-agent.md +115 -0
  36. package/agents/master-orchestrator.md +60 -0
  37. package/agents/pm-agent.md +56 -0
  38. package/agents/qa-agent.md +124 -0
  39. package/agents/tech-lead-agent.md +60 -0
  40. package/assets/install-bundle/README.md +7 -0
  41. package/assets/install-bundle/opencode/README.md +11 -0
  42. package/assets/install-bundle/opencode/agents/ArchitectAgent.md +63 -0
  43. package/assets/install-bundle/opencode/agents/BAAgent.md +56 -0
  44. package/assets/install-bundle/opencode/agents/CodeReviewer.md +77 -0
  45. package/assets/install-bundle/opencode/agents/FullstackAgent.md +115 -0
  46. package/assets/install-bundle/opencode/agents/MasterOrchestrator.md +60 -0
  47. package/assets/install-bundle/opencode/agents/PMAgent.md +56 -0
  48. package/assets/install-bundle/opencode/agents/QAAgent.md +124 -0
  49. package/assets/install-bundle/opencode/agents/TechLeadAgent.md +60 -0
  50. package/assets/install-bundle/opencode/commands/brainstorm.md +44 -0
  51. package/assets/install-bundle/opencode/commands/delivery.md +45 -0
  52. package/assets/install-bundle/opencode/commands/execute-plan.md +44 -0
  53. package/assets/install-bundle/opencode/commands/migrate.md +61 -0
  54. package/assets/install-bundle/opencode/commands/quick-task.md +45 -0
  55. package/assets/install-bundle/opencode/commands/task.md +46 -0
  56. package/assets/install-bundle/opencode/commands/write-plan.md +50 -0
  57. package/assets/install-bundle/opencode/context/core/lane-selection.md +54 -0
  58. package/assets/install-bundle/opencode/skills/brainstorming/SKILL.md +51 -0
  59. package/assets/install-bundle/opencode/skills/code-review/SKILL.md +48 -0
  60. package/assets/install-bundle/opencode/skills/subagent-driven-development/SKILL.md +79 -0
  61. package/assets/install-bundle/opencode/skills/systematic-debugging/SKILL.md +61 -0
  62. package/assets/install-bundle/opencode/skills/test-driven-development/SKILL.md +48 -0
  63. package/assets/install-bundle/opencode/skills/using-skills/SKILL.md +39 -0
  64. package/assets/install-bundle/opencode/skills/verification-before-completion/SKILL.md +137 -0
  65. package/assets/install-bundle/opencode/skills/writing-plans/SKILL.md +68 -0
  66. package/assets/install-bundle/opencode/skills/writing-specs/SKILL.md +47 -0
  67. package/assets/opencode.json.template +11 -0
  68. package/assets/openkit-install.json.template +19 -0
  69. package/bin/openkit.js +9 -0
  70. package/commands/brainstorm.md +44 -0
  71. package/commands/delivery.md +45 -0
  72. package/commands/execute-plan.md +44 -0
  73. package/commands/migrate.md +61 -0
  74. package/commands/quick-task.md +45 -0
  75. package/commands/task.md +46 -0
  76. package/commands/write-plan.md +50 -0
  77. package/context/core/approval-gates.md +146 -0
  78. package/context/core/code-quality.md +42 -0
  79. package/context/core/issue-routing.md +85 -0
  80. package/context/core/lane-selection.md +54 -0
  81. package/context/core/project-config.md +143 -0
  82. package/context/core/session-resume.md +85 -0
  83. package/context/core/workflow-state-schema.md +224 -0
  84. package/context/core/workflow.md +442 -0
  85. package/context/navigation.md +94 -0
  86. package/docs/adr/README.md +6 -0
  87. package/docs/architecture/2026-03-20-task-intake-dashboard.md +54 -0
  88. package/docs/architecture/README.md +7 -0
  89. package/docs/briefs/2026-03-20-task-intake-dashboard.md +48 -0
  90. package/docs/briefs/README.md +7 -0
  91. package/docs/governance/README.md +25 -0
  92. package/docs/governance/adr-policy.md +27 -0
  93. package/docs/governance/definition-of-done.md +17 -0
  94. package/docs/governance/naming-conventions.md +21 -0
  95. package/docs/governance/severity-levels.md +12 -0
  96. package/docs/maintainer/README.md +51 -0
  97. package/docs/operations/README.md +79 -0
  98. package/docs/operations/internal-records/2026-03-24-release-checklist.md +79 -0
  99. package/docs/operations/internal-records/2026-03-24-simplified-install-ux.md +36 -0
  100. package/docs/operations/internal-records/README.md +18 -0
  101. package/docs/operations/runbooks/README.md +23 -0
  102. package/docs/operations/runbooks/openkit-daily-usage.md +288 -0
  103. package/docs/operations/runbooks/workflow-state-smoke-tests.md +302 -0
  104. package/docs/operator/README.md +50 -0
  105. package/docs/plans/2026-03-20-task-intake-dashboard.md +49 -0
  106. package/docs/plans/2026-03-21-openkit-full-delivery-multi-task-runtime.md +521 -0
  107. package/docs/plans/2026-03-23-openkit-global-install-runtime.md +157 -0
  108. package/docs/plans/README.md +7 -0
  109. package/docs/qa/2026-03-20-task-intake-dashboard.md +41 -0
  110. package/docs/qa/README.md +7 -0
  111. package/docs/specs/2026-03-20-task-intake-dashboard.md +50 -0
  112. package/docs/specs/2026-03-21-openkit-full-delivery-multi-task-runtime.md +462 -0
  113. package/docs/specs/README.md +7 -0
  114. package/docs/templates/README.md +36 -0
  115. package/docs/templates/adr-template.md +18 -0
  116. package/docs/templates/architecture-template.md +31 -0
  117. package/docs/templates/implementation-plan-template.md +32 -0
  118. package/docs/templates/migration-baseline-checklist.md +48 -0
  119. package/docs/templates/migration-plan-template.md +52 -0
  120. package/docs/templates/migration-report-template.md +74 -0
  121. package/docs/templates/migration-verify-checklist.md +39 -0
  122. package/docs/templates/product-brief-template.md +32 -0
  123. package/docs/templates/qa-report-template.md +37 -0
  124. package/docs/templates/quick-task-template.md +36 -0
  125. package/docs/templates/spec-template.md +31 -0
  126. package/hooks/hooks.json +16 -0
  127. package/hooks/session-start +162 -0
  128. package/package.json +24 -0
  129. package/registry.json +328 -0
  130. package/skills/brainstorming/SKILL.md +51 -0
  131. package/skills/code-review/SKILL.md +48 -0
  132. package/skills/subagent-driven-development/SKILL.md +79 -0
  133. package/skills/systematic-debugging/SKILL.md +61 -0
  134. package/skills/test-driven-development/SKILL.md +48 -0
  135. package/skills/using-skills/SKILL.md +39 -0
  136. package/skills/verification-before-completion/SKILL.md +137 -0
  137. package/skills/writing-plans/SKILL.md +68 -0
  138. package/skills/writing-specs/SKILL.md +47 -0
  139. package/src/audit/vietnamese-detection.js +259 -0
  140. package/src/cli/commands/detect-vietnamese.js +24 -0
  141. package/src/cli/commands/doctor.js +33 -0
  142. package/src/cli/commands/help.js +33 -0
  143. package/src/cli/commands/init.js +25 -0
  144. package/src/cli/commands/install-global.js +26 -0
  145. package/src/cli/commands/install.js +25 -0
  146. package/src/cli/commands/run.js +63 -0
  147. package/src/cli/commands/uninstall.js +32 -0
  148. package/src/cli/commands/upgrade.js +25 -0
  149. package/src/cli/conflict-output.js +19 -0
  150. package/src/cli/index.js +56 -0
  151. package/src/global/doctor.js +101 -0
  152. package/src/global/ensure-install.js +32 -0
  153. package/src/global/install-state.js +73 -0
  154. package/src/global/launcher.js +51 -0
  155. package/src/global/materialize.js +123 -0
  156. package/src/global/paths.js +85 -0
  157. package/src/global/uninstall.js +25 -0
  158. package/src/global/workspace-state.js +63 -0
  159. package/src/install/asset-manifest.js +284 -0
  160. package/src/install/conflicts.js +43 -0
  161. package/src/install/discovery.js +138 -0
  162. package/src/install/install-state.js +136 -0
  163. package/src/install/materialize.js +158 -0
  164. package/src/install/merge-policy.js +145 -0
  165. package/src/runtime/doctor.js +281 -0
  166. package/src/runtime/launcher.js +49 -0
  167. package/src/runtime/opencode-layering.js +135 -0
  168. package/src/runtime/openkit-managed-summary.js +27 -0
  169. package/tests/cli/openkit-cli.test.js +417 -0
  170. package/tests/global/doctor.test.js +130 -0
  171. package/tests/global/ensure-install.test.js +105 -0
  172. package/tests/install/discovery.test.js +124 -0
  173. package/tests/install/install-state.test.js +346 -0
  174. package/tests/install/materialize.test.js +244 -0
  175. package/tests/install/merge-policy.test.js +177 -0
  176. package/tests/runtime/doctor.test.js +430 -0
  177. package/tests/runtime/launcher.test.js +230 -0
  178. package/tests/runtime/module-boundary.test.js +16 -0
@@ -0,0 +1,442 @@
1
+ # Team Workflow — Open Kit
2
+
3
+ Defines the canonical live workflow contract for OpenKit.
4
+
5
+ Use this file as the source of truth for workflow semantics. Companion docs such as `context/core/approval-gates.md`, `context/core/issue-routing.md`, `context/core/session-resume.md`, `context/core/project-config.md`, and `context/core/workflow-state-schema.md` must align to it and should focus on their local concerns.
6
+
7
+ For the stricter routing rubric, examples, and anti-patterns behind lane choice, use `context/core/lane-selection.md`.
8
+
9
+ The current live contract uses `Quick Task+` successor semantics for the existing quick lane while supporting three runtime modes: `quick`, `migration`, and `full`.
10
+
11
+ ## Workflow Lanes
12
+
13
+ OpenKit now has three explicitly separate operating lanes:
14
+
15
+ - `Quick Task` for narrow, low-risk daily work
16
+ - `Migration` for upgrades, framework migrations, dependency modernization, and compatibility remediation
17
+ - `Full Delivery` for feature work and higher-risk changes
18
+
19
+ The Master Orchestrator is the entry point for both lanes and is responsible for choosing the lane, recording the choice in workflow state, and routing the work.
20
+
21
+ Terminology guardrail:
22
+
23
+ - `Quick Task+` is approved as the successor semantics for the existing quick lane
24
+ - `Quick Task+` is not a third operating mode
25
+ - current runtime mode enums are `quick`, `migration`, and `full`
26
+ - current command names remain unchanged unless a separate explicit implementation changes them
27
+ - use human-readable role labels such as `Master Orchestrator` in prose, and use `QA Lite` for the lighter quick-lane verification pass
28
+ - in narrative prose, prefer human-readable role labels such as `Master Orchestrator`, `QA Agent`, and `Tech Lead Agent`; use exact runtime identifiers only when naming owners, files, commands, or schema values
29
+
30
+ ## Contract Alignment Status
31
+
32
+ The stronger quick-lane semantics are live in the current contract. Companion workflow docs and runtime state are expected to align on the same active quick contract in this phase.
33
+
34
+ ## Quick Task Lane
35
+
36
+ Canonical stage sequence:
37
+
38
+ `quick_intake -> quick_plan -> quick_build -> quick_verify -> quick_done`
39
+
40
+ Pipeline:
41
+
42
+ ```
43
+ User Request
44
+
45
+ Master Orchestrator ← classify task, define quick scope
46
+
47
+ quick_plan ← bounded checklist and verification setup
48
+
49
+ Fullstack Agent ← implement the smallest safe change
50
+
51
+ QA Agent ← QA Lite verification
52
+
53
+ Master Orchestrator ← close or reroute
54
+ ```
55
+
56
+ Quick mode exists to reduce overhead, not to bypass quality.
57
+
58
+ Quick mode expectations:
59
+
60
+ - clear scope up front
61
+ - bounded planning before implementation
62
+ - short acceptance bullet list
63
+ - direct verification path
64
+ - no architecture exploration
65
+ - no full artifact chain requirement
66
+
67
+ Live Quick Task+ expectations:
68
+
69
+ - the quick lane can handle bounded small-to-medium work, not only the tiniest localized changes
70
+ - `quick_plan` is a required quick stage for checklist-oriented planning and verification setup
71
+ - optional task cards remain allowed when traceability helps, but are not mandatory for every quick task
72
+
73
+ ## Full Delivery Lane
74
+
75
+ Canonical stage sequence:
76
+
77
+ `full_intake -> full_brief -> full_spec -> full_architecture -> full_plan -> full_implementation -> full_qa -> full_done`
78
+
79
+ Pipeline:
80
+
81
+ ```
82
+ User Request
83
+
84
+ Master Orchestrator
85
+
86
+ PM Agent
87
+
88
+ BA Agent
89
+
90
+ Architect Agent
91
+
92
+ Tech Lead Agent
93
+
94
+ Fullstack Agent
95
+
96
+ QA Agent
97
+
98
+ Master Orchestrator
99
+ ```
100
+
101
+ Full mode preserves the structured team workflow for work that benefits from deliberate requirements, design, planning, implementation, and QA handoffs.
102
+
103
+ Implemented full-delivery task-runtime note:
104
+
105
+ - from `full_plan` onward, a full-delivery work item may carry an execution task board under `.opencode/work-items/<work_item_id>/tasks.json`
106
+ - task boards belong only to full-delivery work items
107
+ - task-level ownership does not replace the feature-stage owner recorded in workflow state
108
+ - operators must still treat parallel support conservatively and rely only on the runtime checks and commands that exist today
109
+
110
+ ## Migration Lane
111
+
112
+ Canonical stage sequence:
113
+
114
+ `migration_intake -> migration_baseline -> migration_strategy -> migration_upgrade -> migration_verify -> migration_done`
115
+
116
+ Pipeline:
117
+
118
+ ```
119
+ User Request
120
+
121
+ Master Orchestrator
122
+
123
+ Architect Agent ← baseline, compatibility map, risk framing
124
+
125
+ Tech Lead Agent ← staged upgrade strategy and rollback checkpoints
126
+
127
+ Fullstack Agent ← execute upgrade slices and remediation
128
+
129
+ QA Agent ← regression, smoke, and compatibility verification
130
+
131
+ Master Orchestrator
132
+ ```
133
+
134
+ Migration mode exists for work where the core problem is changing an existing system safely rather than defining net-new product behavior.
135
+
136
+ Migration mode expectations:
137
+
138
+ - freeze the behavior, layout, contracts, and core logic that must remain equivalent
139
+ - baseline capture before code changes
140
+ - preserve existing behavior first, then change technology under that preserved behavior
141
+ - compatibility and dependency risk mapping before implementation
142
+ - decouple only the framework-coupled blockers that prevent a safe migration
143
+ - use adapters, seams, and compatibility shims where they reduce migration risk
144
+ - staged upgrade sequencing with rollback notes
145
+ - migrate in slices instead of performing a big-bang rewrite
146
+ - verification based on real before/after evidence, smoke tests, builds, type checks, codemods, and regression passes
147
+ - no assumption that the upgrader fully understands legacy logic up front
148
+ - no task board in the current live contract
149
+
150
+ Migration guardrails:
151
+
152
+ - do not treat migration as an excuse to rewrite the product from scratch
153
+ - refactor only to create safe migration seams or to remove blockers discovered by the upgrade
154
+ - keep presentation and layout changes out of the migration unless the target stack forces a documented exception
155
+ - do not mix net-new feature scope into migration slices
156
+ - cleanup and structural polishing happen after parity is proven, not before
157
+
158
+ Migration validation rule:
159
+
160
+ - migration work is not TDD-first by default
161
+ - verify parity, not novelty; the main question is whether the migrated system still behaves like the preserved baseline
162
+ - use the strongest real validation path available from the target project and repository state
163
+ - favor characterization checks, smoke tests, regression tests, visual checks, contract comparisons, and manual before/after evidence
164
+ - write focused tests when the migration reveals a safe, well-understood behavior gap and working test tooling exists
165
+ - do not force RED-GREEN-REFACTOR as the primary control loop for broad upgrades where compatibility drift, framework semantics, and legacy unknowns dominate the risk
166
+
167
+ Canonical migration heuristic:
168
+
169
+ `freeze invariants -> capture baseline -> decouple blockers -> migrate incrementally -> verify parity -> cleanup last`
170
+
171
+ ## Lane Selection Rules
172
+
173
+ Primary routing heuristic:
174
+
175
+ - choose by the dominant purpose of the work, not by estimated size alone
176
+ - `Quick Task` is for bounded low-risk delivery inside already-understood behavior
177
+ - `Migration` is for behavior-preserving modernization where technical compatibility is the main uncertainty
178
+ - `Full Delivery` is for new behavior, product ambiguity, or changes that need deliberate definition across product, requirements, architecture, and delivery
179
+
180
+ Tie-breaker rule:
181
+
182
+ - if the main uncertainty is product behavior, requirements, acceptance, or cross-boundary solution design, choose `Full Delivery`
183
+ - if the main uncertainty is framework, dependency, runtime, or compatibility modernization while preserved behavior is already known, choose `Migration`
184
+ - if neither product ambiguity nor compatibility uncertainty dominates and the work stays tightly bounded with a short verification path, choose `Quick Task`
185
+
186
+ Choose `Quick Task` only when all are true:
187
+
188
+ - scope is bounded and remains within one tightly related area or two closely related surfaces
189
+ - acceptance criteria are already clear
190
+ - no new architecture or design trade-off is required
191
+ - no API, schema, auth, billing, permission, or security model change is involved
192
+ - validation can be done with a short, direct verification path
193
+ - framework or dependency compatibility is not the main source of risk
194
+
195
+ Choose `Full Delivery` when any are true:
196
+
197
+ - the task introduces a new feature or workflow
198
+ - requirements are ambiguous or likely to change
199
+ - multiple subsystems or responsibility boundaries are involved
200
+ - product-facing architecture, user-facing contracts, or business-significant data semantics are affected
201
+ - explicit product, spec, architecture, or plan artifacts are needed
202
+ - the task has elevated rework risk
203
+
204
+ Choose `Migration` when all or most are true:
205
+
206
+ - the main goal is upgrading or replacing existing technology rather than inventing a new feature
207
+ - the expected outcome is behavior preservation under a changed stack or code structure
208
+ - current-state baseline and compatibility discovery are required before implementation is trustworthy
209
+ - framework-coupled logic or integration seams must be untangled to make the upgrade safe
210
+ - framework, dependency, runtime, or API deprecation risk is central to the work
211
+ - validation depends more on regression, smoke, build, type, and compatibility evidence than on greenfield TDD slices
212
+ - rollback checkpoints or staged remediation are needed
213
+ - product requirements are mostly known already, but the technical path is uncertain
214
+
215
+ Explicit lane exclusions:
216
+
217
+ - do not use `Quick Task` when compatibility risk, deprecation handling, or upgrade sequencing is the main problem, even if the code diff may stay small
218
+ - do not use `Migration` when the work is expected to create new product behavior, redefine acceptance, or renegotiate business semantics
219
+ - do not use `Full Delivery` for straightforward behavior-preserving modernization work just because architecture or internal code structure must change during the upgrade
220
+
221
+ ## Lane Decision Matrix
222
+
223
+ | Situation | Dominant uncertainty | Choose | Why |
224
+ | --- | --- | --- | --- |
225
+ | Fix wording in one operator doc | None beyond a local edit | `Quick Task` | Bounded low-risk change with short verification |
226
+ | Replace one deprecated helper call in one module with clear expected output | Local implementation only | `Quick Task` | No product ambiguity and no meaningful modernization program |
227
+ | Upgrade React 16 to React 19 while preserving screens and flows | Compatibility and framework modernization | `Migration` | Behavior should stay the same; technical compatibility is the main risk |
228
+ | Migrate data fetching from ad-hoc requests to React Query without changing UX or business rules | Compatibility and integration seams | `Migration` | Technology and structure change, but expected behavior is preserved |
229
+ | Upgrade Next.js and redesign routing behavior for a new user journey | Product behavior and solution design | `Full Delivery` | The work is no longer only modernization; it changes user-facing behavior |
230
+ | Introduce a new billing workflow | Product and requirement definition | `Full Delivery` | New behavior, new acceptance, and cross-boundary planning are required |
231
+ | Small dependency bump with known codemod and no compatibility uncertainty | Local low-risk maintenance | `Quick Task` | The dominant problem is still a bounded edit, not a migration program |
232
+ | Dependency upgrade where legacy lifecycle patterns must be untangled first | Compatibility and upgrade sequencing | `Migration` | Even if scope is moderate, upgrade safety and seam creation dominate |
233
+ | Refactor internals during an upgrade only to create adapters and preserve behavior | Compatibility and migration safety | `Migration` | Refactor is in service of behavior-preserving modernization |
234
+ | Refactor internals and also change validation rules or acceptance behavior | Business semantics and acceptance | `Full Delivery` | Once acceptance changes, the work needs the full-definition lane |
235
+
236
+ Fast tie-break examples:
237
+
238
+ - "Small diff but compatibility is the main risk" -> `Migration`
239
+ - "Large diff but behavior stays the same" -> usually `Migration`
240
+ - "Small diff but product meaning changes" -> `Full Delivery`
241
+ - "Small, clear, local, and low-risk" -> `Quick Task`
242
+
243
+ ## Feedback Loops
244
+
245
+ ### Quick Task loop
246
+
247
+ ```
248
+ Fullstack → QA Lite → (pass) → quick_done
249
+ → (bug) → quick_build
250
+ → (design flaw or requirement gap) → escalate to Full Delivery
251
+ ```
252
+
253
+ ### Full Delivery loop
254
+
255
+ ```
256
+ Fullstack → QA → (pass) → full_done
257
+ → (bug) → full_implementation
258
+ → (design flaw) → full_architecture
259
+ → (requirement gap) → full_spec
260
+ ```
261
+
262
+ ### Migration loop
263
+
264
+ ```
265
+ Fullstack → QA → (pass) → migration_done
266
+ → (bug) → migration_upgrade
267
+ → (design flaw or compatibility flaw) → migration_strategy
268
+ → (requirement gap or product ambiguity) → escalate to Full Delivery
269
+ ```
270
+
271
+ ## Escalation Rule
272
+
273
+ Escalation paths are one-way only:
274
+
275
+ - `Quick Task -> Full Delivery`
276
+ - `Migration -> Full Delivery`
277
+
278
+ Quick work must escalate immediately when it encounters:
279
+
280
+ - `design_flaw`
281
+ - `requirement_gap`
282
+ - scope expansion across a second subsystem or responsibility boundary
283
+ - verification needs that are no longer short and local
284
+
285
+ There is no downgrade path from full mode back into quick mode.
286
+ There is no downgrade path from full mode back into migration mode, and no downgrade path from migration mode back into quick mode.
287
+
288
+ ## Approval Gates
289
+
290
+ Approval requirements are mode-specific.
291
+
292
+ Approval-authority rule for all live gates:
293
+
294
+ - the gate owner preparing the handoff cannot self-approve the handoff as complete
295
+ - the receiving role is the default approval authority for readiness to begin its stage
296
+ - the Master Orchestrator is the approval authority for workflow closure gates that end a lane
297
+ - approval notes should confirm both readiness and any blocking assumptions that remain
298
+
299
+ ### Quick Task
300
+
301
+ - `quick_verified` is the only required gate
302
+ - the original user request is treated as implicit approval to begin unless the task is ambiguous or risky
303
+ - `quick_plan` is required before `quick_build`, but it does not introduce a second approval gate
304
+ - `QA Agent` is the approval authority for `quick_verified`
305
+ - `quick_verified` means QA Lite evidence is inspected, recorded, and judged sufficient for closure
306
+
307
+ Quick handoff-ready expectations:
308
+
309
+ - `quick_intake -> quick_plan`: scope, lane fit, and intended validation path are clear enough for bounded planning
310
+ - `quick_plan -> quick_build`: the checklist, acceptance bullets, and direct verification path are recorded and inspectable
311
+ - `quick_build -> quick_verify`: the smallest safe change is implemented and the builder provides enough context for QA Lite to inspect it efficiently
312
+ - `quick_verify -> quick_done`: QA Lite evidence is recorded, open issues are either resolved or escalated, and `quick_verified` is approved
313
+
314
+ ### Migration
315
+
316
+ - `baseline_to_strategy`
317
+ - `strategy_to_upgrade`
318
+ - `upgrade_to_verify`
319
+ - `migration_verified`
320
+
321
+ Approval authorities:
322
+
323
+ - `baseline_to_strategy`: `Tech Lead Agent`
324
+ - `strategy_to_upgrade`: `Fullstack Agent`
325
+ - `upgrade_to_verify`: `QA Agent`
326
+ - `migration_verified`: `QA Agent`
327
+
328
+ Migration handoff-ready expectations:
329
+
330
+ - `migration_intake -> migration_baseline`: migration goal, target stack, and current-system scope are clear enough to inspect baseline reality
331
+ - `migration_baseline -> migration_strategy`: dependency versions, compatibility hotspots, constraints, preserved invariants, and likely migration blockers are inspectable
332
+ - `migration_strategy -> migration_upgrade`: staged sequence, rollback checkpoints, seam or adapter decisions, validation path, and blast-radius notes are explicit
333
+ - `migration_upgrade -> migration_verify`: the executed upgrade slices, changed surfaces, decoupling steps, and real verification evidence are inspectable
334
+ - `migration_verify -> migration_done`: regression evidence is inspectable, open compatibility issues are resolved or escalated, and `migration_verified` is approved
335
+
336
+ Standard repeatable checklists:
337
+
338
+ - `docs/templates/migration-baseline-checklist.md` for `migration_baseline`
339
+ - `docs/templates/migration-verify-checklist.md` for `migration_verify`
340
+
341
+ ### Full Delivery
342
+
343
+ - `pm_to_ba`
344
+ - `ba_to_architect`
345
+ - `architect_to_tech_lead`
346
+ - `tech_lead_to_fullstack`
347
+ - `fullstack_to_qa`
348
+ - `qa_to_done`
349
+
350
+ Approval authorities:
351
+
352
+ - `pm_to_ba`: `BA Agent`
353
+ - `ba_to_architect`: `Architect Agent`
354
+ - `architect_to_tech_lead`: `Tech Lead Agent`
355
+ - `tech_lead_to_fullstack`: `Fullstack Agent`
356
+ - `fullstack_to_qa`: `QA Agent`
357
+ - `qa_to_done`: `Master Orchestrator`
358
+
359
+ Full-delivery handoff-ready expectations:
360
+
361
+ - `full_intake -> full_brief`: lane choice, problem framing, and expected outcome are clear enough for PM scoping
362
+ - `full_brief -> full_spec`: the brief states goals, constraints, success criteria, and unresolved product questions
363
+ - `full_spec -> full_architecture`: the specification defines functional scope, edge cases, and acceptance expectations the architect can design against
364
+ - `full_architecture -> full_plan`: the design identifies boundaries, dependencies, risks, and decisions the Tech Lead can turn into executable work
365
+ - `full_plan -> full_implementation`: the plan breaks the work into implementable steps with validation expectations and any sequencing constraints
366
+ - `full_implementation -> full_qa`: implementation artifacts and verification evidence are inspectable, and known deviations are called out explicitly
367
+ - `full_qa -> full_done`: QA findings are resolved or routed correctly, final evidence is inspectable, and closure notes are ready for the Master Orchestrator
368
+
369
+ Approval state should be recorded in the managed active work-item state before advancing stages, and the active compatibility mirror at `.opencode/workflow-state.json` should reflect that updated state.
370
+
371
+ ## Document Outputs By Mode
372
+
373
+ ### Quick Task
374
+
375
+ - optional lightweight task card: `docs/tasks/YYYY-MM-DD-<task>.md`
376
+ - source code changes
377
+ - bounded quick-plan/checklist state in `quick_plan`
378
+ - concise QA Lite evidence in workflow communication and state
379
+
380
+ ### Migration
381
+
382
+ - baseline and strategy notes recorded in workflow communication and state
383
+ - preserved invariants and parity expectations recorded in workflow communication and state
384
+ - optional architecture document when the migration needs an explicit compatibility or boundary design
385
+ - migration plan in `docs/plans/YYYY-MM-DD-<migration>.md`
386
+ - optional consolidated migration report in `docs/plans/YYYY-MM-DD-<migration>-report.md` when one artifact is useful for baseline, execution, and verification continuity
387
+ - reusable baseline and verify checklists available from `docs/templates/`
388
+ - concise regression and compatibility evidence in workflow communication and state
389
+ - no execution task board in the current live contract
390
+
391
+ Quick-task artifact rule:
392
+
393
+ - `quick_plan` is mandatory as a workflow stage
394
+ - `docs/tasks/...` remains optional as a documentation artifact
395
+ - the required quick-plan content is live workflow state and communication, not a separate mandatory board or third quick artifact type
396
+ - QA Lite evidence is part of the live quick contract already and should be inspectable on resume even when no standalone QA document exists
397
+ - quick mode must stay free of execution task boards
398
+
399
+ ### Full Delivery
400
+
401
+ | Agent | Produces |
402
+ | --- | --- |
403
+ | PM | `docs/briefs/YYYY-MM-DD-<feature>.md` |
404
+ | BA | `docs/specs/YYYY-MM-DD-<feature>.md` |
405
+ | Architect | `docs/architecture/YYYY-MM-DD-<feature>.md` |
406
+ | Tech Lead | `docs/plans/YYYY-MM-DD-<feature>.md` |
407
+ | Fullstack | Source code, tests |
408
+ | QA | `docs/qa/YYYY-MM-DD-<feature>.md` |
409
+
410
+ ## Key Principles
411
+
412
+ 1. **Always use feedback loops** — Never mark work complete without verification.
413
+ 2. **Choose the right lane early** — Do not force small tasks through the full pipeline, and do not under-scope feature work into quick mode.
414
+ 3. **Use migration for upgrades** — Framework or dependency modernization should preserve baseline evidence, compatibility reasoning, and known behavior instead of pretending it is greenfield feature delivery.
415
+ 4. **Keep role boundaries explicit** — Even in a minimal repository, responsibilities stay conceptually separate.
416
+ 5. **Use Master Orchestrator for routing** — All inter-agent delegation goes through Master.
417
+ 6. **Escalate honestly** — Quick mode stops when the work becomes a design or requirements problem, and migration mode stops when the work becomes a product-definition problem.
418
+ 7. **Report real validation** — If tooling does not exist, document the actual verification path instead of inventing commands.
419
+ 8. **Make handoffs inspectable** — Every stage boundary should leave enough recorded context that the next role can resume without hidden assumptions.
420
+
421
+ ## Workflow State
422
+
423
+ The active external compatibility mirror lives in `.opencode/workflow-state.json`.
424
+
425
+ Managed per-item state lives under `.opencode/work-items/`, and the active work item is mirrored into `.opencode/workflow-state.json` for compatibility with the existing command and resume surface.
426
+
427
+ Field definitions and allowed enums live in `context/core/workflow-state-schema.md`.
428
+
429
+ At minimum it must track:
430
+
431
+ - mode
432
+ - current stage
433
+ - current owner
434
+ - linked artifacts
435
+ - gate approvals for the active mode
436
+ - open issues
437
+ - retry count
438
+ - escalation metadata when quick or migration work is promoted to full delivery
439
+
440
+ When full delivery is using task-aware execution, task-board state is stored beside the active work item rather than inside the top-level mirrored state file.
441
+
442
+ State-shape changes for future quick-lane behavior are out of scope for this phase. Preserve compatibility with the current schema until a later task changes runtime support deliberately.
@@ -0,0 +1,94 @@
1
+ # Context Navigation — Open Kit
2
+
3
+ This file is the entry point for context discovery after reading `AGENTS.md`. Use it to locate relevant standards and workflow guides.
4
+
5
+ Use it to distinguish between live workflow contract docs and background/historical artifacts.
6
+
7
+ Use it to keep the global-kit migration story honest: the preferred operator path is now the globally installed OpenKit kit, while this repository still keeps the checked-in `.opencode/` runtime as the authoring and compatibility surface.
8
+
9
+ Audience index layers outside `context/`:
10
+
11
+ - `README.md` is the concise top-level repository entrypoint
12
+ - `docs/operator/README.md` is the operator-facing index layer
13
+ - `docs/maintainer/README.md` is the maintainer-facing index layer
14
+ - in phase 1, those files route readers to canonical docs; they do not replace canonical docs
15
+
16
+ Repository policies outside `context/` that agents should also consult when relevant:
17
+
18
+ - `docs/operator/README.md`: operator routing across live surfaces
19
+ - `docs/maintainer/README.md`: maintainer routing across canonical and support surfaces
20
+ - `docs/governance/`: naming, severity, ADR, and done criteria
21
+ - `docs/operations/`: runbook guidance and durable operational-record policy
22
+
23
+ ## Structure
24
+
25
+ ```
26
+ context/
27
+ ├── navigation.md ← You are here
28
+ ├── core/
29
+ │ ├── approval-gates.md ← Approval recording rules
30
+ │ ├── code-quality.md ← Coding standards (all agents)
31
+ │ ├── issue-routing.md ← QA classification and routing
32
+ │ ├── project-config.md ← Current command reality
33
+ │ ├── session-resume.md ← New-session resume protocol
34
+ │ ├── workflow-state-schema.md ← Canonical workflow-state fields and enums
35
+ │ └── workflow.md ← Hard-split Quick Task and Full Delivery contract
36
+ ```
37
+
38
+ Most historical roadmap and archive docs were intentionally pruned from the working tree during cleanup. If you need older rationale, use git history rather than expecting archived background docs to remain present.
39
+
40
+ Migration-contract references for the global kit and checked-in compatibility runtime should stay aligned across:
41
+
42
+ - `README.md`
43
+ - `AGENTS.md`
44
+ - `context/core/project-config.md`
45
+ - `registry.json`
46
+ - `.opencode/install-manifest.json`
47
+ - `.opencode/opencode.json`
48
+
49
+ Use `context/core/workflow.md` when you need the current live workflow semantics, and use the companion core docs only for their local operational details. Use git history only when historical rationale matters more than current repository behavior.
50
+
51
+ ## Phase-1 Authority Rule
52
+
53
+ - `README.md`, `docs/operator/README.md`, and `docs/maintainer/README.md` are navigation layers
54
+ - canonical workflow semantics still live in `context/core/workflow.md`
55
+ - canonical operational details still live in the relevant `context/core/` files
56
+ - governance and operations policies remain canonical in their existing `docs/governance/` and `docs/operations/` locations
57
+ - artifact-specific guidance remains canonical in the artifact directories that already own those docs
58
+
59
+ ## Discovery Rules
60
+
61
+ | Task type | Load first |
62
+ |-----------|-----------|
63
+ | Any implementation | `core/code-quality.md` |
64
+ | Understanding team workflow | `core/workflow.md` |
65
+ | Choosing the correct lane | `core/lane-selection.md` |
66
+ | Recording approvals | `core/approval-gates.md` |
67
+ | Routing QA issues | `core/issue-routing.md` |
68
+ | Resuming a session | `core/session-resume.md` |
69
+ | Updating workflow state | `core/workflow-state-schema.md` |
70
+ | Applying governance policy | `../docs/governance/` |
71
+ | Recording operational history | `../docs/operations/` |
72
+ | Daily operator wayfinding | `../docs/operator/README.md` |
73
+ | Maintainer wayfinding | `../docs/maintainer/README.md` |
74
+ | Starting a new feature | `core/workflow.md` |
75
+ | Comparing lane examples and tie-breakers | `core/workflow.md` |
76
+ | Running migration baseline or verify checks | `../docs/templates/migration-baseline-checklist.md` and `../docs/templates/migration-verify-checklist.md` |
77
+ | Running one-file migration tracking | `../docs/templates/migration-report-template.md` |
78
+
79
+ ## Current Vs Future Reading Rule
80
+
81
+ - `context/core/workflow.md` is the canonical live workflow-semantics document
82
+ - `context/core/approval-gates.md`, `context/core/issue-routing.md`, `context/core/session-resume.md`, `context/core/project-config.md`, and `context/core/workflow-state-schema.md` define local operational details and must stay aligned with `context/core/workflow.md`
83
+ - older roadmap rationale may no longer be present in the working tree; use git history when historical intent matters more than current behavior
84
+ - do not treat `Quick Task+` as a live third mode; current runtime terms remain `Quick Task`, `Migration`, `Full Delivery`, `quick`, `migration`, and `full`
85
+ - do not describe the checked-in `.opencode/` runtime as the preferred end-user install path now that the global kit exists
86
+ - do not describe the new audience index layers as canonical replacements for the docs they route to
87
+
88
+ ## Priority
89
+
90
+ - **Critical**: `core/code-quality.md` before any code generation
91
+ - **High**: `core/workflow.md` before any agent delegation
92
+ - **High**: `core/session-resume.md` before continuing an in-flight feature
93
+ - **Medium**: `../docs/operator/README.md` and `../docs/maintainer/README.md` for audience-specific routing
94
+ - **Medium**: Task-specific context discovered through agent instructions
@@ -0,0 +1,6 @@
1
+ # ADR
2
+
3
+ This directory stores Architecture Decision Records created when an architectural choice needs durable rationale.
4
+
5
+ - File naming: `YYYY-MM-DD-<decision-slug>.md`
6
+ - Source template: `docs/templates/adr-template.md`
@@ -0,0 +1,54 @@
1
+ ---
2
+ artifact_type: architecture
3
+ version: 1
4
+ status: approved
5
+ feature_id: FEATURE-001
6
+ feature_slug: task-intake-dashboard
7
+ source_spec: docs/specs/2026-03-20-task-intake-dashboard.md
8
+ owner: ArchitectAgent
9
+ approval_gate: architect_to_tech_lead
10
+ ---
11
+
12
+ # Architecture: Task Intake Dashboard
13
+
14
+ ## Summary
15
+
16
+ Use a read-only dashboard that renders normalized task data from a single query source. Keep filtering local to the dashboard so the architecture stays small and predictable.
17
+
18
+ ## System Diagram
19
+
20
+ `Task Query -> Status Normalizer -> TaskListView -> Filter Controls`
21
+
22
+ ## Components
23
+
24
+ ### TaskQueryService
25
+ - Responsibility: fetch raw task records
26
+ - Interface: returns intake task collection
27
+ - Dependencies: data source
28
+
29
+ ### StatusNormalizer
30
+ - Responsibility: convert unknown statuses into safe labels
31
+ - Interface: normalized task objects
32
+ - Dependencies: task query output
33
+
34
+ ### TaskListView
35
+ - Responsibility: render rows and empty state
36
+ - Interface: normalized tasks plus active filters
37
+ - Dependencies: normalizer output
38
+
39
+ ## Data Contracts
40
+
41
+ - Task: `title`, `queue`, `status`, `owner`, `priority`
42
+
43
+ ## Technology Choices
44
+
45
+ - Keep the example stack-agnostic because the root repository has no canonical app stack yet.
46
+
47
+ ## Risks and Mitigations
48
+
49
+ - Risk: status values drift over time
50
+ - Mitigation: normalize before render
51
+
52
+ ## ADR References
53
+
54
+ - None required for the golden path example
@@ -0,0 +1,7 @@
1
+ # Architecture
2
+
3
+ This directory stores architecture artifacts produced by the Architect agent.
4
+
5
+ - File naming: `YYYY-MM-DD-<feature-slug>.md`
6
+ - Source template: `docs/templates/architecture-template.md`
7
+ - Approval gate: Architect -> Tech Lead
@@ -0,0 +1,48 @@
1
+ ---
2
+ artifact_type: product_brief
3
+ version: 1
4
+ status: approved
5
+ feature_id: FEATURE-001
6
+ feature_slug: task-intake-dashboard
7
+ source_request: "Build a simple intake dashboard for incoming tasks"
8
+ owner: PMAgent
9
+ approval_gate: pm_to_ba
10
+ ---
11
+
12
+ # Product Brief: Task Intake Dashboard
13
+
14
+ ## Goal
15
+
16
+ Give operators a single place to inspect incoming work items and identify what needs attention first.
17
+
18
+ ## Target Users
19
+
20
+ - Operations coordinator
21
+ - Delivery lead
22
+
23
+ ## Problem Statement
24
+
25
+ Task intake is fragmented across multiple views, slowing triage and making blocked work harder to spot.
26
+
27
+ ## High-Level Features
28
+ - [x] Unified task list
29
+ - [x] Priority and queue filters
30
+ - [x] Blocked-state visibility
31
+
32
+ ## Priorities
33
+ - P0: See incoming tasks and their current status
34
+ - P1: Filter by priority and queue
35
+ - P2: Add saved views later if needed
36
+
37
+ ## Success Metrics
38
+
39
+ - Operators can identify blocked tasks without switching views
40
+
41
+ ## Out of Scope
42
+
43
+ - Auto-assignment
44
+ - Workflow automation
45
+
46
+ ## Open Questions
47
+
48
+ - None for the golden path example
@@ -0,0 +1,7 @@
1
+ # Briefs
2
+
3
+ This directory stores Product Brief artifacts produced by the PM agent.
4
+
5
+ - File naming: `YYYY-MM-DD-<feature-slug>.md`
6
+ - Source template: `docs/templates/product-brief-template.md`
7
+ - Approval gate: PM -> BA