sdtk-code-kit 0.2.0 → 0.2.1

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 (75) hide show
  1. package/README.md +201 -201
  2. package/assets/manifest/toolkit-bundle.manifest.json +147 -147
  3. package/assets/manifest/toolkit-bundle.sha256.txt +28 -28
  4. package/assets/toolkit/toolkit/AGENTS.md +219 -219
  5. package/assets/toolkit/toolkit/install.ps1 +156 -156
  6. package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +78 -78
  7. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +150 -150
  8. package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +62 -62
  9. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +82 -82
  10. package/assets/toolkit/toolkit/sdtk-spec.config.json +6 -6
  11. package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +12 -12
  12. package/assets/toolkit/toolkit/skills/code-brainstorm/SKILL.md +55 -55
  13. package/assets/toolkit/toolkit/skills/code-debug/SKILL.md +296 -296
  14. package/assets/toolkit/toolkit/skills/code-debug/references/root-cause-tracing.md +68 -68
  15. package/assets/toolkit/toolkit/skills/code-discover/SKILL.md +54 -54
  16. package/assets/toolkit/toolkit/skills/code-execute/SKILL.md +74 -74
  17. package/assets/toolkit/toolkit/skills/code-finish/SKILL.md +205 -205
  18. package/assets/toolkit/toolkit/skills/code-parallel/SKILL.md +64 -64
  19. package/assets/toolkit/toolkit/skills/code-parallel/references/code-quality-reviewer-prompt.md +26 -26
  20. package/assets/toolkit/toolkit/skills/code-parallel/references/implementer-prompt.md +113 -113
  21. package/assets/toolkit/toolkit/skills/code-parallel/references/spec-reviewer-prompt.md +61 -61
  22. package/assets/toolkit/toolkit/skills/code-plan/SKILL.md +85 -85
  23. package/assets/toolkit/toolkit/skills/code-review/SKILL.md +79 -79
  24. package/assets/toolkit/toolkit/skills/code-review/references/checklist.md +125 -125
  25. package/assets/toolkit/toolkit/skills/code-review/references/code-reviewer.md +146 -146
  26. package/assets/toolkit/toolkit/skills/code-ship/SKILL.md +52 -52
  27. package/assets/toolkit/toolkit/skills/code-tdd/SKILL.md +378 -378
  28. package/assets/toolkit/toolkit/skills/code-tdd/references/testing-anti-patterns.md +299 -299
  29. package/assets/toolkit/toolkit/skills/code-verify/SKILL.md +144 -144
  30. package/assets/toolkit/toolkit/skills/code-worktree/SKILL.md +228 -228
  31. package/assets/toolkit/toolkit/templates/CODE_WORKFLOW_TEMPLATE.md +140 -140
  32. package/bin/sdtk-code.js +14 -14
  33. package/package.json +44 -44
  34. package/src/commands/build.js +53 -53
  35. package/src/commands/doctor.js +51 -51
  36. package/src/commands/generate.js +11 -11
  37. package/src/commands/guardrails.js +215 -123
  38. package/src/commands/help.js +244 -244
  39. package/src/commands/init.js +98 -98
  40. package/src/commands/plan.js +53 -53
  41. package/src/commands/readiness.js +77 -77
  42. package/src/commands/resume.js +61 -61
  43. package/src/commands/runtime.js +224 -224
  44. package/src/commands/ship.js +59 -59
  45. package/src/commands/sleep.js +132 -0
  46. package/src/commands/start.js +89 -89
  47. package/src/commands/status.js +77 -77
  48. package/src/commands/update.js +11 -11
  49. package/src/commands/verify.js +71 -71
  50. package/src/index.js +108 -104
  51. package/src/lib/args.js +107 -107
  52. package/src/lib/errors.js +41 -41
  53. package/src/lib/powershell.js +65 -65
  54. package/src/lib/project-target-guard.js +53 -53
  55. package/src/lib/scope.js +72 -72
  56. package/src/lib/ship-readiness.js +281 -281
  57. package/src/lib/sleep-plan.js +175 -0
  58. package/src/lib/sleep-report.js +229 -0
  59. package/src/lib/toolkit-payload.js +72 -72
  60. package/src/lib/trust-events.js +166 -166
  61. package/src/lib/trust-file-scope.js +154 -154
  62. package/src/lib/trust-policy.js +212 -212
  63. package/src/lib/trust-redact.js +35 -35
  64. package/src/lib/trust-trace.js +179 -179
  65. package/src/lib/update.js +344 -344
  66. package/src/lib/workflow-artifact.js +503 -503
  67. package/src/lib/workflow-build.js +127 -127
  68. package/src/lib/workflow-doctor.js +83 -83
  69. package/src/lib/workflow-handoff.js +1029 -1029
  70. package/src/lib/workflow-intake.js +101 -101
  71. package/src/lib/workflow-plan.js +193 -193
  72. package/src/lib/workflow-review-packet.js +650 -650
  73. package/src/lib/workflow-ship.js +213 -213
  74. package/src/lib/workflow-state.js +438 -438
  75. package/src/lib/workflow-verify.js +393 -393
package/README.md CHANGED
@@ -1,204 +1,204 @@
1
- # sdtk-code-kit
2
-
3
- `SDTK-CODE` is the coding-process product in the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family.
4
-
5
- ## Document Role
6
- This README is the npm package landing page for `sdtk-code-kit`.
7
-
8
- Use it to confirm:
9
- - package name and install command
10
- - canonical command surface
11
- - runtime scope truth
12
- - upstream dependency boundary
13
-
14
- For the full end-user guide, use:
15
- - `products/sdtk-code/governance/SDTKCODE_TOOLKIT_USAGE_GUIDE.md`
16
-
17
- ## Public Package Truth
18
-
1
+ # sdtk-code-kit
2
+
3
+ `SDTK-CODE` is the coding-process product in the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family.
4
+
5
+ ## Document Role
6
+ This README is the npm package landing page for `sdtk-code-kit`.
7
+
8
+ Use it to confirm:
9
+ - package name and install command
10
+ - canonical command surface
11
+ - runtime scope truth
12
+ - upstream dependency boundary
13
+
14
+ For the full end-user guide, use:
15
+ - `products/sdtk-code/governance/SDTKCODE_TOOLKIT_USAGE_GUIDE.md`
16
+
17
+ ## Public Package Truth
18
+
19
19
  - package: `sdtk-code-kit`
20
20
  - version in this source snapshot: `0.1.3`
21
21
  - command: `sdtk-code`
22
- - latest published version lookup: `npm view sdtk-code-kit version`
23
- - primary workflow-first surface:
24
- - `start`
25
- - `plan`
26
- - `build`
27
- - `verify`
28
- - `ship`
29
- - `status`
30
- - `doctor`
31
- - `resume`
32
- - support commands:
33
- - `init`
34
- - `update`
35
- - `runtime install`
36
- - `runtime status`
37
- - `runtime uninstall`
38
- - `help`
39
- - `--version`
40
-
41
- Not part of the v1 public surface:
42
- - `generate`
43
-
44
- ## Install
45
-
46
- ```powershell
47
- npm install -g sdtk-code-kit
48
- sdtk-code --version
49
- sdtk-code --help
50
- ```
51
-
52
- If you need the exact latest published version number, run:
53
-
54
- ```powershell
55
- npm view sdtk-code-kit version
56
- ```
57
-
58
- ## Update Existing Installation
59
-
60
- Use the public `update` command when `sdtk-code-kit` is already installed and you want the newest published package line.
61
-
62
- ```powershell
63
- sdtk-code update --check-only
64
- sdtk-code update --runtime claude --project-path ./my-project
65
- ```
66
-
67
- Codex user-scope variant:
68
-
69
- ```powershell
70
- sdtk-code update --runtime codex --scope user --project-path ./my-project
71
- ```
72
-
73
- Project-local Codex refresh is also supported, but only when you intentionally launch the runtime with the explicit local `CODEX_HOME=<project>/.codex` contract. Native `.codex/skills` auto-discovery is still not claimed.
74
-
75
- Then verify:
76
-
77
- ```powershell
78
- sdtk-code --version
79
- sdtk-code runtime status --runtime claude --project-path ./my-project
80
- ```
81
-
82
- Important truth:
83
- - `sdtk-code update` still uses `npm install -g sdtk-code-kit@<target>` as the package refresh mechanism
84
- - `update --check-only` is non-destructive and prints the planned commands only
85
- - `init --force` refreshes managed project files
86
- - `runtime install --force` refreshes managed runtime assets
87
- - existing workflow docs are not automatically regenerated
88
-
89
- ## First Quick Start
90
-
91
- Initialize the workspace first:
92
-
93
- ```powershell
94
- sdtk-code init --runtime codex --project-path ./my-project
95
- ```
96
-
97
- After upstream `SDTK-SPEC` inputs already exist, start the workflow:
98
- - preferred: `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
99
- - bounded fallback when the formal handoff file is missing:
100
- - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
101
- - `sdtk-spec.config.json`
102
-
103
- ```powershell
104
- sdtk-code start --feature-key ORDER_MGMT --lane feature --project-path ./my-project
105
- ```
106
-
107
- Use Claude instead when you want the simplest project-scope runtime path:
108
-
109
- ```powershell
110
- sdtk-code init --runtime claude --project-path ./my-project
111
- ```
112
-
113
- ## Runtime Truth
114
-
115
- | Runtime | Project scope | User scope | Current truth |
116
- |---|:---:|:---:|---|
117
- | Claude | Yes | Yes | installs `code-*` skills |
118
- | Codex | Yes | Yes | installs `sdtk-code-*` skills; default is user scope and project-local installs require the explicit local `CODEX_HOME=<project>/.codex` contract |
119
-
120
- ## Remove Runtime Assets vs Remove the Package
121
-
122
- Use:
123
-
124
- ```powershell
125
- sdtk-code runtime uninstall --runtime claude --scope project --project-path ./my-project
126
- sdtk-code runtime uninstall --runtime codex --all
127
- ```
128
-
129
- when you want to remove only SDTK-CODE-managed runtime skill folders.
130
-
131
- Important truth:
132
- - `runtime uninstall` removes only SDTK-CODE-managed skill folders for the selected runtime and scope
133
- - it does **not** delete parent runtime roots such as `.claude/`, `.claude/skills/`, `$CODEX_HOME/`, or `$CODEX_HOME/skills/`
134
-
135
- Use:
136
-
137
- ```powershell
138
- npm uninstall -g sdtk-code-kit
139
- ```
140
-
141
- when you want to remove the global npm package and CLI shim only.
142
-
143
- That npm command does **not** remove runtime assets that were already copied into Claude or Codex skill folders.
144
-
145
- ## Upstream Dependency
146
-
147
- `SDTK-CODE` is publicly installable, but real workflow execution still expects upstream `SDTK-SPEC` artifacts.
148
-
149
- Task-breakdown truth:
150
- - upstream `SDTK-SPEC` `/dev` still owns implementation-readiness planning and formal handoff scope
151
- - `FEATURE_IMPL_PLAN_[FEATURE_KEY].md` remains the upstream readiness plan
152
- - `sdtk-code plan` refines downstream execution slices only after intake succeeds
153
-
154
- Preferred intake artifact:
155
- - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
156
-
157
- Bounded fallback when the formal handoff file is missing:
158
- - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
159
- - `sdtk-spec.config.json`
160
- - relevant architecture, API, database, and flow/screen specs for the current slice when applicable
161
-
162
- Blocking truth:
163
- - invalid or upstream-blocked formal handoff must stop `sdtk-code start`
164
- - no silent fallback is allowed when the formal handoff file already exists but is invalid
165
-
166
- ## Downstream OPS Bridge
167
-
168
- Completed closeout from a formal-handoff-backed workflow writes the canonical downstream bridge:
169
- - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
170
-
171
- Important boundary:
172
- - this bridge is produced by `SDTK-CODE` for downstream `SDTK-OPS`
173
- - compatibility fallback workflows do not invent a fake `OPS_HANDOFF` without the current `CODE_HANDOFF_[FEATURE_KEY].json`
174
-
175
- ## Workflow Recovery
176
-
177
- First-wave bounded recovery commands for `SDTK-CODE`:
178
- - `sdtk-code status`
179
- - `sdtk-code doctor`
180
- - `sdtk-code resume`
181
-
182
- Behavior truth in this wave:
183
- - `status` is minimal and actionable: current phase, next phase, blocking state, resume guidance
184
- - `doctor` is diagnostic only (no auto-repair)
185
- - `resume` is fail-closed when operator-only inputs are still required
186
- - auto-dispatch is intentionally narrow to machine-safe build transitions only
187
- - lifecycle truth remains inside `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md` (no second persistence store)
188
- ## Verify Output Truth
189
-
190
- `sdtk-code verify` records summarized evidence in `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md` and also emits:
191
- - `docs/dev/REVIEW_PACKET_[FEATURE_KEY].md`
192
-
193
- Important boundary:
194
- - the review packet is an evidence package for downstream QA/controller review
195
- - it does not replace QA release authority and it is not a final approval artifact
196
-
197
- ## References
198
-
199
- - Canonical end-user guide:
200
- - `products/sdtk-code/governance/SDTKCODE_TOOLKIT_USAGE_GUIDE.md`
201
- - Install and smoke appendix:
202
- - `products/sdtk-code/governance/installation-runbook.md`
203
- - Product boundary and architecture:
204
- - `products/sdtk-code/toolkit/SDTKCODE_TOOLKIT.md`
22
+ - latest published version lookup: `npm view sdtk-code-kit version`
23
+ - primary workflow-first surface:
24
+ - `start`
25
+ - `plan`
26
+ - `build`
27
+ - `verify`
28
+ - `ship`
29
+ - `status`
30
+ - `doctor`
31
+ - `resume`
32
+ - support commands:
33
+ - `init`
34
+ - `update`
35
+ - `runtime install`
36
+ - `runtime status`
37
+ - `runtime uninstall`
38
+ - `help`
39
+ - `--version`
40
+
41
+ Not part of the v1 public surface:
42
+ - `generate`
43
+
44
+ ## Install
45
+
46
+ ```powershell
47
+ npm install -g sdtk-code-kit
48
+ sdtk-code --version
49
+ sdtk-code --help
50
+ ```
51
+
52
+ If you need the exact latest published version number, run:
53
+
54
+ ```powershell
55
+ npm view sdtk-code-kit version
56
+ ```
57
+
58
+ ## Update Existing Installation
59
+
60
+ Use the public `update` command when `sdtk-code-kit` is already installed and you want the newest published package line.
61
+
62
+ ```powershell
63
+ sdtk-code update --check-only
64
+ sdtk-code update --runtime claude --project-path ./my-project
65
+ ```
66
+
67
+ Codex user-scope variant:
68
+
69
+ ```powershell
70
+ sdtk-code update --runtime codex --scope user --project-path ./my-project
71
+ ```
72
+
73
+ Project-local Codex refresh is also supported, but only when you intentionally launch the runtime with the explicit local `CODEX_HOME=<project>/.codex` contract. Native `.codex/skills` auto-discovery is still not claimed.
74
+
75
+ Then verify:
76
+
77
+ ```powershell
78
+ sdtk-code --version
79
+ sdtk-code runtime status --runtime claude --project-path ./my-project
80
+ ```
81
+
82
+ Important truth:
83
+ - `sdtk-code update` still uses `npm install -g sdtk-code-kit@<target>` as the package refresh mechanism
84
+ - `update --check-only` is non-destructive and prints the planned commands only
85
+ - `init --force` refreshes managed project files
86
+ - `runtime install --force` refreshes managed runtime assets
87
+ - existing workflow docs are not automatically regenerated
88
+
89
+ ## First Quick Start
90
+
91
+ Initialize the workspace first:
92
+
93
+ ```powershell
94
+ sdtk-code init --runtime codex --project-path ./my-project
95
+ ```
96
+
97
+ After upstream `SDTK-SPEC` inputs already exist, start the workflow:
98
+ - preferred: `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
99
+ - bounded fallback when the formal handoff file is missing:
100
+ - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
101
+ - `sdtk-spec.config.json`
102
+
103
+ ```powershell
104
+ sdtk-code start --feature-key ORDER_MGMT --lane feature --project-path ./my-project
105
+ ```
106
+
107
+ Use Claude instead when you want the simplest project-scope runtime path:
108
+
109
+ ```powershell
110
+ sdtk-code init --runtime claude --project-path ./my-project
111
+ ```
112
+
113
+ ## Runtime Truth
114
+
115
+ | Runtime | Project scope | User scope | Current truth |
116
+ |---|:---:|:---:|---|
117
+ | Claude | Yes | Yes | installs `code-*` skills |
118
+ | Codex | Yes | Yes | installs `sdtk-code-*` skills; default is user scope and project-local installs require the explicit local `CODEX_HOME=<project>/.codex` contract |
119
+
120
+ ## Remove Runtime Assets vs Remove the Package
121
+
122
+ Use:
123
+
124
+ ```powershell
125
+ sdtk-code runtime uninstall --runtime claude --scope project --project-path ./my-project
126
+ sdtk-code runtime uninstall --runtime codex --all
127
+ ```
128
+
129
+ when you want to remove only SDTK-CODE-managed runtime skill folders.
130
+
131
+ Important truth:
132
+ - `runtime uninstall` removes only SDTK-CODE-managed skill folders for the selected runtime and scope
133
+ - it does **not** delete parent runtime roots such as `.claude/`, `.claude/skills/`, `$CODEX_HOME/`, or `$CODEX_HOME/skills/`
134
+
135
+ Use:
136
+
137
+ ```powershell
138
+ npm uninstall -g sdtk-code-kit
139
+ ```
140
+
141
+ when you want to remove the global npm package and CLI shim only.
142
+
143
+ That npm command does **not** remove runtime assets that were already copied into Claude or Codex skill folders.
144
+
145
+ ## Upstream Dependency
146
+
147
+ `SDTK-CODE` is publicly installable, but real workflow execution still expects upstream `SDTK-SPEC` artifacts.
148
+
149
+ Task-breakdown truth:
150
+ - upstream `SDTK-SPEC` `/dev` still owns implementation-readiness planning and formal handoff scope
151
+ - `FEATURE_IMPL_PLAN_[FEATURE_KEY].md` remains the upstream readiness plan
152
+ - `sdtk-code plan` refines downstream execution slices only after intake succeeds
153
+
154
+ Preferred intake artifact:
155
+ - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
156
+
157
+ Bounded fallback when the formal handoff file is missing:
158
+ - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
159
+ - `sdtk-spec.config.json`
160
+ - relevant architecture, API, database, and flow/screen specs for the current slice when applicable
161
+
162
+ Blocking truth:
163
+ - invalid or upstream-blocked formal handoff must stop `sdtk-code start`
164
+ - no silent fallback is allowed when the formal handoff file already exists but is invalid
165
+
166
+ ## Downstream OPS Bridge
167
+
168
+ Completed closeout from a formal-handoff-backed workflow writes the canonical downstream bridge:
169
+ - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json`
170
+
171
+ Important boundary:
172
+ - this bridge is produced by `SDTK-CODE` for downstream `SDTK-OPS`
173
+ - compatibility fallback workflows do not invent a fake `OPS_HANDOFF` without the current `CODE_HANDOFF_[FEATURE_KEY].json`
174
+
175
+ ## Workflow Recovery
176
+
177
+ First-wave bounded recovery commands for `SDTK-CODE`:
178
+ - `sdtk-code status`
179
+ - `sdtk-code doctor`
180
+ - `sdtk-code resume`
181
+
182
+ Behavior truth in this wave:
183
+ - `status` is minimal and actionable: current phase, next phase, blocking state, resume guidance
184
+ - `doctor` is diagnostic only (no auto-repair)
185
+ - `resume` is fail-closed when operator-only inputs are still required
186
+ - auto-dispatch is intentionally narrow to machine-safe build transitions only
187
+ - lifecycle truth remains inside `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md` (no second persistence store)
188
+ ## Verify Output Truth
189
+
190
+ `sdtk-code verify` records summarized evidence in `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md` and also emits:
191
+ - `docs/dev/REVIEW_PACKET_[FEATURE_KEY].md`
192
+
193
+ Important boundary:
194
+ - the review packet is an evidence package for downstream QA/controller review
195
+ - it does not replace QA release authority and it is not a final approval artifact
196
+
197
+ ## References
198
+
199
+ - Canonical end-user guide:
200
+ - `products/sdtk-code/governance/SDTKCODE_TOOLKIT_USAGE_GUIDE.md`
201
+ - Install and smoke appendix:
202
+ - `products/sdtk-code/governance/installation-runbook.md`
203
+ - Product boundary and architecture:
204
+ - `products/sdtk-code/toolkit/SDTKCODE_TOOLKIT.md`