@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,370 @@
|
|
|
1
|
+
# Extended Mapping Matrix
|
|
2
|
+
|
|
3
|
+
Complete mapping from idea2prd-manual documents to Claude Code instruments.
|
|
4
|
+
|
|
5
|
+
## Document Detection
|
|
6
|
+
|
|
7
|
+
### idea2prd-manual Output Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
project-root/
|
|
11
|
+
├── docs/
|
|
12
|
+
│ ├── prd/PRD.md
|
|
13
|
+
│ ├── ddd/
|
|
14
|
+
│ │ ├── strategic/
|
|
15
|
+
│ │ │ ├── bounded-contexts.md
|
|
16
|
+
│ │ │ └── context-map.md
|
|
17
|
+
│ │ └── tactical/
|
|
18
|
+
│ │ ├── aggregates/
|
|
19
|
+
│ │ ├── entities/
|
|
20
|
+
│ │ ├── value-objects/
|
|
21
|
+
│ │ ├── events/
|
|
22
|
+
│ │ └── repositories/
|
|
23
|
+
│ ├── adr/
|
|
24
|
+
│ │ ├── ADR-001-*.md
|
|
25
|
+
│ │ ├── ADR-002-*.md
|
|
26
|
+
│ │ └── ... (10+)
|
|
27
|
+
│ ├── c4/
|
|
28
|
+
│ │ ├── context.mermaid
|
|
29
|
+
│ │ ├── container.mermaid
|
|
30
|
+
│ │ └── component.mermaid
|
|
31
|
+
│ ├── pseudocode/
|
|
32
|
+
│ │ ├── {Aggregate}.pseudo
|
|
33
|
+
│ │ └── {Service}.pseudo
|
|
34
|
+
│ ├── tests/
|
|
35
|
+
│ │ └── {feature}.feature (Gherkin)
|
|
36
|
+
│ ├── fitness/
|
|
37
|
+
│ │ └── fitness-functions.md
|
|
38
|
+
│ ├── completion/
|
|
39
|
+
│ │ └── COMPLETION_CHECKLIST.md
|
|
40
|
+
│ └── INDEX.md
|
|
41
|
+
├── .ai-context/
|
|
42
|
+
│ ├── README.md
|
|
43
|
+
│ ├── architecture-summary.md
|
|
44
|
+
│ ├── key-decisions.md
|
|
45
|
+
│ ├── domain-glossary.md
|
|
46
|
+
│ ├── bounded-contexts.md
|
|
47
|
+
│ ├── coding-standards.md
|
|
48
|
+
│ ├── fitness-rules.md
|
|
49
|
+
│ └── pseudocode-index.md
|
|
50
|
+
└── README.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Complete Document → Instrument Mapping
|
|
56
|
+
|
|
57
|
+
### PRD Documents
|
|
58
|
+
|
|
59
|
+
| Document | Section | Primary Output | Secondary Output |
|
|
60
|
+
|----------|---------|----------------|------------------|
|
|
61
|
+
| PRD.md | Overview | CLAUDE.md overview | - |
|
|
62
|
+
| PRD.md | Functional Requirements | /plan command | feature-x/ skills |
|
|
63
|
+
| PRD.md | Non-Functional Requirements | security.md, performance.md | hooks |
|
|
64
|
+
| PRD.md | User Stories | commands | testing-patterns/ skill |
|
|
65
|
+
| PRD.md | User Journeys | workflow skills | - |
|
|
66
|
+
| PRD.md | Constraints | rules | CLAUDE.md Critical Rules |
|
|
67
|
+
|
|
68
|
+
### DDD Strategic Documents
|
|
69
|
+
|
|
70
|
+
| Document | Section | Primary Output | Secondary Output |
|
|
71
|
+
|----------|---------|----------------|------------------|
|
|
72
|
+
| bounded-contexts.md | Context definitions | domain-expert.md agent | CLAUDE.md Domain Model |
|
|
73
|
+
| bounded-contexts.md | Context responsibilities | Agent scope definitions | Skill boundaries |
|
|
74
|
+
| bounded-contexts.md | Ubiquitous Language | domain-glossary rule | project-context/ skill |
|
|
75
|
+
| context-map.md | Relationships | Integration hooks | architect.md knowledge |
|
|
76
|
+
| context-map.md | Shared Kernel | Shared skills | coding-standards/ |
|
|
77
|
+
| context-map.md | Anti-Corruption Layer | Validation hooks | security.md |
|
|
78
|
+
|
|
79
|
+
### DDD Tactical Documents
|
|
80
|
+
|
|
81
|
+
| Document | Section | Primary Output | Secondary Output |
|
|
82
|
+
|----------|---------|----------------|------------------|
|
|
83
|
+
| aggregates/*.md | Aggregate Root | ddd-validator.md agent | aggregate-patterns/ skill |
|
|
84
|
+
| aggregates/*.md | Invariants | PreToolUse validation hooks | domain-model.md rule |
|
|
85
|
+
| aggregates/*.md | Business Rules | coding-style.md rules | validation hooks |
|
|
86
|
+
| entities/*.md | Entity definitions | Type checking hooks | coding-standards/ skill |
|
|
87
|
+
| entities/*.md | Identity rules | validation patterns | - |
|
|
88
|
+
| value-objects/*.md | VO definitions | Immutability rules | coding-standards/ skill |
|
|
89
|
+
| events/*.md | Domain Events | event-handlers/ skill | PostToolUse hooks |
|
|
90
|
+
| events/*.md | Event handlers | Event-driven hooks | workflow skills |
|
|
91
|
+
| repositories/*.md | Repository patterns | MCP integration hints | api-patterns/ skill |
|
|
92
|
+
|
|
93
|
+
### ADR Documents
|
|
94
|
+
|
|
95
|
+
| Document | Decision Type | Primary Output | Secondary Output |
|
|
96
|
+
|----------|---------------|----------------|------------------|
|
|
97
|
+
| ADR-*-technology.md | Tech stack | CLAUDE.md Tech Stack | coding-standards/ skill |
|
|
98
|
+
| ADR-*-architecture.md | Architecture | architect.md agent | CLAUDE.md diagrams |
|
|
99
|
+
| ADR-*-pattern.md | Design pattern | coding-style.md | pattern skills |
|
|
100
|
+
| ADR-*-security.md | Security | security.md rule | security hooks |
|
|
101
|
+
| ADR-*-integration.md | External system | .mcp.json | integration skills |
|
|
102
|
+
| ADR-*-data.md | Data decisions | database rules | validation hooks |
|
|
103
|
+
| ADR-*-testing.md | Test strategy | testing.md rule | testing-patterns/ skill |
|
|
104
|
+
| Any ADR | Rejected alternatives | Anti-pattern rules | code-reviewer knowledge |
|
|
105
|
+
|
|
106
|
+
### C4 Diagrams
|
|
107
|
+
|
|
108
|
+
| Document | Level | Primary Output | Secondary Output |
|
|
109
|
+
|----------|-------|----------------|------------------|
|
|
110
|
+
| context.mermaid | System Context | CLAUDE.md overview | architect.md context |
|
|
111
|
+
| container.mermaid | Container | CLAUDE.md structure | Agent boundaries |
|
|
112
|
+
| component.mermaid | Component | Skill boundaries | coding-standards/ |
|
|
113
|
+
|
|
114
|
+
### Pseudocode Documents
|
|
115
|
+
|
|
116
|
+
| Document | Element | Primary Output | Secondary Output |
|
|
117
|
+
|----------|---------|----------------|------------------|
|
|
118
|
+
| {Aggregate}.pseudo | FUNCTION | planner.md templates | coding-standards/ |
|
|
119
|
+
| {Aggregate}.pseudo | VALIDATE | PreToolUse hooks | validation rules |
|
|
120
|
+
| {Aggregate}.pseudo | FOR/IF logic | Algorithm patterns | tdd-guide knowledge |
|
|
121
|
+
| {Aggregate}.pseudo | EMIT events | event-handlers/ skill | PostToolUse hooks |
|
|
122
|
+
| {Aggregate}.pseudo | Error handling | error patterns | code-reviewer knowledge |
|
|
123
|
+
| {Service}.pseudo | Service methods | /command templates | workflow skills |
|
|
124
|
+
|
|
125
|
+
### Gherkin Test Documents
|
|
126
|
+
|
|
127
|
+
| Document | Element | Primary Output | Secondary Output |
|
|
128
|
+
|----------|---------|----------------|------------------|
|
|
129
|
+
| *.feature | Feature | /test command scope | testing-patterns/ section |
|
|
130
|
+
| *.feature | Scenario | Test templates | validation hooks |
|
|
131
|
+
| *.feature | Given | Setup patterns | fixture skills |
|
|
132
|
+
| *.feature | When | Action templates | command triggers |
|
|
133
|
+
| *.feature | Then | Assertion rules | PostToolUse hooks |
|
|
134
|
+
| *.feature | Background | Shared fixtures | testing-patterns/ skill |
|
|
135
|
+
| *.feature | Scenario Outline | Parameterized tests | data-driven hooks |
|
|
136
|
+
| *.feature | Examples | Test data | fixture patterns |
|
|
137
|
+
|
|
138
|
+
### Fitness Functions
|
|
139
|
+
|
|
140
|
+
| Function Type | Primary Output | Secondary Output |
|
|
141
|
+
|---------------|----------------|------------------|
|
|
142
|
+
| BC Independence | /validate-ddd command | architecture rule |
|
|
143
|
+
| Aggregate Size | PreToolUse hook | coding rule |
|
|
144
|
+
| Method Length | PostToolUse hook | coding-style rule |
|
|
145
|
+
| Response Time | Performance hook | monitoring hook |
|
|
146
|
+
| Test Coverage | PostToolUse hook | testing rule |
|
|
147
|
+
| Security Scan | PreToolUse hook | security rule |
|
|
148
|
+
| Dependency Check | PreToolUse hook | security rule |
|
|
149
|
+
| Code Complexity | PostToolUse hook | coding rule |
|
|
150
|
+
|
|
151
|
+
### Completion Checklist
|
|
152
|
+
|
|
153
|
+
| Section | Primary Output | Secondary Output |
|
|
154
|
+
|---------|----------------|------------------|
|
|
155
|
+
| Dev Environment | CLAUDE.md commands | setup skill |
|
|
156
|
+
| CI/CD Pipeline | hooks configuration | /deploy command |
|
|
157
|
+
| Docker/K8s | deployment hooks | infra skill |
|
|
158
|
+
| Monitoring | alert hooks | observability skill |
|
|
159
|
+
| Security Checklist | security.md | security hooks |
|
|
160
|
+
| Pre-launch | Stop verification hook | checklist command |
|
|
161
|
+
|
|
162
|
+
### .ai-context Files
|
|
163
|
+
|
|
164
|
+
| File | Integration Target | Priority |
|
|
165
|
+
|------|-------------------|----------|
|
|
166
|
+
| README.md | CLAUDE.md Overview | P0 |
|
|
167
|
+
| architecture-summary.md | CLAUDE.md Architecture | P0 |
|
|
168
|
+
| key-decisions.md | CLAUDE.md Decisions | P0 |
|
|
169
|
+
| domain-glossary.md | project-context/ skill | P1 |
|
|
170
|
+
| bounded-contexts.md | domain-model.md rule | P0 |
|
|
171
|
+
| coding-standards.md | coding-style.md rule | P0 |
|
|
172
|
+
| fitness-rules.md | fitness-functions.md rule | P1 |
|
|
173
|
+
| pseudocode-index.md | planner.md agent | P1 |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Extraction Patterns
|
|
178
|
+
|
|
179
|
+
### From DDD Strategic
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
EXTRACT bounded-contexts.md:
|
|
183
|
+
- Context names → Agent naming
|
|
184
|
+
- Context responsibilities → Agent description triggers
|
|
185
|
+
- Ubiquitous language → domain-glossary rule + skill
|
|
186
|
+
- Context boundaries → Skill scope definitions
|
|
187
|
+
|
|
188
|
+
EXTRACT context-map.md:
|
|
189
|
+
- Upstream/Downstream → Integration priority
|
|
190
|
+
- Shared Kernel → Shared coding-standards
|
|
191
|
+
- Anti-Corruption Layer → Validation hooks
|
|
192
|
+
- Published Language → API skills
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### From DDD Tactical
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
EXTRACT aggregates/*.md:
|
|
199
|
+
- Aggregate name → {Aggregate}Validator in ddd-validator agent
|
|
200
|
+
- Invariants → PreToolUse validation hooks
|
|
201
|
+
- Commands → /command templates
|
|
202
|
+
- Factory methods → Creation patterns in skill
|
|
203
|
+
|
|
204
|
+
EXTRACT events/*.md:
|
|
205
|
+
- Event name → Hook trigger
|
|
206
|
+
- Event data → Validation schema
|
|
207
|
+
- Handlers → event-handlers/ skill sections
|
|
208
|
+
- Subscribers → PostToolUse hook chains
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### From ADRs
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
FOR EACH adr/*.md:
|
|
215
|
+
EXTRACT:
|
|
216
|
+
- Title → Rule/skill name candidate
|
|
217
|
+
- Status → (if Accepted) include, (if Deprecated) exclude
|
|
218
|
+
- Context → Background for CLAUDE.md
|
|
219
|
+
- Decision → Rule content
|
|
220
|
+
- Consequences → Trade-off documentation
|
|
221
|
+
- Rejected alternatives → Anti-pattern rules
|
|
222
|
+
|
|
223
|
+
CLASSIFY by keywords:
|
|
224
|
+
- "security", "auth", "encryption" → security.md
|
|
225
|
+
- "performance", "scale", "cache" → performance rules
|
|
226
|
+
- "test", "coverage", "TDD" → testing.md
|
|
227
|
+
- "API", "REST", "GraphQL" → api-patterns/ skill
|
|
228
|
+
- "database", "storage", "persistence" → data rules
|
|
229
|
+
- technology names → coding-standards/
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### From Pseudocode
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
FOR EACH pseudocode/*.pseudo:
|
|
236
|
+
PARSE structure:
|
|
237
|
+
- FUNCTION signature → Method template for planner
|
|
238
|
+
- VALIDATE statements → Hook conditions
|
|
239
|
+
- FOR/WHILE loops → Algorithm pattern
|
|
240
|
+
- IF conditions → Branching logic
|
|
241
|
+
- EMIT statements → Event hooks
|
|
242
|
+
- RETURN type → Validation schema
|
|
243
|
+
|
|
244
|
+
GENERATE:
|
|
245
|
+
- Algorithm templates for planner.md
|
|
246
|
+
- Validation hooks for complex functions
|
|
247
|
+
- Test case hints for tdd-guide.md
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### From Gherkin
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
FOR EACH tests/*.feature:
|
|
254
|
+
PARSE:
|
|
255
|
+
- Feature name → /test command scope
|
|
256
|
+
- @tags → Test categorization
|
|
257
|
+
- Scenario name → Test template
|
|
258
|
+
- Given steps → Setup skill
|
|
259
|
+
- When steps → Action command
|
|
260
|
+
- Then steps → Assertion hook
|
|
261
|
+
- Examples table → Data patterns
|
|
262
|
+
|
|
263
|
+
GENERATE:
|
|
264
|
+
- /test command with feature awareness
|
|
265
|
+
- testing-patterns/ skill sections
|
|
266
|
+
- Validation hooks from Then steps
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### From Fitness Functions
|
|
270
|
+
|
|
271
|
+
```
|
|
272
|
+
FOR EACH fitness function:
|
|
273
|
+
CLASSIFY:
|
|
274
|
+
- Architecture fitness → ddd-validator agent
|
|
275
|
+
- Code quality fitness → PostToolUse hook
|
|
276
|
+
- Security fitness → PreToolUse hook
|
|
277
|
+
- Performance fitness → monitoring hook
|
|
278
|
+
|
|
279
|
+
GENERATE:
|
|
280
|
+
- Hook with threshold check
|
|
281
|
+
- Rule with rationale
|
|
282
|
+
- /validate-ddd command section
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Priority Scoring (Enhanced)
|
|
288
|
+
|
|
289
|
+
### Base Scores by Document Type
|
|
290
|
+
|
|
291
|
+
| Document Type | Base Score | Max Boost |
|
|
292
|
+
|---------------|------------|-----------|
|
|
293
|
+
| .ai-context/* | +15 | +5 |
|
|
294
|
+
| PRD.md | +10 | +5 |
|
|
295
|
+
| DDD Strategic | +12 | +8 |
|
|
296
|
+
| DDD Tactical | +10 | +10 |
|
|
297
|
+
| ADR (>10) | +10 | +5 |
|
|
298
|
+
| Pseudocode | +10 | +5 |
|
|
299
|
+
| Gherkin | +10 | +5 |
|
|
300
|
+
| Fitness | +8 | +5 |
|
|
301
|
+
| C4 | +5 | +3 |
|
|
302
|
+
| Completion | +5 | +3 |
|
|
303
|
+
|
|
304
|
+
### Boost Conditions
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
# DDD Boosts
|
|
308
|
+
IF aggregates/ has >5 files: +5 to ddd-validator
|
|
309
|
+
IF events/ has >3 files: +5 to event-handlers skill
|
|
310
|
+
IF bounded-contexts >3: +5 to domain-expert agent
|
|
311
|
+
|
|
312
|
+
# ADR Boosts
|
|
313
|
+
IF adr/ has >15 files: +5 to architect agent
|
|
314
|
+
IF adr/ has security ADR: +5 to security rules
|
|
315
|
+
IF adr/ has testing ADR: +3 to testing rules
|
|
316
|
+
|
|
317
|
+
# Pseudocode Boosts
|
|
318
|
+
IF pseudocode/ has >5 files: +5 to planner agent
|
|
319
|
+
IF pseudocode contains STATE MACHINE: +5 to workflow skill
|
|
320
|
+
|
|
321
|
+
# Gherkin Boosts
|
|
322
|
+
IF tests/ has >10 scenarios: +5 to testing-patterns
|
|
323
|
+
IF tests/ has @security tag: +3 to security hooks
|
|
324
|
+
|
|
325
|
+
# Fitness Boosts
|
|
326
|
+
IF fitness has >5 functions: +5 to validation hooks
|
|
327
|
+
IF fitness has architecture rules: +5 to ddd-validator
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Context Budget Allocation (Enhanced)
|
|
333
|
+
|
|
334
|
+
| Category | Documents | Budget | Strategy |
|
|
335
|
+
|----------|-----------|--------|----------|
|
|
336
|
+
| CLAUDE.md Core | .ai-context, PRD, C4 | 4-6k | Direct integration |
|
|
337
|
+
| Domain Knowledge | DDD Strategic | 1.5-2k | skill references |
|
|
338
|
+
| Code Patterns | DDD Tactical, Pseudocode | 1.5-2k | skill + hook |
|
|
339
|
+
| Quality | Fitness, Gherkin | 1-1.5k | rules + hooks |
|
|
340
|
+
| Architecture | ADR, C4 | 1-1.5k | agent + CLAUDE.md |
|
|
341
|
+
| Deployment | Completion | 0.5-1k | command + hooks |
|
|
342
|
+
| **Total** | All | 10-14k | <7% of 200k |
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## MCP Matching (Enhanced)
|
|
347
|
+
|
|
348
|
+
### From ADR Integration Decisions
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
SCAN adr/*.md for:
|
|
352
|
+
- "GitHub" → @modelcontextprotocol/server-github
|
|
353
|
+
- "PostgreSQL", "Postgres" → @modelcontextprotocol/server-postgres
|
|
354
|
+
- "MongoDB" → @modelcontextprotocol/server-mongodb
|
|
355
|
+
- "Redis" → @modelcontextprotocol/server-redis
|
|
356
|
+
- "Supabase" → @supabase/mcp-server
|
|
357
|
+
- "AWS", "S3", "Lambda" → @aws/mcp-server
|
|
358
|
+
- "Stripe" → @stripe/mcp-server
|
|
359
|
+
- "Slack" → @modelcontextprotocol/server-slack
|
|
360
|
+
- "Notion" → @modelcontextprotocol/server-notion
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### From DDD Repository Patterns
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
SCAN repositories/*.md for:
|
|
367
|
+
- Database type → Matching MCP server
|
|
368
|
+
- External API mentions → API-specific MCP
|
|
369
|
+
- Message queue → Queue MCP if available
|
|
370
|
+
```
|