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,113 +1,113 @@
|
|
|
1
|
-
# Implementer Subagent Prompt Template
|
|
2
|
-
|
|
3
|
-
Use this template when dispatching an implementer subagent.
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
Task tool (general-purpose):
|
|
7
|
-
description: "Implement Task N: [task name]"
|
|
8
|
-
prompt: |
|
|
9
|
-
You are implementing Task N: [task name]
|
|
10
|
-
|
|
11
|
-
## Task Description
|
|
12
|
-
|
|
13
|
-
[FULL TEXT of task from plan - paste it here, don't make subagent read file]
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
[Scene-setting: where this fits, dependencies, architectural context]
|
|
18
|
-
|
|
19
|
-
## Before You Begin
|
|
20
|
-
|
|
21
|
-
If you have questions about:
|
|
22
|
-
- The requirements or acceptance criteria
|
|
23
|
-
- The approach or implementation strategy
|
|
24
|
-
- Dependencies or assumptions
|
|
25
|
-
- Anything unclear in the task description
|
|
26
|
-
|
|
27
|
-
**Ask them now.** Raise any concerns before starting work.
|
|
28
|
-
|
|
29
|
-
## Your Job
|
|
30
|
-
|
|
31
|
-
Once you're clear on requirements:
|
|
32
|
-
1. Implement exactly what the task specifies
|
|
33
|
-
2. Write tests (following TDD if task says to)
|
|
34
|
-
3. Verify implementation works
|
|
35
|
-
4. Commit your work
|
|
36
|
-
5. Self-review (see below)
|
|
37
|
-
6. Report back
|
|
38
|
-
|
|
39
|
-
Work from: [directory]
|
|
40
|
-
|
|
41
|
-
**While you work:** If you encounter something unexpected or unclear, **ask questions**.
|
|
42
|
-
It's always OK to pause and clarify. Don't guess or make assumptions.
|
|
43
|
-
|
|
44
|
-
## Code Organization
|
|
45
|
-
|
|
46
|
-
You reason best about code you can hold in context at once, and your edits are more
|
|
47
|
-
reliable when files are focused. Keep this in mind:
|
|
48
|
-
- Follow the file structure defined in the plan
|
|
49
|
-
- Each file should have one clear responsibility with a well-defined interface
|
|
50
|
-
- If a file you're creating is growing beyond the plan's intent, stop and report
|
|
51
|
-
it as DONE_WITH_CONCERNS -- don't split files on your own without plan guidance
|
|
52
|
-
- If an existing file you're modifying is already large or tangled, work carefully
|
|
53
|
-
and note it as a concern in your report
|
|
54
|
-
- In existing codebases, follow established patterns. Improve code you're touching
|
|
55
|
-
the way a good developer would, but don't restructure things outside your task.
|
|
56
|
-
|
|
57
|
-
## When You're in Over Your Head
|
|
58
|
-
|
|
59
|
-
It is always OK to stop and say "this is too hard for me." Bad work is worse than
|
|
60
|
-
no work. You will not be penalized for escalating.
|
|
61
|
-
|
|
62
|
-
**STOP and escalate when:**
|
|
63
|
-
- The task requires architectural decisions with multiple valid approaches
|
|
64
|
-
- You need to understand code beyond what was provided and can't find clarity
|
|
65
|
-
- You feel uncertain about whether your approach is correct
|
|
66
|
-
- The task involves restructuring existing code in ways the plan didn't anticipate
|
|
67
|
-
- You've been reading file after file trying to understand the system without progress
|
|
68
|
-
|
|
69
|
-
**How to escalate:** Report back with status BLOCKED or NEEDS_CONTEXT. Describe
|
|
70
|
-
specifically what you're stuck on, what you've tried, and what kind of help you need.
|
|
71
|
-
The controller can provide more context, re-dispatch with a more capable model,
|
|
72
|
-
or break the task into smaller pieces.
|
|
73
|
-
|
|
74
|
-
## Before Reporting Back: Self-Review
|
|
75
|
-
|
|
76
|
-
Review your work with fresh eyes. Ask yourself:
|
|
77
|
-
|
|
78
|
-
**Completeness:**
|
|
79
|
-
- Did I fully implement everything in the spec?
|
|
80
|
-
- Did I miss any requirements?
|
|
81
|
-
- Are there edge cases I didn't handle?
|
|
82
|
-
|
|
83
|
-
**Quality:**
|
|
84
|
-
- Is this my best work?
|
|
85
|
-
- Are names clear and accurate (match what things do, not how they work)?
|
|
86
|
-
- Is the code clean and maintainable?
|
|
87
|
-
|
|
88
|
-
**Discipline:**
|
|
89
|
-
- Did I avoid overbuilding (YAGNI)?
|
|
90
|
-
- Did I only build what was requested?
|
|
91
|
-
- Did I follow existing patterns in the codebase?
|
|
92
|
-
|
|
93
|
-
**Testing:**
|
|
94
|
-
- Do tests actually verify behavior (not just mock behavior)?
|
|
95
|
-
- Did I follow TDD if required?
|
|
96
|
-
- Are tests comprehensive?
|
|
97
|
-
|
|
98
|
-
If you find issues during self-review, fix them now before reporting.
|
|
99
|
-
|
|
100
|
-
## Report Format
|
|
101
|
-
|
|
102
|
-
When done, report:
|
|
103
|
-
- **Status:** DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
|
|
104
|
-
- What you implemented (or what you attempted, if blocked)
|
|
105
|
-
- What you tested and test results
|
|
106
|
-
- Files changed
|
|
107
|
-
- Self-review findings (if any)
|
|
108
|
-
- Any issues or concerns
|
|
109
|
-
|
|
110
|
-
Use DONE_WITH_CONCERNS if you completed the work but have doubts about correctness.
|
|
111
|
-
Use BLOCKED if you cannot complete the task. Use NEEDS_CONTEXT if you need
|
|
112
|
-
information that wasn't provided. Never silently produce work you're unsure about.
|
|
113
|
-
```
|
|
1
|
+
# Implementer Subagent Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching an implementer subagent.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Task tool (general-purpose):
|
|
7
|
+
description: "Implement Task N: [task name]"
|
|
8
|
+
prompt: |
|
|
9
|
+
You are implementing Task N: [task name]
|
|
10
|
+
|
|
11
|
+
## Task Description
|
|
12
|
+
|
|
13
|
+
[FULL TEXT of task from plan - paste it here, don't make subagent read file]
|
|
14
|
+
|
|
15
|
+
## Context
|
|
16
|
+
|
|
17
|
+
[Scene-setting: where this fits, dependencies, architectural context]
|
|
18
|
+
|
|
19
|
+
## Before You Begin
|
|
20
|
+
|
|
21
|
+
If you have questions about:
|
|
22
|
+
- The requirements or acceptance criteria
|
|
23
|
+
- The approach or implementation strategy
|
|
24
|
+
- Dependencies or assumptions
|
|
25
|
+
- Anything unclear in the task description
|
|
26
|
+
|
|
27
|
+
**Ask them now.** Raise any concerns before starting work.
|
|
28
|
+
|
|
29
|
+
## Your Job
|
|
30
|
+
|
|
31
|
+
Once you're clear on requirements:
|
|
32
|
+
1. Implement exactly what the task specifies
|
|
33
|
+
2. Write tests (following TDD if task says to)
|
|
34
|
+
3. Verify implementation works
|
|
35
|
+
4. Commit your work
|
|
36
|
+
5. Self-review (see below)
|
|
37
|
+
6. Report back
|
|
38
|
+
|
|
39
|
+
Work from: [directory]
|
|
40
|
+
|
|
41
|
+
**While you work:** If you encounter something unexpected or unclear, **ask questions**.
|
|
42
|
+
It's always OK to pause and clarify. Don't guess or make assumptions.
|
|
43
|
+
|
|
44
|
+
## Code Organization
|
|
45
|
+
|
|
46
|
+
You reason best about code you can hold in context at once, and your edits are more
|
|
47
|
+
reliable when files are focused. Keep this in mind:
|
|
48
|
+
- Follow the file structure defined in the plan
|
|
49
|
+
- Each file should have one clear responsibility with a well-defined interface
|
|
50
|
+
- If a file you're creating is growing beyond the plan's intent, stop and report
|
|
51
|
+
it as DONE_WITH_CONCERNS -- don't split files on your own without plan guidance
|
|
52
|
+
- If an existing file you're modifying is already large or tangled, work carefully
|
|
53
|
+
and note it as a concern in your report
|
|
54
|
+
- In existing codebases, follow established patterns. Improve code you're touching
|
|
55
|
+
the way a good developer would, but don't restructure things outside your task.
|
|
56
|
+
|
|
57
|
+
## When You're in Over Your Head
|
|
58
|
+
|
|
59
|
+
It is always OK to stop and say "this is too hard for me." Bad work is worse than
|
|
60
|
+
no work. You will not be penalized for escalating.
|
|
61
|
+
|
|
62
|
+
**STOP and escalate when:**
|
|
63
|
+
- The task requires architectural decisions with multiple valid approaches
|
|
64
|
+
- You need to understand code beyond what was provided and can't find clarity
|
|
65
|
+
- You feel uncertain about whether your approach is correct
|
|
66
|
+
- The task involves restructuring existing code in ways the plan didn't anticipate
|
|
67
|
+
- You've been reading file after file trying to understand the system without progress
|
|
68
|
+
|
|
69
|
+
**How to escalate:** Report back with status BLOCKED or NEEDS_CONTEXT. Describe
|
|
70
|
+
specifically what you're stuck on, what you've tried, and what kind of help you need.
|
|
71
|
+
The controller can provide more context, re-dispatch with a more capable model,
|
|
72
|
+
or break the task into smaller pieces.
|
|
73
|
+
|
|
74
|
+
## Before Reporting Back: Self-Review
|
|
75
|
+
|
|
76
|
+
Review your work with fresh eyes. Ask yourself:
|
|
77
|
+
|
|
78
|
+
**Completeness:**
|
|
79
|
+
- Did I fully implement everything in the spec?
|
|
80
|
+
- Did I miss any requirements?
|
|
81
|
+
- Are there edge cases I didn't handle?
|
|
82
|
+
|
|
83
|
+
**Quality:**
|
|
84
|
+
- Is this my best work?
|
|
85
|
+
- Are names clear and accurate (match what things do, not how they work)?
|
|
86
|
+
- Is the code clean and maintainable?
|
|
87
|
+
|
|
88
|
+
**Discipline:**
|
|
89
|
+
- Did I avoid overbuilding (YAGNI)?
|
|
90
|
+
- Did I only build what was requested?
|
|
91
|
+
- Did I follow existing patterns in the codebase?
|
|
92
|
+
|
|
93
|
+
**Testing:**
|
|
94
|
+
- Do tests actually verify behavior (not just mock behavior)?
|
|
95
|
+
- Did I follow TDD if required?
|
|
96
|
+
- Are tests comprehensive?
|
|
97
|
+
|
|
98
|
+
If you find issues during self-review, fix them now before reporting.
|
|
99
|
+
|
|
100
|
+
## Report Format
|
|
101
|
+
|
|
102
|
+
When done, report:
|
|
103
|
+
- **Status:** DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
|
|
104
|
+
- What you implemented (or what you attempted, if blocked)
|
|
105
|
+
- What you tested and test results
|
|
106
|
+
- Files changed
|
|
107
|
+
- Self-review findings (if any)
|
|
108
|
+
- Any issues or concerns
|
|
109
|
+
|
|
110
|
+
Use DONE_WITH_CONCERNS if you completed the work but have doubts about correctness.
|
|
111
|
+
Use BLOCKED if you cannot complete the task. Use NEEDS_CONTEXT if you need
|
|
112
|
+
information that wasn't provided. Never silently produce work you're unsure about.
|
|
113
|
+
```
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
# Spec Compliance Reviewer Prompt Template
|
|
2
|
-
|
|
3
|
-
Use this template when dispatching a spec compliance reviewer subagent.
|
|
4
|
-
|
|
5
|
-
**Purpose:** Verify implementer built what was requested (nothing more, nothing less)
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Task tool (general-purpose):
|
|
9
|
-
description: "Review spec compliance for Task N"
|
|
10
|
-
prompt: |
|
|
11
|
-
You are reviewing whether an implementation matches its specification.
|
|
12
|
-
|
|
13
|
-
## What Was Requested
|
|
14
|
-
|
|
15
|
-
[FULL TEXT of task requirements]
|
|
16
|
-
|
|
17
|
-
## What Implementer Claims They Built
|
|
18
|
-
|
|
19
|
-
[From implementer's report]
|
|
20
|
-
|
|
21
|
-
## CRITICAL: Do Not Trust the Report
|
|
22
|
-
|
|
23
|
-
The implementer finished suspiciously quickly. Their report may be incomplete,
|
|
24
|
-
inaccurate, or optimistic. You MUST verify everything independently.
|
|
25
|
-
|
|
26
|
-
**DO NOT:**
|
|
27
|
-
- Take their word for what they implemented
|
|
28
|
-
- Trust their claims about completeness
|
|
29
|
-
- Accept their interpretation of requirements
|
|
30
|
-
|
|
31
|
-
**DO:**
|
|
32
|
-
- Read the actual code they wrote
|
|
33
|
-
- Compare actual implementation to requirements line by line
|
|
34
|
-
- Check for missing pieces they claimed to implement
|
|
35
|
-
- Look for extra features they didn't mention
|
|
36
|
-
|
|
37
|
-
## Your Job
|
|
38
|
-
|
|
39
|
-
Read the implementation code and verify:
|
|
40
|
-
|
|
41
|
-
**Missing requirements:**
|
|
42
|
-
- Did they implement everything that was requested?
|
|
43
|
-
- Are there requirements they skipped or missed?
|
|
44
|
-
- Did they claim something works but didn't actually implement it?
|
|
45
|
-
|
|
46
|
-
**Extra/unneeded work:**
|
|
47
|
-
- Did they build things that weren't requested?
|
|
48
|
-
- Did they over-engineer or add unnecessary features?
|
|
49
|
-
- Did they add "nice to haves" that weren't in spec?
|
|
50
|
-
|
|
51
|
-
**Misunderstandings:**
|
|
52
|
-
- Did they interpret requirements differently than intended?
|
|
53
|
-
- Did they solve the wrong problem?
|
|
54
|
-
- Did they implement the right feature but wrong way?
|
|
55
|
-
|
|
56
|
-
**Verify by reading code, not by trusting report.**
|
|
57
|
-
|
|
58
|
-
Report:
|
|
59
|
-
- Spec compliant (if everything matches after code inspection)
|
|
60
|
-
- Issues found: [list specifically what's missing or extra, with file:line references]
|
|
61
|
-
```
|
|
1
|
+
# Spec Compliance Reviewer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching a spec compliance reviewer subagent.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Verify implementer built what was requested (nothing more, nothing less)
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Task tool (general-purpose):
|
|
9
|
+
description: "Review spec compliance for Task N"
|
|
10
|
+
prompt: |
|
|
11
|
+
You are reviewing whether an implementation matches its specification.
|
|
12
|
+
|
|
13
|
+
## What Was Requested
|
|
14
|
+
|
|
15
|
+
[FULL TEXT of task requirements]
|
|
16
|
+
|
|
17
|
+
## What Implementer Claims They Built
|
|
18
|
+
|
|
19
|
+
[From implementer's report]
|
|
20
|
+
|
|
21
|
+
## CRITICAL: Do Not Trust the Report
|
|
22
|
+
|
|
23
|
+
The implementer finished suspiciously quickly. Their report may be incomplete,
|
|
24
|
+
inaccurate, or optimistic. You MUST verify everything independently.
|
|
25
|
+
|
|
26
|
+
**DO NOT:**
|
|
27
|
+
- Take their word for what they implemented
|
|
28
|
+
- Trust their claims about completeness
|
|
29
|
+
- Accept their interpretation of requirements
|
|
30
|
+
|
|
31
|
+
**DO:**
|
|
32
|
+
- Read the actual code they wrote
|
|
33
|
+
- Compare actual implementation to requirements line by line
|
|
34
|
+
- Check for missing pieces they claimed to implement
|
|
35
|
+
- Look for extra features they didn't mention
|
|
36
|
+
|
|
37
|
+
## Your Job
|
|
38
|
+
|
|
39
|
+
Read the implementation code and verify:
|
|
40
|
+
|
|
41
|
+
**Missing requirements:**
|
|
42
|
+
- Did they implement everything that was requested?
|
|
43
|
+
- Are there requirements they skipped or missed?
|
|
44
|
+
- Did they claim something works but didn't actually implement it?
|
|
45
|
+
|
|
46
|
+
**Extra/unneeded work:**
|
|
47
|
+
- Did they build things that weren't requested?
|
|
48
|
+
- Did they over-engineer or add unnecessary features?
|
|
49
|
+
- Did they add "nice to haves" that weren't in spec?
|
|
50
|
+
|
|
51
|
+
**Misunderstandings:**
|
|
52
|
+
- Did they interpret requirements differently than intended?
|
|
53
|
+
- Did they solve the wrong problem?
|
|
54
|
+
- Did they implement the right feature but wrong way?
|
|
55
|
+
|
|
56
|
+
**Verify by reading code, not by trusting report.**
|
|
57
|
+
|
|
58
|
+
Report:
|
|
59
|
+
- Spec compliant (if everything matches after code inspection)
|
|
60
|
+
- Issues found: [list specifically what's missing or extra, with file:line references]
|
|
61
|
+
```
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-plan
|
|
3
|
-
description: Implementation planning. Use when you have requirements or a spec and need to create a step-by-step implementation plan before writing code.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Code Plan
|
|
7
|
-
|
|
8
|
-
## Critical Constraints
|
|
9
|
-
- I do not start code execution until the implementation plan has explicit task order, verification steps, and dependency boundaries.
|
|
10
|
-
- I do not leave assumptions implicit; every unverified assumption must be logged with risk.
|
|
11
|
-
|
|
12
|
-
## Overview
|
|
13
|
-
Turn approved requirements into an execution-ready implementation plan.
|
|
14
|
-
|
|
15
|
-
The plan must be small enough to execute safely, detailed enough to review, and explicit about verification.
|
|
16
|
-
|
|
17
|
-
## Process
|
|
18
|
-
1. Read the approved requirements, existing code, and any architecture or API references that define scope.
|
|
19
|
-
2. Challenge scope before planning:
|
|
20
|
-
- What already exists that partially solves this?
|
|
21
|
-
- What is the minimum viable change?
|
|
22
|
-
- Is the requested change too large for one plan?
|
|
23
|
-
3. Break the work into numbered tasks with a clear dependency order.
|
|
24
|
-
4. For each task, record:
|
|
25
|
-
- purpose
|
|
26
|
-
- files or modules likely to change
|
|
27
|
-
- verification command or evidence expected
|
|
28
|
-
- likely rollback or containment strategy if the task fails
|
|
29
|
-
5. Review the plan against four execution paths for the critical flow:
|
|
30
|
-
- happy path
|
|
31
|
-
- nil or missing-input path
|
|
32
|
-
- empty or no-op path
|
|
33
|
-
- error or failure path
|
|
34
|
-
6. Add architecture review notes for:
|
|
35
|
-
- data flow boundaries
|
|
36
|
-
- state transitions
|
|
37
|
-
- dependency graph risks
|
|
38
|
-
- performance hotspots such as N+1, unbounded memory, missing indexes, and duplicate work
|
|
39
|
-
- observability coverage
|
|
40
|
-
7. For any task with external side effects, add observable state notes:
|
|
41
|
-
- Customer sees:
|
|
42
|
-
- Operator sees:
|
|
43
|
-
- Database:
|
|
44
|
-
- Logs:
|
|
45
|
-
8. Record assumptions in this exact table format:
|
|
46
|
-
|
|
47
|
-
| # | Assumption | Verified | Risk if wrong |
|
|
48
|
-
|---|---|---|---|
|
|
49
|
-
| A1 | Example assumption | No | Medium |
|
|
50
|
-
|
|
51
|
-
9. End the plan with a verification checklist that the implementer can execute without guesswork.
|
|
52
|
-
10. Ask for approval before handing the plan to `code-execute` or `code-parallel`.
|
|
53
|
-
|
|
54
|
-
## Required Plan Shape
|
|
55
|
-
A good SDTK-CODE implementation plan includes:
|
|
56
|
-
- scope summary
|
|
57
|
-
- task list in execution order
|
|
58
|
-
- dependency notes
|
|
59
|
-
- verification command per task or task group
|
|
60
|
-
- open questions
|
|
61
|
-
- assumptions table
|
|
62
|
-
- observability notes for non-trivial flows
|
|
63
|
-
- "not in scope" list for deferred work
|
|
64
|
-
|
|
65
|
-
## Architecture Review Lens
|
|
66
|
-
Before approving the plan, check:
|
|
67
|
-
- Data flow: where does data enter, transform, persist, and exit?
|
|
68
|
-
- Boundaries: which module owns each responsibility?
|
|
69
|
-
- Nil/empty/error/happy: is every important path covered?
|
|
70
|
-
- Performance: where could this create N+1, redundant fetches, large payloads, or slow startup?
|
|
71
|
-
- Observability: if this fails in production, what would the operator actually see?
|
|
72
|
-
|
|
73
|
-
## Red Flags
|
|
74
|
-
- Plan says "implement feature" without task decomposition.
|
|
75
|
-
- Verification is only "run tests" with no task-level proof.
|
|
76
|
-
- Assumptions are left in prose instead of the assumptions table.
|
|
77
|
-
- The plan introduces extra abstractions without explaining why.
|
|
78
|
-
- The plan does not say what is explicitly out of scope.
|
|
79
|
-
|
|
80
|
-
## Output Contract
|
|
81
|
-
Return a plan that an implementer can follow without reconstructing missing context.
|
|
82
|
-
|
|
83
|
-
When the plan is approved, the next skill is:
|
|
84
|
-
- `code-execute` for sequential execution
|
|
85
|
-
- `code-parallel` for independent tasks that can be safely fanned out
|
|
1
|
+
---
|
|
2
|
+
name: code-plan
|
|
3
|
+
description: Implementation planning. Use when you have requirements or a spec and need to create a step-by-step implementation plan before writing code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Plan
|
|
7
|
+
|
|
8
|
+
## Critical Constraints
|
|
9
|
+
- I do not start code execution until the implementation plan has explicit task order, verification steps, and dependency boundaries.
|
|
10
|
+
- I do not leave assumptions implicit; every unverified assumption must be logged with risk.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
Turn approved requirements into an execution-ready implementation plan.
|
|
14
|
+
|
|
15
|
+
The plan must be small enough to execute safely, detailed enough to review, and explicit about verification.
|
|
16
|
+
|
|
17
|
+
## Process
|
|
18
|
+
1. Read the approved requirements, existing code, and any architecture or API references that define scope.
|
|
19
|
+
2. Challenge scope before planning:
|
|
20
|
+
- What already exists that partially solves this?
|
|
21
|
+
- What is the minimum viable change?
|
|
22
|
+
- Is the requested change too large for one plan?
|
|
23
|
+
3. Break the work into numbered tasks with a clear dependency order.
|
|
24
|
+
4. For each task, record:
|
|
25
|
+
- purpose
|
|
26
|
+
- files or modules likely to change
|
|
27
|
+
- verification command or evidence expected
|
|
28
|
+
- likely rollback or containment strategy if the task fails
|
|
29
|
+
5. Review the plan against four execution paths for the critical flow:
|
|
30
|
+
- happy path
|
|
31
|
+
- nil or missing-input path
|
|
32
|
+
- empty or no-op path
|
|
33
|
+
- error or failure path
|
|
34
|
+
6. Add architecture review notes for:
|
|
35
|
+
- data flow boundaries
|
|
36
|
+
- state transitions
|
|
37
|
+
- dependency graph risks
|
|
38
|
+
- performance hotspots such as N+1, unbounded memory, missing indexes, and duplicate work
|
|
39
|
+
- observability coverage
|
|
40
|
+
7. For any task with external side effects, add observable state notes:
|
|
41
|
+
- Customer sees:
|
|
42
|
+
- Operator sees:
|
|
43
|
+
- Database:
|
|
44
|
+
- Logs:
|
|
45
|
+
8. Record assumptions in this exact table format:
|
|
46
|
+
|
|
47
|
+
| # | Assumption | Verified | Risk if wrong |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| A1 | Example assumption | No | Medium |
|
|
50
|
+
|
|
51
|
+
9. End the plan with a verification checklist that the implementer can execute without guesswork.
|
|
52
|
+
10. Ask for approval before handing the plan to `code-execute` or `code-parallel`.
|
|
53
|
+
|
|
54
|
+
## Required Plan Shape
|
|
55
|
+
A good SDTK-CODE implementation plan includes:
|
|
56
|
+
- scope summary
|
|
57
|
+
- task list in execution order
|
|
58
|
+
- dependency notes
|
|
59
|
+
- verification command per task or task group
|
|
60
|
+
- open questions
|
|
61
|
+
- assumptions table
|
|
62
|
+
- observability notes for non-trivial flows
|
|
63
|
+
- "not in scope" list for deferred work
|
|
64
|
+
|
|
65
|
+
## Architecture Review Lens
|
|
66
|
+
Before approving the plan, check:
|
|
67
|
+
- Data flow: where does data enter, transform, persist, and exit?
|
|
68
|
+
- Boundaries: which module owns each responsibility?
|
|
69
|
+
- Nil/empty/error/happy: is every important path covered?
|
|
70
|
+
- Performance: where could this create N+1, redundant fetches, large payloads, or slow startup?
|
|
71
|
+
- Observability: if this fails in production, what would the operator actually see?
|
|
72
|
+
|
|
73
|
+
## Red Flags
|
|
74
|
+
- Plan says "implement feature" without task decomposition.
|
|
75
|
+
- Verification is only "run tests" with no task-level proof.
|
|
76
|
+
- Assumptions are left in prose instead of the assumptions table.
|
|
77
|
+
- The plan introduces extra abstractions without explaining why.
|
|
78
|
+
- The plan does not say what is explicitly out of scope.
|
|
79
|
+
|
|
80
|
+
## Output Contract
|
|
81
|
+
Return a plan that an implementer can follow without reconstructing missing context.
|
|
82
|
+
|
|
83
|
+
When the plan is approved, the next skill is:
|
|
84
|
+
- `code-execute` for sequential execution
|
|
85
|
+
- `code-parallel` for independent tasks that can be safely fanned out
|