tracerkit 1.0.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/LICENSE +21 -0
- package/README.md +220 -0
- package/dist/bin.js +31 -0
- package/dist/index.js +2 -0
- package/dist/uninstall-BWCq5Ivr.js +77 -0
- package/package.json +86 -0
- package/templates/.claude/skills/tk:plan/SKILL.md +139 -0
- package/templates/.claude/skills/tk:prd/SKILL.md +118 -0
- package/templates/.claude/skills/tk:verify/SKILL.md +122 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Helder Burato Berto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# TracerKit
|
|
4
|
+
|
|
5
|
+
[](https://github.com/helderberto/tracerkit/actions/workflows/ci.yml)
|
|
6
|
+
|
|
7
|
+
A spec-driven workflow for Claude Code. Three skills take a feature from idea to verified archive: define, plan, verify.
|
|
8
|
+
|
|
9
|
+
**Zero runtime dependencies** — pure Markdown skills, no build step.
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Get Started
|
|
14
|
+
|
|
15
|
+
### 1. Install TracerKit
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx tracerkit init
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Skills are installed globally to `~/.claude/skills/` — available in every project, no per-project setup needed.
|
|
22
|
+
|
|
23
|
+
### 2. Use the skills
|
|
24
|
+
|
|
25
|
+
Open Claude Code in any project and start using:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
/tk:prd add dark mode support # define the feature
|
|
29
|
+
/tk:plan dark-mode-support # break into vertical slices
|
|
30
|
+
/tk:verify dark-mode-support # verify and archive
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. Manage your installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx tracerkit update # refresh to latest, skip modified files
|
|
37
|
+
npx tracerkit uninstall # remove TracerKit skills
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary>Install per-project instead</summary>
|
|
42
|
+
|
|
43
|
+
To scope skills to a single project (team members get them via git):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx tracerkit init . # install to .claude/skills/ in current dir
|
|
47
|
+
npx tracerkit init /path/to/proj # or specify a path
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Per-project commands:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx tracerkit update .
|
|
54
|
+
npx tracerkit uninstall .
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
</details>
|
|
58
|
+
|
|
59
|
+
## Skills
|
|
60
|
+
|
|
61
|
+
### `/tk:prd <idea>` — Write a PRD
|
|
62
|
+
|
|
63
|
+
Interactive interview to define a feature. Explores the codebase, asks scoping questions one at a time, designs deep modules, and writes a structured PRD.
|
|
64
|
+
|
|
65
|
+
**Output:** `prds/<slug>.md`
|
|
66
|
+
|
|
67
|
+
### `/tk:plan <slug>` — Create an implementation plan
|
|
68
|
+
|
|
69
|
+
Reads a PRD and breaks it into phased **tracer-bullet vertical slices** — each phase is a thin but complete path through every layer (schema, service, API, UI, tests), demoable on its own.
|
|
70
|
+
|
|
71
|
+
**Output:** `plans/<slug>.md`
|
|
72
|
+
|
|
73
|
+
### `/tk:verify <slug>` — Verify and archive
|
|
74
|
+
|
|
75
|
+
Read-only review that compares the codebase against the plan's done-when conditions. Runs tests, checks user stories, and stamps a **PASS** or **NEEDS_WORK** verdict. On PASS, automatically archives the PRD and plan to `archive/<slug>/`.
|
|
76
|
+
|
|
77
|
+
**Output:** Verdict block in `plans/<slug>.md` — on PASS: `archive/<slug>/prd.md` + `archive/<slug>/plan.md`
|
|
78
|
+
|
|
79
|
+
## Why TracerKit?
|
|
80
|
+
|
|
81
|
+
Most planning tools produce horizontal task lists — nothing works until everything is done. TracerKit uses **tracer-bullet vertical slices** instead: each phase cuts through every layer (schema → service → API → UI → tests), so every phase is demoable on its own. Integration problems surface early, context stays focused, and AI assistants get small well-scoped phases instead of sprawling layers.
|
|
82
|
+
|
|
83
|
+
The term comes from [The Pragmatic Programmer](https://pragprog.com/titles/tpp20/the-pragmatic-programmer-20th-anniversary-edition/).
|
|
84
|
+
|
|
85
|
+
### Compared to
|
|
86
|
+
|
|
87
|
+
**vs. [Spec Kit](https://github.com/github/spec-kit)** (GitHub) — Thorough but heavyweight. 5 phases, Python setup, rigid phase gates. TracerKit is 3 phases, zero deps, automated verification.
|
|
88
|
+
|
|
89
|
+
**vs. [Kiro](https://kiro.dev/)** (AWS) — Powerful but locked to a dedicated IDE. TracerKit works inside Claude Code with pure Markdown skills.
|
|
90
|
+
|
|
91
|
+
**vs. [OpenSpec](https://github.com/Fission-AI/OpenSpec)** — Similar philosophy, broader tool support. TracerKit trades breadth (Claude Code only) for depth — native skill discovery, subagents for verification, and fewer artifacts.
|
|
92
|
+
|
|
93
|
+
**vs. nothing** — AI coding without specs means vague prompts and lost context between sessions. TracerKit adds structure without ceremony.
|
|
94
|
+
|
|
95
|
+
<details>
|
|
96
|
+
<summary>Full comparison table</summary>
|
|
97
|
+
|
|
98
|
+
| | Spec Kit | Kiro | OpenSpec | TracerKit |
|
|
99
|
+
| ---------------- | ---------------- | -------------------------- | ----------------------- | ---------------------------------- |
|
|
100
|
+
| **What it is** | CLI + extensions | Agentic IDE (VS Code fork) | Slash-command framework | Claude Code skills (pure Markdown) |
|
|
101
|
+
| **Setup** | Python + uv | Dedicated IDE | npm + init | `npx tracerkit init` |
|
|
102
|
+
| **Phases** | 5 | 3 | 3 | 3 (prd, plan, verify) |
|
|
103
|
+
| **Artifacts** | 4 files | 3+ files | 4+ files | 2 files (PRD, plan) |
|
|
104
|
+
| **Verification** | Manual gates | Diff approval | Manual | Automated PASS/NEEDS_WORK |
|
|
105
|
+
| **Tool lock-in** | Any AI assistant | Kiro IDE only | Any AI assistant | Claude Code only |
|
|
106
|
+
| **Runtime deps** | Python + uv | Proprietary IDE | None | None |
|
|
107
|
+
|
|
108
|
+
</details>
|
|
109
|
+
|
|
110
|
+
## Examples
|
|
111
|
+
|
|
112
|
+
<details>
|
|
113
|
+
<summary>New feature from scratch</summary>
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# 1. Define the feature
|
|
117
|
+
/tk:prd add dark mode support
|
|
118
|
+
|
|
119
|
+
# 2. Break into phased vertical slices
|
|
120
|
+
/tk:plan dark-mode-support
|
|
121
|
+
|
|
122
|
+
# 3. Implement each phase with Claude
|
|
123
|
+
|
|
124
|
+
# 4. Verify — auto-archives on PASS
|
|
125
|
+
/tk:verify dark-mode-support
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
<details>
|
|
131
|
+
<summary>Iterating on an accepted PRD</summary>
|
|
132
|
+
|
|
133
|
+
PRDs are living documents — refine them any time before or during implementation.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Re-run the PRD skill — it detects the existing file and asks
|
|
137
|
+
# whether to start fresh or revise
|
|
138
|
+
/tk:prd update dark mode to detect system preference
|
|
139
|
+
|
|
140
|
+
# Regenerate the plan from the updated PRD
|
|
141
|
+
/tk:plan dark-mode-support
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
</details>
|
|
145
|
+
|
|
146
|
+
<details>
|
|
147
|
+
<summary>Verify → fix → re-verify loop</summary>
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# First verification attempt
|
|
151
|
+
/tk:verify dark-mode-support
|
|
152
|
+
# → NEEDS_WORK: missing toggle persistence, 2 failing tests
|
|
153
|
+
|
|
154
|
+
# Fix the blockers, then re-verify
|
|
155
|
+
/tk:verify dark-mode-support
|
|
156
|
+
# → PASS — auto-archived to archive/dark-mode-support/
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
</details>
|
|
160
|
+
|
|
161
|
+
<details>
|
|
162
|
+
<summary>Development flow diagram</summary>
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
+------------------+
|
|
166
|
+
| Idea / Issue |
|
|
167
|
+
+--------+---------+
|
|
168
|
+
|
|
|
169
|
+
v
|
|
170
|
+
+----------+----------+
|
|
171
|
+
| /tk:prd <idea> |
|
|
172
|
+
| Interview + Design |
|
|
173
|
+
+----------+----------+
|
|
174
|
+
|
|
|
175
|
+
prds/<slug>.md
|
|
176
|
+
|
|
|
177
|
+
v
|
|
178
|
+
+----------+----------+
|
|
179
|
+
| /tk:plan <slug> |
|
|
180
|
+
| Vertical Slices |
|
|
181
|
+
+----------+----------+
|
|
182
|
+
|
|
|
183
|
+
plans/<slug>.md
|
|
184
|
+
|
|
|
185
|
+
v
|
|
186
|
+
+----------+----------+
|
|
187
|
+
| Implement phases |
|
|
188
|
+
| (you + Claude) |
|
|
189
|
+
+----------+----------+
|
|
190
|
+
|
|
|
191
|
+
v
|
|
192
|
+
+----------+----------+
|
|
193
|
+
| /tk:verify <slug> |
|
|
194
|
+
| Review + archive |
|
|
195
|
+
+----------+----------+
|
|
196
|
+
|
|
|
197
|
+
+--------+--------+
|
|
198
|
+
| |
|
|
199
|
+
NEEDS_WORK PASS
|
|
200
|
+
| |
|
|
201
|
+
v v
|
|
202
|
+
Fix blockers Auto-archived
|
|
203
|
+
then re-run to archive/
|
|
204
|
+
/tk:verify
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
</details>
|
|
208
|
+
|
|
209
|
+
## Contributing
|
|
210
|
+
|
|
211
|
+
1. Fork the repo and create a feature branch
|
|
212
|
+
2. Use TracerKit itself to plan your change (`/tk:prd` + `/tk:plan`)
|
|
213
|
+
3. Implement following the plan phases
|
|
214
|
+
4. `npm run lint:fix && npm run test:run && npm run typecheck`
|
|
215
|
+
5. [Conventional Commits](https://www.conventionalcommits.org/) (enforced by commitlint)
|
|
216
|
+
6. Open a PR against `main`
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
[MIT License](LICENSE) © [helderberto](https://helderberto.com)
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { n as e, r as t, t as n } from "./uninstall-BWCq5Ivr.js";
|
|
3
|
+
import { resolve as r } from "node:path";
|
|
4
|
+
import { homedir as i } from "node:os";
|
|
5
|
+
//#region src/cli.ts
|
|
6
|
+
var a = [
|
|
7
|
+
"Usage: tracerkit <command> [path]",
|
|
8
|
+
"",
|
|
9
|
+
"Commands:",
|
|
10
|
+
" init [path] Install skills (global by default, or to a project path)",
|
|
11
|
+
" update [path] Refresh files from latest version, skip modified files",
|
|
12
|
+
" uninstall [path] Remove TracerKit skills, keep user artifacts"
|
|
13
|
+
];
|
|
14
|
+
function o(e) {
|
|
15
|
+
let t = e.find((e) => !e.startsWith("-"));
|
|
16
|
+
return t ? r(t) : i();
|
|
17
|
+
}
|
|
18
|
+
function s(r) {
|
|
19
|
+
let i = r[0], s = r.slice(1);
|
|
20
|
+
switch (i) {
|
|
21
|
+
case "init": return t(o(s));
|
|
22
|
+
case "update": return e(o(s));
|
|
23
|
+
case "uninstall": return n(o(s));
|
|
24
|
+
default: return a;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/bin.ts
|
|
29
|
+
var c = s(process.argv.slice(2));
|
|
30
|
+
for (let e of c) console.log(e);
|
|
31
|
+
//#endregion
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { existsSync as e, mkdirSync as t, readFileSync as n, readdirSync as r, rmSync as i, writeFileSync as a } from "node:fs";
|
|
2
|
+
import { dirname as o, join as s } from "node:path";
|
|
3
|
+
import { createHash as c } from "node:crypto";
|
|
4
|
+
import { fileURLToPath as l } from "node:url";
|
|
5
|
+
//#region src/templates.ts
|
|
6
|
+
var u = [
|
|
7
|
+
"tk:prd",
|
|
8
|
+
"tk:plan",
|
|
9
|
+
"tk:verify"
|
|
10
|
+
], d = s(o(l(import.meta.url)), "..", "templates");
|
|
11
|
+
function f(e, t = "") {
|
|
12
|
+
let n = r(e, { withFileTypes: !0 }), i = [];
|
|
13
|
+
for (let r of n) {
|
|
14
|
+
let n = t ? `${t}/${r.name}` : r.name;
|
|
15
|
+
r.isDirectory() ? i.push(...f(s(e, r.name), n)) : i.push(n);
|
|
16
|
+
}
|
|
17
|
+
return i.sort();
|
|
18
|
+
}
|
|
19
|
+
function p(e, r) {
|
|
20
|
+
let i = r ?? f(d);
|
|
21
|
+
for (let r of i) {
|
|
22
|
+
let i = s(d, r), c = s(e, r);
|
|
23
|
+
t(o(c), { recursive: !0 }), a(c, n(i));
|
|
24
|
+
}
|
|
25
|
+
return { copied: i };
|
|
26
|
+
}
|
|
27
|
+
function m(e) {
|
|
28
|
+
return c("sha256").update(e).digest("hex");
|
|
29
|
+
}
|
|
30
|
+
function h(t) {
|
|
31
|
+
let r = f(d), i = [], a = [], o = [];
|
|
32
|
+
for (let c of r) {
|
|
33
|
+
let r = s(t, c);
|
|
34
|
+
e(r) ? m(n(s(d, c))) === m(n(r)) ? i.push(c) : a.push(c) : o.push(c);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
unchanged: i,
|
|
38
|
+
modified: a,
|
|
39
|
+
missing: o
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/commands/init.ts
|
|
44
|
+
function g(t) {
|
|
45
|
+
for (let n of u) if (e(s(t, ".claude", "skills", n))) throw Error(`.claude/skills/${n}/ already exists — aborting`);
|
|
46
|
+
let { copied: n } = p(t);
|
|
47
|
+
return n.map((e) => `✓ ${e}`);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/commands/update.ts
|
|
51
|
+
function _(t) {
|
|
52
|
+
if (!u.some((n) => e(s(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — run `tracerkit init` first");
|
|
53
|
+
let { unchanged: n, modified: r, missing: i } = h(t), a = [], o = [...n, ...i];
|
|
54
|
+
if (o.length > 0) {
|
|
55
|
+
p(t, o);
|
|
56
|
+
for (let e of n) a.push(`✓ ${e}`);
|
|
57
|
+
for (let e of i) a.push(`✓ ${e} (added)`);
|
|
58
|
+
}
|
|
59
|
+
for (let e of r) a.push(`⚠ ${e} (skipped — modified)`);
|
|
60
|
+
return a;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/commands/uninstall.ts
|
|
64
|
+
function v(t) {
|
|
65
|
+
if (!u.some((n) => e(s(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — nothing to uninstall");
|
|
66
|
+
let n = [];
|
|
67
|
+
for (let r of u) {
|
|
68
|
+
let a = s(t, ".claude", "skills", r);
|
|
69
|
+
e(a) && (i(a, {
|
|
70
|
+
recursive: !0,
|
|
71
|
+
force: !0
|
|
72
|
+
}), n.push(`✗ .claude/skills/${r}/ removed`));
|
|
73
|
+
}
|
|
74
|
+
return n;
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
export { u as i, _ as n, g as r, v as t };
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tracerkit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Stack-agnostic spec-driven workflow for AI coding assistants",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "helderberto",
|
|
8
|
+
"url": "https://github.com/helderberto"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/helderberto/tracerkit",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/helderberto/tracerkit.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/helderberto/tracerkit/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"bin": {
|
|
23
|
+
"tracerkit": "dist/bin.js"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"claude-code",
|
|
27
|
+
"ai-workflow",
|
|
28
|
+
"spec-driven",
|
|
29
|
+
"tracer-bullet",
|
|
30
|
+
"developer-tools",
|
|
31
|
+
"markdown",
|
|
32
|
+
"plugin"
|
|
33
|
+
],
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"templates"
|
|
37
|
+
],
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=18.0.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "vite build",
|
|
43
|
+
"dev": "vite build --watch",
|
|
44
|
+
"test": "vitest",
|
|
45
|
+
"test:run": "vitest run",
|
|
46
|
+
"test:coverage": "vitest run --coverage",
|
|
47
|
+
"lint": "eslint src",
|
|
48
|
+
"lint:fix": "eslint src --fix",
|
|
49
|
+
"format": "prettier --write .",
|
|
50
|
+
"format:check": "prettier --check .",
|
|
51
|
+
"typecheck": "tsc --noEmit",
|
|
52
|
+
"prepare": "husky",
|
|
53
|
+
"prepublishOnly": "npm run build",
|
|
54
|
+
"release": "semantic-release"
|
|
55
|
+
},
|
|
56
|
+
"lint-staged": {
|
|
57
|
+
"*.{ts,js}": [
|
|
58
|
+
"eslint --fix",
|
|
59
|
+
"prettier --write"
|
|
60
|
+
],
|
|
61
|
+
"*.{json,md}": [
|
|
62
|
+
"prettier --write"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"overrides": {
|
|
66
|
+
"lodash-es": "4.17.21"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@commitlint/cli": "20.5.0",
|
|
70
|
+
"@commitlint/config-conventional": "20.5.0",
|
|
71
|
+
"@semantic-release/changelog": "6.0.3",
|
|
72
|
+
"@semantic-release/git": "10.0.1",
|
|
73
|
+
"@types/node": "25.5.0",
|
|
74
|
+
"@vitest/coverage-istanbul": "4.1.2",
|
|
75
|
+
"eslint": "10.1.0",
|
|
76
|
+
"eslint-config-prettier": "10.1.8",
|
|
77
|
+
"husky": "9.1.7",
|
|
78
|
+
"lint-staged": "16.4.0",
|
|
79
|
+
"prettier": "3.8.1",
|
|
80
|
+
"semantic-release": "25.0.3",
|
|
81
|
+
"typescript": "6.0.2",
|
|
82
|
+
"typescript-eslint": "8.58.0",
|
|
83
|
+
"vite": "8.0.3",
|
|
84
|
+
"vitest": "4.1.2"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved to plans/. Use after /tk:prd.
|
|
3
|
+
argument-hint: '[slug]'
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PRD to Plan
|
|
8
|
+
|
|
9
|
+
Break a PRD into phased vertical slices (tracer bullets). Output: `plans/<slug>.md`.
|
|
10
|
+
|
|
11
|
+
## Pre-loaded context
|
|
12
|
+
|
|
13
|
+
- Available PRDs: !`ls prds/ 2>/dev/null || echo "no prds/ directory found"`
|
|
14
|
+
|
|
15
|
+
## Input
|
|
16
|
+
|
|
17
|
+
The argument (if provided) is: $ARGUMENTS
|
|
18
|
+
|
|
19
|
+
Use the argument as `<slug>` if given. If no argument is provided, list available PRDs and ask which one to plan.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Read the PRD
|
|
24
|
+
|
|
25
|
+
Read `prds/<slug>.md`. If it does not exist, list available PRDs and ask.
|
|
26
|
+
|
|
27
|
+
If `plans/<slug>.md` already exists, tell the user and ask whether to overwrite or pick a new name.
|
|
28
|
+
|
|
29
|
+
### 2. Explore the codebase
|
|
30
|
+
|
|
31
|
+
Understand current architecture, existing patterns, and integration points.
|
|
32
|
+
|
|
33
|
+
### 3. Identify durable architectural decisions
|
|
34
|
+
|
|
35
|
+
Before slicing, extract decisions that hold across all phases:
|
|
36
|
+
|
|
37
|
+
- Route structures / URL patterns
|
|
38
|
+
- Database schema shape
|
|
39
|
+
- Key data models and definitions
|
|
40
|
+
- Auth/authorization approach
|
|
41
|
+
- Third-party service boundaries
|
|
42
|
+
|
|
43
|
+
### 4. Draft vertical slices
|
|
44
|
+
|
|
45
|
+
Each phase is a thin **tracer bullet** — a narrow but complete path through every integration layer (schema, service, API, UI, tests). A completed phase is demoable on its own.
|
|
46
|
+
|
|
47
|
+
**Deriving tasks from the PRD:**
|
|
48
|
+
|
|
49
|
+
| PRD Section | Becomes |
|
|
50
|
+
| ----------------- | ------------------------------------------------ |
|
|
51
|
+
| New Modules | Implement module with interface |
|
|
52
|
+
| Schema Changes | Migration + validation |
|
|
53
|
+
| API Contracts | Route returning shape |
|
|
54
|
+
| Navigation | Wire component to route |
|
|
55
|
+
| User Stories | Verify coverage; add task if missing |
|
|
56
|
+
| Testing Decisions | Tests land in the phase where their module lands |
|
|
57
|
+
| Out of Scope | Never create tasks for these |
|
|
58
|
+
|
|
59
|
+
**Within each slice, order by dependency:** schema → service → API → UI → tests. Happy paths before edge cases.
|
|
60
|
+
|
|
61
|
+
**Phase naming:** use a goal phrase answering "what can we demo when this is done?" (e.g., "Phase 1 — Revenue visible end-to-end"), not a layer name.
|
|
62
|
+
|
|
63
|
+
**When to use layer-by-layer instead:** If the PRD has complex schema changes that all modules depend on and no single user story can stand alone without the full schema, build the data foundation first, then slice the rest vertically.
|
|
64
|
+
|
|
65
|
+
**Phase count:** 2–3 for single-module, 3–5 for multi-module, 5+ means consider splitting the PRD.
|
|
66
|
+
|
|
67
|
+
Assign an agent tag to tasks where appropriate:
|
|
68
|
+
|
|
69
|
+
- `[agent:debugger]` — tracing a bug or unexpected runtime behavior
|
|
70
|
+
- `[agent:test-auditor]` — writing or reviewing tests
|
|
71
|
+
- `[agent:code-reviewer]` — reviewing API surfaces, interfaces, or public contracts
|
|
72
|
+
|
|
73
|
+
### 5. Quiz the user
|
|
74
|
+
|
|
75
|
+
Present the breakdown. For each phase show:
|
|
76
|
+
|
|
77
|
+
- **Title**: short goal phrase
|
|
78
|
+
- **User stories covered**: which PRD stories this addresses
|
|
79
|
+
- **Done when**: the testable condition
|
|
80
|
+
|
|
81
|
+
Ask: Does the granularity feel right? Should any phases merge or split? Iterate until approved.
|
|
82
|
+
|
|
83
|
+
### 6. Save plan
|
|
84
|
+
|
|
85
|
+
Save to `plans/<slug>.md` (create `plans/` if missing).
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
# Plan: <Feature Name>
|
|
89
|
+
|
|
90
|
+
> Source PRD: `prds/<slug>.md`
|
|
91
|
+
|
|
92
|
+
## Architectural Decisions
|
|
93
|
+
|
|
94
|
+
Durable decisions that apply across all phases:
|
|
95
|
+
|
|
96
|
+
- **Key decision**: ...
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Phase 1 — <Goal>
|
|
101
|
+
|
|
102
|
+
**User stories**: <list from PRD>
|
|
103
|
+
|
|
104
|
+
### What to build
|
|
105
|
+
|
|
106
|
+
Concise description of this vertical slice — end-to-end behavior, not layer-by-layer.
|
|
107
|
+
|
|
108
|
+
### Done when
|
|
109
|
+
|
|
110
|
+
<Specific, testable condition>
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
<!-- Repeat for each phase -->
|
|
115
|
+
|
|
116
|
+
## Out of Scope
|
|
117
|
+
|
|
118
|
+
Carried forward from PRD verbatim.
|
|
119
|
+
|
|
120
|
+
## Open Questions
|
|
121
|
+
|
|
122
|
+
Gaps found in the PRD needing resolution. Blank if none.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Print saved path and one line per phase: `Phase N — <title> (<condition summary>)`.
|
|
126
|
+
|
|
127
|
+
## Rules
|
|
128
|
+
|
|
129
|
+
- Phases derive from PRD user stories — never invented
|
|
130
|
+
- Each phase must be demoable end-to-end on its own
|
|
131
|
+
- "Done when" must be testable, not vague
|
|
132
|
+
- Never modify the source PRD
|
|
133
|
+
- Carry PRD's Out of Scope forward verbatim
|
|
134
|
+
|
|
135
|
+
## Error Handling
|
|
136
|
+
|
|
137
|
+
- PRD not found — list available PRDs and ask
|
|
138
|
+
- PRD missing sections — note gaps inline and continue
|
|
139
|
+
- `plans/` missing — create it
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a PRD through user interview, codebase exploration, and module design, saved to prds/. Use when starting a new feature or change.
|
|
3
|
+
argument-hint: <idea>
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PRD Writing
|
|
8
|
+
|
|
9
|
+
Skip steps already satisfied. If user provided a description via arguments, skip to Step 2.
|
|
10
|
+
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
The argument is: $ARGUMENTS
|
|
14
|
+
|
|
15
|
+
If the argument is empty, go straight to Step 1 (gather problem description). After gathering the idea, derive the slug from the idea.
|
|
16
|
+
|
|
17
|
+
If the argument is provided, convert it to a kebab-case slug (lowercase, spaces and underscores replaced with hyphens). This is `<slug>`. The output file is `prds/<slug>.md`.
|
|
18
|
+
|
|
19
|
+
If `prds/<slug>.md` already exists, tell the user and ask whether to overwrite or pick a new name.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Gather problem description
|
|
24
|
+
|
|
25
|
+
Ask the user for a detailed description of the problem and any solution ideas.
|
|
26
|
+
|
|
27
|
+
### 2. Explore codebase
|
|
28
|
+
|
|
29
|
+
Verify assertions and map current state: data models, services, API routes, frontend structure, and test patterns. Note what exists vs. what must be built.
|
|
30
|
+
|
|
31
|
+
### 3. Interview
|
|
32
|
+
|
|
33
|
+
Interview relentlessly, one question at a time. Lead with your recommended answer; let the user confirm or correct. If a question can be answered by exploring code, explore instead of asking. For terse answers, offer concrete options (A/B/C).
|
|
34
|
+
|
|
35
|
+
Walk these branches (skip any already resolved):
|
|
36
|
+
|
|
37
|
+
- **Scope & Surface** — Where does this live? New page/view or integrated? Which user roles?
|
|
38
|
+
- **Data & Concepts** — Precise definitions for each new concept. What data exists, what's missing?
|
|
39
|
+
- **Behavior & Interaction** — How does the user interact? Sorting, filtering, search, time ranges?
|
|
40
|
+
- **Display & Output** — Numbers, tables, charts, forms? Exportable? URL-driven state?
|
|
41
|
+
- **Access & Privacy** — Who sees what? Role-based restrictions? Sensitive data concerns?
|
|
42
|
+
- **Boundaries** — What is explicitly out of scope? Adjacent features to defer?
|
|
43
|
+
- **Integration** — Schema changes? New or extended services? External dependencies?
|
|
44
|
+
|
|
45
|
+
### 4. Design modules
|
|
46
|
+
|
|
47
|
+
Sketch major modules to build or modify. Favor **deep modules** — a simple interface (1–3 entry points) hiding a large implementation that rarely changes, over shallow modules where the interface is nearly as complex as the implementation.
|
|
48
|
+
|
|
49
|
+
Signals of shallow design: many small functions with 1:1 query mapping, callers compose multiple calls, adding a feature requires changing the interface.
|
|
50
|
+
|
|
51
|
+
Present modules to user. Confirm which need tests.
|
|
52
|
+
|
|
53
|
+
### 5. Write PRD
|
|
54
|
+
|
|
55
|
+
Save to `prds/<slug>.md` (create `prds/` if missing).
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
# Feature Name
|
|
59
|
+
|
|
60
|
+
## Problem Statement
|
|
61
|
+
|
|
62
|
+
The problem from the user's perspective. Focus on pain and impact.
|
|
63
|
+
|
|
64
|
+
## Solution
|
|
65
|
+
|
|
66
|
+
The solution from the user's perspective. Describe the experience, not the architecture.
|
|
67
|
+
|
|
68
|
+
## User Stories
|
|
69
|
+
|
|
70
|
+
Long numbered list. Cover happy path, edge cases, error states.
|
|
71
|
+
|
|
72
|
+
1. As a <actor>, I want <feature>, so that <benefit>
|
|
73
|
+
|
|
74
|
+
## Implementation Decisions
|
|
75
|
+
|
|
76
|
+
### New Modules
|
|
77
|
+
|
|
78
|
+
- Module name, purpose, and public interface (function signatures with param types)
|
|
79
|
+
- Why each module exists as a separate unit
|
|
80
|
+
|
|
81
|
+
### Architectural Decisions
|
|
82
|
+
|
|
83
|
+
- Key definitions (precise meaning of domain terms)
|
|
84
|
+
- Data flow from storage to display
|
|
85
|
+
- State management approach
|
|
86
|
+
|
|
87
|
+
### Schema Changes
|
|
88
|
+
|
|
89
|
+
- New tables/columns needed, or "None required"
|
|
90
|
+
|
|
91
|
+
### API Contracts
|
|
92
|
+
|
|
93
|
+
- New routes, request/response shapes
|
|
94
|
+
|
|
95
|
+
### Navigation
|
|
96
|
+
|
|
97
|
+
- Where the feature is accessed, new routes added
|
|
98
|
+
|
|
99
|
+
Do NOT include file paths or code snippets — they go stale.
|
|
100
|
+
|
|
101
|
+
## Testing Decisions
|
|
102
|
+
|
|
103
|
+
- What makes a good test (behavior, not implementation)
|
|
104
|
+
- Which modules need tests
|
|
105
|
+
- Key test cases (empty state, boundaries, isolation)
|
|
106
|
+
- Prior art: similar test patterns in the codebase
|
|
107
|
+
|
|
108
|
+
## Out of Scope
|
|
109
|
+
|
|
110
|
+
Explicit list. Be specific — vague exclusions invite scope creep.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Tell the user: file created, one-line summary, next step is `/tk:plan <slug>`.
|
|
114
|
+
|
|
115
|
+
## Error Handling
|
|
116
|
+
|
|
117
|
+
- `prds/` missing — create it
|
|
118
|
+
- Scope larger than expected — surface and re-scope with user before continuing
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compare implementation against plan, emit BLOCKERS/SUGGESTIONS and a PASS or NEEDS_WORK verdict. Auto-archives on PASS. Use after implementing a plan.
|
|
3
|
+
argument-hint: '[slug]'
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Verify Implementation
|
|
8
|
+
|
|
9
|
+
Compare current implementation against a plan, stamp a verdict, and archive on PASS.
|
|
10
|
+
|
|
11
|
+
## Pre-loaded context
|
|
12
|
+
|
|
13
|
+
- Available plans: !`ls plans/ 2>/dev/null || echo "no plans/ directory found"`
|
|
14
|
+
|
|
15
|
+
## Input
|
|
16
|
+
|
|
17
|
+
The argument (if provided) is: $ARGUMENTS
|
|
18
|
+
|
|
19
|
+
Use the argument as `<slug>` if given. If no argument is provided, list available plans and ask which one to verify.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Load the plan
|
|
24
|
+
|
|
25
|
+
Read `plans/<slug>.md`. If it does not exist, list available plans and ask.
|
|
26
|
+
|
|
27
|
+
### 2. Load the PRD
|
|
28
|
+
|
|
29
|
+
Read the source PRD referenced in the plan header (`> Source PRD: ...`).
|
|
30
|
+
|
|
31
|
+
### 3. Launch read-only review
|
|
32
|
+
|
|
33
|
+
Use a **read-only subagent** (no file writes, no edits) to:
|
|
34
|
+
|
|
35
|
+
1. Read every section of the plan — architectural decisions, each phase, done-when conditions
|
|
36
|
+
2. For each phase, explore the codebase to verify the done-when condition is satisfied
|
|
37
|
+
3. Run any test commands referenced in the plan or discoverable via project conventions
|
|
38
|
+
4. Compare user stories from the PRD against actual behavior
|
|
39
|
+
|
|
40
|
+
Collect findings into two categories:
|
|
41
|
+
|
|
42
|
+
- **BLOCKERS** — done-when conditions not met, missing functionality, failing tests, broken contracts. These prevent a PASS.
|
|
43
|
+
- **SUGGESTIONS** — improvements, minor gaps, style issues. These do not prevent a PASS.
|
|
44
|
+
|
|
45
|
+
### 4. Determine verdict
|
|
46
|
+
|
|
47
|
+
- **PASS** — zero BLOCKERS
|
|
48
|
+
- **NEEDS_WORK** — one or more BLOCKERS
|
|
49
|
+
|
|
50
|
+
### 5. Report to user
|
|
51
|
+
|
|
52
|
+
Print the verdict report:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
## Verification: <slug>
|
|
56
|
+
|
|
57
|
+
### Verdict: PASS | NEEDS_WORK
|
|
58
|
+
|
|
59
|
+
### BLOCKERS
|
|
60
|
+
- (list or "None")
|
|
61
|
+
|
|
62
|
+
### SUGGESTIONS
|
|
63
|
+
- (list or "None")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 6. Stamp the plan
|
|
67
|
+
|
|
68
|
+
Append a verdict block at the bottom of `plans/<slug>.md`:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Verdict
|
|
74
|
+
|
|
75
|
+
- **Result**: PASS | NEEDS_WORK
|
|
76
|
+
- **Date**: YYYY-MM-DD
|
|
77
|
+
- **BLOCKERS**: (count)
|
|
78
|
+
- **SUGGESTIONS**: (count)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If a previous verdict block exists, replace it with the new one.
|
|
82
|
+
|
|
83
|
+
### 7. On PASS — archive
|
|
84
|
+
|
|
85
|
+
If the verdict is **PASS**, automatically archive:
|
|
86
|
+
|
|
87
|
+
1. Create `archive/<slug>/` directory (and `archive/` if missing)
|
|
88
|
+
2. Move `prds/<slug>.md` → `archive/<slug>/prd.md`
|
|
89
|
+
3. Move `plans/<slug>.md` → `archive/<slug>/plan.md`
|
|
90
|
+
4. Append closing timestamp to `archive/<slug>/plan.md`:
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Archived
|
|
96
|
+
|
|
97
|
+
- **Status**: closed
|
|
98
|
+
- **Closed**: YYYY-MM-DD HH:MM (UTC)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
5. Tell the user: archived to `archive/<slug>/`, one-line summary of the feature.
|
|
102
|
+
|
|
103
|
+
If `archive/<slug>/` already exists, warn and ask whether to overwrite.
|
|
104
|
+
|
|
105
|
+
### 8. On NEEDS_WORK
|
|
106
|
+
|
|
107
|
+
Tell the user: fix the listed blockers, then re-run `/tk:verify <slug>`.
|
|
108
|
+
|
|
109
|
+
## Rules
|
|
110
|
+
|
|
111
|
+
- The review subagent must be **read-only** — it must not create, edit, or delete any files
|
|
112
|
+
- The only file writes this skill makes are: the verdict block in the plan, and the archive move on PASS
|
|
113
|
+
- Never modify the source PRD (except moving it to archive)
|
|
114
|
+
- Never modify implementation code — only observe and report
|
|
115
|
+
- If the PRD file is missing but the plan has a PASS verdict, warn but proceed with archiving the plan only
|
|
116
|
+
|
|
117
|
+
## Error Handling
|
|
118
|
+
|
|
119
|
+
- Plan not found — list available plans and ask
|
|
120
|
+
- PRD referenced in plan not found — warn and continue with plan only
|
|
121
|
+
- `plans/` missing — tell user to run `/tk:plan` first
|
|
122
|
+
- `archive/<slug>/` already exists — warn and ask whether to overwrite
|