@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,733 @@
1
+ # Automation Commands Templates
2
+
3
+ Templates for generating orchestration and automation commands:
4
+ - `/go` β€” intelligent pipeline selector (delegates to /plan, /feature, or /feature-ent)
5
+ - `/run` β€” autonomous MVP/full build loop
6
+ - `/docs` β€” bilingual documentation generator (RU/EN)
7
+
8
+ ---
9
+
10
+ ## 1. Command Template: `/go`
11
+
12
+ Generate as `.claude/commands/go.md`:
13
+
14
+ ````markdown
15
+ ---
16
+ description: Intelligent feature implementation pipeline. Analyzes complexity and selects
17
+ optimal approach (/plan, /feature, or /feature-ent if available), then executes autonomously
18
+ with parallel agents and frequent commits. Falls back to /feature for complex tasks
19
+ when /feature-ent is not available in this project.
20
+ $ARGUMENTS: feature name, ID, or brief description (optional β€” defaults to next from roadmap)
21
+ ---
22
+
23
+ # /go $ARGUMENTS
24
+
25
+ ## Purpose
26
+
27
+ One-command feature implementation that automatically selects the right pipeline
28
+ based on feature complexity, then executes it without manual confirmations.
29
+
30
+ ## Step 1: Determine Target Feature
31
+
32
+ IF $ARGUMENTS is provided:
33
+ - Parse as feature name, roadmap ID, or description
34
+ - Look up in `.claude/feature-roadmap.json` if it matches an ID
35
+ ELSE:
36
+ - Run `/next` logic to find the highest-priority `next` feature
37
+ - If no `next` feature found, pick first `planned` feature
38
+ - Confirm selection before proceeding
39
+
40
+ ## Step 2: Analyze Complexity
41
+
42
+ First, check which pipelines are available:
43
+
44
+ ```
45
+ Available pipelines:
46
+ βœ… /plan β€” always available
47
+ βœ… /feature β€” always available
48
+ ⚠️ /feature-ent β€” ONLY if .claude/commands/feature-ent.md exists
49
+ (generated only when project has DDD docs from idea2prd-manual pipeline)
50
+
51
+ CHECK: ls .claude/commands/feature-ent.md 2>/dev/null
52
+ β†’ exists: feature_ent_available = true
53
+ β†’ missing: feature_ent_available = false
54
+ ```
55
+
56
+ Then evaluate the feature to determine the right pipeline:
57
+
58
+ | Signal | Score |
59
+ |--------|-------|
60
+ | Touches ≀3 files | -2 (simple) |
61
+ | Touches 4-10 files | 0 (medium) |
62
+ | Touches >10 files | +3 (complex) |
63
+ | Has external API integration | +2 |
64
+ | Requires new database entities | +2 |
65
+ | Has cross-bounded-context dependencies | +3 |
66
+ | Is a hotfix or minor improvement | -3 |
67
+ | Has DDD docs in project (`docs/ddd/`) | +1 (toward /feature-ent) |
68
+ | Has Gherkin scenarios for this feature | +1 |
69
+ | Estimated implementation < 30 min | -2 |
70
+ | Estimated implementation > 2 hours | +3 |
71
+
72
+ **Decision matrix:**
73
+
74
+ | Total Score | Pipeline | Rationale |
75
+ |-------------|----------|-----------|
76
+ | ≀ -2 | `/plan` | Simple task, lightweight plan is enough |
77
+ | -1 to +4 | `/feature` | Standard feature, needs SPARC lifecycle |
78
+ | β‰₯ +5 AND feature_ent_available | `/feature-ent` | Complex enterprise feature, full DDD/ADR/C4 lifecycle |
79
+ | β‰₯ +5 AND NOT feature_ent_available | `/feature` | Complex feature but /feature-ent not in this project (no DDD docs); use /feature with extra attention to architecture |
80
+
81
+ > **Note:** `/feature-ent` is only available in projects where the toolkit was generated
82
+ > from idea2prd-manual pipeline with DDD documentation. If `/feature-ent` is not available
83
+ > and the feature is complex (score β‰₯ +5), `/feature` is used with a recommendation to
84
+ > pay extra attention to architectural consistency and consider creating ADRs manually.
85
+
86
+ ## Step 3: Execute Selected Pipeline
87
+
88
+ ### If `/plan` selected:
89
+ 1. Run `/plan <feature-name>`
90
+ 2. After plan is saved, immediately implement it
91
+ 3. Use `Task` tool to parallelize independent changes
92
+ 4. Run tests after implementation
93
+ 5. Commit and push: `git push origin HEAD`
94
+
95
+ ### If `/feature` selected:
96
+ 1. Run `/feature <feature-name>` in AUTO mode (no confirmations between phases)
97
+ - Phase 1: PLAN (sparc-prd-mini β†’ docs)
98
+ - Phase 2: VALIDATE (requirements-validator β†’ score β‰₯70)
99
+ - Phase 3: IMPLEMENT (parallel agents from docs)
100
+ - Phase 4: REVIEW (brutal-honesty-review β†’ fix criticals)
101
+ 2. Where possible, spawn concurrent tasks:
102
+ - Parallel test writing + implementation
103
+ - Parallel frontend + backend if independent
104
+ - Use swarm of agents for large implementations
105
+ 3. Commit frequently (after each logical change)
106
+ 4. Push after each phase: `git push origin HEAD`
107
+
108
+ ### If `/feature-ent` selected (only when feature_ent_available = true):
109
+ 1. Run `/feature-ent <feature-name>` in AUTO mode
110
+ - Includes DDD analysis, ADR creation, C4 updates
111
+ - Phase 1: PLAN (idea2prd-manual β†’ DDD/ADR/C4/Gherkin)
112
+ - Phase 2: VALIDATE (7 agents, including DDD coherence + ADR consistency)
113
+ - Phase 3: IMPLEMENT (parallel agents per Bounded Context)
114
+ - Phase 4: REVIEW (6 agents, ADR + fitness verification)
115
+ 2. Same parallelization and commit strategy as `/feature`
116
+ 3. Push after each phase: `git push origin HEAD`
117
+
118
+ ### If complex feature but `/feature-ent` NOT available:
119
+ 1. Run `/feature <feature-name>` in AUTO mode (same as standard /feature above)
120
+ 2. Additionally after Phase 1 (PLAN):
121
+ - Recommend creating manual ADRs in `docs/features/<feature-name>/adr/`
122
+ - Flag architectural concerns for extra review
123
+ 3. Log warning:
124
+ ```
125
+ ⚠️ Complex feature (score: <N>) but /feature-ent not available in this project.
126
+ Using /feature with enhanced attention to architecture.
127
+ Consider: re-generate toolkit with idea2prd-manual for enterprise features.
128
+ ```
129
+
130
+ ## Step 4: Post-Implementation
131
+
132
+ 1. Update `.claude/feature-roadmap.json`:
133
+ - Set feature status to `done`
134
+ - Update `files` array with actual files touched
135
+ 2. Commit roadmap update: `git add .claude/feature-roadmap.json && git commit -m "docs(roadmap): mark <feature> as done"`
136
+ 3. Push: `git push origin HEAD`
137
+ 4. Report summary:
138
+ ```
139
+ βœ… Feature completed: <feature-name>
140
+ Pipeline used: /plan | /feature | /feature-ent | /feature (complex fallback)
141
+ Complexity score: <N>
142
+ Files changed: <count>
143
+ Commits: <count>
144
+ Tests: <passed>/<total>
145
+ Duration: <time>
146
+
147
+ IF complex fallback was used:
148
+ ⚠️ Note: /feature-ent was not available. Consider re-generating toolkit
149
+ with idea2prd-manual pipeline for enterprise-grade planning.
150
+
151
+ Next suggested: /next or /go for the next feature
152
+ ```
153
+
154
+ ## Parallelization Strategy
155
+
156
+ - Use `Task` tool for independent subtasks within implementation
157
+ - Spawn concurrent agents when feature touches multiple packages/services
158
+ - Run tests in parallel with implementation of unrelated components
159
+ - Never parallelize tasks that have data dependencies
160
+
161
+ ## Git Strategy
162
+
163
+ - Commit after each logical unit of work (not giant commits)
164
+ - Format: `type(scope): description`
165
+ - Push to remote after each completed phase to prevent data loss
166
+ - If working on a branch: `git push origin HEAD`
167
+ ````
168
+
169
+ ---
170
+
171
+ ## 2. Command Template: `/run`
172
+
173
+ Generate as `.claude/commands/run.md`:
174
+
175
+ ````markdown
176
+ ---
177
+ description: Autonomous project build loop. Bootstraps project and implements features
178
+ one by one until MVP (default) or all features are done.
179
+ $ARGUMENTS: "mvp" (default) | "all" β€” scope of features to implement
180
+ ---
181
+
182
+ # /run $ARGUMENTS
183
+
184
+ ## Purpose
185
+
186
+ End-to-end autonomous project build: bootstrap β†’ implement features in loop β†’ done.
187
+ Combines `/start`, `/next`, and `/go` into a single continuous pipeline.
188
+
189
+ ## Step 0: Parse Scope
190
+
191
+ ```
192
+ IF $ARGUMENTS is empty OR $ARGUMENTS == "mvp":
193
+ scope = "mvp"
194
+ β†’ Implement only features with status `next` or `in_progress`
195
+ β†’ Stop when no more `next` features remain (skip `planned`)
196
+
197
+ IF $ARGUMENTS == "all":
198
+ scope = "all"
199
+ β†’ Implement ALL features regardless of status
200
+ β†’ Stop only when every feature is `done`
201
+ ```
202
+
203
+ ## Step 1: Bootstrap Project
204
+
205
+ 1. Check if project is already bootstrapped:
206
+ - IF `docker-compose.yml` exists AND key source dirs exist β†’ skip to Step 2
207
+ - ELSE β†’ run `/start`
208
+ 2. Verify bootstrap succeeded:
209
+ - Project structure exists
210
+ - Docker services running (if applicable)
211
+ - Basic health checks pass
212
+ 3. Commit and push: `git push origin HEAD`
213
+
214
+ ## Step 2: Feature Implementation Loop
215
+
216
+ ```
217
+ LOOP:
218
+ 1. Run `/next` to get current sprint status and next feature
219
+
220
+ 2. IF scope == "mvp":
221
+ - Get next feature with status `next` or `in_progress`
222
+ - IF no such feature exists β†’ EXIT LOOP (MVP complete)
223
+ IF scope == "all":
224
+ - Get next feature that is NOT `done`
225
+ - IF all features are `done` β†’ EXIT LOOP (all complete)
226
+
227
+ 3. Run `/go <feature-name>` to implement the feature
228
+ - /go automatically selects /plan, /feature, or /feature-ent
229
+ - /go handles commits and pushes
230
+
231
+ 4. Verify implementation:
232
+ - Run project tests: ensure no regressions
233
+ - IF tests fail β†’ fix before continuing
234
+
235
+ 5. Update progress:
236
+ - Feature marked as `done` in roadmap (handled by /go)
237
+ - Log progress to stdout
238
+
239
+ 6. CONTINUE LOOP
240
+ ```
241
+
242
+ ## Step 3: Finalize
243
+
244
+ After loop completes:
245
+
246
+ 1. Run full test suite: `npm test` or equivalent
247
+ 2. Update README.md with current state
248
+ 3. Final commit: `git add -A && git commit -m "milestone: <scope> complete"`
249
+ 4. Push and tag:
250
+ ```bash
251
+ git push origin HEAD
252
+ IF scope == "mvp":
253
+ git tag v0.1.0-mvp && git push origin v0.1.0-mvp
254
+ IF scope == "all":
255
+ git tag v1.0.0 && git push origin v1.0.0
256
+ ```
257
+ 5. Generate summary report:
258
+
259
+ ```
260
+ 🏁 /run <scope> β€” COMPLETE
261
+
262
+ πŸ“Š Summary:
263
+ Features implemented: <count>/<total>
264
+ Total commits: <count>
265
+ Total files: <count>
266
+ Test results: <passed>/<total>
267
+ Duration: <time>
268
+
269
+ πŸ“‹ Features completed:
270
+ βœ… <feature-1> (via /plan)
271
+ βœ… <feature-2> (via /feature)
272
+ βœ… <feature-3> (via /feature-ent)
273
+ ...
274
+
275
+ 🏷️ Tagged: v0.1.0-mvp | v1.0.0
276
+
277
+ IF scope == "mvp" AND planned features remain:
278
+ ⏭️ Remaining planned features: <count>
279
+ To continue: /run all
280
+ ```
281
+
282
+ ## Error Recovery
283
+
284
+ - Each feature is committed independently β†’ partial progress is saved
285
+ - If a feature fails repeatedly (3 attempts), skip it and mark as `blocked`
286
+ - If `/start` fails, stop and report β€” project bootstrap is critical
287
+ - On any failure: always push current state to remote first
288
+
289
+ ## Parallelization
290
+
291
+ - `/go` handles per-feature parallelization internally
292
+ - Features are implemented sequentially (one at a time) to avoid conflicts
293
+ - Within each feature, /go maximizes internal parallelism
294
+ ````
295
+
296
+ ---
297
+
298
+ ## 3. Command Template: `/docs`
299
+
300
+ Generate as `.claude/commands/docs.md`:
301
+
302
+ ````markdown
303
+ ---
304
+ description: Generate or update project documentation in Russian and English.
305
+ Creates a comprehensive set of markdown files covering deployment, usage,
306
+ architecture, and user flows.
307
+ $ARGUMENTS: optional flags β€” "rus" (Russian only), "eng" (English only), "update" (refresh existing)
308
+ ---
309
+
310
+ # /docs $ARGUMENTS
311
+
312
+ ## Purpose
313
+
314
+ Generate professional, bilingual project documentation from source code,
315
+ existing docs, and development insights. Output: `/README/rus/` and `/README/eng/`.
316
+
317
+ ## Step 1: Gather Context
318
+
319
+ Read all available sources to build comprehensive understanding:
320
+
321
+ ### Primary sources (project documentation):
322
+ ```
323
+ docs/PRD.md (or docs/*.md) β€” product requirements, features
324
+ docs/Architecture.md β€” system architecture, tech stack
325
+ docs/Specification.md β€” API, data model, user stories
326
+ docs/Completion.md β€” deployment, environment setup
327
+ docs/features/ β€” feature-specific documentation
328
+ docs/plans/ β€” implementation plans
329
+ CLAUDE.md β€” project overview, commands, agents
330
+ DEVELOPMENT_GUIDE.md β€” development workflow
331
+ INSTALL.md β€” installation instructions
332
+ docker-compose.yml β€” infrastructure services
333
+ .env.example β€” environment variables
334
+ ```
335
+
336
+ ### Secondary sources (knowledge base):
337
+ ```
338
+ myinsights/1nsights.md β€” development insights index
339
+ myinsights/details/ β€” detailed insight files
340
+ .claude/feature-roadmap.json β€” feature list and statuses
341
+ ```
342
+
343
+ ### Tertiary sources (code analysis):
344
+ ```
345
+ Source code structure β€” actual implementation
346
+ package.json / Cargo.toml / etc. β€” dependencies, scripts
347
+ README.md (existing, if any) β€” current documentation
348
+ ```
349
+
350
+ ## Step 2: Determine Scope
351
+
352
+ ```
353
+ IF $ARGUMENTS contains "rus": languages = ["rus"]
354
+ ELIF $ARGUMENTS contains "eng": languages = ["eng"]
355
+ ELSE: languages = ["rus", "eng"]
356
+
357
+ IF $ARGUMENTS contains "update":
358
+ mode = "update" β€” read existing /README/ files, update only changed sections
359
+ ELSE:
360
+ mode = "create" β€” generate from scratch
361
+ ```
362
+
363
+ ## Step 3: Generate Documentation Set
364
+
365
+ For EACH language in languages, generate these files:
366
+
367
+ ### File 1: `deployment.md` β€” Как Ρ€Π°Π·Π²Π΅Ρ€Π½ΡƒΡ‚ΡŒ систСму / Deployment Guide
368
+
369
+ ```markdown
370
+ # Π Π°Π·Π²Π΅Ρ€Ρ‚Ρ‹Π²Π°Π½ΠΈΠ΅ систСмы / Deployment Guide
371
+
372
+ ## ВрСбования ΠΊ ΠΎΠΊΡ€ΡƒΠΆΠ΅Π½ΠΈΡŽ
373
+ - OS, runtime versions, Docker version
374
+ - Minimum hardware requirements
375
+
376
+ ## Быстрый старт (Quick Start)
377
+ - Clone β†’ configure β†’ run (step by step)
378
+ - Docker-based deployment
379
+ - Environment variables explanation
380
+
381
+ ## ПолноС Ρ€Π°Π·Π²Π΅Ρ€Ρ‚Ρ‹Π²Π°Π½ΠΈΠ΅ (Production Deployment)
382
+ - Infrastructure provisioning
383
+ - SSL/TLS configuration
384
+ - Database initialization
385
+ - Service startup order
386
+ - Health checks verification
387
+
388
+ ## ОбновлСниС (Updating)
389
+ - How to update to a new version
390
+ - Database migration steps
391
+ - Rollback procedure
392
+ ```
393
+
394
+ ### File 2: `admin-guide.md` β€” Руководство администратора / Admin Guide
395
+
396
+ ```markdown
397
+ # Руководство администратора / Administrator Guide
398
+
399
+ ## Π£ΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡΠΌΠΈ
400
+ - User creation, roles, permissions
401
+
402
+ ## ΠšΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΡ систСмы
403
+ - Configuration files and their purposes
404
+ - Feature flags / toggles
405
+ - Performance tuning
406
+
407
+ ## ΠœΠΎΠ½ΠΈΡ‚ΠΎΡ€ΠΈΠ½Π³ ΠΈ Π»ΠΎΠ³ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅
408
+ - How to check system health
409
+ - Log locations and format
410
+ - Alerting setup
411
+
412
+ ## Π Π΅Π·Π΅Ρ€Π²Π½ΠΎΠ΅ ΠΊΠΎΠΏΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅
413
+ - Backup procedures
414
+ - Restore procedures
415
+
416
+ ## УстранСниС Π½Π΅ΠΏΠΎΠ»Π°Π΄ΠΎΠΊ
417
+ - Common issues and solutions
418
+ - Diagnostic commands
419
+ ```
420
+
421
+ ### File 3: `user-guide.md` β€” Руководство ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ / User Guide
422
+
423
+ ```markdown
424
+ # Руководство ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ / User Guide
425
+
426
+ ## Начало Ρ€Π°Π±ΠΎΡ‚Ρ‹
427
+ - First login / registration
428
+ - Initial setup
429
+
430
+ ## ΠžΡΠ½ΠΎΠ²Π½Ρ‹Π΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ
431
+ - Feature-by-feature walkthrough
432
+ - Screenshots / descriptions of key screens
433
+
434
+ ## Π’ΠΈΠΏΠΈΡ‡Π½Ρ‹Π΅ сцСнарии использования
435
+ - Common workflows step by step
436
+
437
+ ## FAQ
438
+ - Frequently asked questions
439
+ ```
440
+
441
+ ### File 4: `infrastructure.md` β€” ВрСбования ΠΊ инфраструктурС / Infrastructure Requirements
442
+
443
+ ```markdown
444
+ # ВрСбования ΠΊ инфраструктурС / Infrastructure Requirements
445
+
446
+ ## ΠœΠΈΠ½ΠΈΠΌΠ°Π»ΡŒΠ½Ρ‹Π΅ трСбования
447
+ - CPU, RAM, Disk for each component
448
+ - Network requirements
449
+
450
+ ## Π Π΅ΠΊΠΎΠΌΠ΅Π½Π΄ΡƒΠ΅ΠΌΡ‹Π΅ трСбования
451
+ - Production-grade specifications
452
+ - High-availability setup
453
+
454
+ ## Π‘Π΅Ρ‚Π΅Π²Ρ‹Π΅ трСбования
455
+ - Ports to open
456
+ - Internal service communication
457
+ - External API access requirements
458
+
459
+ ## Зависимости
460
+ - Required external services
461
+ - Third-party integrations
462
+ - License requirements
463
+ ```
464
+
465
+ ### File 5: `architecture.md` β€” АрхитСктура систСмы / System Architecture
466
+
467
+ ```markdown
468
+ # АрхитСктура ΠΈ ΠΏΡ€ΠΈΠ½Ρ†ΠΈΠΏΡ‹ Ρ€Π°Π±ΠΎΡ‚Ρ‹ / Architecture & Design Principles
469
+
470
+ ## ΠžΠ±Π·ΠΎΡ€ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹
471
+ - High-level system diagram (Mermaid)
472
+ - Component responsibilities
473
+
474
+ ## ВСхнологичСский стСк
475
+ - Languages, frameworks, databases
476
+ - Why each was chosen (from ADRs if available)
477
+
478
+ ## ΠšΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚Ρ‹ систСмы
479
+ - Service-by-service description
480
+ - Communication patterns (REST, events, queues)
481
+
482
+ ## МодСль Π΄Π°Π½Π½Ρ‹Ρ…
483
+ - Key entities and relationships
484
+ - Database schema overview
485
+
486
+ ## Π‘Π΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡ‚ΡŒ
487
+ - Authentication / authorization approach
488
+ - Data encryption
489
+ - API security
490
+
491
+ ## ΠœΠ°ΡΡˆΡ‚Π°Π±ΠΈΡ€ΡƒΠ΅ΠΌΠΎΡΡ‚ΡŒ
492
+ - Horizontal scaling strategy
493
+ - Bottlenecks and mitigations
494
+ ```
495
+
496
+ ### File 6: `ui-guide.md` β€” Π˜Π½Ρ‚Π΅Ρ€Ρ„Π΅ΠΉΡ систСмы / UI Guide
497
+
498
+ ```markdown
499
+ # Π˜Π½Ρ‚Π΅Ρ€Ρ„Π΅ΠΉΡ систСмы / UI Guide
500
+
501
+ ## Π‘Ρ‚Ρ€ΡƒΠΊΡ‚ΡƒΡ€Π° интСрфСйса
502
+ - Main navigation layout
503
+ - Key screens and their purposes
504
+
505
+ ## ΠžΡΠ½ΠΎΠ²Π½Ρ‹Π΅ экраны
506
+ - Dashboard / Home
507
+ - Feature-specific screens
508
+ - Settings / Admin panel
509
+
510
+ ## Π­Π»Π΅ΠΌΠ΅Π½Ρ‚Ρ‹ управлСния
511
+ - Common UI patterns used
512
+ - Keyboard shortcuts (if any)
513
+ - Mobile / responsive behavior
514
+ ```
515
+
516
+ ### File 7: `user-flows.md` β€” ΠŸΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΠ΅ сцСнарии / User & Admin Flows
517
+
518
+ ```markdown
519
+ # Π’ΠΈΠΏΠΎΠ²Ρ‹Π΅ сцСнарии / User & Admin Flows
520
+
521
+ ## User Flow: РСгистрация ΠΈ ΠΏΠ΅Ρ€Π²Ρ‹ΠΉ Π²Ρ…ΠΎΠ΄
522
+ [Step-by-step with Mermaid sequence diagram]
523
+
524
+ ## User Flow: Основной Ρ€Π°Π±ΠΎΡ‡ΠΈΠΉ процСсс
525
+ [Primary user journey β€” the main thing users do]
526
+
527
+ ## User Flow: [Feature-specific flow]
528
+ [For each key feature]
529
+
530
+ ## Admin Flow: Настройка систСмы
531
+ [Admin setup walkthrough]
532
+
533
+ ## Admin Flow: Π£ΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡΠΌΠΈ
534
+ [User management walkthrough]
535
+
536
+ ## Admin Flow: ΠœΠΎΠ½ΠΈΡ‚ΠΎΡ€ΠΈΠ½Π³
537
+ [Monitoring and maintenance walkthrough]
538
+ ```
539
+
540
+ ## Step 4: Generate Output
541
+
542
+ 1. Create directory structure:
543
+ ```bash
544
+ mkdir -p README/rus README/eng
545
+ ```
546
+
547
+ 2. Generate files for each language:
548
+ - Russian files go to `README/rus/`
549
+ - English files go to `README/eng/`
550
+ - Use proper language throughout (not machine-translated fragments)
551
+
552
+ 3. Generate `README/index.md` β€” table of contents linking both languages:
553
+ ```markdown
554
+ # Project Documentation
555
+
556
+ ## πŸ‡·πŸ‡Ί ДокумСнтация Π½Π° русском
557
+ - [Π Π°Π·Π²Π΅Ρ€Ρ‚Ρ‹Π²Π°Π½ΠΈΠ΅](rus/deployment.md)
558
+ - [Руководство администратора](rus/admin-guide.md)
559
+ - [Руководство ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ](rus/user-guide.md)
560
+ - [ВрСбования ΠΊ инфраструктурС](rus/infrastructure.md)
561
+ - [АрхитСктура](rus/architecture.md)
562
+ - [Π˜Π½Ρ‚Π΅Ρ€Ρ„Π΅ΠΉΡ](rus/ui-guide.md)
563
+ - [ΠŸΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΠ΅ сцСнарии](rus/user-flows.md)
564
+
565
+ ## πŸ‡¬πŸ‡§ English Documentation
566
+ - [Deployment Guide](eng/deployment.md)
567
+ - [Administrator Guide](eng/admin-guide.md)
568
+ - [User Guide](eng/user-guide.md)
569
+ - [Infrastructure Requirements](eng/infrastructure.md)
570
+ - [Architecture](eng/architecture.md)
571
+ - [UI Guide](eng/ui-guide.md)
572
+ - [User & Admin Flows](eng/user-flows.md)
573
+ ```
574
+
575
+ ## Step 5: Commit and Report
576
+
577
+ ```bash
578
+ git add README/
579
+ git commit -m "docs: generate project documentation (RU/EN)"
580
+ git push origin HEAD
581
+ ```
582
+
583
+ Report:
584
+ ```
585
+ πŸ“š Documentation generated: README/
586
+
587
+ πŸ‡·πŸ‡Ί Russian (README/rus/):
588
+ βœ… deployment.md β€” Ρ€Π°Π·Π²Π΅Ρ€Ρ‚Ρ‹Π²Π°Π½ΠΈΠ΅
589
+ βœ… admin-guide.md β€” руководство администратора
590
+ βœ… user-guide.md β€” руководство ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ
591
+ βœ… infrastructure.md β€” трСбования ΠΊ инфраструктурС
592
+ βœ… architecture.md β€” Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Π°
593
+ βœ… ui-guide.md β€” интСрфСйс
594
+ βœ… user-flows.md β€” ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΠ΅ сцСнарии
595
+
596
+ πŸ‡¬πŸ‡§ English (README/eng/):
597
+ βœ… deployment.md β€” deployment guide
598
+ βœ… admin-guide.md β€” admin guide
599
+ βœ… user-guide.md β€” user guide
600
+ βœ… infrastructure.md β€” infrastructure requirements
601
+ βœ… architecture.md β€” architecture
602
+ βœ… ui-guide.md β€” UI guide
603
+ βœ… user-flows.md β€” user & admin flows
604
+
605
+ πŸ“„ README/index.md β€” documentation index
606
+ ```
607
+
608
+ ## Update Mode
609
+
610
+ When `$ARGUMENTS` contains "update":
611
+ 1. Read existing files in `README/rus/` and `README/eng/`
612
+ 2. Compare with current project state
613
+ 3. Update only sections that have changed
614
+ 4. Preserve any manual additions (sections not in template)
615
+ 5. Commit: `git commit -m "docs: update project documentation"`
616
+
617
+ ## Notes
618
+
619
+ - Documentation is generated from ACTUAL project state, not assumptions
620
+ - Mermaid diagrams are used for architecture and flow visualizations
621
+ - If UI doesn't exist yet, ui-guide.md notes this and describes planned UI
622
+ - If some information is unavailable, the section notes what's missing
623
+ - myinsights/ is checked for gotchas and important notes to include
624
+ ````
625
+
626
+ ---
627
+
628
+ ## 4. Integration Points
629
+
630
+ ### CLAUDE.md Addition
631
+
632
+ Add this section to CLAUDE.md generation:
633
+
634
+ ```markdown
635
+ ## πŸš€ Automation Commands
636
+ - `/go [feature]` β€” auto-select pipeline (/plan, /feature, /feature-ent) and implement
637
+ - `/run` or `/run mvp` β€” bootstrap + implement all MVP features in a loop
638
+ - `/run all` β€” bootstrap + implement ALL features
639
+ - `/docs` β€” generate bilingual documentation (RU/EN) in /README/
640
+ - `/docs update` β€” update existing documentation
641
+ ```
642
+
643
+ ### DEVELOPMENT_GUIDE.md Addition
644
+
645
+ Add to the development workflow section:
646
+
647
+ ```markdown
648
+ ## Autonomous Development
649
+
650
+ ### Single Feature
651
+ ```bash
652
+ /go <feature-name> # Auto-selects pipeline, implements, commits, pushes
653
+ ```
654
+
655
+ ### Full MVP Build
656
+ ```bash
657
+ /run # Bootstrap β†’ implement MVP features β†’ tag v0.1.0-mvp
658
+ /run mvp # Same as above
659
+ ```
660
+
661
+ ### Complete Project Build
662
+ ```bash
663
+ /run all # Bootstrap β†’ implement ALL features β†’ tag v1.0.0
664
+ ```
665
+
666
+ ### Documentation
667
+ ```bash
668
+ /docs # Generate docs in /README/rus/ and /README/eng/
669
+ /docs rus # Russian only
670
+ /docs eng # English only
671
+ /docs update # Update existing docs with current project state
672
+ ```
673
+
674
+ ### Command Hierarchy
675
+ ```
676
+ /run mvp
677
+ └── /start (bootstrap)
678
+ └── LOOP:
679
+ β”œβ”€β”€ /next (find next feature)
680
+ └── /go <feature>
681
+ β”œβ”€β”€ /plan (simple tasks)
682
+ β”œβ”€β”€ /feature (standard features)
683
+ β”œβ”€β”€ /feature-ent (enterprise features) β€” only if DDD toolkit was generated
684
+ └── /feature (complex fallback when /feature-ent not available)
685
+ ```
686
+ ```
687
+
688
+ ### Output Directory Structure Addition
689
+
690
+ ```
691
+ [project-name]-cc-toolkit/
692
+ β”œβ”€β”€ ...
693
+ β”œβ”€β”€ .claude/
694
+ β”‚ β”œβ”€β”€ commands/
695
+ β”‚ β”‚ β”œβ”€β”€ go.md # ⭐ Intelligent pipeline selector β€” P1
696
+ β”‚ β”‚ β”œβ”€β”€ run.md # ⭐ Autonomous build loop β€” P1
697
+ β”‚ β”‚ β”œβ”€β”€ docs.md # ⭐ Bilingual docs generator β€” P1
698
+ β”‚ β”‚ β”œβ”€β”€ start.md # Full project bootstrap β€” MANDATORY P0
699
+ β”‚ β”‚ β”œβ”€β”€ feature.md # Feature lifecycle β€” MANDATORY P0
700
+ β”‚ β”‚ β”œβ”€β”€ myinsights.md # Insight capture β€” MANDATORY P0
701
+ β”‚ β”‚ β”œβ”€β”€ next.md # Feature navigation β€” P1
702
+ β”‚ β”‚ β”œβ”€β”€ plan.md # Implementation planning β€” P1
703
+ β”‚ β”‚ └── ...
704
+ β”œβ”€β”€ README/ # Generated by /docs
705
+ β”‚ β”œβ”€β”€ index.md # TOC with links to both languages
706
+ β”‚ β”œβ”€β”€ rus/ # Russian documentation
707
+ β”‚ β”‚ β”œβ”€β”€ deployment.md
708
+ β”‚ β”‚ β”œβ”€β”€ admin-guide.md
709
+ β”‚ β”‚ β”œβ”€β”€ user-guide.md
710
+ β”‚ β”‚ β”œβ”€β”€ infrastructure.md
711
+ β”‚ β”‚ β”œβ”€β”€ architecture.md
712
+ β”‚ β”‚ β”œβ”€β”€ ui-guide.md
713
+ β”‚ β”‚ └── user-flows.md
714
+ β”‚ └── eng/ # English documentation
715
+ β”‚ β”œβ”€β”€ deployment.md
716
+ β”‚ β”œβ”€β”€ admin-guide.md
717
+ β”‚ β”œβ”€β”€ user-guide.md
718
+ β”‚ β”œβ”€β”€ infrastructure.md
719
+ β”‚ β”œβ”€β”€ architecture.md
720
+ β”‚ β”œβ”€β”€ ui-guide.md
721
+ β”‚ └── user-flows.md
722
+ ```
723
+
724
+ ### Validation Checklist (Automation Commands)
725
+
726
+ - [ ] `.claude/commands/go.md` created with complexity scoring matrix
727
+ - [ ] `.claude/commands/run.md` created with MVP/all scope handling
728
+ - [ ] `.claude/commands/docs.md` created with bilingual generation
729
+ - [ ] CLAUDE.md includes "Automation Commands" section
730
+ - [ ] DEVELOPMENT_GUIDE.md includes command hierarchy diagram
731
+ - [ ] `/go` references `/plan`, `/feature`, `/feature-ent` correctly
732
+ - [ ] `/run` references `/start`, `/next`, `/go` correctly
733
+ - [ ] `/docs` references `docs/`, `myinsights/`, source code as inputs