yadflow 3.18.1 → 4.0.0-next.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/CHANGELOG.md +355 -0
- package/README.md +79 -26
- package/bin/commands.mjs +41 -0
- package/bin/yad.mjs +437 -124
- package/cli/artifact-status.mjs +34 -15
- package/cli/checkpoint.mjs +69 -49
- package/cli/codeowners-command.mjs +170 -0
- package/cli/codeowners.mjs +397 -0
- package/cli/commit.mjs +13 -9
- package/cli/companion.mjs +2 -2
- package/cli/dial.mjs +183 -0
- package/cli/docs.mjs +88 -32
- package/cli/doctor.mjs +1472 -97
- package/cli/epic-state.mjs +3478 -232
- package/cli/epic.mjs +506 -0
- package/cli/errors.mjs +4 -1
- package/cli/gate.mjs +1002 -209
- package/cli/history.mjs +556 -0
- package/cli/hook.mjs +266 -55
- package/cli/hubcommit.mjs +6 -17
- package/cli/index-command.mjs +87 -0
- package/cli/ledger.mjs +57 -7
- package/cli/lib.mjs +184 -18
- package/cli/manifest.mjs +367 -56
- package/cli/migrate.mjs +726 -53
- package/cli/mode.mjs +170 -0
- package/cli/next.mjs +349 -90
- package/cli/openpr.mjs +191 -39
- package/cli/people.mjs +654 -0
- package/cli/plan.mjs +417 -132
- package/cli/platform.mjs +110 -129
- package/cli/product-index.mjs +287 -0
- package/cli/protection.mjs +706 -0
- package/cli/reconcile.mjs +38 -12
- package/cli/repo-publish.mjs +24 -26
- package/cli/repo.mjs +23 -14
- package/cli/report.mjs +21 -15
- package/cli/review.mjs +24 -27
- package/cli/riskmap-command.mjs +289 -0
- package/cli/riskmap.mjs +373 -0
- package/cli/setup.mjs +139 -287
- package/cli/ship.mjs +7 -6
- package/cli/skill.mjs +180 -0
- package/cli/skip.mjs +211 -30
- package/cli/thread.mjs +42 -17
- package/cli/tidy.mjs +20 -20
- package/cli/update-commit.mjs +22 -22
- package/cli/usage.mjs +115 -109
- package/package.json +3 -3
- package/skills/sdlc/config.yaml +166 -87
- package/skills/sdlc/module-help.csv +35 -35
- package/skills/yad-analysis/SKILL.md +125 -65
- package/skills/yad-architecture/SKILL.md +34 -23
- package/skills/yad-architecture/references/contract-format.md +10 -8
- package/skills/yad-backfill/SKILL.md +14 -8
- package/skills/yad-backfill/references/backfill.md +1 -1
- package/skills/yad-change/SKILL.md +127 -52
- package/skills/yad-change/references/triage.md +42 -28
- package/skills/yad-checks/SKILL.md +89 -45
- package/skills/yad-checks/references/check-gates.md +315 -92
- package/skills/yad-checks/templates/checks/build-test-lint.sh +25 -7
- package/skills/yad-checks/templates/checks/commit-message.sh +17 -3
- package/skills/yad-checks/templates/checks/contract-check.sh +58 -2
- package/skills/yad-checks/templates/checks/epic-open.sh +3 -3
- package/skills/yad-checks/templates/checks/install-deps.sh +46 -0
- package/skills/yad-checks/templates/checks/ledger-guard.sh +94 -18
- package/skills/yad-checks/templates/checks/lineage-check.sh +23 -9
- package/skills/yad-checks/templates/checks/package-manager.sh +140 -0
- package/skills/yad-checks/templates/checks/reconcile-debt-check.sh +4 -4
- package/skills/yad-checks/templates/checks/risk-map-check.sh +438 -0
- package/skills/yad-checks/templates/checks/verified-commits.sh +20 -46
- package/skills/yad-checks/templates/github/yad-checks.yml +37 -5
- package/skills/yad-checks/templates/github/yad-hub-checks.yml +5 -5
- package/skills/yad-checks/templates/github/yad-update-guard.yml +3 -4
- package/skills/yad-checks/templates/github/yad-verified-commits.yml +4 -4
- package/skills/yad-checks/templates/gitlab/.gitlab-ci.yml +7 -1
- package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +22 -4
- package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +5 -5
- package/skills/yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml +4 -4
- package/skills/yad-checks/templates/hooks/ledger-guard-cursor.sh +91 -0
- package/skills/yad-checks/templates/hooks/ledger-guard.sh +38 -7
- package/skills/yad-commit/SKILL.md +6 -6
- package/skills/yad-connect-design/SKILL.md +6 -6
- package/skills/yad-connect-design/references/design-context.md +1 -1
- package/skills/yad-connect-design/references/design-registry.md +2 -2
- package/skills/yad-connect-docs/SKILL.md +12 -12
- package/skills/yad-connect-docs/references/docs-registry.md +1 -1
- package/skills/yad-connect-learning/SKILL.md +5 -5
- package/skills/yad-connect-learning/references/learning-registry.md +2 -2
- package/skills/yad-connect-repos/SKILL.md +92 -54
- package/skills/yad-connect-repos/references/code-context.md +6 -6
- package/skills/yad-connect-repos/references/hub-config.md +68 -58
- package/skills/yad-connect-repos/references/repos-registry.md +10 -9
- package/skills/yad-connect-repos/references/risk-map.md +81 -0
- package/skills/yad-connect-testing/SKILL.md +6 -6
- package/skills/yad-connect-testing/references/testing-context.md +3 -4
- package/skills/yad-connect-testing/references/testing-registry.md +2 -2
- package/skills/yad-defects/SKILL.md +8 -8
- package/skills/yad-discovery/SKILL.md +130 -94
- package/skills/yad-discovery/references/discovery-schema.md +23 -7
- package/skills/yad-discovery/references/foundation-schema.md +374 -0
- package/skills/yad-docs/SKILL.md +16 -11
- package/skills/yad-docs/references/data-mapping.md +9 -7
- package/skills/yad-docs/templates/app/package-lock.json +3 -3
- package/skills/yad-docs-overview/SKILL.md +32 -17
- package/skills/yad-docs-overview/references/pipeline-model.md +47 -28
- package/skills/yad-docs-sync/SKILL.md +10 -5
- package/skills/yad-docs-sync/references/staleness.md +8 -7
- package/skills/yad-engineer-review/SKILL.md +88 -24
- package/skills/yad-engineer-review/references/ship-and-record.md +25 -16
- package/skills/yad-epic/SKILL.md +178 -100
- package/skills/yad-epic/references/state-schema.md +626 -117
- package/skills/yad-hub-bridge/SKILL.md +66 -48
- package/skills/yad-hub-bridge/references/bridge.md +110 -83
- package/skills/yad-hub-bridge/references/login-roster.md +163 -70
- package/skills/yad-hub-bridge/templates/checks/hub-route.sh +22 -19
- package/skills/yad-hub-bridge/templates/github/yad-gate-sync.yml +34 -14
- package/skills/yad-hub-bridge/templates/gitlab/gitlab-ci.include-root.yml +2 -2
- package/skills/yad-hub-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml +22 -12
- package/skills/yad-implement/SKILL.md +29 -15
- package/skills/yad-implement/references/implement-conventions.md +2 -2
- package/skills/yad-learn/SKILL.md +9 -9
- package/skills/yad-learn/references/learning-state.md +2 -2
- package/skills/yad-open-pr/SKILL.md +64 -29
- package/skills/yad-pair-review/SKILL.md +18 -16
- package/skills/yad-pair-review/references/session-state.md +4 -4
- package/skills/yad-pr-template/SKILL.md +48 -27
- package/skills/yad-pr-template/references/risk-routing.md +97 -24
- package/skills/yad-pr-template/templates/checks/pr-template.sh +37 -15
- package/skills/yad-pr-template/templates/checks/pr-title.sh +27 -13
- package/skills/yad-pr-template/templates/checks/risk-route.sh +107 -14
- package/skills/yad-pr-template/templates/github/pull_request_template.md +7 -5
- package/skills/yad-pr-template/templates/gitlab/merge_request_templates/Default.md +7 -5
- package/skills/yad-pr-template/templates/hub/github/pull_request_template.md +15 -14
- package/skills/yad-pr-template/templates/hub/gitlab/merge_request_templates/Default.md +15 -13
- package/skills/yad-reconcile/SKILL.md +3 -3
- package/skills/yad-report/SKILL.md +5 -5
- package/skills/yad-review-companion/SKILL.md +12 -9
- package/skills/yad-review-gate/SKILL.md +198 -79
- package/skills/yad-review-gate/references/gating.md +230 -54
- package/skills/yad-run/SKILL.md +86 -56
- package/skills/yad-run/references/run-loop.md +67 -45
- package/skills/yad-ship/SKILL.md +18 -14
- package/skills/yad-spec/SKILL.md +31 -17
- package/skills/yad-spec/references/spec-handoff.md +17 -5
- package/skills/yad-status/SKILL.md +114 -56
- package/skills/yad-stories/SKILL.md +42 -27
- package/skills/yad-stories/references/story-schema.md +10 -9
- package/skills/yad-stub/SKILL.md +59 -48
- package/skills/yad-sync-repos/SKILL.md +3 -3
- package/skills/yad-test-cases/SKILL.md +37 -30
- package/skills/yad-test-cases/references/test-cases-schema.md +8 -5
- package/skills/yad-timeline/SKILL.md +8 -7
- package/skills/yad-ui/SKILL.md +46 -25
- package/cli/roster.mjs +0 -164
- package/skills/sdlc/install.sh +0 -68
|
@@ -1,134 +1,170 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-discovery
|
|
3
|
-
description: '
|
|
3
|
+
description: 'The Foundation step of the gated SDLC — the Product level, run once per product before any feature epic. With the field-expert lenses (analyst + pm), frame the product and write the Foundation sections into foundation/ — purpose, market (optional), scope (what it is AND what it is not), MVP, roadmap, stack, repos, risks (optional). Greenfield AND brownfield (brownfield reads the connected code). The engine seeds the ledger with `yad foundation new`; this skill authors the sections, then hands off to the team review gate and never auto-advances. Its roadmap.md is the menu of features each yad-epic reads. Use when the user says "start the project", "write the Foundation", "do discovery", "market research / feasibility / roadmap", or "what should we build first".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC —
|
|
6
|
+
# SDLC — Foundation (the Product level)
|
|
7
7
|
|
|
8
|
-
**Goal:** Produce a human-authored, AI-assisted **
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
taken into the normal `yad-epic` flow,
|
|
8
|
+
**Goal:** Produce a human-authored, AI-assisted **Foundation** for the whole product under
|
|
9
|
+
`{project-root}/foundation/`, then hand off to `yad-review-gate`. The Foundation says why the product
|
|
10
|
+
exists, what it is and is not, the smallest thing worth shipping, and the rough order after that. Its
|
|
11
|
+
`roadmap.md` is the menu of features; each feature is later taken into the normal `yad-epic` flow,
|
|
12
|
+
which reads it for project context.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
**What the Foundation is.** The roadmap (`docs/roadmap-idea-1.md`, Part 1) has two levels. The
|
|
15
|
+
**Product** level runs once per product and holds the Foundation. The **Feature** level runs once per
|
|
16
|
+
epic and walks the six phases. The Foundation has its own gate: one approval before feature work
|
|
17
|
+
begins. That approval is **reported, not enforced** in this release — `yad next` says when feature
|
|
18
|
+
epics are going ahead of an unapproved Foundation, and nothing is blocked.
|
|
16
19
|
|
|
17
|
-
This
|
|
18
|
-
|
|
20
|
+
This is a **Shape step**: human-authored with AI assist and **never auto-advances**. It is
|
|
21
|
+
**optional** — a team that already knows what to build can start at `yad-epic`. It supports **both
|
|
22
|
+
greenfield and brownfield**.
|
|
23
|
+
|
|
24
|
+
The skill keeps its old name, `yad-discovery`. Before E75 it wrote a different set of files under the
|
|
25
|
+
reserved `EP-discovery` epic; that older spelling is still read (see Step 1).
|
|
19
26
|
|
|
20
27
|
## Conventions
|
|
21
28
|
|
|
22
29
|
- `{project-root}` resolves from the project working directory.
|
|
23
|
-
-
|
|
24
|
-
|
|
30
|
+
- The Foundation lives in `{project-root}/foundation/`: its sections directly inside it, its ledger in
|
|
31
|
+
`foundation/.sdlc/`, and its review summaries in `foundation/reviews/`. Its fixed id is
|
|
32
|
+
`EP-foundation` — every `yad` command takes that id.
|
|
33
|
+
- Speak in the `communication_language` set in `{project-root}/.sdlc/config.yaml`; write documents in `document_output_language`.
|
|
25
34
|
|
|
26
35
|
## On Activation
|
|
27
36
|
|
|
28
|
-
### Step 1 — Entry guard (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
### Step 1 — Entry guard (one Foundation per product)
|
|
38
|
+
- If `{project-root}/foundation/.sdlc/state.json` already exists, **STOP** and point the user at
|
|
39
|
+
`yad next EP-foundation`. The Foundation is already seeded; edit its sections in place.
|
|
40
|
+
- If `{project-root}/epics/EP-discovery/.sdlc/state.json` exists, this product already has its Product
|
|
41
|
+
level **in the old spelling**. A product has ONE Foundation, so do not seed a second. **STOP** and tell
|
|
42
|
+
the user:
|
|
43
|
+
- on a **local** ledger, `yad migrate` (preview) then `yad migrate --apply` converts it into
|
|
44
|
+
`foundation/`, keeping its files and approvals;
|
|
45
|
+
- on a **verified** ledger CI owns that ledger and it cannot be moved by hand — keep working in
|
|
46
|
+
`epics/EP-discovery/`, and review it with `yad gate open EP-discovery discovery/`.
|
|
33
47
|
|
|
34
48
|
Detect the project mode from `{project-root}/.sdlc/hub.json` `profile.codebase`
|
|
35
49
|
(`greenfield` | `brownfield`, set by `yad setup`). If absent, ask the user; default `greenfield`.
|
|
36
50
|
|
|
37
51
|
### Step 2 — Shape with the field-expert lenses (assist: analyst + pm)
|
|
38
|
-
Adopt the **analyst** lens
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
Adopt the **analyst** lens and the **pm** lens to frame the product as a domain expert would. Research:
|
|
53
|
+
- **Market** — market size, segments, demand, trends, positioning.
|
|
54
|
+
- **Domain** — the problem domain, regulations, and constraints of the field.
|
|
55
|
+
- **Product brief** — the users it serves, the value proposition, success metrics.
|
|
56
|
+
|
|
57
|
+
Pressure-test: who is this for and why does it exist, what does success look like, who else does this
|
|
58
|
+
and why us, **what it is and explicitly what it is not**, what the smallest valuable slice is, what
|
|
59
|
+
sequences after it, what it is built with, and what could kill it.
|
|
60
|
+
|
|
61
|
+
### Step 2a — Greenfield: write the Foundation with the user, one section at a time
|
|
62
|
+
On a **greenfield** product nothing is built yet, so every section comes from the user's answers. For
|
|
63
|
+
each section, `references/foundation-schema.md` gives the template, the questions to **Ask**, what **a
|
|
64
|
+
good answer** holds, what **the reviewer checks**, and a short example.
|
|
65
|
+
|
|
66
|
+
Work in this order, because each section is the input to the next:
|
|
67
|
+
|
|
68
|
+
1. `purpose.md` — why it exists, who for, how success is measured.
|
|
69
|
+
2. `scope.md` — what it is, and at least three things it is **not**.
|
|
70
|
+
3. `mvp.md` — the smallest set of capabilities that reaches the first success signal.
|
|
71
|
+
4. `roadmap.md` — Phase 1 is exactly the MVP, one row per feature; later phases in a stated order.
|
|
72
|
+
5. `stack.md` — for each choice: the decision, the alternatives rejected, and why.
|
|
73
|
+
6. `repos.md` — the layout and one row per intended repo; they need not exist yet.
|
|
74
|
+
7. `market.md` and `risks.md` — only if the user wants them. Both are optional.
|
|
75
|
+
|
|
76
|
+
For each section:
|
|
77
|
+
- Ask the questions **one at a time**. Write down the user's answer, not your own guess. When an answer is
|
|
78
|
+
vague ("everyone", "fast", "not bloated"), ask again for something concrete.
|
|
79
|
+
- Draft the section's text, show it to the user, and change it until they agree. Then move to the next
|
|
80
|
+
one. The agreed text is written into `foundation/` in Step 5, once the authoring branch (Step 3) and the
|
|
81
|
+
ledger (Step 4) exist — never onto whatever branch happens to be checked out.
|
|
82
|
+
- Check it against the sections before it: the MVP must not contradict a non-goal in `scope.md`, and
|
|
83
|
+
Phase 1 of the roadmap must match `mvp.md`.
|
|
84
|
+
|
|
85
|
+
Keep examples inside `<!-- comments -->`. A section holding only its headings, comments and an empty table
|
|
86
|
+
is **not written**, and the gate warns about it (Step 5) — but a filled example row counts as content.
|
|
87
|
+
|
|
88
|
+
### Step 2b — Brownfield: read what already exists
|
|
50
89
|
Read the registry `{project-root}/.sdlc/repos.json` (`config.yaml` `code_context`). For **every
|
|
51
90
|
connected repo**, load the lightweight code-map `{project-root}/.sdlc/code-context/<repo>/code-map.md`
|
|
52
|
-
and base `
|
|
53
|
-
|
|
91
|
+
and base `stack.md` and `repos.md` on **what already exists** — languages, frameworks, modules,
|
|
92
|
+
endpoints, data — so the Foundation describes the real system rather than re-proposing it.
|
|
54
93
|
|
|
55
|
-
- **Greenfield-safe:** if `repos.json` is absent
|
|
56
|
-
|
|
94
|
+
- **Greenfield-safe:** if `repos.json` is absent or empty, there is nothing to read — write every
|
|
95
|
+
section with the user as in Step 2a, where `stack.md` and `repos.md` record the intended choices, the
|
|
96
|
+
alternatives rejected, and why.
|
|
57
97
|
- **Staleness:** if a repo's current HEAD (`git -C <path> rev-parse HEAD`) ≠ its registry `syncedHead`,
|
|
58
98
|
warn and suggest `yad repo refresh <repo>` (a human decision — flag, never auto-refresh).
|
|
59
99
|
- **Backfill pointer:** for an existing codebase, point the user at `yad-backfill` to capture specs for
|
|
60
|
-
already-built features;
|
|
100
|
+
already-built features; the Foundation frames the *product*, backfill captures the *features*.
|
|
61
101
|
|
|
62
102
|
### Step 3 — Open the authoring branch
|
|
63
|
-
Open the
|
|
103
|
+
Open the Foundation authoring branch `foundation/EP-foundation` per the shared procedure
|
|
64
104
|
(`../yad-epic/references/state-schema.md` → "Authoring branches"): git-safe (skip with a note if
|
|
65
105
|
`{project-root}` is not a git work tree), check out the branch if it exists, else create it from the
|
|
66
|
-
|
|
67
|
-
`review/EP-
|
|
68
|
-
|
|
69
|
-
### Step 4 — Write the discovery set
|
|
70
|
-
Write these files under `{project-root}/epics/EP-discovery/`. Each is a normal Markdown artifact; the
|
|
71
|
-
gate binds to the **whole set** (editing any one revokes approvals). `roadmap.md` summarises and links
|
|
72
|
-
the others and is the spine of the review.
|
|
73
|
-
|
|
74
|
-
- `market-research.md` — market, segments, demand, trends (assist: `bmad-market-research`).
|
|
75
|
-
- `competitor-analysis.md` — competitors, capabilities, gaps, our differentiation (**both modes**).
|
|
76
|
-
- `current-state.md` — brownfield: what exists today (Step 2b); greenfield: clean-slate assumptions.
|
|
77
|
-
- `feasibility.md` — technical/operational/economic feasibility, risks, viability, go/no-go.
|
|
78
|
-
- `requirements.md` — the consolidated requirements list, **functional AND non-functional**, as a
|
|
79
|
-
table (see `references/discovery-schema.md`). Functional rows are candidate features (registration,
|
|
80
|
-
login, …); non-functional rows are cross-cutting (performance, security, accessibility, i18n …).
|
|
81
|
-
- `roadmap.md` — the phased plan with an explicit **MVP** phase, then later phases. Each feature row
|
|
82
|
-
carries a proposed `EP-<slug>` id, its target phase, and a `status:` of `planned`
|
|
83
|
-
(see `references/discovery-schema.md` for the exact templates).
|
|
106
|
+
Product's default branch. Author and commit the Foundation on it. Distinct from the verified ledger's
|
|
107
|
+
`review/EP-foundation/foundation` branch.
|
|
84
108
|
|
|
85
|
-
|
|
109
|
+
### Step 4 — Seed the ledger with the engine
|
|
110
|
+
Run:
|
|
86
111
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
sequence, both steps `automation: human_approve` and `locked`, with the `kind: "discovery"` marker the
|
|
90
|
-
engine keys off. Use this exact shape (see `references/discovery-schema.md`):
|
|
91
|
-
|
|
92
|
-
```json
|
|
93
|
-
{
|
|
94
|
-
"epicId": "EP-discovery",
|
|
95
|
-
"kind": "discovery",
|
|
96
|
-
"createdAt": "<YYYY-MM-DD>",
|
|
97
|
-
"currentStep": "discovery-review",
|
|
98
|
-
"steps": [
|
|
99
|
-
{ "id": "discovery", "type": "author", "artifact": "discovery/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "done", "risk_tags": [] },
|
|
100
|
-
{ "id": "discovery-review", "type": "review+approve", "artifact": "discovery/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "in_review", "risk_tags": [] }
|
|
101
|
-
]
|
|
102
|
-
}
|
|
112
|
+
```
|
|
113
|
+
yad foundation new
|
|
103
114
|
```
|
|
104
115
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
That writes `foundation/.sdlc/state.json` with the Foundation's two-step chain (`foundation` →
|
|
117
|
+
`foundation-review`), an empty `approvals.json` and `comments.json`, and the `foundation/reviews/`
|
|
118
|
+
folder. The engine owns that file: do not write or edit it by hand. The command refuses a second
|
|
119
|
+
Foundation and a product still on the old spelling (Step 1 already stopped for both).
|
|
120
|
+
|
|
121
|
+
### Step 5 — Write the Foundation sections
|
|
122
|
+
Write these files directly in `{project-root}/foundation/`, one per section, using the templates in
|
|
123
|
+
`references/foundation-schema.md` for their headings. The bodies are the text already agreed with the
|
|
124
|
+
user — on greenfield, the sections drafted in Step 2a; on brownfield, what Step 2b read from the
|
|
125
|
+
code-maps. Do not start a section over from its blank template. The gate binds to the **whole set**: editing any section revokes
|
|
126
|
+
approvals. (The frontmatter `status:` line does not count — the gate rewrites it after the review.)
|
|
127
|
+
|
|
128
|
+
| File | Section | Required? |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| `purpose.md` | Why this exists, who it is for, what success looks like | required |
|
|
131
|
+
| `market.md` | Who else does this, and why us | optional |
|
|
132
|
+
| `scope.md` | What it is — **and explicitly what it is not** | required |
|
|
133
|
+
| `mvp.md` | The smallest thing worth shipping | required |
|
|
134
|
+
| `roadmap.md` | The rough order after the MVP — the menu of feature epics | required |
|
|
135
|
+
| `stack.md` | Languages, frameworks, hosting, databases | required |
|
|
136
|
+
| `repos.md` | How many repos, what each does, monorepo or separate | required |
|
|
137
|
+
| `risks.md` | What could kill this | optional |
|
|
138
|
+
|
|
139
|
+
**All six required sections must exist to review.** Until they do, the Foundation has no fingerprint to
|
|
140
|
+
bind an approval to, and `yad gate open` warns. An optional section counts once it exists — adding or
|
|
141
|
+
removing one after an approval revokes it, like any other edit.
|
|
142
|
+
|
|
143
|
+
**Every section that exists must also be written.** A section that still holds only its template — the
|
|
144
|
+
frontmatter, `#` and `##` headings, comments, `---` dividers and an empty table — makes `yad gate open` and `yad gate sync` warn
|
|
145
|
+
`Foundation not written yet`, and once the review has opened or passed `yad doctor` reports it as
|
|
146
|
+
`foundation:unwritten`. These are warnings, not refusals: finish the section before asking for review.
|
|
147
|
+
|
|
148
|
+
Leave `owner` for the user to set in each frontmatter. Fill the bodies with the user.
|
|
119
149
|
|
|
120
150
|
### Step 6 — Stop at the gate (do NOT advance)
|
|
121
|
-
Report
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
`
|
|
128
|
-
|
|
151
|
+
Report the path to the Foundation, and that the next action is **review** via `yad-review-gate`:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
yad gate open EP-foundation foundation/
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Never mark `foundation-review` approved here** — only real reviewers do that through the gate. When
|
|
158
|
+
the gate passes, the ledger moves to the `foundation-done` sentinel (not `ready-for-build` — the
|
|
159
|
+
Foundation has no Build). From then on `foundation/roadmap.md` and `foundation/scope.md` are the inputs
|
|
160
|
+
each `yad-epic` reads (its "Step 2c"). When the Product has a platform, the gate opens a review PR on the
|
|
161
|
+
Product (via `yad-hub-bridge`) and `yad-review-gate action: sync` pulls platform approvals and comments
|
|
162
|
+
into the ledger; otherwise the review is recorded locally.
|
|
129
163
|
|
|
130
164
|
## Reference
|
|
131
|
-
-
|
|
165
|
+
- Foundation section templates: `references/foundation-schema.md`.
|
|
166
|
+
- The older spelling of the Product level (`EP-discovery`, its six files, and how it converts):
|
|
167
|
+
`references/discovery-schema.md`.
|
|
132
168
|
- State schema, chain shapes, and the authoring-branch procedure:
|
|
133
169
|
`../yad-epic/references/state-schema.md`.
|
|
134
170
|
- The epic step that consumes `roadmap.md`: `../yad-epic/SKILL.md` (Step 2c).
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
# Discovery schema —
|
|
1
|
+
# Discovery schema — the OLD spelling of the Product level
|
|
2
|
+
|
|
3
|
+
> **Since E75 this is the older spelling.** New products get a Foundation in `{project-root}/foundation/`
|
|
4
|
+
> — see `foundation-schema.md`, seeded by `yad foundation new`. This page stays because a product that
|
|
5
|
+
> already has an `EP-discovery` keeps working exactly as described here: the engine still reads it, gates
|
|
6
|
+
> it, and ends its review at `discovery-done`.
|
|
7
|
+
>
|
|
8
|
+
> **Converting it.** On a **local** ledger, `yad migrate --apply` moves `epics/EP-discovery/` into
|
|
9
|
+
> `foundation/`: the six files keep their names (so their fingerprint, and every approval bound to it,
|
|
10
|
+
> is unchanged), the ledger is re-labelled to the Foundation's ids, and the step keeps `artifact:
|
|
11
|
+
> "discovery/"` so the gate still hashes those six files. On a **verified** ledger CI owns the files and
|
|
12
|
+
> the move cannot be made by a human commit, so the gate bot makes it: `yad gate ci` moves the folder at
|
|
13
|
+
> the next merged review it handles, once the product level's own review has passed and the checks
|
|
14
|
+
> committed in the repo know `foundation/`. A product has ONE product level: never seed a Foundation beside an `EP-discovery`.
|
|
2
15
|
|
|
3
16
|
The project discovery phase ("epic zero") lives under `{project-root}/epics/EP-discovery/`. It reuses
|
|
4
17
|
the per-epic ledger files (`.sdlc/state.json`, `approvals.json`, `comments.json`, `reviews/`,
|
|
@@ -15,21 +28,22 @@ object and the 2-step chain.
|
|
|
15
28
|
"createdAt": "<YYYY-MM-DD>",
|
|
16
29
|
"currentStep": "discovery-review",
|
|
17
30
|
"steps": [
|
|
18
|
-
{ "id": "discovery", "type": "author", "artifact": "discovery/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "done", "risk_tags": [] },
|
|
19
|
-
{ "id": "discovery-review", "type": "review+approve", "artifact": "discovery/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "in_review", "risk_tags": [] }
|
|
31
|
+
{ "id": "discovery", "type": "author", "artifact": "discovery/", "assistance": "review", "driver": "pair", "automation": "human_approve", "advance": "human", "locked": true, "status": "done", "risk_tags": [] },
|
|
32
|
+
{ "id": "discovery-review", "type": "review+approve", "artifact": "discovery/", "assistance": "review", "driver": "pair", "automation": "human_approve", "advance": "human", "locked": true, "status": "in_review", "risk_tags": [] }
|
|
20
33
|
]
|
|
21
34
|
}
|
|
22
35
|
```
|
|
23
36
|
|
|
24
37
|
- `artifact: "discovery/"` is a **virtual** base: `artifactHash` fingerprints the whole discovery file
|
|
25
38
|
set (`discoveryHash` in `cli/epic-state.mjs`), so an edit to any discovery file revokes prior
|
|
26
|
-
approvals — exactly like `stories/` fingerprints the stories directory.
|
|
39
|
+
approvals — exactly like `stories/` fingerprints the stories directory. The frontmatter `status:` line
|
|
40
|
+
is left out of each file's fingerprint, so the gate flipping it to `approved` is not an edit.
|
|
27
41
|
- The **full set is required to review**: if any of the six files is missing, `discoveryHash` returns
|
|
28
42
|
`null` — the discovery is **incomplete and non-reviewable** (no hash to bind an approval to), and
|
|
29
43
|
`yad gate open` / `yad gate sync` warn with the missing filenames. Write all six (in greenfield,
|
|
30
44
|
`current-state.md` is a short clean-slate note) before handing off to the gate.
|
|
31
45
|
- On approval the gate sets `currentStep: "discovery-done"` (a terminal sentinel — discovery has **no**
|
|
32
|
-
|
|
46
|
+
Build, so it never becomes `ready-for-build`).
|
|
33
47
|
- The discovery files (relative to the epic dir) the gate commits on the review branch and re-hashes at
|
|
34
48
|
merge are: `market-research.md`, `competitor-analysis.md`, `current-state.md`, `feasibility.md`,
|
|
35
49
|
`requirements.md`, `roadmap.md` (the `DISCOVERY_FILES` list).
|
|
@@ -95,8 +109,10 @@ owner:
|
|
|
95
109
|
<!-- explicitly deferred, with why -->
|
|
96
110
|
```
|
|
97
111
|
|
|
98
|
-
|
|
99
|
-
|
|
112
|
+
**Do not update the `Status` column by hand.** Editing the roadmap after its review has passed makes the
|
|
113
|
+
approvals read as stale; `yad foundation status` reads each feature's status from the epic ledgers, for
|
|
114
|
+
this spelling too. (The column's old hand-set ladder was `planned` → `epic-started` → `shipped`; rows that
|
|
115
|
+
already say so can stay.) The proposed `EP-<slug>` ids are suggestions for the eventual
|
|
100
116
|
`yad-epic` runs — `yad-epic` still assigns the id (and skips the reserved `EP-discovery`).
|
|
101
117
|
|
|
102
118
|
The other four artifacts (`market-research.md`, `competitor-analysis.md`, `current-state.md`,
|