sdtk-code-kit 0.1.0 → 0.1.2

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 (44) hide show
  1. package/README.md +140 -91
  2. package/assets/manifest/toolkit-bundle.manifest.json +47 -47
  3. package/assets/manifest/toolkit-bundle.sha256.txt +23 -23
  4. package/assets/toolkit/toolkit/AGENTS.md +219 -210
  5. package/assets/toolkit/toolkit/install.ps1 +1 -8
  6. package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +30 -7
  7. package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +31 -2
  8. package/assets/toolkit/toolkit/sdtk-spec.config.json +1 -1
  9. package/assets/toolkit/toolkit/skills/code-brainstorm/SKILL.md +0 -1
  10. package/assets/toolkit/toolkit/skills/code-debug/SKILL.md +1 -2
  11. package/assets/toolkit/toolkit/skills/code-debug/references/root-cause-tracing.md +0 -1
  12. package/assets/toolkit/toolkit/skills/code-execute/SKILL.md +0 -1
  13. package/assets/toolkit/toolkit/skills/code-finish/SKILL.md +0 -1
  14. package/assets/toolkit/toolkit/skills/code-parallel/SKILL.md +0 -1
  15. package/assets/toolkit/toolkit/skills/code-parallel/references/code-quality-reviewer-prompt.md +0 -1
  16. package/assets/toolkit/toolkit/skills/code-parallel/references/implementer-prompt.md +0 -1
  17. package/assets/toolkit/toolkit/skills/code-parallel/references/spec-reviewer-prompt.md +0 -1
  18. package/assets/toolkit/toolkit/skills/code-plan/SKILL.md +0 -1
  19. package/assets/toolkit/toolkit/skills/code-review/SKILL.md +0 -1
  20. package/assets/toolkit/toolkit/skills/code-review/references/checklist.md +0 -1
  21. package/assets/toolkit/toolkit/skills/code-review/references/code-reviewer.md +0 -1
  22. package/assets/toolkit/toolkit/skills/code-ship/SKILL.md +0 -1
  23. package/assets/toolkit/toolkit/skills/code-tdd/SKILL.md +1 -2
  24. package/assets/toolkit/toolkit/skills/code-tdd/references/testing-anti-patterns.md +0 -1
  25. package/assets/toolkit/toolkit/skills/code-verify/SKILL.md +0 -1
  26. package/assets/toolkit/toolkit/skills/code-worktree/SKILL.md +13 -14
  27. package/package.json +34 -34
  28. package/src/commands/help.js +218 -169
  29. package/src/commands/init.js +10 -1
  30. package/src/commands/plan.js +1 -0
  31. package/src/commands/runtime.js +27 -8
  32. package/src/commands/ship.js +5 -0
  33. package/src/commands/update.js +11 -0
  34. package/src/commands/verify.js +9 -0
  35. package/src/index.js +73 -70
  36. package/src/lib/scope.js +19 -2
  37. package/src/lib/update.js +337 -0
  38. package/src/lib/workflow-artifact.js +57 -14
  39. package/src/lib/workflow-handoff.js +510 -0
  40. package/src/lib/workflow-intake.js +2 -1
  41. package/src/lib/workflow-plan.js +102 -5
  42. package/src/lib/workflow-review-packet.js +561 -0
  43. package/src/lib/workflow-ship.js +53 -3
  44. package/src/lib/workflow-verify.js +356 -212
@@ -1,169 +1,218 @@
1
- "use strict";
2
-
3
- function cmdHelp() {
4
- const text = [
5
- "SDTK-CODE CLI -- coding process discipline toolkit",
6
- "",
7
- "Usage:",
8
- " sdtk-code <command> [options]",
9
- "",
10
- "Commands:",
11
- " start Create or refresh CODE_WORKFLOW from formal handoff or compatibility inputs",
12
- " plan Refine workflow slices and scope from an existing CODE_WORKFLOW",
13
- " build Record build progress and route the next coding engine step",
14
- " verify Record summarized evidence and ordered review gate status",
15
- " ship Record final ship or finish decision with preflight summary",
16
- " init Initialize SDTK-CODE workspace",
17
- " runtime Manage runtime asset installation (install, uninstall, status)",
18
- "",
19
- "Workflow status:",
20
- " Implemented now: start, plan, build, verify, ship",
21
- "",
22
- "Package status:",
23
- " First public package target: sdtk-code-kit@0.1.0",
24
- " Canonical command: sdtk-code",
25
- " Real workflow execution still expects upstream SDTK-SPEC artifacts",
26
- " First registry publish may still be pending until the maintainer-run npm publish completes",
27
- " CI/tag-publish parity is follow-up hardening, not a blocker for the first public release",
28
- " Payload stays intentionally narrow and ships runtime assets plus CODE_WORKFLOW_TEMPLATE.md",
29
- "",
30
- "Start options:",
31
- " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
32
- " --lane <feature|bugfix> Explicit workflow lane (required)",
33
- " --project-path <path> Target project directory (default: cwd)",
34
- " --force Reinitialize an existing workflow artifact",
35
- "",
36
- "Start intake truth:",
37
- " Prefers docs/dev/CODE_HANDOFF_[FEATURE_KEY].json when present",
38
- " Falls back to FEATURE_IMPL_PLAN + sdtk-spec.config.json only when the formal handoff file is missing",
39
- " Feature lane expects formal handoff by default; bugfix may use compatibility fallback when missing",
40
- " Invalid or blocked formal handoff stops start and writes a blocked workflow artifact",
41
- "",
42
- "Plan options:",
43
- " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
44
- " --project-path <path> Target project directory (default: cwd)",
45
- " --in-scope <text> Record an in-scope item (repeatable)",
46
- " --out-scope <text> Record an out-of-scope item (repeatable)",
47
- " --slice <text> Record a planning slice (repeatable; required for feature lane)",
48
- " --assumption <text> Record a planning assumption (repeatable)",
49
- " --risk <text> Record a planning risk (repeatable)",
50
- " --note <text> Record an additional planning note (repeatable)",
51
- "",
52
- "Build options:",
53
- " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
54
- " --project-path <path> Target project directory (default: cwd)",
55
- " --active-slice <text> Record an active build slice (repeatable)",
56
- " --note <text> Record a build note (repeatable)",
57
- " --debug-note <text> Record a reactive debug note (repeatable)",
58
- " --parallel-reason <text> Explicit justification for code-parallel in feature lane",
59
- " --complete Mark the current build pass complete and route to verify",
60
- " --blocked Mark the current build pass blocked and keep routing on build",
61
- "",
62
- "Verify options:",
63
- " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
64
- " --project-path <path> Target project directory (default: cwd)",
65
- " --evidence <text> Summarized evidence entry in the form",
66
- " \"check|summary|pass|docs/dev/evidence/FEATURE_KEY/file.txt\"",
67
- " (repeatable; at least one required)",
68
- " --spec-status <pending|pass|partial|fail>",
69
- " Current spec/compliance review gate status",
70
- " --spec-note <text> Record a spec/compliance review note (repeatable)",
71
- " --quality-status <pending|pass|partial|fail>",
72
- " Current quality review gate status",
73
- " --quality-note <text> Record a quality review note (repeatable)",
74
- " --debug-note <text> Record reactive debug follow-up from verification (repeatable)",
75
- " --complete Mark verify complete and route to ship",
76
- " --blocked Keep verify blocked and route back to verification work",
77
- "",
78
- "Ship options:",
79
- " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
80
- " --project-path <path> Target project directory (default: cwd)",
81
- " --decision <ship|finish> Final decision to record (required)",
82
- " --preflight <text> Preflight entry in the form",
83
- " \"check|summary|pass|docs/dev/evidence/FEATURE_KEY/file.txt\"",
84
- " (repeatable; at least one required)",
85
- " --follow-up <text> Record a deferred follow-up item (repeatable)",
86
- " --note <text> Record a ship/finalization note (repeatable)",
87
- " --debug-note <text> Record reactive debug follow-up from preflight (repeatable)",
88
- " --blocked Keep ship blocked and route back to code-debug/code-ship",
89
- "",
90
- "Init options:",
91
- " --runtime <codex|claude> Runtime adapter (default: codex)",
92
- " --runtime-scope <project|user> Install scope (default: project for claude, user for codex)",
93
- " --project-path <path> Target project directory (default: cwd)",
94
- " --force Overwrite existing files",
95
- " --skip-runtime-assets Skip runtime skill installation",
96
- " --skip-skills Deprecated alias for --skip-runtime-assets",
97
- " --verbose Show detailed PowerShell script output",
98
- "",
99
- "Runtime subcommands:",
100
- " sdtk-code runtime install --runtime <codex|claude> [--scope <project|user>]",
101
- " sdtk-code runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
102
- " sdtk-code runtime status --runtime <codex|claude> [--project-path <path>]",
103
- "",
104
- "Runtime options:",
105
- " --runtime <codex|claude> Target runtime (required)",
106
- " --scope <project|user> Install scope (default: project for claude, user for codex)",
107
- " --project-path <path> Target project directory (default: cwd)",
108
- " --force Overwrite existing managed skills",
109
- " --all Explicit alias for uninstalling all managed skills",
110
- " --verbose Show detailed script output",
111
- "",
112
- "Scope behavior:",
113
- " claude/project -> <project>/.claude/skills",
114
- " claude/user -> ~/.claude/skills",
115
- " codex/user -> $CODEX_HOME/skills or ~/.codex/skills",
116
- " Note: Codex supports user scope only. Project scope is blocked by Gate C0.",
117
- "",
118
- "Skill naming:",
119
- " Claude installs: code-*",
120
- " Codex installs: sdtk-code-*",
121
- "",
122
- "Global options:",
123
- " -h, --help Show this help",
124
- " -v, --version Show version",
125
- "",
126
- "Exit codes:",
127
- " 0 Success",
128
- " 1 Validation or user error",
129
- " 2 Dependency error",
130
- " 3 Integrity error",
131
- " 4 Unexpected internal error",
132
- "",
133
- "Examples:",
134
- " sdtk-code start --feature-key ORDER_MGMT --lane feature --project-path ./my-project",
135
- " sdtk-code start --feature-key LOGIN_FIX --lane bugfix --project-path ./my-project",
136
- " sdtk-code plan --feature-key ORDER_MGMT --slice \"API contract updates\" --slice \"UI register flow\"",
137
- " sdtk-code plan --feature-key LOGIN_FIX --note \"Bugfix planning override\"",
138
- " sdtk-code build --feature-key ORDER_MGMT --active-slice \"API contract updates\" --parallel-reason \"Backend and UI are isolated\"",
139
- " sdtk-code build --feature-key LOGIN_FIX --debug-note \"Failure reproduced in session timeout flow\" --complete",
140
- " sdtk-code verify --feature-key ORDER_MGMT --evidence \"pytest -q|Regression suite passed|pass|docs/dev/evidence/ORDER_MGMT/pytest.txt\" --spec-status pass --quality-status partial",
141
- " sdtk-code verify --feature-key LOGIN_FIX --evidence \"npm test|Bugfix regression passes|pass|docs/dev/evidence/LOGIN_FIX/regression.txt\" --spec-status pass --quality-status pass --complete",
142
- " sdtk-code ship --feature-key ORDER_MGMT --decision ship --preflight \"npm pack --dry-run|Package smoke passed|pass|docs/dev/evidence/ORDER_MGMT/pack.txt\" --follow-up \"Monitor first-release support tickets\"",
143
- " sdtk-code ship --feature-key LOGIN_FIX --decision finish --preflight \"git diff --check|No whitespace issues remain|pass|docs/dev/evidence/LOGIN_FIX/diff-check.txt\"",
144
- " sdtk-code init",
145
- " sdtk-code init --runtime claude --project-path ./my-project",
146
- " sdtk-code init --runtime claude --runtime-scope user",
147
- " sdtk-code runtime install --runtime claude --scope project --project-path ./my-project",
148
- " sdtk-code runtime install --runtime codex --scope user",
149
- " sdtk-code runtime status --runtime claude --project-path ./my-project",
150
- " sdtk-code runtime uninstall --runtime codex --all",
151
- "",
152
- "Next steps after init:",
153
- " 1. Review and customize sdtk-spec.config.json for your project.",
154
- " 2. Create or refresh CODE_WORKFLOW with sdtk-code start once the upstream SDTK-SPEC handoff exists.",
155
- " Preferred input: CODE_HANDOFF_[FEATURE_KEY].json; compatibility fallback is bounded to missing-handoff cases.",
156
- " 3. For feature work, refine slices with sdtk-code plan before implementation.",
157
- " 4. Record build progress with sdtk-code build while execution is in motion.",
158
- " 5. Capture summarized evidence and review gates with sdtk-code verify before closure.",
159
- " 6. Record final ship or finish decision with sdtk-code ship.",
160
- " 7. Use raw code-* skills directly when you intentionally choose expert mode.",
161
- ];
162
-
163
- console.log(text.join("\n"));
164
- return 0;
165
- }
166
-
167
- module.exports = {
168
- cmdHelp,
169
- };
1
+ "use strict";
2
+
3
+ function cmdHelp() {
4
+ const text = [
5
+ "SDTK-CODE CLI -- coding process discipline toolkit",
6
+ "",
7
+ "Usage:",
8
+ " sdtk-code <command> [options]",
9
+ "",
10
+ "Commands:",
11
+ " start Create or refresh CODE_WORKFLOW from formal handoff or compatibility inputs",
12
+ " plan Refine downstream execution slices inside the approved handoff scope",
13
+ " build Record build progress and route the next coding engine step",
14
+ " verify Record summarized evidence, write REVIEW_PACKET, and update ordered review gates",
15
+ " ship Record final ship or finish decision and emit OPS_HANDOFF on formal closeout",
16
+ " update Refresh the npm package and optionally re-apply managed project/runtime assets",
17
+ " init Initialize SDTK-CODE workspace",
18
+ " runtime Manage runtime asset installation (install, uninstall, status)",
19
+ "",
20
+ "Workflow status:",
21
+ " Implemented now: start, plan, build, verify, ship",
22
+ "",
23
+ "Package status:",
24
+ " Public package: sdtk-code-kit",
25
+ " Check latest published version: npm view sdtk-code-kit version",
26
+ " Canonical command: sdtk-code",
27
+ " Real workflow execution still expects upstream SDTK-SPEC artifacts",
28
+ " Current public workflow surface is live on npm",
29
+ " CI/tag-publish parity remains follow-up hardening, not a blocker for the current public package line",
30
+ " Payload stays intentionally narrow and ships runtime assets plus CODE_WORKFLOW_TEMPLATE.md",
31
+ "",
32
+ "Start options:",
33
+ " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
34
+ " --lane <feature|bugfix> Explicit workflow lane (required)",
35
+ " --project-path <path> Target project directory (default: cwd)",
36
+ " --force Reinitialize an existing workflow artifact",
37
+ "",
38
+ "Start intake truth:",
39
+ " Prefers docs/dev/CODE_HANDOFF_[FEATURE_KEY].json when present",
40
+ " Falls back to FEATURE_IMPL_PLAN + sdtk-spec.config.json only when the formal handoff file is missing",
41
+ " Feature lane expects formal handoff by default; bugfix may use compatibility fallback when missing",
42
+ " Invalid or blocked formal handoff stops start and writes a blocked workflow artifact",
43
+ " FEATURE_IMPL_PLAN remains the upstream /dev implementation-readiness plan; CODE plan only refines execution slices after intake",
44
+ "",
45
+ "Plan options:",
46
+ " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
47
+ " --project-path <path> Target project directory (default: cwd)",
48
+ " --in-scope <text> Record an in-scope item (repeatable)",
49
+ " --out-scope <text> Record an out-of-scope item (repeatable)",
50
+ " --slice <text> Record a planning slice (repeatable; explicit refinement path for feature lane)",
51
+ " --use-seeded-candidates Confirm the seeded feature-lane slice set from the formal handoff",
52
+ " --assumption <text> Record a planning assumption (repeatable)",
53
+ " --risk <text> Record a planning risk (repeatable)",
54
+ " --note <text> Record an additional planning note (repeatable)",
55
+ "",
56
+ "Build options:",
57
+ " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
58
+ " --project-path <path> Target project directory (default: cwd)",
59
+ " --active-slice <text> Record an active build slice (repeatable)",
60
+ " --note <text> Record a build note (repeatable)",
61
+ " --debug-note <text> Record a reactive debug note (repeatable)",
62
+ " --parallel-reason <text> Explicit justification for code-parallel in feature lane",
63
+ " --complete Mark the current build pass complete and route to verify",
64
+ " --blocked Mark the current build pass blocked and keep routing on build",
65
+ "",
66
+ "Verify options:",
67
+ " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
68
+ " --project-path <path> Target project directory (default: cwd)",
69
+ " --evidence <text> Summarized evidence entry in the form",
70
+ " \"check|summary|pass|docs/dev/evidence/FEATURE_KEY/file.txt\"",
71
+ " (repeatable; at least one required)",
72
+ " --batch-summary <text> High-level batch summary for REVIEW_PACKET generation",
73
+ " --changed-file <text> Changed-file entry in the form",
74
+ " \"repo/path|rationale\" (repeatable)",
75
+ " --exclude-file <text> Exclusion entry in the form",
76
+ " \"repo/path|reason\" (repeatable)",
77
+ " --truth-sync-target <text> Truth-sync entry in the form",
78
+ " \"path-or-surface|touched|rationale\"",
79
+ " (status must be touched or untouched; repeatable)",
80
+ " --commit-include <path> Repo-relative file to include in the proposed commit boundary",
81
+ " (repeatable)",
82
+ " --commit-exclude <path> Repo-relative file to exclude from the proposed commit boundary",
83
+ " (repeatable)",
84
+ " --caveat <text> Caveat entry in the form",
85
+ " \"ID|statement|impact|owner\" (repeatable)",
86
+ " --reviewer-guidance <text> Additional reviewer guidance line for REVIEW_PACKET",
87
+ " (repeatable)",
88
+ " --spec-status <pending|pass|partial|fail>",
89
+ " Current spec/compliance review gate status",
90
+ " --spec-note <text> Record a spec/compliance review note (repeatable)",
91
+ " --quality-status <pending|pass|partial|fail>",
92
+ " Current quality review gate status",
93
+ " --quality-note <text> Record a quality review note (repeatable)",
94
+ " --debug-note <text> Record reactive debug follow-up from verification (repeatable)",
95
+ " --complete Mark verify complete and route to ship",
96
+ " --blocked Keep verify blocked and route back to verification work",
97
+ "",
98
+ "Ship options:",
99
+ " --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
100
+ " --project-path <path> Target project directory (default: cwd)",
101
+ " --decision <ship|finish> Final decision to record (required)",
102
+ " --preflight <text> Preflight entry in the form",
103
+ " \"check|summary|pass|docs/dev/evidence/FEATURE_KEY/file.txt\"",
104
+ " (repeatable; at least one required)",
105
+ " --follow-up <text> Record a deferred follow-up item (repeatable)",
106
+ " --note <text> Record a ship/finalization note (repeatable)",
107
+ " --debug-note <text> Record reactive debug follow-up from preflight (repeatable)",
108
+ " --blocked Keep ship blocked and route back to code-debug/code-ship",
109
+ "",
110
+ "Ship closeout truth:",
111
+ " Completed closeout backed by docs/dev/CODE_HANDOFF_[FEATURE_KEY].json writes docs/dev/OPS_HANDOFF_[FEATURE_KEY].json",
112
+ " Compatibility fallback workflows do not emit a fake OPS handoff without the current formal CODE_HANDOFF",
113
+ "",
114
+ "Init options:",
115
+ " --runtime <codex|claude> Runtime adapter (default: codex)",
116
+ " --runtime-scope <project|user> Install scope (default: project for claude, user for codex)",
117
+ " --project-path <path> Target project directory (default: cwd)",
118
+ " --force Overwrite existing files",
119
+ " --skip-runtime-assets Skip runtime skill installation",
120
+ " --skip-skills Deprecated alias for --skip-runtime-assets",
121
+ " --verbose Show detailed PowerShell script output",
122
+ "",
123
+ "Runtime subcommands:",
124
+ " sdtk-code runtime install --runtime <codex|claude> [--scope <project|user>]",
125
+ " sdtk-code runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
126
+ " sdtk-code runtime status --runtime <codex|claude> [--project-path <path>]",
127
+ "",
128
+ "Update options:",
129
+ " --version <latest|x.y.z> Target published npm package version (default: latest)",
130
+ " --runtime <codex|claude> Optional runtime refresh target after npm update",
131
+ " --scope <project|user> Runtime asset scope when --runtime is provided",
132
+ " --project-path <path> Target project directory for managed file refresh (default: cwd)",
133
+ " --check-only Print the planned npm/init/runtime refresh steps without making changes",
134
+ " --skip-project-files Skip sdtk-code init --force during update",
135
+ " --skip-runtime-assets Skip sdtk-code runtime install --force during update",
136
+ " --verbose Show detailed command output",
137
+ "",
138
+ "Runtime options:",
139
+ " --runtime <codex|claude> Target runtime (required)",
140
+ " --scope <project|user> Install scope (default: project for claude, user for codex)",
141
+ " --project-path <path> Target project directory (default: cwd)",
142
+ " --force Overwrite existing managed skills",
143
+ " --all Explicit alias for uninstalling all managed skills",
144
+ " --verbose Show detailed script output",
145
+ "",
146
+ "Scope behavior:",
147
+ " claude/project -> <project>/.claude/skills",
148
+ " claude/user -> ~/.claude/skills",
149
+ " codex/project -> <project>/.codex/skills",
150
+ " codex/user -> $CODEX_HOME/skills or ~/.codex/skills",
151
+ " Note: Codex project scope is supported only via the explicit local CODEX_HOME=<project>/.codex contract.",
152
+ " Note: This CLI does not claim native .codex/skills auto-discovery.",
153
+ "",
154
+ "Uninstall behavior:",
155
+ " runtime uninstall removes only SDTK-CODE-managed skill folders for the selected runtime/scope.",
156
+ " It does not delete parent runtime roots such as .claude/, .claude/skills/, $CODEX_HOME/, or $CODEX_HOME/skills/.",
157
+ " npm uninstall -g sdtk-code-kit removes the CLI package only. Runtime assets remain until runtime uninstall or manual cleanup.",
158
+ "",
159
+ "Skill naming:",
160
+ " Claude installs: code-*",
161
+ " Codex installs: sdtk-code-*",
162
+ "",
163
+ "Global options:",
164
+ " -h, --help Show this help",
165
+ " -v, --version Show version",
166
+ "",
167
+ "Exit codes:",
168
+ " 0 Success",
169
+ " 1 Validation or user error",
170
+ " 2 Dependency error",
171
+ " 3 Integrity error",
172
+ " 4 Unexpected internal error",
173
+ "",
174
+ "Examples:",
175
+ " sdtk-code start --feature-key ORDER_MGMT --lane feature --project-path ./my-project",
176
+ " sdtk-code start --feature-key LOGIN_FIX --lane bugfix --project-path ./my-project",
177
+ " sdtk-code plan --feature-key ORDER_MGMT --use-seeded-candidates",
178
+ " sdtk-code plan --feature-key ORDER_MGMT --slice \"API contract updates\" --slice \"UI register flow\"",
179
+ " sdtk-code plan --feature-key LOGIN_FIX --note \"Bugfix planning override\"",
180
+ " sdtk-code build --feature-key ORDER_MGMT --active-slice \"API contract updates\" --parallel-reason \"Backend and UI are isolated\"",
181
+ " sdtk-code build --feature-key LOGIN_FIX --debug-note \"Failure reproduced in session timeout flow\" --complete",
182
+ " sdtk-code verify --feature-key ORDER_MGMT --evidence \"pytest -q|Regression suite passed|pass|docs/dev/evidence/ORDER_MGMT/pytest.txt\" --spec-status pass --quality-status partial",
183
+ " sdtk-code verify --feature-key LOGIN_FIX --evidence \"npm test|Bugfix regression passes|pass|docs/dev/evidence/LOGIN_FIX/regression.txt\" --spec-status pass --quality-status pass --complete",
184
+ " sdtk-code ship --feature-key ORDER_MGMT --decision ship --preflight \"npm pack --dry-run|Package smoke passed|pass|docs/dev/evidence/ORDER_MGMT/pack.txt\" --preflight \"release checklist|Operator handoff reviewed|pass|docs/dev/evidence/ORDER_MGMT/release-checklist.txt\" --follow-up \"Monitor first-release support tickets\"",
185
+ " sdtk-code ship --feature-key LOGIN_FIX --decision finish --preflight \"git diff --check|No whitespace issues remain|pass|docs/dev/evidence/LOGIN_FIX/diff-check.txt\"",
186
+ " sdtk-code init",
187
+ " sdtk-code init --runtime codex --runtime-scope project --project-path ./my-project",
188
+ " sdtk-code init --runtime claude --project-path ./my-project",
189
+ " sdtk-code update --check-only",
190
+ " sdtk-code update --runtime claude --project-path ./my-project",
191
+ " sdtk-code update --version 1.2.3 --runtime codex --scope user --skip-project-files",
192
+ " sdtk-code init --runtime claude --runtime-scope user",
193
+ " sdtk-code runtime install --runtime claude --scope project --project-path ./my-project",
194
+ " sdtk-code runtime install --runtime codex --scope user",
195
+ " sdtk-code runtime install --runtime codex --scope project --project-path ./my-project",
196
+ " sdtk-code runtime status --runtime claude --project-path ./my-project",
197
+ " sdtk-code runtime uninstall --runtime codex --all",
198
+ " npm uninstall -g sdtk-code-kit",
199
+ "",
200
+ "Next steps after init:",
201
+ " 1. Review and customize sdtk-spec.config.json for your project.",
202
+ " 2. Create or refresh CODE_WORKFLOW with sdtk-code start once the upstream SDTK-SPEC handoff exists.",
203
+ " Preferred input: CODE_HANDOFF_[FEATURE_KEY].json; compatibility fallback is bounded to missing-handoff cases.",
204
+ " 3. For feature work, either confirm seeded handoff slices with --use-seeded-candidates or refine them with explicit --slice entries.",
205
+ " 4. Record build progress with sdtk-code build while execution is in motion.",
206
+ " 5. Capture summarized evidence and review gates with sdtk-code verify before closure.",
207
+ " Verify also emits docs/dev/REVIEW_PACKET_[FEATURE_KEY].md for downstream QA/controller review.",
208
+ " 6. Record final ship or finish decision with sdtk-code ship; completed formal closeout writes OPS_HANDOFF for DEV-Run intake.",
209
+ " 7. Use raw code-* skills directly when you intentionally choose expert mode.",
210
+ ];
211
+
212
+ console.log(text.join("\n"));
213
+ return 0;
214
+ }
215
+
216
+ module.exports = {
217
+ cmdHelp,
218
+ };
@@ -29,7 +29,7 @@ async function cmdInit(args) {
29
29
  validateChoice(scope, VALID_SCOPES, "runtime-scope");
30
30
  if (scope === "project" && !isProjectScopeSupported(runtime)) {
31
31
  throw new ValidationError(
32
- "Codex does not support project-local skills. Use --runtime-scope user instead."
32
+ `${runtime} does not support project-local runtime assets. Use --runtime-scope user instead.`
33
33
  );
34
34
  }
35
35
 
@@ -62,6 +62,11 @@ async function cmdInit(args) {
62
62
  console.log(` Runtime: ${runtime}`);
63
63
  console.log(` Scope: ${scope}`);
64
64
  console.log(` Project: ${projectPath}`);
65
+ if (runtime === "codex" && scope === "project") {
66
+ console.log(` Codex home contract: ${path.join(projectPath, ".codex")}`);
67
+ console.log(" Note: Launch Codex with CODEX_HOME=<project>/.codex to use project-local skills.");
68
+ console.log(" Note: This CLI does not claim native .codex/skills auto-discovery.");
69
+ }
65
70
  console.log("");
66
71
 
67
72
  const result = await runScript(installScript, params, { silent: !flags.verbose });
@@ -74,6 +79,10 @@ async function cmdInit(args) {
74
79
 
75
80
  console.log("");
76
81
  console.log("SDTK-CODE workspace initialized successfully.");
82
+ if (runtime === "codex" && scope === "project") {
83
+ console.log(`Project-local Codex skills were installed into ${path.join(projectPath, ".codex", "skills")}.`);
84
+ console.log("Launch Codex with CODEX_HOME=<project>/.codex to activate that local runtime home.");
85
+ }
77
86
  console.log("");
78
87
  console.log("Next steps:");
79
88
  console.log(" 1. Review and customize sdtk-spec.config.json for your project stack.");
@@ -11,6 +11,7 @@ const FLAG_DEFS = {
11
11
  "in-scope": { type: "string", multiple: true },
12
12
  "out-scope": { type: "string", multiple: true },
13
13
  slice: { type: "string", multiple: true },
14
+ "use-seeded-candidates": { type: "boolean" },
14
15
  assumption: { type: "string", multiple: true },
15
16
  risk: { type: "string", multiple: true },
16
17
  note: { type: "string", multiple: true },
@@ -11,6 +11,8 @@ const {
11
11
  defaultScope,
12
12
  isProjectScopeSupported,
13
13
  managedSkillNames,
14
+ resolveCodexProjectHome,
15
+ resolveCodexUserHome,
14
16
  resolveSkillsDir,
15
17
  } = require("../lib/scope");
16
18
 
@@ -29,7 +31,7 @@ const SUBCOMMANDS = ["install", "uninstall", "status"];
29
31
  function validateScopeForRuntime(runtime, scope, label) {
30
32
  if (scope === "project" && !isProjectScopeSupported(runtime)) {
31
33
  throw new ValidationError(
32
- `Codex does not support project-local skills. Use --${label} user instead.`
34
+ `${runtime} does not support project-local runtime assets. Use --${label} user instead.`
33
35
  );
34
36
  }
35
37
  }
@@ -51,7 +53,7 @@ async function cmdRuntimeInstall(flags) {
51
53
  : "toolkit/scripts/install-codex-skills.ps1";
52
54
  const script = resolvePayloadFile(scriptName);
53
55
  const params = { Scope: scope };
54
- if (runtime === "claude") {
56
+ if (scope === "project") {
55
57
  params.ProjectPath = projectPath;
56
58
  }
57
59
  if (flags.force) {
@@ -61,9 +63,14 @@ async function cmdRuntimeInstall(flags) {
61
63
  console.log(`Installing ${runtime} runtime assets...`);
62
64
  console.log(` Runtime: ${runtime}`);
63
65
  console.log(` Scope: ${scope}`);
64
- if (runtime === "claude" && scope === "project") {
66
+ if (scope === "project") {
65
67
  console.log(` Project: ${projectPath}`);
66
68
  }
69
+ if (runtime === "codex" && scope === "project") {
70
+ console.log(` Codex home contract: ${resolveCodexProjectHome(projectPath)}`);
71
+ console.log(" Note: Launch Codex with CODEX_HOME=<project>/.codex to activate this project-local install.");
72
+ console.log(" Note: Native .codex/skills auto-discovery is not claimed.");
73
+ }
67
74
  console.log("");
68
75
 
69
76
  const result = await runScript(script, params, { silent: !flags.verbose });
@@ -95,9 +102,9 @@ async function cmdRuntimeUninstall(flags) {
95
102
  ? "toolkit/scripts/uninstall-claude-skills.ps1"
96
103
  : "toolkit/scripts/uninstall-codex-skills.ps1";
97
104
  const script = resolvePayloadFile(scriptName);
98
- const params = { All: true };
99
- if (runtime === "claude") {
100
- params.Scope = scope;
105
+ const params = {};
106
+ params.Scope = scope;
107
+ if (scope === "project") {
101
108
  params.ProjectPath = projectPath;
102
109
  }
103
110
  if (flags.all) {
@@ -107,7 +114,7 @@ async function cmdRuntimeUninstall(flags) {
107
114
  console.log(`Uninstalling ${runtime} runtime assets...`);
108
115
  console.log(` Runtime: ${runtime}`);
109
116
  console.log(` Scope: ${scope}`);
110
- if (runtime === "claude" && scope === "project") {
117
+ if (scope === "project") {
111
118
  console.log(` Project: ${projectPath}`);
112
119
  }
113
120
  console.log("");
@@ -130,11 +137,20 @@ function cmdRuntimeStatus(flags) {
130
137
  validateChoice(runtime, VALID_RUNTIMES, "runtime");
131
138
 
132
139
  const projectPath = flags["project-path"] ? path.resolve(flags["project-path"]) : process.cwd();
133
- const scopes = runtime === "claude" ? ["project", "user"] : ["user"];
140
+ const scopes = ["project", "user"];
134
141
 
135
142
  console.log(`Runtime: ${runtime}`);
136
143
  console.log("");
137
144
 
145
+ if (runtime === "codex") {
146
+ console.log("Codex scope truth:");
147
+ console.log(` Project-local root: ${resolveCodexProjectHome(projectPath)}`);
148
+ console.log(` User/global root: ${resolveCodexUserHome()}`);
149
+ console.log(" Project-local Codex support requires launching Codex with CODEX_HOME=<project>/.codex.");
150
+ console.log(" Native .codex/skills auto-discovery is not claimed.");
151
+ console.log("");
152
+ }
153
+
138
154
  for (const scope of scopes) {
139
155
  const skillsDir = resolveSkillsDir(runtime, scope, projectPath);
140
156
  const managed = managedSkillNames(runtime);
@@ -164,6 +180,9 @@ function cmdRuntimeStatus(flags) {
164
180
 
165
181
  console.log(` Scope: ${scope}`);
166
182
  console.log(` Path: ${skillsDir}`);
183
+ if (runtime === "codex" && scope === "project") {
184
+ console.log(" Activation: explicit CODEX_HOME=<project>/.codex contract required");
185
+ }
167
186
  console.log(` Status: ${status}`);
168
187
  if (exists && hasManagedSkills && skillCount < managed.length) {
169
188
  const missing = managed.filter((name) => !installedNames.includes(name));
@@ -45,6 +45,11 @@ function cmdShip(args) {
45
45
  console.log(` Preflight: ${result.preflightCount}`);
46
46
  console.log(` Next phase: ${result.nextPhase}`);
47
47
  console.log(` Engine: ${result.suggestedEngineSkills.join(", ")}`);
48
+ if (result.opsHandoff && result.opsHandoff.emitted) {
49
+ console.log(` OPS handoff: ${result.opsHandoff.opsHandoffPath}`);
50
+ } else if (result.opsHandoff && result.opsHandoff.reason) {
51
+ console.log(` OPS handoff: ${result.opsHandoff.reason}`);
52
+ }
48
53
 
49
54
  return 0;
50
55
  }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ const { executeUpdate } = require("../lib/update");
4
+
5
+ async function cmdUpdate(args) {
6
+ return executeUpdate(args);
7
+ }
8
+
9
+ module.exports = {
10
+ cmdUpdate,
11
+ };
@@ -9,6 +9,14 @@ const FLAG_DEFS = {
9
9
  "feature-key": { type: "string" },
10
10
  "project-path": { type: "string" },
11
11
  evidence: { type: "string", multiple: true },
12
+ "batch-summary": { type: "string" },
13
+ "changed-file": { type: "string", multiple: true },
14
+ "exclude-file": { type: "string", multiple: true },
15
+ "truth-sync-target": { type: "string", multiple: true },
16
+ "commit-include": { type: "string", multiple: true },
17
+ "commit-exclude": { type: "string", multiple: true },
18
+ caveat: { type: "string", multiple: true },
19
+ "reviewer-guidance": { type: "string", multiple: true },
12
20
  "spec-status": { type: "string" },
13
21
  "spec-note": { type: "string", multiple: true },
14
22
  "quality-status": { type: "string" },
@@ -42,6 +50,7 @@ function cmdVerify(args) {
42
50
  console.log(` Lane: ${result.lane}`);
43
51
  console.log(` Status: ${result.phaseStatus}`);
44
52
  console.log(` Artifact: ${result.artifactPath}`);
53
+ console.log(` Review: ${result.reviewPacketPath}`);
45
54
  console.log(` Evidence: ${result.evidenceCount}`);
46
55
  console.log(
47
56
  ` Gates: evidence=${result.evidenceGate}, spec=${result.specGateStatus}, quality=${result.qualityGateStatus}`