sdtk-spec-kit 0.4.11 → 0.4.14

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