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.
- package/README.md +201 -201
- package/assets/manifest/toolkit-bundle.manifest.json +147 -147
- package/assets/manifest/toolkit-bundle.sha256.txt +28 -28
- package/assets/toolkit/toolkit/AGENTS.md +219 -219
- package/assets/toolkit/toolkit/install.ps1 +156 -156
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +78 -78
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +150 -150
- package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +62 -62
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +82 -82
- package/assets/toolkit/toolkit/sdtk-spec.config.json +6 -6
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +12 -12
- package/assets/toolkit/toolkit/skills/code-brainstorm/SKILL.md +55 -55
- package/assets/toolkit/toolkit/skills/code-debug/SKILL.md +296 -296
- package/assets/toolkit/toolkit/skills/code-debug/references/root-cause-tracing.md +68 -68
- package/assets/toolkit/toolkit/skills/code-discover/SKILL.md +54 -54
- package/assets/toolkit/toolkit/skills/code-execute/SKILL.md +74 -74
- package/assets/toolkit/toolkit/skills/code-finish/SKILL.md +205 -205
- package/assets/toolkit/toolkit/skills/code-parallel/SKILL.md +64 -64
- package/assets/toolkit/toolkit/skills/code-parallel/references/code-quality-reviewer-prompt.md +26 -26
- package/assets/toolkit/toolkit/skills/code-parallel/references/implementer-prompt.md +113 -113
- package/assets/toolkit/toolkit/skills/code-parallel/references/spec-reviewer-prompt.md +61 -61
- package/assets/toolkit/toolkit/skills/code-plan/SKILL.md +85 -85
- package/assets/toolkit/toolkit/skills/code-review/SKILL.md +79 -79
- package/assets/toolkit/toolkit/skills/code-review/references/checklist.md +125 -125
- package/assets/toolkit/toolkit/skills/code-review/references/code-reviewer.md +146 -146
- package/assets/toolkit/toolkit/skills/code-ship/SKILL.md +52 -52
- package/assets/toolkit/toolkit/skills/code-tdd/SKILL.md +378 -378
- package/assets/toolkit/toolkit/skills/code-tdd/references/testing-anti-patterns.md +299 -299
- package/assets/toolkit/toolkit/skills/code-verify/SKILL.md +144 -144
- package/assets/toolkit/toolkit/skills/code-worktree/SKILL.md +228 -228
- package/assets/toolkit/toolkit/templates/CODE_WORKFLOW_TEMPLATE.md +140 -140
- package/bin/sdtk-code.js +14 -14
- package/package.json +44 -44
- package/src/commands/build.js +53 -53
- package/src/commands/doctor.js +51 -51
- package/src/commands/generate.js +11 -11
- package/src/commands/guardrails.js +215 -123
- package/src/commands/help.js +244 -244
- package/src/commands/init.js +98 -98
- package/src/commands/plan.js +53 -53
- package/src/commands/readiness.js +77 -77
- package/src/commands/resume.js +61 -61
- package/src/commands/runtime.js +224 -224
- package/src/commands/ship.js +59 -59
- package/src/commands/sleep.js +132 -0
- package/src/commands/start.js +89 -89
- package/src/commands/status.js +77 -77
- package/src/commands/update.js +11 -11
- package/src/commands/verify.js +71 -71
- package/src/index.js +108 -104
- package/src/lib/args.js +107 -107
- package/src/lib/errors.js +41 -41
- package/src/lib/powershell.js +65 -65
- package/src/lib/project-target-guard.js +53 -53
- package/src/lib/scope.js +72 -72
- package/src/lib/ship-readiness.js +281 -281
- package/src/lib/sleep-plan.js +175 -0
- package/src/lib/sleep-report.js +229 -0
- package/src/lib/toolkit-payload.js +72 -72
- package/src/lib/trust-events.js +166 -166
- package/src/lib/trust-file-scope.js +154 -154
- package/src/lib/trust-policy.js +212 -212
- package/src/lib/trust-redact.js +35 -35
- package/src/lib/trust-trace.js +179 -179
- package/src/lib/update.js +344 -344
- package/src/lib/workflow-artifact.js +503 -503
- package/src/lib/workflow-build.js +127 -127
- package/src/lib/workflow-doctor.js +83 -83
- package/src/lib/workflow-handoff.js +1029 -1029
- package/src/lib/workflow-intake.js +101 -101
- package/src/lib/workflow-plan.js +193 -193
- package/src/lib/workflow-review-packet.js +650 -650
- package/src/lib/workflow-ship.js +213 -213
- package/src/lib/workflow-state.js +438 -438
- package/src/lib/workflow-verify.js +393 -393
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
# CODE_WORKFLOW __FEATURE_KEY__
|
|
2
|
-
|
|
3
|
-
<!-- SDTK-CODE:METADATA:START -->
|
|
4
|
-
## 1. Metadata
|
|
5
|
-
- Feature key: `__FEATURE_KEY__`
|
|
6
|
-
- Lane: `__LANE__`
|
|
7
|
-
- Current phase: `start`
|
|
8
|
-
- Phase status: `__PHASE_STATUS__`
|
|
9
|
-
- Intake outcome: `__INTAKE_OUTCOME__`
|
|
10
|
-
- Last updated: `__LAST_UPDATED__`
|
|
11
|
-
<!-- SDTK-CODE:METADATA:END -->
|
|
12
|
-
|
|
13
|
-
<!-- SDTK-CODE:INPUTS:START -->
|
|
14
|
-
## 2. Inputs
|
|
15
|
-
### Required Inputs
|
|
16
|
-
__REQUIRED_INPUTS__
|
|
17
|
-
|
|
18
|
-
### Additional Discovered Inputs
|
|
19
|
-
__ADDITIONAL_INPUTS__
|
|
20
|
-
|
|
21
|
-
### Missing Required Inputs
|
|
22
|
-
__MISSING_INPUTS__
|
|
23
|
-
<!-- SDTK-CODE:INPUTS:END -->
|
|
24
|
-
|
|
25
|
-
<!-- SDTK-CODE:PLAN:START -->
|
|
26
|
-
## 3. Scope Lock
|
|
27
|
-
### In Scope
|
|
28
|
-
- Pending confirmation during workflow planning.
|
|
29
|
-
|
|
30
|
-
### Out Of Scope
|
|
31
|
-
- Pending confirmation during workflow planning.
|
|
32
|
-
|
|
33
|
-
### Assumptions
|
|
34
|
-
- No explicit planning assumptions recorded.
|
|
35
|
-
|
|
36
|
-
### Risks
|
|
37
|
-
- No explicit planning risks recorded.
|
|
38
|
-
|
|
39
|
-
## 4. Plan / Slices
|
|
40
|
-
- Pending lane-specific planning or build guidance.
|
|
41
|
-
|
|
42
|
-
### Planning Notes
|
|
43
|
-
- No additional planning notes recorded.
|
|
44
|
-
<!-- SDTK-CODE:PLAN:END -->
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Provenance
|
|
48
|
-
|
|
49
|
-
When external references are consulted for this workflow batch, include the full provenance log below:
|
|
50
|
-
|
|
51
|
-
### Source References Consulted
|
|
52
|
-
| # | Source | URL or Path | Consulted Date | Purpose |
|
|
53
|
-
|---|---|---|---|---|
|
|
54
|
-
| 1 | <reference name> | <url or relative path> | <YYYY-MM-DD> | <why consulted> |
|
|
55
|
-
|
|
56
|
-
### Behavioral Ideas Extracted
|
|
57
|
-
| # | Source Ref | Behavioral Idea Extracted | SDTK-Native Contract Written | High-Risk Material? |
|
|
58
|
-
|---|---|---|---|---|
|
|
59
|
-
| 1 | <ref #> | <plain description of idea> | <yes/no + what was written> | <yes/no> |
|
|
60
|
-
|
|
61
|
-
### High-Risk Surfaces Reviewed
|
|
62
|
-
| # | Source Ref | Material Reviewed | Decision | Reason |
|
|
63
|
-
|---|---|---|---|---|
|
|
64
|
-
| 1 | <ref #> | <what was reviewed> | REJECTED / REDESIGNED | <reason> |
|
|
65
|
-
|
|
66
|
-
### Controller Provenance Sign-Off
|
|
67
|
-
- Reviewed by: <controller name or alias>
|
|
68
|
-
- Date: <YYYY-MM-DD>
|
|
69
|
-
- Decision: APPROVED / NEEDS REVISION
|
|
70
|
-
- Notes: <any additional controller notes>
|
|
71
|
-
|
|
72
|
-
If no external material was consulted, keep this section and record only the no-reference declaration:
|
|
73
|
-
- No external source references were consulted for this batch.
|
|
74
|
-
<!-- SDTK-CODE:BUILD:START -->
|
|
75
|
-
### Build Progress
|
|
76
|
-
- Build status: `pending`
|
|
77
|
-
- Execution mode: `sequential`
|
|
78
|
-
|
|
79
|
-
### Active Slices
|
|
80
|
-
- Pending build-phase execution.
|
|
81
|
-
|
|
82
|
-
### Build Notes
|
|
83
|
-
- No build notes recorded yet.
|
|
84
|
-
|
|
85
|
-
### Debug Notes
|
|
86
|
-
- No debug notes recorded.
|
|
87
|
-
|
|
88
|
-
### Parallelization Justification
|
|
89
|
-
- Not using explicit parallel execution in this build pass.
|
|
90
|
-
<!-- SDTK-CODE:BUILD:END -->
|
|
91
|
-
|
|
92
|
-
<!-- SDTK-CODE:STATUS:START -->
|
|
93
|
-
## 5. Status Checklist
|
|
94
|
-
- Current phase: `start`
|
|
95
|
-
- Next recommended phase: `__NEXT_PHASE__`
|
|
96
|
-
- Suggested engine entrypoints: __SUGGESTED_ENGINE__
|
|
97
|
-
- Blocking state: `__BLOCKING_STATE__`
|
|
98
|
-
<!-- SDTK-CODE:STATUS:END -->
|
|
99
|
-
|
|
100
|
-
<!-- SDTK-CODE:VERIFY:START -->
|
|
101
|
-
## 6. Evidence And Review Notes
|
|
102
|
-
### Evidence Summary
|
|
103
|
-
- No summarized verification evidence recorded yet.
|
|
104
|
-
|
|
105
|
-
### Raw Output References
|
|
106
|
-
- Store raw command output under `docs/dev/evidence/__FEATURE_KEY__/` and reference it from this section.
|
|
107
|
-
|
|
108
|
-
### Review Gate Status
|
|
109
|
-
- Evidence gate: `pending`
|
|
110
|
-
- Spec/compliance gate: `pending`
|
|
111
|
-
- Quality gate: `pending`
|
|
112
|
-
|
|
113
|
-
### Spec / Compliance Notes
|
|
114
|
-
- No spec/compliance notes recorded yet.
|
|
115
|
-
|
|
116
|
-
### Quality Notes
|
|
117
|
-
- No quality review notes recorded yet.
|
|
118
|
-
|
|
119
|
-
### Debug Follow-Up
|
|
120
|
-
- No reactive debug follow-up recorded.
|
|
121
|
-
<!-- SDTK-CODE:VERIFY:END -->
|
|
122
|
-
|
|
123
|
-
<!-- SDTK-CODE:SHIP:START -->
|
|
124
|
-
## 7. Ship / Finish Decision
|
|
125
|
-
### Final Decision
|
|
126
|
-
- Decision: `pending`
|
|
127
|
-
- Ship status: `pending`
|
|
128
|
-
|
|
129
|
-
### Preflight Summary
|
|
130
|
-
- No ship preflight entries recorded yet.
|
|
131
|
-
|
|
132
|
-
### Follow-Up Items
|
|
133
|
-
- No follow-up items recorded.
|
|
134
|
-
|
|
135
|
-
### Ship Notes
|
|
136
|
-
- No additional ship notes recorded.
|
|
137
|
-
|
|
138
|
-
### Debug Follow-Up
|
|
139
|
-
- No reactive debug follow-up recorded.
|
|
140
|
-
<!-- SDTK-CODE:SHIP:END -->
|
|
1
|
+
# CODE_WORKFLOW __FEATURE_KEY__
|
|
2
|
+
|
|
3
|
+
<!-- SDTK-CODE:METADATA:START -->
|
|
4
|
+
## 1. Metadata
|
|
5
|
+
- Feature key: `__FEATURE_KEY__`
|
|
6
|
+
- Lane: `__LANE__`
|
|
7
|
+
- Current phase: `start`
|
|
8
|
+
- Phase status: `__PHASE_STATUS__`
|
|
9
|
+
- Intake outcome: `__INTAKE_OUTCOME__`
|
|
10
|
+
- Last updated: `__LAST_UPDATED__`
|
|
11
|
+
<!-- SDTK-CODE:METADATA:END -->
|
|
12
|
+
|
|
13
|
+
<!-- SDTK-CODE:INPUTS:START -->
|
|
14
|
+
## 2. Inputs
|
|
15
|
+
### Required Inputs
|
|
16
|
+
__REQUIRED_INPUTS__
|
|
17
|
+
|
|
18
|
+
### Additional Discovered Inputs
|
|
19
|
+
__ADDITIONAL_INPUTS__
|
|
20
|
+
|
|
21
|
+
### Missing Required Inputs
|
|
22
|
+
__MISSING_INPUTS__
|
|
23
|
+
<!-- SDTK-CODE:INPUTS:END -->
|
|
24
|
+
|
|
25
|
+
<!-- SDTK-CODE:PLAN:START -->
|
|
26
|
+
## 3. Scope Lock
|
|
27
|
+
### In Scope
|
|
28
|
+
- Pending confirmation during workflow planning.
|
|
29
|
+
|
|
30
|
+
### Out Of Scope
|
|
31
|
+
- Pending confirmation during workflow planning.
|
|
32
|
+
|
|
33
|
+
### Assumptions
|
|
34
|
+
- No explicit planning assumptions recorded.
|
|
35
|
+
|
|
36
|
+
### Risks
|
|
37
|
+
- No explicit planning risks recorded.
|
|
38
|
+
|
|
39
|
+
## 4. Plan / Slices
|
|
40
|
+
- Pending lane-specific planning or build guidance.
|
|
41
|
+
|
|
42
|
+
### Planning Notes
|
|
43
|
+
- No additional planning notes recorded.
|
|
44
|
+
<!-- SDTK-CODE:PLAN:END -->
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Provenance
|
|
48
|
+
|
|
49
|
+
When external references are consulted for this workflow batch, include the full provenance log below:
|
|
50
|
+
|
|
51
|
+
### Source References Consulted
|
|
52
|
+
| # | Source | URL or Path | Consulted Date | Purpose |
|
|
53
|
+
|---|---|---|---|---|
|
|
54
|
+
| 1 | <reference name> | <url or relative path> | <YYYY-MM-DD> | <why consulted> |
|
|
55
|
+
|
|
56
|
+
### Behavioral Ideas Extracted
|
|
57
|
+
| # | Source Ref | Behavioral Idea Extracted | SDTK-Native Contract Written | High-Risk Material? |
|
|
58
|
+
|---|---|---|---|---|
|
|
59
|
+
| 1 | <ref #> | <plain description of idea> | <yes/no + what was written> | <yes/no> |
|
|
60
|
+
|
|
61
|
+
### High-Risk Surfaces Reviewed
|
|
62
|
+
| # | Source Ref | Material Reviewed | Decision | Reason |
|
|
63
|
+
|---|---|---|---|---|
|
|
64
|
+
| 1 | <ref #> | <what was reviewed> | REJECTED / REDESIGNED | <reason> |
|
|
65
|
+
|
|
66
|
+
### Controller Provenance Sign-Off
|
|
67
|
+
- Reviewed by: <controller name or alias>
|
|
68
|
+
- Date: <YYYY-MM-DD>
|
|
69
|
+
- Decision: APPROVED / NEEDS REVISION
|
|
70
|
+
- Notes: <any additional controller notes>
|
|
71
|
+
|
|
72
|
+
If no external material was consulted, keep this section and record only the no-reference declaration:
|
|
73
|
+
- No external source references were consulted for this batch.
|
|
74
|
+
<!-- SDTK-CODE:BUILD:START -->
|
|
75
|
+
### Build Progress
|
|
76
|
+
- Build status: `pending`
|
|
77
|
+
- Execution mode: `sequential`
|
|
78
|
+
|
|
79
|
+
### Active Slices
|
|
80
|
+
- Pending build-phase execution.
|
|
81
|
+
|
|
82
|
+
### Build Notes
|
|
83
|
+
- No build notes recorded yet.
|
|
84
|
+
|
|
85
|
+
### Debug Notes
|
|
86
|
+
- No debug notes recorded.
|
|
87
|
+
|
|
88
|
+
### Parallelization Justification
|
|
89
|
+
- Not using explicit parallel execution in this build pass.
|
|
90
|
+
<!-- SDTK-CODE:BUILD:END -->
|
|
91
|
+
|
|
92
|
+
<!-- SDTK-CODE:STATUS:START -->
|
|
93
|
+
## 5. Status Checklist
|
|
94
|
+
- Current phase: `start`
|
|
95
|
+
- Next recommended phase: `__NEXT_PHASE__`
|
|
96
|
+
- Suggested engine entrypoints: __SUGGESTED_ENGINE__
|
|
97
|
+
- Blocking state: `__BLOCKING_STATE__`
|
|
98
|
+
<!-- SDTK-CODE:STATUS:END -->
|
|
99
|
+
|
|
100
|
+
<!-- SDTK-CODE:VERIFY:START -->
|
|
101
|
+
## 6. Evidence And Review Notes
|
|
102
|
+
### Evidence Summary
|
|
103
|
+
- No summarized verification evidence recorded yet.
|
|
104
|
+
|
|
105
|
+
### Raw Output References
|
|
106
|
+
- Store raw command output under `docs/dev/evidence/__FEATURE_KEY__/` and reference it from this section.
|
|
107
|
+
|
|
108
|
+
### Review Gate Status
|
|
109
|
+
- Evidence gate: `pending`
|
|
110
|
+
- Spec/compliance gate: `pending`
|
|
111
|
+
- Quality gate: `pending`
|
|
112
|
+
|
|
113
|
+
### Spec / Compliance Notes
|
|
114
|
+
- No spec/compliance notes recorded yet.
|
|
115
|
+
|
|
116
|
+
### Quality Notes
|
|
117
|
+
- No quality review notes recorded yet.
|
|
118
|
+
|
|
119
|
+
### Debug Follow-Up
|
|
120
|
+
- No reactive debug follow-up recorded.
|
|
121
|
+
<!-- SDTK-CODE:VERIFY:END -->
|
|
122
|
+
|
|
123
|
+
<!-- SDTK-CODE:SHIP:START -->
|
|
124
|
+
## 7. Ship / Finish Decision
|
|
125
|
+
### Final Decision
|
|
126
|
+
- Decision: `pending`
|
|
127
|
+
- Ship status: `pending`
|
|
128
|
+
|
|
129
|
+
### Preflight Summary
|
|
130
|
+
- No ship preflight entries recorded yet.
|
|
131
|
+
|
|
132
|
+
### Follow-Up Items
|
|
133
|
+
- No follow-up items recorded.
|
|
134
|
+
|
|
135
|
+
### Ship Notes
|
|
136
|
+
- No additional ship notes recorded.
|
|
137
|
+
|
|
138
|
+
### Debug Follow-Up
|
|
139
|
+
- No reactive debug follow-up recorded.
|
|
140
|
+
<!-- SDTK-CODE:SHIP:END -->
|
package/bin/sdtk-code.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
|
|
5
|
-
const { run } = require("../src/index");
|
|
6
|
-
|
|
7
|
-
run(process.argv.slice(2))
|
|
8
|
-
.then((exitCode) => {
|
|
9
|
-
process.exitCode = Number.isInteger(exitCode) ? exitCode : 0;
|
|
10
|
-
})
|
|
11
|
-
.catch((error) => {
|
|
12
|
-
console.error(`sdtk-code: ${error.message}`);
|
|
13
|
-
process.exitCode = typeof error.exitCode === "number" ? error.exitCode : 4;
|
|
14
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const { run } = require("../src/index");
|
|
6
|
+
|
|
7
|
+
run(process.argv.slice(2))
|
|
8
|
+
.then((exitCode) => {
|
|
9
|
+
process.exitCode = Number.isInteger(exitCode) ? exitCode : 0;
|
|
10
|
+
})
|
|
11
|
+
.catch((error) => {
|
|
12
|
+
console.error(`sdtk-code: ${error.message}`);
|
|
13
|
+
process.exitCode = typeof error.exitCode === "number" ? error.exitCode : 4;
|
|
14
|
+
});
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sdtk-code-kit",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Workflow-first coding process toolkit: start, plan, build, verify, ship, and runtime setup.",
|
|
5
|
-
"bin": {
|
|
6
|
-
"sdtk-code": "bin/sdtk-code.js"
|
|
7
|
-
},
|
|
8
|
-
"main": "src/index.js",
|
|
9
|
-
"type": "commonjs",
|
|
10
|
-
"files": [
|
|
11
|
-
"bin/",
|
|
12
|
-
"src/",
|
|
13
|
-
"assets/"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; Set-Location '..\\..\\..\\..'; python -m unittest tests.test_sdtk_code_cli tests.test_sdtk_code_product tests.test_sdtk_code_workflow_regressions tests.test_sdtk_code_trust_events tests.test_sdtk_code_guardrails tests.test_sdtk_code_file_scope tests.test_sdtk_code_trust_trace tests.test_sdtk_code_readiness\"",
|
|
17
|
-
"build:payload": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; & 'scripts/sync-toolkit-assets.ps1'; & 'scripts/build-toolkit-manifest.ps1'\"",
|
|
18
|
-
"verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
|
|
19
|
-
"pack:smoke": "npm pack --dry-run",
|
|
20
|
-
"pack:release": "npm pack",
|
|
21
|
-
"prepublishOnly": "node -e \"require('./src/lib/toolkit-payload').verify()\""
|
|
22
|
-
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=18.13.0"
|
|
25
|
-
},
|
|
26
|
-
"keywords": [
|
|
27
|
-
"sdtk-code",
|
|
28
|
-
"cli",
|
|
29
|
-
"toolkit"
|
|
30
|
-
],
|
|
31
|
-
"license": "MIT",
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
|
|
35
|
-
"directory": "products/sdtk-code/distribution/sdtk-code-kit"
|
|
36
|
-
},
|
|
37
|
-
"homepage": "https://github.com/codexsdtk/sdtk-toolkit/tree/main/products/sdtk-code/distribution/sdtk-code-kit",
|
|
38
|
-
"bugs": {
|
|
39
|
-
"url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
|
|
40
|
-
},
|
|
41
|
-
"publishConfig": {
|
|
42
|
-
"access": "public"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sdtk-code-kit",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Workflow-first coding process toolkit: start, plan, build, verify, ship, and runtime setup.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"sdtk-code": "bin/sdtk-code.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "src/index.js",
|
|
9
|
+
"type": "commonjs",
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/",
|
|
12
|
+
"src/",
|
|
13
|
+
"assets/"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; Set-Location '..\\..\\..\\..'; python -m unittest tests.test_sdtk_code_cli tests.test_sdtk_code_product tests.test_sdtk_code_workflow_regressions tests.test_sdtk_code_trust_events tests.test_sdtk_code_guardrails tests.test_sdtk_code_file_scope tests.test_sdtk_code_trust_trace tests.test_sdtk_code_readiness tests.test_sdtk_code_guardrails_scope_trace tests.test_sdtk_code_sleep tests.test_sdtk_code_sleep_report\"",
|
|
17
|
+
"build:payload": "powershell -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; & 'scripts/sync-toolkit-assets.ps1'; & 'scripts/build-toolkit-manifest.ps1'\"",
|
|
18
|
+
"verify:payload": "node -e \"require('./src/lib/toolkit-payload').verify()\"",
|
|
19
|
+
"pack:smoke": "npm pack --dry-run",
|
|
20
|
+
"pack:release": "npm pack",
|
|
21
|
+
"prepublishOnly": "node -e \"require('./src/lib/toolkit-payload').verify()\""
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18.13.0"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"sdtk-code",
|
|
28
|
+
"cli",
|
|
29
|
+
"toolkit"
|
|
30
|
+
],
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/codexsdtk/sdtk-toolkit.git",
|
|
35
|
+
"directory": "products/sdtk-code/distribution/sdtk-code-kit"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/codexsdtk/sdtk-toolkit/tree/main/products/sdtk-code/distribution/sdtk-code-kit",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/codexsdtk/sdtk-toolkit/issues"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/src/commands/build.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const { parseFlags, requireFlag, validatePattern } = require("../lib/args");
|
|
5
|
-
const { ValidationError } = require("../lib/errors");
|
|
6
|
-
const { runBuild } = require("../lib/workflow-build");
|
|
7
|
-
|
|
8
|
-
const FLAG_DEFS = {
|
|
9
|
-
"feature-key": { type: "string" },
|
|
10
|
-
"project-path": { type: "string" },
|
|
11
|
-
"active-slice": { type: "string", multiple: true },
|
|
12
|
-
note: { type: "string", multiple: true },
|
|
13
|
-
"debug-note": { type: "string", multiple: true },
|
|
14
|
-
"parallel-reason": { type: "string" },
|
|
15
|
-
complete: { type: "boolean" },
|
|
16
|
-
blocked: { type: "boolean" },
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const FEATURE_KEY_RE = /^[A-Z0-9_]+$/;
|
|
20
|
-
|
|
21
|
-
function cmdBuild(args) {
|
|
22
|
-
const { flags, positional } = parseFlags(args, FLAG_DEFS);
|
|
23
|
-
if (positional.length > 0) {
|
|
24
|
-
throw new ValidationError('Unexpected positional arguments. Use flags only for "build".');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const featureKey = requireFlag(flags, "feature-key", "feature-key");
|
|
28
|
-
validatePattern(
|
|
29
|
-
featureKey,
|
|
30
|
-
FEATURE_KEY_RE,
|
|
31
|
-
"feature-key",
|
|
32
|
-
"Must use UPPER_SNAKE_CASE, for example ORDER_MGMT."
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const projectPath = flags["project-path"] ? path.resolve(flags["project-path"]) : process.cwd();
|
|
36
|
-
const result = runBuild(projectPath, featureKey, flags);
|
|
37
|
-
|
|
38
|
-
console.log("SDTK-CODE workflow build");
|
|
39
|
-
console.log(` Feature key: ${featureKey}`);
|
|
40
|
-
console.log(` Lane: ${result.lane}`);
|
|
41
|
-
console.log(` Status: ${result.phaseStatus}`);
|
|
42
|
-
console.log(` Artifact: ${result.artifactPath}`);
|
|
43
|
-
console.log(` Slices: ${result.activeSliceCount}`);
|
|
44
|
-
console.log(` Mode: ${result.executionMode}`);
|
|
45
|
-
console.log(` Next phase: ${result.nextPhase}`);
|
|
46
|
-
console.log(` Engine: ${result.suggestedEngineSkills.join(", ")}`);
|
|
47
|
-
|
|
48
|
-
return 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
module.exports = {
|
|
52
|
-
cmdBuild,
|
|
53
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { parseFlags, requireFlag, validatePattern } = require("../lib/args");
|
|
5
|
+
const { ValidationError } = require("../lib/errors");
|
|
6
|
+
const { runBuild } = require("../lib/workflow-build");
|
|
7
|
+
|
|
8
|
+
const FLAG_DEFS = {
|
|
9
|
+
"feature-key": { type: "string" },
|
|
10
|
+
"project-path": { type: "string" },
|
|
11
|
+
"active-slice": { type: "string", multiple: true },
|
|
12
|
+
note: { type: "string", multiple: true },
|
|
13
|
+
"debug-note": { type: "string", multiple: true },
|
|
14
|
+
"parallel-reason": { type: "string" },
|
|
15
|
+
complete: { type: "boolean" },
|
|
16
|
+
blocked: { type: "boolean" },
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const FEATURE_KEY_RE = /^[A-Z0-9_]+$/;
|
|
20
|
+
|
|
21
|
+
function cmdBuild(args) {
|
|
22
|
+
const { flags, positional } = parseFlags(args, FLAG_DEFS);
|
|
23
|
+
if (positional.length > 0) {
|
|
24
|
+
throw new ValidationError('Unexpected positional arguments. Use flags only for "build".');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const featureKey = requireFlag(flags, "feature-key", "feature-key");
|
|
28
|
+
validatePattern(
|
|
29
|
+
featureKey,
|
|
30
|
+
FEATURE_KEY_RE,
|
|
31
|
+
"feature-key",
|
|
32
|
+
"Must use UPPER_SNAKE_CASE, for example ORDER_MGMT."
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const projectPath = flags["project-path"] ? path.resolve(flags["project-path"]) : process.cwd();
|
|
36
|
+
const result = runBuild(projectPath, featureKey, flags);
|
|
37
|
+
|
|
38
|
+
console.log("SDTK-CODE workflow build");
|
|
39
|
+
console.log(` Feature key: ${featureKey}`);
|
|
40
|
+
console.log(` Lane: ${result.lane}`);
|
|
41
|
+
console.log(` Status: ${result.phaseStatus}`);
|
|
42
|
+
console.log(` Artifact: ${result.artifactPath}`);
|
|
43
|
+
console.log(` Slices: ${result.activeSliceCount}`);
|
|
44
|
+
console.log(` Mode: ${result.executionMode}`);
|
|
45
|
+
console.log(` Next phase: ${result.nextPhase}`);
|
|
46
|
+
console.log(` Engine: ${result.suggestedEngineSkills.join(", ")}`);
|
|
47
|
+
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = {
|
|
52
|
+
cmdBuild,
|
|
53
|
+
};
|
package/src/commands/doctor.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const { parseFlags, requireFlag, validatePattern } = require("../lib/args");
|
|
5
|
-
const { ValidationError } = require("../lib/errors");
|
|
6
|
-
const { runWorkflowDoctor } = require("../lib/workflow-doctor");
|
|
7
|
-
|
|
8
|
-
const FLAG_DEFS = {
|
|
9
|
-
"feature-key": { type: "string" },
|
|
10
|
-
"project-path": { type: "string" },
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const FEATURE_KEY_RE = /^[A-Z0-9_]+$/;
|
|
14
|
-
|
|
15
|
-
function cmdDoctor(args) {
|
|
16
|
-
const { flags, positional } = parseFlags(args, FLAG_DEFS);
|
|
17
|
-
if (positional.length > 0) {
|
|
18
|
-
throw new ValidationError('Unexpected positional arguments. Use flags only for "doctor".');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const featureKey = requireFlag(flags, "feature-key", "feature-key");
|
|
22
|
-
validatePattern(
|
|
23
|
-
featureKey,
|
|
24
|
-
FEATURE_KEY_RE,
|
|
25
|
-
"feature-key",
|
|
26
|
-
"Must use UPPER_SNAKE_CASE, for example ORDER_MGMT."
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const projectPath = flags["project-path"] ? path.resolve(flags["project-path"]) : process.cwd();
|
|
30
|
-
const report = runWorkflowDoctor(projectPath, featureKey);
|
|
31
|
-
|
|
32
|
-
console.log("SDTK-CODE workflow doctor");
|
|
33
|
-
console.log(` Feature key: ${featureKey}`);
|
|
34
|
-
console.log(` Artifact: ${report.state.exists ? report.state.artifactPath : "missing"}`);
|
|
35
|
-
console.log(` Result: ${report.result}`);
|
|
36
|
-
|
|
37
|
-
if (report.issues.length === 0) {
|
|
38
|
-
console.log(" Issues: none");
|
|
39
|
-
return 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
report.issues.forEach((issue, index) => {
|
|
43
|
-
console.log(` Issue ${index + 1}: ${issue}`);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
console.log(" Repair: diagnostic only in BK-047-lite (no auto-repair)");
|
|
47
|
-
return 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = {
|
|
51
|
-
cmdDoctor,
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { parseFlags, requireFlag, validatePattern } = require("../lib/args");
|
|
5
|
+
const { ValidationError } = require("../lib/errors");
|
|
6
|
+
const { runWorkflowDoctor } = require("../lib/workflow-doctor");
|
|
7
|
+
|
|
8
|
+
const FLAG_DEFS = {
|
|
9
|
+
"feature-key": { type: "string" },
|
|
10
|
+
"project-path": { type: "string" },
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const FEATURE_KEY_RE = /^[A-Z0-9_]+$/;
|
|
14
|
+
|
|
15
|
+
function cmdDoctor(args) {
|
|
16
|
+
const { flags, positional } = parseFlags(args, FLAG_DEFS);
|
|
17
|
+
if (positional.length > 0) {
|
|
18
|
+
throw new ValidationError('Unexpected positional arguments. Use flags only for "doctor".');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const featureKey = requireFlag(flags, "feature-key", "feature-key");
|
|
22
|
+
validatePattern(
|
|
23
|
+
featureKey,
|
|
24
|
+
FEATURE_KEY_RE,
|
|
25
|
+
"feature-key",
|
|
26
|
+
"Must use UPPER_SNAKE_CASE, for example ORDER_MGMT."
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const projectPath = flags["project-path"] ? path.resolve(flags["project-path"]) : process.cwd();
|
|
30
|
+
const report = runWorkflowDoctor(projectPath, featureKey);
|
|
31
|
+
|
|
32
|
+
console.log("SDTK-CODE workflow doctor");
|
|
33
|
+
console.log(` Feature key: ${featureKey}`);
|
|
34
|
+
console.log(` Artifact: ${report.state.exists ? report.state.artifactPath : "missing"}`);
|
|
35
|
+
console.log(` Result: ${report.result}`);
|
|
36
|
+
|
|
37
|
+
if (report.issues.length === 0) {
|
|
38
|
+
console.log(" Issues: none");
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
report.issues.forEach((issue, index) => {
|
|
43
|
+
console.log(` Issue ${index + 1}: ${issue}`);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
console.log(" Repair: diagnostic only in BK-047-lite (no auto-repair)");
|
|
47
|
+
return 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = {
|
|
51
|
+
cmdDoctor,
|
|
52
52
|
};
|
package/src/commands/generate.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const { ValidationError } = require("../lib/errors");
|
|
4
|
-
|
|
5
|
-
function cmdGenerate() {
|
|
6
|
-
throw new ValidationError("generate command is not available in SDTK-CODE.");
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
module.exports = {
|
|
10
|
-
cmdGenerate,
|
|
11
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const { ValidationError } = require("../lib/errors");
|
|
4
|
+
|
|
5
|
+
function cmdGenerate() {
|
|
6
|
+
throw new ValidationError("generate command is not available in SDTK-CODE.");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
cmdGenerate,
|
|
11
|
+
};
|