@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,523 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pipeline-forge
|
|
3
|
+
description: >
|
|
4
|
+
Meta-skill for building multi-phase AI-assisted development pipelines from extracted
|
|
5
|
+
methodology patterns. Creates composable skill architectures, pipeline orchestrators,
|
|
6
|
+
swarm agents, quality gates, and toolkit generators for any domain. Extracted from
|
|
7
|
+
the PU Unicorn Replicate methodology — 8 skills, 5 phases, 3 agents, swarm validation.
|
|
8
|
+
Triggers: "build pipeline", "create methodology", "forge pipeline", "skill architecture",
|
|
9
|
+
"создай пайплайн", "методология разработки", "архитектура скиллов".
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Pipeline Forge: Meta-Skill for Building AI Development Pipelines
|
|
13
|
+
|
|
14
|
+
Build production-grade, multi-phase AI-assisted development pipelines from proven
|
|
15
|
+
methodology patterns. This skill encodes 7 architectural patterns extracted from
|
|
16
|
+
the PU Unicorn Replicate system and makes them reusable for any domain.
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
pipeline-forge/
|
|
22
|
+
├── SKILL.md # Orchestrator (this file)
|
|
23
|
+
├── references/
|
|
24
|
+
│ ├── patterns-catalog.md # 7 core patterns with examples
|
|
25
|
+
│ ├── skill-anatomy.md # How to structure composable skills
|
|
26
|
+
│ └── quality-gates.md # Validation, scoring, verdicts
|
|
27
|
+
├── templates/
|
|
28
|
+
│ ├── skill-template.md # Skeleton for new skills
|
|
29
|
+
│ ├── command-template.md # Skeleton for new commands
|
|
30
|
+
│ ├── agent-template.md # Skeleton for new agents
|
|
31
|
+
│ └── pipeline-template.md # Skeleton for pipeline orchestrators
|
|
32
|
+
└── examples/
|
|
33
|
+
└── replicate-analysis.md # PU Unicorn Replicate as reference implementation
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## When to Use
|
|
37
|
+
|
|
38
|
+
**Trigger Patterns:**
|
|
39
|
+
- "build a pipeline for [domain]"
|
|
40
|
+
- "create methodology for [process]"
|
|
41
|
+
- "skill architecture for [project]"
|
|
42
|
+
- "forge pipeline from [description]"
|
|
43
|
+
- "создай пайплайн для [области]"
|
|
44
|
+
- "архитектура скиллов"
|
|
45
|
+
- "методология разработки"
|
|
46
|
+
|
|
47
|
+
**Use Cases:**
|
|
48
|
+
- Building a new multi-phase development workflow
|
|
49
|
+
- Creating a plugin/template system for Claude Code
|
|
50
|
+
- Designing composable skill libraries
|
|
51
|
+
- Setting up quality gates and validation pipelines
|
|
52
|
+
- Creating swarm-based parallel processing workflows
|
|
53
|
+
|
|
54
|
+
## The 7 Core Patterns
|
|
55
|
+
|
|
56
|
+
| # | Pattern | Purpose | Reference |
|
|
57
|
+
|---|---------|---------|-----------|
|
|
58
|
+
| 1 | Composable Skill Architecture | Self-contained, reusable skills | `references/skill-anatomy.md` |
|
|
59
|
+
| 2 | Multi-Phase Pipeline Orchestration | Strict ordering, context passing | `references/patterns-catalog.md` §2 |
|
|
60
|
+
| 3 | Swarm of Agents | Parallel independent tasks | `references/patterns-catalog.md` §3 |
|
|
61
|
+
| 4 | Skill Composition via view() | Loose coupling, single source of truth | `references/patterns-catalog.md` §4 |
|
|
62
|
+
| 5 | Quality Gates | Scoring, verdicts, blocking thresholds | `references/quality-gates.md` |
|
|
63
|
+
| 6 | Documentation-Driven Development | Docs as single source, validate before code | `references/patterns-catalog.md` §6 |
|
|
64
|
+
| 7 | Toolkit Generation | Docs → instruments, conditional, tiered | `references/patterns-catalog.md` §7 |
|
|
65
|
+
|
|
66
|
+
## Operating Modes
|
|
67
|
+
|
|
68
|
+
| Mode | Description | Checkpoints | Time |
|
|
69
|
+
|------|-------------|-------------|------|
|
|
70
|
+
| **ANALYZE** | Analyze existing methodology, extract patterns | 0 | ~10 min |
|
|
71
|
+
| **DESIGN** | Design new pipeline from requirements | 3 | ~30 min |
|
|
72
|
+
| **FORGE** | Generate complete pipeline (skills + commands + agents + rules) | 5 | ~60 min |
|
|
73
|
+
| **AUDIT** | Audit existing pipeline against best practices | 2 | ~15 min |
|
|
74
|
+
|
|
75
|
+
## Pipeline
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
INPUT: Domain description / existing methodology to analyze
|
|
79
|
+
↓
|
|
80
|
+
PHASE 1: DISCOVERY
|
|
81
|
+
Understand the domain, identify phases, actors, artifacts
|
|
82
|
+
→ Domain Model
|
|
83
|
+
⏸️ CHECKPOINT 1
|
|
84
|
+
↓
|
|
85
|
+
PHASE 2: PATTERN MATCHING
|
|
86
|
+
Map domain phases to core patterns (1-7)
|
|
87
|
+
Identify which patterns apply and how
|
|
88
|
+
→ Pattern Application Map
|
|
89
|
+
⏸️ CHECKPOINT 2
|
|
90
|
+
↓
|
|
91
|
+
PHASE 3: SKILL DECOMPOSITION
|
|
92
|
+
Break domain into composable skills
|
|
93
|
+
Define skill boundaries, interfaces, dependencies
|
|
94
|
+
→ Skill Dependency Graph
|
|
95
|
+
⏸️ CHECKPOINT 3
|
|
96
|
+
↓
|
|
97
|
+
PHASE 4: PIPELINE DESIGN
|
|
98
|
+
Design orchestrator, context flow, quality gates
|
|
99
|
+
Define checkpoints, verdicts, exit criteria
|
|
100
|
+
→ Pipeline Specification
|
|
101
|
+
⏸️ CHECKPOINT 4
|
|
102
|
+
↓
|
|
103
|
+
PHASE 5: FORGE
|
|
104
|
+
Generate all files: skills, commands, agents, rules
|
|
105
|
+
Apply templates, validate structure
|
|
106
|
+
→ Complete Pipeline Toolkit
|
|
107
|
+
⏸️ CHECKPOINT 5
|
|
108
|
+
↓
|
|
109
|
+
OUTPUT: Ready-to-use pipeline in .claude/
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Execution Protocol
|
|
113
|
+
|
|
114
|
+
### Phase 1: DISCOVERY
|
|
115
|
+
|
|
116
|
+
**Goal:** Understand the target domain and identify its natural phases.
|
|
117
|
+
|
|
118
|
+
**Process:**
|
|
119
|
+
1. Use `explore` skill (if available) to clarify vague requests
|
|
120
|
+
2. Identify the **actors** (who participates)
|
|
121
|
+
3. Identify the **artifacts** (what gets produced)
|
|
122
|
+
4. Identify the **phases** (natural sequential stages)
|
|
123
|
+
5. Identify the **quality criteria** (what makes output good)
|
|
124
|
+
|
|
125
|
+
**Discovery Questions:**
|
|
126
|
+
- What is the end-to-end process from input to output?
|
|
127
|
+
- What are the natural stages where work product changes form?
|
|
128
|
+
- Who are the actors at each stage?
|
|
129
|
+
- What artifacts are produced at each stage?
|
|
130
|
+
- What can go wrong at each stage?
|
|
131
|
+
- What are the quality criteria for each artifact?
|
|
132
|
+
- Which stages are independent (parallelizable)?
|
|
133
|
+
- Which stages have strict dependencies?
|
|
134
|
+
|
|
135
|
+
**Output — Domain Model:**
|
|
136
|
+
```markdown
|
|
137
|
+
## Domain Model: [Domain Name]
|
|
138
|
+
|
|
139
|
+
### Input
|
|
140
|
+
[What enters the pipeline]
|
|
141
|
+
|
|
142
|
+
### Output
|
|
143
|
+
[What the pipeline produces]
|
|
144
|
+
|
|
145
|
+
### Actors
|
|
146
|
+
| Actor | Role | Stages |
|
|
147
|
+
|-------|------|--------|
|
|
148
|
+
|
|
149
|
+
### Phases
|
|
150
|
+
| # | Phase | Input | Output | Quality Gate |
|
|
151
|
+
|---|-------|-------|--------|--------------|
|
|
152
|
+
|
|
153
|
+
### Artifacts
|
|
154
|
+
| Artifact | Producer Phase | Consumer Phase | Format |
|
|
155
|
+
|----------|---------------|----------------|--------|
|
|
156
|
+
|
|
157
|
+
### Parallelism Opportunities
|
|
158
|
+
[Which phases/tasks can run concurrently]
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Checkpoint:**
|
|
162
|
+
```
|
|
163
|
+
═══════════════════════════════════════════════════════════════
|
|
164
|
+
⏸️ CHECKPOINT 1: DOMAIN MODEL
|
|
165
|
+
[Summary of phases, actors, artifacts]
|
|
166
|
+
"ок" — proceed to Pattern Matching
|
|
167
|
+
"уточни [aspect]" — clarify
|
|
168
|
+
═══════════════════════════════════════════════════════════════
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### Phase 2: PATTERN MATCHING
|
|
174
|
+
|
|
175
|
+
**Goal:** Map domain phases to the 7 core patterns.
|
|
176
|
+
|
|
177
|
+
**Process:**
|
|
178
|
+
1. Read `references/patterns-catalog.md` for pattern definitions
|
|
179
|
+
2. For each domain phase, identify which pattern(s) apply
|
|
180
|
+
3. Score applicability (HIGH / MEDIUM / LOW / N/A)
|
|
181
|
+
4. Identify custom patterns needed (not covered by the 7)
|
|
182
|
+
|
|
183
|
+
**Pattern Application Matrix:**
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
## Pattern Application Map
|
|
187
|
+
|
|
188
|
+
| Domain Phase | Pattern 1: Composable | Pattern 2: Pipeline | Pattern 3: Swarm | Pattern 4: Composition | Pattern 5: Quality | Pattern 6: Doc-Driven | Pattern 7: Toolkit |
|
|
189
|
+
|--------------|----------------------|---------------------|-------------------|------------------------|--------------------|-----------------------|---------------------|
|
|
190
|
+
| Phase A | HIGH | HIGH | LOW | MEDIUM | HIGH | N/A | N/A |
|
|
191
|
+
| Phase B | MEDIUM | HIGH | HIGH | HIGH | MEDIUM | HIGH | N/A |
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Key Decisions:**
|
|
195
|
+
- Which phases need quality gates (Pattern 5)?
|
|
196
|
+
- Which phases can use swarm parallelism (Pattern 3)?
|
|
197
|
+
- Which skills need composition (Pattern 4)?
|
|
198
|
+
- Is documentation-driven approach needed (Pattern 6)?
|
|
199
|
+
- Does the pipeline produce a toolkit (Pattern 7)?
|
|
200
|
+
|
|
201
|
+
**Checkpoint:**
|
|
202
|
+
```
|
|
203
|
+
═══════════════════════════════════════════════════════════════
|
|
204
|
+
⏸️ CHECKPOINT 2: PATTERN APPLICATION MAP
|
|
205
|
+
[Summary of which patterns apply where]
|
|
206
|
+
"ок" — proceed to Skill Decomposition
|
|
207
|
+
"измени [pattern] для [phase]" — adjust
|
|
208
|
+
═══════════════════════════════════════════════════════════════
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### Phase 3: SKILL DECOMPOSITION
|
|
214
|
+
|
|
215
|
+
**Goal:** Break domain into composable skills with clear boundaries.
|
|
216
|
+
|
|
217
|
+
**Process:**
|
|
218
|
+
1. Read `references/skill-anatomy.md` for skill structure
|
|
219
|
+
2. For each domain capability, create a skill definition
|
|
220
|
+
3. Define interfaces: inputs, outputs, dependencies
|
|
221
|
+
4. Create dependency graph
|
|
222
|
+
5. Identify reusable vs domain-specific skills
|
|
223
|
+
|
|
224
|
+
**Skill Design Principles:**
|
|
225
|
+
- **Single Responsibility**: One skill = one capability
|
|
226
|
+
- **Self-Contained**: SKILL.md + references/ + templates/ = complete
|
|
227
|
+
- **Loose Coupling**: Skills reference each other via view(), not inline
|
|
228
|
+
- **Explicit Interfaces**: Input format, output format, triggers documented
|
|
229
|
+
- **Fallback Strategy**: What happens if a dependency is unavailable
|
|
230
|
+
|
|
231
|
+
**Output — Skill Dependency Graph:**
|
|
232
|
+
```markdown
|
|
233
|
+
## Skills
|
|
234
|
+
|
|
235
|
+
| Skill | Responsibility | Type | Dependencies |
|
|
236
|
+
|-------|---------------|------|--------------|
|
|
237
|
+
| explore | Task clarification | Generic (reusable) | None |
|
|
238
|
+
| [domain-skill-1] | [what it does] | Domain-specific | explore |
|
|
239
|
+
| [domain-skill-2] | [what it does] | Domain-specific | [skill-1] |
|
|
240
|
+
|
|
241
|
+
## Dependency Graph
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
[orchestrator]
|
|
245
|
+
├── [skill-1] (Phase 1)
|
|
246
|
+
│ └── explore (if unclear)
|
|
247
|
+
├── [skill-2] (Phase 2)
|
|
248
|
+
│ ├── [skill-1] (context)
|
|
249
|
+
│ └── goap-research-ed25519 (if research needed)
|
|
250
|
+
├── [validator] (Phase 3)
|
|
251
|
+
│ └── requirements-validator
|
|
252
|
+
└── [generator] (Phase 4)
|
|
253
|
+
└── cc-toolkit-generator-enhanced
|
|
254
|
+
```
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
**Checkpoint:**
|
|
258
|
+
```
|
|
259
|
+
═══════════════════════════════════════════════════════════════
|
|
260
|
+
⏸️ CHECKPOINT 3: SKILL DECOMPOSITION
|
|
261
|
+
Skills: [N] total ([M] reusable + [K] domain-specific)
|
|
262
|
+
Dependencies: [graph summary]
|
|
263
|
+
"ок" — proceed to Pipeline Design
|
|
264
|
+
"добавь скилл для [capability]" — add skill
|
|
265
|
+
"объедини [A] и [B]" — merge skills
|
|
266
|
+
═══════════════════════════════════════════════════════════════
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### Phase 4: PIPELINE DESIGN
|
|
272
|
+
|
|
273
|
+
**Goal:** Design the orchestrator with context flow, quality gates, and checkpoints.
|
|
274
|
+
|
|
275
|
+
**Process:**
|
|
276
|
+
1. Read `references/quality-gates.md` for gate patterns
|
|
277
|
+
2. Define context flow: what data passes between phases
|
|
278
|
+
3. Define quality gates: scoring, verdicts, exit criteria
|
|
279
|
+
4. Define checkpoints: user interaction points
|
|
280
|
+
5. Define error handling: what happens on failure
|
|
281
|
+
6. Define git discipline: when to commit
|
|
282
|
+
|
|
283
|
+
**Pipeline Specification Format:**
|
|
284
|
+
```markdown
|
|
285
|
+
## Pipeline: [Name]
|
|
286
|
+
|
|
287
|
+
### Context Flow
|
|
288
|
+
Phase 1 → Phase 2: [what context passes]
|
|
289
|
+
Phase 2 → Phase 3: [what context passes]
|
|
290
|
+
...
|
|
291
|
+
|
|
292
|
+
### Quality Gates
|
|
293
|
+
| Gate | After Phase | Scoring | Blocking Threshold | Verdict Options |
|
|
294
|
+
|------|------------|---------|-------------------|-----------------|
|
|
295
|
+
|
|
296
|
+
### Checkpoints
|
|
297
|
+
| CP | After Phase | User Commands | Purpose |
|
|
298
|
+
|----|------------|---------------|---------|
|
|
299
|
+
|
|
300
|
+
### Error Handling
|
|
301
|
+
| Error | Phase | Recovery Strategy |
|
|
302
|
+
|-------|-------|-------------------|
|
|
303
|
+
|
|
304
|
+
### Git Commits
|
|
305
|
+
| After Phase | Commit Template |
|
|
306
|
+
|------------|-----------------|
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Checkpoint:**
|
|
310
|
+
```
|
|
311
|
+
═══════════════════════════════════════════════════════════════
|
|
312
|
+
⏸️ CHECKPOINT 4: PIPELINE SPECIFICATION
|
|
313
|
+
Phases: [N], Quality Gates: [M], Checkpoints: [K]
|
|
314
|
+
Context flow: [summary]
|
|
315
|
+
"ок" — proceed to Forge
|
|
316
|
+
"добавь gate для [phase]" — add quality gate
|
|
317
|
+
"измени flow" — modify context flow
|
|
318
|
+
═══════════════════════════════════════════════════════════════
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
### Phase 5: FORGE
|
|
324
|
+
|
|
325
|
+
**Goal:** Generate all pipeline files using templates.
|
|
326
|
+
|
|
327
|
+
**Process:**
|
|
328
|
+
1. Read templates from `templates/`
|
|
329
|
+
2. For each skill → generate `SKILL.md` + directory structure
|
|
330
|
+
3. For orchestrator → generate command `.md`
|
|
331
|
+
4. For agents → generate agent `.md` files
|
|
332
|
+
5. For rules → generate rule `.md` files
|
|
333
|
+
6. For hooks → generate `settings.json` entries
|
|
334
|
+
7. Validate all files against master checklist
|
|
335
|
+
|
|
336
|
+
**Generation Order:**
|
|
337
|
+
```
|
|
338
|
+
1. Skills (bottom-up: leaf skills first, then composites)
|
|
339
|
+
2. Agents (specialized workers)
|
|
340
|
+
3. Rules (constraints and conventions)
|
|
341
|
+
4. Commands (user-facing entry points)
|
|
342
|
+
5. Orchestrator command (pipeline entry point)
|
|
343
|
+
6. CLAUDE.md section (pipeline documentation)
|
|
344
|
+
7. settings.json (hooks)
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**File Generation Strategy:**
|
|
348
|
+
- Use `templates/skill-template.md` for each skill
|
|
349
|
+
- Use `templates/command-template.md` for each command
|
|
350
|
+
- Use `templates/agent-template.md` for each agent
|
|
351
|
+
- Use `templates/pipeline-template.md` for the orchestrator
|
|
352
|
+
- Substitute `{{PLACEHOLDERS}}` with domain-specific content
|
|
353
|
+
|
|
354
|
+
**Master Validation Checklist:**
|
|
355
|
+
- [ ] Every skill has `SKILL.md` with name, description, triggers
|
|
356
|
+
- [ ] Every skill has explicit input/output format
|
|
357
|
+
- [ ] Every skill has anti-pattern warnings
|
|
358
|
+
- [ ] Orchestrator references all skills by correct path
|
|
359
|
+
- [ ] Quality gates have scoring systems and verdicts
|
|
360
|
+
- [ ] Checkpoints have user commands documented
|
|
361
|
+
- [ ] Context flow matches phase ordering
|
|
362
|
+
- [ ] Git commits defined for each major phase
|
|
363
|
+
- [ ] No circular dependencies in skill graph
|
|
364
|
+
- [ ] All templates substituted (no `{{PLACEHOLDER}}` remaining)
|
|
365
|
+
|
|
366
|
+
**Checkpoint:**
|
|
367
|
+
```
|
|
368
|
+
═══════════════════════════════════════════════════════════════
|
|
369
|
+
✅ PIPELINE FORGED: [Pipeline Name]
|
|
370
|
+
|
|
371
|
+
📁 Generated structure:
|
|
372
|
+
├── .claude/
|
|
373
|
+
│ ├── skills/
|
|
374
|
+
│ │ ├── [skill-1]/SKILL.md
|
|
375
|
+
│ │ ├── [skill-2]/SKILL.md
|
|
376
|
+
│ │ └── ...
|
|
377
|
+
│ ├── commands/
|
|
378
|
+
│ │ ├── [pipeline-command].md
|
|
379
|
+
│ │ └── ...
|
|
380
|
+
│ ├── agents/
|
|
381
|
+
│ │ ├── [agent-1].md
|
|
382
|
+
│ │ └── ...
|
|
383
|
+
│ └── rules/
|
|
384
|
+
│ ├── [rule-1].md
|
|
385
|
+
│ └── ...
|
|
386
|
+
|
|
387
|
+
Skills: [N] | Commands: [M] | Agents: [K] | Rules: [J]
|
|
388
|
+
|
|
389
|
+
🚀 Run /[pipeline-command] to start the pipeline
|
|
390
|
+
═══════════════════════════════════════════════════════════════
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
## Swarm Strategy
|
|
394
|
+
|
|
395
|
+
When designing pipelines, identify parallelism opportunities and use swarm agents:
|
|
396
|
+
|
|
397
|
+
**When to use swarms:**
|
|
398
|
+
- Multiple independent validations (like doc-validator's 5 parallel validators)
|
|
399
|
+
- Independent research tasks across topics
|
|
400
|
+
- Multi-artifact generation from single source
|
|
401
|
+
- Cross-document consistency checks
|
|
402
|
+
|
|
403
|
+
**Swarm Design Pattern:**
|
|
404
|
+
```
|
|
405
|
+
1. DECOMPOSE: Break task into independent subtasks
|
|
406
|
+
2. SPAWN: Launch parallel agents via Task tool
|
|
407
|
+
3. AGGREGATE: Collect results, merge, resolve conflicts
|
|
408
|
+
4. VALIDATE: Cross-check aggregate for consistency
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**Swarm Agent Template:**
|
|
412
|
+
```markdown
|
|
413
|
+
| Agent | Scope | Criteria | Independence |
|
|
414
|
+
|-------|-------|----------|-------------|
|
|
415
|
+
| validator-X | [scope] | [criteria] | Full (no cross-deps) |
|
|
416
|
+
| validator-Y | [scope] | [criteria] | Full (no cross-deps) |
|
|
417
|
+
| validator-Z | [scope] | [criteria] | Reads X,Y output |
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## Plugin Architecture
|
|
421
|
+
|
|
422
|
+
When building pipelines as distributable plugins:
|
|
423
|
+
|
|
424
|
+
**Install Pattern:**
|
|
425
|
+
```bash
|
|
426
|
+
# Remote install via curl
|
|
427
|
+
curl -sL https://raw.githubusercontent.com/[org]/[repo]/main/install.sh | bash
|
|
428
|
+
|
|
429
|
+
# What install.sh does:
|
|
430
|
+
# 1. Clone repo to temp directory
|
|
431
|
+
# 2. Detect conflicts with existing .claude/ files
|
|
432
|
+
# 3. Copy skills/, commands/, agents/, rules/
|
|
433
|
+
# 4. Write manifest for clean uninstall
|
|
434
|
+
# 5. Show summary and next steps
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
**Manifest Pattern:**
|
|
438
|
+
```
|
|
439
|
+
.claude/.plugin-manifest
|
|
440
|
+
├── skills/[name] # Installed skill directories
|
|
441
|
+
├── commands/[name].md # Installed commands
|
|
442
|
+
├── agents/[name].md # Installed agents
|
|
443
|
+
└── rules/[name].md # Installed rules
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
**Non-Destructive Rules:**
|
|
447
|
+
- Never overwrite existing files without user confirmation
|
|
448
|
+
- Write manifest for clean uninstall
|
|
449
|
+
- Don't touch source code, configs, or existing .claude files
|
|
450
|
+
- Support both "template" (new project) and "plugin" (existing project) modes
|
|
451
|
+
|
|
452
|
+
## Path Mapping (Portability)
|
|
453
|
+
|
|
454
|
+
Skills written for claude.ai use `/mnt/skills/user/` paths. For Claude Code portability:
|
|
455
|
+
|
|
456
|
+
| claude.ai path | Claude Code path |
|
|
457
|
+
|----------------|------------------|
|
|
458
|
+
| `/mnt/skills/user/[name]/` | `.claude/skills/[name]/` |
|
|
459
|
+
| `/mnt/user-data/uploads/` | `docs/` or project-specific |
|
|
460
|
+
| `/output/` | `docs/` or project root |
|
|
461
|
+
|
|
462
|
+
**Rule:** Always include path mapping table in orchestrator commands for cross-platform compatibility.
|
|
463
|
+
|
|
464
|
+
## Anti-Patterns
|
|
465
|
+
|
|
466
|
+
❌ **Monolithic Skills** — skills with 1000+ lines doing everything
|
|
467
|
+
❌ **Implicit Dependencies** — skills that assume others exist without declaring
|
|
468
|
+
❌ **Skipping Quality Gates** — generating toolkit from unvalidated documentation
|
|
469
|
+
❌ **Hardcoded Paths** — using absolute paths instead of relative/mapped
|
|
470
|
+
❌ **Duplicating Logic** — copying skill content instead of view() references
|
|
471
|
+
❌ **No Checkpoints** — running entire pipeline without user feedback points
|
|
472
|
+
❌ **No Error Recovery** — pipeline that can't resume from a failed phase
|
|
473
|
+
❌ **Over-Engineering** — creating 20 skills when 5 would suffice
|
|
474
|
+
❌ **No Fallbacks** — skills that crash when an optional dependency is missing
|
|
475
|
+
|
|
476
|
+
## Quality Standards
|
|
477
|
+
|
|
478
|
+
**Skill Quality:**
|
|
479
|
+
- [ ] SKILL.md has frontmatter (name, description, triggers)
|
|
480
|
+
- [ ] Clear "When to Use" with trigger patterns
|
|
481
|
+
- [ ] Explicit input/output formats
|
|
482
|
+
- [ ] Anti-patterns section
|
|
483
|
+
- [ ] References to related skills
|
|
484
|
+
|
|
485
|
+
**Pipeline Quality:**
|
|
486
|
+
- [ ] All phases have documented inputs/outputs
|
|
487
|
+
- [ ] Context flow is complete (no data gaps)
|
|
488
|
+
- [ ] Quality gates have blocking thresholds
|
|
489
|
+
- [ ] Checkpoints have user command reference
|
|
490
|
+
- [ ] Git discipline defined
|
|
491
|
+
- [ ] Error handling documented
|
|
492
|
+
- [ ] Swarm opportunities identified and used
|
|
493
|
+
|
|
494
|
+
**Plugin Quality:**
|
|
495
|
+
- [ ] install.sh handles conflicts gracefully
|
|
496
|
+
- [ ] Manifest written for uninstall
|
|
497
|
+
- [ ] No destructive operations without confirmation
|
|
498
|
+
- [ ] Works as both template and plugin
|
|
499
|
+
|
|
500
|
+
## Integration with Existing Skills
|
|
501
|
+
|
|
502
|
+
Pipeline Forge works best when combined with:
|
|
503
|
+
|
|
504
|
+
| Skill | Integration | Phase |
|
|
505
|
+
|-------|-------------|-------|
|
|
506
|
+
| `explore` | Clarify vague pipeline requirements | Phase 1 |
|
|
507
|
+
| `problem-solver-enhanced` | Resolve design contradictions (TRIZ) | Phase 3-4 |
|
|
508
|
+
| `brutal-honesty-review` | Audit pipeline for quality issues | AUDIT mode |
|
|
509
|
+
| `goap-research-ed25519` | Research best practices for domain | Phase 1-2 |
|
|
510
|
+
| `requirements-validator` | Validate pipeline specification | Phase 4 |
|
|
511
|
+
|
|
512
|
+
## Checkpoint Commands (all phases)
|
|
513
|
+
|
|
514
|
+
| Command | Action |
|
|
515
|
+
|---------|--------|
|
|
516
|
+
| `ок` / `далее` | Next phase |
|
|
517
|
+
| `уточни [topic]` | Clarify aspect |
|
|
518
|
+
| `добавь [element]` | Add skill/phase/gate |
|
|
519
|
+
| `убери [element]` | Remove element |
|
|
520
|
+
| `измени [element]` | Modify element |
|
|
521
|
+
| `покажи [artifact]` | Preview artifact |
|
|
522
|
+
| `граф` | Show dependency graph |
|
|
523
|
+
| `стоп` | Save state, pause |
|