sdtk-code-kit 0.1.1 → 0.1.3

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.
@@ -1,217 +1,219 @@
1
- # SDTK-CODE Workflow Routing Contract
2
-
3
- ## 1. Product Identity
4
- `SDTK-CODE` is the coding-only product in the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family.
5
-
6
- It is a separate product from `SDTK-SPEC`, not a sub-phase inside `SDTK-SPEC`.
7
-
8
- `SDTK-CODE` exists to enforce disciplined implementation work:
9
- - execution-planning refinement after valid intake
10
- - TDD-first execution
11
- - systematic debugging
12
- - evidence-first verification
13
- - spec-first and quality-second review
14
- - ship and finish discipline
15
-
16
- It does not own PM, BA, ARCH, or QA artifact generation.
17
- It also does not own upstream implementation-readiness planning.
18
-
19
- ## 2. Upstream Boundary With SDTK-SPEC
20
- `SDTK-SPEC` is the upstream docs-first system.
21
-
22
- `SDTK-SPEC` produces the handoff artifacts.
23
- `SDTK-CODE` starts after those handoff artifacts already exist.
24
-
25
- Minimum expected inputs:
26
- - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
27
- - `sdtk-spec.config.json`
28
- - relevant architecture, API, DB, and flow/screen specs for the current slice when applicable
29
-
30
- Preferred upstream intake artifact:
31
- - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
32
-
33
- Compatibility fallback when the formal handoff file is missing:
34
- - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
35
- - `sdtk-spec.config.json`
36
- - relevant architecture, API, DB, and flow/screen specs for the current slice when applicable
37
-
38
- Task-breakdown truth:
39
- - upstream `SDTK-SPEC` `/dev` owns implementation-readiness planning and formal handoff scope
40
- - `FEATURE_IMPL_PLAN_[FEATURE_KEY].md` remains the upstream readiness plan
41
- - `sdtk-code plan` refines downstream execution slices only after intake succeeds
42
-
43
- Expected outputs from `SDTK-CODE`:
44
- - code changes
45
- - test changes
46
- - summarized verification evidence
47
- - review findings
48
- - ship or finish decisions
49
- - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json` on completed formal-handoff-backed closeout
50
-
51
- ## 3. Default Operating Model
52
- The default product direction is workflow-first.
53
-
54
- Normal mode is not "pick one of 12 skills and self-orchestrate from scratch."
55
- Normal mode is:
56
- - start from the workflow layer
57
- - follow lane-aware routing
58
- - keep execution traceable through `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md`
59
-
60
- Important current truth:
61
- - the workflow-first direction is locked
62
- - the workflow routing contract now exists
63
- - `start`, `plan`, `build`, `verify`, and `ship` now exist in the current package as control-plane workflow commands
64
-
65
- That means this file is the routing contract for the workflow-first model. It describes the full intended workflow surface, which now exists in the CLI as control-plane workflow commands.
66
-
67
- ## 4. Two-Layer Model
68
- ### Workflow layer
69
- This is the planned normal-mode surface.
70
-
71
- Workflow phases:
72
- - `start`
73
- - `plan`
74
- - `build`
75
- - `verify`
76
- - `ship`
77
-
78
- The workflow layer is control-plane and routing-oriented.
79
- It is intended to:
80
- - validate state and inputs
81
- - decide legal next steps
82
- - update the workflow artifact
83
- - route to the existing specialist engine
84
-
85
- ### Specialist skill engine
86
- The existing 12 `code-*` skills remain intact.
87
-
88
- They are:
89
- - the internal execution engine behind the workflow layer
90
- - the expert-mode direct entrypoints
91
- - not the default onboarding surface
92
-
93
- ## 5. V1 Lane Model
94
- V1 supports only two explicit lanes:
95
- - `feature`
96
- - `bugfix`
97
-
98
- Deferred lanes remain out of scope for v1:
99
- - `hardening`
100
- - `review-only`
101
- - `ship-only`
102
-
103
- Lane intent:
104
- - `feature` = full workflow: `start -> plan -> build -> verify -> ship`
105
- - `bugfix` = lighter path: `start -> build -> verify -> ship`
106
-
107
- Lane intake note:
108
- - `feature` expects formal handoff by default and uses compatibility fallback only when the handoff file is missing
109
- - `bugfix` also prefers formal handoff, but bounded compatibility fallback remains acceptable when the handoff file is missing
110
-
111
- ## 6. Workflow Artifact
112
- Canonical workflow artifact:
113
- - `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md`
114
-
115
- Canonical template path:
116
- - `products/sdtk-code/toolkit/templates/CODE_WORKFLOW_TEMPLATE.md`
117
-
118
- The workflow artifact is not a replacement for `FEATURE_IMPL_PLAN_[FEATURE_KEY].md`.
119
- It is the coding execution memory that sits beside the upstream handoff artifact.
120
-
121
- Evidence rule:
122
- - summarized evidence belongs in `CODE_WORKFLOW_[FEATURE_KEY].md`
123
- - raw command output should be stored separately and referenced from the workflow artifact
124
-
125
- ## 7. Phase-To-Engine Mapping
126
- | Workflow phase | Primary engine skills | Conditional engine skills | Notes |
127
- |---|---|---|---|
128
- | `start` | `code-discover` | `code-brainstorm` | Use `code-brainstorm` only when the slice is still ambiguous after intake grounding. |
129
- | `plan` | `code-plan` | `code-brainstorm` | `code-brainstorm` remains optional when the implementation path is unclear. |
130
- | `build` | `code-worktree`, `code-tdd`, `code-execute` | `code-parallel` | `code-parallel` should be used only for clearly independent tasks. |
131
- | `verify` | `code-verify`, `code-review` | none | Review order stays evidence first, then spec/compliance, then quality. |
132
- | `ship` | `code-ship`, `code-finish` | none | Ship stays coding-scope only and does not expand into full release governance. |
133
-
134
- ### Cross-cutting reactive skill
135
- `code-debug` is cross-cutting and reactive.
136
-
137
- It is not a fixed top-level workflow phase.
138
- Trigger it when failures occur during:
139
- - `build`
140
- - `verify`
141
- - `ship` pre-flight or integration checks
142
-
143
- ## 8. Normal Mode vs Expert Mode
144
- ### Normal mode
145
- Normal mode is workflow-first.
146
-
147
- It should:
148
- - begin from the workflow layer
149
- - follow the lane model
150
- - use the workflow artifact as the execution memory
151
- - route to the engine skills intentionally rather than making the user choose blindly
152
-
153
- ### Expert mode
154
- Expert mode is direct raw `code-*` usage inside the runtime.
155
-
156
- Examples:
157
- - `/code-plan`
158
- - `/code-tdd`
159
- - `/code-debug`
160
-
161
- Expert mode rules:
162
- - raw skill usage remains available
163
- - it is an advanced path, not the default onboarding path
164
- - if a workflow artifact already exists, expert-mode deviations should be recorded against it
165
- - v1 does not require a dedicated CLI expert-mode flag
166
-
167
- ### Expert-mode deviation recording convention
168
- Batch 7 keeps expert mode lightweight.
169
-
170
- If a workflow artifact already exists and you bypass the normal workflow command path with raw `code-*` usage, record the deviation under `## 6. Evidence And Review Notes` using a lightweight note that captures:
171
- - date/time
172
- - current phase
173
- - raw skill used
174
- - reason for bypass
175
- - evidence refs
176
- - outcome or next action
177
-
178
- This batch does not add runtime interception or a new artifact section for expert mode.
179
- The rule is documentation plus lightweight recording inside the existing workflow artifact.
180
-
181
- ## 9. Runtime Truth
182
- | Runtime | Current truth | Workflow note |
183
- |---|---|---|
184
- | Claude | strongest intended runtime for v1 | full workflow direction is designed with Claude in mind |
185
- | Codex | supported with user-scope only install | workflow routing must stay honest about degraded collaboration behavior |
186
-
187
- Codex fallback note:
188
- - `code-parallel` must degrade to sequential fallback when collaboration or subagent behavior is unavailable
189
- - workflow routing must not assume runtime capabilities that Codex cannot reliably support
190
-
191
- ## 10. Current Practical Reality
192
- The current package can already handle:
193
- - `sdtk-code init`
194
- - `sdtk-code runtime install|uninstall|status`
195
- - runtime skill installation for Claude and Codex
196
-
197
- The workflow-first direction now defines the normal practical path:
198
- - `sdtk-code start` for formal-handoff-first intake and artifact initialization
199
- - `sdtk-code plan` for feature-lane refinement and optional lightweight bugfix planning
200
- - `sdtk-code build` for build-progress tracking and next-step routing
201
- - `sdtk-code verify` for summarized evidence capture and ordered review gating
202
- - `sdtk-code ship` for final ship or finish decision capture
203
- - direct raw `code-*` skills in Claude or Codex as the expert-mode escape hatch and specialist engine
204
- - guided by this workflow routing contract
205
-
206
- Current `start` intake truth:
207
- - prefer `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
208
- - fall back to `FEATURE_IMPL_PLAN + sdtk-spec.config.json` only when the formal handoff file is missing
209
- - block cleanly when the formal handoff file exists but is invalid or upstream-blocked
210
-
211
- ## 11. What This Contract Prevents
212
- This routing contract exists to prevent:
213
- - treating `SDTK-CODE` as a loose 12-skill catalog
214
- - creating a second competing wrapper-skill catalog
215
- - drifting into PM/BA/ARCH/QA responsibilities
216
- - modeling `code-debug` as a fixed linear phase
217
- - overpromising workflow command behavior that is not implemented yet
1
+ # SDTK-CODE Workflow Routing Contract
2
+
3
+ ## 1. Product Identity
4
+ `SDTK-CODE` is the coding-only product in the `SDTK-SPEC -> SDTK-CODE -> SDTK-OPS` family.
5
+
6
+ It is a separate product from `SDTK-SPEC`, not a sub-phase inside `SDTK-SPEC`.
7
+
8
+ `SDTK-CODE` exists to enforce disciplined implementation work:
9
+ - execution-planning refinement after valid intake
10
+ - TDD-first execution
11
+ - systematic debugging
12
+ - evidence-first verification
13
+ - spec-first and quality-second review
14
+ - ship and finish discipline
15
+
16
+ It does not own PM, BA, ARCH, or QA artifact generation.
17
+ It also does not own upstream implementation-readiness planning.
18
+
19
+ ## 2. Upstream Boundary With SDTK-SPEC
20
+ `SDTK-SPEC` is the upstream docs-first system.
21
+
22
+ `SDTK-SPEC` produces the handoff artifacts.
23
+ `SDTK-CODE` starts after those handoff artifacts already exist.
24
+
25
+ Minimum expected inputs:
26
+ - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
27
+ - `sdtk-spec.config.json`
28
+ - relevant architecture, API, DB, and flow/screen specs for the current slice when applicable
29
+
30
+ Preferred upstream intake artifact:
31
+ - `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
32
+
33
+ Compatibility fallback when the formal handoff file is missing:
34
+ - `docs/dev/FEATURE_IMPL_PLAN_[FEATURE_KEY].md`
35
+ - `sdtk-spec.config.json`
36
+ - relevant architecture, API, DB, and flow/screen specs for the current slice when applicable
37
+
38
+ Task-breakdown truth:
39
+ - upstream `SDTK-SPEC` `/dev` owns implementation-readiness planning and formal handoff scope
40
+ - `FEATURE_IMPL_PLAN_[FEATURE_KEY].md` remains the upstream readiness plan
41
+ - `sdtk-code plan` refines downstream execution slices only after intake succeeds
42
+
43
+ Expected outputs from `SDTK-CODE`:
44
+ - code changes
45
+ - test changes
46
+ - summarized verification evidence
47
+ - `docs/dev/REVIEW_PACKET_[FEATURE_KEY].md` from `verify` as downstream QA/controller input
48
+ - review findings
49
+ - ship or finish decisions
50
+ - `docs/dev/OPS_HANDOFF_[FEATURE_KEY].json` on completed formal-handoff-backed closeout
51
+
52
+ ## 3. Default Operating Model
53
+ The default product direction is workflow-first.
54
+
55
+ Normal mode is not "pick one of 12 skills and self-orchestrate from scratch."
56
+ Normal mode is:
57
+ - start from the workflow layer
58
+ - follow lane-aware routing
59
+ - keep execution traceable through `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md`
60
+
61
+ Important current truth:
62
+ - the workflow-first direction is locked
63
+ - the workflow routing contract now exists
64
+ - `start`, `plan`, `build`, `verify`, and `ship` now exist in the current package as control-plane workflow commands
65
+
66
+ That means this file is the routing contract for the workflow-first model. It describes the full intended workflow surface, which now exists in the CLI as control-plane workflow commands.
67
+
68
+ ## 4. Two-Layer Model
69
+ ### Workflow layer
70
+ This is the planned normal-mode surface.
71
+
72
+ Workflow phases:
73
+ - `start`
74
+ - `plan`
75
+ - `build`
76
+ - `verify`
77
+ - `ship`
78
+
79
+ The workflow layer is control-plane and routing-oriented.
80
+ It is intended to:
81
+ - validate state and inputs
82
+ - decide legal next steps
83
+ - update the workflow artifact
84
+ - route to the existing specialist engine
85
+
86
+ ### Specialist skill engine
87
+ The existing 12 `code-*` skills remain intact.
88
+
89
+ They are:
90
+ - the internal execution engine behind the workflow layer
91
+ - the expert-mode direct entrypoints
92
+ - not the default onboarding surface
93
+
94
+ ## 5. V1 Lane Model
95
+ V1 supports only two explicit lanes:
96
+ - `feature`
97
+ - `bugfix`
98
+
99
+ Deferred lanes remain out of scope for v1:
100
+ - `hardening`
101
+ - `review-only`
102
+ - `ship-only`
103
+
104
+ Lane intent:
105
+ - `feature` = full workflow: `start -> plan -> build -> verify -> ship`
106
+ - `bugfix` = lighter path: `start -> build -> verify -> ship`
107
+
108
+ Lane intake note:
109
+ - `feature` expects formal handoff by default and uses compatibility fallback only when the handoff file is missing
110
+ - `bugfix` also prefers formal handoff, but bounded compatibility fallback remains acceptable when the handoff file is missing
111
+
112
+ ## 6. Workflow Artifact
113
+ Canonical workflow artifact:
114
+ - `docs/dev/CODE_WORKFLOW_[FEATURE_KEY].md`
115
+
116
+ Canonical template path:
117
+ - `products/sdtk-code/toolkit/templates/CODE_WORKFLOW_TEMPLATE.md`
118
+
119
+ The workflow artifact is not a replacement for `FEATURE_IMPL_PLAN_[FEATURE_KEY].md`.
120
+ It is the coding execution memory that sits beside the upstream handoff artifact.
121
+
122
+ Evidence rule:
123
+ - summarized evidence belongs in `CODE_WORKFLOW_[FEATURE_KEY].md`
124
+ - raw command output should be stored separately and referenced from the workflow artifact
125
+ - `verify` also emits `docs/dev/REVIEW_PACKET_[FEATURE_KEY].md` as an evidence package for QA/controller review, not as final approval
126
+
127
+ ## 7. Phase-To-Engine Mapping
128
+ | Workflow phase | Primary engine skills | Conditional engine skills | Notes |
129
+ |---|---|---|---|
130
+ | `start` | `code-discover` | `code-brainstorm` | Use `code-brainstorm` only when the slice is still ambiguous after intake grounding. |
131
+ | `plan` | `code-plan` | `code-brainstorm` | `code-brainstorm` remains optional when the implementation path is unclear. |
132
+ | `build` | `code-worktree`, `code-tdd`, `code-execute` | `code-parallel` | `code-parallel` should be used only for clearly independent tasks. |
133
+ | `verify` | `code-verify`, `code-review` | none | Review order stays evidence first, then spec/compliance, then quality. |
134
+ | `ship` | `code-ship`, `code-finish` | none | Ship stays coding-scope only and does not expand into full release governance. |
135
+
136
+ ### Cross-cutting reactive skill
137
+ `code-debug` is cross-cutting and reactive.
138
+
139
+ It is not a fixed top-level workflow phase.
140
+ Trigger it when failures occur during:
141
+ - `build`
142
+ - `verify`
143
+ - `ship` pre-flight or integration checks
144
+
145
+ ## 8. Normal Mode vs Expert Mode
146
+ ### Normal mode
147
+ Normal mode is workflow-first.
148
+
149
+ It should:
150
+ - begin from the workflow layer
151
+ - follow the lane model
152
+ - use the workflow artifact as the execution memory
153
+ - route to the engine skills intentionally rather than making the user choose blindly
154
+
155
+ ### Expert mode
156
+ Expert mode is direct raw `code-*` usage inside the runtime.
157
+
158
+ Examples:
159
+ - `/code-plan`
160
+ - `/code-tdd`
161
+ - `/code-debug`
162
+
163
+ Expert mode rules:
164
+ - raw skill usage remains available
165
+ - it is an advanced path, not the default onboarding path
166
+ - if a workflow artifact already exists, expert-mode deviations should be recorded against it
167
+ - v1 does not require a dedicated CLI expert-mode flag
168
+
169
+ ### Expert-mode deviation recording convention
170
+ Batch 7 keeps expert mode lightweight.
171
+
172
+ If a workflow artifact already exists and you bypass the normal workflow command path with raw `code-*` usage, record the deviation under `## 6. Evidence And Review Notes` using a lightweight note that captures:
173
+ - date/time
174
+ - current phase
175
+ - raw skill used
176
+ - reason for bypass
177
+ - evidence refs
178
+ - outcome or next action
179
+
180
+ This batch does not add runtime interception or a new artifact section for expert mode.
181
+ The rule is documentation plus lightweight recording inside the existing workflow artifact.
182
+
183
+ ## 9. Runtime Truth
184
+ | Runtime | Current truth | Workflow note |
185
+ |---|---|---|
186
+ | Claude | strongest intended runtime for v1 | full workflow direction is designed with Claude in mind |
187
+ | Codex | defaults to user scope; project-local installs require the explicit local `CODEX_HOME=<project>/.codex` contract | workflow routing must stay honest about degraded collaboration behavior and not claim native `.codex/skills` auto-discovery |
188
+
189
+ Codex fallback note:
190
+ - `code-parallel` must degrade to sequential fallback when collaboration or subagent behavior is unavailable
191
+ - workflow routing must not assume runtime capabilities that Codex cannot reliably support
192
+
193
+ ## 10. Current Practical Reality
194
+ The current package can already handle:
195
+ - `sdtk-code init`
196
+ - `sdtk-code runtime install|uninstall|status`
197
+ - runtime skill installation for Claude and Codex
198
+
199
+ The workflow-first direction now defines the normal practical path:
200
+ - `sdtk-code start` for formal-handoff-first intake and artifact initialization
201
+ - `sdtk-code plan` for feature-lane refinement and optional lightweight bugfix planning
202
+ - `sdtk-code build` for build-progress tracking and next-step routing
203
+ - `sdtk-code verify` for summarized evidence capture, `REVIEW_PACKET` generation, and ordered review gating
204
+ - `sdtk-code ship` for final ship or finish decision capture
205
+ - direct raw `code-*` skills in Claude or Codex as the expert-mode escape hatch and specialist engine
206
+ - guided by this workflow routing contract
207
+
208
+ Current `start` intake truth:
209
+ - prefer `docs/dev/CODE_HANDOFF_[FEATURE_KEY].json`
210
+ - fall back to `FEATURE_IMPL_PLAN + sdtk-spec.config.json` only when the formal handoff file is missing
211
+ - block cleanly when the formal handoff file exists but is invalid or upstream-blocked
212
+
213
+ ## 11. What This Contract Prevents
214
+ This routing contract exists to prevent:
215
+ - treating `SDTK-CODE` as a loose 12-skill catalog
216
+ - creating a second competing wrapper-skill catalog
217
+ - drifting into PM/BA/ARCH/QA responsibilities
218
+ - modeling `code-debug` as a fixed linear phase
219
+ - overpromising workflow command behavior that is not implemented yet