sdtk-code-kit 0.1.1 → 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.
- package/README.md +164 -123
- package/assets/manifest/toolkit-bundle.manifest.json +5 -5
- package/assets/manifest/toolkit-bundle.sha256.txt +2 -2
- package/assets/toolkit/toolkit/AGENTS.md +219 -217
- package/assets/toolkit/toolkit/sdtk-spec.config.json +1 -1
- package/package.json +34 -34
- package/src/commands/help.js +68 -37
- package/src/commands/update.js +11 -0
- package/src/commands/verify.js +9 -0
- package/src/index.js +73 -70
- package/src/lib/update.js +337 -0
- package/src/lib/workflow-artifact.js +6 -0
- package/src/lib/workflow-review-packet.js +561 -0
- package/src/lib/workflow-verify.js +356 -212
package/src/commands/help.js
CHANGED
|
@@ -7,12 +7,13 @@ function cmdHelp() {
|
|
|
7
7
|
"Usage:",
|
|
8
8
|
" sdtk-code <command> [options]",
|
|
9
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 and ordered review
|
|
15
|
-
" ship Record final ship or finish decision and emit OPS_HANDOFF on formal closeout",
|
|
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",
|
|
16
17
|
" init Initialize SDTK-CODE workspace",
|
|
17
18
|
" runtime Manage runtime asset installation (install, uninstall, status)",
|
|
18
19
|
"",
|
|
@@ -34,12 +35,12 @@ function cmdHelp() {
|
|
|
34
35
|
" --project-path <path> Target project directory (default: cwd)",
|
|
35
36
|
" --force Reinitialize an existing workflow artifact",
|
|
36
37
|
"",
|
|
37
|
-
"Start intake truth:",
|
|
38
|
-
" Prefers docs/dev/CODE_HANDOFF_[FEATURE_KEY].json when present",
|
|
39
|
-
" Falls back to FEATURE_IMPL_PLAN + sdtk-spec.config.json only when the formal handoff file is missing",
|
|
40
|
-
" Feature lane expects formal handoff by default; bugfix may use compatibility fallback when missing",
|
|
41
|
-
" Invalid or blocked formal handoff stops start and writes a blocked workflow artifact",
|
|
42
|
-
" FEATURE_IMPL_PLAN remains the upstream /dev implementation-readiness plan; CODE plan only refines execution slices after intake",
|
|
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",
|
|
43
44
|
"",
|
|
44
45
|
"Plan options:",
|
|
45
46
|
" --feature-key <KEY> Feature key in UPPER_SNAKE_CASE (required)",
|
|
@@ -68,6 +69,22 @@ function cmdHelp() {
|
|
|
68
69
|
" --evidence <text> Summarized evidence entry in the form",
|
|
69
70
|
" \"check|summary|pass|docs/dev/evidence/FEATURE_KEY/file.txt\"",
|
|
70
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)",
|
|
71
88
|
" --spec-status <pending|pass|partial|fail>",
|
|
72
89
|
" Current spec/compliance review gate status",
|
|
73
90
|
" --spec-note <text> Record a spec/compliance review note (repeatable)",
|
|
@@ -87,12 +104,12 @@ function cmdHelp() {
|
|
|
87
104
|
" (repeatable; at least one required)",
|
|
88
105
|
" --follow-up <text> Record a deferred follow-up item (repeatable)",
|
|
89
106
|
" --note <text> Record a ship/finalization note (repeatable)",
|
|
90
|
-
" --debug-note <text> Record reactive debug follow-up from preflight (repeatable)",
|
|
91
|
-
" --blocked Keep ship blocked and route back to code-debug/code-ship",
|
|
92
|
-
"",
|
|
93
|
-
"Ship closeout truth:",
|
|
94
|
-
" Completed closeout backed by docs/dev/CODE_HANDOFF_[FEATURE_KEY].json writes docs/dev/OPS_HANDOFF_[FEATURE_KEY].json",
|
|
95
|
-
" Compatibility fallback workflows do not emit a fake OPS handoff without the current formal CODE_HANDOFF",
|
|
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",
|
|
96
113
|
"",
|
|
97
114
|
"Init options:",
|
|
98
115
|
" --runtime <codex|claude> Runtime adapter (default: codex)",
|
|
@@ -108,6 +125,16 @@ function cmdHelp() {
|
|
|
108
125
|
" sdtk-code runtime uninstall --runtime <codex|claude> [--scope <project|user>] [--all]",
|
|
109
126
|
" sdtk-code runtime status --runtime <codex|claude> [--project-path <path>]",
|
|
110
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
|
+
"",
|
|
111
138
|
"Runtime options:",
|
|
112
139
|
" --runtime <codex|claude> Target runtime (required)",
|
|
113
140
|
" --scope <project|user> Install scope (default: project for claude, user for codex)",
|
|
@@ -117,12 +144,12 @@ function cmdHelp() {
|
|
|
117
144
|
" --verbose Show detailed script output",
|
|
118
145
|
"",
|
|
119
146
|
"Scope behavior:",
|
|
120
|
-
" claude/project -> <project>/.claude/skills",
|
|
121
|
-
" claude/user -> ~/.claude/skills",
|
|
122
|
-
" codex/project -> <project>/.codex/skills",
|
|
123
|
-
" codex/user -> $CODEX_HOME/skills or ~/.codex/skills",
|
|
124
|
-
" Note: Codex project scope is supported only via the explicit local CODEX_HOME=<project>/.codex contract.",
|
|
125
|
-
" Note: This CLI does not claim native .codex/skills auto-discovery.",
|
|
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.",
|
|
126
153
|
"",
|
|
127
154
|
"Uninstall behavior:",
|
|
128
155
|
" runtime uninstall removes only SDTK-CODE-managed skill folders for the selected runtime/scope.",
|
|
@@ -154,15 +181,18 @@ function cmdHelp() {
|
|
|
154
181
|
" sdtk-code build --feature-key LOGIN_FIX --debug-note \"Failure reproduced in session timeout flow\" --complete",
|
|
155
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",
|
|
156
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",
|
|
157
|
-
" 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\"",
|
|
158
|
-
" 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\"",
|
|
159
|
-
" sdtk-code init",
|
|
160
|
-
" sdtk-code init --runtime codex --runtime-scope project --project-path ./my-project",
|
|
161
|
-
" sdtk-code init --runtime claude --project-path ./my-project",
|
|
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",
|
|
162
192
|
" sdtk-code init --runtime claude --runtime-scope user",
|
|
163
|
-
" sdtk-code runtime install --runtime claude --scope project --project-path ./my-project",
|
|
164
|
-
" sdtk-code runtime install --runtime codex --scope user",
|
|
165
|
-
" sdtk-code runtime install --runtime codex --scope project --project-path ./my-project",
|
|
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",
|
|
166
196
|
" sdtk-code runtime status --runtime claude --project-path ./my-project",
|
|
167
197
|
" sdtk-code runtime uninstall --runtime codex --all",
|
|
168
198
|
" npm uninstall -g sdtk-code-kit",
|
|
@@ -172,11 +202,12 @@ function cmdHelp() {
|
|
|
172
202
|
" 2. Create or refresh CODE_WORKFLOW with sdtk-code start once the upstream SDTK-SPEC handoff exists.",
|
|
173
203
|
" Preferred input: CODE_HANDOFF_[FEATURE_KEY].json; compatibility fallback is bounded to missing-handoff cases.",
|
|
174
204
|
" 3. For feature work, either confirm seeded handoff slices with --use-seeded-candidates or refine them with explicit --slice entries.",
|
|
175
|
-
" 4. Record build progress with sdtk-code build while execution is in motion.",
|
|
176
|
-
" 5. Capture summarized evidence and review gates with sdtk-code verify before closure.",
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
|
|
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
|
+
];
|
|
180
211
|
|
|
181
212
|
console.log(text.join("\n"));
|
|
182
213
|
return 0;
|
package/src/commands/verify.js
CHANGED
|
@@ -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}`
|
package/src/index.js
CHANGED
|
@@ -1,70 +1,73 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { cmdBuild } = require("./commands/build");
|
|
4
|
-
const { cmdHelp } = require("./commands/help");
|
|
5
|
-
const { cmdInit } = require("./commands/init");
|
|
6
|
-
const { cmdPlan } = require("./commands/plan");
|
|
7
|
-
const { cmdRuntime } = require("./commands/runtime");
|
|
8
|
-
const { cmdShip } = require("./commands/ship");
|
|
9
|
-
const { cmdStart } = require("./commands/start");
|
|
10
|
-
const {
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { cmdBuild } = require("./commands/build");
|
|
4
|
+
const { cmdHelp } = require("./commands/help");
|
|
5
|
+
const { cmdInit } = require("./commands/init");
|
|
6
|
+
const { cmdPlan } = require("./commands/plan");
|
|
7
|
+
const { cmdRuntime } = require("./commands/runtime");
|
|
8
|
+
const { cmdShip } = require("./commands/ship");
|
|
9
|
+
const { cmdStart } = require("./commands/start");
|
|
10
|
+
const { cmdUpdate } = require("./commands/update");
|
|
11
|
+
const { cmdVerify } = require("./commands/verify");
|
|
12
|
+
const { ValidationError } = require("./lib/errors");
|
|
13
|
+
|
|
14
|
+
function getVersion() {
|
|
15
|
+
const pkg = require("../package.json");
|
|
16
|
+
return pkg.version;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function parseCommand(argv) {
|
|
20
|
+
if (!argv || argv.length === 0) {
|
|
21
|
+
return { command: "help", args: [] };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const [first, ...rest] = argv;
|
|
25
|
+
if (first === "-h" || first === "--help") {
|
|
26
|
+
return { command: "help", args: [] };
|
|
27
|
+
}
|
|
28
|
+
if (first === "-v" || first === "--version") {
|
|
29
|
+
return { command: "version", args: [] };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return { command: first, args: rest };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const COMMANDS = new Set(["help", "version", "init", "runtime", "start", "plan", "build", "verify", "ship", "update"]);
|
|
36
|
+
|
|
37
|
+
async function run(argv) {
|
|
38
|
+
const { command, args } = parseCommand(argv);
|
|
39
|
+
|
|
40
|
+
if (!COMMANDS.has(command)) {
|
|
41
|
+
throw new ValidationError(
|
|
42
|
+
`Unknown command: "${command}". Run "sdtk-code --help" for available commands.`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
switch (command) {
|
|
47
|
+
case "help":
|
|
48
|
+
return cmdHelp();
|
|
49
|
+
case "version":
|
|
50
|
+
console.log(`sdtk-code-kit ${getVersion()}`);
|
|
51
|
+
return 0;
|
|
52
|
+
case "init":
|
|
53
|
+
return cmdInit(args);
|
|
54
|
+
case "runtime":
|
|
55
|
+
return cmdRuntime(args);
|
|
56
|
+
case "start":
|
|
57
|
+
return cmdStart(args);
|
|
58
|
+
case "plan":
|
|
59
|
+
return cmdPlan(args);
|
|
60
|
+
case "build":
|
|
61
|
+
return cmdBuild(args);
|
|
62
|
+
case "verify":
|
|
63
|
+
return cmdVerify(args);
|
|
64
|
+
case "ship":
|
|
65
|
+
return cmdShip(args);
|
|
66
|
+
case "update":
|
|
67
|
+
return cmdUpdate(args);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = {
|
|
72
|
+
run,
|
|
73
|
+
};
|