sdtk-spec-kit 0.3.10 → 0.3.12

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 (40) hide show
  1. package/README.md +219 -197
  2. package/assets/manifest/toolkit-bundle.manifest.json +72 -57
  3. package/assets/manifest/toolkit-bundle.sha256.txt +30 -27
  4. package/assets/toolkit/toolkit/README.md +50 -0
  5. package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +185 -0
  6. package/assets/toolkit/toolkit/install.ps1 +347 -310
  7. package/assets/toolkit/toolkit/scripts/init-feature.ps1 +2 -1
  8. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +84 -84
  9. package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  10. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  11. package/assets/toolkit/toolkit/skills/sdtk-api-doc/references/YAML_CREATION_RULES.md +127 -127
  12. package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -83
  13. package/assets/toolkit/toolkit/skills/sdtk-arch/references/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  14. package/assets/toolkit/toolkit/skills/sdtk-arch/references/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  15. package/assets/toolkit/toolkit/skills/sdtk-arch/references/YAML_CREATION_RULES.md +127 -127
  16. package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +108 -102
  17. package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +97 -81
  18. package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +37 -30
  19. package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +75 -61
  20. package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  21. package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +90 -90
  22. package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +25 -53
  23. package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +12 -6
  24. package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -124
  25. package/assets/toolkit/toolkit/templates/README.md +1 -0
  26. package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +81 -81
  27. package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
  28. package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +127 -127
  29. package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +174 -174
  30. package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +106 -96
  31. package/assets/toolkit/toolkit/templates/docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md +90 -0
  32. package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +162 -95
  33. package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
  34. package/package.json +20 -20
  35. package/src/commands/help.js +26 -10
  36. package/src/commands/init.js +108 -105
  37. package/src/commands/update.js +11 -0
  38. package/src/index.js +62 -59
  39. package/src/lib/project-target-guard.js +53 -0
  40. package/src/lib/update.js +333 -0
package/README.md CHANGED
@@ -1,198 +1,220 @@
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
-
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
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
- ## Quick Start
33
-
34
- ```bash
35
- # 1. Initialize workspace with runtime adapter
36
- sdtk-spec init --runtime claude
37
-
38
- # 2. Store GitHub token for entitlement
39
- sdtk-spec auth --token ghp_xxxxxxxxxxxx
40
- sdtk-spec auth --verify
41
-
42
- # 3. Generate feature documentation (17-file scaffold)
43
- sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"
44
- # Codex runtime remains available:
45
- # sdtk-spec init --runtime codex
46
-
47
- ```
48
-
49
- 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.
50
-
51
- ## Commands
52
-
53
- ### `sdtk-spec init`
54
-
55
- Initialize `SDTK-SPEC` workspace in the current or specified project directory.
56
-
57
- ```bash
58
- sdtk-spec init --runtime <codex|claude> [--project-path <path>] [--force] [--runtime-scope <project|user>] [--skip-runtime-assets]
59
-
60
- # Deprecated: --skip-skills (use --skip-runtime-assets instead)
61
- ```
62
-
63
- Creates:
64
- - `AGENTS.md` -- project-level agent guidance
65
- - `sdtk-spec.config.json` -- project configuration
66
- - `sdtk-spec.config.profiles.example.json` -- stack profile examples
67
- - `CODEX.md` or `CLAUDE.md` -- runtime adapter
68
- - for `--runtime claude`, skill files are installed into `.claude/skills/` (project scope, default) or `~/.claude/skills/` (user scope) unless `--skip-runtime-assets` is used
69
- - for `--runtime codex`, skill files are installed into `$CODEX_HOME/skills/` or `~/.codex/skills/` (user scope only) unless `--skip-runtime-assets` is used
70
- - `--skip-skills` is deprecated; use `--skip-runtime-assets` instead
71
-
72
- ### `sdtk-spec auth`
73
-
74
- Manage GitHub authentication and verify entitlement.
75
-
76
- ```bash
77
- sdtk-spec auth --token <value> # store PAT
78
- sdtk-spec auth --verify # check repo access
79
- sdtk-spec auth --status # show auth state
80
- sdtk-spec auth --logout # clear credentials
81
- ```
82
-
83
- #### Entitlement repo override
84
-
85
- 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:
86
-
87
- ```bash
88
- # bash / zsh
89
- export SDTK_ENTITLEMENT_REPO=owner/repo
90
- sdtk-spec auth --verify
91
- ```
92
-
93
- ```powershell
94
- # PowerShell
95
- $env:SDTK_ENTITLEMENT_REPO="owner/repo"
96
- sdtk-spec auth --verify
97
- ```
98
-
99
- ### `sdtk-spec generate`
100
-
101
- Generate feature documentation from templates. Produces 17 files matching the `SDTK-SPEC` toolkit contract.
102
-
103
- ```bash
104
- sdtk-spec generate --feature-key <UPPER_SNAKE_CASE> --feature-name "<text>" [--project-path <path>] [--force] [--validate-only]
105
- ```
106
-
107
- 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.
108
-
109
- ### `sdtk-spec runtime`
110
-
111
- Manage runtime skill assets independently of `sdtk-spec init`.
112
-
113
- ```bash
114
- sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]
115
- sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>]
116
- sdtk-spec runtime status --runtime <codex|claude>
117
- ```
118
-
119
- Scope defaults:
120
- - `claude`: `project` (installs to `.claude/skills/`); `user` installs to `~/.claude/skills/`
121
- - `codex`: `user` only (installs to `$CODEX_HOME/skills/` or `~/.codex/skills/`); project scope is not supported (Gate C0)
122
-
123
- Important uninstall truth:
124
- - `sdtk-spec runtime uninstall` removes only SDTK-SPEC-managed skill folders for the selected runtime and scope
125
- - it does **not** delete parent runtime roots such as `.claude/`, `.claude/skills/`, `$CODEX_HOME/`, or `$CODEX_HOME/skills/`
126
- - `npm uninstall -g sdtk-spec-kit` removes the CLI package only and does not remove runtime assets that were already installed
127
-
128
- Examples:
129
-
130
- ```bash
131
- # Install Claude skills at project scope (default)
132
- sdtk-spec runtime install --runtime claude
133
-
134
- # Install Claude skills at user scope
135
- sdtk-spec runtime install --runtime claude --scope user
136
-
137
- # Check installed runtime assets
138
- sdtk-spec runtime status --runtime claude
139
-
140
- # Remove runtime assets
141
- sdtk-spec runtime uninstall --runtime claude --scope project
142
-
143
- # Remove the npm package after runtime cleanup
144
- npm uninstall -g sdtk-spec-kit
145
- ```
146
-
147
- ### `sdtk-spec --help` / `sdtk-spec --version`
148
-
149
- ```bash
150
- sdtk-spec --help
151
- sdtk-spec --version
152
- ```
153
-
154
- ## Exit Codes
155
-
156
- | Code | Meaning |
157
- |------|---------|
158
- | 0 | Success |
159
- | 1 | Validation or user error (bad args, missing auth) |
160
- | 2 | Dependency error (PowerShell not found) |
161
- | 3 | Integrity error (payload hash mismatch) |
162
- | 4 | Unexpected internal error |
163
-
164
- ## Requirements
165
-
166
- - Node.js >= 18.13.0
167
- - PowerShell (Windows PowerShell 5.1+ or PowerShell Core)
168
-
169
- ## Troubleshooting
170
-
171
- **PowerShell not found**
172
- - Ensure `powershell.exe` (Windows) or `pwsh` (macOS/Linux) is in your PATH.
173
-
174
- **Invalid or expired token**
175
- - Run `sdtk-spec auth --token <new-token>` with a valid GitHub PAT.
176
-
177
- **No repository access**
178
- - Verify your token has access to the private distribution repo with `sdtk-spec auth --verify`.
179
- - If your organization uses a custom entitlement repo, set `SDTK_ENTITLEMENT_REPO=owner/repo` before running `--verify`.
180
-
181
- **Payload hash mismatch**
182
- - The bundled toolkit payload may be corrupted. Reinstall the package.
183
-
184
- ## Development
185
-
186
- ```bash
187
- # Sync toolkit payload from repo root
188
- npm run build:payload
189
-
190
- # Verify payload integrity
191
- npm run verify:payload
192
-
193
- # Smoke test npm pack
194
- npm run pack:smoke
195
- ```
196
-
197
- Run `tests/skill_triggering/` to validate skill routing behavior.
198
-
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 `sdtk-kit update`
53
+
54
+ ## Quick Start
55
+
56
+ ```bash
57
+ # 1. Initialize workspace with runtime adapter
58
+ sdtk-spec init --runtime claude
59
+
60
+ # 2. Store GitHub token for entitlement
61
+ sdtk-spec auth --token ghp_xxxxxxxxxxxx
62
+ sdtk-spec auth --verify
63
+
64
+ # 3. Generate feature documentation (17-file scaffold)
65
+ sdtk-spec generate --feature-key USER_PROFILE --feature-name "User Profile"
66
+ # Codex runtime remains available:
67
+ # sdtk-spec init --runtime codex
68
+
69
+ ```
70
+
71
+ 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.
72
+
73
+ ## Commands
74
+
75
+ ### `sdtk-spec init`
76
+
77
+ Initialize `SDTK-SPEC` workspace in the current or specified project directory.
78
+
79
+ ```bash
80
+ sdtk-spec init --runtime <codex|claude> [--project-path <path>] [--force] [--runtime-scope <project|user>] [--skip-runtime-assets]
81
+
82
+ # Deprecated: --skip-skills (use --skip-runtime-assets instead)
83
+ ```
84
+
85
+ Creates:
86
+ - `AGENTS.md` -- project-level agent guidance
87
+ - `sdtk-spec.config.json` -- project configuration
88
+ - `sdtk-spec.config.profiles.example.json` -- stack profile examples
89
+ - `CODEX.md` or `CLAUDE.md` -- runtime adapter
90
+ - for `--runtime claude`, skill files are installed into `.claude/skills/` (project scope, default) or `~/.claude/skills/` (user scope) unless `--skip-runtime-assets` is used
91
+ - 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
92
+ - `--skip-skills` is deprecated; use `--skip-runtime-assets` instead
93
+
94
+ ### `sdtk-spec auth`
95
+
96
+ Manage GitHub authentication and verify entitlement.
97
+
98
+ ```bash
99
+ sdtk-spec auth --token <value> # store PAT
100
+ sdtk-spec auth --verify # check repo access
101
+ sdtk-spec auth --status # show auth state
102
+ sdtk-spec auth --logout # clear credentials
103
+ ```
104
+
105
+ #### Entitlement repo override
106
+
107
+ 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:
108
+
109
+ ```bash
110
+ # bash / zsh
111
+ export SDTK_ENTITLEMENT_REPO=owner/repo
112
+ sdtk-spec auth --verify
113
+ ```
114
+
115
+ ```powershell
116
+ # PowerShell
117
+ $env:SDTK_ENTITLEMENT_REPO="owner/repo"
118
+ sdtk-spec auth --verify
119
+ ```
120
+
121
+ ### `sdtk-spec generate`
122
+
123
+ Generate feature documentation from templates. Produces 17 files matching the `SDTK-SPEC` toolkit contract.
124
+
125
+ ```bash
126
+ sdtk-spec generate --feature-key <UPPER_SNAKE_CASE> --feature-name "<text>" [--project-path <path>] [--force] [--validate-only]
127
+ ```
128
+
129
+ 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.
130
+
131
+ ### `sdtk-spec runtime`
132
+
133
+ Manage runtime skill assets independently of `sdtk-spec init`.
134
+
135
+ ```bash
136
+ sdtk-spec runtime install --runtime <codex|claude> [--scope <project|user>]
137
+ sdtk-spec runtime uninstall --runtime <codex|claude> [--scope <project|user>]
138
+ sdtk-spec runtime status --runtime <codex|claude>
139
+ ```
140
+
141
+ Scope defaults:
142
+ - `claude`: `project` (installs to `.claude/skills/`); `user` installs to `~/.claude/skills/`
143
+ - `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
144
+
145
+ Important uninstall truth:
146
+ - `sdtk-spec runtime uninstall` removes only SDTK-SPEC-managed skill folders for the selected runtime and scope
147
+ - it does **not** delete parent runtime roots such as `.claude/`, `.claude/skills/`, `$CODEX_HOME/`, or `$CODEX_HOME/skills/`
148
+ - `npm uninstall -g sdtk-spec-kit` removes the CLI package only and does not remove runtime assets that were already installed
149
+
150
+ Examples:
151
+
152
+ ```bash
153
+ # Install Claude skills at project scope (default)
154
+ sdtk-spec runtime install --runtime claude
155
+
156
+ # Install Claude skills at user scope
157
+ sdtk-spec runtime install --runtime claude --scope user
158
+
159
+ # Check installed runtime assets
160
+ sdtk-spec runtime status --runtime claude
161
+
162
+ # Remove runtime assets
163
+ sdtk-spec runtime uninstall --runtime claude --scope project
164
+
165
+ # Remove the npm package after runtime cleanup
166
+ npm uninstall -g sdtk-spec-kit
167
+ ```
168
+
169
+ ### `sdtk-spec --help` / `sdtk-spec --version`
170
+
171
+ ```bash
172
+ sdtk-spec --help
173
+ sdtk-spec --version
174
+ ```
175
+
176
+ ## Exit Codes
177
+
178
+ | Code | Meaning |
179
+ |------|---------|
180
+ | 0 | Success |
181
+ | 1 | Validation or user error (bad args, missing auth) |
182
+ | 2 | Dependency error (PowerShell not found) |
183
+ | 3 | Integrity error (payload hash mismatch) |
184
+ | 4 | Unexpected internal error |
185
+
186
+ ## Requirements
187
+
188
+ - Node.js >= 18.13.0
189
+ - PowerShell (Windows PowerShell 5.1+ or PowerShell Core)
190
+
191
+ ## Troubleshooting
192
+
193
+ **PowerShell not found**
194
+ - Ensure `powershell.exe` (Windows) or `pwsh` (macOS/Linux) is in your PATH.
195
+
196
+ **Invalid or expired token**
197
+ - Run `sdtk-spec auth --token <new-token>` with a valid GitHub PAT.
198
+
199
+ **No repository access**
200
+ - Verify your token has access to the private distribution repo with `sdtk-spec auth --verify`.
201
+ - If your organization uses a custom entitlement repo, set `SDTK_ENTITLEMENT_REPO=owner/repo` before running `--verify`.
202
+
203
+ **Payload hash mismatch**
204
+ - The bundled toolkit payload may be corrupted. Reinstall the package.
205
+
206
+ ## Development
207
+
208
+ ```bash
209
+ # Sync toolkit payload from repo root
210
+ npm run build:payload
211
+
212
+ # Verify payload integrity
213
+ npm run verify:payload
214
+
215
+ # Smoke test npm pack
216
+ npm run pack:smoke
217
+ ```
218
+
219
+ Run `tests/skill_triggering/` to validate skill routing behavior.
220
+