sdtk-spec-kit 0.4.4 → 0.4.6

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 (128) hide show
  1. package/README.md +369 -376
  2. package/assets/atlas/build_atlas.py +880 -880
  3. package/assets/atlas/doc_atlas_viewer_template.html +3796 -3782
  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/design-handoff-provenance.js +189 -0
  110. package/src/lib/entitlements.js +238 -238
  111. package/src/lib/errors.js +41 -41
  112. package/src/lib/github-access.js +143 -143
  113. package/src/lib/legacy-auth-migration.js +55 -55
  114. package/src/lib/license-activation.js +375 -375
  115. package/src/lib/powershell.js +85 -85
  116. package/src/lib/premium-loader.js +126 -126
  117. package/src/lib/premium-packs.js +331 -331
  118. package/src/lib/premium-sync.js +235 -235
  119. package/src/lib/project-audit.js +332 -332
  120. package/src/lib/project-config.js +108 -108
  121. package/src/lib/project-ingest.js +450 -450
  122. package/src/lib/project-refresh.js +666 -666
  123. package/src/lib/requirement-analysis.js +472 -0
  124. package/src/lib/scope.js +83 -83
  125. package/src/lib/state.js +73 -73
  126. package/src/lib/suite-state.js +70 -70
  127. package/src/lib/toolkit-payload.js +99 -99
  128. package/src/lib/atlas-ask.js +0 -170
package/README.md CHANGED
@@ -1,391 +1,384 @@
1
- # sdtk-spec-kit
2
-
3
- `sdtk-spec-kit` is the canonical shipped technical interface for `SDTK-SPEC`.
4
-
5
- It exposes the `sdtk-spec` CLI as the primary upstream command surface.
6
-
7
- Wraps the `SDTK-SPEC` PowerShell toolkit for portable, reproducible feature documentation scaffolding.
8
-
9
- Canonical install/runtime source in the source repo: `governance/ai/cli/SDTK_RUNTIME_AND_FEATURE_STATUS.md`
10
-
11
- Generated skills include verification gates and two-stage review hard gates. The current source baseline also ships a canonical skill catalog, handoff templates, public example packs, and a runtime readiness audit. See `products/sdtk-spec/toolkit/SDTK_TOOLKIT.md` for workflow quality contracts.
12
-
13
- ## Migration From `sdtk-kit` / `sdtk`
14
-
15
- If you previously used the older interface, uninstall the deprecated package first, then install the canonical package:
16
-
17
- ```bash
18
- npm uninstall -g sdtk-kit
19
- npm install -g sdtk-spec-kit
20
- ```
21
-
22
- After migrating, replace `sdtk ...` commands with `sdtk-spec ...`.
23
-
24
- ## Install
25
-
26
- ```bash
27
- npm install -g sdtk-spec-kit
28
- # or link locally for development:
29
- npm link
30
- ```
31
-
32
- ## Update Existing Installation
33
-
34
- Use the public `update` command when `sdtk-spec-kit` is already installed and you want the current published package line plus refreshed managed project or runtime files.
35
-
36
- ```bash
37
- sdtk-spec update --check-only
38
- sdtk-spec update --runtime claude --project-path ./my-project
39
- ```
40
-
41
- Codex user-scope example:
42
-
43
- ```bash
44
- sdtk-spec update --runtime codex --scope user --project-path ./my-project
45
- ```
46
-
47
- Important truth:
48
- - `sdtk-spec update` still uses `npm install -g sdtk-spec-kit@<target>` as the package refresh mechanism
49
- - `update --check-only` is non-destructive and prints the planned commands only
50
- - `--skip-project-files` suppresses `sdtk-spec init --force`
51
- - `--skip-runtime-assets` suppresses runtime refresh
52
- - there is no umbrella suite-wide update command
53
-
54
- ## Quick Start
55
-
56
- ### Free Tier
57
-
58
- ```bash
59
- # 1. Install
60
- npm install -g sdtk-spec-kit
61
-
62
- # 2. Initialize workspace with runtime adapter
63
- sdtk-spec init --runtime claude
64
-
65
- # 3. Generate feature documentation (17-file scaffold)
66
- sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"
67
-
68
- # 4. Optional: build the free local Atlas graph
1
+ # sdtk-spec-kit
2
+
3
+ `sdtk-spec-kit` is the canonical shipped technical interface for `SDTK-SPEC`.
4
+
5
+ It exposes the `sdtk-spec` CLI as the primary upstream command surface.
6
+
7
+ Wraps the `SDTK-SPEC` PowerShell toolkit for portable, reproducible feature documentation scaffolding.
8
+
9
+ Canonical install/runtime source in the source repo: `governance/ai/cli/SDTK_RUNTIME_AND_FEATURE_STATUS.md`
10
+
11
+ Generated skills include verification gates and two-stage review hard gates. The current source baseline also ships a canonical skill catalog, handoff templates, public example packs, and a runtime readiness audit. See `products/sdtk-spec/toolkit/SDTK_TOOLKIT.md` for workflow quality contracts.
12
+
13
+ ## Migration From `sdtk-kit` / `sdtk`
14
+
15
+ If you previously used the older interface, uninstall the deprecated package first, then install the canonical package:
16
+
17
+ ```bash
18
+ npm uninstall -g sdtk-kit
19
+ npm install -g sdtk-spec-kit
20
+ ```
21
+
22
+ After migrating, replace `sdtk ...` commands with `sdtk-spec ...`.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install -g sdtk-spec-kit
28
+ # or link locally for development:
29
+ npm link
30
+ ```
31
+
32
+ ## Update Existing Installation
33
+
34
+ Use the public `update` command when `sdtk-spec-kit` is already installed and you want the current published package line plus refreshed managed project or runtime files.
35
+
36
+ ```bash
37
+ sdtk-spec update --check-only
38
+ sdtk-spec update --runtime claude --project-path ./my-project
39
+ ```
40
+
41
+ Codex user-scope example:
42
+
43
+ ```bash
44
+ sdtk-spec update --runtime codex --scope user --project-path ./my-project
45
+ ```
46
+
47
+ Important truth:
48
+ - `sdtk-spec update` still uses `npm install -g sdtk-spec-kit@<target>` as the package refresh mechanism
49
+ - `update --check-only` is non-destructive and prints the planned commands only
50
+ - `--skip-project-files` suppresses `sdtk-spec init --force`
51
+ - `--skip-runtime-assets` suppresses runtime refresh
52
+ - there is no umbrella suite-wide update command
53
+
54
+ ## Quick Start
55
+
56
+ ### Free Tier
57
+
58
+ ```bash
59
+ # 1. Install
60
+ npm install -g sdtk-spec-kit
61
+
62
+ # 2. Initialize workspace with runtime adapter
63
+ sdtk-spec init --runtime claude
64
+
65
+ # 3. Generate feature documentation (17-file scaffold)
66
+ sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"
67
+
68
+ # 4. Optional: build the free local Atlas compatibility graph
69
69
  sdtk-spec atlas init --project-path .
70
+ ```
71
+
72
+ ### Pro / Custom Tier
73
+
74
+ ```bash
75
+ # 1. Install
76
+ npm install -g sdtk-spec-kit
77
+
78
+ # 2. Activate your license (activation key was sent to your email)
79
+ sdtk-spec activate --license SDTK-XXXX-YYYY
80
+
81
+ # 3. Initialize workspace with runtime adapter
82
+ sdtk-spec init --runtime claude
83
+
84
+ # 4. Generate feature documentation (17-file scaffold)
85
+ sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"
86
+
87
+ # 5. Use premium features: ingest/audit an existing project
88
+ sdtk-spec project ingest --project-path .
89
+ sdtk-spec project audit --project-path . --json
90
+
70
91
  ```
71
-
72
- ### Pro / Custom Tier
73
-
74
- ```bash
75
- # 1. Install
76
- npm install -g sdtk-spec-kit
77
-
78
- # 2. Activate your license (activation key was sent to your email)
79
- sdtk-spec activate --license SDTK-XXXX-YYYY
80
-
81
- # 3. Initialize workspace with runtime adapter
82
- sdtk-spec init --runtime claude
83
-
84
- # 4. Generate feature documentation (17-file scaffold)
85
- sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"
86
-
87
- # 5. Use premium features: ingest/audit an existing project
88
- sdtk-spec project ingest --project-path .
89
- sdtk-spec project audit --project-path . --json
90
-
91
- # 6. Ask grounded questions over project documentation
92
- sdtk-spec atlas ask --project-path . --question "What is the deployment strategy?"
93
- ```
94
-
95
- The CLI generates the scaffold contract only. Full content enrichment still runs phase-by-phase through PM, BA, ARCH, DEV, and QA using the installed runtime guidance plus the toolkit docs.
96
-
97
- ## Commands
98
-
99
- ### `sdtk-spec init`
100
-
101
- Initialize `SDTK-SPEC` workspace in the current or specified project directory.
102
-
103
- ```bash
104
- sdtk-spec init --runtime <codex|claude> [--project-path <path>] [--force] [--runtime-scope <project|user>] [--skip-runtime-assets]
105
-
106
- # Deprecated: --skip-skills (use --skip-runtime-assets instead)
107
- ```
108
-
109
- Creates:
110
- - `AGENTS.md` -- project-level agent guidance
111
- - `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md` -- compact session bootstrap truth
112
- - `governance/ai/session/SDTK_AGENT_WORKING_RULES.md` -- stable working-style contract
113
- - `sdtk-spec.config.json` -- project configuration
114
- - `sdtk-spec.config.profiles.example.json` -- stack profile examples
115
- - `CODEX.md` or `CLAUDE.md` -- runtime adapter
116
- - for `--runtime claude`, skill files are installed into `.claude/skills/` (project scope, default) or `~/.claude/skills/` (user scope) unless `--skip-runtime-assets` is used
117
- - for `--runtime codex`, skill files install into `$CODEX_HOME/skills/` or `~/.codex/skills/` by default, and into `<project>/.codex/skills/` only when you intentionally launch with the explicit local `CODEX_HOME=<project>/.codex` contract, unless `--skip-runtime-assets` is used
118
- - `--skip-skills` is deprecated; use `--skip-runtime-assets` instead
119
-
120
- ### `sdtk-spec auth` (Advanced / Internal)
121
-
122
- **Note:** For public Pro/Custom users, use `sdtk-spec activate --license` instead. This command is for advanced or internal organization setups.
123
-
124
- Manage GitHub authentication and verify entitlement.
125
-
126
- ```bash
127
- sdtk-spec auth --token <value> # store PAT (advanced)
128
- sdtk-spec auth --verify # check repo access (advanced)
129
- sdtk-spec auth --status # show auth state
130
- sdtk-spec auth --logout # clear credentials
131
- ```
132
-
133
- #### Entitlement repo override (Advanced)
134
-
135
- By default, `sdtk-spec auth --verify` checks access against the built-in private repo. You can override this with the `SDTK_ENTITLEMENT_REPO` environment variable:
136
-
137
- ```bash
138
- # bash / zsh
139
- export SDTK_ENTITLEMENT_REPO=owner/repo
140
- sdtk-spec auth --verify
141
- ```
142
-
143
- ```powershell
144
- # PowerShell
145
- $env:SDTK_ENTITLEMENT_REPO="owner/repo"
146
- sdtk-spec auth --verify
147
- ```
148
-
149
- ### `sdtk-spec activate` (Pro / Custom)
150
-
151
- Unlock premium features with your activation key.
152
-
153
- ```bash
154
- sdtk-spec activate --license SDTK-XXXX-YYYY
155
- sdtk-spec entitlement status
156
- ```
157
-
158
- Your activation key was sent to your email after purchase. This command:
159
- - Exchanges your key for a signed entitlement manifest
160
- - Installs required premium packs locally
161
- - Unlocks all premium commands immediately
162
-
163
- ### `sdtk-spec entitlement`
164
-
165
- Inspect local entitlement state.
166
-
167
- ```bash
168
- sdtk-spec entitlement status
169
- sdtk-spec entitlement sync # advanced / internal only
170
- ```
171
-
172
- Important:
173
- - `entitlement status` is local-only and does not hit the network.
174
- - `entitlement sync` is an advanced command for organization-based setups or troubleshooting.
175
- - For public Pro/Custom users, use `sdtk-spec activate --license` instead.
176
- - Premium commands such as `atlas ask`, `project ingest`, `project audit`, and `project refresh` fail closed when entitlement or pack integrity is missing.
177
-
178
- ### `sdtk-spec generate`
179
-
180
- Generate feature documentation from templates. Produces 17 files matching the `SDTK-SPEC` toolkit contract.
181
-
182
- ```bash
183
- sdtk-spec generate --feature-key <UPPER_SNAKE_CASE> --feature-name "<text>" [--project-path <path>] [--force] [--validate-only]
184
- ```
185
-
186
- Output files include: project initiation, BA spec, flow-action spec, PRD, backlog, architecture design, database spec, API specs (OpenAPI + endpoints + design detail + flow list), UI design layout, implementation plan, test cases, and QA release report.
187
-
188
- ### `sdtk-spec atlas`
189
-
92
+
93
+ The CLI generates the scaffold contract only. Full content enrichment still runs phase-by-phase through PM, BA, ARCH, DEV, and QA using the installed runtime guidance plus the toolkit docs.
94
+
95
+ ## Commands
96
+
97
+ ### `sdtk-spec init`
98
+
99
+ Initialize `SDTK-SPEC` workspace in the current or specified project directory.
100
+
101
+ ```bash
102
+ sdtk-spec init --runtime <codex|claude> [--project-path <path>] [--force] [--runtime-scope <project|user>] [--skip-runtime-assets]
103
+
104
+ # Deprecated: --skip-skills (use --skip-runtime-assets instead)
105
+ ```
106
+
107
+ Creates:
108
+ - `AGENTS.md` -- project-level agent guidance
109
+ - `governance/ai/session/SDTK_ACTIVE_BOOTSTRAP.md` -- compact session bootstrap truth
110
+ - `governance/ai/session/SDTK_AGENT_WORKING_RULES.md` -- stable working-style contract
111
+ - `sdtk-spec.config.json` -- project configuration
112
+ - `sdtk-spec.config.profiles.example.json` -- stack profile examples
113
+ - `CODEX.md` or `CLAUDE.md` -- runtime adapter
114
+ - for `--runtime claude`, skill files are installed into `.claude/skills/` (project scope, default) or `~/.claude/skills/` (user scope) unless `--skip-runtime-assets` is used
115
+ - for `--runtime codex`, skill files install into `$CODEX_HOME/skills/` or `~/.codex/skills/` by default, and into `<project>/.codex/skills/` only when you intentionally launch with the explicit local `CODEX_HOME=<project>/.codex` contract, unless `--skip-runtime-assets` is used
116
+ - `--skip-skills` is deprecated; use `--skip-runtime-assets` instead
117
+
118
+ ### `sdtk-spec auth` (Advanced / Internal)
119
+
120
+ **Note:** For public Pro/Custom users, use `sdtk-spec activate --license` instead. This command is for advanced or internal organization setups.
121
+
122
+ Manage GitHub authentication and verify entitlement.
123
+
124
+ ```bash
125
+ sdtk-spec auth --token <value> # store PAT (advanced)
126
+ sdtk-spec auth --verify # check repo access (advanced)
127
+ sdtk-spec auth --status # show auth state
128
+ sdtk-spec auth --logout # clear credentials
129
+ ```
130
+
131
+ #### Entitlement repo override (Advanced)
132
+
133
+ By default, `sdtk-spec auth --verify` checks access against the built-in private repo. You can override this with the `SDTK_ENTITLEMENT_REPO` environment variable:
134
+
135
+ ```bash
136
+ # bash / zsh
137
+ export SDTK_ENTITLEMENT_REPO=owner/repo
138
+ sdtk-spec auth --verify
139
+ ```
140
+
141
+ ```powershell
142
+ # PowerShell
143
+ $env:SDTK_ENTITLEMENT_REPO="owner/repo"
144
+ sdtk-spec auth --verify
145
+ ```
146
+
147
+ ### `sdtk-spec activate` (Pro / Custom)
148
+
149
+ Unlock premium features with your activation key.
150
+
151
+ ```bash
152
+ sdtk-spec activate --license SDTK-XXXX-YYYY
153
+ sdtk-spec entitlement status
154
+ ```
155
+
156
+ Your activation key was sent to your email after purchase. This command:
157
+ - Exchanges your key for a signed entitlement manifest
158
+ - Installs required premium packs locally
159
+ - Unlocks all premium commands immediately
160
+
161
+ ### `sdtk-spec entitlement`
162
+
163
+ Inspect local entitlement state.
164
+
165
+ ```bash
166
+ sdtk-spec entitlement status
167
+ sdtk-spec entitlement sync # advanced / internal only
168
+ ```
169
+
170
+ Important:
171
+ - `entitlement status` is local-only and does not hit the network.
172
+ - `entitlement sync` is an advanced command for organization-based setups or troubleshooting.
173
+ - For public Pro/Custom users, use `sdtk-spec activate --license` instead.
174
+ - Premium commands such as `project ingest`, `project audit`, and `project refresh` fail closed when entitlement or pack integrity is missing.
175
+
176
+ ### `sdtk-spec generate`
177
+
178
+ Generate feature documentation from templates. Produces 17 files matching the `SDTK-SPEC` toolkit contract.
179
+
180
+ ```bash
181
+ sdtk-spec generate --feature-key <UPPER_SNAKE_CASE> --feature-name "<text>" [--project-path <path>] [--force] [--validate-only]
182
+ ```
183
+
184
+ Output files include: project initiation, BA spec, flow-action spec, PRD, backlog, architecture design, database spec, API specs (OpenAPI + endpoints + design detail + flow list), UI design layout, implementation plan, test cases, and QA release report.
185
+
186
+ ### `sdtk-spec atlas`
187
+
190
188
  Build and browse a local document graph for your project.
191
189
 
192
- Atlas is a free local feature. No authentication or entitlement is required.
193
-
194
- #### Subcommands
195
-
196
- ```bash
197
- sdtk-spec atlas init # Initialize Atlas config and run first build (opens viewer)
198
- sdtk-spec atlas build # Rebuild the local document graph from project markdown
190
+ Atlas is a free local compatibility feature in `sdtk-spec-kit`. No
191
+ authentication or entitlement is required. New SDTK-WIKI work uses
192
+ `sdtk-wiki` and canonical `.sdtk/wiki` storage; `sdtk-spec atlas` remains the
193
+ R1 compatibility path and continues to write `.sdtk/atlas`.
194
+
195
+ #### Subcommands
196
+
197
+ ```bash
198
+ sdtk-spec atlas init # Initialize Atlas config and run first build (opens viewer)
199
+ sdtk-spec atlas build # Rebuild the local document graph from project markdown
199
200
  sdtk-spec atlas open # Open the last successful atlas build in a local browser
200
201
  sdtk-spec atlas watch # Watch for markdown changes and rebuild automatically
201
202
  sdtk-spec atlas status # Show initialization state and last build summary
202
- sdtk-spec atlas ask # Ask grounded questions over local Atlas docs (Pro)
203
- ```
204
-
205
- #### First-run flow
206
-
207
- ```bash
208
- cd <project>
209
- sdtk-spec atlas init
210
- ```
211
-
203
+ ```
204
+
205
+ #### First-run flow
206
+
207
+ ```bash
208
+ cd <project>
209
+ sdtk-spec atlas init
210
+ ```
211
+
212
212
  This creates `.sdtk/atlas/config.json`, scans local markdown, builds the document graph and static viewer, and opens the viewer in your browser by default.
213
-
214
- #### Common flows
215
-
216
- ```bash
217
- # Initialize with a custom project path, skip opening viewer
218
- sdtk-spec atlas init --project-path ./my-project --no-open
219
-
220
- # Rebuild after doc changes
221
- sdtk-spec atlas build --project-path ./my-project
222
-
223
- # Open the viewer manually
224
- sdtk-spec atlas open --project-path ./my-project
225
-
226
- # Watch for changes and rebuild continuously
227
- sdtk-spec atlas watch --project-path ./my-project
228
-
229
- # Check Atlas initialization state and last build summary
230
- sdtk-spec atlas status --project-path ./my-project
231
-
232
- # Ask grounded questions over the local Atlas graph (Pro)
233
- sdtk-spec atlas ask --project-path ./my-project --question "How do I install this toolkit?"
234
- ```
235
-
236
- #### Options (init)
237
-
238
- ```bash
239
- sdtk-spec atlas init [--project-path <path>] [--output-dir <path>] [--scan-root <path>] [--force] [--no-build] [--no-open] [--verbose]
240
- ```
241
-
242
- #### Options (ask)
243
-
244
- ```bash
245
- sdtk-spec atlas ask --question "<text>" [--project-path <path>] [--output-dir <path>] [--source <path-or-id>] [--max-docs <n>] [--json] [--verbose]
213
+
214
+ #### Common flows
215
+
216
+ ```bash
217
+ # Initialize with a custom project path, skip opening viewer
218
+ sdtk-spec atlas init --project-path ./my-project --no-open
219
+
220
+ # Rebuild after doc changes
221
+ sdtk-spec atlas build --project-path ./my-project
222
+
223
+ # Open the viewer manually
224
+ sdtk-spec atlas open --project-path ./my-project
225
+
226
+ # Watch for changes and rebuild continuously
227
+ sdtk-spec atlas watch --project-path ./my-project
228
+
229
+ # Check Atlas initialization state and last build summary
230
+ sdtk-spec atlas status --project-path ./my-project
231
+
246
232
  ```
247
-
233
+
234
+ #### Options (init)
235
+
236
+ ```bash
237
+ sdtk-spec atlas init [--project-path <path>] [--output-dir <path>] [--scan-root <path>] [--force] [--no-build] [--no-open] [--verbose]
238
+ ```
239
+
248
240
  #### Key facts
249
-
241
+
250
242
  - Generated artifacts are written to `<project>/.sdtk/atlas/` (project-local, not global).
243
+ - `.sdtk/atlas` is the SPEC compatibility output path. Native SDTK-WIKI uses `.sdtk/wiki`.
251
244
  - The viewer server binds to `127.0.0.1` by default (loopback only).
252
245
  - Python 3.8+ must be available in `PATH` for `atlas init`, `build`, and `watch`.
253
246
  - Free Atlas scans local markdown files only and does not upload document content to external services.
254
- - `atlas ask` is a Pro capability and requires valid entitlement (unlock with `sdtk-spec activate --license`) plus a cached premium pack.
255
247
  - `sdtk-spec auth` and `sdtk-spec entitlement` are separate capability-management surfaces; they are not required for free Atlas commands.
256
-
257
- ### `sdtk-spec project`
258
-
259
- Run premium project intelligence workflows against an existing consumer repository.
260
-
261
- ```bash
262
- sdtk-spec project ingest # Build deterministic project foundation + staged docs baseline (Pro)
263
- sdtk-spec project audit # Read-only readiness / risk / gap audit (Pro)
264
- sdtk-spec project refresh # Incrementally refresh managed .sdtk/project/ artifacts (Pro)
265
- ```
266
-
267
- Examples:
268
-
269
- ```bash
270
- # First premium ingest against a consumer repo
271
- sdtk-spec project ingest --project-path ./my-project
272
-
273
- # Read-only audit using cached foundation when available
274
- sdtk-spec project audit --project-path ./my-project --json
275
-
276
- # Incrementally refresh foundation, evidence packs, and staged docs baseline
277
- sdtk-spec project refresh --project-path ./my-project
278
- ```
279
-
280
- Key facts:
281
-
282
- - `project ingest`, `project audit`, and `project refresh` are Pro features.
283
- - All three commands require a valid Pro entitlement (unlock with `sdtk-spec activate --license`) and a cached premium pack.
284
- - All artifacts stay project-local under `<project>/.sdtk/project/`.
285
- - `project ingest` writes reusable foundation artifacts such as census, source inventory, profile, module graph, runtime markers, evidence packs, and a staged docs baseline.
286
- - `project audit` is read-only. It does not mutate live `/docs/`, write new staged docs, or refresh ingest artifacts in place.
287
- - `project refresh` is incremental and requires an existing managed ingest baseline.
288
- - None of the project commands modify live `/docs/`; draft outputs remain under `.sdtk/project/`.
289
- - Maintainer-root guardrails block using the SDTK maintainer monorepo root as a premium project target.
290
-
291
- ### `sdtk-spec runtime`
292
-
293
- Manage runtime skill assets independently of `sdtk-spec init`.
294
-
295
- ```bash
296
- sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]
297
- sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>]
298
- sdtk-spec runtime status --runtime <codex|claude>
299
- ```
300
-
301
- Scope defaults:
302
- - `claude`: `project` (installs to `.claude/skills/`); `user` installs to `~/.claude/skills/`
303
- - `codex`: defaults to `user` scope (installs to `$CODEX_HOME/skills/` or `~/.codex/skills/`) and supports `project` scope only through the explicit local `CODEX_HOME=<project>/.codex` contract
304
-
305
- Important uninstall truth:
306
- - `sdtk-spec runtime uninstall` removes only SDTK-SPEC-managed skill folders for the selected runtime and scope
307
- - it does **not** delete parent runtime roots such as `.claude/`, `.claude/skills/`, `$CODEX_HOME/`, or `$CODEX_HOME/skills/`
308
- - `npm uninstall -g sdtk-spec-kit` removes the CLI package only and does not remove runtime assets that were already installed
309
-
310
- Examples:
311
-
312
- ```bash
313
- # Install Claude skills at project scope (default)
314
- sdtk-spec runtime install --runtime claude
315
-
316
- # Install Claude skills at user scope
317
- sdtk-spec runtime install --runtime claude --scope user
318
-
319
- # Check installed runtime assets
320
- sdtk-spec runtime status --runtime claude
321
-
322
- # Remove runtime assets
323
- sdtk-spec runtime uninstall --runtime claude --scope project
324
-
325
- # Remove the npm package after runtime cleanup
326
- npm uninstall -g sdtk-spec-kit
327
- ```
328
-
329
- ### `sdtk-spec --help` / `sdtk-spec --version`
330
-
331
- ```bash
332
- sdtk-spec --help
333
- sdtk-spec --version
334
- ```
335
-
336
- ## Exit Codes
337
-
338
- | Code | Meaning |
339
- |------|---------|
340
- | 0 | Success |
341
- | 1 | Validation or user error (bad args, missing auth) |
342
- | 2 | Dependency error (PowerShell not found) |
343
- | 3 | Integrity error (payload hash mismatch) |
344
- | 4 | Unexpected internal error |
345
-
346
- ## Requirements
347
-
348
- - Node.js >= 18.13.0
349
- - PowerShell (Windows PowerShell 5.1+ or PowerShell Core)
350
- - Python 3.8+ in `PATH` (required for `sdtk-spec atlas init`, `build`, and `watch`)
351
-
352
- ## Troubleshooting
353
-
354
- **PowerShell not found**
355
- - Ensure `powershell.exe` (Windows) or `pwsh` (macOS/Linux) is in your PATH.
356
-
357
- **Activation key not received**
358
- - Check your email (including spam/junk folders) for your activation key from the fulfillment system.
359
- - If the email is missing, contact support with your purchase order details.
360
-
361
- **Activation failed**
362
- - Verify your key is in the format `SDTK-XXXX-YYYY`.
363
- - Check your network connection.
364
- - If the issue persists, contact support with the error message.
365
-
366
- **Premium commands still locked after activation**
367
- - Run `sdtk-spec entitlement status` to verify activation succeeded.
368
- - If status shows no entitlement, try running `sdtk-spec activate --license <KEY>` again.
369
- - Reinstall the package if issues persist: `npm install -g sdtk-spec-kit@latest`.
370
-
371
- **Payload hash mismatch**
372
- - The bundled toolkit payload may be corrupted. Reinstall the package.
373
-
374
- **Atlas build fails or Python not found**
375
- - Install Python 3.8+ from python.org and ensure `python --version` works from the same shell.
376
- - Confirm Python is available in `PATH`, then rerun `sdtk-spec atlas build` or `sdtk-spec atlas init`.
377
-
378
- ## Development
379
-
380
- ```bash
381
- # Sync toolkit payload from repo root
382
- npm run build:payload
383
-
384
- # Verify payload integrity
385
- npm run verify:payload
386
-
387
- # Smoke test npm pack
388
- npm run pack:smoke
389
- ```
390
-
391
- Run `tests/skill_triggering/` to validate skill routing behavior.
248
+ - The old SPEC ask command path is not supported. Native Ask is owned by `sdtk-wiki ask` and capability `wiki.ask`.
249
+
250
+ ### `sdtk-spec project`
251
+
252
+ Run premium project intelligence workflows against an existing consumer repository.
253
+
254
+ ```bash
255
+ sdtk-spec project ingest # Build deterministic project foundation + staged docs baseline (Pro)
256
+ sdtk-spec project audit # Read-only readiness / risk / gap audit (Pro)
257
+ sdtk-spec project refresh # Incrementally refresh managed .sdtk/project/ artifacts (Pro)
258
+ ```
259
+
260
+ Examples:
261
+
262
+ ```bash
263
+ # First premium ingest against a consumer repo
264
+ sdtk-spec project ingest --project-path ./my-project
265
+
266
+ # Read-only audit using cached foundation when available
267
+ sdtk-spec project audit --project-path ./my-project --json
268
+
269
+ # Incrementally refresh foundation, evidence packs, and staged docs baseline
270
+ sdtk-spec project refresh --project-path ./my-project
271
+ ```
272
+
273
+ Key facts:
274
+
275
+ - `project ingest`, `project audit`, and `project refresh` are Pro features.
276
+ - All three commands require a valid Pro entitlement (unlock with `sdtk-spec activate --license`) and a cached premium pack.
277
+ - All artifacts stay project-local under `<project>/.sdtk/project/`.
278
+ - `project ingest` writes reusable foundation artifacts such as census, source inventory, profile, module graph, runtime markers, evidence packs, and a staged docs baseline.
279
+ - `project audit` is read-only. It does not mutate live `/docs/`, write new staged docs, or refresh ingest artifacts in place.
280
+ - `project refresh` is incremental and requires an existing managed ingest baseline.
281
+ - None of the project commands modify live `/docs/`; draft outputs remain under `.sdtk/project/`.
282
+ - Maintainer-root guardrails block using the SDTK maintainer monorepo root as a premium project target.
283
+
284
+ ### `sdtk-spec runtime`
285
+
286
+ Manage runtime skill assets independently of `sdtk-spec init`.
287
+
288
+ ```bash
289
+ sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]
290
+ sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>]
291
+ sdtk-spec runtime status --runtime <codex|claude>
292
+ ```
293
+
294
+ Scope defaults:
295
+ - `claude`: `project` (installs to `.claude/skills/`); `user` installs to `~/.claude/skills/`
296
+ - `codex`: defaults to `user` scope (installs to `$CODEX_HOME/skills/` or `~/.codex/skills/`) and supports `project` scope only through the explicit local `CODEX_HOME=<project>/.codex` contract
297
+
298
+ Important uninstall truth:
299
+ - `sdtk-spec runtime uninstall` removes only SDTK-SPEC-managed skill folders for the selected runtime and scope
300
+ - it does **not** delete parent runtime roots such as `.claude/`, `.claude/skills/`, `$CODEX_HOME/`, or `$CODEX_HOME/skills/`
301
+ - `npm uninstall -g sdtk-spec-kit` removes the CLI package only and does not remove runtime assets that were already installed
302
+
303
+ Examples:
304
+
305
+ ```bash
306
+ # Install Claude skills at project scope (default)
307
+ sdtk-spec runtime install --runtime claude
308
+
309
+ # Install Claude skills at user scope
310
+ sdtk-spec runtime install --runtime claude --scope user
311
+
312
+ # Check installed runtime assets
313
+ sdtk-spec runtime status --runtime claude
314
+
315
+ # Remove runtime assets
316
+ sdtk-spec runtime uninstall --runtime claude --scope project
317
+
318
+ # Remove the npm package after runtime cleanup
319
+ npm uninstall -g sdtk-spec-kit
320
+ ```
321
+
322
+ ### `sdtk-spec --help` / `sdtk-spec --version`
323
+
324
+ ```bash
325
+ sdtk-spec --help
326
+ sdtk-spec --version
327
+ ```
328
+
329
+ ## Exit Codes
330
+
331
+ | Code | Meaning |
332
+ |------|---------|
333
+ | 0 | Success |
334
+ | 1 | Validation or user error (bad args, missing auth) |
335
+ | 2 | Dependency error (PowerShell not found) |
336
+ | 3 | Integrity error (payload hash mismatch) |
337
+ | 4 | Unexpected internal error |
338
+
339
+ ## Requirements
340
+
341
+ - Node.js >= 18.13.0
342
+ - PowerShell (Windows PowerShell 5.1+ or PowerShell Core)
343
+ - Python 3.8+ in `PATH` (required for `sdtk-spec atlas init`, `build`, and `watch`)
344
+
345
+ ## Troubleshooting
346
+
347
+ **PowerShell not found**
348
+ - Ensure `powershell.exe` (Windows) or `pwsh` (macOS/Linux) is in your PATH.
349
+
350
+ **Activation key not received**
351
+ - Check your email (including spam/junk folders) for your activation key from the fulfillment system.
352
+ - If the email is missing, contact support with your purchase order details.
353
+
354
+ **Activation failed**
355
+ - Verify your key is in the format `SDTK-XXXX-YYYY`.
356
+ - Check your network connection.
357
+ - If the issue persists, contact support with the error message.
358
+
359
+ **Premium commands still locked after activation**
360
+ - Run `sdtk-spec entitlement status` to verify activation succeeded.
361
+ - If status shows no entitlement, try running `sdtk-spec activate --license <KEY>` again.
362
+ - Reinstall the package if issues persist: `npm install -g sdtk-spec-kit@latest`.
363
+
364
+ **Payload hash mismatch**
365
+ - The bundled toolkit payload may be corrupted. Reinstall the package.
366
+
367
+ **Atlas build fails or Python not found**
368
+ - Install Python 3.8+ from python.org and ensure `python --version` works from the same shell.
369
+ - Confirm Python is available in `PATH`, then rerun `sdtk-spec atlas build` or `sdtk-spec atlas init`.
370
+
371
+ ## Development
372
+
373
+ ```bash
374
+ # Sync toolkit payload from repo root
375
+ npm run build:payload
376
+
377
+ # Verify payload integrity
378
+ npm run verify:payload
379
+
380
+ # Smoke test npm pack
381
+ npm run pack:smoke
382
+ ```
383
+
384
+ Run `tests/skill_triggering/` to validate skill routing behavior.