cc-dev-template 0.1.43 → 0.1.45
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/package.json +1 -1
- package/src/skills/claude-md/SKILL.md +55 -0
- package/src/skills/claude-md/references/audit.md +115 -0
- package/src/skills/claude-md/references/create.md +72 -0
- package/src/skills/claude-md/references/principles.md +132 -0
- package/src/skills/creating-agent-skills/references/create.md +3 -36
- package/src/skills/creating-agent-skills/references/principles.md +2 -7
- package/src/skills/spec-interview/SKILL.md +37 -0
- package/src/skills/spec-interview/references/interview-guide.md +123 -0
- package/src/skills/spec-review/SKILL.md +70 -0
- package/src/skills/spec-to-tasks/SKILL.md +94 -0
package/package.json
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-md
|
|
3
|
+
description: This skill should be used when working with CLAUDE.md files. Activate when the user asks to "audit CLAUDE.md", "create a CLAUDE.md", "update the CLAUDE.md", "clean up CLAUDE.md files", or "check CLAUDE.md best practices". Also activate proactively whenever about to create or modify any CLAUDE.md file - the skill contains required principles for how these files should be written.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CLAUDE.md Management
|
|
7
|
+
|
|
8
|
+
Base directory for this skill: ~/.claude/skills/claude-md
|
|
9
|
+
|
|
10
|
+
## When This Activates
|
|
11
|
+
|
|
12
|
+
- User asks to audit, create, update, or clean up CLAUDE.md files
|
|
13
|
+
- You are about to create or modify any CLAUDE.md file
|
|
14
|
+
|
|
15
|
+
**If you're about to touch a CLAUDE.md file, read this skill first.**
|
|
16
|
+
|
|
17
|
+
## What To Do
|
|
18
|
+
|
|
19
|
+
Determine the task:
|
|
20
|
+
|
|
21
|
+
| Task | Action |
|
|
22
|
+
|------|--------|
|
|
23
|
+
| **Creating** a new CLAUDE.md | Read `references/create.md` |
|
|
24
|
+
| **Modifying** an existing CLAUDE.md | Read `references/principles.md`, then edit |
|
|
25
|
+
| **Auditing** a project's CLAUDE.md files | Read `references/audit.md` |
|
|
26
|
+
|
|
27
|
+
## Core Principle
|
|
28
|
+
|
|
29
|
+
CLAUDE.md files are **orientation prompts**. They answer: "Where am I? What matters here? What should I know that I can't read from the code?"
|
|
30
|
+
|
|
31
|
+
The test: **Would Claude know where it is and what matters?**
|
|
32
|
+
|
|
33
|
+
## Quick Reference
|
|
34
|
+
|
|
35
|
+
**Belongs in CLAUDE.md:**
|
|
36
|
+
- Why this folder/repo exists
|
|
37
|
+
- Current focus (what matters NOW)
|
|
38
|
+
- Where to find things (progressive disclosure)
|
|
39
|
+
- Tribal knowledge, gotchas, non-obvious learnings
|
|
40
|
+
- Project conventions not obvious from code
|
|
41
|
+
|
|
42
|
+
**Does NOT belong:**
|
|
43
|
+
- Content duplicated from parent CLAUDE.md (hierarchy is automatic)
|
|
44
|
+
- Step-by-step workflows (put in docs or skills)
|
|
45
|
+
- Detailed examples (trust the model)
|
|
46
|
+
- Operational runbooks
|
|
47
|
+
- Anything over ~100 lines (suspect)
|
|
48
|
+
|
|
49
|
+
## Hierarchy Rule
|
|
50
|
+
|
|
51
|
+
Claude automatically reads CLAUDE.md files up through the directory tree. A child file inherits everything from its parents.
|
|
52
|
+
|
|
53
|
+
**Never duplicate parent content in child files.** Each file should only contain what's specific to that folder.
|
|
54
|
+
|
|
55
|
+
For full principles, read `references/principles.md`.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Auditing CLAUDE.md Files
|
|
2
|
+
|
|
3
|
+
## Process
|
|
4
|
+
|
|
5
|
+
1. **Discover** - Find all CLAUDE.md files in the project
|
|
6
|
+
2. **Map hierarchy** - Understand parent-child relationships
|
|
7
|
+
3. **Check each file** - Against principles
|
|
8
|
+
4. **Fix issues** - Automatically apply best practices
|
|
9
|
+
|
|
10
|
+
## Step 1: Discover
|
|
11
|
+
|
|
12
|
+
Find all CLAUDE.md files:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
find . -name "CLAUDE.md" -type f | head -20
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or use Glob:
|
|
19
|
+
```
|
|
20
|
+
**/CLAUDE.md
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Step 2: Map Hierarchy
|
|
24
|
+
|
|
25
|
+
For each file, identify:
|
|
26
|
+
- Its parent CLAUDE.md files (walking up the tree)
|
|
27
|
+
- Its child CLAUDE.md files (in subdirectories)
|
|
28
|
+
|
|
29
|
+
This matters because content flows down. Children inherit from parents.
|
|
30
|
+
|
|
31
|
+
## Step 3: Check Each File
|
|
32
|
+
|
|
33
|
+
Read each CLAUDE.md and check for these issues:
|
|
34
|
+
|
|
35
|
+
### Length Issues
|
|
36
|
+
| Check | Issue | Fix |
|
|
37
|
+
|-------|-------|-----|
|
|
38
|
+
| Over 100 lines | Probably bloated | Extract workflows to docs, remove duplication |
|
|
39
|
+
| Over 150 lines | Definitely bloated | Aggressive pruning needed |
|
|
40
|
+
|
|
41
|
+
### Content Issues
|
|
42
|
+
| Check | Issue | Fix |
|
|
43
|
+
|-------|-------|-----|
|
|
44
|
+
| Step-by-step workflows | Doesn't belong | Move to docs/ or skills/, leave pointer |
|
|
45
|
+
| Detailed examples | Over-explaining | Remove, trust the model |
|
|
46
|
+
| Credentials/passwords | Security + bloat | Move to dedicated docs |
|
|
47
|
+
| Duplicate of parent | Redundant | Remove entirely |
|
|
48
|
+
|
|
49
|
+
### Structure Issues
|
|
50
|
+
| Check | Issue | Fix |
|
|
51
|
+
|-------|-------|-----|
|
|
52
|
+
| No clear purpose statement | Disorienting | Add one-line description at top |
|
|
53
|
+
| Missing "Current Focus" | For active projects | Add if this is active work |
|
|
54
|
+
| Walls of text | Hard to scan | Break into sections, use bullets |
|
|
55
|
+
|
|
56
|
+
### Hierarchy Issues
|
|
57
|
+
| Check | Issue | Fix |
|
|
58
|
+
|-------|-------|-----|
|
|
59
|
+
| Child repeats parent content | Duplication | Remove from child |
|
|
60
|
+
| Child has general project info | Wrong level | Move to root CLAUDE.md |
|
|
61
|
+
| Deep file (3+ levels) exists | Probably unnecessary | Consider removing |
|
|
62
|
+
|
|
63
|
+
## Step 4: Fix Issues
|
|
64
|
+
|
|
65
|
+
For each issue found:
|
|
66
|
+
|
|
67
|
+
1. **Read the file** (required before editing)
|
|
68
|
+
2. **Apply the fix** using Edit tool
|
|
69
|
+
3. **Move extracted content** to appropriate location (docs/, etc.)
|
|
70
|
+
4. **Verify** the result
|
|
71
|
+
|
|
72
|
+
### Common Fixes
|
|
73
|
+
|
|
74
|
+
**Extracting a workflow:**
|
|
75
|
+
1. Create `docs/workflows/[topic].md` with the detailed content
|
|
76
|
+
2. Replace in CLAUDE.md with: "See `docs/workflows/[topic].md` for [description]"
|
|
77
|
+
|
|
78
|
+
**Removing duplication:**
|
|
79
|
+
1. Check parent file has the content
|
|
80
|
+
2. Delete the duplicated section from child
|
|
81
|
+
3. Optionally add: "Inherits [topic] from parent CLAUDE.md"
|
|
82
|
+
|
|
83
|
+
**Pruning over-explanation:**
|
|
84
|
+
1. Identify the core point
|
|
85
|
+
2. Reduce to 1-2 lines that trust the model
|
|
86
|
+
3. Remove examples, edge cases, detailed instructions
|
|
87
|
+
|
|
88
|
+
## Audit Report
|
|
89
|
+
|
|
90
|
+
After checking all files, summarize:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
CLAUDE.md Audit Summary
|
|
94
|
+
=======================
|
|
95
|
+
Files checked: X
|
|
96
|
+
Issues found: Y
|
|
97
|
+
Issues fixed: Z
|
|
98
|
+
|
|
99
|
+
Changes made:
|
|
100
|
+
- [file]: [what was fixed]
|
|
101
|
+
- [file]: [what was fixed]
|
|
102
|
+
|
|
103
|
+
Remaining concerns:
|
|
104
|
+
- [any issues that need human decision]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Red Flags
|
|
108
|
+
|
|
109
|
+
These indicate a CLAUDE.md that needs significant rework:
|
|
110
|
+
|
|
111
|
+
- **200+ lines** - Needs major pruning
|
|
112
|
+
- **Code blocks with >10 lines** - Workflows belong in docs
|
|
113
|
+
- **Tables with >5 rows** - Probably too detailed
|
|
114
|
+
- **Multiple "how to" sections** - Wrong content type
|
|
115
|
+
- **Same content in parent and child** - Hierarchy violation
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Creating a CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Before Writing
|
|
4
|
+
|
|
5
|
+
1. **Check the hierarchy** - Find all parent CLAUDE.md files up to the root
|
|
6
|
+
2. **Read them** - Understand what's already covered
|
|
7
|
+
3. **Identify the gap** - What does this folder need that parents don't provide?
|
|
8
|
+
|
|
9
|
+
If the parent files already cover everything, you probably don't need a new CLAUDE.md.
|
|
10
|
+
|
|
11
|
+
## Structure Template
|
|
12
|
+
|
|
13
|
+
Use this as a starting point, not a rigid template. Include only sections that add value.
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# [Folder/Project Name]
|
|
17
|
+
|
|
18
|
+
[One-line description of what this is and why it exists]
|
|
19
|
+
|
|
20
|
+
## Current Focus
|
|
21
|
+
|
|
22
|
+
[What's actively being worked on. What matters NOW.]
|
|
23
|
+
|
|
24
|
+
## [Key Section]
|
|
25
|
+
|
|
26
|
+
[Whatever is most important for this specific folder - could be dev commands, structure, rules, etc.]
|
|
27
|
+
|
|
28
|
+
## Finding Information
|
|
29
|
+
|
|
30
|
+
[Where to look for docs, workflows, detailed guides - progressive disclosure]
|
|
31
|
+
|
|
32
|
+
## Gotchas
|
|
33
|
+
|
|
34
|
+
[Non-obvious things that would save pain if known upfront]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Guidelines
|
|
38
|
+
|
|
39
|
+
### Keep It Short
|
|
40
|
+
Aim for 40-80 lines. If you're going longer, you're probably including content that belongs elsewhere.
|
|
41
|
+
|
|
42
|
+
### Lead with Purpose
|
|
43
|
+
The first lines should orient Claude immediately. What is this? Why does it exist?
|
|
44
|
+
|
|
45
|
+
### Current Focus Section
|
|
46
|
+
Include this for active projects. It answers "what matters NOW?" and helps Claude prioritize.
|
|
47
|
+
|
|
48
|
+
### Be Specific to This Folder
|
|
49
|
+
Everything in this file should be specific to this directory. General project info belongs in the root CLAUDE.md.
|
|
50
|
+
|
|
51
|
+
### Progressive Disclosure
|
|
52
|
+
Point to docs, don't inline them:
|
|
53
|
+
- Good: "See `docs/systems/M5_CLOUD.md` for server access"
|
|
54
|
+
- Bad: [50 lines of SSH commands and credentials]
|
|
55
|
+
|
|
56
|
+
## What NOT to Include
|
|
57
|
+
|
|
58
|
+
- Content from parent CLAUDE.md files
|
|
59
|
+
- Step-by-step workflows (put in docs/)
|
|
60
|
+
- Detailed examples (trust the model)
|
|
61
|
+
- Frequently changing content
|
|
62
|
+
- Anything Claude could infer from the code
|
|
63
|
+
|
|
64
|
+
## After Writing
|
|
65
|
+
|
|
66
|
+
Verify:
|
|
67
|
+
1. Under 100 lines?
|
|
68
|
+
2. No duplication with parent files?
|
|
69
|
+
3. Would Claude know where it is and what matters?
|
|
70
|
+
4. Written as orientation, not documentation?
|
|
71
|
+
|
|
72
|
+
If all yes, you're done.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# CLAUDE.md Principles
|
|
2
|
+
|
|
3
|
+
## The Mental Model
|
|
4
|
+
|
|
5
|
+
CLAUDE.md files are prompts for orienting Claude in a codebase. They're read automatically when Claude works in a directory.
|
|
6
|
+
|
|
7
|
+
**Think of it as a briefing for a senior colleague joining the project** - not a manual for a junior who needs hand-holding.
|
|
8
|
+
|
|
9
|
+
## The Test
|
|
10
|
+
|
|
11
|
+
After reading a CLAUDE.md, would Claude know:
|
|
12
|
+
1. Where it is (what is this folder/repo?)
|
|
13
|
+
2. What matters NOW (current focus, active work)
|
|
14
|
+
3. Where to find things (progressive disclosure to docs)
|
|
15
|
+
4. What gotchas exist (tribal knowledge)
|
|
16
|
+
|
|
17
|
+
If yes, the file is doing its job.
|
|
18
|
+
|
|
19
|
+
## What Belongs
|
|
20
|
+
|
|
21
|
+
### Purpose and Context
|
|
22
|
+
- What this folder/repo is and why it exists
|
|
23
|
+
- The mental model for how things fit together
|
|
24
|
+
- Current focus - what's actively being worked on
|
|
25
|
+
|
|
26
|
+
### Progressive Disclosure
|
|
27
|
+
- Pointers to documentation ("See docs/INDEX.md for...")
|
|
28
|
+
- Key reference docs listed by name
|
|
29
|
+
- Where workflows and detailed guides live
|
|
30
|
+
|
|
31
|
+
### Tribal Knowledge
|
|
32
|
+
- Gotchas discovered during sessions
|
|
33
|
+
- Non-obvious conventions
|
|
34
|
+
- Things that would save pain if known upfront
|
|
35
|
+
- "We use X instead of Y" (without spelling out examples)
|
|
36
|
+
|
|
37
|
+
### Quick Reference (sparingly)
|
|
38
|
+
- Dev commands if truly common (one-liners only)
|
|
39
|
+
- Key URLs or entry points
|
|
40
|
+
- Simple folder structure if it aids orientation
|
|
41
|
+
|
|
42
|
+
## What Does NOT Belong
|
|
43
|
+
|
|
44
|
+
### Duplicated Content
|
|
45
|
+
Claude reads CLAUDE.md files up through the hierarchy automatically. If a parent file says "We use TypeScript", the child file should NOT repeat this.
|
|
46
|
+
|
|
47
|
+
**Rule:** Before adding something, check if a parent already covers it.
|
|
48
|
+
|
|
49
|
+
### Detailed Workflows
|
|
50
|
+
Step-by-step processes belong in:
|
|
51
|
+
- `docs/` folder
|
|
52
|
+
- Skills (`.claude/skills/`)
|
|
53
|
+
- Dedicated workflow files
|
|
54
|
+
|
|
55
|
+
CLAUDE.md points to these, doesn't contain them.
|
|
56
|
+
|
|
57
|
+
### Micromanagement
|
|
58
|
+
Trust the model. If you say "We use Base UI instead of Radix", Claude understands the implications. Don't add:
|
|
59
|
+
- Lists of every Radix component and its Base UI equivalent
|
|
60
|
+
- Example code for each case
|
|
61
|
+
- Exhaustive edge cases
|
|
62
|
+
|
|
63
|
+
### Operational Runbooks
|
|
64
|
+
SSH commands, database credentials, deployment scripts - these belong in dedicated docs, not CLAUDE.md.
|
|
65
|
+
|
|
66
|
+
### Frequently Changing Content
|
|
67
|
+
CLAUDE.md should be stable. If content changes often, it belongs elsewhere (like CURRENT_WORK.md or a status doc).
|
|
68
|
+
|
|
69
|
+
## Length Guideline
|
|
70
|
+
|
|
71
|
+
No hard limit, but **over 100 lines is suspect**.
|
|
72
|
+
|
|
73
|
+
A good CLAUDE.md is typically 40-80 lines. If it's longer, ask:
|
|
74
|
+
- Is there duplication with parent files?
|
|
75
|
+
- Are there workflows that should be extracted?
|
|
76
|
+
- Am I explaining things Claude already knows?
|
|
77
|
+
|
|
78
|
+
## Writing Style
|
|
79
|
+
|
|
80
|
+
CLAUDE.md files are prompts. Apply prompting best practices:
|
|
81
|
+
|
|
82
|
+
### Explain WHY, Not Just WHAT
|
|
83
|
+
Bad: "Run `npm run dev` to start the server"
|
|
84
|
+
Good: "Dev server runs on :5173. Hot reload handles code changes - no restart needed."
|
|
85
|
+
|
|
86
|
+
### Positive Framing
|
|
87
|
+
Bad: "Don't put workflows in CLAUDE.md"
|
|
88
|
+
Good: "Workflows belong in docs/ or skills/"
|
|
89
|
+
|
|
90
|
+
### Be Direct
|
|
91
|
+
Bad: "You might want to check the docs folder"
|
|
92
|
+
Good: "Start at docs/INDEX.md for all documentation"
|
|
93
|
+
|
|
94
|
+
### Trust Intelligence
|
|
95
|
+
Bad: Listing every ShadCN component and how to use it
|
|
96
|
+
Good: "Use ShadCN for all UI. Discuss before building custom components."
|
|
97
|
+
|
|
98
|
+
## Hierarchy Examples
|
|
99
|
+
|
|
100
|
+
**Root CLAUDE.md** (project level):
|
|
101
|
+
- What the project is
|
|
102
|
+
- Overall structure
|
|
103
|
+
- Where documentation lives
|
|
104
|
+
- External systems overview
|
|
105
|
+
|
|
106
|
+
**Subdirectory CLAUDE.md** (e.g., `roost/CLAUDE.md`):
|
|
107
|
+
- What this specific folder is
|
|
108
|
+
- Rules specific to this codebase
|
|
109
|
+
- Dev commands for this folder
|
|
110
|
+
- Does NOT repeat project-level context
|
|
111
|
+
|
|
112
|
+
**Deep subdirectory** (e.g., `src/components/CLAUDE.md`):
|
|
113
|
+
- Only if there's something specific to know
|
|
114
|
+
- Usually unnecessary - parent files cover it
|
|
115
|
+
- If created, extremely focused (20-30 lines max)
|
|
116
|
+
|
|
117
|
+
## Capturing Gotchas
|
|
118
|
+
|
|
119
|
+
When a session reveals something painful:
|
|
120
|
+
|
|
121
|
+
1. **Identify the learning** - What would have saved time if known upfront?
|
|
122
|
+
2. **Find the right file** - Which CLAUDE.md is this specific to?
|
|
123
|
+
3. **Add concisely** - One or two lines, not a full explanation
|
|
124
|
+
4. **Trust the model** - State the gotcha, don't over-explain
|
|
125
|
+
|
|
126
|
+
Example:
|
|
127
|
+
```markdown
|
|
128
|
+
## Gotchas
|
|
129
|
+
|
|
130
|
+
- qrServer tracks `development` branch, not master
|
|
131
|
+
- Convex queries can't be called from other queries - use actions for composition
|
|
132
|
+
```
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
- [Step 4: Write the Skill](#step-4-write-the-skill)
|
|
10
10
|
- [Step 5: Choose Install Location](#step-5-choose-install-location)
|
|
11
11
|
- [Step 6: Validate](#step-6-validate-feedback-loop)
|
|
12
|
-
- [Step 7:
|
|
13
|
-
- [Step 8: Test](#step-8-test)
|
|
12
|
+
- [Step 7: Test](#step-7-test)
|
|
14
13
|
- [Key Principles](#key-principles)
|
|
15
14
|
- [Quality Check](#quality-check)
|
|
16
15
|
|
|
@@ -27,7 +26,6 @@ Copy and track progress:
|
|
|
27
26
|
- [ ] Wrote skill as instructions (not docs)
|
|
28
27
|
- [ ] Chose install location
|
|
29
28
|
- [ ] Validated (loop until clean)
|
|
30
|
-
- [ ] Offered slash command (optional)
|
|
31
29
|
- [ ] Tested activation
|
|
32
30
|
```
|
|
33
31
|
|
|
@@ -130,42 +128,11 @@ Then manually verify:
|
|
|
130
128
|
- Would Claude know what to DO after reading this?
|
|
131
129
|
- Is heavy content in references/, not inline?
|
|
132
130
|
|
|
133
|
-
## Step 7:
|
|
134
|
-
|
|
135
|
-
Ask the user: "Would you like a slash command to explicitly invoke this skill?"
|
|
136
|
-
|
|
137
|
-
**When to recommend a command:**
|
|
138
|
-
- Skills that users will invoke frequently
|
|
139
|
-
- Skills where explicit invocation is clearer than description matching
|
|
140
|
-
- Skills that are the entry point to complex workflows
|
|
141
|
-
|
|
142
|
-
**If yes, create a command file:**
|
|
143
|
-
|
|
144
|
-
```markdown
|
|
145
|
-
---
|
|
146
|
-
description: [Same as or similar to skill description]
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
Invoke the [skill-name] skill immediately:
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
Skill(skill: "[skill-name]")
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
The skill contains all workflow instructions. Do not proceed until you have invoked the skill.
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**Location:**
|
|
159
|
-
- User level: `~/.claude/commands/[command-name].md`
|
|
160
|
-
- Project level: `.claude/commands/[command-name].md`
|
|
161
|
-
|
|
162
|
-
**Naming:** Command name is typically the skill name without gerund (e.g., skill `creating-reports` → command `/create-report`).
|
|
163
|
-
|
|
164
|
-
## Step 8: Test
|
|
131
|
+
## Step 7: Test
|
|
165
132
|
|
|
166
133
|
Guide the user:
|
|
167
134
|
1. Restart Claude Code
|
|
168
|
-
2. Say one of the trigger phrases
|
|
135
|
+
2. Say one of the trigger phrases or use `/skill-name` to invoke directly
|
|
169
136
|
3. Verify the skill activates and behaves as expected
|
|
170
137
|
|
|
171
138
|
If it doesn't work, iterate. The conversation isn't over until the skill works.
|
|
@@ -250,15 +250,10 @@ Claude reads skill descriptions and decides when to activate based on user reque
|
|
|
250
250
|
- Fails if description is too detailed
|
|
251
251
|
|
|
252
252
|
**2. Explicit (Slash Command)**
|
|
253
|
-
|
|
254
|
-
```markdown
|
|
255
|
-
# /create-skill command
|
|
256
|
-
Activate the creating-agent-skills skill to guide the user through skill creation.
|
|
257
|
-
```
|
|
258
|
-
Most reliable method.
|
|
253
|
+
Every skill automatically works as a slash command using `/skill-name`. This is the most reliable activation method.
|
|
259
254
|
|
|
260
255
|
**3. Hybrid (Recommended)**
|
|
261
|
-
|
|
256
|
+
Use `/skill-name` for explicit invocation when needed, while a good description enables autonomous discovery for natural conversations.
|
|
262
257
|
|
|
263
258
|
## Iterative Development
|
|
264
259
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-interview
|
|
3
|
+
description: This skill helps create thorough feature specifications through conversation. Use when the user says "spec out a feature", "create a specification", "design a feature", "I need to plan a feature", or wants to document requirements before building.
|
|
4
|
+
argument-hint: <spec-name>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Spec Interview
|
|
8
|
+
|
|
9
|
+
Guide the user through creating a complete feature specification via structured conversation.
|
|
10
|
+
|
|
11
|
+
## What To Do Now
|
|
12
|
+
|
|
13
|
+
1. **Ask what feature they want to spec out** using AskUserQuestion
|
|
14
|
+
2. **Create the spec directory** at `docs/specs/<feature-name>/`
|
|
15
|
+
3. **Begin the interview** - read `references/interview-guide.md`
|
|
16
|
+
|
|
17
|
+
## Key Principles
|
|
18
|
+
|
|
19
|
+
**Interviewer, not form.** Have a natural conversation. Ask follow-up questions. Dig into details that seem unclear.
|
|
20
|
+
|
|
21
|
+
**Subagents for research.** Offload exploration and research to subagents to keep the main interview context clean. They return only relevant findings.
|
|
22
|
+
|
|
23
|
+
**One or two questions at a time.** Use AskUserQuestion liberally. This is a conversation, not an interrogation.
|
|
24
|
+
|
|
25
|
+
**Implementation-ready output.** The finished spec should enable hands-off implementation with zero clarification needed.
|
|
26
|
+
|
|
27
|
+
## Spec Location
|
|
28
|
+
|
|
29
|
+
Specs live at: `docs/specs/<feature-name>/spec.md`
|
|
30
|
+
|
|
31
|
+
The feature name is derived from the user's description (kebab-case, concise).
|
|
32
|
+
|
|
33
|
+
## When You Think the Spec is Complete
|
|
34
|
+
|
|
35
|
+
Before finalizing, invoke the `spec-review` skill to check for gaps. It will return specific feedback. If gaps exist, ask follow-up questions to address them.
|
|
36
|
+
|
|
37
|
+
Only finalize when review passes.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Interview Guide
|
|
2
|
+
|
|
3
|
+
## The Interview Flow
|
|
4
|
+
|
|
5
|
+
This is a conversation, not a checklist march. But ensure all areas get covered naturally.
|
|
6
|
+
|
|
7
|
+
### Opening
|
|
8
|
+
|
|
9
|
+
Start with open-ended understanding:
|
|
10
|
+
- "Tell me about this feature. What problem does it solve?"
|
|
11
|
+
- "Who will use this? What's their goal?"
|
|
12
|
+
- "Walk me through what success looks like."
|
|
13
|
+
|
|
14
|
+
Let the user talk. Ask follow-ups on anything unclear.
|
|
15
|
+
|
|
16
|
+
### Areas to Cover
|
|
17
|
+
|
|
18
|
+
Cover these naturally through conversation. Don't force the order.
|
|
19
|
+
|
|
20
|
+
**Intent & Goals**
|
|
21
|
+
- What is the user trying to accomplish?
|
|
22
|
+
- Why does this matter? What's the business/user value?
|
|
23
|
+
- What does success look like? How will we know it's working?
|
|
24
|
+
|
|
25
|
+
**Integration Points**
|
|
26
|
+
- What existing parts of the system does this touch?
|
|
27
|
+
- Are there external services, APIs, or libraries involved?
|
|
28
|
+
- What data flows in and out?
|
|
29
|
+
|
|
30
|
+
→ *Use subagents to investigate the current codebase when integration questions arise.*
|
|
31
|
+
|
|
32
|
+
**Data Model**
|
|
33
|
+
- What entities/objects are involved?
|
|
34
|
+
- What are the relationships between them?
|
|
35
|
+
- What constraints exist (required fields, validations, limits)?
|
|
36
|
+
- Are we extending existing models or creating new ones?
|
|
37
|
+
|
|
38
|
+
**Behavior & Flows**
|
|
39
|
+
- What are the main user flows?
|
|
40
|
+
- What triggers this feature? What happens step by step?
|
|
41
|
+
- Are there different modes or variations?
|
|
42
|
+
|
|
43
|
+
**Edge Cases & Error Handling**
|
|
44
|
+
- What can go wrong?
|
|
45
|
+
- What happens with invalid input?
|
|
46
|
+
- What are the boundary conditions?
|
|
47
|
+
- How do we handle partial failures?
|
|
48
|
+
|
|
49
|
+
**Acceptance Criteria**
|
|
50
|
+
- How do we verify this works?
|
|
51
|
+
- What are the specific, testable requirements?
|
|
52
|
+
- What would make this "done"?
|
|
53
|
+
|
|
54
|
+
**Blockers & Dependencies**
|
|
55
|
+
- What external dependencies exist? (APIs, services, libraries)
|
|
56
|
+
- Are there credentials, API keys, or access needed?
|
|
57
|
+
- Are there decisions that need to be made before implementation?
|
|
58
|
+
- Is anything waiting on external input?
|
|
59
|
+
|
|
60
|
+
### Research During Interview
|
|
61
|
+
|
|
62
|
+
When you need to understand something about the current system, external libraries, or technical feasibility:
|
|
63
|
+
|
|
64
|
+
- Use **Explore agents** to investigate the codebase or research external APIs/libraries
|
|
65
|
+
- Use **Plan agents** to evaluate technical approaches or architectural decisions
|
|
66
|
+
|
|
67
|
+
Keep the main interview context clean. Agents return only the relevant findings you need to continue the conversation.
|
|
68
|
+
|
|
69
|
+
### Writing the Spec
|
|
70
|
+
|
|
71
|
+
As you gather information, write to `docs/specs/<name>/spec.md`. Update it incrementally during the conversation.
|
|
72
|
+
|
|
73
|
+
**Spec structure:**
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# [Feature Name]
|
|
77
|
+
|
|
78
|
+
## Overview
|
|
79
|
+
[2-3 sentences: what this is and why it matters]
|
|
80
|
+
|
|
81
|
+
## Goals
|
|
82
|
+
- [Primary goal]
|
|
83
|
+
- [Secondary goals if any]
|
|
84
|
+
|
|
85
|
+
## Integration Points
|
|
86
|
+
[How this connects to existing system]
|
|
87
|
+
- Touches: [existing components]
|
|
88
|
+
- External: [APIs, services, libraries]
|
|
89
|
+
- Data flows: [in/out]
|
|
90
|
+
|
|
91
|
+
## Data Model
|
|
92
|
+
[Entities, relationships, constraints]
|
|
93
|
+
|
|
94
|
+
## Behavior
|
|
95
|
+
### [Flow 1]
|
|
96
|
+
[Step by step]
|
|
97
|
+
|
|
98
|
+
### [Flow 2]
|
|
99
|
+
[Step by step]
|
|
100
|
+
|
|
101
|
+
## Edge Cases
|
|
102
|
+
- [Edge case]: [how handled]
|
|
103
|
+
|
|
104
|
+
## Acceptance Criteria
|
|
105
|
+
- [ ] [Testable requirement]
|
|
106
|
+
- [ ] [Testable requirement]
|
|
107
|
+
|
|
108
|
+
## Blockers
|
|
109
|
+
- [ ] [Blocker]: [what's needed]
|
|
110
|
+
- [ ] [Decision needed]: [options]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Completion Check
|
|
114
|
+
|
|
115
|
+
When the spec seems complete, invoke the `spec-review` skill and specify which spec to review in the prompt. It analyzes the spec and returns feedback. If gaps are found, ask follow-up questions. Repeat until review passes.
|
|
116
|
+
|
|
117
|
+
### Finalizing
|
|
118
|
+
|
|
119
|
+
Once review passes:
|
|
120
|
+
1. Confirm with user and show the final spec
|
|
121
|
+
2. Ask if they want to proceed to task breakdown
|
|
122
|
+
|
|
123
|
+
If yes, invoke the `spec-to-tasks` skill and specify which spec to break down.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-review
|
|
3
|
+
description: Reviews a feature specification for completeness. Called by spec-interview when a spec seems complete, or invoke directly with "review the spec", "check spec completeness", "is this spec ready".
|
|
4
|
+
argument-hint: <spec-name>
|
|
5
|
+
context: fork
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Spec Review
|
|
9
|
+
|
|
10
|
+
Analyze a specification for completeness and identify gaps.
|
|
11
|
+
|
|
12
|
+
## What To Do
|
|
13
|
+
|
|
14
|
+
1. **Identify the spec to review** - use the spec path if specified in the prompt, otherwise check git for the most recently modified spec in `docs/specs/`
|
|
15
|
+
2. **Read the spec file**
|
|
16
|
+
3. **Evaluate against the checklist below**
|
|
17
|
+
4. **Return structured feedback**
|
|
18
|
+
|
|
19
|
+
## Completeness Checklist
|
|
20
|
+
|
|
21
|
+
A spec is implementation-ready when ALL of these are satisfied:
|
|
22
|
+
|
|
23
|
+
### Must Have (Blocking if missing)
|
|
24
|
+
|
|
25
|
+
- [ ] **Clear intent** - What is being built and why is unambiguous
|
|
26
|
+
- [ ] **Data model defined** - Entities, relationships, and constraints are explicit
|
|
27
|
+
- [ ] **Integration points mapped** - What existing code this touches is documented
|
|
28
|
+
- [ ] **Core behavior specified** - Main flows are step-by-step clear
|
|
29
|
+
- [ ] **Acceptance criteria exist** - Testable requirements are listed
|
|
30
|
+
|
|
31
|
+
### Should Have (Gaps that cause implementation friction)
|
|
32
|
+
|
|
33
|
+
- [ ] **Edge cases covered** - Error conditions and boundaries are addressed
|
|
34
|
+
- [ ] **External dependencies documented** - APIs, libraries, services are listed
|
|
35
|
+
- [ ] **Blockers section exists** - Missing credentials, pending decisions are called out
|
|
36
|
+
|
|
37
|
+
### Implementation Readiness
|
|
38
|
+
|
|
39
|
+
Ask yourself: "Could someone implement this feature completely hands-off, with zero questions?"
|
|
40
|
+
|
|
41
|
+
Check for:
|
|
42
|
+
- Vague language ("should handle errors appropriately" → HOW?)
|
|
43
|
+
- Missing details ("integrates with auth" → WHERE? HOW?)
|
|
44
|
+
- Unstated assumptions ("uses the standard pattern" → WHICH pattern?)
|
|
45
|
+
- Blocking dependencies ("needs API access" → DO WE HAVE IT?)
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
|
|
49
|
+
Return the review as:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
## Spec Review: [Feature Name]
|
|
53
|
+
|
|
54
|
+
### Status: [READY | NEEDS WORK]
|
|
55
|
+
|
|
56
|
+
### Missing (Blocking)
|
|
57
|
+
- [Item]: [What's missing and why it blocks implementation]
|
|
58
|
+
|
|
59
|
+
### Gaps (Non-blocking but should address)
|
|
60
|
+
- [Item]: [What's unclear or incomplete]
|
|
61
|
+
|
|
62
|
+
### Blocking Dependencies
|
|
63
|
+
- [Dependency]: [What's needed before implementation can start]
|
|
64
|
+
|
|
65
|
+
### Recommendation
|
|
66
|
+
[Specific questions to ask the user, or "Spec is implementation-ready"]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If status is READY, the spec can proceed to task breakdown.
|
|
70
|
+
If status is NEEDS WORK, list the specific questions that need answers.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-to-tasks
|
|
3
|
+
description: Breaks a feature specification into implementation tasks. Use when the user says "break down the spec", "create tasks from spec", "generate task list", or after a spec review passes.
|
|
4
|
+
argument-hint: <spec-name>
|
|
5
|
+
context: fork
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Spec to Tasks
|
|
9
|
+
|
|
10
|
+
Convert a completed specification into an ordered list of atomic implementation tasks.
|
|
11
|
+
|
|
12
|
+
## What To Do
|
|
13
|
+
|
|
14
|
+
1. **Identify the spec** - use the spec path if specified in the prompt, otherwise check git for the most recently modified spec in `docs/specs/`
|
|
15
|
+
2. **Explore the codebase** - use a subagent to identify existing patterns, conventions, and where code should live
|
|
16
|
+
3. **Generate the task manifest** - create `tasks.yaml` in the same directory as the spec
|
|
17
|
+
4. **Review with user** - show the task list for approval
|
|
18
|
+
|
|
19
|
+
## Task Principles
|
|
20
|
+
|
|
21
|
+
**Atomic tasks.** Each task is a single, focused change:
|
|
22
|
+
- One model/entity
|
|
23
|
+
- One endpoint/route
|
|
24
|
+
- One component
|
|
25
|
+
- One test file
|
|
26
|
+
|
|
27
|
+
A task should take an AI agent one focused session to complete.
|
|
28
|
+
|
|
29
|
+
**Ordered by dependency.** Tasks are sequenced so each can be completed in order without blocking.
|
|
30
|
+
|
|
31
|
+
**Include file paths.** Each task specifies the target file(s) based on codebase exploration.
|
|
32
|
+
|
|
33
|
+
**No code in tasks.** Tasks describe WHAT to do, not HOW. Implementation details are in the spec.
|
|
34
|
+
|
|
35
|
+
## Task Format
|
|
36
|
+
|
|
37
|
+
Write to `docs/specs/<name>/tasks.yaml`:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
spec: <name>
|
|
41
|
+
spec_path: docs/specs/<name>/spec.md
|
|
42
|
+
generated: <ISO timestamp>
|
|
43
|
+
|
|
44
|
+
tasks:
|
|
45
|
+
- id: T001
|
|
46
|
+
title: <Short descriptive title>
|
|
47
|
+
description: |
|
|
48
|
+
<What to implement>
|
|
49
|
+
<Reference to spec section if applicable>
|
|
50
|
+
files:
|
|
51
|
+
- <path/to/file.ts>
|
|
52
|
+
depends_on: []
|
|
53
|
+
acceptance: |
|
|
54
|
+
<How to verify this task is complete>
|
|
55
|
+
|
|
56
|
+
- id: T002
|
|
57
|
+
title: <Next task>
|
|
58
|
+
description: |
|
|
59
|
+
<What to implement>
|
|
60
|
+
files:
|
|
61
|
+
- <path/to/file.ts>
|
|
62
|
+
depends_on: [T001]
|
|
63
|
+
acceptance: |
|
|
64
|
+
<Verification criteria>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Generating File Paths
|
|
68
|
+
|
|
69
|
+
Before writing tasks, explore the codebase to understand:
|
|
70
|
+
- Existing file patterns (where do models live? services? routes?)
|
|
71
|
+
- Specific files that need modification
|
|
72
|
+
- New files that need creation and where they should go
|
|
73
|
+
|
|
74
|
+
Use these findings to populate the `files` field for each task.
|
|
75
|
+
|
|
76
|
+
## Ordering Tasks
|
|
77
|
+
|
|
78
|
+
Sequence by dependency:
|
|
79
|
+
1. **Data layer first** - Models, schemas, database changes
|
|
80
|
+
2. **Business logic** - Services, utilities, core functions
|
|
81
|
+
3. **API layer** - Routes, controllers, endpoints
|
|
82
|
+
4. **Integration** - Connecting components, wiring up
|
|
83
|
+
5. **Tests** - Can be parallel with implementation or after
|
|
84
|
+
|
|
85
|
+
If tasks are independent, give them the same `depends_on`. This signals they could run in parallel.
|
|
86
|
+
|
|
87
|
+
## Output
|
|
88
|
+
|
|
89
|
+
After generating:
|
|
90
|
+
1. Show the user a summary: number of tasks, estimated scope
|
|
91
|
+
2. List the task titles in order
|
|
92
|
+
3. Ask if they want to see the full YAML or proceed to implementation
|
|
93
|
+
|
|
94
|
+
Save the manifest to `docs/specs/<name>/tasks.yaml`.
|