yadflow 3.18.1 → 3.19.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +11 -11
  3. package/bin/yad.mjs +8 -8
  4. package/cli/artifact-status.mjs +4 -4
  5. package/cli/checkpoint.mjs +25 -25
  6. package/cli/commit.mjs +1 -1
  7. package/cli/companion.mjs +2 -2
  8. package/cli/doctor.mjs +10 -10
  9. package/cli/epic-state.mjs +29 -29
  10. package/cli/errors.mjs +1 -1
  11. package/cli/gate.mjs +32 -33
  12. package/cli/hook.mjs +4 -4
  13. package/cli/hubcommit.mjs +1 -1
  14. package/cli/ledger.mjs +3 -3
  15. package/cli/lib.mjs +23 -9
  16. package/cli/manifest.mjs +42 -21
  17. package/cli/migrate.mjs +54 -12
  18. package/cli/next.mjs +5 -5
  19. package/cli/openpr.mjs +8 -8
  20. package/cli/plan.mjs +28 -9
  21. package/cli/platform.mjs +1 -1
  22. package/cli/report.mjs +1 -1
  23. package/cli/review.mjs +5 -5
  24. package/cli/setup.mjs +22 -10
  25. package/cli/ship.mjs +1 -1
  26. package/cli/skip.mjs +1 -1
  27. package/cli/thread.mjs +1 -1
  28. package/cli/tidy.mjs +2 -2
  29. package/cli/update-commit.mjs +1 -1
  30. package/package.json +1 -1
  31. package/skills/sdlc/config.yaml +30 -30
  32. package/skills/sdlc/module-help.csv +21 -21
  33. package/skills/yad-analysis/SKILL.md +10 -10
  34. package/skills/yad-architecture/SKILL.md +10 -10
  35. package/skills/yad-architecture/references/contract-format.md +2 -3
  36. package/skills/yad-backfill/SKILL.md +5 -5
  37. package/skills/yad-change/SKILL.md +13 -13
  38. package/skills/yad-change/references/triage.md +2 -3
  39. package/skills/yad-checks/SKILL.md +34 -16
  40. package/skills/yad-checks/references/check-gates.md +63 -19
  41. package/skills/yad-checks/templates/checks/build-test-lint.sh +25 -7
  42. package/skills/yad-checks/templates/checks/epic-open.sh +1 -1
  43. package/skills/yad-checks/templates/checks/install-deps.sh +46 -0
  44. package/skills/yad-checks/templates/checks/ledger-guard.sh +41 -12
  45. package/skills/yad-checks/templates/checks/package-manager.sh +140 -0
  46. package/skills/yad-checks/templates/checks/reconcile-debt-check.sh +3 -3
  47. package/skills/yad-checks/templates/github/yad-checks.yml +24 -3
  48. package/skills/yad-checks/templates/github/yad-hub-checks.yml +2 -2
  49. package/skills/yad-checks/templates/github/yad-verified-commits.yml +1 -1
  50. package/skills/yad-checks/templates/gitlab/.gitlab-ci.yml +7 -1
  51. package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +12 -3
  52. package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +2 -2
  53. package/skills/yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml +1 -1
  54. package/skills/yad-checks/templates/hooks/ledger-guard.sh +1 -1
  55. package/skills/yad-commit/SKILL.md +2 -2
  56. package/skills/yad-connect-design/SKILL.md +1 -1
  57. package/skills/yad-connect-docs/SKILL.md +1 -1
  58. package/skills/yad-connect-repos/SKILL.md +32 -15
  59. package/skills/yad-connect-repos/references/code-context.md +2 -2
  60. package/skills/yad-connect-repos/references/hub-config.md +25 -11
  61. package/skills/yad-connect-repos/references/repos-registry.md +3 -3
  62. package/skills/yad-connect-testing/SKILL.md +1 -1
  63. package/skills/yad-defects/SKILL.md +1 -1
  64. package/skills/yad-discovery/SKILL.md +6 -6
  65. package/skills/yad-discovery/references/discovery-schema.md +1 -1
  66. package/skills/yad-docs/SKILL.md +3 -3
  67. package/skills/yad-docs-overview/SKILL.md +3 -3
  68. package/skills/yad-docs-overview/references/pipeline-model.md +17 -11
  69. package/skills/yad-engineer-review/SKILL.md +9 -9
  70. package/skills/yad-engineer-review/references/ship-and-record.md +8 -8
  71. package/skills/yad-epic/SKILL.md +15 -15
  72. package/skills/yad-epic/references/state-schema.md +30 -30
  73. package/skills/yad-hub-bridge/SKILL.md +14 -14
  74. package/skills/yad-hub-bridge/references/bridge.md +17 -17
  75. package/skills/yad-hub-bridge/references/login-roster.md +3 -3
  76. package/skills/yad-hub-bridge/templates/checks/hub-route.sh +1 -1
  77. package/skills/yad-hub-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml +1 -1
  78. package/skills/yad-implement/SKILL.md +3 -3
  79. package/skills/yad-open-pr/SKILL.md +4 -4
  80. package/skills/yad-pair-review/SKILL.md +12 -12
  81. package/skills/yad-pair-review/references/session-state.md +3 -3
  82. package/skills/yad-pr-template/SKILL.md +4 -4
  83. package/skills/yad-pr-template/references/risk-routing.md +1 -1
  84. package/skills/yad-pr-template/templates/checks/pr-template.sh +18 -10
  85. package/skills/yad-pr-template/templates/checks/pr-title.sh +7 -7
  86. package/skills/yad-pr-template/templates/hub/github/pull_request_template.md +1 -1
  87. package/skills/yad-pr-template/templates/hub/gitlab/merge_request_templates/Default.md +1 -1
  88. package/skills/yad-reconcile/SKILL.md +1 -1
  89. package/skills/yad-report/SKILL.md +1 -1
  90. package/skills/yad-review-companion/SKILL.md +7 -7
  91. package/skills/yad-review-gate/SKILL.md +18 -18
  92. package/skills/yad-review-gate/references/gating.md +3 -3
  93. package/skills/yad-run/SKILL.md +10 -10
  94. package/skills/yad-run/references/run-loop.md +8 -8
  95. package/skills/yad-ship/SKILL.md +4 -4
  96. package/skills/yad-spec/SKILL.md +10 -11
  97. package/skills/yad-status/SKILL.md +13 -13
  98. package/skills/yad-stories/SKILL.md +12 -12
  99. package/skills/yad-stories/references/story-schema.md +3 -3
  100. package/skills/yad-stub/SKILL.md +3 -3
  101. package/skills/yad-sync-repos/SKILL.md +1 -1
  102. package/skills/yad-test-cases/SKILL.md +12 -13
  103. package/skills/yad-test-cases/references/test-cases-schema.md +1 -1
  104. package/skills/yad-ui/SKILL.md +10 -10
@@ -10,12 +10,12 @@ requirement-gathering for the whole product — under the reserved `EP-discovery
10
10
  hand off to `yad-review-gate`. The output `roadmap.md` is the menu of features; each feature is later
11
11
  taken into the normal `yad-epic` flow, which reads the roadmap for project context.
12
12
 
13
- This is a **front state**: human-authored with AI assist and **never auto-advances**. It runs **once
13
+ This is a **Shape step**: human-authored with AI assist and **never auto-advances**. It runs **once
14
14
  per project** and is **optional** — a team that already knows what to build can skip it and start at
15
15
  `yad-epic`. It supports **both greenfield and brownfield**, and produces a **competitor study in both**.
16
16
 
17
17
  This skill enforces the build plan's core rules: all state lives in files; IDs are engine-assigned
18
- (the reserved `EP-discovery`, never a typed feature slug); front steps are locked to `human_approve`.
18
+ (the reserved `EP-discovery`, never a typed feature slug); Shape steps are locked to `human_approve`.
19
19
 
20
20
  ## Conventions
21
21
 
@@ -63,7 +63,7 @@ roadmap extends the real system rather than re-proposing it.
63
63
  Open the discovery authoring branch `discovery/EP-discovery` per the shared procedure
64
64
  (`../yad-epic/references/state-schema.md` → "Authoring branches"): git-safe (skip with a note if
65
65
  `{project-root}` is not a git work tree), check out the branch if it exists, else create it from the
66
- hub's default branch. Author and commit the discovery set on it. Distinct from the bridge's
66
+ hub's default branch. Author and commit the discovery set on it. Distinct from the verified ledger's
67
67
  `review/EP-discovery/discovery` branch.
68
68
 
69
69
  ### Step 4 — Write the discovery set
@@ -113,7 +113,7 @@ Notes:
113
113
  - Also create an empty approvals ledger `.sdlc/approvals.json` and comments ledger
114
114
  `.sdlc/comments.json`, each containing `[]`, and the `reviews/` directory.
115
115
  - Commit the seed on the `discovery/EP-discovery` branch, and cut `review/EP-discovery/discovery` from
116
- it so the **first** review PR/MR carries the ledger to the default branch. In bridge mode
116
+ it so the **first** review PR/MR carries the ledger to the default branch. In verified mode
117
117
  `ledger-guard` exempts a new epic's ledger (creation, not mutation, #162); every later change to it
118
118
  is CI's. See `../yad-epic/references/state-schema.md`, "Authoring branches".
119
119
 
@@ -121,11 +121,11 @@ Notes:
121
121
  Report: the path to the discovery set, and that the next action is **review** via `yad-review-gate`
122
122
  (base rule: owner + 1 reviewer) on the virtual artifact `discovery/`. **Never mark discovery-review
123
123
  approved here** — only real reviewers do that through the gate. When the discovery gate passes, the
124
- state moves to the `discovery-done` sentinel (not `ready-for-build` — discovery has no build half); the
124
+ state moves to the `discovery-done` sentinel (not `ready-for-build` — discovery has no Build); the
125
125
  roadmap is now the input that each `yad-epic` reads (its "Step 2c — read the roadmap"). When the hub
126
126
  has a platform, the gate opens a review PR on the hub (via `yad-hub-bridge`) and
127
127
  `yad-review-gate action: sync` pulls platform approvals/comments into the ledger; otherwise the review
128
- is recorded file-only.
128
+ is recorded local.
129
129
 
130
130
  ## Reference
131
131
  - Discovery artifact templates + the 2-step state shape: `references/discovery-schema.md`.
@@ -29,7 +29,7 @@ object and the 2-step chain.
29
29
  `yad gate open` / `yad gate sync` warn with the missing filenames. Write all six (in greenfield,
30
30
  `current-state.md` is a short clean-slate note) before handing off to the gate.
31
31
  - On approval the gate sets `currentStep: "discovery-done"` (a terminal sentinel — discovery has **no**
32
- build half, so it never becomes `ready-for-build`).
32
+ Build, so it never becomes `ready-for-build`).
33
33
  - The discovery files (relative to the epic dir) the gate commits on the review branch and re-hashes at
34
34
  merge are: `market-research.md`, `competitor-analysis.md`, `current-state.md`, `feasibility.md`,
35
35
  `requirements.md`, `roadmap.md` (the `DISCOVERY_FILES` list).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yad-docs
3
- description: 'Generates the per-epic interactive documentation site — a vendored React/Vite/Tailwind SPA with an animated flow canvas and role-based stakeholder doc pages — from the epic''s approved artifacts (epic, architecture, the locked contract, UI design, stories, code-context, test cases). Themes it from the design tokens, wires the docs.json base path, and drives `yad docs build/deploy` to publish to Pages (or build-only when no target). This is an OUTPUT ENRICHMENT, never a gated front state: it never mutates state.json steps, approvals, or the contract lock. Use when the user says "generate the docs site", "build the interactive docs", or "deploy the epic docs".'
3
+ description: 'Generates the per-epic interactive documentation site — a vendored React/Vite/Tailwind SPA with an animated flow canvas and role-based stakeholder doc pages — from the epic''s approved artifacts (epic, architecture, the locked contract, UI design, stories, code-context, test cases). Themes it from the design tokens, wires the docs.json base path, and drives `yad docs build/deploy` to publish to Pages (or build-only when no target). This is an OUTPUT ENRICHMENT, never a gated Shape step: it never mutates state.json steps, approvals, or the contract lock. Use when the user says "generate the docs site", "build the interactive docs", or "deploy the epic docs".'
4
4
  ---
5
5
 
6
6
  # SDLC — Author the Interactive Docs Site (per-epic, output enrichment)
@@ -12,7 +12,7 @@ stakeholder doc pages** (each lens → a set of doc sections). The shell is gene
12
12
  generated entirely into `src/data/*.ts` and the theme into `src/index.css`.
13
13
 
14
14
  This is an **output enrichment**, exactly like `design-links.json` / `test-links.json` — **NOT a gated
15
- front state.** It **never** mutates `.sdlc/state.json` `steps[]`, `approvals.json`, or
15
+ Shape step.** It **never** mutates `.sdlc/state.json` `steps[]`, `approvals.json`, or
16
16
  `contract-lock.json`, and it never adds a `state.json` step. It reads the *approved* shape and renders
17
17
  it; it never decides approval. When a docs target is connected (`yad-connect-docs` → `.sdlc/docs.json`)
18
18
  the site is built + deployed; when none is, it is npm-built to a local `dist/` (build-only).
@@ -152,7 +152,7 @@ the default-theme degrade), the **deploy URL** or "build-only", and the **stalen
152
152
  - The connected docs target + base-path resolution: `../yad-connect-docs/SKILL.md`.
153
153
  - The design tokens this themes from: `../yad-connect-design/SKILL.md`.
154
154
  - The code-context the data enriches: `../yad-connect-repos/SKILL.md`.
155
- - The authoring pattern (front-state author that writes link artifacts without gating):
155
+ - The authoring pattern (Shape step author that writes link artifacts without gating):
156
156
  `../yad-ui/SKILL.md`.
157
157
  - State schema + the "Authoring branches" procedure: `../yad-epic/references/state-schema.md`.
158
158
  - The project overview site + the staleness/CI reconciler: `../yad-docs-overview/SKILL.md`,
@@ -7,7 +7,7 @@ description: 'Generates the project-level SDLC-overview interactive site — the
7
7
 
8
8
  **Goal:** Render the **whole yadflow pipeline** — every stage from setup → ship — as an interactive site,
9
9
  reusing the same shell as the per-epic docs (`skills/yad-docs/templates/app/`). Where `yad-docs`
10
- animates one epic's flows, this animates the **workflow itself**: the front gates, the build half, the
10
+ animates one epic's flows, this animates the **workflow itself**: the Shape gates, Build, the
11
11
  automation dial, the setup connectors. The hand-maintained overview report stays the **main
12
12
  documentation at the Pages root** (`<base>/`, served from `public/report.html` and `public/index.html`);
13
13
  this interactive SPA mounts under `<base>/app/` and is reached from the report — the report links
@@ -39,7 +39,7 @@ It only reads the pipeline definition and writes a project-level site. When a do
39
39
  There is no epic; the inputs are the workflow's own config + manifest (full mapping in
40
40
  `references/pipeline-model.md`):
41
41
 
42
- - `skills/sdlc/config.yaml` — the front/back steps, the **two dials** (assistance, automation),
42
+ - `skills/sdlc/config.yaml` — the Shape/Build steps, the **two dials** (assistance, automation),
43
43
  defaults, the review-gate rule, the build conventions, the automation/trust thresholds.
44
44
  - `skills/sdlc/module-help.csv` — the **canonical skill manifest**: each skill's `phase`,
45
45
  `preceded-by` / `followed-by`, and `outputs`. This is the ordering source of truth.
@@ -56,7 +56,7 @@ git work tree). Generate and commit on it.
56
56
  Map the pipeline onto the same data structures `yad-docs` uses (concrete mapping in
57
57
  `references/pipeline-model.md`):
58
58
 
59
- - **Flow paths** = the **phases** — `Setup`, `Front-zero` (discovery), `Front half`, `Build half`, `Automation`, `Change management` (feature threads).
59
+ - **Flow paths** = the **phases** — `Setup`, `Front-zero` (discovery), `Shape`, `Build`, `Automation`, `Change management` (feature threads).
60
60
  - **Flow steps** = the **skills/gates in order** (from `module-help.csv` `preceded-by`/`followed-by`),
61
61
  each step's `messages` = the skill's `outputs`, and `sideEffects` = the `.sdlc/` files it writes.
62
62
  - **System components** = the **durable state objects** — the product hub, each `.sdlc/*.json`
@@ -10,7 +10,7 @@ ordering source of truth is `skills/sdlc/module-help.csv` (`phase`, `preceded-by
10
10
 
11
11
  | Shell primitive | Overview meaning |
12
12
  |-----------------|------------------|
13
- | `FlowPath` (`paths.ts`) | a **phase**: Setup, Front-zero (discovery), Front half, Build half, Automation, Change management (feature threads). |
13
+ | `FlowPath` (`paths.ts`) | a **phase**: Setup, Front-zero (discovery), Shape, Build, Automation, Change management (feature threads). |
14
14
  | `FlowStep` (within a path) | a **skill or gate** in order; `messages` = its `outputs`; `sideEffects` = the `.sdlc/` files it writes; `status`/`bookingStatus` annotate gated vs. enrichment vs. earned. |
15
15
  | `SystemComponent` (`components.ts`) | a **durable state object** (the hub, each `.sdlc/*.json`, code repos, the design/testing/learning tools, the platform). |
16
16
  | `RoleConfig` (`roles.ts`) | a **lens** → its relevant sections + paths. |
@@ -35,7 +35,7 @@ and never gates.
35
35
  ### Path: Front-zero (`phase: 0-front`)
36
36
  The OPTIONAL once-per-project discovery phase, modelled as the reserved "epic zero" `EP-discovery`.
37
37
  Greenfield AND brownfield; a 2-step author→review chain whose review binds to the whole artifact set
38
- and terminates at `discovery-done` (no build half).
38
+ and terminates at `discovery-done` (no Build).
39
39
 
40
40
  | Step (skill) | Gate | Outputs / sideEffects |
41
41
  |--------------|------|------------------------|
@@ -44,7 +44,13 @@ and terminates at `discovery-done` (no build half).
44
44
  `roadmap.md` is the menu of features each `yad-epic` reads (Step 2c) — reference-only, never
45
45
  auto-seeds epics.
46
46
 
47
- ### Path: Front half (`phase: 1-front`)
47
+ <!-- `1-front` and `3-build` are DATA — the `phase` column in skills/sdlc/module-help.csv, which
48
+ the overview build reads. The Shape/Build/Run rename deliberately left them alone: change-safety
49
+ rule 3 says a release may add but never rename, so a stored value moves in a major with a
50
+ migration, not in a wording sweep. The display names below are the new vocabulary; the ids are
51
+ the old one, on purpose. -->
52
+
53
+ ### Path: Shape (`phase: 1-front`)
48
54
  The gated authoring chain + the reusable review gate (10 steps, or 12 with the optional analysis).
49
55
 
50
56
  | Step (skill) | Gate | Outputs / sideEffects |
@@ -59,7 +65,7 @@ The gated authoring chain + the reusable review gate (10 steps, or 12 with the o
59
65
  | `yad-review-companion` | the fun/visible review layer (trailer/cards/chat + engagement) | `approvals.json` `engagement`, platform trailer/cards |
60
66
  | `yad-hub-bridge` | the platform PR/MR bridge | `hub-prs.json` |
61
67
 
62
- ### Path: Build half (`phase: 3-build`)
68
+ ### Path: Build (`phase: 3-build`)
63
69
  Per-story, per-repo: `spec → tasks → implement → checks → engineer-review`, plus the commit/PR helpers.
64
70
 
65
71
  | Step (skill) | Outputs / sideEffects |
@@ -78,7 +84,7 @@ node classes from the diagram.
78
84
 
79
85
  | Step (skill) | Outputs / sideEffects |
80
86
  |--------------|------------------------|
81
- | `yad-run` | drives the back-half loop; `build-state/<story>.json`, `trust-log.json`, kill switch |
87
+ | `yad-run` | drives the Build loop; `build-state/<story>.json`, `trust-log.json`, kill switch |
82
88
  | `yad-learn` | tutoring; `learning-records.json` (LOCAL-ONLY, gitignored) |
83
89
  | `yad-status` | read-only view (no writes) |
84
90
  | `yad-docs` / `yad-docs-overview` / `yad-docs-sync` | the docs sites + their `docs-build.json` manifests |
@@ -86,9 +92,9 @@ node classes from the diagram.
86
92
  ### Path: Change management — feature threads (`phase: 6-change`)
87
93
  The post-lock evolution layer. Once an epic is **sealed** (all stories shipped), behaviour can no longer
88
94
  be mutated in place — a change request becomes a **new epic threaded to its parent** (genesis → change →
89
- defect), inheriting unchanged front artifacts **by reference** and re-authoring only what changes, so
95
+ defect), inheriting unchanged Shape artifacts **by reference** and re-authoring only what changes, so
90
96
  locked artifacts are never mutated and never go stale, only superseded. Three CI gates enforce the thread
91
- (`lineage-check`, `epic-open`, `reconcile-debt`). This path never gates the front chain; `yad-change` is
97
+ (`lineage-check`, `epic-open`, `reconcile-debt`). This path never gates the Shape chain; `yad-change` is
92
98
  the intake, then it hands off to the normal authoring skills + the review gate.
93
99
 
94
100
  | Step (skill) | Outputs / sideEffects |
@@ -99,7 +105,7 @@ the intake, then it hands off to the normal authoring skills + the review gate.
99
105
  | `yad-reconcile` | advisory drift / orphan / debt sweep (read-only; mirrors `yad-docs-sync`) |
100
106
 
101
107
  CLI: `yad thread [<epic>]` prints a thread + its resolved current truth + open debt; `yad reconcile`
102
- runs the sweep. The three thread gates ride in the build-half `yad-checks` set above.
108
+ runs the sweep. The three thread gates ride in the Build `yad-checks` set above.
103
109
 
104
110
  ## System components = the durable state objects
105
111
 
@@ -121,11 +127,11 @@ The eight yadflow lenses, each to its relevant phase sections + paths:
121
127
 
122
128
  | Lens | Relevant phases / sections |
123
129
  |------|----------------------------|
124
- | analyst | Setup intent, project discovery (front-zero), analysis step, front-half discovery |
125
- | pm | project discovery (market/feasibility/roadmap), epic, stories; the front gates |
130
+ | analyst | Setup intent, project discovery (front-zero), analysis step, Shape discovery |
131
+ | pm | project discovery (market/feasibility/roadmap), epic, stories; the Shape gates |
126
132
  | architect | architecture + the locked contract; escalation |
127
133
  | ux | UI design, design tool connection, the design system |
128
- | dev | build half: spec → implement, the per-repo loop |
134
+ | dev | Build: spec → implement, the per-repo loop |
129
135
  | tester | test-cases (parallel track), the testing tool, checks |
130
136
  | reviewer | the review gate, comments, the hub bridge |
131
137
  | engineer | engineer review + ship, the merge gate, automation dial/trust |
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: yad-engineer-review
3
- description: 'Build-half Step E of the gated SDLC — AI review, engineer review, then merge. Wire an advisory AI first-pass (CodeRabbit) on the PR/MR; record the human engineer review with the same human_approve discipline as the front gates (owner + 1 reviewer, escalating to domain owners on high risk / contract / auth / payments — the Step D routing); and on merge, record the ship in the epic build-log and update the story state so the epic → story → task → PR chain is traceable. Never auto-advances — the human owns the merge. Use when the user says "record the engineer review", "merge this task", or "wire the AI review". (To commit + open the PR/MR, use yad-ship.)'
3
+ description: 'Build Step E of the gated SDLC — AI review, engineer review, then merge. Wire an advisory AI first-pass (CodeRabbit) on the PR/MR; record the human engineer review with the same human_approve discipline as the Shape gates (owner + 1 reviewer, escalating to domain owners on high risk / contract / auth / payments — the Step D routing); and on merge, record the ship in the epic build-log and update the story state so the epic → story → task → PR chain is traceable. Never auto-advances — the human owns the merge. Use when the user says "record the engineer review", "merge this task", or "wire the AI review". (To commit + open the PR/MR, use yad-ship.)'
4
4
  ---
5
5
 
6
- # SDLC — Engineer Review & Merge (build-half Step E)
6
+ # SDLC — Engineer Review & Merge (Build Step E)
7
7
 
8
8
  **Goal:** Take a task PR/MR that has passed the **check gates** (Step C) through two sets of eyes and
9
9
  out to production: an **AI first-pass** (advisory) and a **human engineer review** (the authority),
10
- then **ship** — merge, record the ship, and update the story state. This is the last build-half step
11
- (build plan §E). It is a **human gate**, the same `human_approve` discipline as the front states:
10
+ then **ship** — merge, record the ship, and update the story state. This is the last Build step
11
+ (build plan §E). It is a **human gate**, the same `human_approve` discipline as the Shape steps:
12
12
  **nothing auto-advances**; the engineer owns the merge.
13
13
 
14
14
  ## Conventions
@@ -66,7 +66,7 @@ approve); `yad review reconcile --epic <id> --repo <r> --pr <n>` stamps it onto
66
66
  platform (mutating the ship's shard where it lives, or its folded entry if already tidied). Soft by default (both count; a bare approve draws `yad review nudge`); only gates when
67
67
  `hub.review.requireEngagement: true`. The signal is gameable by design and sits **beside** the CI gates,
68
68
  never above them.
69
- Recording an approval does **not** ship — shipping is a separate, explicit step. Front-half discipline:
69
+ Recording an approval does **not** ship — shipping is a separate, explicit step. Shape discipline:
70
70
  the gate talks only through files; refuse to treat AI review as a human approval.
71
71
 
72
72
  ### Step 3 — `ship` (merge + record + update state)
@@ -94,18 +94,18 @@ engineer-review rule is satisfied (Step 2). Then:
94
94
  a rejected one is `rejected`. This is the evidence that later earns a step its `machine_advance`
95
95
  (it never weakens the merge gate — the engineer still owns the merge).
96
96
  - **Commit the machine-written ledgers.** Run `yad checkpoint --push` from `{project-root}` to commit
97
- the back-half ledgers just written (the `build-log/` shard, and the `trust-log/` shard /
97
+ the Build ledgers just written (the `build-log/` shard, and the `trust-log/` shard /
98
98
  `build-state/<story>.json` if the story ran through `yad-run`) as one `chore(hub): …` audit-trail
99
99
  commit — default branch only, staging the shard dirs (`yad tidy up` folds finished shards later),
100
- never a front-half gate file. It is the back-half analogue of the front-half `yad gate` sync. The
100
+ never a Shape gate file. It is the Build analogue of the Shape `yad gate` sync. The
101
101
  same commit also **carries the story `status:` flip** you just wrote (`approved → in-build/shipped`,
102
102
  #112) — because that story now has a build-log ship, checkpoint stages `stories/<story>.md` alongside
103
103
  the ledgers, so the artifact never drifts from build-log and you never fall back to a raw git-to-main
104
104
  push. (The code-repo `tasks.md` is committed in its own repo as usual.)
105
105
 
106
106
  ### Step 4 — Stop
107
- Report what shipped and the story's state. Do not advance anything else; the front-half `state.json`
108
- stays as it was (`ready-for-build`). The build half is recorded in `build-log.json` + the story status.
107
+ Report what shipped and the story's state. Do not advance anything else; the Shape `state.json`
108
+ stays as it was (`ready-for-build`). Build is recorded in `build-log.json` + the story status.
109
109
 
110
110
  ## Hard rules (build plan §E, Cross-cutting)
111
111
 
@@ -1,6 +1,6 @@
1
1
  # Ship — the build ledger and the story state
2
2
 
3
- Step E (`yad-engineer-review`) closes the build half: AI review (advisory) → engineer review (the human gate) →
3
+ Step E (`yad-engineer-review`) closes Build: AI review (advisory) → engineer review (the human gate) →
4
4
  ship. Shipping records the merge and updates the story state so the whole chain is traceable.
5
5
 
6
6
  ## Two sets of eyes
@@ -59,16 +59,16 @@ without the `{ epic, ships }` wrapper):
59
59
  }
60
60
  ```
61
61
 
62
- This is the back-half analogue of the front half's `approvals.json` — files only, no hidden state, so a
62
+ This is the Build analogue of Shape's `approvals.json` — files only, no hidden state, so a
63
63
  future service can drive ship by writing the same records. Like the trust log and build-state, it is a
64
- machine-written ledger committed by **`yad checkpoint`** (the back-half analogue of `yad gate` sync),
64
+ machine-written ledger committed by **`yad checkpoint`** (the Build analogue of `yad gate` sync),
65
65
  not by hand: after recording the ship, `yad checkpoint --push` lands the new `build-log/` shard as a
66
- `chore(hub): …` audit-trail commit on the default branch (allowlist-scoped to the back-half ledgers,
67
- never a front-half gate file); `yad tidy up` folds finished shards into `build-log.json` later.
66
+ `chore(hub): …` audit-trail commit on the default branch (allowlist-scoped to the Build ledgers,
67
+ never a Shape gate file); `yad tidy up` folds finished shards into `build-log.json` later.
68
68
 
69
69
  ### Retroactive ship — a pre-tracking story (#142)
70
70
 
71
- A story that was merged and shipped **before** the back-half ledger existed has no build-log ship, so
71
+ A story that was merged and shipped **before** the Build ledger existed has no build-log ship, so
72
72
  `yad checkpoint` can't carry its `status: shipped` flip (the flip is only carried when a ship backs it,
73
73
  #112) — leaving a raw `git push origin main` as the only way to land it, against the never-raw-git
74
74
  convention. To reconcile it through yad, record a **retroactive** ship, then checkpoint carries the flip
@@ -83,7 +83,7 @@ It writes ONE minimal ship shard marked `retroactive: true` (`task` defaults to
83
83
  the normal checkpoint so the story's already-made `status:` flip rides along in the **same** commit. It
84
84
  refuses when the story already has a ship **in that repo** (then it isn't pre-tracking there — use the
85
85
  normal flow). It does **not** author the story frontmatter — and to keep evidence and the flip atomic (the no-drift
86
- invariant), it **refuses** unless you have already set a back-half `status:` (`in-build` or `shipped`) in
86
+ invariant), it **refuses** unless you have already set a Build `status:` (`in-build` or `shipped`) in
87
87
  `stories/<story>.md`, so a ship shard is never committed while the artifact still says `approved`.
88
88
 
89
89
  **Where the record lands — it is a shard, not an append to `build-log.json`.** Like every other ship, a
@@ -129,7 +129,7 @@ a bare approve draws a friendly `yad review nudge`); it only gates ship when
129
129
  `hub.review.requireEngagement: true`. `yad review reconcile --epic <id> --repo <r> --pr <n>` reads the
130
130
  code PR's approvals (with the engagement signal) and stamps them onto the matching ship record — writing
131
131
  back into the ship's shard where it lives (or its folded entry if the story was already tidied) — the
132
- back-half **bridge**, the analogue of `yad gate sync`. The signal is gameable by design ("visible, not
132
+ Build **bridge**, the analogue of `yad gate sync`. The signal is gameable by design ("visible, not
133
133
  impossible"): it makes engineer-review quality visible, it does not prove a human read the diff. It sits
134
134
  **beside** the CI gates (build/test/lint/contract/verified-commits) — never above them; CI still
135
135
  decides machine safety, the merge is still the human act.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: yad-epic
3
- description: 'Front state for the epic in the gated SDLC. Shape a feature idea with the analyst (or read analysis.md when the optional analysis step already ran), then write the epic with the pm, into epic.md. The entry point when analysis is skipped: assigns the EP-<slug> ID and seeds .sdlc/ state. Never auto-advances — hands off to the team review gate. Use when the user says "start a new feature/epic" or "author an epic".'
3
+ description: 'Shape step for the epic in the gated SDLC. Shape a feature idea with the analyst (or read analysis.md when the optional analysis step already ran), then write the epic with the pm, into epic.md. The entry point when analysis is skipped: assigns the EP-<slug> ID and seeds .sdlc/ state. Never auto-advances — hands off to the team review gate. Use when the user says "start a new feature/epic" or "author an epic".'
4
4
  ---
5
5
 
6
- # SDLC — Author Epic (front state)
6
+ # SDLC — Author Epic (Shape step)
7
7
 
8
8
  **Goal:** Produce a human-authored, AI-assisted `epic.md` for a new feature, and — when the epic is the
9
9
  entry point — assign its stable `EP-<slug>` ID and initialise the per-epic state machine in `.sdlc/`.
10
- This is a **front state**: human-authored with AI assist and **never auto-advances**. When the epic is
10
+ This is a **Shape step**: human-authored with AI assist and **never auto-advances**. When the epic is
11
11
  drafted, control passes to `yad-review-gate`.
12
12
 
13
13
  **Two entry modes** (the optional `yad-analysis` step decides which):
@@ -17,7 +17,7 @@ drafted, control passes to `yad-review-gate`.
17
17
  idea inline with the analyst, assigns `EP-<slug>`, and seeds the **10-step** chain.
18
18
 
19
19
  This skill enforces the build plan's core rules: all state lives in files; IDs are generated by the
20
- engine (never typed by hand); front steps are locked to `human_approve`.
20
+ engine (never typed by hand); Shape steps are locked to `human_approve`.
21
21
 
22
22
  ## Conventions
23
23
 
@@ -92,7 +92,7 @@ Check `{project-root}/epics/` for collisions; if the slug exists, append a disti
92
92
  Open the epic authoring branch `epic/EP-<slug>` per the shared procedure
93
93
  (`references/state-schema.md` → "Authoring branches"): git-safe (skip with a note if `{project-root}`
94
94
  is not a git work tree), check out the branch if it exists, else create it from the hub's default
95
- branch. Author and commit `epic.md` on it. This is **distinct** from the bridge's `review/…` branch.
95
+ branch. Author and commit `epic.md` on it. This is **distinct** from the verified ledger's `review/…` branch.
96
96
 
97
97
  ### Step 4 — Write the epic (assist: pm)
98
98
  Adopt the **pm** lens (`bmad-agent-pm`, John) and write `{project-root}/epics/EP-<slug>/epic.md`
@@ -122,7 +122,7 @@ Fill the body with the user; leave `owner` / `technical_product_owner` for the u
122
122
 
123
123
  ### Step 5 — Seed the state machine — analysis-skipped only
124
124
  *(Skip when analysis ran — `yad-analysis` already seeded the 12-step chain. Go to Step 5b.)*
125
- Create `{project-root}/epics/EP-<slug>/.sdlc/state.json` describing the full **10-step** front-state
125
+ Create `{project-root}/epics/EP-<slug>/.sdlc/state.json` describing the full **10-step** Shape step
126
126
  sequence (no analysis), all steps defaulting to `automation: human_approve`, with the five authoring
127
127
  steps **locked**. Use this exact shape (see `references/state-schema.md`):
128
128
 
@@ -151,11 +151,11 @@ Notes:
151
151
  - `architecture-review` carries `risk_tags: ["contract"]` so the gate escalates it by default
152
152
  (build plan §4): the contract review needs domain owners, not just owner + 1.
153
153
  - `test-cases` / `test-cases-review` are a **parallel, non-blocking track**: they seed `blocked` and open
154
- when `stories-review` passes — at which point the epic is already `ready-for-build`, so the build half
154
+ when `stories-review` passes — at which point the epic is already `ready-for-build`, so Build
155
155
  runs alongside the tester. They never gate `ready-for-build` (see `references/state-schema.md`).
156
156
  - Commit the seed on this step's authoring branch. It reaches the hub's default branch through the
157
157
  epic's **first** review PR/MR — cut `review/EP-<slug>/epic` from the authoring branch so it carries
158
- the seed. In bridge mode `ledger-guard` exempts a new epic's ledger (creation, not mutation, #162);
158
+ the seed. In verified mode `ledger-guard` exempts a new epic's ledger (creation, not mutation, #162);
159
159
  every later change to it is CI's. See `references/state-schema.md`, "Authoring branches".
160
160
  - Also create an empty approvals ledger `{project-root}/epics/EP-<slug>/.sdlc/approvals.json`
161
161
  and an empty comments ledger `{project-root}/epics/EP-<slug>/.sdlc/comments.json`, each containing
@@ -171,9 +171,9 @@ Notes:
171
171
  ### Step 5b — Advance the authoring step — analysis-ran only
172
172
  *(Only when analysis ran — `state.json` already exists from `yad-analysis`.)*
173
173
  **Check the mode first — the two modes have opposite instructions here.** Read `.sdlc/hub.json`:
174
- **bridge mode** is `platform` set AND `bridge_enabled` (or legacy `bridge`) `true`.
174
+ **verified mode** is `platform` set AND `ledger: "verified"` — or, on a project that has not run `yad migrate` yet, `bridge_enabled` (or legacy `bridge`) `true`. `ledger` wins whenever it is present.
175
175
 
176
- **Bridge mode — do NOT write `state.json`.** The ledger is CI-owned: the `ledger-guard` check rejects
176
+ **verified mode — do NOT write `state.json`.** The ledger is CI-owned: the `ledger-guard` check rejects
177
177
  any non-bot commit touching `epics/*/.sdlc/{state,approvals,comments,hub-prs}.json` or
178
178
  `epics/*/reviews/*.md`, `yad gate open` deliberately skips this write for the same reason, and
179
179
  `yad gate ci --merged` performs the whole transition when the review PR merges. Making the edit here
@@ -185,23 +185,23 @@ to `yad-review-gate`.
185
185
  > (creation, not mutation, #162). On this path `state.json` already exists from `yad-analysis` and
186
186
  > reached the base ref through the analysis review — so the guard is absolute here.
187
187
 
188
- **Otherwise — file-only, or a platform with no gate-sync CI — write it.** In `state.json`: set
188
+ **Otherwise — local, or a platform with no gate-sync CI — write it.** In `state.json`: set
189
189
  `epic.status: "done"`, set `epic-review.status: "in_review"`, and set `currentStep: "epic-review"`.
190
190
  Write `state.json`. Do **not** re-seed and do **not** touch `approvals.json` — only real reviewers
191
191
  approve, through the gate.
192
192
 
193
- > **File-only branch only.** Since 3.11 the CLI closes the authoring step itself whenever its review
193
+ > **local branch only.** Since 3.11 the CLI closes the authoring step itself whenever its review
194
194
  > gate opens or advances (`yad gate open` / `sync`), so this edit is a no-op when the gate has already
195
195
  > run. It keeps `state.json` truthful before the gate opens, but it is no longer load-bearing: an epic
196
- > whose author step is left `in_progress` used to strand forever (`YAD-STATE-005`). In bridge mode
196
+ > whose author step is left `in_progress` used to strand forever (`YAD-STATE-005`). In verified mode
197
197
  > `gate open` writes nothing and local `gate sync` is advisory — `gate ci` closes the step at merge.
198
198
 
199
199
  ### Step 6 — Stop at the gate (do NOT advance)
200
200
  Report: epic ID, the path to `epic.md`, and that the next action is **review** via
201
201
  `yad-review-gate`. **Never mark the epic-review step approved here** — only real reviewers do that
202
- through the gate. Front states do not auto-advance. When the hub has a platform, the gate opens a review
202
+ through the gate. Shape steps do not auto-advance. When the hub has a platform, the gate opens a review
203
203
  PR on the hub (via `yad-hub-bridge`) and `yad-review-gate action: sync` pulls platform approvals/
204
- comments into the ledger; otherwise the review is recorded file-only.
204
+ comments into the ledger; otherwise the review is recorded local.
205
205
 
206
206
  ## Reference
207
207
  - State schema and field meanings: `references/state-schema.md`.
@@ -44,7 +44,7 @@ The per-epic state machine.
44
44
  | `epicId` | The stable `EP-<slug>` ID. Never renamed. |
45
45
  | `createdAt` | ISO date the epic was created. |
46
46
  | `currentStep` | `id` of the step the workflow is waiting on right now. |
47
- | `steps[]` | Ordered list of every front-state step. |
47
+ | `steps[]` | Ordered list of every Shape step step. |
48
48
 
49
49
  Each `steps[]` entry:
50
50
 
@@ -99,8 +99,8 @@ skippable today (engine `SKIPPABLE_STEPS`).
99
99
  ### `test-cases` is a parallel, non-blocking track
100
100
 
101
101
  `test-cases` (and its `test-cases-review` gate) sit in `steps[]` after `stories-review`, but they are a
102
- **parallel track that does not gate the build half**. When `stories-review` passes, `advanceState`:
103
- - sets `currentStep` to the **`ready-for-build`** sentinel — so the build half (`yad-spec` → … keyed off
102
+ **parallel track that does not gate Build**. When `stories-review` passes, `advanceState`:
103
+ - sets `currentStep` to the **`ready-for-build`** sentinel — so Build (`yad-spec` → … keyed off
104
104
  `currentStep == "ready-for-build"`) can start **immediately**, and
105
105
  - opens `test-cases` (`blocked` → `in_progress`) so the tester can work **in parallel**.
106
106
 
@@ -116,7 +116,7 @@ unchanged.)
116
116
 
117
117
  Each front **authoring** step opens its own git branch at the start of the step, named
118
118
  `<step>/EP-<slug>` where `<step>` ∈ `analysis | epic | architecture | ui-design | stories | test-cases`
119
- (`config.yaml` `defaults.front_authoring_branch`). This is **distinct** from the review branch
119
+ (`config.yaml` `defaults.shape_authoring_branch`). This is **distinct** from the review branch
120
120
  `review/EP-<slug>/<artifact-base>` that `yad-hub-bridge` opens later for the review PR/MR.
121
121
 
122
122
  The shared procedure (run once the `EP-<slug>` is known):
@@ -125,7 +125,7 @@ The shared procedure (run once the `EP-<slug>` is known):
125
125
  tree — no error.
126
126
  2. Branch name = `<step>/EP-<slug>`. If it already exists, check it out; otherwise create it from the
127
127
  hub's default branch (`git checkout -b <step>/EP-<slug>`).
128
- 3. Author and commit the step's artifact(s) on that branch. The bridge's `review/…` branch is created
128
+ 3. Author and commit the step's artifact(s) on that branch. The verified ledger's `review/…` branch is created
129
129
  separately at review time and is untouched by this step.
130
130
 
131
131
  **How the seed reaches the default branch.** The `.sdlc/` ledger is seeded once, by hand, on the
@@ -133,7 +133,7 @@ The shared procedure (run once the `EP-<slug>` is known):
133
133
  path creates one (`yad gate ci` only *advances* an existing chain, at merge, on the default branch).
134
134
  So for the **first** gate of an epic, cut `review/EP-<slug>/<artifact-base>` from that authoring
135
135
  branch: the review PR/MR then carries the seed alongside the artifact, and the ledger lands on the
136
- default branch when it merges. In bridge mode `ledger-guard` exempts exactly this case — **creation,
136
+ default branch when it merges. In verified mode `ledger-guard` exempts exactly this case — **creation,
137
137
  not mutation** (#162) — so no direct push to a protected default branch is needed. For every **later**
138
138
  gate the ledger is already on the default branch: cut the review branch from there, commit the
139
139
  artifact only, and leave `.sdlc/{state,approvals,comments,hub-prs}.json` and `reviews/*.md` to CI.
@@ -141,7 +141,7 @@ artifact only, and leave `.sdlc/{state,approvals,comments,hub-prs}.json` and `re
141
141
  | `artifact` | filename or folder | The file/folder this step produces or gates. |
142
142
  | `assistance` | `none` \| `review` \| `heavy` | Dial 1 — how much AI helps (build plan §2). |
143
143
  | `automation` | `human_approve` \| `machine_advance` | Dial 2 — who advances (build plan §2). |
144
- | `locked` | `true` \| `false` | Front steps are `true`: may NOT be set to `machine_advance` in this version. |
144
+ | `locked` | `true` \| `false` | Shape steps are `true`: may NOT be set to `machine_advance` in this version. |
145
145
  | `status` | `blocked` \| `in_progress` \| `in_review` \| `done` | Lifecycle. `blocked` = upstream step not yet approved. |
146
146
  | `risk_tags` | subset of `contract`, `auth`, `payments` | Drives review escalation (build plan §4). |
147
147
 
@@ -178,7 +178,7 @@ Append-only ledger (an array), the machine-readable counterpart to the `reviews/
178
178
  ```
179
179
 
180
180
  ## `hub-prs.json`
181
- Present only when the front-half review runs through the platform bridge. Per review step, the review
181
+ Present only when the Shape review runs through the platform bridge. Per review step, the review
182
182
  PR/MR opened on the hub (sibling of `approvals.json`, so the locked `state.json` step shape is untouched):
183
183
 
184
184
  ```json
@@ -219,29 +219,29 @@ and `<artifact-base>` is the artifact without extension (e.g. `epic`, `architect
219
219
 
220
220
  ## Dial defaults & locks
221
221
  - Every step defaults to `automation: human_approve` (build plan §2).
222
- - The five authoring front steps and their reviews are `locked: true` — the engine refuses to set
222
+ - The five authoring Shape steps and their reviews are `locked: true` — the engine refuses to set
223
223
  them to `machine_advance` in this version (build plan §1, §8.7). Only back states (build pipeline,
224
224
  steps 9–14) may move toward machine-advance in a later iteration.
225
225
 
226
226
  ---
227
227
 
228
- # Phase 4 build-half state (the back half made dial-bearing)
228
+ # Phase 4 Build state (Build made dial-bearing)
229
229
 
230
- Phase 3 recorded build progress only *after the fact* in `build-log.json`. Phase 4 needs the back
230
+ Phase 3 recorded build progress only *after the fact* in `build-log.json`. Phase 4 needs the Build
231
231
  steps to carry their own `automation` dial so the orchestrator (`yad-run`) can read it and decide
232
232
  whether to advance on its own. Two new files under `.sdlc/` do this.
233
233
 
234
234
  > **Who commits these.** `build-state/<story-id>.json`, `trust-log.json`, and `build-log.json` are
235
- > **machine-written** by the back half (`yad-run`, `yad-engineer-review`) and committed by
236
- > **`yad checkpoint`** — the back-half analogue of the front-half `yad gate ci` sync. It lands them as
237
- > one `chore(hub): sync back-half state — <epic>/<story> by @<login>` audit-trail commit, on the
238
- > default branch, staging **only** these three ledgers by an explicit allowlist (never a front-half
235
+ > **machine-written** by Build (`yad-run`, `yad-engineer-review`) and committed by
236
+ > **`yad checkpoint`** — the Build analogue of the Shape `yad gate ci` sync. It lands them as
237
+ > one `chore(hub): sync Build state — <epic>/<story> by @<login>` audit-trail commit, on the
238
+ > default branch, staging **only** these three ledgers by an explicit allowlist (never a Shape
239
239
  > gate file — `state/approvals/comments/hub-prs.json`, `reviews/*.md` — so `ledger-guard` never trips).
240
240
  > Teammates don't review these machine writes; the commit exists so CI, `yad status`, and other
241
241
  > machines always see current trust evidence.
242
242
 
243
243
  ## `build-state/<story-id>.json`
244
- One file per story that has entered the build half. The build half is **per-story, per-repo**, so the
244
+ One file per story that has entered Build. Build is **per-story, per-repo**, so the
245
245
  steps live under each repo (mirrors the per-repo shape of `build-log.json`).
246
246
 
247
247
  ```json
@@ -266,22 +266,22 @@ Each `steps[]` entry:
266
266
 
267
267
  | Field | Values | Meaning |
268
268
  |-------|--------|---------|
269
- | `id` | `spec`, `tasks`, `implement`, `checks`, `engineer-review` | Back-half step identity (the `back_steps` from `config.yaml` + the human merge gate). |
269
+ | `id` | `spec`, `tasks`, `implement`, `checks`, `engineer-review` | Build step identity (the `back_steps` from `config.yaml` + the human merge gate). |
270
270
  | `automation` | `human_approve` \| `machine_advance` | Dial 2. Defaults to `human_approve`; flipped to `machine_advance` only after the trust threshold is met (and never for `locked` steps). |
271
271
  | `locked` | `true` \| `false` | `engineer-review` is `true` — it never auto-advances (build plan §E). |
272
272
  | `status` | `blocked` \| `in_progress` \| `in_review` \| `done` | Lifecycle. `yad-run` advances `done` steps and `blocked`s on a halt. |
273
273
 
274
274
  `currentStep` is the `id` the orchestrator is waiting on / about to run for that repo. The file is
275
- created when a story enters the build half; all dials start `human_approve` (the `config.yaml`
275
+ created when a story enters Build; all dials start `human_approve` (the `config.yaml`
276
276
  `automation.default`).
277
277
 
278
278
  `yad next` reads these files too: once an epic is `ready-for-build`, `yad next <epic>` resolves each
279
279
  story/repo's `currentStep` into the next build sub-step (`spec`/`tasks` → `yad-spec`, `implement` →
280
280
  `yad-implement`, `checks` → `yad-checks`, `engineer-review` → `yad-engineer-review`) and prints it with
281
- the remaining chain and the step's automation dial — so the build half is guided, not just hinted at.
281
+ the remaining chain and the step's automation dial — so Build is guided, not just hinted at.
282
282
 
283
283
  ## `trust-log.json` (shard-then-fold)
284
- Append-only ledger, the back-half analogue of `approvals.json`. **This is the evidence base** that
284
+ Append-only ledger, the Build analogue of `approvals.json`. **This is the evidence base** that
285
285
  decides when a step is safe to automate (build plan Step A). One entry per step run.
286
286
 
287
287
  **Storage — loose shards + a folded file (the "loose objects + `git gc`" model).** Two people driving
@@ -302,7 +302,7 @@ back:
302
302
  the folded file and no shard dir still reads correctly — nothing to union.
303
303
  - **`yad tidy up`** (manual, one person) folds a SHIPPED story's finished shards into the folded file's
304
304
  `runs` and deletes them. Writers never fold — they only add shards; `yad checkpoint` commits the shard
305
- dir, and `yad tidy up` is the back-half analogue of `git gc` folding loose objects.
305
+ dir, and `yad tidy up` is the Build analogue of `git gc` folding loose objects.
306
306
  - The **threshold slice** (below) reads this same union, filtered to the step (and repo).
307
307
 
308
308
  ```json
@@ -377,7 +377,7 @@ storage layout is noted here (it mirrors `trust-log.json`):
377
377
  After the contract locks and code ships, a change must not **mutate** a locked artifact (that destroys
378
378
  the lock + the audit trail). Instead every change request becomes a **new epic, threaded to its parent**
379
379
  (`config.yaml` `change:`). A feature is a **thread** of linked epics (genesis → change → defect → …); a
380
- change-epic **inherits** unchanged front artifacts from its parent by reference and only **re-authors**
380
+ change-epic **inherits** unchanged Shape artifacts from its parent by reference and only **re-authors**
381
381
  what it changes. So artifacts are never stale, only *superseded*; the feature's current truth is the
382
382
  head of the thread, composed by the resolver (`yad-timeline`). `yad-change` seeds a change-epic;
383
383
  `yad-defects` / `yad-timeline` render the thread; `yad-reconcile` flags drift; three CI gates enforce it.
@@ -411,7 +411,7 @@ A stub is a normal genesis (`kind: feature`, `thread == id`, no `parent`) whose
411
411
  `stub: backfill-pending` + `verified: false` and whose `state.json` uses a **sentinel**, mirroring
412
412
  `EP-discovery` / `discovery-done`:
413
413
  - top-level `kind: "stub"` and `currentStep: "backfill-pending"`;
414
- - the **same 10-step front chain** as a normal epic, every step `status: "blocked"` (so `validateState`
414
+ - the **same 10-step Shape chain** as a normal epic, every step `status: "blocked"` (so `validateState`
415
415
  passes and `promote` can "wake" the chain into normal authoring with no re-seed);
416
416
  - empty `approvals.json` / `comments.json`; **no** `contract-lock.json` (no surface locked yet).
417
417
 
@@ -433,17 +433,17 @@ approved backfill spec, **and** rewrites `state.json` — removing `kind: "stub"
433
433
  off the sentinel:
434
434
  - **light promote (default)** → `currentStep: "backfill-done"`, a **terminal sentinel** (like
435
435
  `discovery-done`): the feature is a real, verified anchor documented by its backfill spec; `nextAction`
436
- reports "documented anchor — evolve it by threading a change/defect", never a pending stub, and no build
437
- half runs directly against it;
438
- - **full promote (opt-in)** → `currentStep: "epic"`, `epic.status: "in_progress"`, to run the normal front
439
- half and lock a real contract.
436
+ reports "documented anchor — evolve it by threading a change/defect", never a pending stub, and Build
437
+ never runs directly against it;
438
+ - **full promote (opt-in)** → `currentStep: "epic"`, `epic.status: "in_progress"`, to run the normal Shape
439
+ part and lock a real contract.
440
440
 
441
441
  From promotion on, the thread's contract protection is live.
442
442
 
443
443
  ## Inherited steps in `state.json`
444
444
 
445
445
  A change-epic's `state.json` is structurally identical (so `advanceState` / `nextAction` / `gatePredicate`
446
- / the bridge run unchanged), but **inherited** steps are pre-marked `done` with two extra fields, and
446
+ / the verified ledger run unchanged), but **inherited** steps are pre-marked `done` with two extra fields, and
447
447
  only re-authored steps run. The seeder sets `currentStep` to the first re-authored step.
448
448
 
449
449
  ```json
@@ -506,7 +506,7 @@ Thread-level rollups (`yad-timeline` / `yad-defects`) are **derived** — walk e
506
506
  sharing `thread` and read each `change.json`; there is no duplicated thread registry.
507
507
 
508
508
  ## `reconcile-debt.json`
509
- Append-only ledger of hotfix ship-first debt (a hotfix shipped code before its front gates approved).
509
+ Append-only ledger of hotfix ship-first debt (a hotfix shipped code before its Shape gates approved).
510
510
 
511
511
  ```json
512
512
  [ { "thread": "EP-checkout", "epicId": "EP-checkout-hotfix-x", "openedDate": "<date>",
@@ -516,5 +516,5 @@ Append-only ledger of hotfix ship-first debt (a hotfix shipped code before its f
516
516
  ```
517
517
 
518
518
  `status: "open"` blocks the **next** normal change on the thread (`reconcile-debt-check.sh`) until it is
519
- `"paid"` (evidence: the front artifacts updated **and** a regression test added). The debt lets a hotfix
519
+ `"paid"` (evidence: the Shape artifacts updated **and** a regression test added). The debt lets a hotfix
520
520
  jump the queue once, but freezes new thread work until the SDLC again describes production.