yadflow 3.18.0 → 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.
- package/CHANGELOG.md +46 -0
- package/README.md +11 -11
- package/bin/yad.mjs +8 -8
- package/cli/artifact-status.mjs +4 -4
- package/cli/checkpoint.mjs +25 -25
- package/cli/commit.mjs +1 -1
- package/cli/companion.mjs +2 -2
- package/cli/doctor.mjs +10 -10
- package/cli/epic-state.mjs +29 -29
- package/cli/errors.mjs +1 -1
- package/cli/gate.mjs +32 -33
- package/cli/hook.mjs +4 -4
- package/cli/hubcommit.mjs +1 -1
- package/cli/ledger.mjs +3 -3
- package/cli/lib.mjs +23 -9
- package/cli/manifest.mjs +42 -21
- package/cli/migrate.mjs +54 -12
- package/cli/next.mjs +5 -5
- package/cli/openpr.mjs +8 -8
- package/cli/plan.mjs +28 -9
- package/cli/platform.mjs +1 -1
- package/cli/report.mjs +1 -1
- package/cli/review.mjs +5 -5
- package/cli/setup.mjs +22 -10
- package/cli/ship.mjs +1 -1
- package/cli/skip.mjs +1 -1
- package/cli/thread.mjs +1 -1
- package/cli/tidy.mjs +2 -2
- package/cli/update-commit.mjs +1 -1
- package/package.json +1 -1
- package/skills/sdlc/config.yaml +30 -30
- package/skills/sdlc/module-help.csv +21 -21
- package/skills/yad-analysis/SKILL.md +10 -10
- package/skills/yad-architecture/SKILL.md +10 -10
- package/skills/yad-architecture/references/contract-format.md +2 -3
- package/skills/yad-backfill/SKILL.md +5 -5
- package/skills/yad-change/SKILL.md +13 -13
- package/skills/yad-change/references/triage.md +2 -3
- package/skills/yad-checks/SKILL.md +34 -16
- package/skills/yad-checks/references/check-gates.md +63 -19
- package/skills/yad-checks/templates/checks/build-test-lint.sh +25 -7
- package/skills/yad-checks/templates/checks/epic-open.sh +1 -1
- package/skills/yad-checks/templates/checks/install-deps.sh +46 -0
- package/skills/yad-checks/templates/checks/ledger-guard.sh +41 -12
- package/skills/yad-checks/templates/checks/package-manager.sh +140 -0
- package/skills/yad-checks/templates/checks/reconcile-debt-check.sh +3 -3
- package/skills/yad-checks/templates/github/yad-checks.yml +24 -3
- package/skills/yad-checks/templates/github/yad-hub-checks.yml +2 -2
- package/skills/yad-checks/templates/github/yad-verified-commits.yml +1 -1
- package/skills/yad-checks/templates/gitlab/.gitlab-ci.yml +7 -1
- package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +12 -3
- package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +2 -2
- package/skills/yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml +1 -1
- package/skills/yad-checks/templates/hooks/ledger-guard.sh +1 -1
- package/skills/yad-commit/SKILL.md +2 -2
- package/skills/yad-connect-design/SKILL.md +1 -1
- package/skills/yad-connect-docs/SKILL.md +1 -1
- package/skills/yad-connect-repos/SKILL.md +32 -15
- package/skills/yad-connect-repos/references/code-context.md +2 -2
- package/skills/yad-connect-repos/references/hub-config.md +25 -11
- package/skills/yad-connect-repos/references/repos-registry.md +3 -3
- package/skills/yad-connect-testing/SKILL.md +1 -1
- package/skills/yad-defects/SKILL.md +1 -1
- package/skills/yad-discovery/SKILL.md +6 -6
- package/skills/yad-discovery/references/discovery-schema.md +1 -1
- package/skills/yad-docs/SKILL.md +3 -3
- package/skills/yad-docs/templates/app/package-lock.json +65 -51
- package/skills/yad-docs/templates/app/package.json +1 -1
- package/skills/yad-docs-overview/SKILL.md +3 -3
- package/skills/yad-docs-overview/references/pipeline-model.md +17 -11
- package/skills/yad-engineer-review/SKILL.md +9 -9
- package/skills/yad-engineer-review/references/ship-and-record.md +8 -8
- package/skills/yad-epic/SKILL.md +15 -15
- package/skills/yad-epic/references/state-schema.md +30 -30
- package/skills/yad-hub-bridge/SKILL.md +14 -14
- package/skills/yad-hub-bridge/references/bridge.md +17 -17
- package/skills/yad-hub-bridge/references/login-roster.md +3 -3
- package/skills/yad-hub-bridge/templates/checks/hub-route.sh +1 -1
- package/skills/yad-hub-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml +1 -1
- package/skills/yad-implement/SKILL.md +3 -3
- package/skills/yad-open-pr/SKILL.md +4 -4
- package/skills/yad-pair-review/SKILL.md +12 -12
- package/skills/yad-pair-review/references/session-state.md +3 -3
- package/skills/yad-pr-template/SKILL.md +4 -4
- package/skills/yad-pr-template/references/risk-routing.md +1 -1
- package/skills/yad-pr-template/templates/checks/pr-template.sh +18 -10
- package/skills/yad-pr-template/templates/checks/pr-title.sh +7 -7
- package/skills/yad-pr-template/templates/hub/github/pull_request_template.md +1 -1
- package/skills/yad-pr-template/templates/hub/gitlab/merge_request_templates/Default.md +1 -1
- package/skills/yad-reconcile/SKILL.md +1 -1
- package/skills/yad-report/SKILL.md +1 -1
- package/skills/yad-review-companion/SKILL.md +7 -7
- package/skills/yad-review-gate/SKILL.md +18 -18
- package/skills/yad-review-gate/references/gating.md +3 -3
- package/skills/yad-run/SKILL.md +10 -10
- package/skills/yad-run/references/run-loop.md +8 -8
- package/skills/yad-ship/SKILL.md +4 -4
- package/skills/yad-spec/SKILL.md +10 -11
- package/skills/yad-status/SKILL.md +13 -13
- package/skills/yad-stories/SKILL.md +12 -12
- package/skills/yad-stories/references/story-schema.md +3 -3
- package/skills/yad-stub/SKILL.md +3 -3
- package/skills/yad-sync-repos/SKILL.md +1 -1
- package/skills/yad-test-cases/SKILL.md +12 -13
- package/skills/yad-test-cases/references/test-cases-schema.md +1 -1
- package/skills/yad-ui/SKILL.md +10 -10
package/skills/yad-epic/SKILL.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-epic
|
|
3
|
-
description: '
|
|
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 (
|
|
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 **
|
|
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);
|
|
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
|
|
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**
|
|
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
|
|
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
|
|
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
|
-
**
|
|
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
|
-
**
|
|
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 —
|
|
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
|
-
> **
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
103
|
-
- sets `currentStep` to the **`ready-for-build`** sentinel — so
|
|
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.
|
|
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
|
|
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
|
|
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` |
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
236
|
-
> **`yad checkpoint`** — the
|
|
237
|
-
> one `chore(hub): sync
|
|
238
|
-
> default branch, staging **only** these three ledgers by an explicit allowlist (never a
|
|
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
|
|
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` |
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
437
|
-
|
|
438
|
-
- **full promote (opt-in)** → `currentStep: "epic"`, `epic.status: "in_progress"`, to run the normal
|
|
439
|
-
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-hub-bridge
|
|
3
|
-
description: 'The templated PR/MR bridge for the
|
|
3
|
+
description: 'The templated PR/MR bridge for the Shape review gate. When the product hub has a platform (.sdlc/hub.json), it opens a review PR/MR on the hub for an authored artifact (the optional analysis / epic / architecture+contract / ui-design / stories / test-cases), sets the required reviewers/labels from the routing rule, and provides the read-only gh/glab recipes that yad-review-gate uses to pull platform comments + approvals back into the file ledger. Can also wire merge-time sync on the hub: a CI workflow that runs `yad gate ci` when a human merges a review PR/MR — CI is the sole ledger writer and writes only at merge, on the default branch (during review the platform PR/MR is the source of truth; CI never touches the review branch). Local-user auth only — no stored tokens. The file ledger stays the source of truth; degrades to the local gate when there is no platform / no CLI. Use when the user says "open the review PR", "route the review", "wire the gate sync", or it is invoked by yad-review-gate open/sync.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDLC — Hub Review Bridge (the templated PR/MR bridge)
|
|
7
7
|
|
|
8
|
-
**Goal:** Run the
|
|
9
|
-
without changing the gate's predicate or making the file ledger optional. The
|
|
8
|
+
**Goal:** Run the Shape review/comment/approval cycle through a **real PR/MR on the product hub**,
|
|
9
|
+
without changing the gate's predicate or making the file ledger optional. The verified ledger is an **alternate
|
|
10
10
|
input path** into `yad-review-gate`: it opens a review PR for an artifact, reviewers approve/comment on
|
|
11
11
|
the platform with **their own** `gh`/`glab` auth, and the gate's `sync` action (which calls this skill's
|
|
12
12
|
read recipes) maps that platform state into `approvals.json` / `comments.json` / `reviews/*.md`, then
|
|
@@ -24,7 +24,7 @@ keeps platform mechanics out of the gate). `yad-review-gate` *calls* it; it neve
|
|
|
24
24
|
- The review-PR body is the hub template from `yad-pr-template` (`templates/hub/<platform>/…`).
|
|
25
25
|
- Branch per artifact: `review/EP-<slug>/<artifact-base>` (`config.yaml` `hub.artifact_branch`).
|
|
26
26
|
- **Local-user auth only; store no tokens.** Use the user's own `gh`/`glab`. If neither is installed/
|
|
27
|
-
authenticated, STOP this path and tell the gate to fall back to
|
|
27
|
+
authenticated, STOP this path and tell the gate to fall back to local — never embed a credential.
|
|
28
28
|
|
|
29
29
|
## Inputs
|
|
30
30
|
|
|
@@ -33,11 +33,11 @@ keeps platform mechanics out of the gate). `yad-review-gate` *calls* it; it neve
|
|
|
33
33
|
- `action` — `open` | `route` | `wire` (default `route`). (`sync`'s ledger writes live in
|
|
34
34
|
`yad-review-gate`; this skill provides the read recipes `sync` calls — see `references/bridge.md`.)
|
|
35
35
|
|
|
36
|
-
## Preconditions (the
|
|
36
|
+
## Preconditions (the verified ledger runs only when all hold)
|
|
37
37
|
|
|
38
|
-
`.sdlc/hub.json` exists with a non-null `platform`, `bridge_enabled: true
|
|
38
|
+
`.sdlc/hub.json` exists with a non-null `platform`, `ledger: "verified"` (or, before `yad migrate`, `bridge_enabled: true`), `config.yaml` `hub.bridge:
|
|
39
39
|
true`, and `gh` (GitHub) / `glab` (GitLab) installed **and authenticated**. If any fails, report that the
|
|
40
|
-
gate proceeds **
|
|
40
|
+
gate proceeds **local** (no error) and stop.
|
|
41
41
|
|
|
42
42
|
## On Activation
|
|
43
43
|
|
|
@@ -70,7 +70,7 @@ each required domain-owner to a platform `login` via the roster (a roster `name`
|
|
|
70
70
|
```
|
|
71
71
|
A human commit touching the gate-state files (`.sdlc/{state,approvals,comments,hub-prs}.json` or
|
|
72
72
|
`reviews/*.md`; `.sdlc/contract-lock.json` is artifact-side and allowed) on a review PR is rejected
|
|
73
|
-
by the `ledger-guard` check. (The `yad gate open` CLI behaves the same: in
|
|
73
|
+
by the `ledger-guard` check. (The `yad gate open` CLI behaves the same: in verified mode it opens the
|
|
74
74
|
PR only and writes no ledger.) The **one** exception is a brand-new epic's **seed** — no CI path can
|
|
75
75
|
create a ledger, so an epic whose `.sdlc/state.json` is absent from the base ref may be created by a
|
|
76
76
|
human on this first PR/MR (#162). Every later change to it is CI's alone.
|
|
@@ -94,10 +94,10 @@ Revoke-on-change is enforced at merge: on **GitHub** in code (an approval whose
|
|
|
94
94
|
head is dropped — no setting needed); on **GitLab** it has no per-approval commit SHA, so enabling the
|
|
95
95
|
platform's **"remove all approvals when commits are added to the source branch"** is **required** for
|
|
96
96
|
the guarantee. Either way it is safe because CI never pushes the review branch — only the owner's own
|
|
97
|
-
artifact pushes dismiss approvals. In
|
|
97
|
+
artifact pushes dismiss approvals. In verified mode `yad gate sync` is advisory (read-only) and is **not**
|
|
98
98
|
a recovery path; if a merge-time run fails, the scheduled reconcile job re-advances it automatically, or
|
|
99
99
|
a maintainer can force it with `yad gate ci --branch <review-branch> --pr <n> --merged` locally on the
|
|
100
|
-
default branch. (
|
|
100
|
+
default branch. (local mode keeps `yad gate sync` as the local writer.)
|
|
101
101
|
|
|
102
102
|
1. Run `yad check --fix` (the wiring is manifest-driven, like `yad-checks`): with a platform +
|
|
103
103
|
enabled bridge in `.sdlc/hub.json` it installs
|
|
@@ -139,16 +139,16 @@ default branch. (File-only mode keeps `yad gate sync` as the local writer.)
|
|
|
139
139
|
## Hard rules
|
|
140
140
|
|
|
141
141
|
- **Local-user auth only; store no tokens.** Reviewers use their own `gh`/`glab`.
|
|
142
|
-
- **
|
|
142
|
+
- **the verified ledger is an input path, never the authority.** It opens PRs and reads state; the **file ledger
|
|
143
143
|
is the source of truth** and the gate predicate (in `yad-review-gate`) is unchanged.
|
|
144
|
-
- **
|
|
144
|
+
- **the verified ledger never approves on a reviewer's behalf.** Reviewers approve/merge with their own auth. The
|
|
145
145
|
step advances when a human **merges** the approved, fully-resolved review PR (the merge is that human
|
|
146
146
|
act) — `yad gate sync` records the approvals + resolution + merged state and advances; unresolved
|
|
147
147
|
comments or a changed artifact hold it `in_review`. The mechanical sync is the `yad gate` CLI.
|
|
148
148
|
- **CI never approves and never merges.** The wired workflow only runs `gate ci` — the same sync +
|
|
149
149
|
unchanged predicate. It does **nothing pre-merge** (the platform PR/MR holds the review state); at
|
|
150
150
|
merge it re-reads approvals from the platform, advances the step, and flips the artifact status on
|
|
151
|
-
the **default branch** (the only place CI ever commits). CI is the sole ledger writer;
|
|
151
|
+
the **default branch** (the only place CI ever commits). CI is the sole ledger writer; Shape gates
|
|
152
152
|
stay permanently human.
|
|
153
153
|
- **The CI tokens are the one documented bend of "no stored tokens".** GitHub uses the platform's own
|
|
154
154
|
ephemeral `github.token` (nothing stored). GitLab requires a stored masked `SDLC_GATE_TOKEN`
|
|
@@ -159,7 +159,7 @@ default branch. (File-only mode keeps `yad gate sync` as the local writer.)
|
|
|
159
159
|
delayed reconcile could advance on an out-of-band post-merge artifact change (see `references/bridge.md`,
|
|
160
160
|
"Known limitation"). Safe to require: a new epic's `.sdlc/` seed rides its first review PR/MR, so
|
|
161
161
|
nobody needs a direct push to the default branch to start an epic (#162).
|
|
162
|
-
- **Degrade gracefully.** No platform / disabled bridge / no CLI → the gate runs
|
|
162
|
+
- **Degrade gracefully.** No platform / disabled bridge / no CLI → the gate runs local with no error.
|
|
163
163
|
|
|
164
164
|
## Reference
|
|
165
165
|
- PR-body→ledger mapping, the read-only gh/glab recipes, idempotent re-sync, contract re-lock handling:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# the verified ledger — PR/MR ↔ ledger mapping, read recipes, idempotency
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
predicate (`../yad-review-gate/references/gating.md`) runs unchanged. The
|
|
3
|
+
the verified ledger maps platform review state onto the **same file records** the manual gate writes, so the gate
|
|
4
|
+
predicate (`../yad-review-gate/references/gating.md`) runs unchanged. The verified ledger only changes the
|
|
5
5
|
*input path*; it never changes what passing the gate means.
|
|
6
6
|
|
|
7
7
|
## State mapping (platform → ledger)
|
|
@@ -12,7 +12,7 @@ predicate (`../yad-review-gate/references/gating.md`) runs unchanged. The bridge
|
|
|
12
12
|
| GitHub `COMMENTED` / `CHANGES_REQUESTED`; GitLab discussions/notes | a line under `## <name> (<role>)` in `reviews/<artifact>--<date>--comments.md` + a `comments.json` record; **never** an approval. `CHANGES_REQUESTED` is also flagged as blocking in the comments file |
|
|
13
13
|
| GitHub review dismissed / GitLab approval revoked | the prior bridge `approved` record for that approver is removed on re-sync **while the step is open**; once the step is `done` the record is kept as the audit trail of why it passed (see idempotency) |
|
|
14
14
|
|
|
15
|
-
`approvals.json` records from the
|
|
15
|
+
`approvals.json` records from the verified ledger carry `"source": "bridge"`; **manual** approvals have no such
|
|
16
16
|
tag and are **never** touched by `sync` — the two coexist.
|
|
17
17
|
|
|
18
18
|
## Read recipes (read-only, local-user auth — no tokens)
|
|
@@ -32,8 +32,8 @@ glab api projects/:id/merge_requests/:iid/approvals # approved_by[].user.use
|
|
|
32
32
|
glab api projects/:id/merge_requests/:iid/notes # discussion notes (comments)
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
All commands run as the **local user**; the
|
|
36
|
-
or the remote is unreachable, the
|
|
35
|
+
All commands run as the **local user**; the verified ledger stores no tokens. If the CLI is missing/unauthenticated
|
|
36
|
+
or the remote is unreachable, the verified ledger stops and the gate falls back to local (no error).
|
|
37
37
|
|
|
38
38
|
> **GitLab read parity (GAP-6).** `readPrGitLab` reads approvals (`approved_by[]`) and discussions but
|
|
39
39
|
> does **not** map a "Request changes" reviewer state to `CHANGES_REQUESTED` — on GitLab the blocking
|
|
@@ -118,7 +118,7 @@ deliberate act: `yad update` (which re-stamps `.sdlc/cli-version.json`), or a `g
|
|
|
118
118
|
## Contract re-lock invalidates prior platform approvals too
|
|
119
119
|
|
|
120
120
|
For the **architecture+contract** review, the gate already drops approvals when the contract-surface hash
|
|
121
|
-
no longer matches `.sdlc/contract-lock.json`. The
|
|
121
|
+
no longer matches `.sdlc/contract-lock.json`. The verified ledger extends this to platform-sourced approvals:
|
|
122
122
|
`sync` discards bridge `approved` records for the architecture step dated **before** the new lock, and
|
|
123
123
|
posts a comment on the review PR noting "contract re-locked — re-approval required". The escalation
|
|
124
124
|
(`risk_tags: ["contract"]` → a domain-owner per repo) is unchanged.
|
|
@@ -219,18 +219,18 @@ each `artifactHash` against the merged content, so revoke-on-change still holds.
|
|
|
219
219
|
commit — the advance plus the `draft → approved` status flip — lands on the **default branch** with
|
|
220
220
|
`[skip ci]`.
|
|
221
221
|
|
|
222
|
-
**The ledger is CI-owned (
|
|
222
|
+
**The ledger is CI-owned (verified mode only).** Humans never commit gate-state files: the `ledger-guard`
|
|
223
223
|
check (yad-checks) FAILs any commit on a review PR that touches `.sdlc/{state,approvals,comments,hub-prs}
|
|
224
|
-
.json` or `reviews/*.md` (`.sdlc/contract-lock.json` is artifact-side and allowed). "
|
|
225
|
-
means the same thing it means everywhere else — a `platform` **and** the
|
|
224
|
+
.json` or `reviews/*.md` (`.sdlc/contract-lock.json` is artifact-side and allowed). "verified mode" there
|
|
225
|
+
means the same thing it means everywhere else — a `platform` **and** the verified ledger flag, `isVerifiedLedger`'s
|
|
226
226
|
predicate. The gate used to enable itself on the flag alone, which let a platform-less hub reject the
|
|
227
227
|
human's ledger write while the CLI still expected one (#186). Under Path B **no
|
|
228
228
|
CI commit lands in a review PR at all**, so the only ledger change the guard can see there is a human
|
|
229
229
|
edit — which it rejects, with one carve-out for a new epic's seed (below). (The `verified-commits`
|
|
230
230
|
gate still vets every commit's signature + author;
|
|
231
231
|
its gate-bot exemption is now vestigial in-PR because CI no longer commits there.) `yad gate open`
|
|
232
|
-
opens the PR only; local `yad gate sync` is advisory in
|
|
233
|
-
everyone `git checkout <default> && git pull`. (
|
|
232
|
+
opens the PR only; local `yad gate sync` is advisory in verified mode (writes nothing). After a merge,
|
|
233
|
+
everyone `git checkout <default> && git pull`. (with a local ledger, humans own the ledger locally and
|
|
234
234
|
these guards are no-ops.)
|
|
235
235
|
|
|
236
236
|
**The one sanctioned human ledger write *in a review PR*: the seed of a new epic.** `gate ci` only
|
|
@@ -269,12 +269,12 @@ push retries with a rebase.
|
|
|
269
269
|
- Protected default branch (GitHub): the merge advance needs to push it — prefer a ruleset bypass for
|
|
270
270
|
Actions, else a fine-grained PAT as `SDLC_GATE_TOKEN` on the mergesync checkout.
|
|
271
271
|
|
|
272
|
-
**Manual sync & recovery.** In
|
|
272
|
+
**Manual sync & recovery.** In verified mode `yad gate sync` is **advisory** (read-only) — it prints the
|
|
273
273
|
predicate but writes nothing, so it is **not** a recovery path when CI fails. If a merge-time run fails
|
|
274
274
|
(can't push, API hiccup), recovery is the scheduled **reconcile** job (automatic; it re-advances merged
|
|
275
275
|
reviews not yet `done`). To force it immediately, a maintainer runs the same command CI runs, locally on
|
|
276
276
|
the default branch: `yad gate ci --branch <review-branch> --pr <n> --merged` (this writes + pushes,
|
|
277
|
-
unlike advisory `yad gate sync`).
|
|
277
|
+
unlike advisory `yad gate sync`). Local mode (no platform) keeps `yad gate sync` as the local writer.
|
|
278
278
|
The file ledger is still the source of truth.
|
|
279
279
|
|
|
280
280
|
Because CI records the `hub-prs.json` pointer only at merge, a review the ledger has never seen still
|
|
@@ -283,17 +283,17 @@ recorded pointer, `yad gate sync <epic> <artifact>` resolves the PR/MR from the
|
|
|
283
283
|
(`review/<epic>/<artifact>`) itself, and `--pr <n>` names it outright:
|
|
284
284
|
|
|
285
285
|
```bash
|
|
286
|
-
yad gate sync EP-x architecture.md --pr 42 # advisory in
|
|
286
|
+
yad gate sync EP-x architecture.md --pr 42 # advisory in verified mode; the writer with a local ledger
|
|
287
287
|
```
|
|
288
288
|
|
|
289
289
|
An explicit `--pr` also **overrides** a recorded pointer, since a re-opened review is a new PR the
|
|
290
290
|
ledger has not seen. Before its reviewers are bound to the artifact's hash, the number is confirmed to
|
|
291
291
|
be the PR for that artifact's review branch — a mismatch is refused, and a platform that cannot answer
|
|
292
|
-
warns and proceeds. The
|
|
292
|
+
warns and proceeds. The verified ledger rule is unchanged: the resolved pointer is adopted into the ledger only
|
|
293
293
|
on the writer path, so a human never leaves a gate-state file in their working tree for `ledger-guard`
|
|
294
294
|
to reject.
|
|
295
295
|
|
|
296
|
-
**In
|
|
296
|
+
**In verified mode `gate sync` stays advisory even with `--pr`** — it prints the predicate and writes
|
|
297
297
|
nothing, because CI owns the ledger. The recovery that actually writes is the command CI itself runs,
|
|
298
298
|
on the default branch: `yad gate ci --branch <review-branch> --pr <n> --merged`.
|
|
299
299
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The roster lives in `.sdlc/hub.json` (`roster: [...]`) and is the only thing that turns a platform
|
|
4
4
|
**login** into an SDLC **name + role** for the ledger. Schema and the no-tokens rule are documented once
|
|
5
|
-
in `../../yad-connect-repos/references/hub-config.md`; this file covers how the
|
|
5
|
+
in `../../yad-connect-repos/references/hub-config.md`; this file covers how the verified ledger *uses* it.
|
|
6
6
|
It is populated/edited any time with the `yad roster` CLI command (see that reference).
|
|
7
7
|
|
|
8
8
|
## Entry
|
|
@@ -34,7 +34,7 @@ It is populated/edited any time with the `yad roster` CLI command (see that refe
|
|
|
34
34
|
1. **login → name + roles** from the roster. The `hub` roles map straight to records; each touched
|
|
35
35
|
domain `R` contributes the roles in `roles[R]` (a `domain-owner` role carries `domain: R`).
|
|
36
36
|
2. **Legacy domain-owner fallback:** if the resolved `name` equals a repo's `domain_owner` in
|
|
37
|
-
`repos.json`, and that repo is a **touched domain** for the step under review, the
|
|
37
|
+
`repos.json`, and that repo is a **touched domain** for the step under review, the verified ledger also emits a
|
|
38
38
|
`domain-owner` approval scoped to that repo (`domain: <repo>`). One person owning several repos yields
|
|
39
39
|
several `domain-owner` records with different `domain` values — exactly what the gate predicate allows.
|
|
40
40
|
3. **Unmapped login → reviewer (flagged).** A login not in the roster maps to `name: <login>`,
|
|
@@ -58,7 +58,7 @@ When a review PR/MR is opened (hub `yad gate open`, or a code-repo `yad open-pr`
|
|
|
58
58
|
## Per-repo routing (stories review, and any escalated step)
|
|
59
59
|
|
|
60
60
|
The stories review needs a `domain-owner` per repo in the **union of every story's `repos`**. On the
|
|
61
|
-
review PR the
|
|
61
|
+
review PR the verified ledger makes this legible and enforceable:
|
|
62
62
|
|
|
63
63
|
- Add a `domain:<repo>` **label** per touched repo.
|
|
64
64
|
- **Request** each touched repo's `domain_owner` login as a reviewer (resolved via the roster).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Hub review routing — the
|
|
2
|
+
# Hub review routing — the Shape analogue of yad-pr-template's risk-route.sh. Reads a hub review
|
|
3
3
|
# PR/MR description's "Impact & Risk (front-half)" block and prints the required reviewers, reusing
|
|
4
4
|
# yad-review-gate's rule: base = owner + 1 reviewer; if a risk tag (contract|auth|payments) is set OR
|
|
5
5
|
# the artifact is the stories set, ALSO a domain-owner per touched repo. Advisory: it ROUTES the human
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
# default branch — the merge advance pushes there) and store it as a masked CI/CD variable
|
|
35
35
|
# SDLC_GATE_TOKEN. Without it the job fails visibly; recover by setting the token, then re-run the
|
|
36
36
|
# pipeline or run `yad gate ci --branch <review-branch> --pr <iid> --merged` locally on the default
|
|
37
|
-
# branch (advisory `yad gate sync` is read-only in
|
|
37
|
+
# branch (advisory `yad gate sync` is read-only in verified mode and cannot recover a stuck gate).
|
|
38
38
|
#
|
|
39
39
|
# Which yadflow this job runs: an EXACT version resolved from the repo at run time — see the `yad-pin`
|
|
40
40
|
# block in the script below for the precedence. It no longer floats on the major, because floating let a
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-implement
|
|
3
|
-
description: 'Build
|
|
3
|
+
description: 'Build Step B of the gated SDLC. With the dev lens, implement ONE atomic task from a story''s Spec Kit tasks.md as a small diff (≤3 files) on its own branch in the code repo. The diff stays inside the files the task declared — flag and STOP if it would grow beyond them. Commit per convention, ending with the task ID; add Contract-Change: yes only if the diff touches the locked contract surface (which routes back to the architecture gate). The step never advances itself; it produces a committed branch and hands off to the check gates, which the orchestrator (yad-run) may auto-run once `implement` is earned to machine_advance (Phase 4b Step D) — the merge still needs the gates and the engineer review. Use when the user says "implement task <id>" or after a story is spec''d.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC — Implement Task (
|
|
6
|
+
# SDLC — Implement Task (Build Step B)
|
|
7
7
|
|
|
8
8
|
**Goal:** Turn ONE atomic task from a story's `tasks.md` (produced by Step A `yad-spec`) into a small,
|
|
9
9
|
reviewable diff on its own branch in the code repo. **One atomic task = one branch = one PR/MR**
|
|
@@ -103,7 +103,7 @@ never on the AI's own initiative. Keep all trailers in one contiguous block. Do
|
|
|
103
103
|
### Step 7 — Report; the advance decision belongs to the dial (Phase 4)
|
|
104
104
|
Report: the branch name, the files changed, how the change satisfies the task's acceptance criterion,
|
|
105
105
|
the result of any test/smoke run, and the next action — the **check gates** (Step C — `yad-checks`)
|
|
106
|
-
then the PR and review (Steps D–E). Do **not** open a PR, merge, or hand-edit the epic's
|
|
106
|
+
then the PR and review (Steps D–E). Do **not** open a PR, merge, or hand-edit the epic's Shape
|
|
107
107
|
`state.json`. Step B ends at a committed task branch.
|
|
108
108
|
|
|
109
109
|
- **Run standalone:** stop here; a human triggers the gates.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-open-pr
|
|
3
|
-
description: 'Build
|
|
3
|
+
description: 'Build helper of the gated SDLC. Open a code-repo task PR/MR from the committed platform template — detect GitHub/GitLab, push the current task branch, and create the PR/MR with the template body prefilled (Summary / Story-task / Impact & Risk) and the title defaulting to the commit subject. Auto-assigns from the hub roster: assignee = the committer, reviewers = the repo''s reviewers + domain-owners. High risk / contract surface routes to domain owners (risk-route.sh). Drives the `yad open-pr` CLI; never merges. Use when the user says "open the PR", "open the MR", or "raise the merge request".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC — Open Task PR/MR (
|
|
6
|
+
# SDLC — Open Task PR/MR (Build helper)
|
|
7
7
|
|
|
8
8
|
**Goal:** Open the PR/MR for the current task branch from the repo's committed PR/MR template
|
|
9
9
|
(installed by `yad-pr-template`, Step D), with the body prefilled and the right reviewers requested.
|
|
10
10
|
This is the standalone open-PR step; it **never merges** — the engineer review (`yad-engineer-review`,
|
|
11
|
-
Step E) owns the merge. Distinct from `yad gate open`, which opens a
|
|
11
|
+
Step E) owns the merge. Distinct from `yad gate open`, which opens a Shape artifact-review PR on
|
|
12
12
|
the product hub.
|
|
13
13
|
|
|
14
14
|
## Conventions
|
|
@@ -23,7 +23,7 @@ the product hub.
|
|
|
23
23
|
touched:`, and `Domains` prefilled; the rest is left for the author. This satisfies the `pr-template`
|
|
24
24
|
gate.
|
|
25
25
|
- **Stage-aware on the product hub** — `open-pr` mirrors the `--head` split the hub gates apply:
|
|
26
|
-
- a **`review/EP-*/<artifact>`** branch is a
|
|
26
|
+
- a **`review/EP-*/<artifact>`** branch is a Shape artifact-review PR → it **delegates to
|
|
27
27
|
`yad gate open`** (artifact-review title `review: <artifact> (EP-<slug>)`, the hub artifact-review
|
|
28
28
|
body, and the gate ledger bookkeeping all in one place). Any `--title`/`-m` is ignored here.
|
|
29
29
|
- any **other hub branch** is a tooling/CI change → it uses the bundled **code-task** template
|