@dzhechkov/p-replicator 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzhechkov/p-replicator",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "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.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -11,14 +11,6 @@
11
11
  "src/",
12
12
  "templates/"
13
13
  ],
14
- "scripts": {
15
- "test": "node --test tests/unit/utils.test.js tests/e2e/lifecycle.test.js tests/snapshot/templates.test.js",
16
- "test:unit": "node --test tests/unit/utils.test.js",
17
- "test:e2e": "node --test tests/e2e/lifecycle.test.js",
18
- "test:snapshot": "node --test tests/snapshot/templates.test.js",
19
- "test:doctor": "node bin/cli.js doctor",
20
- "snapshot:baseline": "node tests/snapshot/update-baseline.js"
21
- },
22
14
  "keywords": [
23
15
  "claude",
24
16
  "claude-code",
@@ -71,5 +63,13 @@
71
63
  },
72
64
  "publishConfig": {
73
65
  "access": "public"
66
+ },
67
+ "scripts": {
68
+ "test": "node --test tests/unit/utils.test.js tests/e2e/lifecycle.test.js tests/snapshot/templates.test.js",
69
+ "test:unit": "node --test tests/unit/utils.test.js",
70
+ "test:e2e": "node --test tests/e2e/lifecycle.test.js",
71
+ "test:snapshot": "node --test tests/snapshot/templates.test.js",
72
+ "test:doctor": "node bin/cli.js doctor",
73
+ "snapshot:baseline": "node tests/snapshot/update-baseline.js"
74
74
  }
75
- }
75
+ }
package/src/cli.js CHANGED
@@ -110,8 +110,14 @@ function parseArgs(argv) {
110
110
  command = 'version';
111
111
  break;
112
112
  default:
113
- if (!arg.startsWith('-') && command === null) {
113
+ if (arg.startsWith('-')) {
114
+ error(`Unknown option: ${arg}`);
115
+ process.exit(1);
116
+ } else if (command === null) {
114
117
  command = arg;
118
+ } else {
119
+ error(`Unexpected argument: ${arg}`);
120
+ process.exit(1);
115
121
  }
116
122
  break;
117
123
  }
@@ -85,7 +85,10 @@ function installComponent(key, comp, templatesDir, targetDir, options) {
85
85
  return [comp.src];
86
86
  }
87
87
 
88
- return getRelativePaths(dest).map((rel) => path.join(comp.src, rel));
88
+ // Track files from the TEMPLATE source, never a scan of the destination — matches
89
+ // update.js's invariant (line ~112). Walking dest would adopt user-created files
90
+ // into the manifest, and a later `remove` would then delete them (user data loss).
91
+ return getRelativePaths(src).map((rel) => path.join(comp.src, rel));
89
92
  }
90
93
 
91
94
  // ---------------------------------------------------------------------------
@@ -54,33 +54,35 @@ When skills reference `/mnt/skills/user/` paths, map them:
54
54
  | `[project-name]-cc-toolkit/` | project root (in-place) |
55
55
  | `[project-name].zip` | N/A (no packaging) |
56
56
 
57
- ## What /replicate Generates
57
+ ## What /replicate Generates (post v1.4)
58
58
 
59
- After full pipeline execution, these files are created/modified:
59
+ The workflow toolkit (all 11 commands, all 5 base rules, all 4 pipeline agents,
60
+ the 10 skills, and `.claude/settings.json` + hook scripts) is **pre-shipped by
61
+ `npx @dzhechkov/p-replicator init` — do NOT overwrite or regenerate it.** See
62
+ `.claude/rules/replicate-pipeline.md` → "What Gets Generated vs Pre-shipped"
63
+ for the authoritative contract that `verify` checks.
60
64
 
61
- ### Generated Commands
62
- - `.claude/commands/start.md` — project bootstrap
63
- - `.claude/commands/feature.md` — 4-phase feature lifecycle
64
- - `.claude/commands/plan.md` — implementation planning
65
- - `.claude/commands/myinsights.md` — insights capture
66
- - `.claude/commands/deploy.md` — deployment workflow
67
- - `.claude/commands/test.md` — test generation (if applicable)
65
+ Phase 3 generates ONLY project-specific artifacts derived from the SPARC docs:
68
66
 
69
67
  ### Generated Agents
70
- - `.claude/agents/planner.md` — from Pseudocode.md
71
- - `.claude/agents/code-reviewer.md` — from Refinement.md
72
- - `.claude/agents/architect.md` — from Architecture.md + Solution_Strategy.md
68
+ - `.claude/agents/planner.md` — algorithm templates from Pseudocode.md
69
+ - `.claude/agents/code-reviewer.md` — edge cases from Refinement.md
70
+ - `.claude/agents/architect.md` — system design from Architecture.md + Solution_Strategy.md
73
71
 
74
72
  ### Generated Rules
75
- - `.claude/rules/git-workflow.md` — semantic commit conventions
76
- - `.claude/rules/insights-capture.md` — insight capture protocol
77
- - `.claude/rules/feature-lifecycle.md` — feature development protocol
78
- - `.claude/rules/security.md` — from Specification.md NFRs
79
- - `.claude/rules/coding-style.md` — from Architecture.md tech stack
80
- - `.claude/rules/secrets-management.md` IF external APIs
81
-
82
- ### Generated/Modified Config
83
- - `.claude/settings.json`hooks (insights auto-commit on Stop)
73
+ - `.claude/rules/security.md` — NFRs from Specification.md
74
+ - `.claude/rules/coding-style.md` — tech-stack conventions from Architecture.md
75
+ - `.claude/rules/secrets-management.md` — IF external APIs detected
76
+ - `.claude/rules/testing.md` — test strategy from Refinement.md
77
+
78
+ ### Generated Skills (project-specific)
79
+ - `.claude/skills/project-context/` — domain knowledge
80
+ - `.claude/skills/coding-standards/` — tech-specific patterns
81
+ - `.claude/skills/security-patterns/`IF external APIs
82
+
83
+ ### Generated State + Conditional Config
84
+ - `.claude/feature-roadmap.json` — feature list from PRD MVP scope
85
+ - `.claude/commands/feature-ent.md` — IF DDD/ADR/C4 docs detected
84
86
  - `.mcp.json` — IF external integrations
85
87
 
86
88
  ### Generated Documentation
@@ -394,7 +394,7 @@ git commit -m "chore: initial project setup from SPARC documentation"
394
394
  │ ├── test-scenarios.md # BDD scenarios
395
395
  │ └── features/ # For future features
396
396
  ├── .claude/
397
- │ ├── commands/ # /start, /feature, /plan, /test, /deploy, /myinsights
397
+ │ ├── commands/ # /start, /feature, /plan, /go, /run, /deploy, /myinsights
398
398
  │ ├── agents/ # planner, code-reviewer, architect
399
399
  │ ├── skills/ # 8 shared + project-specific skills
400
400
  │ ├── rules/ # git-workflow, security, coding-style, ...
@@ -410,7 +410,9 @@ git commit -m "chore: initial project setup from SPARC documentation"
410
410
  - /start — bootstrap project from docs
411
411
  - /feature [name] — full feature lifecycle
412
412
  - /plan [feature] — plan implementation
413
- - /test [scope] — run/generate tests
413
+ - /go [feature] — smart pipeline router (auto-dispatch)
414
+ - /run [mode] — autonomous build loop
415
+ - /next — pick the next feature from roadmap
414
416
  - /deploy [env] — deploy to environment
415
417
  - /myinsights — capture development insights
416
418
  ═══════════════════════════════════════════════════════════════
@@ -33,6 +33,21 @@ From the Instrument Map this module uses:
33
33
  > AI systems routinely compress 211-line templates to 60 lines — this is a CRITICAL defect.
34
34
  > Validate: generated file line count must be >= 80% of template line count.
35
35
 
36
+ > **CLAUDE CODE PRE-SHIPPED SKIP-LIST (post v1.4):** When this skill runs inside a
37
+ > p-replicator project, several "P0 mandatory" items below are **already pre-shipped
38
+ > by `npx @dzhechkov/p-replicator init`** and are protected by the do-not-overwrite
39
+ > gate in `.claude/rules/replicate-pipeline.md` ("What Gets Generated vs Pre-shipped").
40
+ > For these items, **VERIFY they exist — do NOT regenerate or overwrite them:**
41
+ > - Commands: `start.md` (Item 4), `myinsights.md` (Item 5), `feature.md` (Item 6)
42
+ > - Rules: `git-workflow.md` (Item 7), `insights-capture.md` (Item 8), `feature-lifecycle.md` (Item 9)
43
+ > - Config: `.claude/settings.json` + `.claude/hooks/` scripts (Item 10)
44
+ >
45
+ > Treat their "Generate `.claude/...`" instructions as "confirm present; enhance content
46
+ > only if explicitly requested". Generate fresh ONLY the project-specific items that are
47
+ > NOT in the pre-shipped contract (CLAUDE.md, security.md, coding-style.md, and the
48
+ > conditional P0 items). When running this skill standalone (no p-replicator init), generate
49
+ > everything as written.
50
+
36
51
  ### P0 Mandatory Items (always generated)
37
52
 
38
53
  The following 16 items are generated for every project, regardless of pipeline
@@ -25,6 +25,26 @@ engine and conditionally included based on project characteristics and document
25
25
  > AI systems routinely compress 211-line templates to 60 lines — this is a CRITICAL defect.
26
26
  > Validate: generated file line count must be >= 80% of template line count.
27
27
 
28
+ > **CLAUDE CODE PRE-SHIPPED SKIP-LIST (post v1.4):** When this skill runs inside a
29
+ > p-replicator project, several P1 items below are **already pre-shipped by
30
+ > `npx @dzhechkov/p-replicator init`** and are protected by the do-not-overwrite gate
31
+ > in `.claude/rules/replicate-pipeline.md` ("What Gets Generated vs Pre-shipped").
32
+ > For these items, **VERIFY they exist — do NOT regenerate or overwrite them:**
33
+ > - Commands: `plan.md`, `deploy.md`, `next.md`, `go.md`, `run.md`, `docs.md`
34
+ > - Config merge: `.claude/settings.json` (already shipped; only add a new hook entry
35
+ > if a generated hook genuinely requires one, otherwise leave untouched)
36
+ >
37
+ > Note: `test.md` is **NOT** pre-shipped and is **NOT** part of the p-replicator command
38
+ > set — do not advertise it in any generated CLAUDE.md/README command list. Generate
39
+ > `test.md` only when this skill runs standalone (outside a p-replicator project) and the
40
+ > project actually needs a test command.
41
+ >
42
+ > Generate fresh the genuinely project-specific P1 items: the `planner`/`code-reviewer`/
43
+ > `architect` agents, `project-context`/`coding-standards`/`testing-patterns` skills,
44
+ > `testing.md` rule, `feature-roadmap.json`, and (IF DDD docs) `feature-ent.md` +
45
+ > enterprise lifecycle artifacts. When running standalone (no p-replicator init),
46
+ > generate everything as written.
47
+
28
48
  ### Step 1: Filter P1 Candidates
29
49
 
30
50
  Select all instruments assigned tier P1 from the Instrument Map (score >= 12 after tier boosts).
@@ -3,6 +3,17 @@
3
3
  Modular phase architecture for the toolkit generator.
4
4
  Each module is self-contained with: INPUT → PROCESS → OUTPUT → QUALITY GATE.
5
5
 
6
+ > **Claude Code pre-shipped skip-list (post v1.4):** When these modules run inside a
7
+ > p-replicator project, several items listed below as "generated" are actually
8
+ > **pre-shipped by `npx @dzhechkov/p-replicator init`** and are protected by the
9
+ > do-not-overwrite gate in `.claude/rules/replicate-pipeline.md`. Modules 03 and 04
10
+ > carry an explicit skip-list note: those items must be **verified present, not
11
+ > regenerated** (commands `start`/`myinsights`/`feature`/`plan`/`deploy`/`next`/`go`/
12
+ > `run`/`docs`, base rules `git-workflow`/`insights-capture`/`feature-lifecycle`, and
13
+ > `.claude/settings.json` + hooks). `test.md` is neither pre-shipped nor part of the
14
+ > p-replicator command set. When run standalone (no p-replicator init), generate
15
+ > everything as written.
16
+
6
17
  ## Phase Modules (Core Pipeline)
7
18
 
8
19
  | # | Module | File | Size | Purpose |