cc-dev-template 0.1.49 → 0.1.51
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/bin/install.js +30 -6
- package/package.json +1 -1
- package/src/skills/claude-md/SKILL.md +1 -8
- package/src/skills/claude-md/references/audit.md +1 -10
- package/src/skills/claude-md/references/create.md +2 -2
- package/src/skills/initialize-project/SKILL.md +17 -68
- package/src/skills/initialize-project/templates/CLAUDE.md.template +10 -0
- package/src/skills/initialize-project/templates/CURRENT_WORK.md.template +13 -0
- package/src/skills/initialize-project/templates/INDEX.md.template +7 -0
- package/src/skills/prompting/SKILL.md +9 -116
- package/src/skills/prompting/references/create.md +59 -0
- package/src/skills/prompting/references/principles.md +60 -0
- package/src/skills/prompting/references/review.md +78 -0
- package/src/skills/spec-interview/SKILL.md +4 -26
- package/src/skills/spec-interview/references/step-1-opening.md +21 -0
- package/src/skills/spec-interview/references/step-2-deep-dive.md +77 -0
- package/src/skills/spec-interview/references/step-3-finalize.md +19 -0
- package/src/skills/spec-review/SKILL.md +12 -14
- package/src/skills/spec-to-tasks/SKILL.md +3 -85
- package/src/skills/spec-to-tasks/references/step-1-identify-spec.md +30 -0
- package/src/skills/spec-to-tasks/references/step-2-explore.md +25 -0
- package/src/skills/spec-to-tasks/references/step-3-generate.md +31 -0
- package/src/skills/spec-to-tasks/templates/tasks.yaml +25 -0
- package/src/mcp-servers/qa-server/README.md +0 -122
- package/src/mcp-servers/qa-server/package-lock.json +0 -2015
- package/src/mcp-servers/qa-server/package.json +0 -28
- package/src/mcp-servers/qa-server/src/index.ts +0 -220
- package/src/mcp-servers/qa-server/tsconfig.json +0 -17
- package/src/skills/spec-interview/references/interview-guide.md +0 -123
package/bin/install.js
CHANGED
|
@@ -255,6 +255,32 @@ if (fs.existsSync(mergeSettingsPath)) {
|
|
|
255
255
|
console.log('\nCleanup:');
|
|
256
256
|
let cleanupPerformed = false;
|
|
257
257
|
|
|
258
|
+
// Remove deprecated skills
|
|
259
|
+
const deprecatedSkills = ['youtube-to-notes'];
|
|
260
|
+
deprecatedSkills.forEach(skill => {
|
|
261
|
+
const skillPath = path.join(CLAUDE_DIR, 'skills', skill);
|
|
262
|
+
if (fs.existsSync(skillPath)) {
|
|
263
|
+
fs.rmSync(skillPath, { recursive: true });
|
|
264
|
+
console.log(`✓ Removed deprecated skill: ${skill}`);
|
|
265
|
+
cleanupPerformed = true;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
// Remove deprecated MCP servers
|
|
270
|
+
const deprecatedMcpServers = ['qa-server'];
|
|
271
|
+
deprecatedMcpServers.forEach(server => {
|
|
272
|
+
const serverPath = path.join(CLAUDE_DIR, 'mcp-servers', server);
|
|
273
|
+
if (fs.existsSync(serverPath)) {
|
|
274
|
+
fs.rmSync(serverPath, { recursive: true });
|
|
275
|
+
// Unregister from Claude Code
|
|
276
|
+
try {
|
|
277
|
+
execSync(`claude mcp remove ${server} 2>/dev/null || true`, { stdio: 'pipe' });
|
|
278
|
+
} catch (e) {}
|
|
279
|
+
console.log(`✓ Removed deprecated MCP server: ${server}`);
|
|
280
|
+
cleanupPerformed = true;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
258
284
|
// Remove deprecated bash wrapper files
|
|
259
285
|
const deprecatedFiles = [
|
|
260
286
|
path.join(CLAUDE_DIR, 'hooks', 'bash-precheck.sh'),
|
|
@@ -341,13 +367,11 @@ These settings are available globally across all your projects.
|
|
|
341
367
|
Commands:
|
|
342
368
|
/prime - Start a session (orientation, scaffolding for new projects)
|
|
343
369
|
/done - End a session (sync docs, commit work)
|
|
344
|
-
|
|
345
|
-
MCP Server Notes:
|
|
346
|
-
- qa-server: Spawns a sub-agent for frontend visual inspection
|
|
347
|
-
Saves ~20k tokens by offloading browser tools to sub-agent
|
|
348
|
-
If you have chrome-devtools MCP installed, consider removing it:
|
|
349
|
-
claude mcp remove chrome-devtools
|
|
350
370
|
`);
|
|
351
371
|
}
|
|
352
372
|
|
|
373
|
+
console.log(`Note: This installer contains no API keys, credentials, or private data.
|
|
374
|
+
It's safe to share and anyone can run it.
|
|
375
|
+
`);
|
|
376
|
+
|
|
353
377
|
console.log('Restart Claude Code to pick up changes.');
|
package/package.json
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: claude-md
|
|
3
|
-
description:
|
|
3
|
+
description: Manages CLAUDE.md files - the orientation prompts that help Claude understand codebases. Activates for auditing, creating, updating, or cleaning up CLAUDE.md files. Also activates before modifying any CLAUDE.md file to ensure best practices are followed.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CLAUDE.md Management
|
|
7
7
|
|
|
8
8
|
Base directory for this skill: ~/.claude/skills/claude-md
|
|
9
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
10
|
## What To Do
|
|
18
11
|
|
|
19
12
|
Determine the task:
|
|
@@ -9,16 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Step 1: Discover
|
|
11
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
|
-
```
|
|
12
|
+
Find all CLAUDE.md files using Glob pattern `**/CLAUDE.md`.
|
|
22
13
|
|
|
23
14
|
## Step 2: Map Hierarchy
|
|
24
15
|
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
2. **Read them** - Understand what's already covered
|
|
7
7
|
3. **Identify the gap** - What does this folder need that parents don't provide?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Skip creating a new CLAUDE.md if parent files already cover everything needed.
|
|
10
10
|
|
|
11
11
|
## Structure Template
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Starting template. Include only sections that add value.
|
|
14
14
|
|
|
15
15
|
```markdown
|
|
16
16
|
# [Folder/Project Name]
|
|
@@ -1,84 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: initialize-project
|
|
3
|
-
description: Scaffold docs structure for Claude Code sessions. Use when starting a new project
|
|
3
|
+
description: Scaffold docs structure for Claude Code sessions. Use when starting a new project, when "docs/CURRENT_WORK.md is missing", or when user says "initialize this project" or "set up session tracking".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Initialize Project
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Ask the user:
|
|
9
|
+
- "What is this project? (1-2 sentences)"
|
|
10
|
+
- "Primary language/framework?" (optional)
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Create the Docs Structure
|
|
11
13
|
|
|
12
|
-
Create
|
|
14
|
+
Create `docs/INDEX.md` using `templates/INDEX.md.template`. Replace `{{PROJECT_NAME}}` with the project name.
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
Create `docs/CURRENT_WORK.md` using `templates/CURRENT_WORK.md.template`.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
## Handle CLAUDE.md
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
- "What is this project? (1-2 sentences)"
|
|
20
|
-
- "Primary language/framework?" (optional, for CLAUDE.md context)
|
|
20
|
+
Check if CLAUDE.md exists and has content.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**If missing or empty:** Create using `templates/CLAUDE.md.template`. Replace placeholders with user's answers.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
```markdown
|
|
26
|
-
# [Project Name] Documentation
|
|
24
|
+
**If exists with content:** Leave unchanged.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
- [Current Work](CURRENT_WORK.md) - Active tasks and project status
|
|
26
|
+
## Confirm Completion
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
Report what was created:
|
|
29
|
+
- `docs/INDEX.md` - documentation hub
|
|
30
|
+
- `docs/CURRENT_WORK.md` - status tracking
|
|
31
|
+
- `CLAUDE.md` - created or unchanged
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
```markdown
|
|
37
|
-
# Current Work
|
|
38
|
-
|
|
39
|
-
## In Progress
|
|
40
|
-
- (none)
|
|
41
|
-
|
|
42
|
-
## Up Next
|
|
43
|
-
- (add your first task)
|
|
44
|
-
|
|
45
|
-
## Blocked / Waiting
|
|
46
|
-
- (none)
|
|
47
|
-
|
|
48
|
-
## Open Questions
|
|
49
|
-
- (none)
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
4. **Handle CLAUDE.md:**
|
|
53
|
-
|
|
54
|
-
Check if CLAUDE.md exists and has content.
|
|
55
|
-
|
|
56
|
-
**If missing or empty**, create a minimal starter:
|
|
57
|
-
```markdown
|
|
58
|
-
# [Project Name]
|
|
59
|
-
|
|
60
|
-
[User's project description from step 2]
|
|
61
|
-
|
|
62
|
-
## Tech Stack
|
|
63
|
-
[Language/framework from step 2, if provided]
|
|
64
|
-
|
|
65
|
-
## Structure
|
|
66
|
-
- `docs/` - Documentation and status tracking
|
|
67
|
-
- `docs/CURRENT_WORK.md` - What's in progress and up next
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**If CLAUDE.md exists with content**, leave it alone - the user has already configured it.
|
|
71
|
-
|
|
72
|
-
5. **Confirm completion:**
|
|
73
|
-
"Project initialized with:
|
|
74
|
-
- `docs/INDEX.md` - documentation hub
|
|
75
|
-
- `docs/CURRENT_WORK.md` - status tracking
|
|
76
|
-
- `CLAUDE.md` - [created/unchanged]
|
|
77
|
-
|
|
78
|
-
Run `/prime` to start your session."
|
|
79
|
-
|
|
80
|
-
## Success Criteria
|
|
81
|
-
|
|
82
|
-
- `docs/` directory exists with INDEX.md and CURRENT_WORK.md
|
|
83
|
-
- CLAUDE.md exists (created if missing, preserved if present)
|
|
84
|
-
- User understands the `/prime` → work → `/done` workflow
|
|
33
|
+
End with: "Run `/prime` to start a session."
|
|
@@ -1,123 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prompting
|
|
3
|
-
description:
|
|
3
|
+
description: Invoked when user says "review my prompt", "help me write a prompt", "improve this prompt", or "create a prompt for...". Guides prompt creation and improvement using Claude 4.x best practices.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Prompting
|
|
6
|
+
# Prompting
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Determine Intent
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
| User Intent | Action |
|
|
11
|
+
|-------------|--------|
|
|
12
|
+
| Has an existing prompt to review or improve | Read `references/review.md` |
|
|
13
|
+
| Needs to create a new prompt from scratch | Read `references/create.md` |
|
|
14
|
+
| Unclear | Ask: "Do you have an existing prompt to improve, or are you creating one from scratch?" |
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### 1. Explain WHY, Not Just WHAT (Most Important)
|
|
15
|
-
|
|
16
|
-
Provide purpose and context rather than exhaustive implementation details. Trust Claude's intelligence.
|
|
17
|
-
|
|
18
|
-
**Mental Model**: Treat Claude like a brilliant senior colleague, not a junior who needs hand-holding.
|
|
19
|
-
|
|
20
|
-
**Provide**:
|
|
21
|
-
- The goal or purpose of the task
|
|
22
|
-
- Why this matters (business context, use case)
|
|
23
|
-
- Constraints that exist (technical, business, regulatory)
|
|
24
|
-
- What success looks like
|
|
25
|
-
|
|
26
|
-
**Avoid providing**:
|
|
27
|
-
- Every possible edge case
|
|
28
|
-
- Step-by-step implementation unless genuinely needed
|
|
29
|
-
- Obvious best practices for the domain
|
|
30
|
-
|
|
31
|
-
### 2. Use Positive Framing
|
|
32
|
-
|
|
33
|
-
Tell Claude what TO do, not what NOT to do. Negatives require extra processing and can prime unwanted behavior.
|
|
34
|
-
|
|
35
|
-
| Negative Framing | Positive Framing |
|
|
36
|
-
|------------------|------------------|
|
|
37
|
-
| "Don't hallucinate facts" | "Only use information from the provided documents" |
|
|
38
|
-
| "Don't be too formal" | "Write in a conversational, friendly tone" |
|
|
39
|
-
| "Avoid long paragraphs" | "Keep paragraphs to 3-4 sentences" |
|
|
40
|
-
| "Don't skip error handling" | "Include comprehensive error handling" |
|
|
41
|
-
| "Don't make it complicated" | "Keep the solution simple and maintainable" |
|
|
42
|
-
| "Avoid making assumptions" | "Base responses on the provided data" |
|
|
43
|
-
|
|
44
|
-
### 3. Be Clear and Direct
|
|
45
|
-
|
|
46
|
-
Claude 4.x models are more literal than previous versions. State exactly what you want without hedging.
|
|
47
|
-
|
|
48
|
-
| Vague | Clear |
|
|
49
|
-
|-------|-------|
|
|
50
|
-
| "Can you maybe help me think about..." | "Redesign the authentication flow to support SSO" |
|
|
51
|
-
| "It might be nice to have..." | "Add rate limiting to the login endpoint" |
|
|
52
|
-
| "Create a dashboard" | "Create a fully-featured dashboard with charts, filters, export, and user preferences" |
|
|
53
|
-
|
|
54
|
-
### 4. Provide Context
|
|
55
|
-
|
|
56
|
-
Answer these questions:
|
|
57
|
-
1. **Why does this matter?** (Purpose, goal, business context)
|
|
58
|
-
2. **Who is this for?** (Audience, user type, skill level)
|
|
59
|
-
3. **What does success look like?** (Outcomes, metrics, acceptance criteria)
|
|
60
|
-
4. **What constraints exist?** (Technical limits, requirements, policies)
|
|
61
|
-
|
|
62
|
-
## The Complete Framework Checklist
|
|
63
|
-
|
|
64
|
-
Every good prompt should answer:
|
|
65
|
-
|
|
66
|
-
- [ ] **WHAT** are you asking Claude to do?
|
|
67
|
-
- [ ] **WHY** does this matter? (Purpose, goal)
|
|
68
|
-
- [ ] **WHO** is this for? (Audience, user type)
|
|
69
|
-
- [ ] **SUCCESS** looks like what?
|
|
70
|
-
- [ ] Frame everything **POSITIVELY** (what TO do, not what NOT to do)
|
|
71
|
-
|
|
72
|
-
Then trust Claude to:
|
|
73
|
-
- Handle edge cases intelligently
|
|
74
|
-
- Apply best practices for the domain
|
|
75
|
-
- Make reasonable implementation choices
|
|
76
|
-
- Ask clarifying questions if truly ambiguous
|
|
77
|
-
|
|
78
|
-
## Quick Diagnostics
|
|
79
|
-
|
|
80
|
-
When Claude's response is problematic:
|
|
81
|
-
|
|
82
|
-
| Problem | Likely Cause | Fix |
|
|
83
|
-
|---------|--------------|-----|
|
|
84
|
-
| Too minimal/basic | Not explicit about expectations | Add "Create a fully-featured..." or "Go beyond basics..." |
|
|
85
|
-
| Off-topic | Missing context about purpose | Explain WHY you need this and what it's for |
|
|
86
|
-
| Inconsistent | Vague or ambiguous instructions | Be more direct and specific about requirements |
|
|
87
|
-
| Overly cautious | Negative framing ("don't do X") | Reframe positively ("do Y instead") |
|
|
88
|
-
| Missing key details | Didn't explain what success looks like | Define concrete success criteria |
|
|
89
|
-
|
|
90
|
-
## Common Antipatterns
|
|
91
|
-
|
|
92
|
-
### The Micromanager
|
|
93
|
-
Providing step-by-step implementation instead of goals.
|
|
94
|
-
|
|
95
|
-
**Fix**: Explain the goal, let Claude handle implementation.
|
|
96
|
-
|
|
97
|
-
### The Negative Nancy
|
|
98
|
-
String of "don't do X" instructions.
|
|
99
|
-
|
|
100
|
-
**Fix**: Reframe every negative as a positive instruction.
|
|
101
|
-
|
|
102
|
-
### The Context-Free Zone
|
|
103
|
-
Bare instruction with no purpose or audience.
|
|
104
|
-
|
|
105
|
-
**Fix**: Explain who will use it, why it exists, what success looks like.
|
|
106
|
-
|
|
107
|
-
### The Vague Suggestion
|
|
108
|
-
Hedged language like "maybe we could possibly..."
|
|
109
|
-
|
|
110
|
-
**Fix**: Be direct and explicit about what you want.
|
|
111
|
-
|
|
112
|
-
## Structural Elements
|
|
113
|
-
|
|
114
|
-
For multi-step tasks where order matters, use numbered lists.
|
|
115
|
-
|
|
116
|
-
For complex prompts with distinct sections, consider XML-style tags:
|
|
117
|
-
- `<instructions>`, `<context>`, `<data>`
|
|
118
|
-
- `<examples>`, `<input>`, `<output>`
|
|
119
|
-
- `<requirements>`, `<constraints>`
|
|
120
|
-
|
|
121
|
-
## ADR Compliance
|
|
122
|
-
|
|
123
|
-
This skill implements the practices mandated by ADR-002 (Structured Prompting Practices for Agents and Commands). All agents and commands in this framework must follow these principles.
|
|
16
|
+
Route to the appropriate path before proceeding.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Create a New Prompt
|
|
2
|
+
|
|
3
|
+
## Step 1: Gather Requirements
|
|
4
|
+
|
|
5
|
+
Ask the user these questions (skip any already answered):
|
|
6
|
+
|
|
7
|
+
1. **What should Claude do?** (The core task)
|
|
8
|
+
2. **Why does this matter?** (Purpose, business context)
|
|
9
|
+
3. **Who will use the output?** (Audience)
|
|
10
|
+
4. **What does success look like?** (Concrete outcomes)
|
|
11
|
+
5. **What constraints exist?** (Technical limits, policies, format requirements)
|
|
12
|
+
|
|
13
|
+
## Step 2: Draft the Prompt
|
|
14
|
+
|
|
15
|
+
Structure the prompt with these elements:
|
|
16
|
+
|
|
17
|
+
### Opening: Task and Purpose
|
|
18
|
+
State the task directly in imperative form. Include why it matters.
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
[Task in imperative form]. This [purpose/context].
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Context Section (if needed)
|
|
25
|
+
For complex tasks, add structured context:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
<context>
|
|
29
|
+
- Audience: [who]
|
|
30
|
+
- Constraints: [limits]
|
|
31
|
+
- Success criteria: [outcomes]
|
|
32
|
+
</context>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Requirements (if specific)
|
|
36
|
+
List concrete requirements as bullet points. Keep to essentials only.
|
|
37
|
+
|
|
38
|
+
### Output Format (if specific)
|
|
39
|
+
Specify format only when it genuinely matters. Otherwise trust Claude's judgment.
|
|
40
|
+
|
|
41
|
+
## Step 3: Self-Review
|
|
42
|
+
|
|
43
|
+
Before presenting, verify:
|
|
44
|
+
|
|
45
|
+
- [ ] All instructions use positive framing (what TO do)
|
|
46
|
+
- [ ] Language is direct, no hedging
|
|
47
|
+
- [ ] Purpose and context are clear
|
|
48
|
+
- [ ] No over-specification of obvious practices
|
|
49
|
+
- [ ] Success criteria are concrete
|
|
50
|
+
|
|
51
|
+
Read `references/principles.md` if any check fails and apply the relevant fix.
|
|
52
|
+
|
|
53
|
+
## Step 4: Present and Iterate
|
|
54
|
+
|
|
55
|
+
Present the draft prompt to the user.
|
|
56
|
+
|
|
57
|
+
Ask: "Does this capture what you need? Any adjustments?"
|
|
58
|
+
|
|
59
|
+
Incorporate feedback until the user is satisfied.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Prompting Principles Reference
|
|
2
|
+
|
|
3
|
+
Load this file when diagnosing issues or applying fixes during review/creation.
|
|
4
|
+
|
|
5
|
+
## Principle 1: Positive Framing
|
|
6
|
+
|
|
7
|
+
State what TO do, not what NOT to do.
|
|
8
|
+
|
|
9
|
+
| Negative | Positive |
|
|
10
|
+
|----------|----------|
|
|
11
|
+
| "Don't hallucinate facts" | "Only use information from provided documents" |
|
|
12
|
+
| "Don't be too formal" | "Write in a conversational tone" |
|
|
13
|
+
| "Avoid long paragraphs" | "Keep paragraphs to 3-4 sentences" |
|
|
14
|
+
| "Don't skip error handling" | "Include comprehensive error handling" |
|
|
15
|
+
| "Avoid assumptions" | "Base responses on provided data" |
|
|
16
|
+
|
|
17
|
+
## Principle 2: Direct Language
|
|
18
|
+
|
|
19
|
+
State exactly what is needed. Remove hedging.
|
|
20
|
+
|
|
21
|
+
| Vague | Direct |
|
|
22
|
+
|-------|--------|
|
|
23
|
+
| "Can you maybe help me think about..." | "Redesign the authentication flow to support SSO" |
|
|
24
|
+
| "It might be nice to have..." | "Add rate limiting to the login endpoint" |
|
|
25
|
+
| "Consider adding..." | "Add..." |
|
|
26
|
+
| "Try to keep it simple" | "Keep the solution simple" |
|
|
27
|
+
|
|
28
|
+
## Principle 3: Context Over Micromanagement
|
|
29
|
+
|
|
30
|
+
Provide goals and constraints. Trust Claude to handle implementation.
|
|
31
|
+
|
|
32
|
+
**Include:**
|
|
33
|
+
- Purpose and business context
|
|
34
|
+
- Who will use the output
|
|
35
|
+
- What success looks like
|
|
36
|
+
- Constraints that apply
|
|
37
|
+
|
|
38
|
+
**Omit:**
|
|
39
|
+
- Step-by-step implementation for common tasks
|
|
40
|
+
- Edge cases Claude would handle naturally
|
|
41
|
+
- Domain best practices Claude already knows
|
|
42
|
+
|
|
43
|
+
## Principle 4: Structural Elements
|
|
44
|
+
|
|
45
|
+
For multi-step tasks: use numbered lists.
|
|
46
|
+
|
|
47
|
+
For complex prompts with distinct sections: use XML-style tags.
|
|
48
|
+
- `<instructions>`, `<context>`, `<data>`
|
|
49
|
+
- `<examples>`, `<input>`, `<output>`
|
|
50
|
+
- `<requirements>`, `<constraints>`
|
|
51
|
+
|
|
52
|
+
## Quick Diagnostics
|
|
53
|
+
|
|
54
|
+
| Problem in Output | Likely Cause | Fix |
|
|
55
|
+
|-------------------|--------------|-----|
|
|
56
|
+
| Too minimal | Expectations unclear | Add "Create a fully-featured..." or specify scope |
|
|
57
|
+
| Off-topic | Missing purpose | Explain WHY and what it's for |
|
|
58
|
+
| Inconsistent | Vague instructions | Be more specific about requirements |
|
|
59
|
+
| Overly cautious | Negative framing | Reframe positively |
|
|
60
|
+
| Missing details | No success criteria | Define concrete outcomes |
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Review an Existing Prompt
|
|
2
|
+
|
|
3
|
+
## Step 1: Get the Prompt
|
|
4
|
+
|
|
5
|
+
Request the prompt from the user if not already provided.
|
|
6
|
+
|
|
7
|
+
## Step 2: Analyze Against Principles
|
|
8
|
+
|
|
9
|
+
Evaluate the prompt against each criterion. For each issue found, note the specific text and the fix.
|
|
10
|
+
|
|
11
|
+
### Positive Framing Check
|
|
12
|
+
|
|
13
|
+
Find any negative instructions:
|
|
14
|
+
- "Don't...", "Never...", "Avoid..."
|
|
15
|
+
- "Do not...", "Should not..."
|
|
16
|
+
|
|
17
|
+
For each, draft a positive reframe.
|
|
18
|
+
|
|
19
|
+
| Negative | Positive Reframe |
|
|
20
|
+
|----------|------------------|
|
|
21
|
+
| "Don't hallucinate" | "Only use information from provided documents" |
|
|
22
|
+
| "Don't be verbose" | "Keep responses concise" |
|
|
23
|
+
| "Avoid jargon" | "Use plain language" |
|
|
24
|
+
|
|
25
|
+
### Clarity Check
|
|
26
|
+
|
|
27
|
+
Find vague or hedging language:
|
|
28
|
+
- "Maybe...", "Perhaps...", "Consider..."
|
|
29
|
+
- "It would be nice if...", "Try to..."
|
|
30
|
+
- "Can you help me think about..."
|
|
31
|
+
|
|
32
|
+
For each, draft a direct replacement.
|
|
33
|
+
|
|
34
|
+
### Context Check
|
|
35
|
+
|
|
36
|
+
Identify what's missing:
|
|
37
|
+
- **Purpose**: Why does this task matter?
|
|
38
|
+
- **Audience**: Who will use the output?
|
|
39
|
+
- **Success criteria**: What does a good result look like?
|
|
40
|
+
- **Constraints**: What limits apply?
|
|
41
|
+
|
|
42
|
+
### Over-specification Check
|
|
43
|
+
|
|
44
|
+
Find unnecessary details:
|
|
45
|
+
- Step-by-step instructions for common tasks
|
|
46
|
+
- Obvious best practices spelled out
|
|
47
|
+
- Edge cases that Claude would handle naturally
|
|
48
|
+
|
|
49
|
+
These can be removed or condensed to goals.
|
|
50
|
+
|
|
51
|
+
## Step 3: Present Findings
|
|
52
|
+
|
|
53
|
+
Format the review as:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
## Prompt Review
|
|
57
|
+
|
|
58
|
+
### Issues Found
|
|
59
|
+
|
|
60
|
+
1. **[Issue type]** at "[quoted text]"
|
|
61
|
+
- Problem: [why this is problematic]
|
|
62
|
+
- Fix: [specific replacement text]
|
|
63
|
+
|
|
64
|
+
2. ...
|
|
65
|
+
|
|
66
|
+
### Improved Version
|
|
67
|
+
|
|
68
|
+
[Full rewritten prompt with all fixes applied]
|
|
69
|
+
|
|
70
|
+
### Summary of Changes
|
|
71
|
+
- [Bullet list of what changed and why]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Step 4: Offer Iteration
|
|
75
|
+
|
|
76
|
+
Ask: "Would you like me to adjust anything in the improved version?"
|
|
77
|
+
|
|
78
|
+
Incorporate feedback and present updated version until the user is satisfied.
|
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-interview
|
|
3
|
-
description:
|
|
3
|
+
description: Conducts a conversational interview to produce implementation-ready feature specifications. Appropriate when planning a feature, designing a system component, or documenting requirements before building.
|
|
4
4
|
argument-hint: <spec-name>
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Spec Interview
|
|
8
8
|
|
|
9
|
-
Guide the user through creating a complete feature specification via structured conversation.
|
|
10
|
-
|
|
11
9
|
## What To Do Now
|
|
12
10
|
|
|
13
|
-
|
|
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
|
|
11
|
+
If an argument was provided, use it as the feature name. Otherwise, ask what feature to spec out.
|
|
34
12
|
|
|
35
|
-
|
|
13
|
+
Create the spec directory at `docs/specs/<feature-name>/` (kebab-case, concise).
|
|
36
14
|
|
|
37
|
-
|
|
15
|
+
Read `references/step-1-opening.md` to begin the interview.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Step 1: Opening
|
|
2
|
+
|
|
3
|
+
Establish understanding of the feature before diving into details.
|
|
4
|
+
|
|
5
|
+
## Opening Questions
|
|
6
|
+
|
|
7
|
+
Ask one or two questions at a time. Follow up on anything unclear.
|
|
8
|
+
|
|
9
|
+
Start with:
|
|
10
|
+
- What problem does this feature solve?
|
|
11
|
+
- Who uses it and what is their goal?
|
|
12
|
+
|
|
13
|
+
Then explore:
|
|
14
|
+
- What does success look like?
|
|
15
|
+
- Are there existing solutions or workarounds?
|
|
16
|
+
|
|
17
|
+
## When to Move On
|
|
18
|
+
|
|
19
|
+
Move to `references/step-2-deep-dive.md` when:
|
|
20
|
+
- The core problem and user goal are clear
|
|
21
|
+
- Success criteria are understood at a high level
|