sdtk-code-kit 0.1.0
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 +138 -0
- package/assets/manifest/toolkit-bundle.manifest.json +147 -0
- package/assets/manifest/toolkit-bundle.sha256.txt +28 -0
- package/assets/toolkit/toolkit/AGENTS.md +210 -0
- package/assets/toolkit/toolkit/install.ps1 +126 -0
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +78 -0
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +127 -0
- package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +62 -0
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +53 -0
- package/assets/toolkit/toolkit/sdtk-spec.config.json +6 -0
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +12 -0
- package/assets/toolkit/toolkit/skills/code-brainstorm/SKILL.md +56 -0
- package/assets/toolkit/toolkit/skills/code-debug/SKILL.md +297 -0
- package/assets/toolkit/toolkit/skills/code-debug/references/root-cause-tracing.md +69 -0
- package/assets/toolkit/toolkit/skills/code-discover/SKILL.md +54 -0
- package/assets/toolkit/toolkit/skills/code-execute/SKILL.md +75 -0
- package/assets/toolkit/toolkit/skills/code-finish/SKILL.md +206 -0
- package/assets/toolkit/toolkit/skills/code-parallel/SKILL.md +65 -0
- package/assets/toolkit/toolkit/skills/code-parallel/references/code-quality-reviewer-prompt.md +27 -0
- package/assets/toolkit/toolkit/skills/code-parallel/references/implementer-prompt.md +114 -0
- package/assets/toolkit/toolkit/skills/code-parallel/references/spec-reviewer-prompt.md +62 -0
- package/assets/toolkit/toolkit/skills/code-plan/SKILL.md +86 -0
- package/assets/toolkit/toolkit/skills/code-review/SKILL.md +80 -0
- package/assets/toolkit/toolkit/skills/code-review/references/checklist.md +126 -0
- package/assets/toolkit/toolkit/skills/code-review/references/code-reviewer.md +147 -0
- package/assets/toolkit/toolkit/skills/code-ship/SKILL.md +53 -0
- package/assets/toolkit/toolkit/skills/code-tdd/SKILL.md +379 -0
- package/assets/toolkit/toolkit/skills/code-tdd/references/testing-anti-patterns.md +300 -0
- package/assets/toolkit/toolkit/skills/code-verify/SKILL.md +145 -0
- package/assets/toolkit/toolkit/skills/code-worktree/SKILL.md +229 -0
- package/assets/toolkit/toolkit/templates/CODE_WORKFLOW_TEMPLATE.md +112 -0
- package/bin/sdtk-code.js +14 -0
- package/package.json +44 -0
- package/src/commands/build.js +53 -0
- package/src/commands/generate.js +11 -0
- package/src/commands/help.js +169 -0
- package/src/commands/init.js +86 -0
- package/src/commands/plan.js +52 -0
- package/src/commands/runtime.js +205 -0
- package/src/commands/ship.js +54 -0
- package/src/commands/start.js +89 -0
- package/src/commands/verify.js +57 -0
- package/src/index.js +70 -0
- package/src/lib/args.js +107 -0
- package/src/lib/errors.js +41 -0
- package/src/lib/powershell.js +65 -0
- package/src/lib/scope.js +55 -0
- package/src/lib/toolkit-payload.js +72 -0
- package/src/lib/workflow-artifact.js +453 -0
- package/src/lib/workflow-build.js +127 -0
- package/src/lib/workflow-handoff.js +427 -0
- package/src/lib/workflow-intake.js +100 -0
- package/src/lib/workflow-plan.js +96 -0
- package/src/lib/workflow-ship.js +163 -0
- package/src/lib/workflow-verify.js +212 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<!-- Based on superpowers by Jesse Vincent (MIT License, 2025), gstack by Garry Tan (MIT License, 2026), and agency-agents by AgentLand Contributors (MIT License, 2025). Adapted for SDTK-CODE. See ../../THIRD_PARTY_NOTICES.md for details. -->
|
|
2
|
+
---
|
|
3
|
+
name: code-plan
|
|
4
|
+
description: Implementation planning. Use when you have requirements or a spec and need to create a step-by-step implementation plan before writing code.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Plan
|
|
8
|
+
|
|
9
|
+
## Critical Constraints
|
|
10
|
+
- I do not start code execution until the implementation plan has explicit task order, verification steps, and dependency boundaries.
|
|
11
|
+
- I do not leave assumptions implicit; every unverified assumption must be logged with risk.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
Turn approved requirements into an execution-ready implementation plan.
|
|
15
|
+
|
|
16
|
+
The plan must be small enough to execute safely, detailed enough to review, and explicit about verification.
|
|
17
|
+
|
|
18
|
+
## Process
|
|
19
|
+
1. Read the approved requirements, existing code, and any architecture or API references that define scope.
|
|
20
|
+
2. Challenge scope before planning:
|
|
21
|
+
- What already exists that partially solves this?
|
|
22
|
+
- What is the minimum viable change?
|
|
23
|
+
- Is the requested change too large for one plan?
|
|
24
|
+
3. Break the work into numbered tasks with a clear dependency order.
|
|
25
|
+
4. For each task, record:
|
|
26
|
+
- purpose
|
|
27
|
+
- files or modules likely to change
|
|
28
|
+
- verification command or evidence expected
|
|
29
|
+
- likely rollback or containment strategy if the task fails
|
|
30
|
+
5. Review the plan against four execution paths for the critical flow:
|
|
31
|
+
- happy path
|
|
32
|
+
- nil or missing-input path
|
|
33
|
+
- empty or no-op path
|
|
34
|
+
- error or failure path
|
|
35
|
+
6. Add architecture review notes for:
|
|
36
|
+
- data flow boundaries
|
|
37
|
+
- state transitions
|
|
38
|
+
- dependency graph risks
|
|
39
|
+
- performance hotspots such as N+1, unbounded memory, missing indexes, and duplicate work
|
|
40
|
+
- observability coverage
|
|
41
|
+
7. For any task with external side effects, add observable state notes:
|
|
42
|
+
- Customer sees:
|
|
43
|
+
- Operator sees:
|
|
44
|
+
- Database:
|
|
45
|
+
- Logs:
|
|
46
|
+
8. Record assumptions in this exact table format:
|
|
47
|
+
|
|
48
|
+
| # | Assumption | Verified | Risk if wrong |
|
|
49
|
+
|---|---|---|---|
|
|
50
|
+
| A1 | Example assumption | No | Medium |
|
|
51
|
+
|
|
52
|
+
9. End the plan with a verification checklist that the implementer can execute without guesswork.
|
|
53
|
+
10. Ask for approval before handing the plan to `code-execute` or `code-parallel`.
|
|
54
|
+
|
|
55
|
+
## Required Plan Shape
|
|
56
|
+
A good SDTK-CODE implementation plan includes:
|
|
57
|
+
- scope summary
|
|
58
|
+
- task list in execution order
|
|
59
|
+
- dependency notes
|
|
60
|
+
- verification command per task or task group
|
|
61
|
+
- open questions
|
|
62
|
+
- assumptions table
|
|
63
|
+
- observability notes for non-trivial flows
|
|
64
|
+
- "not in scope" list for deferred work
|
|
65
|
+
|
|
66
|
+
## Architecture Review Lens
|
|
67
|
+
Before approving the plan, check:
|
|
68
|
+
- Data flow: where does data enter, transform, persist, and exit?
|
|
69
|
+
- Boundaries: which module owns each responsibility?
|
|
70
|
+
- Nil/empty/error/happy: is every important path covered?
|
|
71
|
+
- Performance: where could this create N+1, redundant fetches, large payloads, or slow startup?
|
|
72
|
+
- Observability: if this fails in production, what would the operator actually see?
|
|
73
|
+
|
|
74
|
+
## Red Flags
|
|
75
|
+
- Plan says "implement feature" without task decomposition.
|
|
76
|
+
- Verification is only "run tests" with no task-level proof.
|
|
77
|
+
- Assumptions are left in prose instead of the assumptions table.
|
|
78
|
+
- The plan introduces extra abstractions without explaining why.
|
|
79
|
+
- The plan does not say what is explicitly out of scope.
|
|
80
|
+
|
|
81
|
+
## Output Contract
|
|
82
|
+
Return a plan that an implementer can follow without reconstructing missing context.
|
|
83
|
+
|
|
84
|
+
When the plan is approved, the next skill is:
|
|
85
|
+
- `code-execute` for sequential execution
|
|
86
|
+
- `code-parallel` for independent tasks that can be safely fanned out
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!-- Based on superpowers by Jesse Vincent (MIT License, 2025) and gstack by Garry Tan (MIT License, 2026). Adapted for SDTK-CODE. See ../../THIRD_PARTY_NOTICES.md for details. -->
|
|
2
|
+
---
|
|
3
|
+
name: code-review
|
|
4
|
+
description: Code review -- requesting and receiving. Use when completing a feature, before merging, or when receiving review feedback.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Review
|
|
8
|
+
|
|
9
|
+
## Critical Constraints
|
|
10
|
+
- I do not treat style feedback as a substitute for requirement or spec compliance.
|
|
11
|
+
- I do not ship code while critical review issues remain unresolved.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
Run review in two stages:
|
|
15
|
+
1. Spec compliance review
|
|
16
|
+
2. Code quality review
|
|
17
|
+
|
|
18
|
+
Use this skill both when requesting review and when responding to review feedback.
|
|
19
|
+
|
|
20
|
+
## Process
|
|
21
|
+
### Stage 1: Requesting Review
|
|
22
|
+
1. Identify the exact scope being reviewed.
|
|
23
|
+
2. Gather the requirement or plan reference, the files changed, and the verification evidence already collected.
|
|
24
|
+
3. Start with spec compliance:
|
|
25
|
+
- confirm the code matches the requested behavior
|
|
26
|
+
- confirm there is no silent scope creep
|
|
27
|
+
- confirm required tests or verification exist
|
|
28
|
+
4. Only after Stage 1 passes, run code quality review.
|
|
29
|
+
5. For code quality review, use the checklist at `./references/checklist.md` and the reviewer prompt at `./references/code-reviewer.md` when delegated review is appropriate.
|
|
30
|
+
|
|
31
|
+
### Stage 2: Receiving Review
|
|
32
|
+
1. Read the review comments carefully.
|
|
33
|
+
2. Classify each item:
|
|
34
|
+
- critical: blocks merge or release
|
|
35
|
+
- important: should fix before handoff
|
|
36
|
+
- minor: worth fixing if low risk
|
|
37
|
+
3. Verify the review comment against the code before changing anything.
|
|
38
|
+
4. Fix valid issues with the smallest coherent diff.
|
|
39
|
+
5. Re-run verification after fixes.
|
|
40
|
+
6. If a review comment is incorrect, push back with technical evidence.
|
|
41
|
+
|
|
42
|
+
### Stage 3: Pre-Landing Checklist
|
|
43
|
+
Always run a final pass on:
|
|
44
|
+
- SQL and data safety
|
|
45
|
+
- race conditions and concurrency
|
|
46
|
+
- LLM trust boundary or unsafe generated input handling
|
|
47
|
+
- conditional side effects
|
|
48
|
+
- magic numbers or string coupling
|
|
49
|
+
- dead code and stale comments
|
|
50
|
+
- prompt or instruction drift
|
|
51
|
+
- test gaps
|
|
52
|
+
- crypto and entropy issues
|
|
53
|
+
- time-window assumptions
|
|
54
|
+
- type coercion at boundaries
|
|
55
|
+
- view or frontend performance traps
|
|
56
|
+
|
|
57
|
+
Use `./references/checklist.md` as the canonical checklist.
|
|
58
|
+
|
|
59
|
+
## Review Output Format
|
|
60
|
+
- Strengths
|
|
61
|
+
- Critical issues
|
|
62
|
+
- Important issues
|
|
63
|
+
- Minor issues
|
|
64
|
+
- Assessment: ready / ready with fixes / not ready
|
|
65
|
+
|
|
66
|
+
Each issue should include:
|
|
67
|
+
- file reference
|
|
68
|
+
- what is wrong
|
|
69
|
+
- why it matters
|
|
70
|
+
- how to fix it
|
|
71
|
+
|
|
72
|
+
## Red Flags
|
|
73
|
+
- Requesting code-quality review before verifying the code matches the spec.
|
|
74
|
+
- Accepting review comments without checking the actual code.
|
|
75
|
+
- Ignoring a critical issue because tests happen to pass.
|
|
76
|
+
- Turning review into an unbounded refactor request.
|
|
77
|
+
|
|
78
|
+
## Integration
|
|
79
|
+
- Use after `code-execute` or `code-parallel` finishes an implementation slice.
|
|
80
|
+
- `code-ship` depends on this review gate being complete.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<!-- Based on gstack by Garry Tan (MIT License, 2026). Adapted for SDTK-CODE. See ../../../THIRD_PARTY_NOTICES.md for details. -->
|
|
2
|
+
# Pre-Landing Review Checklist
|
|
3
|
+
|
|
4
|
+
## Instructions
|
|
5
|
+
|
|
6
|
+
Review the `git diff origin/main` output for the issues listed below. Be specific -- cite `file:line` and suggest fixes. Skip anything that's fine. Only flag real problems.
|
|
7
|
+
|
|
8
|
+
**Two-pass review:**
|
|
9
|
+
- **Pass 1 (CRITICAL):** Run SQL & Data Safety and LLM Output Trust Boundary first. These can block `/ship`.
|
|
10
|
+
- **Pass 2 (INFORMATIONAL):** Run all remaining categories. These are included in the PR body but do not block.
|
|
11
|
+
|
|
12
|
+
**Output format:**
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Pre-Landing Review: N issues (X critical, Y informational)
|
|
16
|
+
|
|
17
|
+
**CRITICAL** (blocking /ship):
|
|
18
|
+
- [file:line] Problem description
|
|
19
|
+
Fix: suggested fix
|
|
20
|
+
|
|
21
|
+
**Issues** (non-blocking):
|
|
22
|
+
- [file:line] Problem description
|
|
23
|
+
Fix: suggested fix
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If no issues found: `Pre-Landing Review: No issues found.`
|
|
27
|
+
|
|
28
|
+
Be terse. For each issue: one line describing the problem, one line with the fix. No preamble, no summaries, no "looks good overall."
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Review Categories
|
|
33
|
+
|
|
34
|
+
### Pass 1 -- CRITICAL
|
|
35
|
+
|
|
36
|
+
#### SQL & Data Safety
|
|
37
|
+
- String interpolation in SQL (even if values are `.to_i`/`.to_f` -- use `sanitize_sql_array` or Arel)
|
|
38
|
+
- TOCTOU races: check-then-set patterns that should be atomic `WHERE` + `update_all`
|
|
39
|
+
- `update_column`/`update_columns` bypassing validations on fields that have or should have constraints
|
|
40
|
+
- N+1 queries: `.includes()` missing for associations used in loops/views (especially avatar, attachments)
|
|
41
|
+
|
|
42
|
+
#### Race Conditions & Concurrency
|
|
43
|
+
- Read-check-write without uniqueness constraint or `rescue RecordNotUnique; retry` (e.g., `where(hash:).first` then `save!` without handling concurrent insert)
|
|
44
|
+
- `find_or_create_by` on columns without unique DB index -- concurrent calls can create duplicates
|
|
45
|
+
- Status transitions that don't use atomic `WHERE old_status = ? UPDATE SET new_status` -- concurrent updates can skip or double-apply transitions
|
|
46
|
+
- `html_safe` on user-controlled data (XSS) -- check any `.html_safe`, `raw()`, or string interpolation into `html_safe` output
|
|
47
|
+
|
|
48
|
+
#### LLM Output Trust Boundary
|
|
49
|
+
- LLM-generated values (emails, URLs, names) written to DB or passed to mailers without format validation. Add lightweight guards (`EMAIL_REGEXP`, `URI.parse`, `.strip`) before persisting.
|
|
50
|
+
- Structured tool output (arrays, hashes) accepted without type/shape checks before database writes.
|
|
51
|
+
|
|
52
|
+
### Pass 2 -- INFORMATIONAL
|
|
53
|
+
|
|
54
|
+
#### Conditional Side Effects
|
|
55
|
+
- Code paths that branch on a condition but forget to apply a side effect on one branch. Example: item promoted to verified but URL only attached when a secondary condition is true -- the other branch promotes without the URL, creating an inconsistent record.
|
|
56
|
+
- Log messages that claim an action happened but the action was conditionally skipped. The log should reflect what actually occurred.
|
|
57
|
+
|
|
58
|
+
#### Magic Numbers & String Coupling
|
|
59
|
+
- Bare numeric literals used in multiple files -- should be named constants documented together
|
|
60
|
+
- Error message strings used as query filters elsewhere (grep for the string -- is anything matching on it?)
|
|
61
|
+
|
|
62
|
+
#### Dead Code & Consistency
|
|
63
|
+
- Variables assigned but never read
|
|
64
|
+
- Version mismatch between PR title and VERSION/CHANGELOG files
|
|
65
|
+
- CHANGELOG entries that describe changes inaccurately (e.g., "changed from X to Y" when X never existed)
|
|
66
|
+
- Comments/docstrings that describe old behavior after the code changed
|
|
67
|
+
|
|
68
|
+
#### LLM Prompt Issues
|
|
69
|
+
- 0-indexed lists in prompts (LLMs reliably return 1-indexed)
|
|
70
|
+
- Prompt text listing available tools/capabilities that don't match what's actually wired up in the `tool_classes`/`tools` array
|
|
71
|
+
- Word/token limits stated in multiple places that could drift
|
|
72
|
+
|
|
73
|
+
#### Test Gaps
|
|
74
|
+
- Negative-path tests that assert type/status but not the side effects (URL attached? field populated? callback fired?)
|
|
75
|
+
- Assertions on string content without checking format (e.g., asserting title present but not URL format)
|
|
76
|
+
- `.expects(:something).never` missing when a code path should explicitly NOT call an external service
|
|
77
|
+
- Security enforcement features (blocking, rate limiting, auth) without integration tests verifying the enforcement path works end-to-end
|
|
78
|
+
|
|
79
|
+
#### Crypto & Entropy
|
|
80
|
+
- Truncation of data instead of hashing (last N chars instead of SHA-256) -- less entropy, easier collisions
|
|
81
|
+
- `rand()` / `Random.rand` for security-sensitive values -- use `SecureRandom` instead
|
|
82
|
+
- Non-constant-time comparisons (`==`) on secrets or tokens -- vulnerable to timing attacks
|
|
83
|
+
|
|
84
|
+
#### Time Window Safety
|
|
85
|
+
- Date-key lookups that assume "today" covers 24h -- report at 8am PT only sees midnight->8am under today's key
|
|
86
|
+
- Mismatched time windows between related features -- one uses hourly buckets, another uses daily keys for the same data
|
|
87
|
+
|
|
88
|
+
#### Type Coercion at Boundaries
|
|
89
|
+
- Values crossing Ruby->JSON->JS boundaries where type could change (numeric vs string) -- hash/digest inputs must normalize types
|
|
90
|
+
- Hash/digest inputs that don't call `.to_s` or equivalent before serialization -- `{ cores: 8 }` vs `{ cores: "8" }` produce different hashes
|
|
91
|
+
|
|
92
|
+
#### View/Frontend
|
|
93
|
+
- Inline `<style>` blocks in partials (re-parsed every render)
|
|
94
|
+
- O(n*m) lookups in views (`Array#find` in a loop instead of `index_by` hash)
|
|
95
|
+
- Ruby-side `.select{}` filtering on DB results that could be a `WHERE` clause (unless intentionally avoiding leading-wildcard `LIKE`)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Gate Classification
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
CRITICAL (blocks /ship): INFORMATIONAL (in PR body):
|
|
103
|
+
SQL & Data Safety Conditional Side Effects
|
|
104
|
+
Race Conditions & Concurrency Magic Numbers & String Coupling
|
|
105
|
+
LLM Output Trust Boundary Dead Code & Consistency
|
|
106
|
+
LLM Prompt Issues
|
|
107
|
+
Test Gaps
|
|
108
|
+
Crypto & Entropy
|
|
109
|
+
Time Window Safety
|
|
110
|
+
Type Coercion at Boundaries
|
|
111
|
+
View/Frontend
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Suppressions -- DO NOT flag these
|
|
117
|
+
|
|
118
|
+
- "X is redundant with Y" when the redundancy is harmless and aids readability (e.g., `present?` redundant with `length > 20`)
|
|
119
|
+
- "Add a comment explaining why this threshold/constant was chosen" -- thresholds change during tuning, comments rot
|
|
120
|
+
- "This assertion could be tighter" when the assertion already covers the behavior
|
|
121
|
+
- Suggesting consistency-only changes (wrapping a value in a conditional to match how another constant is guarded)
|
|
122
|
+
- "Regex doesn't handle edge case X" when the input is constrained and X never occurs in practice
|
|
123
|
+
- "Test exercises multiple guards simultaneously" -- that's fine, tests don't need to isolate every guard
|
|
124
|
+
- Eval threshold changes (max_actionable, min scores) -- these are tuned empirically and change constantly
|
|
125
|
+
- Harmless no-ops (e.g., `.reject` on an element that's never in the array)
|
|
126
|
+
- ANYTHING already addressed in the diff you're reviewing -- read the FULL diff before commenting
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<!-- Based on superpowers by Jesse Vincent (MIT License, 2025). Adapted for SDTK-CODE. See ../../../THIRD_PARTY_NOTICES.md for details. -->
|
|
2
|
+
# Code Review Agent
|
|
3
|
+
|
|
4
|
+
You are reviewing code changes for production readiness.
|
|
5
|
+
|
|
6
|
+
**Your task:**
|
|
7
|
+
1. Review {WHAT_WAS_IMPLEMENTED}
|
|
8
|
+
2. Compare against {PLAN_OR_REQUIREMENTS}
|
|
9
|
+
3. Check code quality, architecture, testing
|
|
10
|
+
4. Categorize issues by severity
|
|
11
|
+
5. Assess production readiness
|
|
12
|
+
|
|
13
|
+
## What Was Implemented
|
|
14
|
+
|
|
15
|
+
{DESCRIPTION}
|
|
16
|
+
|
|
17
|
+
## Requirements/Plan
|
|
18
|
+
|
|
19
|
+
{PLAN_REFERENCE}
|
|
20
|
+
|
|
21
|
+
## Git Range to Review
|
|
22
|
+
|
|
23
|
+
**Base:** {BASE_SHA}
|
|
24
|
+
**Head:** {HEAD_SHA}
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git diff --stat {BASE_SHA}..{HEAD_SHA}
|
|
28
|
+
git diff {BASE_SHA}..{HEAD_SHA}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Review Checklist
|
|
32
|
+
|
|
33
|
+
**Code Quality:**
|
|
34
|
+
- Clean separation of concerns?
|
|
35
|
+
- Proper error handling?
|
|
36
|
+
- Type safety (if applicable)?
|
|
37
|
+
- DRY principle followed?
|
|
38
|
+
- Edge cases handled?
|
|
39
|
+
|
|
40
|
+
**Architecture:**
|
|
41
|
+
- Sound design decisions?
|
|
42
|
+
- Scalability considerations?
|
|
43
|
+
- Performance implications?
|
|
44
|
+
- Security concerns?
|
|
45
|
+
|
|
46
|
+
**Testing:**
|
|
47
|
+
- Tests actually test logic (not mocks)?
|
|
48
|
+
- Edge cases covered?
|
|
49
|
+
- Integration tests where needed?
|
|
50
|
+
- All tests passing?
|
|
51
|
+
|
|
52
|
+
**Requirements:**
|
|
53
|
+
- All plan requirements met?
|
|
54
|
+
- Implementation matches spec?
|
|
55
|
+
- No scope creep?
|
|
56
|
+
- Breaking changes documented?
|
|
57
|
+
|
|
58
|
+
**Production Readiness:**
|
|
59
|
+
- Migration strategy (if schema changes)?
|
|
60
|
+
- Backward compatibility considered?
|
|
61
|
+
- Documentation complete?
|
|
62
|
+
- No obvious bugs?
|
|
63
|
+
|
|
64
|
+
## Output Format
|
|
65
|
+
|
|
66
|
+
### Strengths
|
|
67
|
+
[What's well done? Be specific.]
|
|
68
|
+
|
|
69
|
+
### Issues
|
|
70
|
+
|
|
71
|
+
#### Critical (Must Fix)
|
|
72
|
+
[Bugs, security issues, data loss risks, broken functionality]
|
|
73
|
+
|
|
74
|
+
#### Important (Should Fix)
|
|
75
|
+
[Architecture problems, missing features, poor error handling, test gaps]
|
|
76
|
+
|
|
77
|
+
#### Minor (Nice to Have)
|
|
78
|
+
[Code style, optimization opportunities, documentation improvements]
|
|
79
|
+
|
|
80
|
+
**For each issue:**
|
|
81
|
+
- File:line reference
|
|
82
|
+
- What's wrong
|
|
83
|
+
- Why it matters
|
|
84
|
+
- How to fix (if not obvious)
|
|
85
|
+
|
|
86
|
+
### Recommendations
|
|
87
|
+
[Improvements for code quality, architecture, or process]
|
|
88
|
+
|
|
89
|
+
### Assessment
|
|
90
|
+
|
|
91
|
+
**Ready to merge?** [Yes/No/With fixes]
|
|
92
|
+
|
|
93
|
+
**Reasoning:** [Technical assessment in 1-2 sentences]
|
|
94
|
+
|
|
95
|
+
## Critical Rules
|
|
96
|
+
|
|
97
|
+
**DO:**
|
|
98
|
+
- Categorize by actual severity (not everything is Critical)
|
|
99
|
+
- Be specific (file:line, not vague)
|
|
100
|
+
- Explain WHY issues matter
|
|
101
|
+
- Acknowledge strengths
|
|
102
|
+
- Give clear verdict
|
|
103
|
+
|
|
104
|
+
**DON'T:**
|
|
105
|
+
- Say "looks good" without checking
|
|
106
|
+
- Mark nitpicks as Critical
|
|
107
|
+
- Give feedback on code you didn't review
|
|
108
|
+
- Be vague ("improve error handling")
|
|
109
|
+
- Avoid giving a clear verdict
|
|
110
|
+
|
|
111
|
+
## Example Output
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
### Strengths
|
|
115
|
+
- Clean database schema with proper migrations (db.ts:15-42)
|
|
116
|
+
- Comprehensive test coverage (18 tests, all edge cases)
|
|
117
|
+
- Good error handling with fallbacks (summarizer.ts:85-92)
|
|
118
|
+
|
|
119
|
+
### Issues
|
|
120
|
+
|
|
121
|
+
#### Important
|
|
122
|
+
1. **Missing help text in CLI wrapper**
|
|
123
|
+
- File: index-conversations:1-31
|
|
124
|
+
- Issue: No --help flag, users won't discover --concurrency
|
|
125
|
+
- Fix: Add --help case with usage examples
|
|
126
|
+
|
|
127
|
+
2. **Date validation missing**
|
|
128
|
+
- File: search.ts:25-27
|
|
129
|
+
- Issue: Invalid dates silently return no results
|
|
130
|
+
- Fix: Validate ISO format, throw error with example
|
|
131
|
+
|
|
132
|
+
#### Minor
|
|
133
|
+
1. **Progress indicators**
|
|
134
|
+
- File: indexer.ts:130
|
|
135
|
+
- Issue: No "X of Y" counter for long operations
|
|
136
|
+
- Impact: Users don't know how long to wait
|
|
137
|
+
|
|
138
|
+
### Recommendations
|
|
139
|
+
- Add progress reporting for user experience
|
|
140
|
+
- Consider config file for excluded projects (portability)
|
|
141
|
+
|
|
142
|
+
### Assessment
|
|
143
|
+
|
|
144
|
+
**Ready to merge: With fixes**
|
|
145
|
+
|
|
146
|
+
**Reasoning:** Core implementation is solid with good architecture and tests. Important issues (help text, date validation) are easily fixed and don't affect core functionality.
|
|
147
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- Based on gstack by Garry Tan (MIT License, 2026). Adapted for SDTK-CODE. See ../../THIRD_PARTY_NOTICES.md for details. -->
|
|
2
|
+
---
|
|
3
|
+
name: code-ship
|
|
4
|
+
description: Ship and release. Use when implementation is complete, tests pass, and you need to prepare for merge or release -- pre-flight checks, version bump, CHANGELOG, bisectable commits.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Code Ship
|
|
8
|
+
|
|
9
|
+
## Critical Constraints
|
|
10
|
+
- I do not start ship preparation until `code-verify` evidence and `code-review` outcomes are current.
|
|
11
|
+
- I do not hide failing tests, unresolved review findings, or release risks behind a version bump.
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
Prepare completed implementation work for merge or release with a disciplined pre-flight process.
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
1. Confirm the branch is not `main` or another protected integration branch.
|
|
18
|
+
2. Review branch scope:
|
|
19
|
+
- current diff summary
|
|
20
|
+
- commits on the branch
|
|
21
|
+
- uncommitted changes that must be included or split off
|
|
22
|
+
3. Merge or rebase from the mainline according to project policy.
|
|
23
|
+
4. Run the full verification set that proves ship readiness.
|
|
24
|
+
5. Run `code-review` if pre-landing review is stale.
|
|
25
|
+
6. Decide version bump level using the project release policy.
|
|
26
|
+
7. Update `VERSION` and `CHANGELOG.md` coherently.
|
|
27
|
+
8. Split changes into bisectable commits when the diff contains more than one logical unit.
|
|
28
|
+
9. Push the branch and open a PR when the project workflow requires one.
|
|
29
|
+
10. Report:
|
|
30
|
+
- what is being shipped
|
|
31
|
+
- verification results
|
|
32
|
+
- version change
|
|
33
|
+
- remaining operator notes
|
|
34
|
+
|
|
35
|
+
## Pre-Flight Checklist
|
|
36
|
+
- Latest mainline merged or confirmed unnecessary
|
|
37
|
+
- Verification evidence is fresh
|
|
38
|
+
- Required review gate completed
|
|
39
|
+
- Release notes drafted
|
|
40
|
+
- Version bump consistent with scope
|
|
41
|
+
- Commits are bisectable
|
|
42
|
+
- No hidden migration, config, or rollout risk
|
|
43
|
+
|
|
44
|
+
## Red Flags
|
|
45
|
+
- Shipping from a dirty or stale branch without understanding the diff.
|
|
46
|
+
- Updating the version or changelog before tests and review pass.
|
|
47
|
+
- Bundling unrelated work into one release commit.
|
|
48
|
+
- Treating a push as proof that the code is ready.
|
|
49
|
+
|
|
50
|
+
## Integration
|
|
51
|
+
- Run `code-verify` before this skill.
|
|
52
|
+
- Run `code-review` before this skill when the code changed after the last review.
|
|
53
|
+
- Finish with `code-finish` if the workflow requires a final branch integration decision.
|