@pareto4/pp-core 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/agents/pp-phase-researcher.md +10 -0
  3. package/agents/pp-planner.md +15 -0
  4. package/agents/pp-vault-reviewer.md +2 -0
  5. package/agents/pp-verifier.md +12 -8
  6. package/commands/pp-discovery.md +3 -2
  7. package/gemini-extension.json +1 -1
  8. package/package.json +6 -3
  9. package/pareto-skills/_shared/pp-claude-md-protocol.md +1 -1
  10. package/pareto-skills/pp-project-setup/SKILL.md +18 -343
  11. package/pp-core/bin/lib/capability-registry.cjs +1 -1
  12. package/pp-core/bin/lib/discovery-access.cjs +276 -0
  13. package/pp-core/bin/lib/discovery-charter.cjs +664 -0
  14. package/pp-core/bin/lib/discovery-deviations.cjs +264 -0
  15. package/pp-core/bin/lib/discovery-entities.cjs +323 -0
  16. package/pp-core/bin/lib/discovery-for-phase.cjs +628 -0
  17. package/pp-core/bin/lib/discovery-integrations.cjs +286 -0
  18. package/pp-core/bin/lib/discovery-migration.cjs +246 -0
  19. package/pp-core/bin/lib/discovery-phases.cjs +233 -0
  20. package/pp-core/bin/lib/discovery-processes.cjs +355 -0
  21. package/pp-core/bin/lib/discovery-research-track.cjs +5 -4
  22. package/pp-core/bin/lib/discovery-rollup.cjs +8 -7
  23. package/pp-core/bin/lib/discovery-rules.cjs +216 -0
  24. package/pp-core/bin/lib/discovery-screens.cjs +1 -1
  25. package/pp-core/bin/lib/discovery-session-check.cjs +264 -0
  26. package/pp-core/bin/lib/discovery-stories.cjs +273 -0
  27. package/pp-core/bin/lib/discovery-sweep.cjs +1 -1
  28. package/pp-core/bin/lib/discovery-table.cjs +55 -0
  29. package/pp-core/bin/lib/io.cjs +22 -0
  30. package/pp-core/bin/lib/vault-standards-review.cjs +50 -2
  31. package/pp-core/bin/pp-tools.cjs +143 -1
  32. package/pp-core/references/discovery-access.md +112 -0
  33. package/pp-core/references/discovery-build-consumption.md +256 -0
  34. package/pp-core/references/discovery-charter.md +127 -0
  35. package/pp-core/references/discovery-data-model.md +145 -0
  36. package/pp-core/references/discovery-id-conventions.md +50 -14
  37. package/pp-core/references/discovery-integrations.md +151 -0
  38. package/pp-core/references/discovery-processes.md +190 -0
  39. package/pp-core/references/discovery-rebaseline.md +2 -2
  40. package/pp-core/references/discovery-research-track.md +5 -6
  41. package/pp-core/references/discovery-session-output.md +70 -0
  42. package/pp-core/references/discovery-standards.md +107 -0
  43. package/pp-core/references/discovery-traceability.md +2 -2
  44. package/pp-core/references/planner-discovery-extract.md +35 -0
  45. package/pp-core/references/verifier-discovery-conformance.md +36 -0
  46. package/pp-core/templates/project-charter.md +161 -100
  47. package/pp-core/templates/project.md +3 -3
  48. package/pp-core/templates/requirements.md +18 -0
  49. package/pp-core/templates/verification-report.md +16 -0
  50. package/pp-core/workflows/discovery-sprint/charter.md +114 -0
  51. package/pp-core/workflows/discovery-sprint/prefill.md +1 -1
  52. package/pp-core/workflows/discovery-sprint/prototype.md +4 -4
  53. package/pp-core/workflows/discovery-sprint/session-13-gates.md +10 -0
  54. package/pp-core/workflows/discovery-sprint/sessions/01-kick-off.md +5 -2
  55. package/pp-core/workflows/discovery-sprint/sessions/02-as-is.md +27 -5
  56. package/pp-core/workflows/discovery-sprint/sessions/03-to-be.md +56 -31
  57. package/pp-core/workflows/discovery-sprint/sessions/04-ux-design.md +1 -1
  58. package/pp-core/workflows/discovery-sprint/sessions/05-architecture.md +42 -19
  59. package/pp-core/workflows/discovery-sprint/sessions/06-security.md +27 -12
  60. package/pp-core/workflows/discovery-sprint/sessions/07-identity.md +41 -23
  61. package/pp-core/workflows/discovery-sprint/sessions/08-integration.md +50 -23
  62. package/pp-core/workflows/discovery-sprint/sessions/09-qa.md +26 -11
  63. package/pp-core/workflows/discovery-sprint/sessions/10-infrastructure.md +28 -9
  64. package/pp-core/workflows/discovery-sprint/sessions/11-roadmap.md +21 -0
  65. package/pp-core/workflows/discovery-sprint/sessions/13-wrap-up.md +24 -9
  66. package/pp-core/workflows/discovery-sprint.md +12 -15
  67. package/pp-core/workflows/discovery-to-build/steps/architecture-deliverables.md +80 -29
  68. package/pp-core/workflows/discovery-to-build/steps/{screen-inventory-gate.md → handoff-gates.md} +111 -3
  69. package/pp-core/workflows/discovery-to-build/templates/discovery-references.md +12 -9
  70. package/pp-core/workflows/discovery-to-build/templates/pp-handoff.md +27 -26
  71. package/pp-core/workflows/discovery-to-build.md +70 -34
  72. package/pp-core/workflows/discuss-phase/discovery.md +83 -0
  73. package/pp-core/workflows/discuss-phase/templates/context.md +4 -0
  74. package/pp-core/workflows/discuss-phase.md +10 -7
  75. package/pp-core/workflows/new-project.md +3 -3
  76. package/pp-core/workflows/plan-phase/steps/discovery-extract.md +41 -0
  77. package/pp-core/workflows/plan-phase.md +15 -10
  78. package/pp-core/workflows/vault-review.md +5 -0
  79. package/pp-core/workflows/discovery-sprint/templates/context-template.md +0 -272
@@ -0,0 +1,107 @@
1
+ # Discovery Standards First — `_deviations.md` Template, Parser Contract & the Standards Applied Table
2
+
3
+ Single home for how the Discovery Sprint treats the client's standards once a vault is bound
4
+ (Discovery Sprint improvement plan, Batch 3): the questions the vault already answers are not asked
5
+ open-ended, every session from 4 to 10 records which standard governs each area in a **Standards
6
+ Applied** table, and every departure from a standard is one `DEV-` row of `_deviations.md` — the
7
+ register the charter § 7 copies, the handoff gates on, and `pp-vault-review` reads so an approved
8
+ deviation is reported as a deviation on file, never as a violation. This file is Read lazily; it is
9
+ never `@`-imported.
10
+
11
+ ## Standards first — the question rule
12
+
13
+ When a session's `## Vault Context` record names a document that already fixes what a topic asks the
14
+ client to decide, the facilitator does not ask the open question. The question becomes:
15
+
16
+ > The vault fixes `<what>` — `[vault: <path>]`. Does this product deviate, and why?
17
+
18
+ - **No deviation:** the Standards Applied row cites the standard, `Deviation` reads `none`. Nothing
19
+ else is written — the vault stays the single home of the standard (never copy its text).
20
+ - **A deviation:** mint one `DEV-<nn>` row in `.planning/discovery/_deviations.md` (create the file
21
+ from the template below on first need), record the decision as a Key Decisions row `D-<ss>-<n>` and
22
+ write both IDs into the Standards Applied row (`Deviation` = the `DEV-nn`, `Decision` = the `D-ss-n`).
23
+ - **No standard covers the area:** the Standards Applied row reads `not in vault`; the question stays
24
+ open-ended and the answer is a Key Decisions row; add an Action Items row for the vault owner when
25
+ the gap should be closed in the vault.
26
+ - **No vault bound** (the session record says `Index: none`, or the project runs without the vault
27
+ capability): every question stays open-ended, Standards Applied rows read `not in vault`, and
28
+ `_deviations.md` is never created — there is no standard to deviate from.
29
+
30
+ The session files phrase their stack and tooling questions in this shape; the vault document to cite
31
+ is the one the session's `## Vault Context` record selected for that topic.
32
+
33
+ ## The Standards Applied table
34
+
35
+ Every session from 4 to 10 carries one, in its Notes Template, with the areas the session decides:
36
+
37
+ | Area | Standard | Deviation | Decision |
38
+ |------|----------|-----------|----------|
39
+
40
+ - **Standard** is the governing document's `[vault: <rel path>]` citation (several, space-separated,
41
+ when more than one applies), or `not in vault`.
42
+ - **Deviation** is `none`, or the `DEV-<nn>` of the `_deviations.md` row.
43
+ - **Decision** is `—`, or the `D-<ss>-<n>` that records the deviation or the decision taken for an
44
+ uncovered area.
45
+
46
+ The charter § 7 reads `_deviations.md`, not these tables; the tables are where a reader of one
47
+ session sees which standards bound it. Session 4 introduced the shape (frontend standards); Sessions
48
+ 5–10 follow it.
49
+
50
+ ## `_deviations.md`
51
+
52
+ A deviation is a choice that goes against a standard the vault states. The vault's own rule
53
+ (`architecture/deviations.md` in the Pareto vault, and its equivalent elsewhere): deviating is
54
+ allowed, hiding it is not; an architect signs every one; only what is **hard to reverse** waits for
55
+ the signature before the dependent work proceeds, and a security or compliance deviation is always
56
+ hard. The register carries exactly that record.
57
+
58
+ Illustration only — not part of the template:
59
+
60
+ | ID | Standard | Choice | Reason | Reversible | Approver | Decision | Status |
61
+ |---|---|---|---|---|---|---|---|
62
+ | DEV-01 | [vault: pipeline/quality-gates.md] | Trivy and CodeQL instead of SonarCloud | Free plan, one-person team | easy | Architect | D-09-3 | Approved |
63
+
64
+ Bootstrap template — the first session that records a deviation copies it verbatim to
65
+ `.planning/discovery/_deviations.md`, replacing `[PROJECT_NAME]`:
66
+
67
+ ```markdown
68
+ # Deviations from standards — [PROJECT_NAME]
69
+
70
+ **Conventions:** pp-core reference `references/discovery-standards.md`. One `DEV-` row per departure from a vault standard: the standard as a `[vault: <path>]` citation, the choice made instead, why, whether it is `easy` or `hard` to reverse (a security or compliance deviation is always `hard`), who approves it (an approver of Session 1's Approval Matrix), the `D-<ss>-<n>` that recorded it and its status (`Proposed`, `Approved`, `Rejected`, `Superseded`). A hard deviation is approved before the handoff. Rows are never renumbered or deleted; a change after sign-off edits the row in place and appends `→ amended by D-<ss>-<n>`.
71
+
72
+ ## Deviations
73
+
74
+ | ID | Standard | Choice | Reason | Reversible | Approver | Decision | Status |
75
+ |----|----------|--------|--------|------------|----------|----------|--------|
76
+ ```
77
+
78
+ ### Parser contract — `pp_run query discovery.deviations-check [--require-approved]`
79
+
80
+ No positional path. Faults name the artifact, the 1-based line, a validated ID or path, a column name
81
+ and the reason code — never cell prose. Absent `_deviations.md` → exit 0, `present: false`.
82
+
83
+ | Cell / field | Grammar | Fault when violated |
84
+ |---|---|---|
85
+ | `## Deviations` | once, holding one table with the template's columns | `missing_section`, `bad_table_shape` |
86
+ | `ID` | `DEV-\d{2}`, unique, contiguous from 01 | `bad_id`, `duplicate_id`, `sequence_gap` naming the missing ID |
87
+ | `Standard` | at least one `[vault: <path>]`; each path relative, no `..` or dot segment, ending `.md`, and present in the vault cache when `.planning/vault/` is on disk | `bad_standard` (no citation, or an unsafe path); `unknown_standard` naming the path. **Not resolved** while there is no cache |
88
+ | `Choice`, `Reason` | non-empty | `empty_cell` naming the column |
89
+ | `Reversible` | `easy` \| `hard` | `bad_reversible` |
90
+ | `Approver` | non-empty; one of the `Approver` tokens of Session 1's **Approval Matrix** when that table is on file with rows | `empty_cell (Approver)`; `unknown_approver`. **Not resolved** while Session 1 has no matrix (an engagement that predates it) |
91
+ | `Decision` | `—`, or `D-<ss>-<n>` / `D-P<nn>-<n>` (shape only — `charter-check` resolves it) | `bad_decision`; `decision_missing` when `Status` is `Approved` or `Rejected` and the cell is `—` |
92
+ | `Status` | `Proposed` \| `Approved` \| `Rejected` \| `Superseded` | `bad_status` |
93
+ | a `hard` row still `Proposed` | approved before the handoff | `hard_deviation_unapproved` under `--require-approved` only |
94
+ | `session-01.md` present but unreadable | present-and-readable | `artifact_unreadable` naming the path |
95
+
96
+ **Exit identity.** `discovery_deviations_check_failed` for structural faults;
97
+ `discovery_deviations_unapproved` when every fault is a `hard_deviation_unapproved`. Payload: `ok`,
98
+ `present`, `file`, `deviations`, `approved`, `unapproved_hard`.
99
+
100
+ ## Who reads it
101
+
102
+ | Reader | Contract |
103
+ |---|---|
104
+ | Project Charter § 7 | copies every row; `charter-check` resolves `DEV-` IDs against this file alone and reports `deviation_missing` for a row the charter leaves out (`references/discovery-charter.md`) |
105
+ | `/pp-discovery-to-build` | `deviations-check --require-approved` hard-blocks on a hard deviation still `Proposed` (`workflows/discovery-to-build/steps/handoff-gates.md`) |
106
+ | `pp-vault-review` | reads `Standard` and `Status` by header name; an `Approved` row covering a failed clause turns the FAIL into `N-A` "deviation on file" (`references/discovery-build-consumption.md` § `_deviations.md` read contract) |
107
+ | `discovery for-phase` | the register has no requirement column, so every extract lists it as not filterable — the planner reads it whole |
@@ -14,8 +14,8 @@ does not restate them. Read that file when you need an ID's shape or the reserve
14
14
 
15
15
  ## When these files appear
16
16
 
17
- Both artifacts are bootstrapped **on first need**, exactly the way `_progress.md` and
18
- `_context.md` are in Flow 2 Step 1, and exactly the way the three research-track registers
17
+ Both artifacts are bootstrapped **on first need**, exactly the way `_progress.md`
18
+ is in Flow 2 Step 1, and exactly the way the three research-track registers
19
19
  are in `references/discovery-research-track.md`: if the file is absent when a session first
20
20
  has something to put in it, create it verbatim from the template below, then add the row.
21
21
  There is no sub-command and no setup step — an empty inventory is not a milestone, and an
@@ -0,0 +1,35 @@
1
+ # Discovery extract — the planner and researcher contract (R1)
2
+
3
+ **Load this file when a `{padded}-DISCOVERY-EXTRACT.md` is listed in your files to read** — the
4
+ plan-phase orchestrator renders it with `pp_run query discovery.for-phase <N> --markdown` on a
5
+ project that ran the Discovery Sprint (contract: `references/discovery-build-consumption.md`).
6
+ When no such file is listed, nothing described here applies.
7
+
8
+ The extract holds the rows of the Discovery registers (`_requirements.md`, `_stories.md`,
9
+ `_processes.md`, `_entities.md`, `_rules.md`, `_screens.md`, roles, integrations) that cite this
10
+ phase's requirement IDs. It is the client's signed-off fact base for this phase.
11
+
12
+ ## Planner
13
+
14
+ 1. **Required reading.** Read the extract in full before planning.
15
+ 2. **Never open `.planning/discovery/session-NN.md`.** The session files are the facilitation
16
+ record; the registers are the source of truth, amended in place. A fact you need that the
17
+ extract lacks is a question for the user — surface it under Claude's Discretion or the plan's
18
+ open questions — not a reason to read a transcript.
19
+ 3. **Cite rows, do not restate them.** A task that realises a step cites `MP-01 #3`; a validation
20
+ task cites `BR-02`; a data task cites the entity by name; a screen task cites `SCR-04`. Put the
21
+ row's acceptance criteria (`_requirements.md`, `_stories.md`) into the task's
22
+ `<acceptance_criteria>` verbatim — they are the verifier's UAT (R3).
23
+ 4. **Embed verbatim.** Copy the file's content byte for byte, `<!-- discovery:auto -->` markers
24
+ included, as the `<discovery_extract>` block of every PLAN.md of this phase, after `<context>`
25
+ (after `<vault_standards>` when present) and before `<tasks>`. Never edit a cell: a discovery
26
+ fact that must change is amended in the register by `/pp-discuss-phase` (R2), then re-rendered.
27
+ 5. **Contradictions are findings.** If the extract contradicts CONTEXT.md, the codebase or itself,
28
+ plan nothing on the contradiction — name both sides in the plan's open questions.
29
+
30
+ ## Researcher
31
+
32
+ Research HOW to build what the rows say, never WHETHER: entities, rules, process steps, screens
33
+ and acceptance criteria here are decided. List the entities, integrations and rules the extract
34
+ names under `## User Constraints` as "Discovery facts (by row ID)" so the planner sees them beside
35
+ the locked decisions. Rule 2 above applies in full.
@@ -0,0 +1,36 @@
1
+ # Discovery conformance — the verifier contract (R3)
2
+
3
+ **Load this file from pp-verifier Step 6d on a project that ran the Discovery Sprint** (contract:
4
+ `references/discovery-build-consumption.md`). Planning read the Discovery registers; verification
5
+ is where conformance is enforced — "did we build what was signed" is answered per phase.
6
+
7
+ ```bash
8
+ DISCOVERY_CONFORMANCE=$(pp_run query discovery.for-phase "$PHASE_NUM" --conformance-template 2>/dev/null || true)
9
+ ```
10
+
11
+ Empty output means no `.planning/discovery/` — write no block and stop here. A non-zero exit is a
12
+ structural fault in a discovery register: record it as a gap naming the fault list.
13
+
14
+ Otherwise the output is the **Discovery conformance** block: one row per Discovery register row
15
+ that cites this phase's requirement IDs (`_requirements.md`, `_stories.md`, `_processes.md` steps,
16
+ `_entities.md`, `_rules.md`, `_screens.md`, roles, integrations), every row `missed`. Fill it:
17
+
18
+ 1. **The acceptance criteria ARE the UAT.** Each `_requirements.md` and `_stories.md` row's
19
+ acceptance criteria is a truth in Step 3 — add any the plans' `must_haves` omitted — verified
20
+ by the same evidence rules as every other truth.
21
+ 2. **One status per row**, exactly one of:
22
+ - `honoured` — evidence that the build realises the row (`file:line`, a test name) in `Evidence`;
23
+ - `amended (D-P<nn>-<n>)` — the register cell carries `→ amended by` that decision and the build
24
+ matches the amended cell; name the cell in `Evidence`;
25
+ - `missed` — no evidence, or the build contradicts the row; say which in `Evidence`.
26
+ 3. **Never add, remove or rename a row**; never open a `.planning/discovery/session-NN.md` — the
27
+ register row is the fact, and `--verify` refuses an unknown or missing row.
28
+ 4. **A `missed` row is a gap.** It fires rule 1 of Step 9 (`gaps_found`) and appears in the Gaps
29
+ Summary with its row key (`_rules.md BR-02`).
30
+ 5. **Paste the filled block into VERIFICATION.md** under `### Discovery conformance`, markers
31
+ included, after Requirements Coverage. Then run
32
+
33
+ `pp_run query discovery.for-phase "$PHASE_NUM" --verify "$REPORT_PATH"`
34
+
35
+ and repair the block until it exits 0 (markers once each, header, every row present once, legal
36
+ statuses). A `missed` count is never a fault of the block.
@@ -1,32 +1,51 @@
1
1
  # Project Charter Template
2
2
 
3
- Template for `.planning/discovery/PROJECT-CHARTER.md`, the document every stakeholder signs at the end
4
- of a Discovery Sprint.
3
+ Template for `docs/discovery/PROJECT-CHARTER.md`, the document every stakeholder signs at the end of a
4
+ Discovery Sprint. It lives under `docs/` because it is client-visible, like `docs/architecture/`;
5
+ `.planning/discovery/` holds the facilitation record it condenses.
5
6
 
6
7
  **Purpose:** one short, fixed-shape document that states what will be built, why, for whom, how it will
7
- be delivered and on what conditions, so that sign-off is a decision on the same questions in the same
8
- order for every engagement. It summarises the thirteen session files; it does not replace them.
9
-
10
- **When:** after Session 13 (wrap-up and Go / No-Go), before `/pp-discovery-to-build`.
11
-
12
- **Shape is fixed.** Every charter has the same 14 numbered sections in the same order, with the same
13
- headings and the same table columns. A section with nothing to report stays in place and says so; it is
14
- never dropped, merged or renumbered. That is what lets a reader compare two charters side by side.
8
+ be delivered, where it departs from the standards and on what conditions, so that sign-off is a decision
9
+ on the same questions in the same order for every engagement. It summarises the thirteen session files
10
+ and the discovery registers; it does not replace them.
11
+
12
+ **When:** drafted in Session 13 Step 0.5 (after the cross-reference, before the wrap-up topics), reviewed
13
+ in topics 2–3, set to `For sign-off` at the Closing Step, and required `Signed` or `Signed with
14
+ conditions` by `/pp-discovery-to-build`. The drafting procedure is
15
+ `workflows/discovery-sprint/charter.md`; the parser contract and the heading translations are in
16
+ `references/discovery-charter.md`.
17
+
18
+ **Shape is fixed.** Every charter has the same 20 numbered sections in the same order, with the same
19
+ table columns. A section with nothing to report stays in place and says so; it is never dropped, merged
20
+ or renumbered. That is what lets a reader compare two charters side by side, and what lets
21
+ `pp_run query discovery.charter-check` verify one.
22
+
23
+ **Language.** The charter is written in the sprint language — the `Charter language` row of Session 1's
24
+ Sprint Logistics, else `discovery.language` in `.planning/config.json`, else the language the sprint
25
+ was facilitated in. Headings, labels and prose are translated; the `<!-- charter:<key> -->` heading
26
+ keys, the frontmatter fields and every enum cell (`status`, `go_no_go`, `Green / Amber / Red`,
27
+ `Approve / Approve with conditions / Reject`, `Yes / No`) stay in English, because the check reads them.
28
+ Column order is fixed; column headings may be translated.
15
29
 
16
30
  ---
17
31
 
18
32
  ## File Template
19
33
 
20
- ```markdown
34
+ Copy verbatim, then fill. Tables carry no example rows: a row is written only when a session table
35
+ supplies it. The frontmatter placeholders `0000-00-00`, `0/13` and `und` are valid to the check and are
36
+ replaced by the drafting step.
37
+
38
+ ````markdown
21
39
  ---
22
40
  document: project-charter
23
41
  project: [Project name]
24
42
  client: [Client name]
25
- version: [1.0]
26
- status: [Draft | For sign-off | Signed | Signed with conditions | Rejected]
27
- date: [YYYY-MM-DD]
28
- discovery_sessions_completed: [N]/13
29
- go_no_go: [Go | Go with conditions | No-Go]
43
+ version: 1.0
44
+ status: Draft
45
+ date: 0000-00-00
46
+ language: und
47
+ discovery_sessions_completed: 0/13
48
+ go_no_go: Pending
30
49
  ---
31
50
 
32
51
  # [Project name] — Project Charter
@@ -36,61 +55,68 @@ go_no_go: [Go | Go with conditions | No-Go]
36
55
  | Document control | |
37
56
  |---|---|
38
57
  | Client | [Client name] |
39
- | Version / status | [1.0] · [Draft] |
40
- | Date | [YYYY-MM-DD] |
58
+ | Version / status | 1.0 · Draft |
59
+ | Date | 0000-00-00 |
41
60
  | Prepared by | [Name, role] |
42
- | Based on | Discovery Sprint sessions 1–13, completed [YYYY-MM-DD] |
61
+ | Based on | Discovery Sprint sessions 1–13, completed 0000-00-00 |
43
62
 
44
63
  ---
45
64
 
46
- ## 1. Purpose and background
65
+ ## 1. Purpose and background <!-- charter:purpose -->
47
66
 
48
67
  [Two to four sentences: the business problem and why it matters now.]
49
68
 
50
69
  **Top pain points today**
51
70
 
52
- | # | Pain point | Who is affected | Impact |
53
- |---|---|---|---|
54
- | 1 | | | |
71
+ | # | Pain point | Who is affected | Impact | Source |
72
+ |---|---|---|---|---|
55
73
 
56
- ## 2. Objectives and success measures
74
+ ## 2. Objectives and success measures <!-- charter:objectives -->
57
75
 
58
- | # | Objective | KPI | Baseline | Target | Measured by |
76
+ | ID | Objective | KPI | Baseline | Target | Measured by |
59
77
  |---|---|---|---|---|---|
60
- | O-1 | | | | | |
61
78
 
62
- ## 3. Scope
79
+ ## 3. Scope <!-- charter:scope -->
63
80
 
64
81
  **In scope (MVP)**
65
82
 
66
- | EPIC | Title | Priority |
67
- |---|---|---|
68
- | | | |
83
+ | EPIC | Title | Priority | Requirements |
84
+ |---|---|---|---|
69
85
 
70
86
  **Out of scope**
71
87
 
72
- - [Item] — [reason or later release]
88
+ | Item | Reason | Decision |
89
+ |---|---|---|
73
90
 
74
- **Requirements:** [N] functional, [N] non-functional, [N] business rules, as registered in
75
- `_requirements.md`.
91
+ **Requirements:** [one count per registered prefix, then the dropped count — `K- 12 · N- 4 · T- 3 · Dropped 1`] <!-- charter:counts -->
76
92
 
77
- ## 4. Stakeholders and users
93
+ ## 4. Stakeholders and users <!-- charter:stakeholders -->
78
94
 
79
95
  | Stakeholder | Role | Decision authority | Involvement |
80
96
  |---|---|---|---|
81
- | | | | |
82
97
 
83
98
  | Persona | Description | Main goal |
84
99
  |---|---|---|
85
- | | | |
86
100
 
87
- ## 5. Solution overview
101
+ ## 5. Approvals and role holders <!-- charter:approvals -->
102
+
103
+ | Approval | Approver | Consulted | Source |
104
+ |---|---|---|---|
105
+
106
+ | Role | Holder | Source |
107
+ |---|---|---|
108
+ | Privacy owner | | |
109
+ | Security owner | | |
110
+ | Incident contact | | |
111
+ | Architect (signs deviations) | | |
112
+
113
+ ## 6. Solution overview <!-- charter:solution -->
88
114
 
89
115
  [Two to four sentences: the shape of the solution.]
90
116
 
91
117
  | Layer | Choice | Decision |
92
118
  |---|---|---|
93
- | Frontend | | [D-05-n] |
119
+ | Frontend | | |
94
120
  | Backend | | |
95
121
  | Data | | |
96
122
  | Hosting | | |
@@ -98,129 +124,164 @@ go_no_go: [Go | Go with conditions | No-Go]
98
124
 
99
125
  **Integrations**
100
126
 
101
- | System | Direction | Purpose |
127
+ | ID | System | Direction | Purpose |
128
+ |---|---|---|---|
129
+
130
+ ## 7. Deviations from standards <!-- charter:deviations -->
131
+
132
+ | ID | Standard | Choice | Reason | Reversible | Approver | Decision | Status |
133
+ |---|---|---|---|---|---|---|---|
134
+
135
+ ## 8. Data <!-- charter:data -->
136
+
137
+ | Aspect | Statement | Source |
102
138
  |---|---|---|
103
- | | | |
139
+ | Highest data classification | | |
140
+ | Personal data processed | | |
141
+ | Controller / processor role | | |
142
+ | Retention headline | | |
143
+ | Availability target (RTO / RPO) | | |
104
144
 
105
- **Security and compliance:** [data classification, applicable regulations, availability target, in two to
106
- four lines.]
145
+ ## 9. Quality and acceptance <!-- charter:quality -->
107
146
 
108
- ## 6. Quality and acceptance
147
+ | Gate | Criterion | Approved by |
148
+ |---|---|---|
149
+ | UAT sign-off | | |
150
+ | Go-live readiness | | |
109
151
 
110
- | Gate | Criterion |
111
- |---|---|
112
- | UAT sign-off | [criteria] — approved by [role] |
113
- | Go-live readiness | [criteria] |
152
+ ## 10. What was validated <!-- charter:validated -->
114
153
 
115
- ## 7. Delivery plan
154
+ | Round | Prototype version | Flows validated | Verdicts (change / keep / drop / question) | Closed? |
155
+ |---|---|---|---|---|
156
+
157
+ **Screens:** [n] required, [n] deferred, [n] MVP requirements in the no-screen bucket with a reason, 0 uncovered — as `_screens.md` records them.
116
158
 
117
- | Milestone | Target date | Included EPICs | Exit criteria |
159
+ ## 11. Delivery plan <!-- charter:delivery -->
160
+
161
+ | Milestone | Target | Included EPICs | Exit criteria |
118
162
  |---|---|---|---|
119
- | [v1.0 — MVP] | | | |
120
163
 
121
164
  **Build order:** [EPIC order and why.]
122
165
 
123
- ## 8. Team and governance
166
+ ## 12. Team and governance <!-- charter:team -->
124
167
 
125
168
  | Role | Name / party | Responsibility |
126
169
  |---|---|---|
127
- | | | |
128
170
 
129
171
  **Scope changes are approved by:** [role]. **Progress is reported:** [cadence, format].
130
172
 
131
- ## 9. Budget, constraints and assumptions
173
+ ## 13. Budget, constraints and assumptions <!-- charter:budget -->
132
174
 
133
175
  | Type | Item | Source |
134
176
  |---|---|---|
135
- | Budget | [amount or "Not decided in Discovery — OI-n"] | |
136
- | Constraint | | |
137
- | Assumption | | |
138
177
 
139
- ## 10. Risks
178
+ ## 14. Risks <!-- charter:risks -->
140
179
 
141
- | # | Risk | Likelihood | Impact | Mitigation | Owner |
180
+ | ID | Risk | Likelihood | Impact | Mitigation | Owner |
142
181
  |---|---|---|---|---|---|
143
- | R-1 | | | | | |
144
182
 
145
- ## 11. Open items
183
+ ## 15. Open items <!-- charter:open-items -->
146
184
 
147
- | ID | Item | Must resolve before build? | Owner | Target date |
148
- |---|---|---|---|---|
149
- | OI-1 | | | | |
185
+ | ID | Item | Must resolve before build? | Owner | Target date | Status |
186
+ |---|---|---|---|---|---|
187
+
188
+ ## 16. Conditions <!-- charter:conditions -->
189
+
190
+ | Kind | ID | Statement | Resolution |
191
+ |---|---|---|---|
150
192
 
151
- ## 12. Go / No-Go recommendation
193
+ ## 17. Go / No-Go recommendation <!-- charter:go-no-go -->
152
194
 
153
195
  | Criterion | Status | Note |
154
196
  |---|---|---|
155
- | Business requirements clarity | [Green / Amber / Red] | |
197
+ | Business requirements clarity | | |
156
198
  | Technical architecture feasibility | | |
157
199
  | Security and compliance readiness | | |
158
200
  | Integration dependencies resolved | | |
159
201
  | Team and budget availability | | |
160
202
  | Timeline confidence | | |
161
203
  | Stakeholder alignment | | |
162
- | **Overall recommendation** | **[Go / Go with conditions / No-Go]** | |
204
+ | **Overall recommendation** | | |
163
205
 
164
- **Conditions:** [each condition attached to a Go, or "None".]
165
-
166
- ## 13. Key decisions
206
+ ## 18. Key decisions <!-- charter:decisions -->
167
207
 
168
208
  | ID | Decision | Rationale | Owner |
169
209
  |---|---|---|---|
170
- | D-01-1 | | | |
171
210
 
172
- ## 14. Sign-off
211
+ ## 19. Sign-off <!-- charter:sign-off -->
173
212
 
174
- By signing, each party agrees that sections 1–13 describe the project to be built, subject to the
175
- conditions stated.
213
+ By signing, each party agrees that sections 1–18 describe the project to be built, subject to the
214
+ conditions in § 16.
176
215
 
177
216
  | Role | Name | Decision | Conditions | Date | Signature |
178
217
  |---|---|---|---|---|---|
179
- | [Sponsor] | | [Approve / Approve with conditions / Reject] | | | |
218
+ | [Sponsor] | | | | | |
180
219
  | [Product owner] | | | | | |
181
220
  | [Delivery lead] | | | | | |
182
221
 
222
+ ## 20. Version history <!-- charter:history -->
223
+
224
+ | Version | Date | Status | Change | Decision |
225
+ |---|---|---|---|---|
226
+ | 1.0 | 0000-00-00 | Draft | Initial draft from Sessions 1–13 | — |
227
+
183
228
  ---
184
229
 
185
- **Source files:** `.planning/discovery/session-01.md` … `session-13.md`, `_requirements.md`.
186
- ```
230
+ **Source files:** `.planning/discovery/session-01.md` … `session-13.md`, `_requirements.md`, `_screens.md`,
231
+ `_feedback.md`, `_research.md`, `_deviations.md`.
232
+ ````
187
233
 
188
234
  ---
189
235
 
190
236
  ## Where each section comes from
191
237
 
192
- Fill every section from the session tables below and nothing else. The session files are the source of
193
- truth; the charter only condenses them.
238
+ Fill every section from the tables below and nothing else. The session files and the registers are the
239
+ source of truth; the charter only condenses them.
194
240
 
195
241
  | § | Section | Source (file § table) |
196
242
  |---|---|---|
197
- | — | Front matter, document control | `_progress.md` (completion dates); Session 1 § Stakeholder Register (client) |
198
- | 1 | Purpose and background | Session 1 § Business Vision Summary; Session 2 § Pain Points Register (top 3–5 by impact) |
199
- | 2 | Objectives and success measures | Session 3 § Business Objectives |
200
- | 3 | Scope | Session 3 § MVP Scope Boundary and § EPIC Register; counts from the roll-up block in `_requirements.md` |
243
+ | — | Front matter, document control | `_progress.md` (completion dates); Session 1 § Stakeholder Register (client); language per the rule above |
244
+ | 1 | Purpose and background | Session 1 § Business Vision Summary; Session 2 § Pain Points Register (top 3–5 by impact, `PP-` IDs in Source) |
245
+ | 2 | Objectives and success measures | Session 3 § Business Objectives (`BO-` IDs); a column the source table does not have (Baseline, say) reads `—` |
246
+ | 3 | Scope | Session 3 § MVP Scope Boundary and § EPIC Register (`E-` IDs, each with the requirement IDs it groups — from the register's requirement column when it has one, else from the Step Matrices' Requirements cells grouped by EPIC); out-of-scope items with their `D-` decision; counts from the roll-up block of `_requirements.md` |
201
247
  | 4 | Stakeholders and users | Session 1 § Stakeholder Register; Session 4 § Refined Personas (else Session 2 § User Personas) |
202
- | 5 | Solution overview | Session 5 § Technology Stack Decisions and § Architecture Decision Records; Session 8 § Integration Design Register; Session 6 § Data Classification Matrix, § Compliance Requirements Register, § Availability and DR Targets; Session 7 § IdP Integration Design |
203
- | 6 | Quality and acceptance | Session 9 § UAT Process and § Quality Gates; Session 10 § Go-Live Readiness Checklist |
204
- | 7 | Delivery plan | Session 11 § Milestone Plan, § Project Timeline, § EPIC Build Order |
205
- | 8 | Team and governance | Session 12 § Team Structure and § Governance Structure; reporting cadence from Session 12 topic "Communication and reporting" |
206
- | 9 | Budget, constraints and assumptions | Session 1 § Constraints and Risks Register; any `[needs-business-input]` item still parked |
207
- | 10 | Risks | Session 11 § Risk Register, plus open risks from Session 1 § Constraints and Risks Register |
208
- | 11 | Open items | Session 13 § Open Items Register |
209
- | 12 | Go / No-Go recommendation | Session 13 § Go / No-Go Assessment (copied as recorded, not re-scored) |
210
- | 13 | Key decisions | § Key Decisions of every session — only decisions that change scope, architecture, cost or timeline |
211
- | 14 | Sign-off | Session 1 § Stakeholder Register — every stakeholder with approval authority gets a row |
248
+ | 5 | Approvals and role holders | Session 1 § Approval Matrix (one row each, Source `[vault: <path>]` or `room`); a Session 1 that predates the matrix gives the Stakeholder Register's decision-authority column instead. Role holders (privacy owner, security owner, incident contact, architect) from the Key Decision of any session that names one — `Not decided in Discovery — OI-n` when none does |
249
+ | 6 | Solution overview | Session 5 § Technology Stack Decisions (`D-05-n`) and § Architecture Decision Records; Session 8 § Integration Design Register (`IF-` IDs); Session 7 § IdP Integration Design |
250
+ | 7 | Deviations from standards | `_deviations.md` (`DEV-` IDs, every row — `charter-check` reports a row left out) when it exists; until then every **Deviation Record** table a session carries (Sessions 5–10, `ADR-` IDs, Status as signed or superseded) plus every Sessions 4–10 **Standards Applied** row whose Deviation is not `none`, each with its `D-ss-n` |
251
+ | 8 | Data | Session 6 § Data Classification Matrix, § Compliance Requirements Register, § Availability and DR Targets; Session 2 § Data Entity Map for personal data |
252
+ | 9 | Quality and acceptance | Session 9 § UAT Process and § Quality Gates; Session 10 § Go-Live Readiness Checklist |
253
+ | 10 | What was validated | `_feedback.md` (one row per round: verdict counts, whether every `Processing` cell is closed); `_screens.md` (required / deferred counts, and the number of MVP requirements in the no-screen bucket — uncovered requirements are always 0 once `screen-check` passes); `prototype/README.md` (flows, version) |
254
+ | 11 | Delivery plan | Session 11 § Milestone Plan, § Project Timeline, § EPIC Build Order |
255
+ | 12 | Team and governance | Session 12 § Team Structure and § Governance Structure; reporting cadence from Session 12 topic "Communication and reporting" |
256
+ | 13 | Budget, constraints and assumptions | Session 1 § Constraints and Risks Register (`CON-` IDs); any `[needs-business-input]` item still parked. IDs are copied as minted — an engagement that minted `C1`/`R1` without a hyphen keeps them, and those rows are then outside the families `charter-check` resolves |
257
+ | 14 | Risks | Session 11 § Risk Register plus open risks from Session 1 § Constraints and Risks Register (`R-` IDs, as minted) |
258
+ | 15 | Open items | Session 13 § Open Items Register, row for row, in the charter's six columns — `Source Session` and `Priority` stay in the register (`OI-` IDs) |
259
+ | 16 | Conditions | every condition attached to a `Go with conditions` (an Amber row under a plain `Go` is not a condition; it stays an open item); every section carrying `⚠️ CONDITIONAL — <RS-nn\|DG-nn>` (from the sessions' `conditional:` frontmatter); every open `Gates-MVP` row of `_research.md`; every `Dropped (D-ss-n)` row of `_requirements.md`; every Session 13 open item that must resolve before build and is still open |
260
+ | 17 | Go / No-Go recommendation | Session 13 § Go / No-Go Assessment, copied as recorded — the eight rows in order, status cells verbatim |
261
+ | 18 | Key decisions | § Key Decisions of every session — only decisions that change scope, architecture, cost or timeline |
262
+ | 19 | Sign-off | Session 1 § Stakeholder Register and § Approval Matrix — every party with approval authority gets a row |
263
+ | 20 | Version history | one row per version of this document; the last row's version equals the frontmatter `version` |
212
264
 
213
265
  ## Fill rules
214
266
 
215
267
  - **Never invent.** Every statement traces to a session table above. A value Discovery did not settle is
216
- written as `Not decided in Discovery — OI-n`, and that item appears in § 11 Open items.
217
- - **Keep the IDs.** Requirement, EPIC, decision (`D-<ss>-<n>`), risk and open-item IDs are copied
218
- exactly as the session files write them, so every line can be traced back.
268
+ written as `Not decided in Discovery — OI-n`, and that item appears in § 15 Open items.
269
+ - **Keep the IDs.** Requirement, EPIC, decision (`D-<ss>-<n>`), risk, open-item, screen and deviation IDs
270
+ are copied exactly as the session files and registers write them. `charter-check` resolves every ID a
271
+ table cell cites; an ID nothing minted is a fault.
219
272
  - **Condense, don't copy.** Tables carry the headline rows; the full detail stays in the session files.
220
273
  Aim for a charter that reads in about fifteen minutes.
221
- - **Fixed shape.** Keep all 14 sections, their numbers, headings and table columns. An empty section
222
- says `None identified in Discovery.`
223
- - **Go / No-Go is recorded, not re-judged.** § 12 copies Session 13's assessment and conditions verbatim.
274
+ - **Fixed shape.** Keep all 20 sections, their keys, their order and their table columns. An empty table
275
+ stays in place with no rows, and the section's prose says `None identified in Discovery.` (in the
276
+ sprint language). The **Source files** footer names only the files that exist in this engagement.
277
+ - **Go / No-Go is recorded, not re-judged.** § 17 copies Session 13's assessment verbatim and the
278
+ frontmatter `go_no_go` equals its overall recommendation; `Pending` is allowed only while `status`
279
+ is `Draft`.
280
+ - **Conditions are the honest qualifiers of the sign-off.** A Session 13 open item marked
281
+ `Yes` under *Must resolve before build?* is either closed in Session 13 or listed in § 16.
224
282
  - **Status follows the signatures.** `Draft` while being written, `For sign-off` once circulated,
225
- `Signed` when every § 14 row says Approve, `Signed with conditions` when any row approves with
226
- conditions, `Rejected` when any row rejects. A new version resets the status to `Draft`.
283
+ `Signed` when every § 19 row says `Approve`, `Signed with conditions` when any row approves with
284
+ conditions, `Rejected` when any row rejects.
285
+ - **A change is a new version.** Any edit after `For sign-off` adds a § 20 row, bumps `version`,
286
+ resets `status` to `Draft` and regenerates the exports (`workflows/discovery-sprint/charter.md`
287
+ § Redraft). The markdown is the source; `PROJECT-CHARTER.docx` and `.pdf` next to it are renderings.
@@ -68,9 +68,9 @@ Common types: Tech stack, Timeline, Budget, Dependencies, Compatibility, Perform
68
68
 
69
69
  <!-- Decisions that constrain future work. Add throughout project lifecycle. -->
70
70
 
71
- | Decision | Rationale | Outcome |
72
- |----------|-----------|---------|
73
- | [Choice] | [Why] | [✓ Good / ⚠️ Revisit / — Pending] |
71
+ | ID | Decision | Rationale | Outcome |
72
+ |----|----------|-----------|---------|
73
+ | [D-<ss>-<n> from Discovery, or —] | [Choice] | [Why] | [✓ Good / ⚠️ Revisit / — Pending] |
74
74
 
75
75
  ---
76
76
  *Last updated: [date] after [trigger]*
@@ -107,6 +107,24 @@ Which phases cover which requirements. Updated during roadmap creation.
107
107
  - Complete: Requirement verified
108
108
  - Blocked: Waiting on external factor
109
109
 
110
+ **Discovery variant (projects handed over by `/pp-discovery-to-build`):**
111
+ - Every line is one `_requirements.md` row with its minted ID; nothing is renumbered
112
+ - The description is followed by ` — <MoSCoW> · <Disposition> · <Provenance>` copied from the row
113
+ (`Must · MVP · [03 §2.1]`), and the acceptance criteria follow on an indented `- AC:` line, verbatim
114
+ - `MVP` rows are v1, `Later` rows are v2, `Dropped (D-ss-n)` rows are Out of Scope with the decision
115
+ as the reason; the `**ID**` lead keeps every existing parser working
116
+
117
+ ```markdown
118
+ ### Order Intake (E-01)
119
+
120
+ - [ ] **K-01**: User can create a task — Must · MVP · [03 §2.1]
121
+ - AC: A task appears in the list within one second of saving
122
+ ```
123
+
124
+ The planner and verifier read the same rows through `pp_run query discovery.for-phase <N>`
125
+ (`references/discovery-build-consumption.md`); this file is the roadmap-side mirror, not a second
126
+ source.
127
+
110
128
  </guidelines>
111
129
 
112
130
  <evolution>