@pareto4/pp-core 1.6.1 → 1.7.1
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/.claude-plugin/plugin.json +1 -1
- package/commands/pp-build-handoff.md +40 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/pp-core/bin/lib/capability-registry.cjs +174 -1
- package/pp-core/bin/lib/check-command-router.cjs +75 -1
- package/pp-core/bin/lib/platform-bindings.cjs +13 -0
- package/pp-core/bin/lib/vault-command-router.cjs +56 -0
- package/pp-core/bin/lib/vault.cjs +686 -0
- package/pp-core/bin/shared/config-defaults.manifest.json +2 -2
- package/pp-core/references/planning-config.md +10 -10
- package/pp-core/workflows/build-handoff.md +598 -0
- package/pp-core/workflows/execute-phase/steps/vault-fetch.md +25 -0
- package/pp-core/workflows/execute-phase/steps/vault-load-gate.md +119 -0
- package/pp-core/workflows/plan-phase.md +12 -0
- package/pp-core/workflows/settings-advanced.md +4 -4
- package/scripts/lint-test-file-count.allowlist.json +9 -0
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"branching_strategy": "none",
|
|
19
19
|
"create_tag": true,
|
|
20
20
|
"base_branch": null,
|
|
21
|
-
"phase_branch_template": "
|
|
22
|
-
"milestone_branch_template": "
|
|
21
|
+
"phase_branch_template": "pp/phase-{phase}-{slug}",
|
|
22
|
+
"milestone_branch_template": "pp/{milestone}-{slug}",
|
|
23
23
|
"quick_branch_template": null
|
|
24
24
|
},
|
|
25
25
|
"workflow": {
|
|
@@ -11,8 +11,8 @@ Configuration options for `.planning/` directory behavior.
|
|
|
11
11
|
"git": {
|
|
12
12
|
"branching_strategy": "none",
|
|
13
13
|
"base_branch": null,
|
|
14
|
-
"phase_branch_template": "
|
|
15
|
-
"milestone_branch_template": "
|
|
14
|
+
"phase_branch_template": "pp/phase-{phase}-{slug}",
|
|
15
|
+
"milestone_branch_template": "pp/{milestone}-{slug}",
|
|
16
16
|
"quick_branch_template": null
|
|
17
17
|
},
|
|
18
18
|
"manager": {
|
|
@@ -31,8 +31,8 @@ Configuration options for `.planning/` directory behavior.
|
|
|
31
31
|
| `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
|
|
32
32
|
| `git.base_branch` | `null` (auto-detect) | Target branch for PRs and merges (e.g. `"master"`, `"develop"`). When `null`, auto-detects from `git symbolic-ref refs/remotes/origin/HEAD`, falling back to `"main"`. |
|
|
33
33
|
| `git.create_tag` | `true` | Create git tags on milestone completion |
|
|
34
|
-
| `git.phase_branch_template` | `"
|
|
35
|
-
| `git.milestone_branch_template` | `"
|
|
34
|
+
| `git.phase_branch_template` | `"pp/phase-{phase}-{slug}"` | Branch template for phase strategy |
|
|
35
|
+
| `git.milestone_branch_template` | `"pp/{milestone}-{slug}"` | Branch template for milestone strategy |
|
|
36
36
|
| `git.quick_branch_template` | `null` | Optional branch template for quick-task runs |
|
|
37
37
|
| `workflow.use_worktrees` | `true` | Whether executor agents run in isolated git worktrees. Set to `false` to disable worktrees — agents execute sequentially on the main working tree instead. Recommended for solo developers or when worktree merges cause issues. Note: if your branch is ahead of `origin/HEAD` (a diverged milestone or feature branch), pp-core auto-degrades to sequential and prints a warning; set `worktree.baseRef:"head"` in `.claude/settings.local.json` to restore parallel execution. See the branch-divergence note below. |
|
|
38
38
|
| `workflow.subagent_timeout` | `300000` | Timeout in milliseconds for parallel subagent tasks (e.g. codebase mapping). Increase for large codebases or slower models. Default: 300000 (5 minutes). |
|
|
@@ -144,14 +144,14 @@ To use uncommitted mode:
|
|
|
144
144
|
|
|
145
145
|
**When `git.branching_strategy: "phase"`:**
|
|
146
146
|
- `execute-phase` creates/switches to a branch before execution
|
|
147
|
-
- Branch name from `phase_branch_template` (e.g., `
|
|
147
|
+
- Branch name from `phase_branch_template` (e.g., `pp/phase-03-authentication`)
|
|
148
148
|
- All plan commits go to that branch
|
|
149
149
|
- User merges branches manually after phase completion
|
|
150
150
|
- `complete-milestone` offers to merge all phase branches
|
|
151
151
|
|
|
152
152
|
**When `git.branching_strategy: "milestone"`:**
|
|
153
153
|
- First `execute-phase` of milestone creates the milestone branch
|
|
154
|
-
- Branch name from `milestone_branch_template` (e.g., `
|
|
154
|
+
- Branch name from `milestone_branch_template` (e.g., `pp/v1.0-mvp`)
|
|
155
155
|
- All phases in milestone commit to same branch
|
|
156
156
|
- `complete-milestone` offers to merge milestone branch to main
|
|
157
157
|
|
|
@@ -292,8 +292,8 @@ Set via `git.*` namespace (e.g., `"git": { "branching_strategy": "phase" }`).
|
|
|
292
292
|
| `git.branching_strategy` | string | `"none"` | `"none"`, `"phase"`, `"milestone"` | Git branching approach for phase/milestone isolation |
|
|
293
293
|
| `git.base_branch` | string\|null | `null` (auto-detect) | Any branch name | Target branch for PRs and merges; auto-detects from `origin/HEAD` when `null` |
|
|
294
294
|
| `git.create_tag` | boolean | `true` | `true`, `false` | Create git tags on milestone completion |
|
|
295
|
-
| `git.phase_branch_template` | string | `"
|
|
296
|
-
| `git.milestone_branch_template` | string | `"
|
|
295
|
+
| `git.phase_branch_template` | string | `"pp/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy |
|
|
296
|
+
| `git.milestone_branch_template` | string | `"pp/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy |
|
|
297
297
|
| `git.quick_branch_template` | string\|null | `null` | Template with `{slug}` | Optional branch template for quick-task runs |
|
|
298
298
|
|
|
299
299
|
### Search & API Fields
|
|
@@ -420,7 +420,7 @@ Several config fields affect each other or trigger special behavior:
|
|
|
420
420
|
"git": {
|
|
421
421
|
"branching_strategy": "phase",
|
|
422
422
|
"base_branch": "develop",
|
|
423
|
-
"phase_branch_template": "
|
|
423
|
+
"phase_branch_template": "pp/phase-{phase}-{slug}"
|
|
424
424
|
},
|
|
425
425
|
"workflow": {
|
|
426
426
|
"research": true,
|
|
@@ -452,7 +452,7 @@ Several config fields affect each other or trigger special behavior:
|
|
|
452
452
|
"phase_naming": "sequential",
|
|
453
453
|
"git": {
|
|
454
454
|
"branching_strategy": "milestone",
|
|
455
|
-
"milestone_branch_template": "
|
|
455
|
+
"milestone_branch_template": "pp/{milestone}-{slug}"
|
|
456
456
|
},
|
|
457
457
|
"workflow": {
|
|
458
458
|
"research": true,
|
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Transition a completed Pareto Discovery Sprint into a pp-core-ready project. Validates
|
|
3
|
+
Discovery completion (13/13 sessions), synthesizes every session file into a single
|
|
4
|
+
handoff document optimized for pp-core's new-project generators, initializes `.planning/`
|
|
5
|
+
(config, PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md), and wires cross-references
|
|
6
|
+
so pp-core agents can trace decisions back to their originating Discovery session.
|
|
7
|
+
|
|
8
|
+
This workflow is self-contained: it does NOT depend on any external Pareto skills bundle.
|
|
9
|
+
The GitHub board sync step degrades gracefully when the GitHub CLI is absent.
|
|
10
|
+
</purpose>
|
|
11
|
+
|
|
12
|
+
<required_reading>
|
|
13
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
14
|
+
</required_reading>
|
|
15
|
+
|
|
16
|
+
<available_agent_types>
|
|
17
|
+
Valid pp-core subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
18
|
+
- Explore — read-only parallel search agent, used here to read all Discovery session files
|
|
19
|
+
</available_agent_types>
|
|
20
|
+
|
|
21
|
+
<context>
|
|
22
|
+
**Flags (parse from `$ARGUMENTS`):**
|
|
23
|
+
- `--skip-validation` — Skip the Discovery completion check (use when sessions are intentionally incomplete)
|
|
24
|
+
- `--scaffold` — After initialization, also scaffold lightweight application structure from the Session 5 tech stack
|
|
25
|
+
|
|
26
|
+
**Prerequisites:**
|
|
27
|
+
- A Pareto project with a `Discovery/` folder (created by `pareto-project-setup`)
|
|
28
|
+
- Discovery Sprint sessions (ideally 13/13 completed)
|
|
29
|
+
- pp-core installed and resolvable via the standard `pp_run` shim
|
|
30
|
+
</context>
|
|
31
|
+
|
|
32
|
+
<process>
|
|
33
|
+
|
|
34
|
+
**Step 0: Resolve pp-tools**
|
|
35
|
+
|
|
36
|
+
Resolve the `pp_run` helper before anything else. Every `pp_run` call below uses this shim.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
_PP_SHIM_NAME="pp-tools.cjs"; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then pp_run() { node "$PP_TOOLS" "$@"; }; elif [ -f "${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.claude/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; pp_run() { "$PP_TOOLS" "$@"; }; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; pp_run() { node "$PP_TOOLS" "$@"; }; else echo "ERROR: pp-tools.cjs not found. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
**Step 1: Validate environment**
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ls Discovery/_progress.md 2>/dev/null && echo "DISCOVERY_OK" || echo "DISCOVERY_MISSING"
|
|
48
|
+
ls .planning/PROJECT.md 2>/dev/null && echo "PPCORE_EXISTS" || echo "PPCORE_FRESH"
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**If DISCOVERY_MISSING:** Error and stop.
|
|
52
|
+
```
|
|
53
|
+
Error: No Discovery Sprint found in this project.
|
|
54
|
+
|
|
55
|
+
Expected: Discovery/_progress.md
|
|
56
|
+
Run /pareto-project-setup to create a new project with the Discovery framework,
|
|
57
|
+
then complete the Discovery Sprint sessions before transitioning to build.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**If PPCORE_EXISTS:** Error and stop.
|
|
61
|
+
```
|
|
62
|
+
Error: pp-core is already initialized (.planning/PROJECT.md exists).
|
|
63
|
+
|
|
64
|
+
If you want to re-initialize, remove .planning/ first.
|
|
65
|
+
Or use /pp-progress to continue where you left off.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
**Step 2: Validate Discovery completion**
|
|
71
|
+
|
|
72
|
+
Read `Discovery/_progress.md` and parse the Session Progress table. Count sessions by
|
|
73
|
+
status: **Completed**, **In Progress**, **Not Started**.
|
|
74
|
+
|
|
75
|
+
**If `--skip-validation` is present:** Skip to Step 3 with a note.
|
|
76
|
+
|
|
77
|
+
**If all 13 completed:** Proceed to Step 3.
|
|
78
|
+
|
|
79
|
+
**If some incomplete:** Present findings and ask how to proceed:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
AskUserQuestion([
|
|
83
|
+
{
|
|
84
|
+
header: "Discovery Incomplete",
|
|
85
|
+
question: "Discovery Sprint is {completed}/13 complete. {in_progress} in progress, {not_started} not started.\n\nIncomplete sessions:\n{list of incomplete session names}\n\nProceeding with incomplete discovery means pp-core will have gaps in context. How would you like to proceed?",
|
|
86
|
+
multiSelect: false,
|
|
87
|
+
options: [
|
|
88
|
+
{ label: "Proceed anyway", description: "Synthesize what we have — fill gaps during pp-core discuss phases" },
|
|
89
|
+
{ label: "Complete discovery first", description: "Go back and finish the remaining sessions before transitioning" }
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
])
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**If "Complete discovery first":** Exit with guidance:
|
|
96
|
+
```
|
|
97
|
+
Run /pp-discovery to see progress and continue with the next session.
|
|
98
|
+
When all sessions are complete, run /pp-build-handoff again.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**If "Proceed anyway":** Continue to Step 3, noting which sessions are incomplete.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
**Step 3: Read and synthesize Discovery outputs**
|
|
106
|
+
|
|
107
|
+
This is the core value of the workflow. Read all Discovery artifacts and synthesize
|
|
108
|
+
them into a single document optimized for the pp-core new-project generators.
|
|
109
|
+
|
|
110
|
+
### 3a. Read all sources
|
|
111
|
+
|
|
112
|
+
Read these files (skip any that don't exist):
|
|
113
|
+
|
|
114
|
+
1. `Discovery/_context.md` — accumulated cross-session context (primary source)
|
|
115
|
+
2. `Discovery/_progress.md` — session completion status
|
|
116
|
+
3. All 13 session files in `Discovery/` — for detail not captured in `_context.md`
|
|
117
|
+
4. The Project Definition document (glob for `*-Project-Definition.md` in root)
|
|
118
|
+
5. `prototype/README.md` — if a prototype exists, note its state
|
|
119
|
+
|
|
120
|
+
**Spawn an Explore agent to read all session files in parallel** and extract every
|
|
121
|
+
populated Notes Template table, all Key Decisions tables, all Action Items, and any
|
|
122
|
+
authored content that replaces placeholder text.
|
|
123
|
+
|
|
124
|
+
### 3b. Synthesize into the handoff document
|
|
125
|
+
|
|
126
|
+
Write `Discovery/_pp-handoff.md` with the structure below. The new-project generators
|
|
127
|
+
use it to produce PROJECT.md, REQUIREMENTS.md, and ROADMAP.md, so the structure must
|
|
128
|
+
map cleanly onto what those generators expect.
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
# Discovery Sprint Synthesis — pp-core Handoff
|
|
132
|
+
|
|
133
|
+
> Auto-generated from {completed_count}/13 completed Discovery Sprint sessions.
|
|
134
|
+
> Source: Discovery/_context.md + individual session files
|
|
135
|
+
> Generated: {date}
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## What We're Building
|
|
140
|
+
{Synthesize from Session 1 + 3: business vision + one-paragraph description of the
|
|
141
|
+
application — what it does, who it's for, why it matters}
|
|
142
|
+
|
|
143
|
+
### Core Problem
|
|
144
|
+
{From Session 2: the #1 pain point and supporting pains, as a clear problem statement}
|
|
145
|
+
|
|
146
|
+
### Target Users
|
|
147
|
+
{From Session 2+3: personas — role, tech proficiency, primary need}
|
|
148
|
+
|
|
149
|
+
| Persona | Role | Key Need |
|
|
150
|
+
|---------|------|----------|
|
|
151
|
+
| {persona} | {role} | {primary need} |
|
|
152
|
+
|
|
153
|
+
### Success Metrics
|
|
154
|
+
{From Session 1+3: KPIs and measurable outcomes}
|
|
155
|
+
|
|
156
|
+
| KPI | Target | Measurement |
|
|
157
|
+
|-----|--------|-------------|
|
|
158
|
+
| {kpi} | {target} | {how measured} |
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Scope
|
|
163
|
+
|
|
164
|
+
### In Scope (MVP)
|
|
165
|
+
{From Session 3+11: confirmed MVP scope items}
|
|
166
|
+
|
|
167
|
+
### Out of Scope
|
|
168
|
+
{From Session 3+11: explicitly excluded items with reasons}
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Functional Requirements
|
|
173
|
+
{From Session 3: EPICs and user stories, structured for requirements generation}
|
|
174
|
+
|
|
175
|
+
### EPIC Registry
|
|
176
|
+
| ID | Title | Priority | Phase | Stories |
|
|
177
|
+
|----|-------|----------|-------|---------|
|
|
178
|
+
| {epic-id} | {title} | {must/should/could} | {phase} | {count} |
|
|
179
|
+
|
|
180
|
+
### Requirements by EPIC
|
|
181
|
+
|
|
182
|
+
#### {EPIC-001}: {Title}
|
|
183
|
+
{Brief EPIC description}
|
|
184
|
+
|
|
185
|
+
**User Stories:**
|
|
186
|
+
| ID | Story | Priority | Acceptance Criteria Summary |
|
|
187
|
+
|----|-------|----------|---------------------------|
|
|
188
|
+
| {us-id} | As a {role}, I want {goal} so that {benefit} | {priority} | {brief AC} |
|
|
189
|
+
|
|
190
|
+
### Non-Functional Requirements
|
|
191
|
+
| ID | Category | Requirement | Target |
|
|
192
|
+
|----|----------|-------------|--------|
|
|
193
|
+
| {nfr-id} | {Performance/Security/Usability/Availability} | {requirement} | {target} |
|
|
194
|
+
|
|
195
|
+
### Business Rules
|
|
196
|
+
| ID | Rule | Applies To |
|
|
197
|
+
|----|------|------------|
|
|
198
|
+
| {br-id} | {rule} | {module/scope} |
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Architecture & Technology
|
|
203
|
+
{From Session 5: architecture style, tech stack, ADRs, key components}
|
|
204
|
+
|
|
205
|
+
### Technology Stack
|
|
206
|
+
| Layer | Technology | Rationale |
|
|
207
|
+
|-------|-----------|-----------|
|
|
208
|
+
| Frontend | {tech} | {why} |
|
|
209
|
+
| Backend | {tech} | {why} |
|
|
210
|
+
| Database | {tech} | {why} |
|
|
211
|
+
| Hosting | {tech} | {why} |
|
|
212
|
+
| Auth | {tech} | {why} |
|
|
213
|
+
|
|
214
|
+
### Architecture Decision Records
|
|
215
|
+
| ADR | Decision | Context |
|
|
216
|
+
|-----|----------|---------|
|
|
217
|
+
| {adr-id} | {decision} | {why over alternatives} |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Security & Compliance
|
|
222
|
+
{From Session 6: data classification, compliance, encryption, auth, audit, SLA}
|
|
223
|
+
|
|
224
|
+
## User Roles & Identity
|
|
225
|
+
{From Session 7: RBAC roles + permissions, identity provider}
|
|
226
|
+
|
|
227
|
+
| Role | Description | Key Permissions |
|
|
228
|
+
|------|-------------|-----------------|
|
|
229
|
+
| {role} | {description} | {permissions} |
|
|
230
|
+
|
|
231
|
+
## Integrations
|
|
232
|
+
{From Session 8: external systems, direction, protocol, data, phase}
|
|
233
|
+
|
|
234
|
+
| System | Direction | Protocol | Data | Phase |
|
|
235
|
+
|--------|-----------|----------|------|-------|
|
|
236
|
+
| {system} | {in/out/bi} | {REST/webhook} | {data} | {when} |
|
|
237
|
+
|
|
238
|
+
## Quality & Testing Strategy
|
|
239
|
+
{From Session 9: framework, coverage target, test types, UAT, quality gates}
|
|
240
|
+
|
|
241
|
+
## Infrastructure & Deployment
|
|
242
|
+
{From Session 10: environments, deployment approach, monitoring, backup/DR}
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Roadmap & Phasing
|
|
247
|
+
{From Session 11: planned release structure — used to generate the phase breakdown}
|
|
248
|
+
|
|
249
|
+
### Phases
|
|
250
|
+
| Phase | Scope | Duration |
|
|
251
|
+
|-------|-------|----------|
|
|
252
|
+
| {phase} | {included} | {sprints/weeks} |
|
|
253
|
+
|
|
254
|
+
### Key Milestones
|
|
255
|
+
| Milestone | Target | Criteria |
|
|
256
|
+
|-----------|--------|----------|
|
|
257
|
+
| {milestone} | {date/sprint} | {done criteria} |
|
|
258
|
+
|
|
259
|
+
### Build Order Preferences
|
|
260
|
+
{Sequencing constraints or preferences from Discovery}
|
|
261
|
+
|
|
262
|
+
## Team & Delivery Model
|
|
263
|
+
{From Session 12: team size, roles, sprint cadence, ceremonies}
|
|
264
|
+
|
|
265
|
+
## Open Items & Risks
|
|
266
|
+
|
|
267
|
+
### Open Action Items
|
|
268
|
+
| Action | From Session | Status |
|
|
269
|
+
|--------|-------------|--------|
|
|
270
|
+
| {action} | {session} | {status} |
|
|
271
|
+
|
|
272
|
+
### Risks
|
|
273
|
+
| Risk | Probability | Impact | Mitigation |
|
|
274
|
+
|------|-------------|--------|------------|
|
|
275
|
+
| {risk} | {H/M/L} | {H/M/L} | {mitigation} |
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Discovery Traceability
|
|
280
|
+
|
|
281
|
+
> pp-core agents: for deeper context on any decision above, reference the original
|
|
282
|
+
> Discovery session files. Key mappings:
|
|
283
|
+
|
|
284
|
+
| Topic | Primary Source | Secondary Sources |
|
|
285
|
+
|-------|---------------|-------------------|
|
|
286
|
+
| Business context & vision | `Discovery/01-discovery-sprint-kickoff.md` | `Discovery/_context.md` §1 |
|
|
287
|
+
| Current state & pain points | `Discovery/02-business-process-mapping-as-is.md` | `Discovery/_context.md` §2 |
|
|
288
|
+
| Requirements & user stories | `Discovery/03-business-requirements-to-be.md` | `Discovery/_context.md` §3 |
|
|
289
|
+
| UX design principles | `Discovery/04-ux-design-principles.md` | `Discovery/_context.md` §4 |
|
|
290
|
+
| Architecture & tech stack | `Discovery/05-application-integration-architecture.md` | `Discovery/_context.md` §5 |
|
|
291
|
+
| Security & compliance | `Discovery/06-security-compliance-setup.md` | `Discovery/_context.md` §6 |
|
|
292
|
+
| Roles & identity | `Discovery/07-user-identity-management.md` | `Discovery/_context.md` §7 |
|
|
293
|
+
| Integrations | `Discovery/08-integration-interface-design.md` | `Discovery/_context.md` §8 |
|
|
294
|
+
| QA & testing | `Discovery/09-quality-assurance-testing.md` | `Discovery/_context.md` §9 |
|
|
295
|
+
| Infrastructure & deployment | `Discovery/10-infrastructure-deployment-readiness.md` | `Discovery/_context.md` §10 |
|
|
296
|
+
| Roadmap & release plan | `Discovery/11-project-roadmap-release-planning.md` | `Discovery/_context.md` §11 |
|
|
297
|
+
| Team & delivery model | `Discovery/12-team-delivery-model.md` | `Discovery/_context.md` §12 |
|
|
298
|
+
| Wrap-up & go/no-go | `Discovery/13-discovery-sprint-wrapup.md` | `Discovery/_context.md` §13 |
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Synthesis rules:**
|
|
302
|
+
- Use actual content from the session files, never placeholders
|
|
303
|
+
- If a session is incomplete, note `[Session N incomplete — content pending]` in that section
|
|
304
|
+
- Preserve requirement IDs (FR-xxx, NFR-xxx, US-xxx, EPIC-xxx) exactly as defined
|
|
305
|
+
- Preserve role names (Session 7) and technology choices (Session 5) exactly
|
|
306
|
+
- If the Project Definition document has content not in `_context.md`, merge it in
|
|
307
|
+
- Keep it factual — no interpretation or recommendations, just structured outputs
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
**Step 4: User review**
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
AskUserQuestion([
|
|
315
|
+
{
|
|
316
|
+
header: "Handoff Ready",
|
|
317
|
+
question: "I've synthesized your Discovery Sprint into Discovery/_pp-handoff.md.\n\nSummary:\n- {epic_count} EPICs, {story_count} user stories\n- {fr_count} functional / {nfr_count} non-functional requirements\n- Tech stack: {stack_summary}\n- {role_count} user roles, {integration_count} integrations, {phase_count} phases\n- {incomplete_sessions} incomplete sessions (if any)\n\nReview the file and confirm to proceed with pp-core initialization.",
|
|
318
|
+
multiSelect: false,
|
|
319
|
+
options: [
|
|
320
|
+
{ label: "Initialize pp-core", description: "Generate .planning/ from this handoff document (Recommended)" },
|
|
321
|
+
{ label: "Review first", description: "Check Discovery/_pp-handoff.md before proceeding" },
|
|
322
|
+
{ label: "Regenerate", description: "Something looks off — resynthesize from discovery" }
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
])
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**If "Review first":** Wait for the user to review, then remind them to say "continue" or
|
|
329
|
+
re-run `/pp-build-handoff` when ready.
|
|
330
|
+
|
|
331
|
+
**If "Regenerate":** Ask what's wrong, adjust, and regenerate Step 3.
|
|
332
|
+
|
|
333
|
+
**If "Initialize pp-core":** Proceed to Step 5.
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
**Step 5: Initialize pp-core**
|
|
338
|
+
|
|
339
|
+
Do NOT literally run `/pp-new-project` as a slash command from within this workflow.
|
|
340
|
+
Execute the initialization inline using the same `pp_run` tool calls the new-project
|
|
341
|
+
workflow uses.
|
|
342
|
+
|
|
343
|
+
### 5a. Run init
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
mkdir -p .planning
|
|
347
|
+
INIT=$(pp_run query init.new-project 2>/dev/null)
|
|
348
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
349
|
+
echo "$INIT"
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### 5b. Collect preferences
|
|
353
|
+
|
|
354
|
+
Ask the pp-core configuration questions — identical to `/pp-new-project` Step 2a:
|
|
355
|
+
|
|
356
|
+
```
|
|
357
|
+
AskUserQuestion([
|
|
358
|
+
{ header: "Granularity", question: "How finely should scope be sliced into phases?", multiSelect: false, options: [
|
|
359
|
+
{ label: "Coarse (Recommended)", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
|
|
360
|
+
{ label: "Standard", description: "Balanced (5-8 phases, 3-5 plans each)" },
|
|
361
|
+
{ label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" } ] },
|
|
362
|
+
{ header: "Execution", question: "Run plans in parallel?", multiSelect: false, options: [
|
|
363
|
+
{ label: "Parallel (Recommended)", description: "Independent plans run simultaneously" },
|
|
364
|
+
{ label: "Sequential", description: "One plan at a time" } ] },
|
|
365
|
+
{ header: "Git Tracking", question: "Commit planning docs to git?", multiSelect: false, options: [
|
|
366
|
+
{ label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
|
|
367
|
+
{ label: "No", description: "Keep .planning/ local-only" } ] }
|
|
368
|
+
])
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
AskUserQuestion([
|
|
373
|
+
{ header: "Research", question: "Research before planning each phase?", multiSelect: false, options: [
|
|
374
|
+
{ label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
|
|
375
|
+
{ label: "No", description: "Plan directly — Discovery already covered the research" } ] },
|
|
376
|
+
{ header: "Plan Check", question: "Verify plans will achieve their goals?", multiSelect: false, options: [
|
|
377
|
+
{ label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
|
|
378
|
+
{ label: "No", description: "Execute plans without verification" } ] },
|
|
379
|
+
{ header: "Verifier", question: "Verify work after each phase?", multiSelect: false, options: [
|
|
380
|
+
{ label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
|
|
381
|
+
{ label: "No", description: "Trust execution, skip verification" } ] },
|
|
382
|
+
{ header: "AI Models", question: "Which models for planning agents?", multiSelect: false, options: [
|
|
383
|
+
{ label: "Balanced (Recommended)", description: "Sonnet for most agents" },
|
|
384
|
+
{ label: "Quality", description: "Opus for research/roadmap" },
|
|
385
|
+
{ label: "Budget", description: "Haiku where possible" },
|
|
386
|
+
{ label: "Inherit", description: "Use the current session model for all agents" } ] }
|
|
387
|
+
])
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### 5c. Create config.json
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
pp_run config-new-project '{"mode":"yolo","granularity":"{selected}","parallelization":{true|false},"commit_docs":{true|false},"model_profile":"{selected}","workflow":{"research":{true|false},"plan_check":{true|false},"verifier":{true|false},"nyquist_validation":false,"auto_advance":true}}'
|
|
394
|
+
pp_run commit "chore: add project config" --files .planning/config.json
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
### 5d. Generate PROJECT.md
|
|
398
|
+
|
|
399
|
+
Read `Discovery/_pp-handoff.md` and synthesize `.planning/PROJECT.md` using the pp-core
|
|
400
|
+
project template structure: use "What We're Building" as the description, include all
|
|
401
|
+
Key Decisions, list requirements in Validated/Active/Out-of-Scope form, and reference
|
|
402
|
+
Discovery artifacts (the section is added in Step 6a).
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
pp_run commit "docs: initialize project from Discovery Sprint" --files .planning/PROJECT.md
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### 5e. Generate REQUIREMENTS.md
|
|
409
|
+
|
|
410
|
+
From the Functional Requirements section: map EPICs to requirement groups, user stories
|
|
411
|
+
to individual requirements, include NFRs and Business Rules, preserve all original IDs
|
|
412
|
+
(FR-xxx, NFR-xxx, US-xxx), and mark all requirements active.
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
pp_run commit "docs: requirements from Discovery Sprint" --files .planning/REQUIREMENTS.md
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### 5f. Generate ROADMAP.md
|
|
419
|
+
|
|
420
|
+
From the Roadmap & Phasing section: map Discovery phases to pp-core phases, derive phase
|
|
421
|
+
goals from EPIC scope, set dependencies from build-order preferences, and include the
|
|
422
|
+
milestone name (Session 11, or default "v1.0 — MVP").
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
pp_run commit "docs: roadmap from Discovery Sprint" --files .planning/ROADMAP.md
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### 5g. Initialize STATE.md
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
pp_run state-init 2>/dev/null
|
|
432
|
+
pp_run commit "docs: initialize state" --files .planning/STATE.md
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
**Step 6: Wire Discovery references**
|
|
438
|
+
|
|
439
|
+
### 6a. Patch PROJECT.md
|
|
440
|
+
|
|
441
|
+
Append a Discovery Artifacts section to `.planning/PROJECT.md`:
|
|
442
|
+
|
|
443
|
+
```markdown
|
|
444
|
+
## Discovery Artifacts
|
|
445
|
+
|
|
446
|
+
This project was initialized from a completed Pareto Discovery Sprint ({completed_count}/13 sessions).
|
|
447
|
+
Discovery outputs are the source of truth for business decisions and requirements rationale.
|
|
448
|
+
|
|
449
|
+
### Key References
|
|
450
|
+
|
|
451
|
+
| Topic | File | Use When |
|
|
452
|
+
|-------|------|----------|
|
|
453
|
+
| All decisions (accumulated) | `Discovery/_context.md` | Understanding why a decision was made |
|
|
454
|
+
| pp-core handoff synthesis | `Discovery/_pp-handoff.md` | Complete structured summary of all sessions |
|
|
455
|
+
| Business requirements | `Discovery/03-business-requirements-to-be.md` | Detailed EPICs, user stories, acceptance criteria |
|
|
456
|
+
| Architecture decisions | `Discovery/05-application-integration-architecture.md` | Tech stack rationale, ADRs, component design |
|
|
457
|
+
| Security requirements | `Discovery/06-security-compliance-setup.md` | Compliance, encryption, audit requirements |
|
|
458
|
+
| Role definitions | `Discovery/07-user-identity-management.md` | RBAC model, permissions, identity provider |
|
|
459
|
+
| Integration specs | `Discovery/08-integration-interface-design.md` | External system interfaces, protocols, data flows |
|
|
460
|
+
| QA strategy | `Discovery/09-quality-assurance-testing.md` | Test types, coverage targets, quality gates |
|
|
461
|
+
| Release plan | `Discovery/11-project-roadmap-release-planning.md` | Sprint plan, milestones, build order |
|
|
462
|
+
| Interactive prototype | `prototype/` | Visual reference for UI implementation |
|
|
463
|
+
|
|
464
|
+
### How pp-core Agents Should Use Discovery
|
|
465
|
+
|
|
466
|
+
- **During discuss phases:** Reference specific sessions when answering gray-area questions
|
|
467
|
+
- **During research:** Check Discovery sessions before external research — many answers are already there
|
|
468
|
+
- **During planning:** Use requirement IDs from Discovery (FR-xxx, US-xxx) in plan references
|
|
469
|
+
- **During verification:** Trace completed work back to Discovery requirements
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
```bash
|
|
473
|
+
pp_run commit "docs: add Discovery artifacts reference to PROJECT.md" --files .planning/PROJECT.md
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### 6b. Update CLAUDE.md
|
|
477
|
+
|
|
478
|
+
Inject a Discovery Sprint Context block into the project's `CLAUDE.md` (idempotent —
|
|
479
|
+
replace an existing block if present, otherwise append):
|
|
480
|
+
|
|
481
|
+
```markdown
|
|
482
|
+
## Discovery Sprint Context
|
|
483
|
+
|
|
484
|
+
This project has a completed Discovery Sprint in `Discovery/`. pp-core agents should:
|
|
485
|
+
|
|
486
|
+
1. **Check Discovery before asking the user** — most business and architecture decisions are already documented
|
|
487
|
+
2. **Reference `Discovery/_context.md`** for accumulated cross-session decisions
|
|
488
|
+
3. **Reference `Discovery/_pp-handoff.md`** for the structured synthesis used to initialize pp-core
|
|
489
|
+
4. **Use original requirement IDs** (FR-xxx, NFR-xxx, US-xxx, EPIC-xxx) from Discovery in plans and commits
|
|
490
|
+
5. **Reference specific session files** when a phase involves topics covered in that session:
|
|
491
|
+
- Auth/roles → Session 7 (`Discovery/07-user-identity-management.md`)
|
|
492
|
+
- Integrations → Session 8 (`Discovery/08-integration-interface-design.md`)
|
|
493
|
+
- UI/UX → Session 4 (`Discovery/04-ux-design-principles.md`) + `prototype/`
|
|
494
|
+
- Security → Session 6 (`Discovery/06-security-compliance-setup.md`)
|
|
495
|
+
- Testing → Session 9 (`Discovery/09-quality-assurance-testing.md`)
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
```bash
|
|
499
|
+
git add CLAUDE.md && git commit -m "docs: add Discovery Sprint context to CLAUDE.md"
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### 6c. Create GitHub issues from requirements (optional, best-effort)
|
|
503
|
+
|
|
504
|
+
Push EPICs and user stories to GitHub as issues so the backlog is visible on a project
|
|
505
|
+
board. This step is optional and self-contained — it uses the GitHub CLI directly and
|
|
506
|
+
skips cleanly when the CLI is unavailable.
|
|
507
|
+
|
|
508
|
+
```bash
|
|
509
|
+
gh auth status >/dev/null 2>&1 && gh repo view --json nameWithOwner -q '.nameWithOwner' 2>/dev/null && echo "GH_OK" || echo "GH_SKIP"
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
**If GH_SKIP:** Skip to Step 7 with a note:
|
|
513
|
+
```
|
|
514
|
+
Skipping GitHub board sync — no authenticated GitHub CLI or no remote repo.
|
|
515
|
+
You can create issues later once a remote is configured.
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**If GH_OK:** Ask whether to push:
|
|
519
|
+
|
|
520
|
+
```
|
|
521
|
+
AskUserQuestion([
|
|
522
|
+
{
|
|
523
|
+
header: "GitHub Board",
|
|
524
|
+
question: "Push requirements to GitHub as issues?",
|
|
525
|
+
multiSelect: false,
|
|
526
|
+
options: [
|
|
527
|
+
{ label: "Yes (Recommended)", description: "Create EPIC + user story issues in the repo" },
|
|
528
|
+
{ label: "Skip", description: "I'll manage the board manually" }
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
])
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
**If "Yes":** For each EPIC and user story from the handoff document, create an issue
|
|
535
|
+
with `gh issue create` (title, labels `epic`/`user-story`, body referencing the Discovery
|
|
536
|
+
source). Then write `.planning/github-issues.json` mapping each requirement ID to its
|
|
537
|
+
issue number, and commit it:
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
pp_run commit "docs: GitHub issue mapping" --files .planning/github-issues.json
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
Keep this step resilient: if any `gh` call fails, surface the error and continue — a
|
|
544
|
+
failed board sync must not abort the handoff.
|
|
545
|
+
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
**Step 7: Scaffold application (optional)**
|
|
549
|
+
|
|
550
|
+
**Only if `--scaffold` is present.** Read the tech stack from the handoff document
|
|
551
|
+
(Session 5) and, after confirming with the user, create a lightweight application
|
|
552
|
+
structure — folder layout, `package.json`/config files, and entry points. pp-core
|
|
553
|
+
Phase 1 fleshes it out.
|
|
554
|
+
|
|
555
|
+
---
|
|
556
|
+
|
|
557
|
+
**Step 8: Handoff summary**
|
|
558
|
+
|
|
559
|
+
```
|
|
560
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
561
|
+
PARETO BUILD HANDOFF — Complete
|
|
562
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
563
|
+
|
|
564
|
+
Discovery Sprint → pp-core transition successful.
|
|
565
|
+
|
|
566
|
+
Created:
|
|
567
|
+
Discovery/_pp-handoff.md Synthesized discovery outputs
|
|
568
|
+
.planning/PROJECT.md Project context for pp-core
|
|
569
|
+
.planning/REQUIREMENTS.md {req_count} requirements from {epic_count} EPICs
|
|
570
|
+
.planning/ROADMAP.md {phase_count} phases mapped from Discovery roadmap
|
|
571
|
+
.planning/STATE.md Project state tracker
|
|
572
|
+
.planning/config.json pp-core configuration
|
|
573
|
+
.planning/github-issues.json Requirement → GitHub issue mapping (if pushed)
|
|
574
|
+
CLAUDE.md Updated with Discovery references
|
|
575
|
+
|
|
576
|
+
Discovery Traceability:
|
|
577
|
+
Discovery sessions → _pp-handoff.md → pp-core artifacts → (optional) GitHub issues
|
|
578
|
+
Requirement IDs (FR-xxx, US-xxx) carry through the full chain
|
|
579
|
+
|
|
580
|
+
Next steps:
|
|
581
|
+
1. Run /pp-plan-phase 1 to create the first phase plan
|
|
582
|
+
2. Or run /pp-autonomous to execute all phases automatically
|
|
583
|
+
|
|
584
|
+
Quality drives speed. Discovery done, now build.
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
</process>
|
|
588
|
+
|
|
589
|
+
<success_criteria>
|
|
590
|
+
- Discovery completion validated (or the user acknowledged gaps)
|
|
591
|
+
- All session content read and synthesized into `Discovery/_pp-handoff.md`
|
|
592
|
+
- Synthesis preserves original requirement IDs, role names, and tech choices
|
|
593
|
+
- pp-core initialized with PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md, config.json
|
|
594
|
+
- PROJECT.md contains a Discovery Artifacts reference section
|
|
595
|
+
- CLAUDE.md updated with Discovery Sprint context
|
|
596
|
+
- GitHub issues created for EPICs and user stories when a repo is available (best-effort)
|
|
597
|
+
- The user knows the next steps (plan phase 1 or autonomous)
|
|
598
|
+
</success_criteria>
|