@dzhechkov/p-replicator 1.3.0 → 1.5.2
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/README.md +55 -0
- package/bin/cli.js +0 -0
- package/package.json +7 -2
- package/src/cli.js +23 -6
- package/src/commands/doctor.js +46 -29
- package/src/commands/init.js +61 -8
- package/src/commands/list.js +5 -26
- package/src/commands/update.js +73 -7
- package/src/commands/verify.js +111 -0
- package/src/utils.js +275 -4
- package/templates/.claude/commands/deploy.md +100 -0
- package/templates/.claude/commands/docs.md +79 -0
- package/templates/.claude/commands/feature.md +134 -0
- package/templates/.claude/commands/go.md +115 -0
- package/templates/.claude/commands/myinsights.md +72 -0
- package/templates/.claude/commands/next.md +110 -0
- package/templates/.claude/commands/plan.md +88 -0
- package/templates/.claude/commands/replicate.md +103 -17
- package/templates/.claude/commands/run.md +151 -0
- package/templates/.claude/commands/start.md +88 -0
- package/templates/.claude/hooks/autocommit-insights.cjs +39 -0
- package/templates/.claude/hooks/autocommit-plans.cjs +39 -0
- package/templates/.claude/hooks/autocommit-roadmap.cjs +44 -0
- package/templates/.claude/hooks/session-insights.cjs +28 -0
- package/templates/.claude/hooks/state-update.cjs +79 -0
- package/templates/.claude/hooks/statusline.cjs +399 -0
- package/templates/.claude/rules/feature-lifecycle.md +145 -0
- package/templates/.claude/rules/git-workflow.md +74 -0
- package/templates/.claude/rules/insights-capture.md +77 -0
- package/templates/.claude/rules/replicate-pipeline.md +92 -19
- package/templates/.claude/settings.json +44 -0
- package/templates/.claude/skills/brutal-honesty-review/scripts/assess-code.sh +0 -0
- package/templates/.claude/skills/brutal-honesty-review/scripts/assess-tests.sh +0 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/ed25519_verifier.py +0 -0
- package/templates/.claude/skills/goap-research-ed25519/scripts/goap_planner.py +0 -0
|
@@ -55,6 +55,47 @@ All generated files go directly into the project. Never create a separate output
|
|
|
55
55
|
| Dev guide | `DEVELOPMENT_GUIDE.md` |
|
|
56
56
|
| Scaffolds | `docker-compose.yml`, `Dockerfile`, `.gitignore` |
|
|
57
57
|
|
|
58
|
+
## Alternative entry: starting from existing technical documentation
|
|
59
|
+
|
|
60
|
+
The pipeline officially supports starting from user-provided technical
|
|
61
|
+
documentation as an alternative to the full Phase 0 (Product Discovery) flow.
|
|
62
|
+
|
|
63
|
+
### Trigger detection
|
|
64
|
+
|
|
65
|
+
The orchestrator switches to this entry mode when user input contains any of:
|
|
66
|
+
- A path reference (e.g., "use my docs in `docs/existing/`")
|
|
67
|
+
- An explicit skip request ("skip discovery", "skip Phase 0")
|
|
68
|
+
- A statement of available docs ("I already have technical documentation")
|
|
69
|
+
- The semantic flag `--from-docs <path>` or `--skip-discovery`
|
|
70
|
+
|
|
71
|
+
### Behavior
|
|
72
|
+
|
|
73
|
+
When triggered:
|
|
74
|
+
1. Phase 0 is SKIPPED (no reverse-engineering-unicorn invocation)
|
|
75
|
+
2. Phase 1 runs sparc-prd-mini in AUTO mode with pre-filled context from user docs
|
|
76
|
+
3. Phase 1 skips internal Explore/Research/Solve sub-phases (those exist to
|
|
77
|
+
generate answers that the user already has)
|
|
78
|
+
4. Phase 2 (validation) runs UNCHANGED
|
|
79
|
+
5. Phase 3 (toolkit generation) and Phase 4 (finalize) run UNCHANGED
|
|
80
|
+
|
|
81
|
+
### Three supported sub-paths
|
|
82
|
+
|
|
83
|
+
| Path | Use case | Skills invoked |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| **A** | Full pipeline with existing docs as input | sparc-prd-mini (AUTO) → requirements-validator → cc-toolkit-generator-enhanced |
|
|
86
|
+
| **B** | SPARC docs only, no toolkit/scaffold | sparc-prd-mini (AUTO) only |
|
|
87
|
+
| **C** | Validation-only (docs already SPARC-shaped) | requirements-validator only |
|
|
88
|
+
|
|
89
|
+
### Test contract preserved
|
|
90
|
+
|
|
91
|
+
The alternative entry mode preserves:
|
|
92
|
+
- All pre-shipped artifacts (init contract intact)
|
|
93
|
+
- Manifest schema (.p-replicator.json including shippedDefaults)
|
|
94
|
+
- `verify` and `doctor` exit codes
|
|
95
|
+
- All meta-tests (replicate.md ↔ replicate-pipeline.md consistency)
|
|
96
|
+
|
|
97
|
+
No new flags or state-file fields are required.
|
|
98
|
+
|
|
58
99
|
## Architecture Constraints
|
|
59
100
|
|
|
60
101
|
Always pass these constraints to sparc-prd-mini (Phase 1):
|
|
@@ -73,27 +114,59 @@ Commit after each major phase completion:
|
|
|
73
114
|
- After Phase 3: `feat: Claude Code toolkit for [project-name]`
|
|
74
115
|
- After Phase 4: `chore: initial project setup from SPARC documentation`
|
|
75
116
|
|
|
76
|
-
## What Gets Generated vs Pre-
|
|
77
|
-
|
|
78
|
-
### Pre-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- `
|
|
117
|
+
## What Gets Generated vs Pre-shipped (post v1.4)
|
|
118
|
+
|
|
119
|
+
### Pre-shipped by `npx @dzhechkov/p-replicator init` (do NOT overwrite)
|
|
120
|
+
|
|
121
|
+
These files arrive with the package and form the stable workflow toolkit. They
|
|
122
|
+
are project-agnostic and can be enhanced (read by Phase 3) but never recreated.
|
|
123
|
+
|
|
124
|
+
**Skills (10):** all skills in `.claude/skills/` (`explore`, `sparc-prd-mini`,
|
|
125
|
+
`goap-research-ed25519`, `problem-solver-enhanced`, `requirements-validator`,
|
|
126
|
+
`brutal-honesty-review`, `cc-toolkit-generator-enhanced`,
|
|
127
|
+
`reverse-engineering-unicorn`, `pipeline-forge`, `knowledge-extractor`)
|
|
128
|
+
|
|
129
|
+
**Commands (11):** `replicate`, `harvest`, `start`, `plan`, `feature`, `go`,
|
|
130
|
+
`run`, `next`, `myinsights`, `docs`, `deploy`
|
|
131
|
+
|
|
132
|
+
**Agents (4):** `replicate-coordinator`, `product-discoverer`, `doc-validator`,
|
|
133
|
+
`harvest-coordinator`
|
|
134
|
+
|
|
135
|
+
**Rules (5):** `replicate-pipeline`, `skill-interface-protocol`, `git-workflow`,
|
|
136
|
+
`insights-capture`, `feature-lifecycle`
|
|
137
|
+
|
|
138
|
+
**Hooks:** `.claude/settings.json` (SessionStart + Stop) + cross-platform Node
|
|
139
|
+
scripts in `.claude/hooks/` (`session-insights.cjs`, `autocommit-roadmap.cjs`,
|
|
140
|
+
`autocommit-insights.cjs`, `autocommit-plans.cjs`)
|
|
141
|
+
|
|
142
|
+
### Generated by /replicate Phase 3 (project-specific — create new)
|
|
143
|
+
|
|
144
|
+
These exist only AFTER `/replicate` runs because they encode project-specific
|
|
145
|
+
data extracted from SPARC docs.
|
|
146
|
+
|
|
147
|
+
- `.claude/agents/planner.md` — algorithm templates from Pseudocode.md
|
|
148
|
+
- `.claude/agents/code-reviewer.md` — edge cases from Refinement.md
|
|
149
|
+
- `.claude/agents/architect.md` — system design from Architecture.md
|
|
150
|
+
- `.claude/rules/security.md` — NFRs from Specification.md
|
|
151
|
+
- `.claude/rules/coding-style.md` — tech-stack conventions
|
|
152
|
+
- `.claude/rules/secrets-management.md` — IF external APIs detected
|
|
153
|
+
- `.claude/rules/testing.md` — test strategy from Refinement.md
|
|
154
|
+
- `.claude/skills/project-context/` — domain knowledge
|
|
155
|
+
- `.claude/skills/coding-standards/` — tech-specific patterns
|
|
156
|
+
- `.claude/skills/security-patterns/` — IF external APIs
|
|
157
|
+
- `.claude/feature-roadmap.json` — feature list from PRD MVP scope
|
|
158
|
+
- `.claude/commands/feature-ent.md` — IF DDD docs (idea2prd-manual)
|
|
159
|
+
- `.mcp.json` — IF external integrations
|
|
95
160
|
- `CLAUDE.md`, `README.md`, `DEVELOPMENT_GUIDE.md`
|
|
96
161
|
- `docker-compose.yml`, `Dockerfile`, `.gitignore`
|
|
162
|
+
- `docs/*` — all SPARC documentation
|
|
163
|
+
|
|
164
|
+
### Post-pipeline verification
|
|
165
|
+
|
|
166
|
+
After `/replicate` completes, run `npx @dzhechkov/p-replicator verify` to
|
|
167
|
+
confirm both contracts (pre-shipped + post-/replicate). The `verify` command
|
|
168
|
+
detects whether `/replicate` was run (via CLAUDE.md or feature-roadmap.json)
|
|
169
|
+
and reports per-artifact status.
|
|
97
170
|
|
|
98
171
|
## Checkpoint Format
|
|
99
172
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://www.schemastore.org/claude-code-settings.json",
|
|
3
|
+
"_comment": "Default hooks + statusline shipped by @dzhechkov/p-replicator init. Cross-platform Node scripts (no bash dependencies). Auto-commits roadmap/insights/plans on Stop, injects relevant insights on SessionStart. Statusline displays pipeline+roadmap+toolkit dashboard above the prompt. Project-specific hooks (DDD, fitness functions, etc.) are merged in by /replicate Phase 3.",
|
|
4
|
+
"statusLine": {
|
|
5
|
+
"type": "command",
|
|
6
|
+
"command": "node .claude/hooks/statusline.cjs"
|
|
7
|
+
},
|
|
8
|
+
"hooks": {
|
|
9
|
+
"SessionStart": [
|
|
10
|
+
{
|
|
11
|
+
"matcher": "*",
|
|
12
|
+
"hooks": [
|
|
13
|
+
{
|
|
14
|
+
"type": "command",
|
|
15
|
+
"command": "node .claude/hooks/session-insights.cjs",
|
|
16
|
+
"timeout": 5
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"Stop": [
|
|
22
|
+
{
|
|
23
|
+
"matcher": "*",
|
|
24
|
+
"hooks": [
|
|
25
|
+
{
|
|
26
|
+
"type": "command",
|
|
27
|
+
"command": "node .claude/hooks/autocommit-roadmap.cjs",
|
|
28
|
+
"timeout": 10
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "command",
|
|
32
|
+
"command": "node .claude/hooks/autocommit-insights.cjs",
|
|
33
|
+
"timeout": 10
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "node .claude/hooks/autocommit-plans.cjs",
|
|
38
|
+
"timeout": 10
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|