@pareto4/pp-core 1.21.1 → 1.23.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/bin/install.js +205 -28
- package/commands/pp-help.md +2 -1
- package/gemini-extension.json +1 -1
- package/hooks/dist/pp-check-update-worker.js +1 -1
- package/hooks/dist/pp-context-monitor.js +3 -3
- package/hooks/dist/pp-statusline.js +88 -14
- package/hooks/dist/pp-update-banner.js +44 -4
- package/hooks/dist/pp-workflow-guard.js +3 -3
- package/hooks/pp-check-update-worker.js +1 -1
- package/hooks/pp-context-monitor.js +3 -3
- package/hooks/pp-statusline.js +88 -14
- package/hooks/pp-update-banner.js +44 -4
- package/hooks/pp-workflow-guard.js +3 -3
- package/package.json +2 -2
- package/pp-core/bin/lib/audience-command.cjs +271 -0
- package/pp-core/bin/lib/audience.cjs +293 -0
- package/pp-core/bin/lib/commands.cjs +26 -17
- package/pp-core/bin/lib/discovery-charter.cjs +13 -1
- package/pp-core/bin/lib/discovery-flow-page.cjs +191 -0
- package/pp-core/bin/lib/discovery-for-phase.cjs +33 -5
- package/pp-core/bin/lib/discovery-input-check.cjs +11 -11
- package/pp-core/bin/lib/discovery-processes.cjs +97 -4
- package/pp-core/bin/lib/discovery-session-check.cjs +7 -7
- package/pp-core/bin/lib/discovery-status.cjs +419 -0
- package/pp-core/bin/lib/discovery-stories.cjs +36 -5
- package/pp-core/bin/lib/discovery-tests.cjs +398 -0
- package/pp-core/bin/lib/explain-command.cjs +48 -0
- package/pp-core/bin/lib/gate-card.cjs +97 -0
- package/pp-core/bin/lib/hook-messages.cjs +132 -0
- package/pp-core/bin/lib/init-contract.cjs +116 -76
- package/pp-core/bin/lib/init-interactive.cjs +110 -49
- package/pp-core/bin/lib/init.cjs +44 -3
- package/pp-core/bin/lib/io.cjs +38 -0
- package/pp-core/bin/lib/message-labels.cjs +75 -0
- package/pp-core/bin/lib/messages/core.cjs +20 -0
- package/pp-core/bin/lib/messages/discovery.cjs +267 -0
- package/pp-core/bin/lib/messages/gate.cjs +257 -0
- package/pp-core/bin/lib/messages/hook.cjs +114 -0
- package/pp-core/bin/lib/messages/init.cjs +513 -0
- package/pp-core/bin/lib/messages/progress.cjs +110 -0
- package/pp-core/bin/lib/messages.cjs +208 -0
- package/pp-core/bin/lib/vault-command-router.cjs +16 -3
- package/pp-core/bin/lib/violation-render.cjs +78 -0
- package/pp-core/bin/pp-tools.cjs +92 -23
- package/pp-core/bin/shared/config-schema.manifest.json +1 -0
- package/pp-core/references/audience-moments.md +119 -0
- package/pp-core/references/audience.md +114 -0
- package/pp-core/references/discovery-build-consumption.md +5 -2
- package/pp-core/references/discovery-charter.md +2 -2
- package/pp-core/references/discovery-id-conventions.md +1 -1
- package/pp-core/references/discovery-processes.md +31 -7
- package/pp-core/references/discovery-session-output.md +1 -1
- package/pp-core/references/discovery-tests.md +186 -0
- package/pp-core/templates/project-charter.md +3 -4
- package/pp-core/workflows/add-phase.md +2 -0
- package/pp-core/workflows/add-tests.md +2 -0
- package/pp-core/workflows/add-todo.md +2 -0
- package/pp-core/workflows/ai-integration-phase.md +2 -0
- package/pp-core/workflows/audit-milestone.md +2 -0
- package/pp-core/workflows/autonomous.md +2 -0
- package/pp-core/workflows/check-todos.md +2 -0
- package/pp-core/workflows/code-review-fix.md +2 -0
- package/pp-core/workflows/code-review.md +2 -0
- package/pp-core/workflows/complete-milestone.md +10 -1
- package/pp-core/workflows/discovery-sprint/charter.md +3 -2
- package/pp-core/workflows/discovery-sprint/prefill.md +3 -0
- package/pp-core/workflows/discovery-sprint/prototype.md +14 -0
- package/pp-core/workflows/discovery-sprint/session-13-gates.md +2 -0
- package/pp-core/workflows/discovery-sprint/sessions/01-kick-off.md +4 -1
- package/pp-core/workflows/discovery-sprint/sessions/03-to-be.md +135 -76
- package/pp-core/workflows/discovery-sprint/sessions/09-qa.md +94 -64
- package/pp-core/workflows/discovery-sprint/sessions/13-wrap-up.md +3 -2
- package/pp-core/workflows/discovery-sprint/vault-context.md +15 -0
- package/pp-core/workflows/discovery-sprint.md +16 -2
- package/pp-core/workflows/discovery-to-build/steps/handoff-gates.md +16 -9
- package/pp-core/workflows/discovery-to-build/templates/discovery-references.md +1 -1
- package/pp-core/workflows/discovery-to-build/templates/pp-handoff.md +9 -1
- package/pp-core/workflows/discovery-to-build.md +10 -4
- package/pp-core/workflows/discuss-phase/discovery.md +2 -2
- package/pp-core/workflows/discuss-phase-assumptions.md +2 -0
- package/pp-core/workflows/discuss-phase.md +1 -1
- package/pp-core/workflows/edit-phase.md +2 -0
- package/pp-core/workflows/eval-review.md +2 -0
- package/pp-core/workflows/execute-phase/steps/check-query-gate.md +25 -1
- package/pp-core/workflows/execute-phase/steps/vault-fetch.md +1 -0
- package/pp-core/workflows/execute-phase/steps/vault-load-gate.md +2 -0
- package/pp-core/workflows/execute-phase.md +1 -1
- package/pp-core/workflows/execute-plan.md +2 -0
- package/pp-core/workflows/extract-learnings.md +2 -0
- package/pp-core/workflows/help/modes/business.md +56 -0
- package/pp-core/workflows/help.md +12 -2
- package/pp-core/workflows/import.md +10 -1
- package/pp-core/workflows/ingest-docs.md +2 -0
- package/pp-core/workflows/init.md +17 -1
- package/pp-core/workflows/insert-phase.md +2 -0
- package/pp-core/workflows/list-workspaces.md +2 -0
- package/pp-core/workflows/manager.md +2 -0
- package/pp-core/workflows/map-codebase.md +2 -0
- package/pp-core/workflows/milestone-summary.md +2 -0
- package/pp-core/workflows/new-milestone.md +10 -1
- package/pp-core/workflows/new-project.md +12 -2
- package/pp-core/workflows/new-workspace.md +2 -0
- package/pp-core/workflows/next.md +8 -0
- package/pp-core/workflows/plan-milestone-gaps.md +10 -1
- package/pp-core/workflows/plan-phase.md +2 -1
- package/pp-core/workflows/plan-review-convergence.md +1 -1
- package/pp-core/workflows/progress.md +10 -0
- package/pp-core/workflows/quick.md +11 -1
- package/pp-core/workflows/remove-phase.md +2 -0
- package/pp-core/workflows/remove-workspace.md +2 -0
- package/pp-core/workflows/resume-project.md +25 -0
- package/pp-core/workflows/review.md +2 -0
- package/pp-core/workflows/scan.md +2 -0
- package/pp-core/workflows/secure-phase.md +2 -0
- package/pp-core/workflows/settings.md +41 -0
- package/pp-core/workflows/ship.md +2 -0
- package/pp-core/workflows/spec-phase.md +1 -1
- package/pp-core/workflows/ui-phase.md +2 -0
- package/pp-core/workflows/ui-review.md +2 -0
- package/pp-core/workflows/ultraplan-phase.md +2 -0
- package/pp-core/workflows/validate-phase.md +2 -0
- package/pp-core/workflows/vault-review.md +2 -0
- package/pp-core/workflows/verify-phase.md +2 -0
- package/pp-core/workflows/verify-work.md +2 -0
- package/scripts/affected-tests-lib.cjs +26 -12
- package/scripts/ci-release-only.cjs +158 -0
- package/scripts/live-runs/driver.cjs +326 -0
- package/scripts/live-runs/run.cjs +906 -0
- package/scripts/live-runs/scenarios.cjs +326 -0
- package/scripts/live-runs/scratch-project.cjs +132 -0
- package/scripts/live-runs/scrub.cjs +291 -0
- package/scripts/live-runs/turn-guard.cjs +107 -0
- package/scripts/live-runs/walk-setup.cjs +198 -0
- package/scripts/run-tests.cjs +151 -132
- package/scripts/test-env.cjs +64 -0
|
@@ -5,43 +5,62 @@
|
|
|
5
5
|
|
|
6
6
|
### Session 9: Quality Assurance & Testing Strategy
|
|
7
7
|
|
|
8
|
-
**Goal:**
|
|
8
|
+
**Goal:** Decide where the testing effort goes. Review every story's acceptance criteria for testability, choose by risk which main processes get an end-to-end test, name the complex parts of the solution that need extra test attention, confirm the test levels, environments and gates against the client's standards, and agree how UAT is run and signed off.
|
|
9
|
+
|
|
10
|
+
**Who is in the room.** The client's test manager (or QA lead) leads this session; the product owner decides what "accepted" means; the architect knows where the solution is hard. Without a test manager, the product owner takes the risk calls and the session records that as a Key Decision.
|
|
11
|
+
|
|
12
|
+
**How testing works in this delivery — say this first, in a minute.** The agents write the tests, before the code, from the acceptance criteria; every change runs the same checks; an agent never marks its own work — a separate verifier reads the acceptance criteria verbatim and decides pass or fail. So this session does not choose test tools or write test cases. It makes the calls the agents cannot: what "done" means for each story, where the business risk is, which parts are hard enough that ordinary tests will miss their failures, and who signs off.
|
|
13
|
+
|
|
14
|
+
**Inputs — read before topic 1.** `.planning/discovery/_stories.md` (the acceptance criteria); `.planning/discovery/_processes.md` § As-is (`Criticality`), § To-be and § Steps; `.planning/discovery/_rules.md`; `.planning/discovery/_roles.md`; `.planning/discovery/_integrations.md` and `_migration.md` when they exist; `.planning/discovery/_entities.md` (the classification Session 6 copied in); `session-05.md` **Component Inventory**; `session-06.md` **Compliance Requirements Register**; `session-04.md` (the accessibility level); the `N-` rows of `_requirements.md`.
|
|
15
|
+
|
|
16
|
+
**The register.** Copy the bootstrap template of `${PP_TOOLS%/bin/pp-tools.cjs}/references/discovery-tests.md` to `.planning/discovery/_tests.md` before topic 2 (replace `[PROJECT_NAME]`). Topics 2–4 fill it; the reference holds the cell grammar and the risk matrix.
|
|
9
17
|
|
|
10
18
|
**Standards first.** Where a document this session's `## Vault Context` record names already fixes a test level, a coverage bar, a tool, the environments, a merge or release gate, do not ask the open question: present the vault's answer — "the vault fixes X `[vault: <path>]` — does this product deviate, and why?" — and record the standard in the **Standards Applied** row for that area. A deviation is one `DEV-<nn>` row of `.planning/discovery/_deviations.md` (template and grammar: `${PP_TOOLS%/bin/pp-tools.cjs}/references/discovery-standards.md`; create the file on first need) plus a Key Decisions row `D-09-<n>`, both cited in the Standards Applied row; never recommend an alternative the standards rule out. An area no standard covers reads `not in vault` and keeps its question open. With no vault bound, every question below stays open-ended.
|
|
11
19
|
|
|
12
20
|
**What We Cover:**
|
|
13
21
|
|
|
14
|
-
1. **Test
|
|
15
|
-
*Why it matters:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
22
|
+
1. **Test approach and standards**
|
|
23
|
+
*Why it matters: the levels, coverage bar and gates are what every change is checked against for the life of the product. Skip when: never — but with a vault bound this is a quick confirmation, not a discussion.*
|
|
24
|
+
- Walk the test levels — unit, integration, end-to-end, performance, security, accessibility — and for each say who writes the tests (agents), what runs them (the pipeline, on every change, or before a release) and what a person decides. Record it in **Test Approach**.
|
|
25
|
+
- Coverage bar and tooling: the vault's coding standards and quality gates fix them when bound — does this product deviate, and why? Otherwise: which coverage target, which frameworks? Settle it in one pass; tool choice is not this session's job.
|
|
26
|
+
- Does the client's test manager have an existing test policy or test strategy this product must follow? Note it in the Standards Applied row, cited as an input-package document `[NN]` when it is one.
|
|
27
|
+
|
|
28
|
+
2. **Testability review of the acceptance criteria**
|
|
29
|
+
*Why it matters: the build's verifier reads each story's acceptance criteria verbatim as the test (`references/discovery-build-consumption.md`). Criteria it cannot check — "works correctly", "is user-friendly", "as in the old system" — pass whatever is built. Skip when: never.*
|
|
30
|
+
- Walk `_stories.md` § Stories with the test manager, story by story. For each: does it name an outcome someone can observe? With which data? As which role (a role of `_roles.md`)? Where does it end — what is on screen, in the data, sent to another system?
|
|
31
|
+
- A weak criterion is rewritten now, in `_stories.md`, with `→ amended by D-09-<n>` in the cell; the row in `_tests.md` § Acceptance reads `amended (D-09-<n>)`. One the room cannot settle gets an action `A-09-<n>` with an owner and reads `open (A-09-<n>)` — the handoff refuses it, so it has to be closed before the build starts.
|
|
32
|
+
- Fill one `## Acceptance` row per story: `Testable`, `Role`, `Test data`.
|
|
33
|
+
|
|
34
|
+
3. **Risk-based selection of end-to-end processes**
|
|
35
|
+
*Why it matters: an end-to-end test proves that the steps of a process work together, across roles, screens, rules and interfaces — and it is the most expensive test to build and keep running. Spend it where a failure hurts most. Skip when: never; with one main process, assess the one.*
|
|
36
|
+
- For each main process of `_processes.md` § To-be, rate with the test manager:
|
|
37
|
+
- **Impact** — what breaks for the business if this process fails in production: money, legal or regulatory exposure, customers affected, data that cannot be repaired? Start from the `Criticality` of the as-is processes it replaces and the classification of the entities its steps touch.
|
|
38
|
+
- **Likelihood** — how likely is it to break: new rather than replaced, many steps, several interfaces or business rules in its step matrix, new technology, a migration feeding it, untested exception paths?
|
|
39
|
+
- The risk follows from the two by the matrix in `references/discovery-tests.md`. A `high` risk process gets an end-to-end test; not testing one end to end is a Key Decision `D-09-<n>` cited in the row's `Rationale`. A `medium` or `low` process may still get one when the room sees a reason.
|
|
40
|
+
- For every `yes`: as which roles does the test walk the process, and with what test data? Fill one `## Process risk` row per main process.
|
|
41
|
+
|
|
42
|
+
4. **Complex components that need extra test attention**
|
|
43
|
+
*Why it matters: step tests written from acceptance criteria check the expected path. They miss the failures that live in branching rules, timing, concurrency, volume, money and other parties' systems — so those parts need tests designed for how they fail. Skip when: the architect and the test manager agree nothing is complex; write `None identified in Discovery.` under **Focus Areas**.*
|
|
44
|
+
- Ask the architect: which components of Session 5's **Component Inventory** are hardest — the most logic, state, concurrency or performance pressure?
|
|
45
|
+
- Walk the candidates the earlier sessions already flagged: business rules in `_rules.md` with many branches or thresholds; interfaces in `_integrations.md` that are asynchronous, at-least-once or owned by a party that changes them (Session 8's consistency model); `_migration.md` rows with large volumes or messy mappings; entities Session 6 classified `Restricted`.
|
|
46
|
+
- For each subject the room picks: what makes it complex, and what testing goes beyond the step tests — a test per row of a decision table, boundary values, property-based tests, contract tests against the provider, duplicate and out-of-order delivery, a migration rehearsal with reconciliation counts, a load test with a target number, a security test against a named threat? Fill one `## Focus areas` row per subject, with the requirements it realises.
|
|
47
|
+
|
|
48
|
+
5. **Tests that follow from earlier sessions**
|
|
49
|
+
*Why it matters: the earlier sessions already decided much of what must be tested; the build derives those tests from the registers, so this session only confirms nothing is missing. Skip when: never — it takes minutes.*
|
|
50
|
+
- Present, do not re-ask: every role and screen in `_roles.md` gets a forbidden-path test (a role reaching what it may not); every `## Errors` row of `_integrations.md` a failure test; every Session 6 compliance requirement (`CR-`) and audit-logging row a security or audit test; Session 4's accessibility level an automated accessibility check; every `N-` requirement with a number (response time, volume, availability) a performance or availability test with that number.
|
|
51
|
+
- Ask the test manager: is a risk missing that none of these covers? Record it as a Focus areas row or a Key Decision.
|
|
52
|
+
|
|
53
|
+
6. **Test environments and test data**
|
|
54
|
+
*Why it matters: environment count and refresh cadence feed Session 10's infrastructure sizing; test data decides whether the end-to-end tests and UAT can run at all. Skip when: a single shared environment is acceptable for this scale of project — still answer the test-data question.*
|
|
55
|
+
- Which environments: when a vault is bound, start from the environments its naming standard defines and record only deviations; otherwise choose (dev, test, acceptance, production).
|
|
56
|
+
- Where does test data come from — synthetic data, seed scripts, anonymised production data? Session 6's classification decides what may leave production: `Confidential` and `Restricted` data is never copied unmasked.
|
|
57
|
+
- Who refreshes the data, and how often?
|
|
58
|
+
|
|
59
|
+
7. **UAT and sign-off**
|
|
60
|
+
*Why it matters: UAT sign-off is what Session 13's go/no-go and every release checks against. Skip when: an internal tool with no formal business acceptance step — record who accepts instead.*
|
|
61
|
+
- What does UAT consist of here: the end-to-end processes of topic 3, walked by business users, plus the stories accepted on their criteria? Which processes does the business walk by hand?
|
|
62
|
+
- Who performs UAT, who signs off, and on what criteria (for example: every high-risk process passed, no open severity-1 or severity-2 defects)?
|
|
63
|
+
- How are defects found in UAT classified and triaged, and who decides a release may go with known defects?
|
|
45
64
|
|
|
46
65
|
**Notes Template:**
|
|
47
66
|
|
|
@@ -49,6 +68,7 @@
|
|
|
49
68
|
|
|
50
69
|
| Area | Standard | Deviation | Decision |
|
|
51
70
|
|------|----------|-----------|----------|
|
|
71
|
+
| Test policy | | | |
|
|
52
72
|
| Test levels and coverage | | | |
|
|
53
73
|
| Test tooling | | | |
|
|
54
74
|
| Environments | | | |
|
|
@@ -56,58 +76,64 @@
|
|
|
56
76
|
| Release gates | | | |
|
|
57
77
|
| UAT and sign-off | | | |
|
|
58
78
|
|
|
59
|
-
**Standard** is the governing document's `[vault: <rel path>]` citation, or `not in vault`. **Deviation** is `none` or the `DEV-<nn>` of the `_deviations.md` row. **Decision** is `—` or the `D-09-<n>` that records the deviation or the decision taken for an uncovered area (`references/discovery-standards.md`).
|
|
79
|
+
**Standard** is the governing document's `[vault: <rel path>]` citation, the client's own test policy as an input-package citation `[NN]`, or `not in vault`. **Deviation** is `none` or the `DEV-<nn>` of the `_deviations.md` row. **Decision** is `—` or the `D-09-<n>` that records the deviation or the decision taken for an uncovered area (`references/discovery-standards.md`).
|
|
80
|
+
|
|
81
|
+
**Test Approach**
|
|
82
|
+
|
|
83
|
+
| Test level | What it proves | Written by | Runs | Person decides | Standard or target |
|
|
84
|
+
|-----------|----------------|------------|------|----------------|--------------------|
|
|
85
|
+
| Unit | | | | | |
|
|
86
|
+
| Integration | | | | | |
|
|
87
|
+
| End-to-end | | | | | |
|
|
88
|
+
| Performance | | | | | |
|
|
89
|
+
| Security | | | | | |
|
|
90
|
+
| Accessibility | | | | | |
|
|
91
|
+
| User acceptance | | | | | |
|
|
60
92
|
|
|
61
|
-
**
|
|
93
|
+
**Written by** is `Agents` for every automated level and `People` for user acceptance; **Runs** is `Every change`, `Before release` or a schedule; **Person decides** is what a human owns at that level (the coverage bar, the processes chosen, the sign-off). End-to-end proves the processes chosen in `_tests.md` § Process risk.
|
|
62
94
|
|
|
63
|
-
|
|
64
|
-
|-----------|-------|-----------------|-----------------|-------|-------------|---------------|
|
|
65
|
-
| Unit | | | | | | |
|
|
66
|
-
| Integration | | | | | | |
|
|
67
|
-
| System / E2E | | | | | | |
|
|
68
|
-
| Performance | | | | | | |
|
|
69
|
-
| Security | | | | | | |
|
|
70
|
-
| Accessibility | | | | | | |
|
|
95
|
+
**Acceptance Review**
|
|
71
96
|
|
|
72
|
-
|
|
97
|
+
The rows live in `.planning/discovery/_tests.md` § Acceptance. Record here only the totals and what the room learned: stories reviewed, how many were `yes`, `amended` and `open`, and the patterns behind the weak criteria (to feed back into Session 3's way of writing them).
|
|
73
98
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
99
|
+
**Process Risk**
|
|
100
|
+
|
|
101
|
+
The rows live in `.planning/discovery/_tests.md` § Process risk. Record here the main processes chosen for an end-to-end test, one line each with the reason, and any high-risk process deliberately left without one with its `D-09-<n>`.
|
|
102
|
+
|
|
103
|
+
**Focus Areas**
|
|
104
|
+
|
|
105
|
+
The rows live in `.planning/discovery/_tests.md` § Focus areas. Record here the subjects chosen, one line each, or `None identified in Discovery.`
|
|
81
106
|
|
|
82
107
|
**Test Environment Plan**
|
|
83
108
|
|
|
84
109
|
> **Environments:** when the bound vault names the environments (its naming standard, cited `[vault: <path>]` in this session's record), the rows below carry those names, in the vault's promotion order, and no others — an extra or renamed environment is a Key Decisions row `D-09-<n>`. The preset rows stand only when no vault is bound.
|
|
85
110
|
|
|
86
|
-
| Environment | Purpose |
|
|
87
|
-
|
|
88
|
-
| Dev | | | | | |
|
|
89
|
-
| Test | | | | | |
|
|
90
|
-
|
|
|
91
|
-
| Pre-prod | | | | | | |
|
|
111
|
+
| Environment | Purpose | Test data | Refresh cadence | Access | Owner |
|
|
112
|
+
|-------------|---------|-----------|-----------------|--------|-------|
|
|
113
|
+
| Dev | | | | | |
|
|
114
|
+
| Test | | | | | |
|
|
115
|
+
| Acceptance | | | | | |
|
|
92
116
|
|
|
93
117
|
**Quality Gates**
|
|
94
118
|
|
|
95
|
-
| Gate | Stage | Criteria | Threshold | Blocking? |
|
|
96
|
-
|
|
97
|
-
| Code review |
|
|
98
|
-
| Unit
|
|
99
|
-
| Code coverage |
|
|
100
|
-
|
|
|
119
|
+
| Gate | Stage | Criteria | Threshold | Blocking? | Standard |
|
|
120
|
+
|------|-------|----------|-----------|-----------|----------|
|
|
121
|
+
| Code review | | | | | |
|
|
122
|
+
| Unit and integration tests | | | | | |
|
|
123
|
+
| Code coverage | | | | | |
|
|
124
|
+
| End-to-end tests | | | | | |
|
|
125
|
+
| UAT sign-off | | | | | |
|
|
101
126
|
|
|
102
127
|
**UAT Process**
|
|
103
128
|
|
|
104
129
|
| Aspect | Decision | Notes |
|
|
105
130
|
|--------|----------|-------|
|
|
106
131
|
| UAT participants | | |
|
|
107
|
-
|
|
|
132
|
+
| Processes walked by hand | | |
|
|
108
133
|
| Sign-off criteria | | |
|
|
109
134
|
| Sign-off approver(s) | | |
|
|
110
|
-
| Defect triage
|
|
135
|
+
| Defect severity and triage | | |
|
|
136
|
+
| Release with known defects — who decides | | |
|
|
111
137
|
|
|
112
138
|
**Key Decisions**
|
|
113
139
|
|
|
@@ -120,3 +146,7 @@
|
|
|
120
146
|
| ID | Action | Owner | Due Date | Status |
|
|
121
147
|
|---|--------|-------|----------|--------|
|
|
122
148
|
| | | | | |
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
**Closing Step.** Run `pp_run query discovery.tests-check` — exit 0, or fix the rows it names in `_tests.md`. Faults that mean a topic is unfinished: `process_not_assessed` (topic 3 skipped a main process), `story_not_reviewed` (topic 2 skipped a story), `high_risk_not_end_to_end` (a high-risk process without an end-to-end test and without a decision), `risk_mismatch` (the rating does not follow the matrix). `open` stories and focus areas without requirements are allowed here; the handoff refuses them (`--require-complete`), so each needs its action closed before Session 13.
|
|
@@ -162,6 +162,7 @@ For each group: read all session files — their Notes Template sections and the
|
|
|
162
162
|
- [ ] **Deviations:** every Standards Applied `Deviation` that is not `none` is a `DEV-` row of `_deviations.md`; `discovery deviations-check` exits 0 (standard in the vault cache, approver in the Session 1 Approval Matrix, a decision on every approved or rejected row)
|
|
163
163
|
- [ ] **Session outputs:** `discovery session-check --all` exits 0 (every Notes Template section of every completed session present once, with a data row, prose or `None identified in Discovery.`)
|
|
164
164
|
- [ ] **Requirements traceability:** Every S3 requirement addressable in S5 architecture
|
|
165
|
+
- [ ] **Process coverage:** the S3 **Process Coverage** table names a process or a decision for every persona, entity, external system and scheduled job; `discovery process-check` and `discovery stories-check` exit 0 (every step in one sub-process and in its swimlane, every persona step covered by a story)
|
|
165
166
|
- [ ] **Requirements roll-up:** `discovery rollup --check` exits 0 (totals block matches table)
|
|
166
167
|
- [ ] **Pre-fill/confidential gate:** `discovery input-check` exits 0 (no unconfirmed markers, no tracked confidential files)
|
|
167
168
|
- [ ] **Research-track gate:** `discovery research-check` exits 0 (no structural faults, no stale ⚠️ markers)
|
|
@@ -170,7 +171,7 @@ For each group: read all session files — their Notes Template sections and the
|
|
|
170
171
|
- [ ] **Stakeholder names:** Consistent across all sessions
|
|
171
172
|
- [ ] **KPIs and metrics:** Consistent definitions between S1, S3, S11
|
|
172
173
|
- [ ] **Security constraints:** S6 constraints reflected in S5 and S10
|
|
173
|
-
- [ ] **Test strategy:**
|
|
174
|
+
- [ ] **Test strategy:** `discovery tests-check` exits 0 (every S3 main process risk-rated, every story reviewed for testability, every high-risk process tested end to end or decided otherwise); the S9 focus areas cover the S5 components the architect called complex
|
|
174
175
|
- [ ] **Timeline and capacity:** S11 roadmap feasible given S12 team and S9 test needs
|
|
175
176
|
- [ ] **Action items:** No duplicates or contradictions in `_progress.md`
|
|
176
177
|
- [ ] **Back-amends:** every decision that changes an earlier record has `→ amended by D-<ss>-<n>` at the original line (Flow 2 Step 6)
|
|
@@ -215,6 +216,6 @@ Capture in `.planning/discovery/session-13.md` notes:
|
|
|
215
216
|
|
|
216
217
|
#### 0.5. Draft the Project Charter
|
|
217
218
|
|
|
218
|
-
Read `${PP_TOOLS%/bin/pp-tools.cjs}/workflows/discovery-sprint/charter.md` § **Draft** and follow it: the charter is written to `docs/discovery/PROJECT-CHARTER.md` from `templates/project-charter.md`, in the
|
|
219
|
+
Read `${PP_TOOLS%/bin/pp-tools.cjs}/workflows/discovery-sprint/charter.md` § **Draft** and follow it: the charter is written to `docs/discovery/PROJECT-CHARTER.md` from `templates/project-charter.md`, in the charter language, every section from its source map, `status: Draft`, and `pp_run query discovery.charter-check` exits 0 before you go on. Topics 2 and 3 review and score that document, not a summary of the sessions.
|
|
219
220
|
|
|
220
221
|
Then proceed to Step 5 (Facilitate Session 13 topics).
|
|
@@ -89,6 +89,21 @@ These documents are the binding engineering standards for this work: build to th
|
|
|
89
89
|
Paraphrase at point of use with a `[vault: <rel path>]` citation. Never inline raw vault content
|
|
90
90
|
into the session notes.
|
|
91
91
|
|
|
92
|
+
**Business user (D-14).** When `audience` is `business`, print none of the `vault:` lines this file names. Once the selection is done, say one of these instead, and hand the record back unchanged:
|
|
93
|
+
|
|
94
|
+
Business form: "I have your organisation's standards for this session at hand."
|
|
95
|
+
|
|
96
|
+
Business form: "Your organisation's standards add nothing for this session."
|
|
97
|
+
|
|
98
|
+
Business form: "I could not load your organisation's standards for this session, so I am working without them. Ask your Pareto contact if they should be here."
|
|
99
|
+
|
|
100
|
+
Business form: "I could not check some of your organisation's standards for this session, so I am working without those. Ask your Pareto contact if they should be here."
|
|
101
|
+
|
|
102
|
+
Use the second only when the index was read and nothing in it bore on this session. Use the third
|
|
103
|
+
when there is no cache index (the stop arm below): the standards were not consulted, so never say
|
|
104
|
+
they add nothing. Use the fourth, after the first or on its own, when a selected document was not
|
|
105
|
+
read because the cache index is truncated or the document is not in the cache.
|
|
106
|
+
|
|
92
107
|
**Read order.** Read `.planning/vault/SUMMARY.md` first. It is the engine-written bounded index —
|
|
93
108
|
each cached path with its first heading, not full vault content — and it is what tells you which
|
|
94
109
|
documents actually exist in this client's cache.
|
|
@@ -37,10 +37,14 @@ INIT=$(pp_run query init.phase-op "${SESSION_ARG:-}")
|
|
|
37
37
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
**Audience:** if `audience` is set, Read and follow `{audience_ref}`. Reply in any `response_language` and pass it to subagents; code and paths stay as is.
|
|
41
|
+
|
|
40
42
|
`SESSION_ARG` is the optional session number 1–13, extracted from `$ARGUMENTS` in the block above (empty when no argument was passed).
|
|
41
43
|
|
|
42
44
|
**Text mode:** Set `TEXT_MODE=true` if `--text` is present in `$ARGUMENTS` OR `text_mode` from init JSON is `true`. When TEXT_MODE is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for non-Claude runtimes (Codex, Gemini CLI, etc.) where `AskUserQuestion` is not available.
|
|
43
45
|
|
|
46
|
+
**First run — who you are (D-06):** before dispatching, run `pp_run query audience status --raw`. If `needs_choice` is `true`, show its `prompt` exactly as printed and wait for the reply. Then run `pp_run query audience answer '<reply>'` (the reply in single quotes, with any single quote in it removed) and show its output. If that fails, show the prompt once more, then continue either way. Once an answer is saved, re-run the init call above and apply the **Audience** line to the new `INIT`. Never write `~/.gsd/person.json` yourself. With nobody to answer (a headless run), skip this and save nothing.
|
|
47
|
+
|
|
44
48
|
**Dispatch:**
|
|
45
49
|
- If `FIRST_TOKEN` is `input` → Read `${PP_TOOLS%/bin/pp-tools.cjs}/workflows/discovery-sprint/input-package.md` and follow it. Stop — do not continue into the session flow.
|
|
46
50
|
- Else if `FIRST_TOKEN` is `gap` → Read `${PP_TOOLS%/bin/pp-tools.cjs}/workflows/discovery-sprint/gap-analysis.md` and follow it. Stop. The numeric token is a document accession number, not a session number — the 1–13 range check and `SESSION_INVALID` do not apply here (the subfile re-derives the accession from `$ARGUMENTS` in its Step 0).
|
|
@@ -88,6 +92,8 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
|
88
92
|
|
|
89
93
|
## Flow 1: Show Progress (no argument)
|
|
90
94
|
|
|
95
|
+
**Business user or business engineer (D-14):** when the init payload carries `audience`, run `pp_run query discovery.status` and show its output exactly as printed, with nothing before or after it, instead of steps 1-3 below; it gives the sprint's state and next step in the person's wording. If it exits non-zero or prints nothing, show none of its output and follow steps 1-3 instead, worded for this audience. A developer run follows steps 1-3 as written.
|
|
96
|
+
|
|
91
97
|
1. Read `.planning/discovery/_progress.md`. If not found, tell the user no Discovery Sprint is set up for this project and suggest creating the artifacts first by running `/pp-discovery 1`.
|
|
92
98
|
|
|
93
99
|
2. Parse the Session Progress table and display:
|
|
@@ -114,6 +120,8 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
|
114
120
|
> "Next recommended session: Session N — [Name]. Run `/pp-discovery N` to start."
|
|
115
121
|
- If every session is "Completed", say the Discovery Sprint is complete and report the Project Charter: read the frontmatter of `docs/discovery/PROJECT-CHARTER.md` and state its `version`, `status` and `go_no_go` (`/pp-discovery charter` records signatures; `/pp-discovery-to-build` needs `Signed` or `Signed with conditions`). If the file does not exist, say so and point to `/pp-discovery 13` — its Step 0.5 drafts it.
|
|
116
122
|
|
|
123
|
+
`/pp-progress`, `/pp-progress --next` and `/pp-resume-work` show the same recommendation through `pp_run query discovery.status`, which applies the order above in code (`src/discovery-status.cts`); a change to this order must change it too. That command reports and checks nothing, so it has no Session 13 gate.
|
|
124
|
+
|
|
117
125
|
---
|
|
118
126
|
|
|
119
127
|
## Flow 2: Facilitate Session N (argument = 1–13)
|
|
@@ -137,6 +145,10 @@ For each session dependency, verify its status in `_progress.md`. If any depende
|
|
|
137
145
|
|
|
138
146
|
**Text mode fallback:** present as numbered list: 1) Yes, continue anyway / 2) No, go back.
|
|
139
147
|
|
|
148
|
+
For a business user ask it in these words (D-14):
|
|
149
|
+
|
|
150
|
+
Business form: "This session builds on session {X} and {Y}, which are not finished yet. We can start now, but some answers may change later. Start anyway?"
|
|
151
|
+
|
|
140
152
|
If the user confirms, proceed. Otherwise, stop and suggest the incomplete dependency.
|
|
141
153
|
|
|
142
154
|
### Step 3: Check for Resume
|
|
@@ -166,6 +178,8 @@ Update `.planning/discovery/_progress.md`: set session row status to "In Progres
|
|
|
166
178
|
|
|
167
179
|
Facilitate in the language the user writes in. Prototypes and software are always English.
|
|
168
180
|
|
|
181
|
+
When `audience` is `business`, follow § Discovery narration of `audience-moments.md` (in the references folder, next to `audience.md`) in everything you say in this session (D-14); the session file is still written exactly as below.
|
|
182
|
+
|
|
169
183
|
For each numbered topic in the session's "What We Cover" section:
|
|
170
184
|
|
|
171
185
|
1. **Present the topic** conversationally: "Let's talk about [Topic Name]."
|
|
@@ -222,7 +236,7 @@ Each session's Goal, "What We Cover" topics and Notes Template live in their own
|
|
|
222
236
|
|
|
223
237
|
## Context-Awareness Rules
|
|
224
238
|
|
|
225
|
-
When facilitating sessions, reference prior session outputs from the earlier session files' Notes Template sections and from the registers they point at (`_requirements.md`, `_entities.md`, `_processes.md`, `_roles.md`, `_integrations.md`, `_deviations.md`) — never from a summary written at session close; the session tables are the single source:
|
|
239
|
+
When facilitating sessions, reference prior session outputs from the earlier session files' Notes Template sections and from the registers they point at (`_requirements.md`, `_entities.md`, `_processes.md`, `_roles.md`, `_integrations.md`, `_deviations.md`, `_tests.md`) — never from a summary written at session close; the session tables are the single source:
|
|
226
240
|
|
|
227
241
|
| Current Session | Reference From |
|
|
228
242
|
|----------------|----------------|
|
|
@@ -233,7 +247,7 @@ When facilitating sessions, reference prior session outputs from the earlier ses
|
|
|
233
247
|
| Session 6 | Session 1: platform decision, approval routes. Session 5: architecture, technology stack |
|
|
234
248
|
| Session 7 | Session 5: architecture. Session 6: security requirements |
|
|
235
249
|
| Session 8 | Session 5: architecture, integration points |
|
|
236
|
-
| Session 9 | Session 3:
|
|
250
|
+
| Session 9 | Session 2: as-is criticality. Session 3: processes, stories, rules. Session 4: accessibility. Session 5: components. Session 6: classification, compliance. Session 7: roles. Session 8: interfaces, migration |
|
|
237
251
|
| Session 10 | Session 1: platform decision. Session 5: architecture. Session 9: test environments |
|
|
238
252
|
| Session 11 | Session 1: risks. Session 3: EPICs, scope. Session 5: architecture. Session 9: QA |
|
|
239
253
|
| Session 12 | Session 1: team shape, approval routes. Session 11: roadmap, iteration model, timeline |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> of them ends the handoff. They are the only hard blocks in the workflow — every other check in
|
|
6
6
|
> Step 2 is a confirmation prompt. Four gates: the screen-inventory contract, the element sweep,
|
|
7
7
|
> the artifact gates (data model, processes, rules, stories, phase plan, roles, integrations,
|
|
8
|
-
> migration, deviations) and the signed charter.
|
|
8
|
+
> migration, deviations, tests) and the signed charter.
|
|
9
9
|
|
|
10
10
|
**Screen-inventory contract gate (D-53)**
|
|
11
11
|
|
|
@@ -66,13 +66,13 @@ The check ran in the first fence above.
|
|
|
66
66
|
|
|
67
67
|
**If `SWEEP_STATUS` is 0:** Continue with the artifact gates below.
|
|
68
68
|
|
|
69
|
-
**Artifact gates (data model, processes, rules, stories, phase plan, roles, integrations, migration, deviations)**
|
|
69
|
+
**Artifact gates (data model, processes, rules, stories, phase plan, roles, integrations, migration, deviations, tests)**
|
|
70
70
|
|
|
71
71
|
The build's planner reads `_entities.md`, `_processes.md`, `_rules.md`, `_stories.md`, `_roles.md`,
|
|
72
|
-
`_integrations.md` and `
|
|
72
|
+
`_integrations.md`, `_migration.md` and `_tests.md` by requirement ID, Step 5f copies `_phases.md` into ROADMAP.md
|
|
73
73
|
verbatim, and `pp-vault-review` reads `_deviations.md` for the deviations on file. A pending `—` cell,
|
|
74
74
|
an uncited step, interface or migration row, an MVP requirement with no story or no phase, or a
|
|
75
|
-
hard-to-reverse deviation nobody has approved at this point is a fact the build would have to invent,
|
|
75
|
+
hard-to-reverse deviation nobody has approved, or a story whose acceptance criteria nobody can test at this point is a fact the build would have to invent,
|
|
76
76
|
so the same checks that only report at Sessions 8, 11 and 13 hard-block here with their strict flags.
|
|
77
77
|
|
|
78
78
|
```bash
|
|
@@ -103,20 +103,27 @@ echo "MIGRATION_STATUS=$MIGRATION_STATUS"
|
|
|
103
103
|
pp_run query discovery.deviations-check --require-approved
|
|
104
104
|
DEVIATIONS_STATUS=$?
|
|
105
105
|
echo "DEVIATIONS_STATUS=$DEVIATIONS_STATUS"
|
|
106
|
+
pp_run query discovery.tests-check --require-complete
|
|
107
|
+
TESTS_STATUS=$?
|
|
108
|
+
echo "TESTS_STATUS=$TESTS_STATUS"
|
|
106
109
|
pp_run query discovery.session-check --all
|
|
107
110
|
SESSION_STATUS=$?
|
|
108
111
|
echo "SESSION_STATUS=$SESSION_STATUS"
|
|
109
112
|
```
|
|
110
113
|
|
|
111
|
-
**If all
|
|
114
|
+
**If all eleven are 0:** Continue with the charter gate below. An artifact that does not exist exits
|
|
112
115
|
0 by itself (an engagement that predates it), so every pre-existing engagement is unaffected.
|
|
113
116
|
|
|
114
117
|
**If any is non-zero:** Stop with no option to proceed. Report the fault list the check printed,
|
|
115
118
|
verbatim — `incomplete_cell` and `attributes_missing` mean Session 5 or 6 did not finish the data
|
|
116
|
-
model; `uncited_step` means Step 5D did not back-fill a step; `
|
|
117
|
-
Step
|
|
119
|
+
model; `uncited_step` means Step 5D did not back-fill a step; `step_without_subprocess` and
|
|
120
|
+
`step_not_in_flow` mean Step 5C left a step out of its sub-processes or its swimlane;
|
|
121
|
+
`mvp_requirement_without_story`, `step_without_story` and `no_source_step` mean Step 5E skipped a
|
|
122
|
+
requirement or a persona step, or left a story tied to no step; `mvp_requirement_unplanned` means Session 11's Closing Step left a
|
|
118
123
|
requirement out of the Phase Plan; `uncited_interface`, `step_integration_unlinked` and
|
|
119
124
|
`uncited_migration` mean Session 8 did not finish `_integrations.md` or `_migration.md`;
|
|
125
|
+
`story_not_testable` and `uncited_focus` mean Session 9 left a story's acceptance criteria open or a
|
|
126
|
+
focus area without requirements — close the `A-09-<n>` action and amend the row;
|
|
120
127
|
`hard_deviation_unapproved` means a hard-to-reverse deviation still waits for its architect — get the
|
|
121
128
|
signature and set the row `Approved` with its decision, or set it `Rejected` and rework;
|
|
122
129
|
`empty_section` and `missing_section` mean a session closed without its Notes Template output — fill
|
|
@@ -124,8 +131,8 @@ the named section in that session file, or write `None identified in Discovery.`
|
|
|
124
131
|
(`references/discovery-session-output.md`); anything else
|
|
125
132
|
is a malformed artifact (vocabularies in `references/discovery-data-model.md`,
|
|
126
133
|
`references/discovery-processes.md`, `references/discovery-build-consumption.md`,
|
|
127
|
-
`references/discovery-access.md`, `references/discovery-integrations.md
|
|
128
|
-
`references/discovery-standards.md`). Fix the artifact, re-run its check, then re-run
|
|
134
|
+
`references/discovery-access.md`, `references/discovery-integrations.md`,
|
|
135
|
+
`references/discovery-standards.md` and `references/discovery-tests.md`). Fix the artifact, re-run its check, then re-run
|
|
129
136
|
`/pp-discovery-to-build`. Neither `--skip-validation` nor `--unsigned` covers these gates.
|
|
130
137
|
|
|
131
138
|
**If `SWEEP_STATUS` is non-zero:** Stop with no option to proceed. Report the fault list the check
|
|
@@ -53,5 +53,5 @@ This project has a completed Discovery Sprint in `.planning/discovery/`. pp-core
|
|
|
53
53
|
- Deviations from the client's standards → `.planning/discovery/_deviations.md`
|
|
54
54
|
- UI/UX → Session 4 (`.planning/discovery/session-04.md`) + `.planning/discovery/prototype/`
|
|
55
55
|
- Security → Session 6 (`.planning/discovery/session-06.md`)
|
|
56
|
-
- Testing → Session 9 (`.planning/discovery/session-09.md`)
|
|
56
|
+
- Testing → `.planning/discovery/_tests.md` (end-to-end processes by risk, focus areas, testability of every story); levels, environments, gates and UAT sign-off: Session 9 (`.planning/discovery/session-09.md`)
|
|
57
57
|
```
|
|
@@ -151,7 +151,15 @@ row for row — never summarise them. Without a screen inventory or prototype, w
|
|
|
151
151
|
| {system} | {in/out/bi} | {REST/webhook} | {data} | {when} |
|
|
152
152
|
|
|
153
153
|
## Quality & Testing Strategy
|
|
154
|
-
{From Session 9:
|
|
154
|
+
{From `.planning/discovery/_tests.md` when it exists: the main processes tested end to end (the `yes` rows of § Process risk, with their risk) and the § Focus areas subjects with their extra testing; from Session 9: Test Approach, Quality Gates, UAT Process (participants, sign-off criteria, approvers)}
|
|
155
|
+
|
|
156
|
+
| Process | Risk | Roles | Test data |
|
|
157
|
+
|---------|------|-------|-----------|
|
|
158
|
+
| {MP-nn — name} | {high/medium/low} | {roles} | {data} |
|
|
159
|
+
|
|
160
|
+
| Focus area | Extra testing |
|
|
161
|
+
|------------|---------------|
|
|
162
|
+
| {subject} | {what beyond the step tests} |
|
|
155
163
|
|
|
156
164
|
## Infrastructure & Deployment
|
|
157
165
|
{From Session 10: environments, deployment approach, monitoring, backup/DR}
|
|
@@ -40,8 +40,12 @@ Valid pp-core subagent types (use exact names — do not fall back to 'general-p
|
|
|
40
40
|
Resolve the `pp_run` helper before anything else. Every `pp_run` call below uses this shim.
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
+
_PP_SHIM_NAME="pp-tools.cjs"; _pp_root() { ( for _v in $(env | sed -n 's/^\(GIT_[A-Za-z0-9_]*\)=.*/\1/p'); do unset "$_v"; done; _c=$(git rev-parse --git-common-dir 2>/dev/null); if [ "${_c##*/}" = .git ] && cd "$_c/.." 2>/dev/null; then pwd -P; else git rev-parse --show-toplevel 2>/dev/null || pwd; fi ); }; pp_run() { case "$PP_TOOLS" in *.cjs) node "$PP_TOOLS" "$@";; *) "$PP_TOOLS" "$@";; esac; }; _PP_RUNTIME_ROOT="${RUNTIME_DIR:-$(_pp_root)}"; PP_TOOLS="${_PP_RUNTIME_ROOT}/pp-core/bin/${_PP_SHIM_NAME}"; if [ -f "$PP_TOOLS" ]; then :; 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}"; elif [ -f "${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${_PP_RUNTIME_ROOT}/.codex/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="$HOME/.claude/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${HERMES_HOME:-$HOME/.hermes}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEX_HOME:-$HOME/.codex}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/pp-core/bin/${_PP_SHIM_NAME}"; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}" ]; then PP_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/pp-core/bin/${_PP_SHIM_NAME}"; elif command -v pp-tools >/dev/null 2>&1; then PP_TOOLS="$(command -v pp-tools)"; else echo "ERROR: pp-tools.cjs not found at $PP_TOOLS and pp-tools is not on PATH. Run: npx -y @pareto4/pp-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${PP_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${PP_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
|
|
44
|
+
pp_run query audience fields
|
|
43
45
|
```
|
|
44
46
|
|
|
47
|
+
**Audience, before any question:** run the block above. If it prints `pp-tools.cjs not found`, show that error and stop. If it exits non-zero for any other reason, tell the person the audience setting could not be read (show the error) and continue; if it prints JSON, apply the **Audience** line below to it now.
|
|
48
|
+
|
|
45
49
|
---
|
|
46
50
|
|
|
47
51
|
**Step 1: Validate environment**
|
|
@@ -226,8 +230,8 @@ Read these files (skip any that don't exist):
|
|
|
226
230
|
7. `.planning/discovery/_stories.md`, `.planning/discovery/_phases.md`,
|
|
227
231
|
`.planning/discovery/_entities.md`, `.planning/discovery/_processes.md`,
|
|
228
232
|
`.planning/discovery/_rules.md`, `.planning/discovery/_roles.md`,
|
|
229
|
-
`.planning/discovery/_integrations.md`, `.planning/discovery/_migration.md
|
|
230
|
-
`.planning/discovery/_deviations.md` — the registers Steps 5e and 5f copy from
|
|
233
|
+
`.planning/discovery/_integrations.md`, `.planning/discovery/_migration.md`,
|
|
234
|
+
`.planning/discovery/_deviations.md` and `.planning/discovery/_tests.md` — the registers Steps 5e and 5f copy from
|
|
231
235
|
(`references/discovery-build-consumption.md`)
|
|
232
236
|
|
|
233
237
|
**Spawn an Explore agent to read all session files in parallel** and extract every
|
|
@@ -291,13 +295,15 @@ workflow uses.
|
|
|
291
295
|
### 5a. Run init
|
|
292
296
|
|
|
293
297
|
```bash
|
|
294
|
-
|
|
298
|
+
command -v pp_run >/dev/null 2>&1 || { echo "ERROR: pp_run is not on PATH; prepend the resolver line from the top block to this block and run it again" >&2; exit 1; }
|
|
295
299
|
mkdir -p .planning
|
|
296
|
-
INIT=$(pp_run query init.new-project
|
|
300
|
+
INIT=$(pp_run query init.new-project)
|
|
297
301
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
298
302
|
echo "$INIT"
|
|
299
303
|
```
|
|
300
304
|
|
|
305
|
+
**Audience:** if `audience` is set, Read and follow `{audience_ref}`. Reply in any `response_language` and pass it to subagents; code and paths stay as is.
|
|
306
|
+
|
|
301
307
|
### 5b. Collect preferences
|
|
302
308
|
|
|
303
309
|
Ask the pp-core configuration questions — identical to `/pp-new-project` Step 2a:
|
|
@@ -64,13 +64,13 @@ role, a flow step, a screen, an acceptance criterion, a phase's requirement set)
|
|
|
64
64
|
|
|
65
65
|
1. **Amend the register row in place.** Edit the cell in the artifact (`_entities.md`,
|
|
66
66
|
`_rules.md`, `_processes.md`, `_screens.md`, `_stories.md`, `_requirements.md`, `_phases.md`,
|
|
67
|
-
`_roles.md`, `_integrations.md`, `_migration.md`, `_deviations.md`)
|
|
67
|
+
`_roles.md`, `_integrations.md`, `_migration.md`, `_deviations.md`, `_tests.md`)
|
|
68
68
|
and append `→ amended by D-P${PADDED_PHASE}-<n>` to it, `<n>` being the decision's sequence in
|
|
69
69
|
this CONTEXT.md. Never add a second row for the new fact, never strike the old cell: one row,
|
|
70
70
|
amended.
|
|
71
71
|
2. **Re-run the artifact's check** — `pp_run query discovery.entity-check`, `process-check`,
|
|
72
72
|
`rules-check`, `screen-check`, `stories-check`, `phases-check`, `roles-check`,
|
|
73
|
-
`integrations-check`, `migration-check`, `deviations-check`, or `rollup --check` for
|
|
73
|
+
`integrations-check`, `migration-check`, `deviations-check`, `tests-check`, or `rollup --check` for
|
|
74
74
|
`_requirements.md` — exit 0 before continuing. A build decision that departs from a vault
|
|
75
75
|
standard is a new `DEV-` row of `_deviations.md` with `Decision` = `D-P${PADDED_PHASE}-<n>`.
|
|
76
76
|
3. **Bump the charter.** In `docs/discovery/PROJECT-CHARTER.md` raise `version` and add a § 20
|
|
@@ -70,6 +70,8 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
|
70
70
|
AGENT_SKILLS_ANALYZER=$(pp_run query agent-skills pp-assumptions-analyzer)
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
**Audience:** if `audience` is set, Read and follow `{audience_ref}`. Reply in any `response_language` and pass it to subagents; code and paths stay as is.
|
|
74
|
+
|
|
73
75
|
Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`,
|
|
74
76
|
`phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`,
|
|
75
77
|
`plan_count`, `roadmap_exists`, `planning_exists`.
|
|
@@ -127,7 +127,7 @@ AGENT_SKILLS_ADVISOR=$(pp_run query agent-skills pp-advisor-researcher)
|
|
|
127
127
|
|
|
128
128
|
Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`, `response_language`.
|
|
129
129
|
|
|
130
|
-
**
|
|
130
|
+
**Audience:** if `audience` is set, Read and follow `{audience_ref}`. Reply in any `response_language` and pass it to subagents; code and paths stay as is.
|
|
131
131
|
|
|
132
132
|
**If `phase_found` is false:**
|
|
133
133
|
```
|
|
@@ -39,6 +39,8 @@ INIT=$(pp_run query init.phase-op "${target}")
|
|
|
39
39
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
**Audience:** if `audience` is set, Read and follow `{audience_ref}`. Reply in any `response_language` and pass it to subagents; code and paths stay as is.
|
|
43
|
+
|
|
42
44
|
Check `roadmap_exists` from init JSON. If false:
|
|
43
45
|
```
|
|
44
46
|
ERROR: No roadmap found (.planning/ROADMAP.md)
|
|
@@ -18,6 +18,8 @@ INIT=$(pp_run query init.phase-op "${PHASE_ARG}")
|
|
|
18
18
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
**Audience:** if `audience` is set, Read and follow `{audience_ref}`. Reply in any `response_language` and pass it to subagents; code and paths stay as is.
|
|
22
|
+
|
|
21
23
|
Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `commit_docs`.
|
|
22
24
|
|
|
23
25
|
```bash
|