@dzhechkov/p-replicator 1.0.1 → 1.1.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.
Files changed (19) hide show
  1. package/README.md +25 -3
  2. package/package.json +6 -3
  3. package/src/commands/doctor.js +2 -2
  4. package/src/commands/list.js +1 -1
  5. package/templates/.claude/rules/replicate-pipeline.md +13 -1
  6. package/templates/.claude/rules/skill-interface-protocol.md +148 -0
  7. package/templates/.claude/skills/cc-toolkit-generator-enhanced/SKILL.md +116 -63
  8. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/01-detect-parse.md +329 -0
  9. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/02-analyze-map.md +449 -0
  10. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/03-generate-p0.md +630 -0
  11. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/04-generate-p1.md +537 -0
  12. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/05-generate-p2p3.md +512 -0
  13. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/06-package-deliver.md +710 -0
  14. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/07-harvest-feedback.md +286 -0
  15. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/08-skill-composition.md +378 -0
  16. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/09-cross-project-learning.md +461 -0
  17. package/templates/.claude/skills/cc-toolkit-generator-enhanced/modules/README.md +83 -0
  18. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/maturity-integration.md +198 -0
  19. package/templates/.claude/skills/pipeline-forge/references/self-extracted-patterns.md +260 -0
@@ -0,0 +1,198 @@
1
+ # Maturity Integration for Generated Toolkit Items
2
+
3
+ Tags, tracks, and promotes generated toolkit items using the knowledge-extractor's
4
+ 4-level maturity model (Alpha / Beta / Stable / Proven).
5
+
6
+ ---
7
+
8
+ ## Maturity Levels
9
+
10
+ | Level | Symbol | Name | Trust | Auto-inject threshold (Module 09) |
11
+ |-------|--------|------|-------|-----------------------------------|
12
+ | 0 | Alpha | First generation, untested beyond source project | Low | Never auto-include |
13
+ | 1 | Beta | Validated in 2+ projects, edge cases handled | Medium | Relevance >= 70, user confirms |
14
+ | 2 | Stable | 3+ projects, well-documented, independently usable | High | Relevance >= 60 |
15
+ | 3 | Proven | 5+ projects, battle-tested, reference quality | Very High | Relevance >= 50 |
16
+
17
+ ## Default Maturity Assignment
18
+
19
+ Every item produced by the generator starts at **Alpha** unless it was injected
20
+ from the cross-project registry at a higher level.
21
+
22
+ ### Tagging Rules by Generation Phase
23
+
24
+ | Generator Phase | Item Types | Default Maturity | Override Condition |
25
+ |-----------------|-----------|------------------|-------------------|
26
+ | P0 (Mandatory) | CLAUDE.md, rules, /start, /feature, /myinsights, settings.json, lifecycle skills | Alpha | Proven registry artifact replaces default |
27
+ | P1 (Recommended) | Agents, /next, /plan, /go, /run, /docs, feature-navigator | Alpha | Stable+ registry artifact replaces default |
28
+ | P2-P3 (Optional) | TDD guide, DDD validators, MCP configs | Alpha | Beta+ registry artifact recommended |
29
+ | Injected (Module 09) | Any category from registry | Inherited from registry | N/A -- keeps its maturity |
30
+
31
+ Lifecycle skills copied via Module 08 (sparc-prd-mini, explore, goap-research,
32
+ problem-solver-enhanced, requirements-validator, brutal-honesty-review) are
33
+ **shared upstream skills** -- excluded from the manifest and tracked in the
34
+ shared skill registry instead.
35
+
36
+ ## Maturity Manifest
37
+
38
+ Each project gets `.claude/maturity-manifest.json` (built by Module 06). This is
39
+ the single source of truth for toolkit item maturity within the project.
40
+
41
+ ### Template
42
+
43
+ ```json
44
+ {
45
+ "schema_version": "1.0",
46
+ "project": "{{PROJECT_NAME}}",
47
+ "generated_at": "{{ISO_DATE}}",
48
+ "generator_version": "cc-toolkit-generator-enhanced",
49
+ "items": [
50
+ {
51
+ "id": "rule:git-workflow",
52
+ "path": ".claude/rules/git-workflow.md",
53
+ "category": "rule",
54
+ "phase": "P0",
55
+ "maturity": "Alpha",
56
+ "version": "v1.0",
57
+ "source": "generated",
58
+ "source_project": null,
59
+ "usage_count": 1,
60
+ "promoted_at": null,
61
+ "notes": null
62
+ },
63
+ {
64
+ "id": "command:feature",
65
+ "path": ".claude/commands/feature.md",
66
+ "category": "command",
67
+ "phase": "P0",
68
+ "maturity": "Alpha",
69
+ "version": "v1.0",
70
+ "source": "generated",
71
+ "source_project": null,
72
+ "usage_count": 1,
73
+ "promoted_at": null,
74
+ "notes": null
75
+ },
76
+ {
77
+ "id": "rule:security",
78
+ "path": ".claude/rules/security.md",
79
+ "category": "rule",
80
+ "phase": "P0",
81
+ "maturity": "Stable",
82
+ "version": "v2.1",
83
+ "source": "registry",
84
+ "source_project": "project-alpha",
85
+ "usage_count": 4,
86
+ "promoted_at": "2026-02-10",
87
+ "notes": "Injected by Module 09, relevance 82"
88
+ }
89
+ ],
90
+ "summary": {
91
+ "total": 0,
92
+ "alpha": 0,
93
+ "beta": 0,
94
+ "stable": 0,
95
+ "proven": 0
96
+ }
97
+ }
98
+ ```
99
+
100
+ ### Field Reference
101
+
102
+ | Field | Type | Description |
103
+ |-------|------|-------------|
104
+ | `id` | string | `{category}:{short-name}` -- unique within project |
105
+ | `path` | string | Relative path from project root |
106
+ | `category` | enum | `rule`, `command`, `agent`, `skill`, `hook`, `template`, `pattern`, `snippet` |
107
+ | `phase` | enum | `P0`, `P1`, `P2`, `P3` -- generation phase |
108
+ | `maturity` | enum | `Alpha`, `Beta`, `Stable`, `Proven` |
109
+ | `version` | string | Semantic version `v{MAJOR}.{MINOR}` |
110
+ | `source` | enum | `generated` (new) or `registry` (injected from cross-project registry) |
111
+ | `source_project` | string? | Original project name if sourced from registry |
112
+ | `usage_count` | number | How many projects have used this item |
113
+ | `promoted_at` | string? | ISO date of last maturity promotion |
114
+ | `notes` | string? | Free-text context (relevance score, edge cases, etc.) |
115
+
116
+ ## Promotion Flow
117
+
118
+ Maturity promotes as the item is reused across projects. Promotion is tracked
119
+ both in the per-project manifest and in the cross-project registry.
120
+
121
+ ### Promotion Criteria
122
+
123
+ ```
124
+ Alpha -> Beta (all required):
125
+ - Used in 2+ distinct projects
126
+ - At least 1 edge case discovered and handled
127
+ - "When NOT to use" guidance documented
128
+ - No project-specific references remain
129
+
130
+ Beta -> Stable (all required):
131
+ - Used in 3+ distinct projects
132
+ - All known edge cases documented
133
+ - Multiple variants documented (>= 2)
134
+ - Successfully used by another developer or AI agent without guidance
135
+
136
+ Stable -> Proven (all required):
137
+ - Used in 5+ distinct projects
138
+ - Version >= v3.0 (iterated on meaningfully)
139
+ - Exemplary documentation (could serve as tutorial)
140
+ - Has complementary artifacts (related patterns/rules)
141
+ ```
142
+
143
+ ### Promotion Triggers
144
+
145
+ Checks run at two points: (1) **Module 09** -- after injecting a registry
146
+ artifact, increment `usage_count` and evaluate; (2) **/harvest** -- when
147
+ extracting from a completed project, compare against registry and evaluate.
148
+ Promotions are **recommendations** in the learning report; a reviewer confirms.
149
+
150
+ ### Demotion
151
+
152
+ | From | To | Trigger |
153
+ |------|----|---------|
154
+ | Any | Alpha | Breaking change in underlying technology |
155
+ | Any | Deprecated | Technology/framework retired |
156
+ | Proven | Stable | Superior alternative discovered |
157
+
158
+ ## Cross-Project Learning Integration (Module 09)
159
+
160
+ Module 09 uses maturity to decide what to inject into a new toolkit:
161
+
162
+ ```
163
+ 1. SCAN registry for artifacts matching project IPM
164
+ 2. COMPUTE relevance score per artifact (0-100)
165
+ 3. FILTER by maturity + relevance:
166
+ - Proven + relevance >= 50 -> inject into P0
167
+ - Stable + relevance >= 60 -> inject into P1
168
+ - Beta + relevance >= 70 -> recommend in P2 (user confirms)
169
+ - Alpha -> report only, never inject
170
+ 4. INJECT passing artifacts into generation, replacing defaults
171
+ 5. RECORD each injection in maturity-manifest.json with source=registry
172
+ 6. APPEND usage record to registry usage-log.jsonl
173
+ 7. EVALUATE promotion candidates, write to learning report
174
+ ```
175
+
176
+ ### Source Field Convention
177
+
178
+ - `source: "registry"` -- item injected from cross-project registry. Inherits
179
+ maturity, version, usage_count, and source_project from the registry entry.
180
+ The `notes` field records relevance score and match details.
181
+ - `source: "generated"` -- item created fresh by the generator. Starts at
182
+ Alpha v1.0 with usage_count 1 and null source_project.
183
+
184
+ See the JSON template above for concrete examples of both cases.
185
+
186
+ ## Generator Responsibilities
187
+
188
+ | Module | Maturity Responsibility |
189
+ |--------|------------------------|
190
+ | 01 (Detect & Parse) | None |
191
+ | 02 (Analyze & Map) | None |
192
+ | 03 (Generate P0) | Tag each output item as Alpha v1.0 unless replaced by injection |
193
+ | 04 (Generate P1) | Tag each output item as Alpha v1.0 unless replaced by injection |
194
+ | 05 (Generate P2-P3) | Tag each output item as Alpha v1.0 unless replaced by injection |
195
+ | 06 (Package & Deliver) | Build `maturity-manifest.json`, compute summary counts |
196
+ | 07 (Harvest Feedback) | Update registry maturity based on project outcomes |
197
+ | 08 (Skill Composition) | Exclude copied lifecycle skills from manifest |
198
+ | 09 (Cross-Project Learning) | Inject registry items, inherit maturity, record usage, recommend promotions |
@@ -0,0 +1,260 @@
1
+ # Self-Extracted Patterns
2
+
3
+ Reusable patterns extracted from the PU Unicorn Replicate methodology itself.
4
+ Domain-agnostic, composable with the 7 core patterns in `patterns-catalog.md`.
5
+
6
+ ---
7
+
8
+ ## 1. Module Orchestrator
9
+
10
+ **A thin orchestrator delegates to numbered, self-contained modules with typed interfaces.**
11
+
12
+ **Use when:** skill exceeds 400 lines; phases need independent evolution; execution order varies.
13
+ **Skip when:** skill is under 200 lines; single execution path; no conditional branches.
14
+
15
+ **Input -> Process -> Output:**
16
+ ```
17
+ IN: Orchestrator SKILL.md + modules/01-*.md ... modules/NN-*.md
18
+ DO: 1. SKILL.md declares module table (phase, file, purpose)
19
+ 2. view() loads each module at runtime
20
+ 3. Each module: Input (typed) -> Process -> Output (typed) -> Quality Gate
21
+ 4. Output of module N becomes input to module N+1
22
+ 5. Optional modules loaded conditionally
23
+ OUT: Final artifact assembled from chained module outputs
24
+ ```
25
+
26
+ **PU Unicorn Example:** `cc-toolkit-generator-enhanced/SKILL.md` (~80 lines) delegates to
27
+ 9 modules (~165K chars total). Core: `01-detect-parse` through `06-package-deliver`.
28
+ Extensions: `07-harvest-feedback`, `08-skill-composition`, `09-cross-project-learning`.
29
+
30
+ **Adapt:** Create orchestrator with module table + flow diagram. Number modules by execution
31
+ order. Enforce typed interface contract (Input/Process/Output/Quality Gate per module).
32
+ Use view() -- never inline content. Mark optional modules explicitly.
33
+
34
+ **Integrates with:** Pipeline Orchestration (catalog P2) for sequencing; Swarm Agent (P7) inside modules; Quality Gate (P6) between modules.
35
+
36
+ ---
37
+
38
+ ## 2. Feedback Loop (Harvest-Improve-Generate)
39
+
40
+ **Outputs from completed projects feed back to improve templates for future generation.**
41
+
42
+ **Use when:** templates evolve over time; multiple projects share the pipeline; you want empirical improvement.
43
+ **Skip when:** one-off generation; templates are externally mandated; feedback overhead exceeds benefit.
44
+
45
+ **Input -> Process -> Output:**
46
+ ```
47
+ IN: Harvest reports (extracted artifacts) + current generation templates
48
+ DO: 1. SCAN harvest reports for artifacts
49
+ 2. MATCH artifacts against templates by category
50
+ 3. CLASSIFY: NEW_DEFAULT | TEMPLATE_UPGRADE | NEW_RULE | RECOMMENDATION_UPDATE
51
+ 4. SCORE by impact (1-10) and risk (LOW/MEDIUM/HIGH)
52
+ 5. AUTO-APPLY if: risk=LOW AND impact>=7 AND maturity>=Beta
53
+ 6. REPORT non-eligible improvements for human review
54
+ 7. PROMOTE maturity on successful application
55
+ OUT: Updated templates + feedback report + maturity promotions
56
+ ```
57
+
58
+ **PU Unicorn Example:** Module `07-harvest-feedback.md` -- `/harvest` extracts artifacts,
59
+ module 07 matches them against cc-toolkit-generator templates, auto-applies low-risk
60
+ high-impact improvements, promotes artifacts through Alpha -> Beta -> Stable.
61
+
62
+ **Adapt:** Replace artifact-to-template mapping. Keep the impact/risk matrix, auto-apply
63
+ formula, and maturity promotion thresholds (2 projects -> Beta, 3 -> Stable, 5 -> Proven).
64
+ All auto-applied changes must be additive, never destructive.
65
+
66
+ **Integrates with:** Cross-Project Learning (P4) for registry; Tiered Generation (P5) via improved templates; Quality Gate (P6) to validate updated templates.
67
+
68
+ ---
69
+
70
+ ## 3. Skill Composition (Dependency Graph + Path Rewriting)
71
+
72
+ **Copy skills into targets by resolving dependencies, rewriting paths, producing a manifest.**
73
+
74
+ **Use when:** skills reference each other; multiple environments with different paths; need install/uninstall manifest.
75
+ **Skip when:** skills are self-contained; single environment; small enough to copy manually.
76
+
77
+ **Input -> Process -> Output:**
78
+ ```
79
+ IN: Required skill names + source registry + target project path
80
+ DO: 1. BUILD dependency graph from view() references in SKILL.md files
81
+ 2. RESOLVE transitive dependencies (depth-first)
82
+ 3. FAIL FAST on circular dependencies before copying
83
+ 4. COPY directories (preserve structure, skip build artifacts)
84
+ 5. REWRITE paths via regex (/mnt/skills/user/X/ -> .claude/skills/X/)
85
+ 6. GENERATE skills.json manifest (graph, integrity, rewrite counts)
86
+ 7. HEALTH CHECK (unresolved paths, missing files, broken refs)
87
+ OUT: Copied skills + rewritten paths + manifest + health report
88
+ ```
89
+
90
+ **PU Unicorn Example:** Module `08-skill-composition.md` copies 6+ skills during generation.
91
+ `sparc-prd-mini`'s transitive dependency on `explore` is auto-resolved. Paths rewritten
92
+ from claude.ai format to Claude Code local paths. Manifest records provenance and integrity.
93
+
94
+ **Adapt:** Define path rewriting rules table and dependency detection patterns for your
95
+ environment. Keep cycle detection, JSON manifest format, and post-copy health check.
96
+
97
+ **Integrates with:** Tiered Generation (P5) during P0 skill copying; Quality Gate (P6) for manifest integrity; Cross-Project Learning (P4) for registry data.
98
+
99
+ ---
100
+
101
+ ## 4. Cross-Project Learning (Registry + Relevance Scoring + Maturity Gating)
102
+
103
+ **Artifact registry with multi-dimensional scoring and maturity gates injects proven patterns into new projects.**
104
+
105
+ **Use when:** multiple projects over time; overlapping tech stacks/domains; want quality to improve per project.
106
+ **Skip when:** every project is unique; fewer than 3 completed projects; policy forbids sharing.
107
+
108
+ **Input -> Process -> Output:**
109
+ ```
110
+ IN: Project characteristics (IPM) + artifact registry + maturity model
111
+ DO: 1. SCAN registry for available artifacts
112
+ 2. SCORE relevance: stack(30) + arch(20) + domain(15) + infra(10) + maturity(15) + usage(10)
113
+ 3. RANK by composite score (0-100)
114
+ 4. FILTER by maturity gate:
115
+ Proven >=50 -> P0 | Stable >=60 -> P1 | Beta >=70 -> P2 (confirm) | Alpha -> report only
116
+ 5. INJECT matched artifacts into generation phases
117
+ 6. TRACK usage in append-only log for maturity promotion
118
+ OUT: Augmented generation plan + learning report + usage records
119
+ ```
120
+
121
+ **PU Unicorn Example:** Module `09-cross-project-learning.md` -- artifact metadata includes
122
+ tech stacks, architecture types, domains. New project IPM scored against each artifact on
123
+ 6 dimensions. Proven patterns auto-inject; Alpha experiments are report-only.
124
+
125
+ **Adapt:** Define your project characteristics model and artifact metadata schema. Adjust
126
+ dimension weights for your domain. Keep maturity gating (Alpha never auto-injects) and
127
+ file-based registry (JSON) for portability.
128
+
129
+ **Integrates with:** Feedback Loop (P2) populates registry via /harvest; Skill Composition (P3) for artifact copying; Tiered Generation (P5) for injection targets.
130
+
131
+ ---
132
+
133
+ ## 5. Tiered Generation (P0/P1/P2/P3)
134
+
135
+ **Organize outputs into mandatory-to-optional tiers: essentials always, advanced conditionally.**
136
+
137
+ **Use when:** generator produces many artifacts; some universal, some conditional; need budget control.
138
+ **Skip when:** every project needs identical outputs; fewer than 5 artifacts; no priority ordering.
139
+
140
+ **Input -> Process -> Output:**
141
+ ```
142
+ IN: Instrument map (scored artifacts) + project characteristics
143
+ DO: 1. CLASSIFY into tiers:
144
+ P0 Mandatory -- always, zero conditions
145
+ P0 Conditional -- if characteristic flag true
146
+ P1 Recommended -- when docs provide enough context
147
+ P2 Optional -- nice-to-have, user opts in
148
+ P3 Integration -- external system configs
149
+ 2. GENERATE P0 first (foundation)
150
+ 3. GENERATE P1 (may reference P0)
151
+ 4. GENERATE P2-P3 (may reference P0+P1)
152
+ 5. ENFORCE context budget per tier and total
153
+ OUT: Tiered artifact set within budget constraints
154
+ ```
155
+
156
+ **PU Unicorn Example:** Modules `03-generate-p0.md` through `05-generate-p2p3.md`:
157
+ P0 = CLAUDE.md, /start, /feature, git-workflow, security (always).
158
+ P0 conditional = secrets-management (if has_external_apis).
159
+ P1 = planner agent, /plan, /deploy. P1 conditional = /feature-ent (if DDD).
160
+ P2 = TDD guide. P3 = .mcp.json. Budget: ~18K target, 30K max.
161
+
162
+ **Adapt:** Define your P0 (what must every project have?). Set conditional triggers.
163
+ Set budget per tier. Ensure P0 alone produces a working system.
164
+
165
+ **Integrates with:** Cross-Project Learning (P4) informs tier assignment; Quality Gate (P6) at tier boundaries; Skill Composition (P3) during P0; Module Orchestrator (P1) for module boundaries.
166
+
167
+ ---
168
+
169
+ ## 6. Quality Gate (Checklist-Driven Validation)
170
+
171
+ **Score output against weighted criteria, render three-tier verdict, block if insufficient.**
172
+
173
+ **Use when:** phases produce dependent artifacts; late defects are costly; need auditable validation.
174
+ **Skip when:** single phase; speed over quality; criteria are purely subjective.
175
+
176
+ **Input -> Process -> Output:**
177
+ ```
178
+ IN: Phase output + scoring criteria (weighted) + blocking thresholds
179
+ DO: 1. APPLY criteria (binary or graduated 0-100)
180
+ 2. COMPUTE weighted aggregate score
181
+ 3. RENDER verdict:
182
+ READY -- all >=50, avg >=70
183
+ CAVEATS -- warnings, no blocks
184
+ NEEDS_WORK -- any <50 or avg <70
185
+ 4. IF NEEDS_WORK: build Gap Register, fix, re-validate (max 3 iterations)
186
+ 5. IF max iterations exhausted: exit with gap register for human review
187
+ OUT: Verdict + score + gap register + iteration count
188
+ ```
189
+
190
+ **PU Unicorn Example:** `requirements-validator` uses INVEST (50%) + SMART (30%) + coverage (20%). `doc-validator` runs 5-agent validation swarm. Module `06-package-deliver.md` runs master checklist: P0 checks, placeholder scan, budget audit, structural integrity, JSON validation.
191
+
192
+ **Adapt:** Define criteria with weights (sum to 100%). Set thresholds (<50 blocked, <70 warning). Design Gap Register for your domain. Set max iterations (3 recommended). Keep three-tier verdict system unchanged.
193
+
194
+ **Integrates with:** Module Orchestrator (P1) between phases; Tiered Generation (P5) at tier boundaries; Feedback Loop (P2) consumes pass/fail; Swarm Agent (P7) for parallel validation.
195
+
196
+ ---
197
+
198
+ ## 7. Swarm Agent (Parallel Independent Agents with Merge)
199
+
200
+ **Decompose into independent subtasks, run as parallel agents, aggregate with conflict resolution.**
201
+
202
+ **Use when:** 3-7 independent subtasks; clear scopes; straightforward aggregation; latency matters.
203
+ **Skip when:** subtasks depend on each other; more than 7 agents; aggregation is complex; task is trivial.
204
+
205
+ **Input -> Process -> Output:**
206
+ ```
207
+ IN: Task definition + agent table (scope, criteria, independence, output format)
208
+ DO: 1. DECOMPOSE into independent subtasks
209
+ 2. SPAWN parallel agents via Task tool
210
+ 3. Each agent: scoped input -> execute -> structured output
211
+ 4. AGGREGATE: collect, deduplicate, resolve conflicts
212
+ 5. VALIDATE aggregate for consistency
213
+ 6. IF inconsistent: run cross-validation agent (reads all outputs)
214
+ OUT: Unified result + conflict resolution notes
215
+ ```
216
+
217
+ **PU Unicorn Example:** `knowledge-extractor` Phase 1 runs 5 agents (extractor-patterns,
218
+ -commands, -rules, -templates, -snippets) each scanning independently, merged by orchestrator.
219
+ `doc-validator` runs 5 validators; `validator-coherence` depends on the other 4 -- the
220
+ "tier within swarm" sub-pattern where one agent cross-validates peers.
221
+
222
+ **Adapt:** Define agent table (name, scope, criteria, independence). Ensure 3+ fully
223
+ independent agents. Design shared output format for merging. Optionally add a
224
+ cross-validation agent. Cap at 7 per swarm.
225
+
226
+ **Integrates with:** Module Orchestrator (P1) as parallelism within a phase; Quality Gate (P6) scores agent outputs; Feedback Loop (P2) consumes swarm findings.
227
+
228
+ ---
229
+
230
+ ## Composition Map
231
+
232
+ ```
233
+ Module Orchestrator (1)
234
+ ├── Phases use Swarm Agent (7) for parallel work
235
+ ├── Between phases: Quality Gate (6) validates output
236
+ ├── Generation phases: Tiered Generation (5) ordering
237
+ ├── Skills bundled via Skill Composition (3)
238
+ ├── Registry feeds Cross-Project Learning (4)
239
+ └── Post-project: Feedback Loop (2) improves templates
240
+ ```
241
+
242
+ | Composition | Patterns | Use Case |
243
+ |-------------|----------|----------|
244
+ | Validated Pipeline | 1 + 6 | Sequential phases with quality gates |
245
+ | Parallel Validation | 6 + 7 | Swarm of validators for different dimensions |
246
+ | Learning Pipeline | 1 + 2 + 4 | Pipeline improving from past project data |
247
+ | Tiered Generator | 1 + 3 + 5 + 6 | P0/P1/P2 generation with validation |
248
+ | Full Lifecycle | All 7 | Complete PU Unicorn Replicate methodology |
249
+
250
+ ## Quick Reference
251
+
252
+ | # | Pattern | Core Mechanism | Key Constraint |
253
+ |---|---------|----------------|----------------|
254
+ | 1 | Module Orchestrator | SKILL.md + numbered modules + view() | Typed Input/Output/Quality Gate per module |
255
+ | 2 | Feedback Loop | harvest -> match -> score -> auto-apply | Never auto-apply HIGH risk changes |
256
+ | 3 | Skill Composition | dependency graph + path rewrite + manifest | Fail fast on circular dependencies |
257
+ | 4 | Cross-Project Learning | registry + relevance scoring + maturity gate | Alpha never auto-injects |
258
+ | 5 | Tiered Generation | P0/P1/P2/P3 mandatory-to-optional | P0 alone must be a working system |
259
+ | 6 | Quality Gate | weighted criteria + verdict + iteration | Max 3 fix-and-revalidate cycles |
260
+ | 7 | Swarm Agent | parallel agents + merge + cross-validate | Cap at 7 agents per swarm |