@dzhechkov/p-replicator 1.3.0 → 1.5.3

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 (35) hide show
  1. package/README.md +1097 -160
  2. package/bin/cli.js +0 -0
  3. package/package.json +7 -2
  4. package/src/cli.js +23 -6
  5. package/src/commands/doctor.js +46 -29
  6. package/src/commands/init.js +61 -8
  7. package/src/commands/list.js +5 -26
  8. package/src/commands/update.js +73 -7
  9. package/src/commands/verify.js +111 -0
  10. package/src/utils.js +275 -4
  11. package/templates/.claude/commands/deploy.md +100 -0
  12. package/templates/.claude/commands/docs.md +79 -0
  13. package/templates/.claude/commands/feature.md +134 -0
  14. package/templates/.claude/commands/go.md +115 -0
  15. package/templates/.claude/commands/myinsights.md +72 -0
  16. package/templates/.claude/commands/next.md +110 -0
  17. package/templates/.claude/commands/plan.md +88 -0
  18. package/templates/.claude/commands/replicate.md +103 -17
  19. package/templates/.claude/commands/run.md +151 -0
  20. package/templates/.claude/commands/start.md +88 -0
  21. package/templates/.claude/hooks/autocommit-insights.cjs +39 -0
  22. package/templates/.claude/hooks/autocommit-plans.cjs +39 -0
  23. package/templates/.claude/hooks/autocommit-roadmap.cjs +44 -0
  24. package/templates/.claude/hooks/session-insights.cjs +28 -0
  25. package/templates/.claude/hooks/state-update.cjs +79 -0
  26. package/templates/.claude/hooks/statusline.cjs +399 -0
  27. package/templates/.claude/rules/feature-lifecycle.md +145 -0
  28. package/templates/.claude/rules/git-workflow.md +74 -0
  29. package/templates/.claude/rules/insights-capture.md +77 -0
  30. package/templates/.claude/rules/replicate-pipeline.md +92 -19
  31. package/templates/.claude/settings.json +44 -0
  32. package/templates/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +0 -0
  33. package/templates/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +0 -0
  34. package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +0 -0
  35. package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +0 -0
@@ -0,0 +1,115 @@
1
+ ---
2
+ description: Intelligent feature implementation router. Scores complexity and dispatches to /plan (simple), /feature (standard), or /feature-ent (complex + enterprise, only if available). Executes autonomously without per-phase confirmations. Supports `--feature-branches` for per-feature git branch workflow (teaching/demo).
3
+ argument-hint: '[feature-name | feature-id | description] [--feature-branches] [--auto-merge]'
4
+ ---
5
+
6
+ # /go $ARGUMENTS
7
+
8
+ ## Purpose
9
+
10
+ One-command feature implementation that picks the right pipeline by scoring
11
+ complexity, then runs it without interactive checkpoints.
12
+
13
+ ## Step 1: Determine Target Feature
14
+
15
+ ```
16
+ IF $ARGUMENTS provided:
17
+ Parse as feature-name | roadmap-id | free-form description
18
+ Look up in .claude/feature-roadmap.json if it matches an id
19
+ ELSE:
20
+ Run /next logic — pick highest-priority `next`/`planned` feature
21
+ Confirm selection before proceeding
22
+ ```
23
+
24
+ ## Step 2: Detect Available Pipelines
25
+
26
+ ```
27
+ ✅ /plan — always available
28
+ ✅ /feature — always available
29
+ ⚠️ /feature-ent — ONLY if .claude/commands/feature-ent.md exists
30
+ (generated by idea2prd-manual pipeline with DDD docs)
31
+
32
+ CHECK: feature_ent_available = fileExists(".claude/commands/feature-ent.md")
33
+ ```
34
+
35
+ ## Step 3: Score Complexity
36
+
37
+ | Signal | Score |
38
+ |--------|-------|
39
+ | Touches ≤ 3 files | -2 |
40
+ | Touches 4-10 files | 0 |
41
+ | Touches > 10 files | +3 |
42
+ | External API integration | +2 |
43
+ | New database entities | +2 |
44
+ | Cross-bounded-context dependencies | +3 |
45
+ | Hotfix or minor improvement | -3 |
46
+ | DDD docs in `docs/ddd/` exist | +1 |
47
+ | Gherkin scenarios for this feature | +1 |
48
+ | Estimated < 30 min | -2 |
49
+ | Estimated > 2 hours | +3 |
50
+
51
+ ## Step 4: Decision Matrix
52
+
53
+ | Total Score | Pipeline | Rationale |
54
+ |-------------|----------|-----------|
55
+ | ≤ -2 | `/plan` | Simple, lightweight plan suffices |
56
+ | -1 to +4 | `/feature` | Standard SPARC-mini lifecycle |
57
+ | ≥ +5 AND `feature_ent_available` | `/feature-ent` | Complex enterprise with DDD/ADR/C4 |
58
+ | ≥ +5 AND NOT `feature_ent_available` | `/feature` (fallback) | Use `/feature` with extra architecture care |
59
+
60
+ ## Step 5: Execute
61
+
62
+ ### `/plan` selected
63
+ 1. `/plan <feature-name>` → creates `docs/plans/<feature>.md`
64
+ 2. Implement plan immediately (parallel Tasks where independent)
65
+ 3. Run tests, commit + push
66
+
67
+ ### `/feature` selected
68
+ 1. `/feature <feature-name>` in AUTO mode (no inter-phase confirmations)
69
+ 2. Spawn parallel Tasks where work is independent
70
+ 3. Commit after each phase, push at end
71
+
72
+ ### `/feature-ent` selected (if available)
73
+ Same as `/feature` but with idea2prd-manual + DDD coherence + ADR consistency
74
+ + 7-agent validation + 6-agent review.
75
+
76
+ ## Step 6: Post-Implementation
77
+
78
+ 1. Update roadmap: feature `status: done`, `files: [actually-touched]`
79
+ 2. Commit: `docs(roadmap): mark <feature> as done`
80
+ 3. Push, report
81
+
82
+ ## Flag: `--feature-branches` (v1.5.0)
83
+
84
+ Wrap the chosen pipeline (`/plan` or `/feature`) in a per-feature git branch.
85
+
86
+ ### Workflow when `--feature-branches` is passed
87
+
88
+ ```
89
+ 1. Verify on `main` (else fail with hint)
90
+ 2. If working tree dirty:
91
+ git stash push -u -m "auto-stash before /go feature-branches"
92
+ 3. Read roadmap entry for target feature; assign `number` if absent
93
+ 4. git checkout -b feature/{NNN}-{id} # NNN = zero-padded 3-digit
94
+ 5. Run selected pipeline (/plan | /feature | /feature-ent) inside this branch
95
+ 6. git push origin feature/{NNN}-{id} --set-upstream
96
+ 7. Update roadmap: status=done, branch="feature/{NNN}-{id}"
97
+ 8. git checkout main
98
+ 9. If --auto-merge: git merge --no-ff feature/{NNN}-{id}
99
+ ```
100
+
101
+ Branch format: `feature/{NNN}-{id}` (e.g., `feature/001-auth-jwt`).
102
+
103
+ ### Companion flag: `--auto-merge`
104
+
105
+ Off by default. When passed: feature branch is merged into `main` after
106
+ completion via `git merge --no-ff`. Without it: branch is pushed but stays
107
+ unmerged for instructor/reviewer to handle.
108
+
109
+ See `/run.md` for full per-feature-branch workflow rationale and use cases.
110
+
111
+ ## Related
112
+
113
+ - `/next` — picks the feature when `$ARGUMENTS` empty
114
+ - `/plan`, `/feature` — implementation pipelines
115
+ - `/run` — autonomous loop that calls `/go` per feature (also accepts `--feature-branches`)
@@ -0,0 +1,72 @@
1
+ ---
2
+ description: Capture and recall development insights. Append a new insight to `.claude/insights/index.md` with structured fields (problem, solution, tags). Auto-injected into context on SessionStart for relevant tasks.
3
+ argument-hint: '[recall <query> | <free-form insight>]'
4
+ ---
5
+
6
+ # /myinsights $ARGUMENTS
7
+
8
+ ## Purpose
9
+
10
+ Build a project-local knowledge base of "грабли" (rakes) — errors, workarounds,
11
+ discoveries — so they don't have to be re-learned. Insights are auto-loaded
12
+ into Claude Code context on each session start (via `SessionStart` hook in
13
+ `.claude/settings.json`) when their tags match the current task.
14
+
15
+ ## Modes
16
+
17
+ ### Capture (default)
18
+
19
+ Run `/myinsights` with a free-form description, or no arguments to be prompted.
20
+
21
+ Process:
22
+ 1. Ask 3 short questions (or extract from `$ARGUMENTS`):
23
+ - **Problem** — what went wrong / surprised you
24
+ - **Solution** — what fixed it
25
+ - **Tags** — keywords for future recall
26
+ 2. Append entry to `.claude/insights/index.md`:
27
+
28
+ ```markdown
29
+ ## <ISO date> — <short title>
30
+
31
+ **Tags:** <comma-separated>
32
+
33
+ **Problem:**
34
+ <1-3 sentences>
35
+
36
+ **Solution:**
37
+ <1-5 sentences with code if relevant>
38
+
39
+ **References:** <file:line | commit hash>
40
+
41
+ ---
42
+ ```
43
+
44
+ 3. Auto-commit (Stop hook handles this if `.claude/settings.json` is in place).
45
+
46
+ ### Recall
47
+
48
+ `/myinsights recall <query>`:
49
+
50
+ 1. Read `.claude/insights/index.md`
51
+ 2. Filter entries whose tags or text match `<query>` (case-insensitive)
52
+ 3. Print top 5 matches with relevance score
53
+
54
+ ## Storage
55
+
56
+ `.claude/insights/index.md` — chronological log, Markdown format. One file per
57
+ project to keep recall trivial.
58
+
59
+ ## Auto-injection on SessionStart
60
+
61
+ The default `.claude/settings.json` configures `node .claude/hooks/session-insights.cjs`
62
+ which: (1) reads recent insights, (2) prints them to stdout, (3) Claude Code
63
+ captures stdout and injects into the initial context.
64
+
65
+ This is what makes insights compounding: every session benefits from past
66
+ mistakes without manual recall.
67
+
68
+ ## Related
69
+
70
+ - `.claude/rules/insights-capture.md` — when/how to capture
71
+ - `.claude/hooks/session-insights.cjs` — session injection
72
+ - `/harvest` — extracts reusable patterns from insights at project end
@@ -0,0 +1,110 @@
1
+ ---
2
+ description: Determine the next feature to work on. Reads `.claude/feature-roadmap.json`, applies priority + status filters, and returns the top entry. Subcommands: default (show top 3), `update` (scan codebase + suggest status changes), `<feature-id>` (mark a specific feature done and cascade unblock).
3
+ argument-hint: '[update | <feature-id>]'
4
+ ---
5
+
6
+ # /next $ARGUMENTS
7
+
8
+ ## Purpose
9
+
10
+ Single source of "what to work on next" backed by `.claude/feature-roadmap.json`.
11
+ Used by `/run` for autonomous loops and by humans to navigate sprint state.
12
+
13
+ ## Modes
14
+
15
+ ### Default (no arguments)
16
+
17
+ 1. Read `.claude/feature-roadmap.json`
18
+ 2. Filter entries to `status ∈ {next, planned}`
19
+ 3. Sort by priority (`mvp` > `high` > `medium` > `low`), then by `id`
20
+ 4. Output top 3 entries with: id, name, priority, complexity hint, blockers
21
+
22
+ ```
23
+ ═══════════════════════════════════════════════════════════════
24
+ Next 3 features:
25
+ 1. [mvp] auth-jwt — User login with JWT tokens (medium, 2-4h)
26
+ 2. [mvp] user-profile — Profile CRUD endpoints (simple, 1-2h)
27
+ 3. [high] payment-webhook — Stripe webhook handler (complex, 4-6h)
28
+
29
+ In progress: <id> [<name>]
30
+ Done: <N> / <total>
31
+ Blocked: <count> (run /next blocked to see)
32
+ ═══════════════════════════════════════════════════════════════
33
+ ```
34
+
35
+ ### `/next update`
36
+
37
+ 1. Scan codebase for evidence of feature completion (e.g., file paths in
38
+ roadmap entry's `expected_files` exist + tests pass)
39
+ 2. Suggest status updates for each detected feature:
40
+ - `planned` → `next` if dependencies met
41
+ - `in_progress` → `done` if implementation + tests present
42
+ - `next` → `blocked` if dependency entry is `blocked`
43
+ 3. Print proposed diff, ask for confirmation
44
+ 4. Apply, commit `docs(roadmap): update statuses`
45
+
46
+ ### `/next <feature-id>`
47
+
48
+ 1. Mark that feature `done` in roadmap
49
+ 2. Cascade: any feature that listed `<feature-id>` as a blocker is unblocked
50
+ (status `blocked` → `next`)
51
+ 3. Update `last_completed` field
52
+ 4. Commit roadmap, return next item to work on
53
+
54
+ ## Roadmap Schema
55
+
56
+ `.claude/feature-roadmap.json`:
57
+
58
+ ```json
59
+ {
60
+ "version": "1.0",
61
+ "features": [
62
+ {
63
+ "id": "auth-jwt",
64
+ "number": 1,
65
+ "branch": "feature/001-auth-jwt",
66
+ "name": "JWT-based authentication",
67
+ "priority": "mvp",
68
+ "status": "next",
69
+ "complexity": "medium",
70
+ "estimated_hours": "2-4",
71
+ "blockers": [],
72
+ "expected_files": [
73
+ "packages/backend/src/auth/jwt.ts",
74
+ "packages/backend/src/auth/middleware.ts"
75
+ ],
76
+ "depends_on": []
77
+ }
78
+ ]
79
+ }
80
+ ```
81
+
82
+ ### Schema fields (post v1.5.0)
83
+
84
+ | Field | Required | Populated by | Purpose |
85
+ |-------|----------|--------------|---------|
86
+ | `id` | yes | initial roadmap generation | Stable kebab-case slug |
87
+ | `number` | optional | `--feature-branches` flag in `/run` or `/go` | Sequential 1, 2, 3 ... assigned on first encounter; used to compose branch name |
88
+ | `branch` | optional | `--feature-branches` flag after feature completes | `feature/{NNN}-{id}` actually pushed |
89
+ | `name` | recommended | initial generation | Human-readable title |
90
+ | `priority` | yes | initial generation | `mvp` \| `high` \| `medium` \| `low` |
91
+ | `status` | yes | lifecycle | `planned` \| `next` \| `in_progress` \| `done` \| `blocked` |
92
+ | `complexity` | optional | initial generation | `simple` \| `medium` \| `complex` |
93
+ | `estimated_hours` | optional | initial generation | Time hint |
94
+ | `blockers` | optional | manual | List of blocking issue IDs |
95
+ | `expected_files` | optional | initial generation | Used by `/next update` to detect completion |
96
+ | `depends_on` | optional | initial generation | Other feature IDs that must complete first |
97
+
98
+ ## Auto-Generation
99
+
100
+ If `.claude/feature-roadmap.json` does not exist when `/next` is called:
101
+ 1. Read `docs/PRD.md` and extract user stories
102
+ 2. Generate initial roadmap with all stories as `planned`
103
+ 3. Set MVP scope from PRD's "MVP" section
104
+ 4. Commit `docs(roadmap): initial roadmap from PRD`
105
+
106
+ ## Related
107
+
108
+ - `/run mvp` — automated loop over MVP-scoped roadmap entries
109
+ - `/go <id>` — work on a specific feature (called by /run)
110
+ - `docs/PRD.md` — source for initial roadmap generation
@@ -0,0 +1,88 @@
1
+ ---
2
+ description: Lightweight implementation planning. Creates a single plan file in `docs/plans/<feature>.md` with sections (Goal, Tasks, Files, Dependencies, Risks). Faster alternative to `/feature` for tasks touching ≤ 3 files.
3
+ argument-hint: '<feature-name | task-description>'
4
+ ---
5
+
6
+ # /plan $ARGUMENTS
7
+
8
+ ## Purpose
9
+
10
+ Generate a focused implementation plan for a small task without running the
11
+ full SPARC-mini lifecycle. Plans live in `docs/plans/` and are auto-committed.
12
+
13
+ ## When to use /plan vs /feature
14
+
15
+ | Use `/plan` | Use `/feature` |
16
+ |-------------|----------------|
17
+ | ≤ 3 files | ≥ 4 files |
18
+ | < 30 min implementation | > 1 hour |
19
+ | No new architecture | New layer/pattern |
20
+ | Bug fix or small improvement | New capability |
21
+
22
+ If unsure, run `/go <name>` — it scores complexity and routes correctly.
23
+
24
+ ## Process
25
+
26
+ ### 1. Clarify (if ambiguous)
27
+
28
+ Read `$ARGUMENTS`. If task is too vague, ask 1-3 targeted questions before
29
+ proceeding.
30
+
31
+ ### 2. Read Context
32
+
33
+ - `docs/Architecture.md` — relevant subsystems
34
+ - `docs/Specification.md` — requirements that touch this task
35
+ - Source files matching the task scope (use Grep to locate)
36
+
37
+ ### 3. Write Plan
38
+
39
+ Create `docs/plans/<slug>.md` with:
40
+
41
+ ```markdown
42
+ # Plan: <feature-name>
43
+
44
+ **Status:** draft
45
+ **Created:** <ISO timestamp>
46
+ **Estimated:** <time>
47
+
48
+ ## Goal
49
+ <1-2 sentence outcome statement>
50
+
51
+ ## Tasks
52
+ - [ ] Task 1 — concrete, verifiable
53
+ - [ ] Task 2
54
+
55
+ ## Files Touched
56
+ | File | Change | Reason |
57
+ |------|--------|--------|
58
+
59
+ ## Dependencies
60
+ - Blocks: <feature-id>
61
+ - Blocked by: <feature-id>
62
+
63
+ ## Risks
64
+ - <risk> — <mitigation>
65
+
66
+ ## Verification
67
+ How to confirm done.
68
+ ```
69
+
70
+ ### 4. Auto-Commit
71
+
72
+ If `Stop` hook is configured (default in v1.4+), the plan auto-commits when
73
+ the response ends. Otherwise: `git add docs/plans/<slug>.md && git commit
74
+ -m "docs(plan): <feature-name>"`.
75
+
76
+ ### 5. Report
77
+
78
+ ```
79
+ ✅ Plan saved: docs/plans/<slug>.md
80
+ Tasks: <N>, Files: <count>
81
+ Next: implement directly, or run /go <slug> for autonomous execution
82
+ ```
83
+
84
+ ## Related
85
+
86
+ - `/feature` — full SPARC-mini lifecycle (heavier)
87
+ - `/go` — auto-pick between /plan and /feature
88
+ - `docs/plans/` — directory of all plans
@@ -56,6 +56,88 @@ INPUT → [PRODUCT DISCOVERY] → PLANNING → VALIDATION → TOOLKIT → FINALI
56
56
  **Note:** sparc-prd-mini v2 already includes Explore, Research, and Solve phases
57
57
  internally via skill references. The coordinator does NOT duplicate these phases.
58
58
 
59
+ ## Alternative entry: starting from existing technical documentation
60
+
61
+ If the user already has technical documentation for the project (tech spec,
62
+ architecture docs, API spec, design docs, etc.), the pipeline supports
63
+ **skipping Phase 0 entirely** and feeding the user's existing docs into
64
+ Phase 1 as pre-filled context.
65
+
66
+ ### Trigger detection (any of these in user input)
67
+
68
+ Switch to this alternative flow when the user input contains:
69
+ - A path reference: "use my docs in `docs/existing/`", "my tech specs are in `<path>`"
70
+ - An explicit skip request: "skip discovery", "skip Phase 0"
71
+ - A statement of available docs: "I already have technical documentation"
72
+ - The semantic flag: `/replicate --from-docs <path>` (or `--skip-discovery`)
73
+
74
+ ### Recommended setup
75
+
76
+ The user should place their existing docs in a project-local subfolder
77
+ (conventionally `docs/existing/` or `docs/source/`) so they're discoverable
78
+ but distinct from generated SPARC outputs.
79
+
80
+ ### Modified pipeline flow when triggered
81
+
82
+ - **Phase 0** (Product Discovery): SKIPPED entirely (no reverse-engineering-unicorn invocation)
83
+ - **Phase 1** (sparc-prd-mini): MODIFIED
84
+ - Run in **AUTO mode** — do NOT ask interactive clarification questions
85
+ - SKIP internal sub-phases Explore / Research / Solve (their job is to
86
+ generate the answers that already exist in user docs)
87
+ - READ all files in user-provided path as pre-filled context
88
+ - Generate the 11 standardized SPARC documents in `docs/`, mapping content
89
+ from existing docs to appropriate slots (PRD, Solution_Strategy,
90
+ Specification, Pseudocode, Architecture, Refinement, Completion,
91
+ Research_Findings, Final_Summary, C4_Diagrams, ADR)
92
+ - For SPARC slots without source content in existing docs, mark with a
93
+ `[GAP: needs <description>]` placeholder rather than asking the user
94
+ - **Phase 2** (validation): runs UNCHANGED (validates the generated SPARC docs)
95
+ - **Phase 3** (toolkit generation): runs UNCHANGED
96
+ - **Phase 4** (finalize): runs UNCHANGED
97
+
98
+ ### Three sub-paths the user may prefer
99
+
100
+ | Sub-path | When | Skills invoked |
101
+ |---|---|---|
102
+ | **A. Full /replicate with override directives** | Have tech docs, want full pipeline + toolkit + scaffold | sparc-prd-mini (AUTO) → requirements-validator → cc-toolkit-generator-enhanced |
103
+ | **B. Invoke sparc-prd-mini skill directly** | Want only the 11 SPARC docs, no toolkit/scaffold | sparc-prd-mini (AUTO) only |
104
+ | **C. Rename existing docs to SPARC slot names + invoke validator only** | Existing docs already SPARC-shaped | requirements-validator only |
105
+
106
+ ### Caveats (always surface to the user)
107
+
108
+ - Existing docs may not cover all 11 SPARC slots — expect `[GAP: ...]` markers
109
+ - Validation may flag user stories as "not negotiable/testable" if existing
110
+ docs aren't INVEST/SMART-shaped — this is a real signal, not a bug
111
+ - Architectural constraints (pattern, containers, infra, deploy, AI integration)
112
+ must be passed explicitly if not present in existing docs (use the constraints
113
+ block from "Phase 1: PLANNING" below)
114
+
115
+ ### Verification after completion
116
+
117
+ ```bash
118
+ npx @dzhechkov/p-replicator verify
119
+ ```
120
+ Should report pre-shipped contract OK + post-/replicate hints showing the
121
+ generated SPARC docs and (if Phase 3+4 ran) the project-specific artifacts.
122
+
123
+ ### See also: existing-project feature workflow (Mode 2)
124
+
125
+ If the user already has a working project (stack, PRD, CLAUDE.md, etc. all
126
+ defined) and just wants to **add new features** with the same SPARC-mini
127
+ validation cycle — they should use `/feature` (NOT `/replicate`):
128
+
129
+ ```bash
130
+ cd existing-project
131
+ npx @dzhechkov/p-replicator init # idempotent — preserves CLAUDE.md
132
+ claude
133
+ /feature add-stripe-payments # 4-phase: PLAN → VALIDATE → IMPLEMENT → REVIEW
134
+ ```
135
+
136
+ See `.claude/commands/feature.md` ("Use case: existing project") and
137
+ `.claude/rules/feature-lifecycle.md` ("Entry modes" → "Mode 2") for the full
138
+ spec. This Mode 2 workflow is parallel to /replicate's "Alternative entry"
139
+ above, but applies to ad-hoc feature additions rather than full project bootstrap.
140
+
59
141
  ## Execution
60
142
 
61
143
  ### Start
@@ -71,6 +153,7 @@ internally via skill references. The coordinator does NOT duplicate these phases
71
153
  - New product / startup / SaaS → **activate**
72
154
  - Competitors to analyze → **activate**
73
155
  - Internal tool / experiment → **skip**
156
+ - **Existing technical documentation provided** → **skip** (see "Alternative entry" below)
74
157
 
75
158
  Read the skill: `.claude/skills/reverse-engineering-unicorn/SKILL.md`
76
159
 
@@ -216,13 +299,16 @@ Read the skill: `.claude/skills/cc-toolkit-generator-enhanced/SKILL.md`
216
299
 
217
300
  **Goal:** Generate project-specific Claude Code instruments IN-PLACE.
218
301
 
219
- **IMPORTANT (Claude Code adaptation):**
302
+ **IMPORTANT (Claude Code adaptation, post v1.4):**
220
303
  - Scan `docs/` directory for SPARC documents (NOT `/mnt/user-data/uploads/`)
221
304
  - Generate files IN-PLACE into the project (NOT into output directory)
222
- - Lifecycle skills already exist in `.claude/skills/` — do NOT copy
223
- - Generic commands (`/feature`, `/myinsights`) already exist — do NOT overwrite
224
- - Generic rules (`feature-lifecycle`, `insights-capture`, `git-workflow`) already exist do NOT overwrite
225
- - `settings.json` already exists with hooks do NOT overwrite
305
+ - **Pre-shipped by `npx p-replicator init` — do NOT overwrite or regenerate:**
306
+ - All 10 skills in `.claude/skills/`
307
+ - All 11 commands: `/replicate`, `/harvest`, `/start`, `/plan`, `/feature`, `/go`, `/run`, `/next`, `/myinsights`, `/docs`, `/deploy`
308
+ - All 5 rules: `replicate-pipeline`, `skill-interface-protocol`, `git-workflow`, `insights-capture`, `feature-lifecycle`
309
+ - All 4 pipeline agents: `replicate-coordinator`, `product-discoverer`, `doc-validator`, `harvest-coordinator`
310
+ - `.claude/settings.json` + cross-platform Node hook scripts in `.claude/hooks/`
311
+ - Phase 3 generates ONLY project-specific artifacts derived from SPARC docs (see below).
226
312
 
227
313
  **Generate these project-specific files:**
228
314
 
@@ -231,39 +317,39 @@ Read the skill: `.claude/skills/cc-toolkit-generator-enhanced/SKILL.md`
231
317
  - Architecture from Architecture.md
232
318
  - Tech stack decisions
233
319
  - Parallel execution strategy
234
- - Swarm agents section
235
- - Available agents/skills/commands list
320
+ - Available agents/skills/commands list (reference pre-shipped + project-generated)
236
321
  - Development insights section
237
322
  - Feature lifecycle section
238
323
 
239
- **2. Commands (`.claude/commands/`):**
240
- - `start.md` — project bootstrap (uses /start template from cc-toolkit skill)
241
- - `plan.md` — implementation planning
242
- - `test.md` — test generation/execution
243
- - `deploy.md` — deployment workflow
244
-
245
- **3. Agents (`.claude/agents/`):**
324
+ **2. Project-specific Agents (`.claude/agents/`):**
246
325
  - `planner.md` — feature planning with algorithm templates from Pseudocode.md
247
326
  - `code-reviewer.md` — quality review with edge cases from Refinement.md
248
327
  - `architect.md` — system design from Architecture.md + Solution_Strategy.md
249
328
  - Additional agents based on project characteristics
250
329
 
251
- **4. Project-specific Rules (`.claude/rules/`):**
330
+ **3. Project-specific Rules (`.claude/rules/`):**
252
331
  - `security.md` — from Specification.md NFRs
253
332
  - `coding-style.md` — from Architecture.md tech stack
254
333
  - `secrets-management.md` — IF external APIs detected
255
334
  - `testing.md` — from Refinement.md test strategy
256
335
 
257
- **5. Project-specific Skills (`.claude/skills/`):**
336
+ **4. Project-specific Skills (`.claude/skills/`):**
258
337
  - `project-context/` — domain knowledge from Research_Findings.md
259
338
  - `coding-standards/` — tech-specific patterns from Architecture.md
260
339
  - `security-patterns/` — IF external APIs (encrypted storage pattern)
261
340
 
262
- **6. Additional files:**
341
+ **5. Project state:**
342
+ - `.claude/feature-roadmap.json` — generated from PRD.md MVP scope
263
343
  - `.mcp.json` — IF external integrations
264
344
  - `DEVELOPMENT_GUIDE.md` — step-by-step development lifecycle
265
345
  - `README.md` — enhanced with project info
266
346
 
347
+ **6. Conditional command (only if DDD docs present):**
348
+ - `.claude/commands/feature-ent.md` — enterprise feature lifecycle with DDD/ADR/C4
349
+
350
+ **Verify after Phase 3:**
351
+ - Run `npx @dzhechkov/p-replicator verify` to confirm both pre-shipped contract AND post-/replicate artifacts are in place.
352
+
267
353
  Git commit: `feat: Claude Code toolkit for [project-name]`
268
354
 
269
355
  **Checkpoint:**