@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.
Files changed (92) hide show
  1. package/README.md +314 -0
  2. package/bin/cli.js +4 -0
  3. package/package.json +62 -0
  4. package/src/cli.js +160 -0
  5. package/src/commands/doctor.js +151 -0
  6. package/src/commands/init.js +155 -0
  7. package/src/commands/list.js +133 -0
  8. package/src/commands/remove.js +111 -0
  9. package/src/commands/update.js +102 -0
  10. package/src/utils.js +280 -0
  11. package/templates/.claude/agents/doc-validator.md +92 -0
  12. package/templates/.claude/agents/harvest-coordinator.md +91 -0
  13. package/templates/.claude/agents/product-discoverer.md +57 -0
  14. package/templates/.claude/agents/replicate-coordinator.md +98 -0
  15. package/templates/.claude/commands/harvest.md +106 -0
  16. package/templates/.claude/commands/replicate.md +389 -0
  17. package/templates/.claude/rules/replicate-pipeline.md +92 -0
  18. package/templates/.claude/skills/brutal-honesty-review/README.md +218 -0
  19. package/templates/.claude/skills/brutal-honesty-review/SKILL.md +225 -0
  20. package/templates/.claude/skills/brutal-honesty-review/resources/assessment-rubrics.md +295 -0
  21. package/templates/.claude/skills/brutal-honesty-review/resources/review-template.md +102 -0
  22. package/templates/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +179 -0
  23. package/templates/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +223 -0
  24. package/templates/.claude/skills/cc-toolkit-generator-enhanced/SKILL.md +374 -0
  25. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/claude-md-strategy.md +178 -0
  26. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/enhanced-recommendations.md +416 -0
  27. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/extended-mapping.md +370 -0
  28. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/automation-commands.md +733 -0
  29. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-agents.md +416 -0
  30. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-hooks-commands.md +524 -0
  31. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/ddd-skills.md +350 -0
  32. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/enhanced-claude-md.md +235 -0
  33. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-lifecycle-ent.md +400 -0
  34. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-lifecycle.md +325 -0
  35. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/feature-suggestions.md +423 -0
  36. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/insights-system.md +349 -0
  37. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/mcp.md +274 -0
  38. package/templates/.claude/skills/cc-toolkit-generator-enhanced/references/templates/start-command.md +283 -0
  39. package/templates/.claude/skills/explore/SKILL.md +215 -0
  40. package/templates/.claude/skills/explore/references/questioning-techniques.md +151 -0
  41. package/templates/.claude/skills/explore/references/task-brief-templates.md +355 -0
  42. package/templates/.claude/skills/goap-research-ed25519/SKILL.md +415 -0
  43. package/templates/.claude/skills/goap-research-ed25519/references/ed25519-verification.md +658 -0
  44. package/templates/.claude/skills/goap-research-ed25519/references/research-actions.md +544 -0
  45. package/templates/.claude/skills/goap-research-ed25519/references/source-evaluation.md +560 -0
  46. package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +662 -0
  47. package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +720 -0
  48. package/templates/.claude/skills/knowledge-extractor/SKILL.md +412 -0
  49. package/templates/.claude/skills/knowledge-extractor/examples/rate-limiting-extraction.md +259 -0
  50. package/templates/.claude/skills/knowledge-extractor/modules/01-agent-review.md +192 -0
  51. package/templates/.claude/skills/knowledge-extractor/modules/02-classify.md +122 -0
  52. package/templates/.claude/skills/knowledge-extractor/modules/03-decontextualize.md +156 -0
  53. package/templates/.claude/skills/knowledge-extractor/modules/04-integrate.md +178 -0
  54. package/templates/.claude/skills/knowledge-extractor/references/artifact-categories.md +342 -0
  55. package/templates/.claude/skills/knowledge-extractor/references/decontextualization-guide.md +247 -0
  56. package/templates/.claude/skills/knowledge-extractor/references/maturity-model.md +153 -0
  57. package/templates/.claude/skills/knowledge-extractor/templates/artifact-card.md +60 -0
  58. package/templates/.claude/skills/knowledge-extractor/templates/harvest-report.md +70 -0
  59. package/templates/.claude/skills/knowledge-extractor/templates/toolkit-harvest.md +38 -0
  60. package/templates/.claude/skills/pipeline-forge/SKILL.md +523 -0
  61. package/templates/.claude/skills/pipeline-forge/examples/replicate-analysis.md +291 -0
  62. package/templates/.claude/skills/pipeline-forge/references/patterns-catalog.md +408 -0
  63. package/templates/.claude/skills/pipeline-forge/references/quality-gates.md +268 -0
  64. package/templates/.claude/skills/pipeline-forge/references/skill-anatomy.md +292 -0
  65. package/templates/.claude/skills/pipeline-forge/templates/agent-template.md +60 -0
  66. package/templates/.claude/skills/pipeline-forge/templates/command-template.md +80 -0
  67. package/templates/.claude/skills/pipeline-forge/templates/pipeline-template.md +137 -0
  68. package/templates/.claude/skills/pipeline-forge/templates/skill-template.md +132 -0
  69. package/templates/.claude/skills/problem-solver-enhanced/SKILL.md +562 -0
  70. package/templates/.claude/skills/requirements-validator/SKILL.md +121 -0
  71. package/templates/.claude/skills/requirements-validator/assets/templates/bdd-feature-template.feature +69 -0
  72. package/templates/.claude/skills/requirements-validator/references/bdd-patterns.md +184 -0
  73. package/templates/.claude/skills/requirements-validator/references/invest-criteria.md +121 -0
  74. package/templates/.claude/skills/requirements-validator/references/scoring-system.md +134 -0
  75. package/templates/.claude/skills/requirements-validator/references/smart-criteria.md +130 -0
  76. package/templates/.claude/skills/reverse-engineering-unicorn/SKILL.md +194 -0
  77. package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-cjm-example.md +100 -0
  78. package/templates/.claude/skills/reverse-engineering-unicorn/examples/noom-module1-example.md +88 -0
  79. package/templates/.claude/skills/reverse-engineering-unicorn/modules/01-intelligence.md +328 -0
  80. package/templates/.claude/skills/reverse-engineering-unicorn/modules/02-product-customers.md +221 -0
  81. package/templates/.claude/skills/reverse-engineering-unicorn/modules/025-cjm-prototype.md +206 -0
  82. package/templates/.claude/skills/reverse-engineering-unicorn/modules/03-market-competition.md +402 -0
  83. package/templates/.claude/skills/reverse-engineering-unicorn/modules/04-business-finance.md +287 -0
  84. package/templates/.claude/skills/reverse-engineering-unicorn/modules/05-growth-engine.md +290 -0
  85. package/templates/.claude/skills/reverse-engineering-unicorn/modules/06-playbook-synthesis.md +286 -0
  86. package/templates/.claude/skills/reverse-engineering-unicorn/references/blue-ocean-canvas.md +39 -0
  87. package/templates/.claude/skills/reverse-engineering-unicorn/references/industry-benchmarks.md +67 -0
  88. package/templates/.claude/skills/reverse-engineering-unicorn/references/jtbd-canvas.md +48 -0
  89. package/templates/.claude/skills/sparc-prd-mini/SKILL.md +955 -0
  90. package/templates/.claude/skills/sparc-prd-mini/references/sparc-methodology.md +360 -0
  91. package/templates/.claude/skills/sparc-prd-mini/templates/CLAUDE.md +91 -0
  92. package/templates/.claude/skills/sparc-prd-mini/templates/prd.md +336 -0
@@ -0,0 +1,955 @@
1
+ ---
2
+ name: sparc-prd-mini
3
+ description: >
4
+ Модульный генератор PRD и SPARC документации (v2). Использует внешние скиллы через view()
5
+ вместо встроенных копий: explore, goap-research-ed25519, problem-solver-enhanced. Поддерживает
6
+ AUTO и MANUAL режимы. Принимает pre-filled context от родительских скиллов.
7
+ Создаёт 11 production-ready файлов для AI-assisted разработки (Vibe Coding).
8
+ Триггеры: "sparc-prd-mini", "PRD mini", "документация auto/manual", "vibe coding docs".
9
+ ---
10
+
11
+ # SPARC PRD Mini v2: Modular Documentation Generator (AUTO/MANUAL)
12
+
13
+ Скилл для генерации полного пакета продуктовой документации по методологии SPARC. Модульная архитектура — использует внешние скиллы через `view()` вместо встроенных копий.
14
+
15
+ ## Architecture
16
+
17
+ ```
18
+ sparc-prd-mini/
19
+ ├── SKILL.md # Оркестратор (этот файл)
20
+ ├── references/
21
+ │ └── sparc-methodology.md # SPARC framework (своё, уникальное)
22
+ └── templates/
23
+ ├── prd.md # PRD template
24
+ └── CLAUDE.md # AI integration guide template
25
+ ```
26
+
27
+ ## External Dependencies (view at runtime)
28
+
29
+ | Phase | Skill | Path | What it provides |
30
+ |-------|-------|------|------------------|
31
+ | Phase 0: Explore | `explore` | `/mnt/skills/user/explore/SKILL.md` | Socratic questioning → Product Brief |
32
+ | Phase 1: Research | `goap-research-ed25519` | `/mnt/skills/user/goap-research-ed25519/SKILL.md` | GOAP A* + OODA → Research Findings |
33
+ | Phase 2: Solve | `problem-solver-enhanced` | `/mnt/skills/user/problem-solver-enhanced/SKILL.md` | 9 modules + TRIZ → Solution Strategy |
34
+
35
+ **Принцип:** Каждый внешний скилл — Single Source of Truth. Обновление оригинала автоматически подхватывается здесь.
36
+
37
+ **Fallbacks (если скилл недоступен):**
38
+ - `explore` недоступен → встроенные Socratic questions (3-5 вопросов)
39
+ - `goap-research-ed25519` недоступен → прямой web_search по ключевым темам
40
+ - `problem-solver-enhanced` недоступен → First Principles + SCQA only
41
+
42
+ ## When to Use
43
+
44
+ **Trigger Patterns:**
45
+ - "sparc-prd-mini" / "PRD mini"
46
+ - "создай PRD" / "подготовь документацию"
47
+ - "vibe coding документация"
48
+ - "SPARC документация"
49
+ - "PRD auto" / "PRD manual" / "PRD с checkpoint"
50
+ - "документация для разработки"
51
+
52
+ ## Operating Modes
53
+
54
+ ### AUTO Mode (Default)
55
+ ```
56
+ Триггеры: "auto", "автоматически", "без остановок"
57
+ ```
58
+ Все 8 фаз выполняются последовательно без промежуточных подтверждений.
59
+
60
+ ### MANUAL Mode
61
+ ```
62
+ Триггеры: "manual", "пошагово", "с checkpoint", "с проверками"
63
+ ```
64
+ Checkpoint после каждой фазы. Пользователь подтверждает или корректирует.
65
+
66
+ **Определение режима:**
67
+ 1. Явно указан → использовать указанный
68
+ 2. Задача простая → предложить AUTO
69
+ 3. Задача сложная → предложить MANUAL
70
+ 4. Неясно → спросить
71
+
72
+ ## Output Documents (11 files)
73
+
74
+ ```
75
+ /output/[product-name]-sparc/
76
+ ├── PRD.md # Product Requirements Document
77
+ ├── Solution_Strategy.md # Problem analysis (First Principles + TRIZ)
78
+ ├── Specification.md # Requirements, user stories, acceptance criteria
79
+ ├── Pseudocode.md # Algorithms, data flow, API contracts
80
+ ├── Architecture.md # System design, tech stack, diagrams
81
+ ├── Refinement.md # Edge cases, testing, optimization
82
+ ├── Completion.md # Deployment, CI/CD, monitoring
83
+ ├── Research_Findings.md # Market and technology research
84
+ ├── Final_Summary.md # Executive summary
85
+ └── .claude/
86
+ └── CLAUDE.md # AI tools integration guide
87
+ ```
88
+
89
+ ## Workflow Architecture
90
+
91
+ ```
92
+ ┌─────────────────────────────────────────────────────────────────┐
93
+ │ INPUT: Описание продукта/идеи │
94
+ │ ↓ │
95
+ │ MODE SELECTION: AUTO или MANUAL │
96
+ │ ↓ │
97
+ │ GATE: Оценка ясности задачи │
98
+ │ → Ясна? → Пропустить Explore (уведомить) │
99
+ │ → Не ясна? → Phase 0: Explore │
100
+ │ ↓ │
101
+ │ Phase 0: EXPLORE → Product Brief │
102
+ │ view(explore) │
103
+ │ [MANUAL: ⏸️ CP0] │
104
+ │ ↓ │
105
+ │ Phase 1: RESEARCH → Research_Findings.md │
106
+ │ view(goap-research-ed25519) │
107
+ │ [MANUAL: ⏸️ CP1] │
108
+ │ ↓ │
109
+ │ Phase 2: SOLVE → Solution_Strategy.md │
110
+ │ view(problem-solver-enhanced) │
111
+ │ [MANUAL: ⏸️ CP2] │
112
+ │ ↓ │
113
+ │ Phase 3: SPECIFICATION → Specification.md + PRD.md │
114
+ │ [MANUAL: ⏸️ CP3] (собственная логика) │
115
+ │ ↓ │
116
+ │ Phase 4: PSEUDOCODE → Pseudocode.md │
117
+ │ [MANUAL: ⏸️ CP4] (собственная логика) │
118
+ │ ↓ │
119
+ │ Phase 5: ARCHITECTURE → Architecture.md │
120
+ │ [MANUAL: ⏸️ CP5] (собственная логика) │
121
+ │ ↓ │
122
+ │ Phase 6: REFINEMENT → Refinement.md │
123
+ │ [MANUAL: ⏸️ CP6] (собственная логика) │
124
+ │ ↓ │
125
+ │ Phase 7: COMPLETION → Completion.md + CLAUDE.md │
126
+ │ [MANUAL: ⏸️ CP7] (собственная логика) │
127
+ │ ↓ │
128
+ │ SYNTHESIS → Final_Summary.md │
129
+ │ ↓ │
130
+ │ OUTPUT: 11 файлов │
131
+ └─────────────────────────────────────────────────────────────────┘
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Phase Execution Protocol
137
+
138
+ ### Gate: Task Clarity Assessment
139
+
140
+ **Задача ЯСНА (пропустить Explore), если:**
141
+ - Чётко определён продукт и его назначение
142
+ - Понятна целевая аудитория
143
+ - Указаны ключевые функции
144
+ - Ограничения явны или очевидны
145
+
146
+ **Задача НЕ ЯСНА (нужен Explore), если:**
147
+ - Размытая формулировка ("сделай приложение")
148
+ - Неизвестна целевая аудитория
149
+ - Непонятны ключевые функции
150
+ - Противоречивые требования
151
+
152
+ **При пропуске Explore:**
153
+ ```
154
+ ⚡ Фаза Explore пропущена — задача достаточно ясна.
155
+ Сформирован Product Brief на основе вашего запроса.
156
+ [показать Product Brief]
157
+
158
+ [AUTO: переходим к Research...]
159
+ [MANUAL: ⏸️ CHECKPOINT 0 — подтвердите или скорректируйте]
160
+ ```
161
+
162
+ ---
163
+
164
+ ### Phase 0: EXPLORE (делегация → explore skill)
165
+
166
+ ```
167
+ view("/mnt/skills/user/explore/SKILL.md")
168
+ → Применить Socratic questioning к текущей задаче
169
+ → Scope: уточнить продукт, аудиторию, features, constraints
170
+ ```
171
+
172
+ **Output — Product Brief:**
173
+ ```markdown
174
+ ## Product Brief
175
+
176
+ **Product Name:** [Название]
177
+ **Problem Statement:** [Какую проблему решаем]
178
+ **Target Users:** [Целевая аудитория]
179
+ **Core Value Proposition:** [Ключевая ценность]
180
+
181
+ ### Key Features (MVP)
182
+ 1. [Feature 1]
183
+ 2. [Feature 2]
184
+ 3. [Feature 3]
185
+
186
+ ### Technical Context
187
+ - Platform: [Web/Mobile/Desktop/API]
188
+ - Stack Preferences: [Если есть]
189
+ - Integrations: [Внешние системы]
190
+ - Constraints: [Ограничения]
191
+
192
+ ### Success Criteria
193
+ - [Критерий 1]
194
+ - [Критерий 2]
195
+ ```
196
+
197
+ **[MANUAL] CP0:**
198
+ ```
199
+ ═══════════════════════════════════════════════════════════════
200
+ ⏸️ CHECKPOINT 0: Product Brief Complete
201
+
202
+ [показать Product Brief]
203
+
204
+ Команды:
205
+ • "ок" → перейти к Research
206
+ • "уточни X" → уточнить аспект
207
+ • "добавь Y" → добавить feature/requirement
208
+ • "измени Z" → изменить параметр
209
+
210
+ Ваше решение?
211
+ ═══════════════════════════════════════════════════════════════
212
+ ```
213
+
214
+ ---
215
+
216
+ ### Phase 1: RESEARCH (делегация → goap-research-ed25519 skill)
217
+
218
+ ```
219
+ view("/mnt/skills/user/goap-research-ed25519/SKILL.md")
220
+ → Применить GOAP planning к продуктовому research
221
+ → State Assessment → Gap Analysis → Plan → OODA Execution
222
+ ```
223
+
224
+ **Research Areas:**
225
+ - Market Research (конкуренты, тренды, размер рынка)
226
+ - Technology Research (библиотеки, frameworks, best practices)
227
+ - User Research (поведенческие паттерны, боли)
228
+ - Integration Research (APIs, compatibility)
229
+
230
+ **Output — Research_Findings.md:**
231
+ ```markdown
232
+ ## Research Findings
233
+
234
+ ### Executive Summary
235
+ [Ключевые находки в 2-3 предложениях]
236
+
237
+ ### Research Objective
238
+ [Исходные вопросы]
239
+
240
+ ### Methodology
241
+ [GOAP план, источники]
242
+
243
+ ### Market Analysis
244
+ [Findings с inline citations]
245
+
246
+ ### Competitive Landscape
247
+ | Competitor | Strengths | Weaknesses | Differentiation |
248
+ |------------|-----------|------------|-----------------|
249
+
250
+ ### Technology Assessment
251
+ [Findings с inline citations]
252
+
253
+ ### User Insights
254
+ [Findings с inline citations]
255
+
256
+ ### Confidence Assessment
257
+ - **High confidence:** [claims with 3+ sources]
258
+ - **Medium confidence:** [claims with 2 sources]
259
+ - **Low confidence:** [areas needing more research]
260
+
261
+ ### Sources
262
+ [Нумерованный список с URLs и reliability ratings]
263
+
264
+ ### Research Path Log
265
+ [Выполненные действия, replanning decisions]
266
+ ```
267
+
268
+ **[MANUAL] CP1:**
269
+ ```
270
+ ═══════════════════════════════════════════════════════════════
271
+ ⏸️ CHECKPOINT 1: Research Complete
272
+
273
+ **Ключевые находки:**
274
+ [краткое summary]
275
+
276
+ **Источники:** [число] sources, avg reliability [X.X]
277
+
278
+ Команды:
279
+ • "ок" → перейти к Solve
280
+ • "глубже X" → исследовать тему детальнее
281
+ • "добавь источники по Y" → найти больше источников
282
+ • "сравни A и B" → сравнительный анализ
283
+
284
+ Ваше решение?
285
+ ═══════════════════════════════════════════════════════════════
286
+ ```
287
+
288
+ ---
289
+
290
+ ### Phase 2: SOLVE (делегация → problem-solver-enhanced skill)
291
+
292
+ ```
293
+ view("/mnt/skills/user/problem-solver-enhanced/SKILL.md")
294
+ → Применить 9-модульный framework к продуктовой проблеме
295
+ → Включая TRIZ для разрешения противоречий
296
+ ```
297
+
298
+ **9 Modules (из problem-solver-enhanced):**
299
+ 1. First Principles — разбор до фундаментальных истин
300
+ 2. 5 Whys — корневая причина
301
+ 3. SCQA — Situation, Complication, Question, Answer
302
+ 4. Game Theory — интересы stakeholders, Nash equilibrium
303
+ 5. Second-Order Thinking — последствия последствий
304
+ 6. TRIZ Contradictions — 40 inventive principles
305
+ 7. Design Thinking — Empathy map, HMW questions
306
+ 8. OODA Loop — Observe, Orient, Decide, Act
307
+ 9. Solution Synthesis — интеграция
308
+
309
+ **Output — Solution_Strategy.md:**
310
+ ```markdown
311
+ ## Solution Strategy
312
+
313
+ ### Problem Statement (SCQA)
314
+ - **Situation:** [Стабильный контекст]
315
+ - **Complication:** [Что изменилось/проблема]
316
+ - **Question:** [Ключевой вопрос]
317
+ - **Answer:** [Предлагаемое решение]
318
+
319
+ ### First Principles Analysis
320
+ [Фундаментальные истины и выводы]
321
+
322
+ ### Root Cause Analysis (5 Whys)
323
+ 1. Why? → [Answer 1]
324
+ 2. Why? → [Answer 2]
325
+ 3. Why? → [Answer 3]
326
+ 4. Why? → [Answer 4]
327
+ 5. Why? → [Root Cause]
328
+
329
+ ### Game Theory Analysis
330
+ [Key players, interests, Nash equilibrium]
331
+
332
+ ### Second-Order Effects
333
+ [Consequences of consequences]
334
+
335
+ ### Contradictions Resolved (TRIZ)
336
+ | Contradiction | TRIZ Principle | Resolution |
337
+ |---------------|----------------|------------|
338
+
339
+ ### Recommended Approach
340
+ [Детальное описание стратегии]
341
+
342
+ ### Risk Assessment
343
+ | Risk | Probability | Impact | Mitigation |
344
+ |------|-------------|--------|------------|
345
+ ```
346
+
347
+ **[MANUAL] CP2:**
348
+ ```
349
+ ═══════════════════════════════════════════════════════════════
350
+ ⏸️ CHECKPOINT 2: Solution Strategy Complete
351
+
352
+ **Рекомендуемый подход:**
353
+ [краткое summary]
354
+
355
+ **Ключевые TRIZ решения:**
356
+ [список]
357
+
358
+ Команды:
359
+ • "ок" → перейти к Specification
360
+ • "альтернатива для X" → другой подход
361
+ • "углуби анализ Y" → детальнее по модулю
362
+ • "добавь stakeholder Z" → расширить game theory
363
+
364
+ Ваше решение?
365
+ ═══════════════════════════════════════════════════════════════
366
+ ```
367
+
368
+ ---
369
+
370
+ ### Phase 3: SPECIFICATION (собственная логика)
371
+
372
+ **Цель:** Трансформировать стратегию в детальные требования.
373
+
374
+ **Inputs:** Product Brief (Phase 0) + Research (Phase 1) + Solution (Phase 2)
375
+
376
+ **Output — Specification.md + PRD.md:**
377
+ - Executive Summary
378
+ - User Stories with Acceptance Criteria (Gherkin)
379
+ - Feature Matrix (MVP/v1/v2)
380
+ - Non-Functional Requirements (performance, security, scalability)
381
+ - Success Metrics
382
+
383
+ **User Story Format:**
384
+ ```
385
+ As a [persona],
386
+ I want to [action],
387
+ So that [benefit].
388
+
389
+ Acceptance Criteria:
390
+ Given [context]
391
+ When [action]
392
+ Then [expected result]
393
+ ```
394
+
395
+ **PRD Generation:**
396
+ ```
397
+ view("templates/prd.md")
398
+ → Заполнить шаблон данными из Phase 0-2
399
+ ```
400
+
401
+ **[MANUAL] CP3:**
402
+ ```
403
+ ═══════════════════════════════════════════════════════════════
404
+ ⏸️ CHECKPOINT 3: Specification Complete
405
+
406
+ **User Stories:** [число] total, [число] MVP
407
+ **NFRs:** Performance, Security, Scalability defined
408
+
409
+ Команды:
410
+ • "ок" → перейти к Pseudocode
411
+ • "добавь user story для X" → добавить
412
+ • "уточни acceptance criteria Y" → уточнить
413
+ • "измени приоритет Z" → изменить
414
+
415
+ Ваше решение?
416
+ ═══════════════════════════════════════════════════════════════
417
+ ```
418
+
419
+ ---
420
+
421
+ ### Phase 4: PSEUDOCODE (собственная логика)
422
+
423
+ **Цель:** Определить алгоритмы и data flow.
424
+
425
+ **Output — Pseudocode.md:**
426
+ ```markdown
427
+ ## Data Structures
428
+
429
+ ### [Entity Name]
430
+ type EntityName = {
431
+ id: UUID
432
+ field1: Type
433
+ field2: Type
434
+ created_at: Timestamp
435
+ }
436
+
437
+ ## Core Algorithms
438
+
439
+ ### Algorithm: [Name]
440
+ INPUT: [parameters]
441
+ OUTPUT: [result]
442
+
443
+ STEPS:
444
+ 1. [step]
445
+ 2. [step]
446
+ 3. IF [condition]:
447
+ [action]
448
+ ELSE:
449
+ [action]
450
+ 4. RETURN [result]
451
+
452
+ COMPLEXITY: O(n)
453
+
454
+ ## API Contracts
455
+
456
+ ### Endpoint: [Method] /path
457
+ Request:
458
+ Headers: { Authorization: Bearer <token> }
459
+ Body: { field1: type, field2: type }
460
+
461
+ Response (200):
462
+ { data: type, meta: { ... } }
463
+
464
+ Response (4xx/5xx):
465
+ { error: { code: string, message: string } }
466
+
467
+ ## State Transitions
468
+ [Mermaid diagram]
469
+
470
+ ## Error Handling Strategy
471
+ [Error categories and responses]
472
+ ```
473
+
474
+ **[MANUAL] CP4:**
475
+ ```
476
+ ═══════════════════════════════════════════════════════════════
477
+ ⏸️ CHECKPOINT 4: Pseudocode Complete
478
+
479
+ **Data Structures:** [число] entities
480
+ **Algorithms:** [число] core algorithms
481
+ **API Endpoints:** [число] endpoints
482
+
483
+ Команды:
484
+ • "ок" → перейти к Architecture
485
+ • "оптимизируй алгоритм X" → улучшить
486
+ • "добавь edge case Y" → добавить обработку
487
+ • "измени структуру Z" → изменить
488
+
489
+ Ваше решение?
490
+ ═══════════════════════════════════════════════════════════════
491
+ ```
492
+
493
+ ---
494
+
495
+ ### Phase 5: ARCHITECTURE (собственная логика)
496
+
497
+ **Цель:** Системный дизайн и выбор технологий.
498
+
499
+ **Reference:**
500
+ ```
501
+ view("references/sparc-methodology.md")
502
+ → Секция Architecture для best practices
503
+ ```
504
+
505
+ **Output — Architecture.md:**
506
+ ```markdown
507
+ ## Architecture Overview
508
+
509
+ ### Architecture Style
510
+ [Monolith / Microservices / Serverless / Hybrid]
511
+
512
+ ### High-Level Diagram
513
+ ```mermaid
514
+ graph TB
515
+ subgraph Client
516
+ A[Web App]
517
+ B[Mobile App]
518
+ end
519
+ subgraph API
520
+ C[API Gateway]
521
+ D[Service A]
522
+ E[Service B]
523
+ end
524
+ subgraph Data
525
+ F[(Database)]
526
+ G[(Cache)]
527
+ end
528
+ ```
529
+
530
+ ## Component Breakdown
531
+ [Detailed component descriptions]
532
+
533
+ ## Technology Stack
534
+
535
+ | Layer | Technology | Rationale |
536
+ |-------|------------|-----------|
537
+ | Frontend | | |
538
+ | Backend | | |
539
+ | Database | | |
540
+ | Cache | | |
541
+ | Queue | | |
542
+ | Infrastructure | | |
543
+
544
+ ## Data Architecture
545
+ [Data models, relationships, storage strategy]
546
+
547
+ ## Security Architecture
548
+ [Authentication, authorization, encryption]
549
+
550
+ ## Scalability Considerations
551
+ [Horizontal/vertical scaling, bottlenecks]
552
+ ```
553
+
554
+ **[MANUAL] CP5:**
555
+ ```
556
+ ═══════════════════════════════════════════════════════════════
557
+ ⏸️ CHECKPOINT 5: Architecture Complete
558
+
559
+ **Style:** [architecture style]
560
+ **Components:** [число] components
561
+ **Tech Stack:** [key technologies]
562
+
563
+ Команды:
564
+ • "ок" → перейти к Refinement
565
+ • "альтернатива для X" → другая технология
566
+ • "углуби безопасность" → детальнее security
567
+ • "добавь диаграмму Y" → добавить
568
+
569
+ Ваше решение?
570
+ ═══════════════════════════════════════════════════════════════
571
+ ```
572
+
573
+ ---
574
+
575
+ ### Phase 6: REFINEMENT (собственная логика)
576
+
577
+ **Цель:** Edge cases, тестирование, оптимизация.
578
+
579
+ **Output — Refinement.md:**
580
+ ```markdown
581
+ ## Edge Cases Matrix
582
+
583
+ | Scenario | Input | Expected | Handling |
584
+ |----------|-------|----------|----------|
585
+ | Empty input | | | |
586
+ | Max size | | | |
587
+ | Concurrent access | | | |
588
+ | Network failure | | | |
589
+
590
+ ## Testing Strategy
591
+
592
+ ### Unit Tests
593
+ [Coverage targets, critical paths]
594
+
595
+ ### Integration Tests
596
+ [Service interactions, API contracts]
597
+
598
+ ### E2E Tests
599
+ [User journeys, critical flows]
600
+
601
+ ### Performance Tests
602
+ [Load testing, benchmarks]
603
+
604
+ ## Test Cases
605
+
606
+ ### Feature: [Name]
607
+ ```gherkin
608
+ Scenario: [Happy path]
609
+ Given [setup]
610
+ When [action]
611
+ Then [assertion]
612
+
613
+ Scenario: [Error case]
614
+ Given [setup]
615
+ When [invalid action]
616
+ Then [error handling]
617
+ ```
618
+
619
+ ## Performance Optimizations
620
+ [Caching, indexing, lazy loading]
621
+
622
+ ## Security Hardening
623
+ [Input validation, rate limiting, audit logs]
624
+
625
+ ## Accessibility (a11y)
626
+ [WCAG compliance, keyboard navigation]
627
+
628
+ ## Technical Debt Items
629
+ [Known shortcuts, future refactoring]
630
+ ```
631
+
632
+ **[MANUAL] CP6:**
633
+ ```
634
+ ═══════════════════════════════════════════════════════════════
635
+ ⏸️ CHECKPOINT 6: Refinement Complete
636
+
637
+ **Edge Cases:** [число] scenarios
638
+ **Test Cases:** [число] tests
639
+ **Optimizations:** [список]
640
+
641
+ Команды:
642
+ • "ок" → перейти к Completion
643
+ • "добавь тест для X" → добавить test case
644
+ • "углуби edge case Y" → расширить
645
+ • "оптимизируй Z" → добавить оптимизацию
646
+
647
+ Ваше решение?
648
+ ═══════════════════════════════════════════════════════════════
649
+ ```
650
+
651
+ ---
652
+
653
+ ### Phase 7: COMPLETION (собственная логика)
654
+
655
+ **Цель:** Deployment и operational readiness.
656
+
657
+ **Output — Completion.md + CLAUDE.md:**
658
+
659
+ **Completion.md:**
660
+ ```markdown
661
+ ## Deployment Plan
662
+
663
+ ### Pre-Deployment Checklist
664
+ - [ ] All tests passing
665
+ - [ ] Security audit complete
666
+ - [ ] Documentation updated
667
+ - [ ] Rollback plan tested
668
+
669
+ ### Deployment Sequence
670
+ 1. [Step 1]
671
+ 2. [Step 2]
672
+ 3. [Step 3]
673
+
674
+ ### Rollback Procedure
675
+ [Steps to rollback if issues]
676
+
677
+ ## CI/CD Configuration
678
+
679
+ ```yaml
680
+ stages:
681
+ - test
682
+ - build
683
+ - deploy
684
+
685
+ test:
686
+ script:
687
+ - npm test
688
+ - npm run lint
689
+
690
+ deploy:
691
+ script:
692
+ - npm run build
693
+ - deploy.sh
694
+ ```
695
+
696
+ ## Monitoring & Alerting
697
+
698
+ ### Key Metrics
699
+ | Metric | Threshold | Alert |
700
+ |--------|-----------|-------|
701
+ | Response time p99 | > 500ms | PagerDuty |
702
+ | Error rate | > 1% | Slack |
703
+ | CPU usage | > 80% | Email |
704
+
705
+ ## Logging Strategy
706
+ [Log levels, retention, aggregation]
707
+
708
+ ## Handoff Checklists
709
+
710
+ ### For Development Team
711
+ - [ ] Repository access
712
+ - [ ] Development environment setup
713
+ - [ ] Code review guidelines
714
+
715
+ ### For QA Team
716
+ - [ ] Test environment access
717
+ - [ ] Test data setup
718
+ - [ ] Bug reporting process
719
+
720
+ ### For Operations Team
721
+ - [ ] Production access
722
+ - [ ] Runbooks
723
+ - [ ] Escalation procedures
724
+ ```
725
+
726
+ **CLAUDE.md:**
727
+ ```
728
+ view("templates/CLAUDE.md")
729
+ → Заполнить шаблон данными из всех предыдущих фаз
730
+ ```
731
+
732
+ **[MANUAL] CP7:**
733
+ ```
734
+ ═══════════════════════════════════════════════════════════════
735
+ ⏸️ CHECKPOINT 7: Completion Ready
736
+
737
+ **Deployment:** Plan + rollback ready
738
+ **Monitoring:** [число] metrics configured
739
+ **Handoffs:** Dev, QA, Ops checklists
740
+
741
+ Команды:
742
+ • "ок" / "финиш" → создать Final Package
743
+ • "добавь мониторинг X" → добавить метрику
744
+ • "углуби rollback" → расширить план
745
+ • "измени CI/CD" → изменить pipeline
746
+
747
+ Ваше решение?
748
+ ═══════════════════════════════════════════════════════════════
749
+ ```
750
+
751
+ ---
752
+
753
+ ### SYNTHESIS: Final Summary
754
+
755
+ **Output — Final_Summary.md:**
756
+ ```markdown
757
+ # [Product Name] - Executive Summary
758
+
759
+ ## Overview
760
+ [3-5 sentences describing the product and its value]
761
+
762
+ ## Problem & Solution
763
+ **Problem:** [What problem we're solving]
764
+ **Solution:** [How we're solving it]
765
+
766
+ ## Target Users
767
+ [Primary and secondary personas]
768
+
769
+ ## Key Features (MVP)
770
+ 1. [Feature 1] - [value proposition]
771
+ 2. [Feature 2] - [value proposition]
772
+ 3. [Feature 3] - [value proposition]
773
+
774
+ ## Technical Approach
775
+ - **Architecture:** [style]
776
+ - **Tech Stack:** [key technologies]
777
+ - **Key Differentiators:** [technical advantages]
778
+
779
+ ## Research Highlights
780
+ [Top 3-5 insights from research phase]
781
+
782
+ ## Success Metrics
783
+ | Metric | Target | Timeline |
784
+ |--------|--------|----------|
785
+
786
+ ## Timeline & Phases
787
+ | Phase | Features | Timeline |
788
+ |-------|----------|----------|
789
+ | MVP | | |
790
+ | v1.0 | | |
791
+ | v2.0 | | |
792
+
793
+ ## Risks & Mitigations
794
+ | Risk | Mitigation |
795
+ |------|------------|
796
+
797
+ ## Immediate Next Steps
798
+ 1. [Action 1]
799
+ 2. [Action 2]
800
+ 3. [Action 3]
801
+
802
+ ## Documentation Package
803
+ - PRD.md - Product Requirements
804
+ - Solution_Strategy.md - Problem Analysis
805
+ - Specification.md - Detailed Requirements
806
+ - Pseudocode.md - Algorithms & Data Flow
807
+ - Architecture.md - System Design
808
+ - Refinement.md - Testing & Edge Cases
809
+ - Completion.md - Deployment & Operations
810
+ - Research_Findings.md - Market & Tech Research
811
+ - CLAUDE.md - AI Integration Guide
812
+ ```
813
+
814
+ ---
815
+
816
+ ## Final Package Output
817
+
818
+ ```
819
+ ═══════════════════════════════════════════════════════════════
820
+ 📦 SPARC DOCUMENTATION PACKAGE COMPLETE
821
+
822
+ /output/[product-name]-sparc/
823
+ ├── PRD.md ✅ Product Requirements
824
+ ├── Solution_Strategy.md ✅ Problem Analysis
825
+ ├── Specification.md ✅ Detailed Requirements
826
+ ├── Pseudocode.md ✅ Algorithms & Data Flow
827
+ ├── Architecture.md ✅ System Design
828
+ ├── Refinement.md ✅ Testing & Edge Cases
829
+ ├── Completion.md ✅ Deployment & Operations
830
+ ├── Research_Findings.md ✅ Market & Tech Research
831
+ ├── Final_Summary.md ✅ Executive Summary
832
+ └── .claude/
833
+ └── CLAUDE.md ✅ AI Integration Guide
834
+
835
+ Total: 11 files
836
+
837
+ 🚀 READY FOR VIBE CODING
838
+
839
+ [AUTO mode]: Все документы созданы автоматически
840
+ [MANUAL mode]: Все документы проверены на checkpoints
841
+ ═══════════════════════════════════════════════════════════════
842
+ ```
843
+
844
+ ---
845
+
846
+ ## Accepting External Context (from parent skills)
847
+
848
+ Если sparc-prd-mini вызывается из композитного скилла (например, vibe-coding-coordinator), родитель может передать готовые артефакты:
849
+
850
+ ```markdown
851
+ ## Pre-filled Context (optional)
852
+
853
+ Если получены от parent skill:
854
+ - **Product Brief** → пропустить Phase 0, использовать готовый
855
+ - **Research Findings** → пропустить Phase 1, использовать готовые
856
+ - **Solution Strategy** → пропустить Phase 2, использовать готовую
857
+ - **Architecture Constraints** → передать в Phase 5 как обязательные ограничения
858
+
859
+ Пример вызова с контекстом:
860
+ ```
861
+ sparc-prd-mini MANUAL
862
+ --product-brief: [готовый brief от explore]
863
+ --research: [готовые findings от goap-research-ed25519]
864
+ --constraints: "Distributed Monolith, Docker, VPS"
865
+ ```
866
+
867
+ Скилл определяет какие фазы пропустить автоматически по наличию inputs.
868
+ ```
869
+
870
+ ---
871
+
872
+ ## Checkpoint Commands Reference (MANUAL Mode)
873
+
874
+ | Команда | Действие | Доступность |
875
+ |---------|----------|-------------|
876
+ | `ок`, `ok`, `далее` | Следующая фаза | Все checkpoints |
877
+ | `уточни X` | Уточнить аспект | Все checkpoints |
878
+ | `добавь Y` | Добавить элемент | Все checkpoints |
879
+ | `измени Z` | Изменить параметр | Все checkpoints |
880
+ | `назад` | Вернуться к предыдущей фазе | Все checkpoints |
881
+ | `глубже X` | Исследовать детальнее | CP1 |
882
+ | `альтернатива для X` | Другой подход | CP2, CP5 |
883
+ | `углуби Y` | Углубить аспект | CP2, CP5, CP6 |
884
+ | `финиш` | Создать final package | CP7 |
885
+ | `стоп` | Пауза с сохранением | Все checkpoints |
886
+
887
+ ---
888
+
889
+ ## Quality Standards
890
+
891
+ **Research Quality (via goap-research-ed25519):**
892
+ - [ ] Все claims имеют источники с reliability rating
893
+ - [ ] Минимум 2 независимых источника на ключевое утверждение
894
+ - [ ] Первичные источники где возможно
895
+ - [ ] Confidence levels для всех findings
896
+
897
+ **Documentation Completeness:**
898
+ - [ ] Все 8 фаз пройдены (или обоснованно пропущены при pre-filled context)
899
+ - [ ] Все 11 документов созданы
900
+ - [ ] Mermaid диаграммы включены
901
+ - [ ] Acceptance criteria в Gherkin формате
902
+
903
+ **Actionability:**
904
+ - [ ] Каждое действие имеет owner и timeline
905
+ - [ ] Метрики успеха измеримы
906
+ - [ ] Риски идентифицированы с mitigation планами
907
+
908
+ ---
909
+
910
+ ## Anti-Patterns
911
+
912
+ ❌ Пропускать research и сразу давать решение
913
+ ❌ Делать утверждения без источников
914
+ ❌ Общие рекомендации без конкретных действий
915
+ ❌ Игнорировать противоречия вместо их разрешения
916
+ ❌ Не указывать confidence level для утверждений
917
+ ❌ Забывать о second-order effects
918
+ ❌ Не уведомлять о пропуске Explore фазы
919
+ ❌ В MANUAL режиме — продолжать без подтверждения
920
+ ❌ Копировать логику внешних скиллов вместо view()
921
+
922
+ ---
923
+
924
+ ## Mode Selection Prompt
925
+
926
+ При старте, если режим не указан:
927
+
928
+ ```
929
+ ═══════════════════════════════════════════════════════════════
930
+ 🎯 SPARC PRD Mini v2 - Mode Selection
931
+
932
+ Доступные режимы:
933
+
934
+ 📌 AUTO — автономная генерация всех 11 документов
935
+ Быстро, без промежуточных остановок
936
+ Команда: "auto" / "автоматически"
937
+
938
+ 📌 MANUAL — пошаговая генерация с checkpoint'ами
939
+ Контроль на каждой фазе, возможность коррекции
940
+ Команда: "manual" / "пошагово" / "с проверками"
941
+
942
+ Какой режим предпочитаете?
943
+ ═══════════════════════════════════════════════════════════════
944
+ ```
945
+
946
+ ---
947
+
948
+ ## Dependency Version Note
949
+
950
+ Этот скилл ссылается на внешние зависимости через `view()`. Если поведение изменилось неожиданно, проверь обновления в:
951
+ - `/mnt/skills/user/explore/SKILL.md`
952
+ - `/mnt/skills/user/goap-research-ed25519/SKILL.md`
953
+ - `/mnt/skills/user/problem-solver-enhanced/SKILL.md`
954
+
955
+ Собственная методология: `references/sparc-methodology.md`