@dzhechkov/p-replicator 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/README.md +314 -0
- package/bin/cli.js +4 -0
- package/package.json +62 -0
- package/src/cli.js +160 -0
- package/src/commands/doctor.js +151 -0
- package/src/commands/init.js +155 -0
- package/src/commands/list.js +133 -0
- package/src/commands/remove.js +111 -0
- package/src/commands/update.js +102 -0
- package/src/utils.js +280 -0
- package/templates/.claude/agents/doc-validator.md +92 -0
- package/templates/.claude/agents/harvest-coordinator.md +91 -0
- package/templates/.claude/agents/product-discoverer.md +57 -0
- package/templates/.claude/agents/replicate-coordinator.md +98 -0
- package/templates/.claude/commands/harvest.md +106 -0
- package/templates/.claude/commands/replicate.md +389 -0
- package/templates/.claude/rules/replicate-pipeline.md +92 -0
- package/templates/.claude/skills/brutal-honesty-review/README.md +218 -0
- package/templates/.claude/skills/brutal-honesty-review/SKILL.md +225 -0
- package/templates/.claude/skills/brutal-honesty-review/resources/assessment-rubrics.md +295 -0
- package/templates/.claude/skills/brutal-honesty-review/resources/review-template.md +102 -0
- package/templates/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +179 -0
- package/templates/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +223 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/SKILL.md +374 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/claude-md-strategy.md +178 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/enhanced-recommendations.md +416 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/extended-mapping.md +370 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/automation-commands.md +733 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-agents.md +416 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-hooks-commands.md +524 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-skills.md +350 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/enhanced-claude-md.md +235 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-lifecycle-ent.md +400 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-lifecycle.md +325 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-suggestions.md +423 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/insights-system.md +349 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/mcp.md +274 -0
- package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/start-command.md +283 -0
- package/templates/.claude/skills/explore/SKILL.md +215 -0
- package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
- package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
- package/templates/.claude/skills/goap-research-ed25519/SKILL.md +415 -0
- package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
- package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
- package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
- package/templates/.claude/skills/knowledge-extractor/SKILL.md +412 -0
- package/templates/.claude/skills/knowledge-extractor/examples/rate-limiting-extraction.md +259 -0
- package/templates/.claude/skills/knowledge-extractor/modules/01-agent-review.md +192 -0
- package/templates/.claude/skills/knowledge-extractor/modules/02-classify.md +122 -0
- package/templates/.claude/skills/knowledge-extractor/modules/03-decontextualize.md +156 -0
- package/templates/.claude/skills/knowledge-extractor/modules/04-integrate.md +178 -0
- package/templates/.claude/skills/knowledge-extractor/references/artifact-categories.md +342 -0
- package/templates/.claude/skills/knowledge-extractor/references/decontextualization-guide.md +247 -0
- package/templates/.claude/skills/knowledge-extractor/references/maturity-model.md +153 -0
- package/templates/.claude/skills/knowledge-extractor/templates/artifact-card.md +60 -0
- package/templates/.claude/skills/knowledge-extractor/templates/harvest-report.md +70 -0
- package/templates/.claude/skills/knowledge-extractor/templates/toolkit-harvest.md +38 -0
- package/templates/.claude/skills/pipeline-forge/SKILL.md +523 -0
- package/templates/.claude/skills/pipeline-forge/examples/replicate-analysis.md +291 -0
- package/templates/.claude/skills/pipeline-forge/references/patterns-catalog.md +408 -0
- package/templates/.claude/skills/pipeline-forge/references/quality-gates.md +268 -0
- package/templates/.claude/skills/pipeline-forge/references/skill-anatomy.md +292 -0
- package/templates/.claude/skills/pipeline-forge/templates/agent-template.md +60 -0
- package/templates/.claude/skills/pipeline-forge/templates/command-template.md +80 -0
- package/templates/.claude/skills/pipeline-forge/templates/pipeline-template.md +137 -0
- package/templates/.claude/skills/pipeline-forge/templates/skill-template.md +132 -0
- package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +562 -0
- package/templates/.claude/skills/requirements-validator/SKILL.md +121 -0
- package/templates/.claude/skills/requirements-validator/assets/templates/bdd-feature-template.feature +69 -0
- package/templates/.claude/skills/requirements-validator/references/bdd-patterns.md +184 -0
- package/templates/.claude/skills/requirements-validator/references/invest-criteria.md +121 -0
- package/templates/.claude/skills/requirements-validator/references/scoring-system.md +134 -0
- package/templates/.claude/skills/requirements-validator/references/smart-criteria.md +130 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +194 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-cjm-example.md +100 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-module1-example.md +88 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/01-intelligence.md +328 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md +221 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md +206 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/03-market-competition.md +402 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/04-business-finance.md +287 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/05-growth-engine.md +290 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/modules/06-playbook-synthesis.md +286 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/blue-ocean-canvas.md +39 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/industry-benchmarks.md +67 -0
- package/templates/.claude/skills/reverse-engineering-unicorn/references/jtbd-canvas.md +48 -0
- package/templates/.claude/skills/sparc-prd-mini/SKILL.md +955 -0
- package/templates/.claude/skills/sparc-prd-mini/references/sparc-methodology.md +360 -0
- package/templates/.claude/skills/sparc-prd-mini/templates/CLAUDE.md +91 -0
- package/templates/.claude/skills/sparc-prd-mini/templates/prd.md +336 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# Quality Gates Reference
|
|
2
|
+
|
|
3
|
+
Patterns for validation, scoring, verdicts, and blocking thresholds in AI pipelines.
|
|
4
|
+
Extracted from `requirements-validator` and `doc-validator` in PU Unicorn Replicate.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## What is a Quality Gate?
|
|
9
|
+
|
|
10
|
+
A quality gate is a checkpoint between pipeline phases that:
|
|
11
|
+
1. **Evaluates** output against defined criteria
|
|
12
|
+
2. **Scores** the output numerically
|
|
13
|
+
3. **Renders a verdict** (READY / CAVEATS / BLOCKED)
|
|
14
|
+
4. **Blocks progression** if quality is insufficient
|
|
15
|
+
5. **Provides actionable feedback** for improvement
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Gate Structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
PHASE OUTPUT
|
|
23
|
+
↓
|
|
24
|
+
┌──────────────────────┐
|
|
25
|
+
│ QUALITY GATE │
|
|
26
|
+
│ │
|
|
27
|
+
│ 1. Apply Criteria │ ← INVEST, SMART, custom
|
|
28
|
+
│ 2. Score (0-100) │ ← per-item and aggregate
|
|
29
|
+
│ 3. Render Verdict │ ← READY / CAVEATS / BLOCKED
|
|
30
|
+
│ 4. Decision │ ← proceed / fix / abort
|
|
31
|
+
│ │
|
|
32
|
+
└──────────────────────┘
|
|
33
|
+
↓
|
|
34
|
+
NEXT PHASE (if READY/CAVEATS)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Scoring System Design
|
|
40
|
+
|
|
41
|
+
### Scoring Scale
|
|
42
|
+
|
|
43
|
+
| Score | Rating | Meaning | Action |
|
|
44
|
+
|-------|--------|---------|--------|
|
|
45
|
+
| 90-100 | Excellent | Exceeds requirements | Proceed immediately |
|
|
46
|
+
| 70-89 | Good | Meets requirements | Proceed with minor notes |
|
|
47
|
+
| 50-69 | Fair | Partially meets | Fix issues, then proceed |
|
|
48
|
+
| **0-49** | **Poor** | **Fails requirements** | **BLOCKED — must fix** |
|
|
49
|
+
|
|
50
|
+
### Scoring Formula
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
total_score = Σ(criterion_weight × criterion_score) / Σ(weights)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Example (requirements validation):**
|
|
57
|
+
```
|
|
58
|
+
score = (INVEST_score × 0.50) + (SMART_score × 0.30) + (coverage_score × 0.20)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Per-Criterion Scoring
|
|
62
|
+
|
|
63
|
+
Each criterion is binary (pass/fail) or graduated:
|
|
64
|
+
|
|
65
|
+
**Binary example (INVEST):**
|
|
66
|
+
```
|
|
67
|
+
| Criterion | Pass | Issue |
|
|
68
|
+
|-----------|------|-------|
|
|
69
|
+
| Independent | ✓ | - |
|
|
70
|
+
| Negotiable | ✓ | - |
|
|
71
|
+
| Valuable | ✗ | No "so that" clause |
|
|
72
|
+
| Estimable | ✓ | - |
|
|
73
|
+
| Small | ✗ | "entire module" |
|
|
74
|
+
| Testable | ✗ | No acceptance criteria |
|
|
75
|
+
|
|
76
|
+
Score: 3/6 = 50% → 50 × 0.50 weight = 25 points
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Verdict System
|
|
82
|
+
|
|
83
|
+
### Three-Tier Verdicts
|
|
84
|
+
|
|
85
|
+
| Verdict | Symbol | Conditions | Action |
|
|
86
|
+
|---------|--------|-----------|--------|
|
|
87
|
+
| **READY** | 🟢 | All items ≥50, average ≥70, no contradictions | Proceed to next phase |
|
|
88
|
+
| **CAVEATS** | 🟡 | Warnings exist, no blocked items, limitations described | Proceed with notes |
|
|
89
|
+
| **NEEDS WORK** | 🔴 | Any blocked item (score <50) exists | Return to previous phase |
|
|
90
|
+
|
|
91
|
+
### Verdict Decision Logic
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
IF any_item.score < 50:
|
|
95
|
+
verdict = NEEDS_WORK (🔴)
|
|
96
|
+
ELIF average_score < 70:
|
|
97
|
+
verdict = NEEDS_WORK (🔴)
|
|
98
|
+
ELIF any_item.score < 70:
|
|
99
|
+
verdict = CAVEATS (🟡)
|
|
100
|
+
ELSE:
|
|
101
|
+
verdict = READY (🟢)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Iterative Validation
|
|
107
|
+
|
|
108
|
+
When output fails a quality gate, use iterative fix-and-revalidate:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
FOR iteration = 1 TO max_iterations (typically 3):
|
|
112
|
+
1. ANALYZE — run all validators (parallel swarm)
|
|
113
|
+
2. AGGREGATE — merge results, build Gap Register
|
|
114
|
+
3. CHECK — apply verdict logic
|
|
115
|
+
4. IF verdict == READY or CAVEATS:
|
|
116
|
+
EXIT with verdict
|
|
117
|
+
5. FIX — resolve gaps in source material
|
|
118
|
+
6. RE-VALIDATE — go to step 1
|
|
119
|
+
|
|
120
|
+
IF max_iterations reached AND still NEEDS_WORK:
|
|
121
|
+
EXIT with NEEDS_WORK + Gap Register
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Gap Register Format
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
| ID | Source | Issue | Severity | Status | Fix |
|
|
128
|
+
|----|--------|-------|----------|--------|-----|
|
|
129
|
+
| G-001 | PRD.md | Missing NFRs | BLOCKED | Fixed | Added performance section |
|
|
130
|
+
| G-002 | Architecture.md | No DB schema | WARNING | Open | Needs data model |
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Common Quality Criteria
|
|
136
|
+
|
|
137
|
+
### For Requirements (INVEST)
|
|
138
|
+
|
|
139
|
+
| Criterion | Question | Red Flags |
|
|
140
|
+
|-----------|----------|-----------|
|
|
141
|
+
| **I**ndependent | Can develop separately? | "after X is done", "depends on" |
|
|
142
|
+
| **N**egotiable | Open to discussion? | "must be exactly", rigid specs |
|
|
143
|
+
| **V**aluable | Clear user benefit? | No "so that" clause |
|
|
144
|
+
| **E**stimable | Can estimate effort? | "system should be fast" |
|
|
145
|
+
| **S**mall | Fits in one sprint? | "entire module", "all users" |
|
|
146
|
+
| **T**estable | Has pass/fail criteria? | No acceptance criteria |
|
|
147
|
+
|
|
148
|
+
### For Acceptance Criteria (SMART)
|
|
149
|
+
|
|
150
|
+
| Criterion | Question | Red Flags |
|
|
151
|
+
|-----------|----------|-----------|
|
|
152
|
+
| **S**pecific | Clear, unambiguous? | "fast", "easy", "user-friendly" |
|
|
153
|
+
| **M**easurable | Has metrics? | No numbers/thresholds |
|
|
154
|
+
| **A**chievable | Technically feasible? | "100% uptime", "instant" |
|
|
155
|
+
| **R**elevant | Supports story goal? | Unrelated to user value |
|
|
156
|
+
| **T**ime-bound | Has timing context? | No response times |
|
|
157
|
+
|
|
158
|
+
### For Architecture
|
|
159
|
+
|
|
160
|
+
| Criterion | Question |
|
|
161
|
+
|-----------|----------|
|
|
162
|
+
| Constraints compliance | Matches target architecture (monolith/micro/etc.)? |
|
|
163
|
+
| Completeness | All layers covered (frontend, backend, DB, infra)? |
|
|
164
|
+
| Consistency | Tech stack choices don't contradict? |
|
|
165
|
+
| Security | Authentication, authorization, encryption addressed? |
|
|
166
|
+
| Scalability | Growth path defined? |
|
|
167
|
+
|
|
168
|
+
### For Cross-Document Consistency
|
|
169
|
+
|
|
170
|
+
| Check | What to verify |
|
|
171
|
+
|-------|---------------|
|
|
172
|
+
| Terminology | Same terms used across all documents? |
|
|
173
|
+
| Feature coverage | Every PRD feature has pseudocode + architecture? |
|
|
174
|
+
| Story coverage | Every user story has test scenario? |
|
|
175
|
+
| Stack alignment | Architecture.md stack matches Pseudocode.md assumptions? |
|
|
176
|
+
| Contradiction | No conflicting statements across documents? |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Vague Terms Detection
|
|
181
|
+
|
|
182
|
+
Always flag these and suggest specific replacements:
|
|
183
|
+
|
|
184
|
+
| Vague Term | Specific Replacement |
|
|
185
|
+
|-----------|---------------------|
|
|
186
|
+
| "fast" | "<200ms p95 response time" |
|
|
187
|
+
| "easy" | "completed in <3 clicks" |
|
|
188
|
+
| "user-friendly" | "passes usability test with >80% task completion" |
|
|
189
|
+
| "secure" | "passes OWASP Top 10 security scan" |
|
|
190
|
+
| "scalable" | "handles 10,000 concurrent users" |
|
|
191
|
+
| "reliable" | "99.9% uptime SLA" |
|
|
192
|
+
| "responsive" | "renders above-the-fold in <1.5s on 3G" |
|
|
193
|
+
| "intuitive" | "zero training required, <30s to first action" |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Validation Report Format
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
# Validation Report
|
|
201
|
+
|
|
202
|
+
## Summary
|
|
203
|
+
- Items analyzed: [N]
|
|
204
|
+
- Average score: [XX]/100
|
|
205
|
+
- Blocked: [N] (score <50)
|
|
206
|
+
- Warnings: [N] (score 50-69)
|
|
207
|
+
- Ready: [N] (score ≥70)
|
|
208
|
+
- Iterations: [N] of max 3
|
|
209
|
+
|
|
210
|
+
## Results
|
|
211
|
+
|
|
212
|
+
| Item | Score | Criteria Met | Status |
|
|
213
|
+
|------|-------|-------------|--------|
|
|
214
|
+
| [item-1] | 92/100 | 6/6 INVEST, 5/5 SMART | READY |
|
|
215
|
+
| [item-2] | 45/100 | 3/6 INVEST, 2/5 SMART | BLOCKED |
|
|
216
|
+
|
|
217
|
+
## Gap Register
|
|
218
|
+
|
|
219
|
+
| ID | Source | Issue | Severity | Status |
|
|
220
|
+
|----|--------|-------|----------|--------|
|
|
221
|
+
|
|
222
|
+
## Cross-Document Consistency
|
|
223
|
+
|
|
224
|
+
| Check | Status | Notes |
|
|
225
|
+
|-------|--------|-------|
|
|
226
|
+
|
|
227
|
+
## Readiness Verdict
|
|
228
|
+
|
|
229
|
+
🟢 READY / 🟡 CAVEATS / 🔴 NEEDS WORK
|
|
230
|
+
|
|
231
|
+
[Explanation of verdict]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Designing Custom Quality Gates
|
|
237
|
+
|
|
238
|
+
When creating a quality gate for a new domain:
|
|
239
|
+
|
|
240
|
+
1. **Identify criteria** — what makes output "good" in this domain?
|
|
241
|
+
2. **Weight criteria** — which matter most? (sum to 100%)
|
|
242
|
+
3. **Define scoring** — how to evaluate each criterion (binary or graduated)
|
|
243
|
+
4. **Set thresholds** — what score blocks progression?
|
|
244
|
+
5. **Define verdicts** — what are the possible outcomes?
|
|
245
|
+
6. **Design iteration** — how many fix cycles? Max iterations?
|
|
246
|
+
7. **Write report template** — what does the validation output look like?
|
|
247
|
+
|
|
248
|
+
### Template
|
|
249
|
+
|
|
250
|
+
```markdown
|
|
251
|
+
## Quality Gate: [Gate Name]
|
|
252
|
+
|
|
253
|
+
### Criteria (weighted)
|
|
254
|
+
| Criterion | Weight | Scoring | Threshold |
|
|
255
|
+
|-----------|--------|---------|-----------|
|
|
256
|
+
| [criterion-1] | 40% | 0-100 | ≥50 (blocking) |
|
|
257
|
+
| [criterion-2] | 30% | Pass/Fail | Must pass |
|
|
258
|
+
| [criterion-3] | 30% | 0-100 | ≥60 (warning) |
|
|
259
|
+
|
|
260
|
+
### Verdicts
|
|
261
|
+
| Verdict | Conditions | Action |
|
|
262
|
+
|---------|-----------|--------|
|
|
263
|
+
| READY | All ≥ thresholds, avg ≥ 70 | Proceed |
|
|
264
|
+
| CAVEATS | Warnings, no blocked | Proceed with notes |
|
|
265
|
+
| BLOCKED | Any below threshold | Fix and re-validate |
|
|
266
|
+
|
|
267
|
+
### Max Iterations: 3
|
|
268
|
+
```
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# Skill Anatomy Reference
|
|
2
|
+
|
|
3
|
+
How to structure composable skills for Claude Code. Based on analysis of 8 production
|
|
4
|
+
skills from the PU Unicorn Replicate methodology.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Minimum Viable Skill
|
|
9
|
+
|
|
10
|
+
The simplest possible skill:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
skill-name/
|
|
14
|
+
└── SKILL.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
A single `SKILL.md` file with:
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
---
|
|
21
|
+
name: my-skill
|
|
22
|
+
description: >
|
|
23
|
+
One paragraph. What it does. When to use it. Trigger words.
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# My Skill Name
|
|
27
|
+
|
|
28
|
+
One sentence of purpose.
|
|
29
|
+
|
|
30
|
+
## When to Use
|
|
31
|
+
|
|
32
|
+
- Trigger pattern 1
|
|
33
|
+
- Trigger pattern 2
|
|
34
|
+
|
|
35
|
+
## Input
|
|
36
|
+
|
|
37
|
+
[What the skill receives]
|
|
38
|
+
|
|
39
|
+
## Execution
|
|
40
|
+
|
|
41
|
+
1. Step 1
|
|
42
|
+
2. Step 2
|
|
43
|
+
3. Step 3
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
[Structured output format]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Full Skill Structure
|
|
53
|
+
|
|
54
|
+
For complex skills:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
skill-name/
|
|
58
|
+
├── SKILL.md # Entry point (REQUIRED)
|
|
59
|
+
├── references/ # Supporting knowledge (OPTIONAL)
|
|
60
|
+
│ ├── methodology.md # Frameworks, criteria, scoring
|
|
61
|
+
│ ├── best-practices.md # Domain expertise
|
|
62
|
+
│ └── templates.md # Reference templates
|
|
63
|
+
├── templates/ # Output templates (OPTIONAL)
|
|
64
|
+
│ ├── output-template.md # Template with {{PLACEHOLDERS}}
|
|
65
|
+
│ └── report-template.md
|
|
66
|
+
├── modules/ # Sub-phases (OPTIONAL)
|
|
67
|
+
│ ├── 01-phase-one.md # Numbered for ordering
|
|
68
|
+
│ ├── 02-phase-two.md
|
|
69
|
+
│ └── 03-phase-three.md
|
|
70
|
+
├── examples/ # Few-shot examples (OPTIONAL)
|
|
71
|
+
│ └── example-output.md
|
|
72
|
+
└── scripts/ # Executable helpers (OPTIONAL)
|
|
73
|
+
└── helper.sh
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## SKILL.md Sections (Recommended Order)
|
|
79
|
+
|
|
80
|
+
### 1. Frontmatter (REQUIRED)
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
---
|
|
84
|
+
name: skill-name-kebab-case
|
|
85
|
+
description: >
|
|
86
|
+
One paragraph (2-5 sentences). What the skill does, when to use it,
|
|
87
|
+
trigger words/patterns. This appears in skill listings.
|
|
88
|
+
---
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 2. Title and Purpose (REQUIRED)
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
# Skill Name: Short Description
|
|
95
|
+
|
|
96
|
+
One sentence explaining what this skill transforms (input → output).
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 3. Architecture (RECOMMENDED for complex skills)
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
## Architecture
|
|
103
|
+
|
|
104
|
+
\`\`\`
|
|
105
|
+
skill-name/
|
|
106
|
+
├── SKILL.md
|
|
107
|
+
├── references/
|
|
108
|
+
│ └── ...
|
|
109
|
+
└── templates/
|
|
110
|
+
└── ...
|
|
111
|
+
\`\`\`
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 4. External Dependencies (IF ANY)
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## External Dependencies (loaded via view() at runtime)
|
|
118
|
+
|
|
119
|
+
| Phase | Skill | Path | Purpose |
|
|
120
|
+
|-------|-------|------|---------|
|
|
121
|
+
| Phase 1 | explore | `.claude/skills/explore/SKILL.md` | Task clarification |
|
|
122
|
+
|
|
123
|
+
**Fallbacks:**
|
|
124
|
+
- `explore` unavailable → built-in 3-5 questions
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 5. When to Use (REQUIRED)
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
## When to Use
|
|
131
|
+
|
|
132
|
+
**Trigger Patterns:**
|
|
133
|
+
- "keyword phrase 1"
|
|
134
|
+
- "keyword phrase 2"
|
|
135
|
+
- "keyword phrase 3" (also in Russian/other language if bilingual)
|
|
136
|
+
|
|
137
|
+
**Use Cases:**
|
|
138
|
+
- Use case 1
|
|
139
|
+
- Use case 2
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### 6. Operating Modes (IF MULTIPLE)
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
## Operating Modes
|
|
146
|
+
|
|
147
|
+
| Mode | Triggers | Checkpoints | Time |
|
|
148
|
+
|------|----------|-------------|------|
|
|
149
|
+
| AUTO | "auto", "fast" | 0 | ~5 min |
|
|
150
|
+
| MANUAL | "manual", "step by step" | N | ~20 min |
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 7. Workflow / Pipeline (REQUIRED)
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
## Workflow
|
|
157
|
+
|
|
158
|
+
\`\`\`
|
|
159
|
+
INPUT → PHASE 1 → PHASE 2 → ... → OUTPUT
|
|
160
|
+
\`\`\`
|
|
161
|
+
|
|
162
|
+
### Phase 1: [Name]
|
|
163
|
+
|
|
164
|
+
**Goal:** [one sentence]
|
|
165
|
+
|
|
166
|
+
**Process:**
|
|
167
|
+
1. [step]
|
|
168
|
+
2. [step]
|
|
169
|
+
|
|
170
|
+
**Output:**
|
|
171
|
+
[structured format]
|
|
172
|
+
|
|
173
|
+
**Checkpoint (MANUAL mode):**
|
|
174
|
+
\`\`\`
|
|
175
|
+
═════════════════════════════════════════════
|
|
176
|
+
⏸️ CHECKPOINT 1: [Phase Name]
|
|
177
|
+
[summary]
|
|
178
|
+
"ок" — next | "уточни X" — clarify
|
|
179
|
+
═════════════════════════════════════════════
|
|
180
|
+
\`\`\`
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 8. Output Format (REQUIRED)
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
## Output Format
|
|
187
|
+
|
|
188
|
+
\`\`\`markdown
|
|
189
|
+
## [Output Title]
|
|
190
|
+
|
|
191
|
+
### Section 1
|
|
192
|
+
[template]
|
|
193
|
+
|
|
194
|
+
### Section 2
|
|
195
|
+
| Column | Column |
|
|
196
|
+
|--------|--------|
|
|
197
|
+
\`\`\`
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 9. Anti-Patterns (RECOMMENDED)
|
|
201
|
+
|
|
202
|
+
```markdown
|
|
203
|
+
## Anti-Patterns
|
|
204
|
+
|
|
205
|
+
❌ [What NOT to do — reason]
|
|
206
|
+
❌ [What NOT to do — reason]
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 10. Quality Standards (RECOMMENDED)
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
## Quality Standards
|
|
213
|
+
|
|
214
|
+
- [ ] Check 1
|
|
215
|
+
- [ ] Check 2
|
|
216
|
+
- [ ] Check 3
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### 11. Integration Notes (IF APPLICABLE)
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
## Integration Notes
|
|
223
|
+
|
|
224
|
+
After this skill, hand off to:
|
|
225
|
+
- `skill-A` for [purpose]
|
|
226
|
+
- `skill-B` for [purpose]
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Naming Conventions
|
|
232
|
+
|
|
233
|
+
| Element | Convention | Example |
|
|
234
|
+
|---------|-----------|---------|
|
|
235
|
+
| Skill directory | `kebab-case` | `problem-solver-enhanced` |
|
|
236
|
+
| SKILL.md | Always uppercase | `SKILL.md` |
|
|
237
|
+
| References | `kebab-case.md` | `scoring-system.md` |
|
|
238
|
+
| Templates | `kebab-case.md` | `prd-template.md` |
|
|
239
|
+
| Modules | `NN-kebab-case.md` | `01-intelligence.md` |
|
|
240
|
+
| Examples | `descriptive-name.md` | `noom-cjm-example.md` |
|
|
241
|
+
| Scripts | `kebab-case.ext` | `assess-code.sh` |
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Skill Size Guidelines
|
|
246
|
+
|
|
247
|
+
| Complexity | SKILL.md Lines | Subdirectories | Example |
|
|
248
|
+
|------------|---------------|----------------|---------|
|
|
249
|
+
| Simple | 50-150 | None | `explore` |
|
|
250
|
+
| Medium | 150-400 | references/ | `requirements-validator` |
|
|
251
|
+
| Complex | 400-600 | references/ + templates/ | `sparc-prd-mini` |
|
|
252
|
+
| Very Complex | 300-400 + modules/ | All | `reverse-engineering-unicorn` |
|
|
253
|
+
|
|
254
|
+
**Rule:** If SKILL.md exceeds 600 lines, split logic into `modules/` and keep
|
|
255
|
+
SKILL.md as orchestrator (~200-300 lines).
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Frontmatter Description Tips
|
|
260
|
+
|
|
261
|
+
**Good descriptions include:**
|
|
262
|
+
- What the skill does (1 sentence)
|
|
263
|
+
- When to use it (conditions/triggers)
|
|
264
|
+
- Trigger words/phrases for auto-activation
|
|
265
|
+
|
|
266
|
+
**Example:**
|
|
267
|
+
```yaml
|
|
268
|
+
description: >
|
|
269
|
+
Validate requirements for testability, completeness, and clarity using
|
|
270
|
+
INVEST and SMART criteria. Generate BDD scenarios from user stories.
|
|
271
|
+
Use when: validating user stories before development, checking acceptance
|
|
272
|
+
criteria quality, generating Gherkin/BDD scenarios. Triggers: "validate
|
|
273
|
+
requirements", "check user story", "generate BDD", "INVEST check".
|
|
274
|
+
Blocks requirements with score <50 from proceeding.
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Checklist: Is My Skill Well-Structured?
|
|
280
|
+
|
|
281
|
+
- [ ] Has SKILL.md with frontmatter (name + description)
|
|
282
|
+
- [ ] Purpose is clear in 1 sentence
|
|
283
|
+
- [ ] Trigger patterns listed (when to activate)
|
|
284
|
+
- [ ] Input format documented
|
|
285
|
+
- [ ] Output format documented with template
|
|
286
|
+
- [ ] Execution steps are numbered and clear
|
|
287
|
+
- [ ] Anti-patterns listed (what NOT to do)
|
|
288
|
+
- [ ] If has dependencies → fallback strategy documented
|
|
289
|
+
- [ ] If complex → split into modules/
|
|
290
|
+
- [ ] If generates output → templates/ provided
|
|
291
|
+
- [ ] References are read-only knowledge, not executable logic
|
|
292
|
+
- [ ] No hardcoded paths (use path mapping if cross-environment)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# {{AGENT_NAME}} Agent
|
|
2
|
+
|
|
3
|
+
{{ONE_SENTENCE_PURPOSE}}
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
{{ACTIVATION_CONDITIONS}}
|
|
8
|
+
|
|
9
|
+
## Skill Reference
|
|
10
|
+
|
|
11
|
+
Uses `{{SKILL_NAME}}` skill.
|
|
12
|
+
Read from: `.claude/skills/{{SKILL_NAME}}/SKILL.md`
|
|
13
|
+
|
|
14
|
+
## Responsibilities
|
|
15
|
+
|
|
16
|
+
1. **{{RESPONSIBILITY_1}}** — {{DESCRIPTION}}
|
|
17
|
+
2. **{{RESPONSIBILITY_2}}** — {{DESCRIPTION}}
|
|
18
|
+
3. **{{RESPONSIBILITY_3}}** — {{DESCRIPTION}}
|
|
19
|
+
|
|
20
|
+
## Scope
|
|
21
|
+
|
|
22
|
+
| Aspect | Value |
|
|
23
|
+
|--------|-------|
|
|
24
|
+
| Input | {{WHAT_AGENT_RECEIVES}} |
|
|
25
|
+
| Output | {{WHAT_AGENT_PRODUCES}} |
|
|
26
|
+
| Criteria | {{PASS_FAIL_CRITERIA}} |
|
|
27
|
+
| Independence | {{FULL_OR_DEPENDS_ON}} |
|
|
28
|
+
|
|
29
|
+
## Process
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
1. {{STEP_1}}
|
|
33
|
+
2. {{STEP_2}}
|
|
34
|
+
3. {{STEP_3}}
|
|
35
|
+
4. {{STEP_4}}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Output Format
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
## {{AGENT_NAME}} Report
|
|
42
|
+
|
|
43
|
+
### Summary
|
|
44
|
+
{{SUMMARY_TEMPLATE}}
|
|
45
|
+
|
|
46
|
+
### Findings
|
|
47
|
+
| Item | Status | Details |
|
|
48
|
+
|------|--------|---------|
|
|
49
|
+
|
|
50
|
+
### Verdict
|
|
51
|
+
{{VERDICT_FORMAT}}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Anti-Hallucination Rules
|
|
55
|
+
|
|
56
|
+
- Search first — never answer from memory for facts
|
|
57
|
+
- Source attribution — every fact → URL
|
|
58
|
+
- "NOT FOUND" > fabrication
|
|
59
|
+
- Hypotheses marked with `[H]` tag
|
|
60
|
+
- Confidence score at end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: >
|
|
3
|
+
{{COMMAND_DESCRIPTION}}
|
|
4
|
+
$ARGUMENTS: {{ARGUMENTS_DESCRIPTION}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /{{COMMAND_NAME}} $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
|
|
11
|
+
{{ROLE_DESCRIPTION}}
|
|
12
|
+
|
|
13
|
+
## Skills (loaded from .claude/skills/)
|
|
14
|
+
|
|
15
|
+
| Skill | Path | Phase |
|
|
16
|
+
|-------|------|-------|
|
|
17
|
+
| {{SKILL_1}} | `.claude/skills/{{SKILL_1}}/SKILL.md` | Phase {{N}} |
|
|
18
|
+
| {{SKILL_2}} | `.claude/skills/{{SKILL_2}}/SKILL.md` | Phase {{N}} |
|
|
19
|
+
|
|
20
|
+
## Pipeline
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
INPUT → [{{PHASE_1}}] → [{{PHASE_2}}] → ... → OUTPUT
|
|
24
|
+
{{SKILL_1}} {{SKILL_2}}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Execution
|
|
28
|
+
|
|
29
|
+
### Start
|
|
30
|
+
|
|
31
|
+
1. Briefly explain the phases
|
|
32
|
+
2. Determine context from $ARGUMENTS
|
|
33
|
+
3. Begin with Phase 1
|
|
34
|
+
|
|
35
|
+
### Phase 1: {{PHASE_1_NAME}}
|
|
36
|
+
|
|
37
|
+
Read the skill: `.claude/skills/{{SKILL_1}}/SKILL.md`
|
|
38
|
+
|
|
39
|
+
**Goal:** {{GOAL}}
|
|
40
|
+
|
|
41
|
+
**Pass context:**
|
|
42
|
+
```yaml
|
|
43
|
+
{{CONTEXT_TO_PASS}}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Output location:** `{{OUTPUT_PATH}}`
|
|
47
|
+
|
|
48
|
+
Git commit: `{{COMMIT_TYPE}}: {{COMMIT_MESSAGE}}`
|
|
49
|
+
|
|
50
|
+
**Checkpoint:**
|
|
51
|
+
```
|
|
52
|
+
═══════════════════════════════════════════════════════════════
|
|
53
|
+
✅ PHASE 1: {{PHASE_1_NAME}}
|
|
54
|
+
{{SUMMARY}}
|
|
55
|
+
⏸️ "ок" — next | "превью [filename]" — show file
|
|
56
|
+
═══════════════════════════════════════════════════════════════
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Phase N: {{PHASE_N_NAME}}
|
|
60
|
+
|
|
61
|
+
<!-- Repeat for each phase -->
|
|
62
|
+
|
|
63
|
+
## Checkpoint Commands
|
|
64
|
+
|
|
65
|
+
| Command | Action |
|
|
66
|
+
|---------|--------|
|
|
67
|
+
| `ок` | Next phase |
|
|
68
|
+
| `превью [filename]` | View generated file |
|
|
69
|
+
|
|
70
|
+
## Critical Rules
|
|
71
|
+
|
|
72
|
+
### ALWAYS
|
|
73
|
+
- Read skill SKILL.md before executing
|
|
74
|
+
- Checkpoint after each phase
|
|
75
|
+
- Write output to specified paths
|
|
76
|
+
|
|
77
|
+
### NEVER
|
|
78
|
+
- Don't skip validation phases
|
|
79
|
+
- Don't generate from memory (read docs)
|
|
80
|
+
- Don't overwrite existing template files
|