@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
package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-skills.md
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# DDD-Specific Skill Templates
|
|
2
|
+
|
|
3
|
+
Enhanced skill templates for DDD-aware Claude Code instruments.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## aggregate-patterns/ Skill
|
|
8
|
+
|
|
9
|
+
**Source:** DDD Tactical (aggregates, entities, value-objects)
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
---
|
|
13
|
+
name: aggregate-patterns
|
|
14
|
+
description: DDD aggregate and entity patterns for {{PROJECT_NAME}}. Use when implementing aggregates, entities, value objects, or domain logic. Keywords: aggregate, entity, value object, invariant, domain, DDD.
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Aggregate Patterns
|
|
18
|
+
|
|
19
|
+
## Project Aggregates
|
|
20
|
+
|
|
21
|
+
{{AGGREGATE_LIST_WITH_DESCRIPTIONS}}
|
|
22
|
+
|
|
23
|
+
## Aggregate Template
|
|
24
|
+
|
|
25
|
+
```{{LANGUAGE}}
|
|
26
|
+
{{AGGREGATE_TEMPLATE_FOR_STACK}}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Invariant Patterns
|
|
30
|
+
|
|
31
|
+
### Validation Pattern
|
|
32
|
+
|
|
33
|
+
```{{LANGUAGE}}
|
|
34
|
+
{{VALIDATION_PATTERN}}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Factory Pattern
|
|
38
|
+
|
|
39
|
+
```{{LANGUAGE}}
|
|
40
|
+
{{FACTORY_PATTERN}}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Entity Patterns
|
|
44
|
+
|
|
45
|
+
### Identity Pattern
|
|
46
|
+
|
|
47
|
+
```{{LANGUAGE}}
|
|
48
|
+
{{ENTITY_ID_PATTERN}}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Value Object Patterns
|
|
52
|
+
|
|
53
|
+
### Immutable VO
|
|
54
|
+
|
|
55
|
+
```{{LANGUAGE}}
|
|
56
|
+
{{VALUE_OBJECT_PATTERN}}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Common Invariants
|
|
60
|
+
|
|
61
|
+
| Aggregate | Invariant | Validation |
|
|
62
|
+
|-----------|-----------|------------|
|
|
63
|
+
{{INVARIANTS_TABLE}}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## event-handlers/ Skill
|
|
69
|
+
|
|
70
|
+
**Source:** DDD Tactical (events)
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
---
|
|
74
|
+
name: event-handlers
|
|
75
|
+
description: Domain event handling patterns for {{PROJECT_NAME}}. Use when implementing event emission, handlers, or event-driven workflows. Keywords: event, handler, emit, subscribe, domain event, CQRS.
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
# Event Handling Patterns
|
|
79
|
+
|
|
80
|
+
## Domain Events
|
|
81
|
+
|
|
82
|
+
| Event | Aggregate | Payload | Handlers |
|
|
83
|
+
|-------|-----------|---------|----------|
|
|
84
|
+
{{EVENTS_TABLE}}
|
|
85
|
+
|
|
86
|
+
## Event Emission Pattern
|
|
87
|
+
|
|
88
|
+
```{{LANGUAGE}}
|
|
89
|
+
{{EVENT_EMISSION_PATTERN}}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Handler Pattern
|
|
93
|
+
|
|
94
|
+
```{{LANGUAGE}}
|
|
95
|
+
{{EVENT_HANDLER_PATTERN}}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Event Subscription
|
|
99
|
+
|
|
100
|
+
```{{LANGUAGE}}
|
|
101
|
+
{{SUBSCRIPTION_PATTERN}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Event Flow
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
{{AGGREGATE}}
|
|
108
|
+
→ emits {{EVENT}}
|
|
109
|
+
→ handled by {{HANDLER}}
|
|
110
|
+
→ updates {{TARGET}}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Anti-Patterns
|
|
114
|
+
|
|
115
|
+
❌ **DON'T:** Modify aggregate state in handler
|
|
116
|
+
❌ **DON'T:** Throw exceptions in handlers (use dead letter)
|
|
117
|
+
❌ **DON'T:** Create circular event chains
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## testing-patterns/ Skill (Enhanced)
|
|
123
|
+
|
|
124
|
+
**Source:** Gherkin tests, Pseudocode, Fitness Functions
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
---
|
|
128
|
+
name: testing-patterns
|
|
129
|
+
description: Testing patterns with Gherkin templates for {{PROJECT_NAME}}. Use when writing tests, creating fixtures, or following TDD workflow. Keywords: test, Gherkin, scenario, fixture, TDD, coverage.
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
# Testing Patterns
|
|
133
|
+
|
|
134
|
+
## Available Features
|
|
135
|
+
|
|
136
|
+
| Feature | Scenarios | Coverage |
|
|
137
|
+
|---------|-----------|----------|
|
|
138
|
+
{{GHERKIN_FEATURES_TABLE}}
|
|
139
|
+
|
|
140
|
+
## Gherkin → Test Mapping
|
|
141
|
+
|
|
142
|
+
### Feature: {{FEATURE_NAME}}
|
|
143
|
+
|
|
144
|
+
```gherkin
|
|
145
|
+
{{EXAMPLE_GHERKIN}}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Maps to:
|
|
149
|
+
|
|
150
|
+
```{{LANGUAGE}}
|
|
151
|
+
{{TEST_IMPLEMENTATION}}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Given → Setup Patterns
|
|
155
|
+
|
|
156
|
+
| Given Step | Setup Code |
|
|
157
|
+
|------------|------------|
|
|
158
|
+
{{GIVEN_MAPPINGS}}
|
|
159
|
+
|
|
160
|
+
## When → Action Patterns
|
|
161
|
+
|
|
162
|
+
| When Step | Action Code |
|
|
163
|
+
|-----------|-------------|
|
|
164
|
+
{{WHEN_MAPPINGS}}
|
|
165
|
+
|
|
166
|
+
## Then → Assert Patterns
|
|
167
|
+
|
|
168
|
+
| Then Step | Assertion Code |
|
|
169
|
+
|-----------|----------------|
|
|
170
|
+
{{THEN_MAPPINGS}}
|
|
171
|
+
|
|
172
|
+
## Fixture Patterns
|
|
173
|
+
|
|
174
|
+
```{{LANGUAGE}}
|
|
175
|
+
{{FIXTURE_PATTERN}}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Coverage Requirements (Fitness)
|
|
179
|
+
|
|
180
|
+
| Metric | Target |
|
|
181
|
+
|--------|--------|
|
|
182
|
+
| Line Coverage | {{LINE_TARGET}}% |
|
|
183
|
+
| Branch Coverage | {{BRANCH_TARGET}}% |
|
|
184
|
+
| Critical Paths | 100% |
|
|
185
|
+
|
|
186
|
+
## Test Data Builders
|
|
187
|
+
|
|
188
|
+
```{{LANGUAGE}}
|
|
189
|
+
{{TEST_BUILDER_PATTERN}}
|
|
190
|
+
```
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## project-context/ Skill (Enhanced)
|
|
196
|
+
|
|
197
|
+
**Source:** .ai-context/*, Research Findings, PRD
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
---
|
|
201
|
+
name: project-context
|
|
202
|
+
description: Full project context and domain knowledge for {{PROJECT_NAME}}. Use when needing business context, domain understanding, or project background. Keywords: context, domain, business, glossary, background.
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
# Project Context
|
|
206
|
+
|
|
207
|
+
## Overview
|
|
208
|
+
|
|
209
|
+
{{FROM_AI_CONTEXT_README}}
|
|
210
|
+
|
|
211
|
+
## Architecture Summary
|
|
212
|
+
|
|
213
|
+
{{FROM_AI_CONTEXT_ARCHITECTURE}}
|
|
214
|
+
|
|
215
|
+
## Key Decisions
|
|
216
|
+
|
|
217
|
+
{{FROM_AI_CONTEXT_KEY_DECISIONS}}
|
|
218
|
+
|
|
219
|
+
## Domain Glossary
|
|
220
|
+
|
|
221
|
+
| Term | Definition | Context |
|
|
222
|
+
|------|------------|---------|
|
|
223
|
+
{{FROM_AI_CONTEXT_GLOSSARY}}
|
|
224
|
+
|
|
225
|
+
## Bounded Contexts
|
|
226
|
+
|
|
227
|
+
{{FROM_AI_CONTEXT_BOUNDED_CONTEXTS}}
|
|
228
|
+
|
|
229
|
+
## Business Rules
|
|
230
|
+
|
|
231
|
+
{{KEY_BUSINESS_RULES}}
|
|
232
|
+
|
|
233
|
+
## User Personas
|
|
234
|
+
|
|
235
|
+
{{FROM_PRD_PERSONAS}}
|
|
236
|
+
|
|
237
|
+
## Success Metrics
|
|
238
|
+
|
|
239
|
+
{{FROM_PRD_METRICS}}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## coding-standards/ Skill (Enhanced)
|
|
245
|
+
|
|
246
|
+
**Source:** DDD Tactical, ADRs, .ai-context/coding-standards.md
|
|
247
|
+
|
|
248
|
+
```markdown
|
|
249
|
+
---
|
|
250
|
+
name: coding-standards
|
|
251
|
+
description: Coding standards with DDD patterns for {{PROJECT_NAME}}. Use when writing code, reviewing style, or applying project conventions. Keywords: style, convention, pattern, standard, {{TECH_KEYWORDS}}.
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
# Coding Standards
|
|
255
|
+
|
|
256
|
+
## From .ai-context
|
|
257
|
+
|
|
258
|
+
{{FROM_AI_CONTEXT_CODING_STANDARDS}}
|
|
259
|
+
|
|
260
|
+
## DDD Naming Conventions
|
|
261
|
+
|
|
262
|
+
| Element | Convention | Example |
|
|
263
|
+
|---------|------------|---------|
|
|
264
|
+
| Aggregate | PascalCase, noun | `OrderAggregate` |
|
|
265
|
+
| Entity | PascalCase, noun | `OrderItem` |
|
|
266
|
+
| Value Object | PascalCase, descriptive | `Money`, `Address` |
|
|
267
|
+
| Domain Event | PascalCase, past tense | `OrderPlaced` |
|
|
268
|
+
| Repository | I{Aggregate}Repository | `IOrderRepository` |
|
|
269
|
+
| Domain Service | {Action}Service | `PricingService` |
|
|
270
|
+
|
|
271
|
+
## File Organization (DDD)
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
src/
|
|
275
|
+
├── domain/
|
|
276
|
+
│ ├── {context}/
|
|
277
|
+
│ │ ├── aggregates/
|
|
278
|
+
│ │ ├── entities/
|
|
279
|
+
│ │ ├── value-objects/
|
|
280
|
+
│ │ ├── events/
|
|
281
|
+
│ │ ├── repositories/
|
|
282
|
+
│ │ └── services/
|
|
283
|
+
│ └── shared/
|
|
284
|
+
├── application/
|
|
285
|
+
│ └── {context}/
|
|
286
|
+
│ ├── commands/
|
|
287
|
+
│ ├── queries/
|
|
288
|
+
│ └── handlers/
|
|
289
|
+
└── infrastructure/
|
|
290
|
+
└── {context}/
|
|
291
|
+
├── persistence/
|
|
292
|
+
└── messaging/
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## ADR-Based Standards
|
|
296
|
+
|
|
297
|
+
{{CODING_STANDARDS_FROM_ADRS}}
|
|
298
|
+
|
|
299
|
+
## Anti-Patterns
|
|
300
|
+
|
|
301
|
+
{{ANTI_PATTERNS_FROM_REJECTED_ADRS}}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Fill Instructions
|
|
307
|
+
|
|
308
|
+
### For aggregate-patterns/
|
|
309
|
+
|
|
310
|
+
1. From `docs/ddd/tactical/aggregates/`:
|
|
311
|
+
- List all aggregates with descriptions
|
|
312
|
+
- Extract invariant rules
|
|
313
|
+
- Identify common patterns
|
|
314
|
+
|
|
315
|
+
2. Generate language-specific templates based on Architecture.md tech stack
|
|
316
|
+
|
|
317
|
+
### For event-handlers/
|
|
318
|
+
|
|
319
|
+
1. From `docs/ddd/tactical/events/`:
|
|
320
|
+
- List all events with aggregates
|
|
321
|
+
- Extract handler patterns
|
|
322
|
+
- Map event flows
|
|
323
|
+
|
|
324
|
+
### For testing-patterns/
|
|
325
|
+
|
|
326
|
+
1. From `docs/tests/*.feature`:
|
|
327
|
+
- Index all features
|
|
328
|
+
- Extract Given/When/Then patterns
|
|
329
|
+
- Map to test implementations
|
|
330
|
+
|
|
331
|
+
2. From `docs/fitness/`:
|
|
332
|
+
- Coverage requirements
|
|
333
|
+
|
|
334
|
+
### For project-context/
|
|
335
|
+
|
|
336
|
+
1. Direct integration from `.ai-context/`:
|
|
337
|
+
- README.md → Overview
|
|
338
|
+
- architecture-summary.md → Architecture
|
|
339
|
+
- key-decisions.md → Key Decisions
|
|
340
|
+
- domain-glossary.md → Glossary
|
|
341
|
+
- bounded-contexts.md → Contexts
|
|
342
|
+
|
|
343
|
+
### For coding-standards/
|
|
344
|
+
|
|
345
|
+
1. From `.ai-context/coding-standards.md`:
|
|
346
|
+
- Direct integration
|
|
347
|
+
|
|
348
|
+
2. From `docs/adr/`:
|
|
349
|
+
- Extract coding-related decisions
|
|
350
|
+
- Extract rejected alternatives as anti-patterns
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Enhanced CLAUDE.md Template
|
|
2
|
+
|
|
3
|
+
Template for generating CLAUDE.md with full .ai-context/ integration.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Template Structure
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# Project: {{PROJECT_NAME}}
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
{{FROM_AI_CONTEXT_README_OR_PRD}}
|
|
15
|
+
|
|
16
|
+
**Domain:** {{DOMAIN_DESCRIPTION}}
|
|
17
|
+
**Key Users:** {{USER_PERSONAS}}
|
|
18
|
+
|
|
19
|
+
## Architecture
|
|
20
|
+
|
|
21
|
+
{{FROM_AI_CONTEXT_ARCHITECTURE_SUMMARY}}
|
|
22
|
+
|
|
23
|
+
### System Context (C4 Level 1)
|
|
24
|
+
|
|
25
|
+
{{C4_CONTEXT_SUMMARY}}
|
|
26
|
+
|
|
27
|
+
### Containers (C4 Level 2)
|
|
28
|
+
|
|
29
|
+
{{C4_CONTAINERS_SUMMARY}}
|
|
30
|
+
|
|
31
|
+
## Key Decisions
|
|
32
|
+
|
|
33
|
+
{{FROM_AI_CONTEXT_KEY_DECISIONS}}
|
|
34
|
+
|
|
35
|
+
| ADR | Decision | Rationale |
|
|
36
|
+
|-----|----------|-----------|
|
|
37
|
+
{{TOP_5_ADRS}}
|
|
38
|
+
|
|
39
|
+
## Domain Model
|
|
40
|
+
|
|
41
|
+
### Bounded Contexts
|
|
42
|
+
|
|
43
|
+
{{FROM_AI_CONTEXT_BOUNDED_CONTEXTS}}
|
|
44
|
+
|
|
45
|
+
| Context | Responsibility | Key Aggregates |
|
|
46
|
+
|---------|---------------|----------------|
|
|
47
|
+
{{CONTEXT_TABLE}}
|
|
48
|
+
|
|
49
|
+
### Ubiquitous Language
|
|
50
|
+
|
|
51
|
+
{{KEY_TERMS_FROM_GLOSSARY}}
|
|
52
|
+
|
|
53
|
+
## Tech Stack
|
|
54
|
+
|
|
55
|
+
{{FROM_ARCHITECTURE_OR_ADRS}}
|
|
56
|
+
|
|
57
|
+
- **Frontend:** {{FRONTEND}}
|
|
58
|
+
- **Backend:** {{BACKEND}}
|
|
59
|
+
- **Database:** {{DATABASE}}
|
|
60
|
+
- **Infrastructure:** {{INFRA}}
|
|
61
|
+
- **Key Libraries:** {{LIBRARIES}}
|
|
62
|
+
|
|
63
|
+
## Project Structure
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
{{DIRECTORY_STRUCTURE}}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Development Commands
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Install dependencies
|
|
73
|
+
{{INSTALL_CMD}}
|
|
74
|
+
|
|
75
|
+
# Start development
|
|
76
|
+
{{DEV_CMD}}
|
|
77
|
+
|
|
78
|
+
# Run tests
|
|
79
|
+
{{TEST_CMD}}
|
|
80
|
+
|
|
81
|
+
# Validate DDD
|
|
82
|
+
{{VALIDATE_CMD}}
|
|
83
|
+
|
|
84
|
+
# Build
|
|
85
|
+
{{BUILD_CMD}}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Coding Standards
|
|
89
|
+
|
|
90
|
+
{{FROM_AI_CONTEXT_CODING_STANDARDS}}
|
|
91
|
+
|
|
92
|
+
### DDD Conventions
|
|
93
|
+
|
|
94
|
+
- Aggregates in `src/domain/{context}/aggregates/`
|
|
95
|
+
- Events in `src/domain/{context}/events/`
|
|
96
|
+
- Use past tense for events (OrderPlaced)
|
|
97
|
+
- Keep aggregates ≤{{MAX_ENTITIES}} entities
|
|
98
|
+
|
|
99
|
+
## Quality Gates
|
|
100
|
+
|
|
101
|
+
{{FROM_AI_CONTEXT_FITNESS_RULES}}
|
|
102
|
+
|
|
103
|
+
| Fitness Function | Target |
|
|
104
|
+
|------------------|--------|
|
|
105
|
+
{{FITNESS_TABLE}}
|
|
106
|
+
|
|
107
|
+
## Critical Rules
|
|
108
|
+
|
|
109
|
+
- **IMPORTANT:** {{CRITICAL_RULE_1}}
|
|
110
|
+
- **NEVER:** {{CRITICAL_RULE_2}}
|
|
111
|
+
- **ALWAYS:** {{CRITICAL_RULE_3}}
|
|
112
|
+
|
|
113
|
+
## Available Agents
|
|
114
|
+
|
|
115
|
+
| Agent | Purpose | Trigger |
|
|
116
|
+
|-------|---------|---------|
|
|
117
|
+
| planner | Feature planning | "plan", "break down" |
|
|
118
|
+
| code-reviewer | Quality review | "review", "check" |
|
|
119
|
+
| architect | System design | "design", "ADR" |
|
|
120
|
+
| domain-expert | Domain knowledge | "domain", "context" |
|
|
121
|
+
| ddd-validator | DDD validation | "validate", "DDD" |
|
|
122
|
+
| tdd-guide | Test-first development | "test", "TDD" |
|
|
123
|
+
|
|
124
|
+
## Available Skills
|
|
125
|
+
|
|
126
|
+
- **project-context/** — Full domain knowledge
|
|
127
|
+
- **coding-standards/** — Code conventions with DDD
|
|
128
|
+
- **testing-patterns/** — Gherkin-based testing
|
|
129
|
+
- **aggregate-patterns/** — DDD tactical patterns
|
|
130
|
+
- **event-handlers/** — Domain event patterns
|
|
131
|
+
|
|
132
|
+
## Quick Commands
|
|
133
|
+
|
|
134
|
+
| Command | Purpose |
|
|
135
|
+
|---------|---------|
|
|
136
|
+
| `/plan [feature]` | Plan implementation |
|
|
137
|
+
| `/test [scope]` | Run/generate tests |
|
|
138
|
+
| `/validate-ddd` | Validate DDD compliance |
|
|
139
|
+
| `/deploy [env]` | Deploy to environment |
|
|
140
|
+
| `/context [name]` | Navigate bounded contexts |
|
|
141
|
+
|
|
142
|
+
## External Integrations
|
|
143
|
+
|
|
144
|
+
{{IF_MCP_CONFIGURED}}
|
|
145
|
+
| Service | MCP Server | Config |
|
|
146
|
+
|---------|------------|--------|
|
|
147
|
+
{{MCP_TABLE}}
|
|
148
|
+
{{/IF_MCP_CONFIGURED}}
|
|
149
|
+
|
|
150
|
+
## Testing Strategy
|
|
151
|
+
|
|
152
|
+
{{FROM_GHERKIN_SUMMARY}}
|
|
153
|
+
|
|
154
|
+
**Coverage Targets:**
|
|
155
|
+
- Lines: {{LINE_COVERAGE}}%
|
|
156
|
+
- Branches: {{BRANCH_COVERAGE}}%
|
|
157
|
+
- Critical Paths: 100%
|
|
158
|
+
|
|
159
|
+
## Deployment
|
|
160
|
+
|
|
161
|
+
{{FROM_COMPLETION_SUMMARY}}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Fill Instructions
|
|
167
|
+
|
|
168
|
+
### Priority 1: .ai-context/ Integration
|
|
169
|
+
|
|
170
|
+
If `.ai-context/` exists, use as primary source:
|
|
171
|
+
|
|
172
|
+
| .ai-context File | Target Section |
|
|
173
|
+
|------------------|----------------|
|
|
174
|
+
| README.md | Overview |
|
|
175
|
+
| architecture-summary.md | Architecture |
|
|
176
|
+
| key-decisions.md | Key Decisions |
|
|
177
|
+
| bounded-contexts.md | Domain Model |
|
|
178
|
+
| domain-glossary.md | Ubiquitous Language |
|
|
179
|
+
| coding-standards.md | Coding Standards |
|
|
180
|
+
| fitness-rules.md | Quality Gates |
|
|
181
|
+
| pseudocode-index.md | Reference for agents |
|
|
182
|
+
|
|
183
|
+
### Priority 2: docs/ Fallback
|
|
184
|
+
|
|
185
|
+
If specific .ai-context file missing, extract from:
|
|
186
|
+
|
|
187
|
+
| Section | Primary Source | Secondary Source |
|
|
188
|
+
|---------|----------------|------------------|
|
|
189
|
+
| Overview | docs/prd/PRD.md | Research_Findings.md |
|
|
190
|
+
| Architecture | docs/c4/*.mermaid | Architecture.md |
|
|
191
|
+
| Key Decisions | docs/adr/*.md | Solution_Strategy.md |
|
|
192
|
+
| Domain Model | docs/ddd/strategic/ | Specification.md |
|
|
193
|
+
| Tech Stack | docs/adr/*-technology.md | Architecture.md |
|
|
194
|
+
| Testing | docs/tests/*.feature | Refinement.md |
|
|
195
|
+
| Deployment | docs/completion/ | Completion.md |
|
|
196
|
+
|
|
197
|
+
### Priority 3: SPARC Fallback
|
|
198
|
+
|
|
199
|
+
If idea2prd-manual docs not present, use SPARC mapping from original skill.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Size Guidelines
|
|
204
|
+
|
|
205
|
+
| Section | Target Lines | Max Lines |
|
|
206
|
+
|---------|--------------|-----------|
|
|
207
|
+
| Overview | 5-10 | 15 |
|
|
208
|
+
| Architecture | 15-25 | 40 |
|
|
209
|
+
| Key Decisions | 10-15 | 25 |
|
|
210
|
+
| Domain Model | 15-25 | 40 |
|
|
211
|
+
| Tech Stack | 10-15 | 20 |
|
|
212
|
+
| Project Structure | 15-20 | 30 |
|
|
213
|
+
| Commands | 10-15 | 20 |
|
|
214
|
+
| Coding Standards | 15-20 | 30 |
|
|
215
|
+
| Quality Gates | 5-10 | 15 |
|
|
216
|
+
| Agents/Skills/Commands | 15-20 | 30 |
|
|
217
|
+
| **Total** | ~150-200 | ~300 |
|
|
218
|
+
|
|
219
|
+
**Target:** ~4k tokens (with .ai-context)
|
|
220
|
+
**Max:** 6k tokens
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Anti-Patterns
|
|
225
|
+
|
|
226
|
+
❌ **DON'T:** Duplicate .ai-context content verbatim (reference instead)
|
|
227
|
+
❌ **DON'T:** Include all ADRs (select top 5-7)
|
|
228
|
+
❌ **DON'T:** List all glossary terms (select key 10-15)
|
|
229
|
+
❌ **DON'T:** Include full C4 diagrams (summarize)
|
|
230
|
+
❌ **DON'T:** Copy entire fitness functions (reference skill)
|
|
231
|
+
|
|
232
|
+
✅ **DO:** Summarize and reference
|
|
233
|
+
✅ **DO:** Link to skills for details
|
|
234
|
+
✅ **DO:** Keep actionable commands prominent
|
|
235
|
+
✅ **DO:** Focus on daily-use information
|