sdtk-spec-kit 0.4.3 → 0.4.5

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 (127) hide show
  1. package/README.md +369 -376
  2. package/assets/atlas/build_atlas.py +880 -873
  3. package/assets/atlas/doc_atlas_viewer_template.html +3796 -3722
  4. package/assets/atlas/vendor/mermaid.min.js +2029 -2029
  5. package/assets/keys/spec-entitlement-public.pem +11 -11
  6. package/assets/manifest/toolkit-bundle.manifest.json +178 -178
  7. package/assets/manifest/toolkit-bundle.sha256.txt +83 -83
  8. package/assets/toolkit/toolkit/AGENTS.md +247 -245
  9. package/assets/toolkit/toolkit/README.md +50 -50
  10. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +207 -208
  11. package/assets/toolkit/toolkit/install.ps1 +21 -21
  12. package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +92 -92
  13. package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +70 -70
  14. package/assets/toolkit/toolkit/scripts/agents/run-claude-task.ps1 +332 -332
  15. package/assets/toolkit/toolkit/scripts/agents/run-codex-task.ps1 +618 -618
  16. package/assets/toolkit/toolkit/scripts/agents/validate-mailbox-formal-artifact.py +86 -86
  17. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +262 -262
  18. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +209 -209
  19. package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +139 -139
  20. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +143 -143
  21. package/assets/toolkit/toolkit/sdtk-spec.config.json +27 -27
  22. package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +49 -49
  23. package/assets/toolkit/toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md +47 -47
  24. package/assets/toolkit/toolkit/session/SDTK_AGENT_WORKING_RULES.md +49 -49
  25. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +111 -111
  26. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +732 -732
  27. package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +79 -79
  28. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -85
  29. package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +46 -46
  30. package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +91 -91
  31. package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +246 -246
  32. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +34 -34
  33. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +60 -60
  34. package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +41 -41
  35. package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +80 -80
  36. package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +80 -80
  37. package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +2 -2
  38. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +17 -17
  39. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +106 -106
  40. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +50 -50
  41. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +53 -53
  42. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +28 -28
  43. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +136 -136
  44. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +414 -414
  45. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +110 -110
  46. package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +97 -97
  47. package/assets/toolkit/toolkit/skills/skills.catalog.yaml +330 -330
  48. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +116 -116
  49. package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +87 -87
  50. package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +59 -59
  51. package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +67 -67
  52. package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +91 -91
  53. package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +73 -73
  54. package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +73 -73
  55. package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +2 -2
  56. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +40 -40
  57. package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +88 -88
  58. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +58 -58
  59. package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +112 -112
  60. package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +115 -115
  61. package/assets/toolkit/toolkit/templates/README.md +68 -68
  62. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +21 -21
  63. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +67 -67
  64. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  65. package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +228 -228
  66. package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +20 -20
  67. package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +20 -20
  68. package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +128 -128
  69. package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +12 -12
  70. package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +107 -107
  71. package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +60 -60
  72. package/assets/toolkit/toolkit/templates/docs/dev/OPS_HANDOFF_CREATION_RULES.md +369 -369
  73. package/assets/toolkit/toolkit/templates/docs/discovery/REQUIREMENT_TEMPLATE.md +155 -155
  74. package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +50 -50
  75. package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +276 -276
  76. package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +66 -66
  77. package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +98 -98
  78. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +129 -129
  79. package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +104 -104
  80. package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +139 -139
  81. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +197 -197
  82. package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +31 -31
  83. package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +28 -28
  84. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +26 -26
  85. package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +20 -20
  86. package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +33 -33
  87. package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +29 -29
  88. package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +26 -26
  89. package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +76 -76
  90. package/bin/sdtk.js +15 -15
  91. package/package.json +48 -48
  92. package/src/commands/activate.js +90 -90
  93. package/src/commands/analyze.js +11 -0
  94. package/src/commands/atlas.js +341 -352
  95. package/src/commands/auth.js +85 -85
  96. package/src/commands/entitlement.js +163 -163
  97. package/src/commands/generate.js +209 -147
  98. package/src/commands/help.js +41 -33
  99. package/src/commands/init.js +15 -15
  100. package/src/commands/project.js +51 -51
  101. package/src/commands/runtime.js +239 -239
  102. package/src/index.js +9 -6
  103. package/src/lib/activation-state.js +68 -68
  104. package/src/lib/args.js +116 -116
  105. package/src/lib/atlas-config.js +200 -200
  106. package/src/lib/atlas-runner.js +435 -355
  107. package/src/lib/browser-open.js +39 -39
  108. package/src/lib/capabilities.js +92 -92
  109. package/src/lib/entitlements.js +238 -238
  110. package/src/lib/errors.js +41 -41
  111. package/src/lib/github-access.js +143 -143
  112. package/src/lib/legacy-auth-migration.js +55 -55
  113. package/src/lib/license-activation.js +375 -351
  114. package/src/lib/powershell.js +85 -85
  115. package/src/lib/premium-loader.js +126 -126
  116. package/src/lib/premium-packs.js +331 -331
  117. package/src/lib/premium-sync.js +235 -235
  118. package/src/lib/project-audit.js +332 -332
  119. package/src/lib/project-config.js +108 -108
  120. package/src/lib/project-ingest.js +450 -450
  121. package/src/lib/project-refresh.js +666 -666
  122. package/src/lib/requirement-analysis.js +396 -0
  123. package/src/lib/scope.js +83 -83
  124. package/src/lib/state.js +73 -73
  125. package/src/lib/suite-state.js +70 -70
  126. package/src/lib/toolkit-payload.js +99 -99
  127. package/src/lib/atlas-ask.js +0 -170
@@ -1,245 +1,247 @@
1
- # SDTK Suite Multi-Agent Software Development Toolkit
2
-
3
- Goal: use the SDTK Suite as a coordinated operating model:
4
- - `SDTK-SPEC` governs upstream discovery, planning, design, traceability, and release gates.
5
- - `SDTK-CODE` is the default downstream system for implementation, bug fixing, refactoring, verification, and ship-ready code changes.
6
- - `SDTK-OPS` is the downstream system for deployment, infrastructure, CI/CD, monitoring, incident handling, and operational verification.
7
-
8
- `SDTK-SPEC` remains the orchestration and documentation entry point, but the suite is not SPEC-only.
9
-
10
- ## 0) Default Rules
11
- - If role is not specified, default to Orchestrator Intake, not PM.
12
- - Orchestrator first classifies the user request, then routes to the smallest sufficient SDTK product, role, and skill.
13
- - PM starts only when the request is ready for formal SDTK-SPEC product initiation.
14
- - Do not skip phases. If inputs are missing, ask focused questions before moving on.
15
- - At the end of every phase, update:
16
- - `SHARED_PLANNING.md`
17
- - `QUALITY_CHECKLIST.md`
18
- - Artifact language under `docs/**` should default to English.
19
- - Read stack and command configuration from `sdtk-spec.config.json` in the project root.
20
- - For VI/JP source requirements, keep original text in an appendix and add literal English translation for traceability.
21
- - `/dev` stops at `FEATURE_IMPL_PLAN + CODE_HANDOFF`; SDTK-CODE is the default downstream coding system.
22
- - Verification-before-completion: no phase may declare done, pass, or handoff-ready without fresh command evidence per `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md`.
23
- - `toolkit/skills/skills.catalog.yaml` is the inventory source of truth for the 14 core SDTK-SPEC skills, including the bounded `mailbox-dispatch` controller skill.
24
-
25
- ## 0.2) Session Bootstrap Protocol
26
- When starting a new session, read context in this order when the files exist:
27
- 1. `AGENTS.md`
28
- 2. `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
29
- 3. `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
30
- 4. `governance/ai/core/IMPROVEMENT_BACKLOG.md`
31
- 5. issue-specific controller spec and implementation plan
32
-
33
- Do not read the entire historical session archive by default. Use `SDTK_SESSION_MEMORY_*.md` only when chronology or past acceptance details are required.
34
-
35
- ## 0.3) Orchestrator-First Intake Protocol
36
- For every unprefixed user request:
37
- 1. Classify the request intent before selecting PM/BA/ARCH/DEV/QA or a downstream product lane.
38
- 2. Route to the smallest sufficient workflow:
39
- - unclear idea or early concept -> brainstorm / requirement clarification, then create or update `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`
40
- - formal feature discovery or planning -> SDTK-SPEC pipeline
41
- - implementation, bug fix, refactor, verification, or ship-ready code -> SDTK-CODE
42
- - deploy, release, infrastructure, CI/CD, monitoring, incident, backup, security-infra, or ops verification -> SDTK-OPS
43
- - documentation graph, Atlas viewer, Atlas Ask, project ingest, project refresh, or project audit -> the matching Atlas/project command or workflow
44
- - review or release decision -> review/QA workflow
45
- 3. Ask focused questions only when missing information blocks safe routing.
46
- 4. Do not force raw ideas directly into PM Phase 1. Clarify the requirement first in `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`, then start PM initiation only after the artifact is marked `READY_FOR_PM_INITIATION`.
47
- 5. When routing creates artifacts, record decisions and open questions in the correct SDTK artifact.
48
-
49
- ## 0.4) Intent-To-Skill Routing Matrix
50
- Use this compact matrix during intake so the agent picks the smallest sufficient workflow instead of defaulting everything to PM:
51
-
52
- | User intent | Primary route | Output expectation |
53
- |---|---|---|
54
- | Raw idea | Brainstorm / requirement clarification | `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` with clarified problem, scope, assumptions, open questions, and readiness |
55
- | Approved idea ready for product planning | `SDTK-SPEC` PM initiation | `REQUIREMENT_[FEATURE_KEY]` marked `READY_FOR_PM_INITIATION`, then `PROJECT_INITIATION` kickoff |
56
- | Formal feature delivery | `SDTK-SPEC` pipeline | PM -> BA -> ARCH -> DEV planning -> CODE handoff -> QA |
57
- | Build, fix, or refactor implementation | `SDTK-CODE` | Planned, implemented, verified code change |
58
- | Debug failure or unexpected behavior | `SDTK-CODE` debug | Root cause, bounded fix, regression verification |
59
- | Deployment, release, infra, or CI/CD work | `SDTK-OPS` | Ops plan or execution plus verification evidence |
60
- | Code review or spec review | Review / QA workflow | Findings, risks, blockers, acceptance signal |
61
- | Atlas graph build or viewer work | `sdtk-spec atlas` workflow | Local `.sdtk/atlas` graph or viewer result |
62
- | Atlas Ask | Gated Atlas Ask workflow | Grounded answer or explicit entitlement/runtime blocker |
63
- | Existing project scan: project ingest, project refresh, or project audit | Matching premium project workflow | Project-local foundation, refresh, or audit result without overclaiming entitlement |
64
- | "what should we do next" | Orchestrator state review | Recommended next action with rationale and lane choice |
65
-
66
- Guardrails:
67
- - Explicit user role prefix wins unless safety or missing critical inputs block execution.
68
- - Raw idea clarification should use `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`; do not widen BK-099 into generator automation, package sync, or BK-100 validation work.
69
- - Do not claim Atlas Ask or project ingest/project refresh/project audit availability unless entitlement/runtime access is actually present.
70
-
71
- ## 0.5) Proceed-Vs-Ask Decision Rules
72
- Ask clarification when:
73
- 1. the requested outcome is ambiguous
74
- 2. safety, security, or release impact is unclear
75
- 3. the target repo, project, or path is missing
76
- 4. implementation is requested without an acceptance boundary
77
- 5. the next command could mutate external state
78
-
79
- Proceed when:
80
- 1. the intent and target are clear
81
- 2. the task is read-only analysis
82
- 3. the user already approved the relevant plan or spec
83
- 4. the requested change is bounded and verifiable
84
-
85
- ## 0.1) Clarification Protocol
86
- Apply for all roles (`/pm`, `/ba`, `/arch`, `/dev`, `/qa`):
87
- 1. If there is ambiguity or missing data, log `Open Questions` as `OQ-xx` in the current phase artifact.
88
- 2. Do not guess for behavior, API contracts, UI/UX, data model, security, or release criteria.
89
- 3. Escalate unresolved items to PM with question ID and file reference.
90
- 4. PM resolves by:
91
- - using available docs and making a clear decision, or
92
- - asking the user if source information is still missing.
93
- 5. Record decisions in PRD (`Decision Log`) and update the originating `OQ-xx` with resolution.
94
-
95
- For raw ideas before PM initiation:
96
- 1. Use `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` as the canonical clarification artifact.
97
- 2. Record scope, non-goals, assumptions, constraints, open questions, and readiness there before opening `PROJECT_INITIATION`.
98
- 3. Treat the discovery artifact as a bridge into PM initiation, not as a PRD replacement.
99
-
100
- ## 1) Role Selection In One Message
101
- When the user prefixes a message, execute that role:
102
- - `/orchestrator` (default intake + routing)
103
- - `/pm` (formal product initiation + planning)
104
- - `/ba`
105
- - `/arch`
106
- - `/dev`
107
- - `/qa`
108
- - `/engineer` (escalation for technical blockers)
109
-
110
- Notes:
111
- - Supported delivery roles are PM/BA/ARCH/DEV/QA.
112
- - There is no separate `/tester` role. Test-case design belongs to QA with `sdtk-test-case-spec`.
113
-
114
- ## 2) Standard 6-Phase Pipeline
115
- Use this formal pipeline after Orchestrator Intake determines that the request is ready for SDTK-SPEC feature delivery.
116
-
117
- 0. Discovery / Clarification when needed -> `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`
118
- 1. PM Initiation -> `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`
119
- 2. BA Analysis -> `docs/specs/BA_SPEC_[FEATURE_KEY].md`
120
- 3. PM Planning -> `docs/product/PRD_[FEATURE_KEY].md` + `docs/product/BACKLOG_[FEATURE_KEY].md`
121
- 4. ARCH Design -> `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (plus API/layout docs when needed)
122
- 5. DEV Planning + SDTK-CODE Handoff -> `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md` + `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
123
- 6. QA Testing -> `docs/qa/[FEATURE_KEY]_TEST_CASE.md` + `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
124
-
125
- Notes:
126
- - Phase 0 is only for raw ideas, unclear concepts, and early feature discovery.
127
- - PM initiation starts only after `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` is marked `READY_FOR_PM_INITIATION`.
128
- - The discovery artifact does not replace PM, BA, PRD, backlog, or architecture deliverables.
129
-
130
- Default bridge after Phase 5 planning output:
131
- - `/dev` emits the handoff
132
- - SDTK-CODE performs `start -> plan -> build -> verify -> ship`
133
- - `/qa` consumes downstream implementation evidence plus `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json` and downstream OPS evidence
134
-
135
- ## 2.1) DEV Handoff Contract
136
- DEV output is planning + readiness gating, not final code delivery:
137
- 1. Build or refine `FEATURE_IMPL_PLAN`.
138
- 2. Generate `CODE_HANDOFF_[FEATURE_KEY].json`.
139
- 3. Keep blockers explicit when the work is not ready for SDTK-CODE.
140
-
141
- `/dev` does not auto-run SDTK-CODE.
142
-
143
- ## 2.2) Suite Product Routing
144
- Use the suite products according to task intent:
145
-
146
- - `SDTK-SPEC`
147
- - feature discovery
148
- - requirements, BA, PRD, backlog, architecture, QA artifacts
149
- - handoff generation and release-gate traceability
150
- - `SDTK-CODE`
151
- - build a feature
152
- - fix a bug
153
- - refactor implementation
154
- - run implementation verification
155
- - ship code changes
156
- - `SDTK-OPS`
157
- - deploy or release
158
- - infrastructure and environment setup
159
- - CI/CD changes
160
- - monitoring, incident response, security-infra, backup, compliance
161
-
162
- If the current project only has `SDTK-SPEC` runtime assets installed:
163
- - keep `/dev` bounded to planning and `CODE_HANDOFF`
164
- - do not overclaim that SDTK-CODE or SDTK-OPS runtime assets are already installed
165
- - still describe the correct downstream suite path in guidance and handoffs
166
-
167
- ## 3) Shared State And Quality Gates
168
- - `SHARED_PLANNING.md`: phase status, owners, artifacts, blockers, handoff notes.
169
- - `QUALITY_CHECKLIST.md`: gate checklist by phase.
170
- - No handoff to next phase while current gate is not PASS.
171
- - QA cannot start until downstream implementation evidence exists, normally from SDTK-CODE.
172
- - QA cannot approve until `OPS_HANDOFF` and downstream OPS evidence are present and aligned.
173
-
174
- ## 4) Minimum Traceability
175
- - PM: `REQ-xx` requirements, scope, success metrics.
176
- - BA: `BR-xx`, `UC-xx`, `AC-xx`, `NFR-xx`, and traceability matrix.
177
- - ARCH: map UC/BR to API/DB/flows/screens.
178
- - DEV: map backlog stories to implementation slices, refs, blockers, and test obligations.
179
- - QA: map downstream implementation evidence and downstream OPS evidence back to UC/AC.
180
-
181
- ## 5) Feature Bootstrap
182
- Run from project root:
183
-
184
- ```
185
- sdtk-spec generate --feature-key YOUR_FEATURE --feature-name "Your Feature"
186
- ```
187
-
188
- ## 6) ARCH Deliverables (Extended)
189
- In addition to `ARCH_DESIGN`, ARCH may generate:
190
- - `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
191
- - `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
192
- - `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
193
- - `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
194
-
195
- ## 6.1) ARCH Orchestration Mapping
196
- - Use `sdtk-api-doc` when API scope exists.
197
- - Use `sdtk-api-design-spec` when API design detail is required from YAML + flow list.
198
- - Use `sdtk-screen-design-spec` when UI flow-action specification is needed.
199
- - Controlled by `sdtk-spec.config.json`:
200
- - `orchestration.apiDesignDetailMode = auto|on|off`
201
- - `auto`: generate when API scope and required sources are available.
202
- - `on`: always generate for API scope.
203
- - `off`: skip unless explicitly requested.
204
-
205
- ## 6.2) QA Orchestration Mapping
206
- - Use `sdtk-test-case-spec` when detailed worksheet-style test-case artifacts are required.
207
- - Use `sdtk-qa` for execution report and release decision.
208
- - QA accepts downstream implementation evidence from SDTK-CODE as the default handoff bridge, plus `OPS_HANDOFF + OPS evidence` in the current formal suite flow.
209
- - Controlled by `sdtk-spec.config.json`:
210
- - `orchestration.testCaseSpecMode = auto|on|off`
211
- - `auto`: generate when QA requires test-case artifacts.
212
- - `on`: always generate in QA phase.
213
- - `off`: skip unless explicitly requested.
214
-
215
- ## 6.3) Maintainer Assets
216
- - Skill inventory: `toolkit/skills/skills.catalog.yaml`
217
- - Handoff templates: `toolkit/templates/handoffs/`
218
- - Example scenarios: `examples/`
219
- - Readiness audit: `toolkit/scripts/check-runtime-readiness.ps1`
220
- - SDTK-CODE handoff generator: `toolkit/scripts/generate-code-handoff.ps1`
221
-
222
- ## 7) Mandatory Rule References
223
- Canonical source-of-truth for shared rule files now lives under `toolkit/templates/docs/**`.
224
- Use those paths when editing or reviewing the source toolkit.
225
-
226
- Shared canonical rule files:
227
- - `toolkit/templates/docs/api/YAML_CREATION_RULES.md` -- API YAML docs
228
- - `toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md` -- API design detail + flow docs
229
- - `toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md` -- API flow compatibility note
230
- - `toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md` -- API design compatibility note
231
- - `toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md` -- Screen flow-action specs
232
- - `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md` -- QA test-case specs
233
-
234
- Retained skill-specific local references:
235
- - `toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md` -- Flow-action numbering policy
236
- - `toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md` -- Figma MCP integration
237
- - `toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md` -- Excel image export
238
-
239
- Runtime-installed mirrors may surface these rule files under skill-local runtime paths such as `.claude/skills/<skill>/references/` or `$CODEX_HOME/skills/<skill>/references/`. Do not treat those runtime copies as the maintainer source of truth.
240
-
241
- Workflow governance docs:
242
- - `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md` -- verification-before-completion gate
243
- - `governance/ai/core/SDTK_SKILL_AUTHORING_AND_TESTING.md` -- maintainer authoring/test guide
244
- Flow-action numbering policy:
245
- - Use one global numbering mode for the whole document (no per-screen reset).
1
+ # SDTK Suite Multi-Agent Software Development Toolkit
2
+
3
+ Goal: use the SDTK Suite as a coordinated operating model:
4
+ - `SDTK-SPEC` governs upstream discovery, planning, design, traceability, and release gates.
5
+ - `SDTK-CODE` is the default downstream system for implementation, bug fixing, refactoring, verification, and ship-ready code changes.
6
+ - `SDTK-OPS` is the downstream system for deployment, infrastructure, CI/CD, monitoring, incident handling, and operational verification.
7
+
8
+ `SDTK-SPEC` remains the orchestration and documentation entry point, but the suite is not SPEC-only.
9
+
10
+ ## 0) Default Rules
11
+ - If role is not specified, default to Orchestrator Intake, not PM.
12
+ - Orchestrator first classifies the user request, then routes to the smallest sufficient SDTK product, role, and skill.
13
+ - PM starts only when the request is ready for formal SDTK-SPEC product initiation.
14
+ - Do not skip phases. If inputs are missing, ask focused questions before moving on.
15
+ - At the end of every phase, update:
16
+ - `SHARED_PLANNING.md`
17
+ - `QUALITY_CHECKLIST.md`
18
+ - Artifact language under `docs/**` should default to English.
19
+ - Read stack and command configuration from `sdtk-spec.config.json` in the project root.
20
+ - For VI/JP source requirements, keep original text in an appendix and add literal English translation for traceability.
21
+ - `/dev` stops at `FEATURE_IMPL_PLAN + CODE_HANDOFF`; SDTK-CODE is the default downstream coding system.
22
+ - Verification-before-completion: no phase may declare done, pass, or handoff-ready without fresh command evidence per `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md`.
23
+ - `toolkit/skills/skills.catalog.yaml` is the inventory source of truth for the 14 core SDTK-SPEC skills, including the bounded `mailbox-dispatch` controller skill.
24
+
25
+ ## 0.2) Session Bootstrap Protocol
26
+ When starting a new session, read context in this order when the files exist:
27
+ 1. `AGENTS.md`
28
+ 2. `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md`
29
+ 3. `governance/ai/session/SDTK_AGENT_WORKING_RULES.md`
30
+ 4. `governance/ai/core/IMPROVEMENT_BACKLOG.md`
31
+ 5. issue-specific controller spec and implementation plan
32
+
33
+ Do not read the entire historical session archive by default. Use `SDTK_SESSION_MEMORY_*.md` only when chronology or past acceptance details are required.
34
+
35
+ ## 0.3) Orchestrator-First Intake Protocol
36
+ For every unprefixed user request:
37
+ 1. Classify the request intent before selecting PM/BA/ARCH/DEV/QA or a downstream product lane.
38
+ 2. Route to the smallest sufficient workflow:
39
+ - unclear idea or early concept -> brainstorm / requirement clarification, then create or update `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`
40
+ - formal feature discovery or planning -> SDTK-SPEC pipeline
41
+ - implementation, bug fix, refactor, verification, or ship-ready code -> SDTK-CODE
42
+ - deploy, release, infrastructure, CI/CD, monitoring, incident, backup, security-infra, or ops verification -> SDTK-OPS
43
+ - documentation graph or Atlas viewer -> `sdtk-spec atlas` compatibility workflow, or `sdtk-wiki` for canonical SDTK-WIKI work
44
+ - SDTK-WIKI Ask -> native `sdtk-wiki ask` when `.sdtk/wiki/graph` and `wiki.ask` entitlement/runtime preconditions are present
45
+ - project ingest, project refresh, or project audit -> the matching project command or workflow
46
+ - review or release decision -> review/QA workflow
47
+ 3. Ask focused questions only when missing information blocks safe routing.
48
+ 4. Do not force raw ideas directly into PM Phase 1. Clarify the requirement first in `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`, then start PM initiation only after the artifact is marked `READY_FOR_PM_INITIATION`.
49
+ 5. When routing creates artifacts, record decisions and open questions in the correct SDTK artifact.
50
+
51
+ ## 0.4) Intent-To-Skill Routing Matrix
52
+ Use this compact matrix during intake so the agent picks the smallest sufficient workflow instead of defaulting everything to PM:
53
+
54
+ | User intent | Primary route | Output expectation |
55
+ |---|---|---|
56
+ | Raw idea | Brainstorm / requirement clarification | `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` with clarified problem, scope, assumptions, open questions, and readiness |
57
+ | Approved idea ready for product planning | `SDTK-SPEC` PM initiation | `REQUIREMENT_[FEATURE_KEY]` marked `READY_FOR_PM_INITIATION`, then `PROJECT_INITIATION` kickoff |
58
+ | Formal feature delivery | `SDTK-SPEC` pipeline | PM -> BA -> ARCH -> DEV planning -> CODE handoff -> QA |
59
+ | Build, fix, or refactor implementation | `SDTK-CODE` | Planned, implemented, verified code change |
60
+ | Debug failure or unexpected behavior | `SDTK-CODE` debug | Root cause, bounded fix, regression verification |
61
+ | Deployment, release, infra, or CI/CD work | `SDTK-OPS` | Ops plan or execution plus verification evidence |
62
+ | Code review or spec review | Review / QA workflow | Findings, risks, blockers, acceptance signal |
63
+ | Atlas graph build or viewer work | `sdtk-spec atlas` compatibility workflow or `sdtk-wiki atlas` for canonical SDTK-WIKI work | Local `.sdtk/atlas` compatibility graph or `.sdtk/wiki` SDTK-WIKI result |
64
+ | SDTK-WIKI Ask | `sdtk-wiki ask` | Grounded answer when `.sdtk/wiki/graph` plus `wiki.ask` entitlement/runtime preconditions are present, otherwise explicit blocker |
65
+ | Existing project scan: project ingest, project refresh, or project audit | Matching premium project workflow | Project-local foundation, refresh, or audit result without overclaiming entitlement |
66
+ | "what should we do next" | Orchestrator state review | Recommended next action with rationale and lane choice |
67
+
68
+ Guardrails:
69
+ - Explicit user role prefix wins unless safety or missing critical inputs block execution.
70
+ - Raw idea clarification should use `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`; do not widen BK-099 into generator automation, package sync, or BK-100 validation work.
71
+ - Do not claim SDTK-WIKI Ask, project ingest, project refresh, project audit, web discover, compile, or query-history availability unless the runtime and entitlement preconditions are actually present.
72
+
73
+ ## 0.5) Proceed-Vs-Ask Decision Rules
74
+ Ask clarification when:
75
+ 1. the requested outcome is ambiguous
76
+ 2. safety, security, or release impact is unclear
77
+ 3. the target repo, project, or path is missing
78
+ 4. implementation is requested without an acceptance boundary
79
+ 5. the next command could mutate external state
80
+
81
+ Proceed when:
82
+ 1. the intent and target are clear
83
+ 2. the task is read-only analysis
84
+ 3. the user already approved the relevant plan or spec
85
+ 4. the requested change is bounded and verifiable
86
+
87
+ ## 0.1) Clarification Protocol
88
+ Apply for all roles (`/pm`, `/ba`, `/arch`, `/dev`, `/qa`):
89
+ 1. If there is ambiguity or missing data, log `Open Questions` as `OQ-xx` in the current phase artifact.
90
+ 2. Do not guess for behavior, API contracts, UI/UX, data model, security, or release criteria.
91
+ 3. Escalate unresolved items to PM with question ID and file reference.
92
+ 4. PM resolves by:
93
+ - using available docs and making a clear decision, or
94
+ - asking the user if source information is still missing.
95
+ 5. Record decisions in PRD (`Decision Log`) and update the originating `OQ-xx` with resolution.
96
+
97
+ For raw ideas before PM initiation:
98
+ 1. Use `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` as the canonical clarification artifact.
99
+ 2. Record scope, non-goals, assumptions, constraints, open questions, and readiness there before opening `PROJECT_INITIATION`.
100
+ 3. Treat the discovery artifact as a bridge into PM initiation, not as a PRD replacement.
101
+
102
+ ## 1) Role Selection In One Message
103
+ When the user prefixes a message, execute that role:
104
+ - `/orchestrator` (default intake + routing)
105
+ - `/pm` (formal product initiation + planning)
106
+ - `/ba`
107
+ - `/arch`
108
+ - `/dev`
109
+ - `/qa`
110
+ - `/engineer` (escalation for technical blockers)
111
+
112
+ Notes:
113
+ - Supported delivery roles are PM/BA/ARCH/DEV/QA.
114
+ - There is no separate `/tester` role. Test-case design belongs to QA with `sdtk-test-case-spec`.
115
+
116
+ ## 2) Standard 6-Phase Pipeline
117
+ Use this formal pipeline after Orchestrator Intake determines that the request is ready for SDTK-SPEC feature delivery.
118
+
119
+ 0. Discovery / Clarification when needed -> `docs/discovery/REQUIREMENT_[FEATURE_KEY].md`
120
+ 1. PM Initiation -> `docs/product/PROJECT_INITIATION_[FEATURE_KEY].md`
121
+ 2. BA Analysis -> `docs/specs/BA_SPEC_[FEATURE_KEY].md`
122
+ 3. PM Planning -> `docs/product/PRD_[FEATURE_KEY].md` + `docs/product/BACKLOG_[FEATURE_KEY].md`
123
+ 4. ARCH Design -> `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (plus API/layout docs when needed)
124
+ 5. DEV Planning + SDTK-CODE Handoff -> `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md` + `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
125
+ 6. QA Testing -> `docs/qa/[FEATURE_KEY]_TEST_CASE.md` + `docs/qa/QA_RELEASE_REPORT_[FEATURE_KEY].md`
126
+
127
+ Notes:
128
+ - Phase 0 is only for raw ideas, unclear concepts, and early feature discovery.
129
+ - PM initiation starts only after `docs/discovery/REQUIREMENT_[FEATURE_KEY].md` is marked `READY_FOR_PM_INITIATION`.
130
+ - The discovery artifact does not replace PM, BA, PRD, backlog, or architecture deliverables.
131
+
132
+ Default bridge after Phase 5 planning output:
133
+ - `/dev` emits the handoff
134
+ - SDTK-CODE performs `start -> plan -> build -> verify -> ship`
135
+ - `/qa` consumes downstream implementation evidence plus `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json` and downstream OPS evidence
136
+
137
+ ## 2.1) DEV Handoff Contract
138
+ DEV output is planning + readiness gating, not final code delivery:
139
+ 1. Build or refine `FEATURE_IMPL_PLAN`.
140
+ 2. Generate `CODE_HANDOFF_[FEATURE_KEY].json`.
141
+ 3. Keep blockers explicit when the work is not ready for SDTK-CODE.
142
+
143
+ `/dev` does not auto-run SDTK-CODE.
144
+
145
+ ## 2.2) Suite Product Routing
146
+ Use the suite products according to task intent:
147
+
148
+ - `SDTK-SPEC`
149
+ - feature discovery
150
+ - requirements, BA, PRD, backlog, architecture, QA artifacts
151
+ - handoff generation and release-gate traceability
152
+ - `SDTK-CODE`
153
+ - build a feature
154
+ - fix a bug
155
+ - refactor implementation
156
+ - run implementation verification
157
+ - ship code changes
158
+ - `SDTK-OPS`
159
+ - deploy or release
160
+ - infrastructure and environment setup
161
+ - CI/CD changes
162
+ - monitoring, incident response, security-infra, backup, compliance
163
+
164
+ If the current project only has `SDTK-SPEC` runtime assets installed:
165
+ - keep `/dev` bounded to planning and `CODE_HANDOFF`
166
+ - do not overclaim that SDTK-CODE or SDTK-OPS runtime assets are already installed
167
+ - still describe the correct downstream suite path in guidance and handoffs
168
+
169
+ ## 3) Shared State And Quality Gates
170
+ - `SHARED_PLANNING.md`: phase status, owners, artifacts, blockers, handoff notes.
171
+ - `QUALITY_CHECKLIST.md`: gate checklist by phase.
172
+ - No handoff to next phase while current gate is not PASS.
173
+ - QA cannot start until downstream implementation evidence exists, normally from SDTK-CODE.
174
+ - QA cannot approve until `OPS_HANDOFF` and downstream OPS evidence are present and aligned.
175
+
176
+ ## 4) Minimum Traceability
177
+ - PM: `REQ-xx` requirements, scope, success metrics.
178
+ - BA: `BR-xx`, `UC-xx`, `AC-xx`, `NFR-xx`, and traceability matrix.
179
+ - ARCH: map UC/BR to API/DB/flows/screens.
180
+ - DEV: map backlog stories to implementation slices, refs, blockers, and test obligations.
181
+ - QA: map downstream implementation evidence and downstream OPS evidence back to UC/AC.
182
+
183
+ ## 5) Feature Bootstrap
184
+ Run from project root:
185
+
186
+ ```
187
+ sdtk-spec generate --feature-key YOUR_FEATURE --feature-name "Your Feature"
188
+ ```
189
+
190
+ ## 6) ARCH Deliverables (Extended)
191
+ In addition to `ARCH_DESIGN`, ARCH may generate:
192
+ - `docs/api/[FEATURE_KEY]_ENDPOINTS.md`
193
+ - `docs/api/[FEATURE_KEY]_API_DESIGN_DETAIL.md`
194
+ - `docs/database/DATABASE_SPEC_[FEATURE_KEY].md`
195
+ - `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md`
196
+
197
+ ## 6.1) ARCH Orchestration Mapping
198
+ - Use `sdtk-api-doc` when API scope exists.
199
+ - Use `sdtk-api-design-spec` when API design detail is required from YAML + flow list.
200
+ - Use `sdtk-screen-design-spec` when UI flow-action specification is needed.
201
+ - Controlled by `sdtk-spec.config.json`:
202
+ - `orchestration.apiDesignDetailMode = auto|on|off`
203
+ - `auto`: generate when API scope and required sources are available.
204
+ - `on`: always generate for API scope.
205
+ - `off`: skip unless explicitly requested.
206
+
207
+ ## 6.2) QA Orchestration Mapping
208
+ - Use `sdtk-test-case-spec` when detailed worksheet-style test-case artifacts are required.
209
+ - Use `sdtk-qa` for execution report and release decision.
210
+ - QA accepts downstream implementation evidence from SDTK-CODE as the default handoff bridge, plus `OPS_HANDOFF + OPS evidence` in the current formal suite flow.
211
+ - Controlled by `sdtk-spec.config.json`:
212
+ - `orchestration.testCaseSpecMode = auto|on|off`
213
+ - `auto`: generate when QA requires test-case artifacts.
214
+ - `on`: always generate in QA phase.
215
+ - `off`: skip unless explicitly requested.
216
+
217
+ ## 6.3) Maintainer Assets
218
+ - Skill inventory: `toolkit/skills/skills.catalog.yaml`
219
+ - Handoff templates: `toolkit/templates/handoffs/`
220
+ - Example scenarios: `examples/`
221
+ - Readiness audit: `toolkit/scripts/check-runtime-readiness.ps1`
222
+ - SDTK-CODE handoff generator: `toolkit/scripts/generate-code-handoff.ps1`
223
+
224
+ ## 7) Mandatory Rule References
225
+ Canonical source-of-truth for shared rule files now lives under `toolkit/templates/docs/**`.
226
+ Use those paths when editing or reviewing the source toolkit.
227
+
228
+ Shared canonical rule files:
229
+ - `toolkit/templates/docs/api/YAML_CREATION_RULES.md` -- API YAML docs
230
+ - `toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md` -- API design detail + flow docs
231
+ - `toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md` -- API flow compatibility note
232
+ - `toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md` -- API design compatibility note
233
+ - `toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md` -- Screen flow-action specs
234
+ - `toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md` -- QA test-case specs
235
+
236
+ Retained skill-specific local references:
237
+ - `toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md` -- Flow-action numbering policy
238
+ - `toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md` -- Figma MCP integration
239
+ - `toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md` -- Excel image export
240
+
241
+ Runtime-installed mirrors may surface these rule files under skill-local runtime paths such as `.claude/skills/<skill>/references/` or `$CODEX_HOME/skills/<skill>/references/`. Do not treat those runtime copies as the maintainer source of truth.
242
+
243
+ Workflow governance docs:
244
+ - `governance/ai/core/SDTK_VERIFICATION_BEFORE_COMPLETION_POLICY.md` -- verification-before-completion gate
245
+ - `governance/ai/core/SDTK_SKILL_AUTHORING_AND_TESTING.md` -- maintainer authoring/test guide
246
+ Flow-action numbering policy:
247
+ - Use one global numbering mode for the whole document (no per-screen reset).