@dzhechkov/p-replicator
v1.3.0
Published
P-Replicator — Claude Code toolkit for AI-assisted product development (Vibe Coding). Full /replicate pipeline, 10 modular skills (194K+ chars), /harvest knowledge extraction, swarm agents, quality gates, security patterns, cross-project learning.
Maintainers
Readme
@dzhechkov/p-replicator
P-Replicator — Claude Code toolkit for AI-assisted product development (Vibe Coding).
Transform a product idea into a fully documented, validated, toolkit-equipped project ready for development.
Quick Start
# Install into any project
npx @dzhechkov/p-replicator init
# Open Claude Code
claude
# Run the pipeline
/replicate "Online marketplace for handmade crafts with AI-powered recommendations"The system walks you through 4-5 phases with interactive checkpoints. At each checkpoint you review the output and confirm before proceeding. Estimated time: 45-90 minutes for the full pipeline.
What Gets Installed
| Component | Count | Description |
|-----------|-------|-------------|
| Skills | 10 | 90+ files (~200K chars). Modular architecture: foundation → composite → master orchestrator |
| Commands | 2 | /replicate (full pipeline), /harvest (knowledge extraction) |
| Agents | 4 | replicate-coordinator, product-discoverer, doc-validator, harvest-coordinator |
| Rules | 2 | replicate-pipeline (phase constraints), skill-interface-protocol (composition standard) |
After running /replicate, the toolkit generates additional commands, agents, rules, and skills specific to your project (see Post-Pipeline Commands).
Skills Reference
| Skill | Purpose |
|-------|---------|
| explore | Socratic task clarification |
| sparc-prd-mini | SPARC documentation generator (11 docs) |
| goap-research-ed25519 | Verified research with Ed25519 anti-hallucination |
| problem-solver-enhanced | First principles + TRIZ (9 modules) |
| requirements-validator | INVEST/SMART validation + BDD scenarios |
| brutal-honesty-review | Unvarnished technical criticism |
| cc-toolkit-generator-enhanced | Modular toolkit generator (9 modules, ~165K chars) + cross-project learning |
| reverse-engineering-unicorn | Company reverse engineering + playbook |
| pipeline-forge | Meta-skill: build AI pipelines from patterns |
| knowledge-extractor | Extract reusable knowledge from projects |
Skill Architecture
Skills use a composable module system with three tiers:
- Foundation (explore, problem-solver, goap-research, brutal-honesty-review) — self-contained, no dependencies
- Composite (sparc-prd-mini, requirements-validator, knowledge-extractor) — compose foundation skills via
view() - Master Orchestrator (cc-toolkit-generator-enhanced) — 9 modular phases with quality gates
The cc-toolkit-generator-enhanced skill is the largest component (~165K chars) split into modules:
| Module | Purpose | |--------|---------| | 01-detect-parse | Document detection → Internal Project Model (IPM) | | 02-analyze-map | Instrument mapping + scoring engine | | 03-generate-p0 | P0 mandatory instruments (CLAUDE.md, /start, etc.) | | 04-generate-p1 | P1 recommended + enterprise lifecycle | | 05-generate-p2p3 | P2 optional + MCP + fitness functions | | 06-package-deliver | Master validation checklist (710 lines) | | 07-harvest-feedback | Post-project learning loop | | 08-skill-composition | Dependency graph + path rewriting | | 09-cross-project-learning | Pattern reuse via maturity model |
CLI Commands
npx @dzhechkov/p-replicator init # Install (default)
npx @dzhechkov/p-replicator update # Update to latest version
npx @dzhechkov/p-replicator remove # Remove from project
npx @dzhechkov/p-replicator list # List installed components
npx @dzhechkov/p-replicator doctor # Health checkOptions
--force Overwrite existing files without prompting
--dry-run Show what would be done without making changes
--help Show help message
--version Show version numberThe /replicate Pipeline
After installation, run /replicate "idea" in Claude Code to execute:
Phase 0 (optional) → Phase 1 → Phase 2 → Phase 3 → Phase 4
Product Discovery Planning Validation Toolkit FinalizePhase 0: Product Discovery (Optional)
Activates automatically for SaaS, startups, and new products. Skipped for internal tools and utilities.
- Reverse engineers similar companies and products
- Identifies target customer segments (Jobs-To-Be-Done)
- Analyzes competitive landscape (Blue Ocean Canvas)
- Maps unit economics and monetization
- Produces a Product Discovery Brief used by Phase 1
Phase 1: Planning
Generates 11 SPARC documents in docs/:
| Document | Content |
|----------|---------|
| PRD.md | Product Requirements — vision, personas, user stories |
| Solution_Strategy.md | Problem analysis and solution approach |
| Specification.md | Detailed requirements with acceptance criteria |
| Pseudocode.md | Algorithms and data flow |
| Architecture.md | System design and component diagrams |
| Refinement.md | Edge cases, testing strategy |
| Completion.md | Deployment, CI/CD, monitoring |
| Research_Findings.md | Market and technology research |
| Final_Summary.md | Executive summary |
| C4_Diagrams.md | System context, container, and component diagrams |
| ADR.md | Architecture Decision Records |
Phase 2: Validation
Validates documentation quality using 5 parallel agents (swarm):
| Agent | Validates | |-------|----------| | Stories Validator | User stories against INVEST criteria | | AC Validator | Acceptance criteria against SMART criteria | | Architecture Validator | Architecture consistency and completeness | | Pseudocode Validator | Algorithm correctness and edge cases | | Coherence Validator | Cross-document consistency |
Scoring: Score >= 70 passes (READY), 50-69 passes with caveats, <50 requires fixes (auto-retries up to 3 times).
Output: docs/validation-report.md and docs/test-scenarios.md (BDD/Gherkin).
Phase 3: Toolkit Generation
Creates Claude Code instruments for your project:
| Category | Generated |
|----------|-----------|
| Commands | /start, /feature, /plan, /next, /deploy, /myinsights, /go, /run, /docs |
| Agents | planner, code-reviewer, architect |
| Rules | git-workflow, feature-lifecycle, security, coding-style, insights-capture |
| Skills | project-context, coding-standards, testing-patterns, feature-navigator |
| Hooks | SessionStart (feature context), Stop (auto-commit) |
| Project files | CLAUDE.md, DEVELOPMENT_GUIDE.md, README.md |
Conditional generation (automatically detected):
- DDD patterns found →
/feature-ent, enterprise lifecycle - External APIs detected → security rules, secrets management
- Fitness functions defined → fitness validation rules
Phase 4: Finalization
Creates infrastructure scaffolding (docker-compose.yml, Dockerfile, .gitignore) and commits everything with structured git history.
Checkpoint Interaction
After each phase, you see a checkpoint prompt and can respond:
| Command | Action |
|---------|--------|
| ok | Proceed to next phase |
| add [detail] | Add information to current phase output |
| fix [issue] | Fix something in current output |
| redo | Redo the current phase |
| skip | Skip the current phase (not recommended for Phase 2) |
Post-Pipeline Commands
After /replicate completes, the following commands become available:
/start — Bootstrap the Project
Reads SPARC documentation and creates the initial project structure: source code directories, database schemas, API stubs, and configuration files.
/feature — Full Feature Lifecycle
/feature user-authentication4-phase lifecycle: PLAN (SPARC docs) → VALIDATE (swarm, score >= 70) → IMPLEMENT (parallel agents) → REVIEW (code review swarm).
/plan — Lightweight Planning
/plan add-payment-gatewayCreates a single plan file in docs/plans/. Good for smaller tasks (2-5 min vs. 15-30 min for /feature).
/go — Smart Pipeline Selector
/go user-authenticationAutomatically analyzes task complexity and selects /plan, /feature, or /feature-ent.
/run — Autonomous Build Loop
/run # Build next features (MVP scope)
/run all # Build all planned featuresContinuously implements features from the roadmap until complete.
/next — What to Do Next
Shows current sprint progress, features in progress, suggested next tasks, blockers and dependencies.
/deploy — Deployment
/deploy staging
/deploy productionGuides the deployment process to the specified environment.
/myinsights — Development Insights
Captures errors, workarounds, and discoveries into the knowledge base. Error-first lookup: when you hit an error, the system checks if a solution already exists.
/docs — Generate Documentation
/docs # Both Russian and English
/docs eng # English only
/docs update # Update existing docsGenerates bilingual documentation in README/ directory.
Feature Development Workflows
Simple Task
/plan task-name → Creates plan in docs/plans/
implement manually → Write code following the plan
/myinsights → Capture any learningsStandard Feature
/feature feature-name → Runs 4-phase lifecycle
/next → Check what's nextSmart Mode
/go feature-name → Auto-selects /plan or /feature or /feature-entAutonomous Build
/run → Builds all "next" features from roadmapFeature Roadmap
The system maintains .claude/feature-roadmap.json with statuses: done, in_progress, next, planned, blocked. Use /next to navigate.
The /harvest Pipeline
Extract reusable knowledge from completed projects:
/harvest quick # Fast extraction, no checkpoints (~15 min)
/harvest full # Comprehensive 4-phase pipeline with checkpoints (~45 min)
/harvest marker # Mark artifact for later extraction (~30 sec)How /harvest full Works
Phase 1: AGENT REVIEW → 5 parallel scanners
Phase 2: CLASSIFY → Categorize into skills/commands/rules/etc.
Phase 3: DECONTEXTUALIZE → Remove project-specific names, generalize
Phase 4: INTEGRATE → Write to toolkit, update indexHarvest Audit
/harvest auditReviews toolkit maturity distribution, recommendations for promotion, and gaps in coverage.
Tips & Best Practices
Write descriptive product ideas — the more detail you provide to
/replicate, the better the documentation quality.Use checkpoints actively — review output at each phase, don't just skip through. Check that user stories match your vision and architecture aligns with constraints.
Start with /plan for small tasks — not every task needs
/feature. For tasks touching <= 3 files,/planis faster and sufficient.Use /go for automatic selection — let the system decide between
/plan,/feature, and/feature-entbased on complexity.Harvest knowledge regularly — use
/harvest markerduring development, run/harvest quickat the end of each sprint.Use /next for focus — start each session with
/nextto understand current state, blockers, and priorities.Check insights before debugging — the
SessionStarthook automatically injects relevant insights from previous sessions.Review generated CLAUDE.md — it's Claude Code's primary context. Ensure architecture, commands, and coding standards are accurate.
Iterate on validation — if Phase 2 returns CAVEATS, fix documentation before proceeding. Toolkit quality depends on documentation quality.
Integration with @dzhechkov/keysarium
Works alongside Keysarium. If @dzhechkov/keysarium is detected during init, PU skills integrate with the existing Keysarium setup, sharing .claude/commands, .claude/rules, and .claude/agents directories.
npx @dzhechkov/keysarium init # Install Keysarium
npx @dzhechkov/p-replicator init # Add PU Unicorn skills
# Both work together seamlesslyLicense
MIT
