yadflow 3.18.1 → 4.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/CHANGELOG.md +355 -0
  2. package/README.md +79 -26
  3. package/bin/commands.mjs +41 -0
  4. package/bin/yad.mjs +437 -124
  5. package/cli/artifact-status.mjs +34 -15
  6. package/cli/checkpoint.mjs +69 -49
  7. package/cli/codeowners-command.mjs +170 -0
  8. package/cli/codeowners.mjs +397 -0
  9. package/cli/commit.mjs +13 -9
  10. package/cli/companion.mjs +2 -2
  11. package/cli/dial.mjs +183 -0
  12. package/cli/docs.mjs +88 -32
  13. package/cli/doctor.mjs +1472 -97
  14. package/cli/epic-state.mjs +3478 -232
  15. package/cli/epic.mjs +506 -0
  16. package/cli/errors.mjs +4 -1
  17. package/cli/gate.mjs +1002 -209
  18. package/cli/history.mjs +556 -0
  19. package/cli/hook.mjs +266 -55
  20. package/cli/hubcommit.mjs +6 -17
  21. package/cli/index-command.mjs +87 -0
  22. package/cli/ledger.mjs +57 -7
  23. package/cli/lib.mjs +184 -18
  24. package/cli/manifest.mjs +367 -56
  25. package/cli/migrate.mjs +726 -53
  26. package/cli/mode.mjs +170 -0
  27. package/cli/next.mjs +349 -90
  28. package/cli/openpr.mjs +191 -39
  29. package/cli/people.mjs +654 -0
  30. package/cli/plan.mjs +417 -132
  31. package/cli/platform.mjs +110 -129
  32. package/cli/product-index.mjs +287 -0
  33. package/cli/protection.mjs +706 -0
  34. package/cli/reconcile.mjs +38 -12
  35. package/cli/repo-publish.mjs +24 -26
  36. package/cli/repo.mjs +23 -14
  37. package/cli/report.mjs +21 -15
  38. package/cli/review.mjs +24 -27
  39. package/cli/riskmap-command.mjs +289 -0
  40. package/cli/riskmap.mjs +373 -0
  41. package/cli/setup.mjs +139 -287
  42. package/cli/ship.mjs +7 -6
  43. package/cli/skill.mjs +180 -0
  44. package/cli/skip.mjs +211 -30
  45. package/cli/thread.mjs +42 -17
  46. package/cli/tidy.mjs +20 -20
  47. package/cli/update-commit.mjs +22 -22
  48. package/cli/usage.mjs +115 -109
  49. package/package.json +3 -3
  50. package/skills/sdlc/config.yaml +166 -87
  51. package/skills/sdlc/module-help.csv +35 -35
  52. package/skills/yad-analysis/SKILL.md +125 -65
  53. package/skills/yad-architecture/SKILL.md +34 -23
  54. package/skills/yad-architecture/references/contract-format.md +10 -8
  55. package/skills/yad-backfill/SKILL.md +14 -8
  56. package/skills/yad-backfill/references/backfill.md +1 -1
  57. package/skills/yad-change/SKILL.md +127 -52
  58. package/skills/yad-change/references/triage.md +42 -28
  59. package/skills/yad-checks/SKILL.md +89 -45
  60. package/skills/yad-checks/references/check-gates.md +315 -92
  61. package/skills/yad-checks/templates/checks/build-test-lint.sh +25 -7
  62. package/skills/yad-checks/templates/checks/commit-message.sh +17 -3
  63. package/skills/yad-checks/templates/checks/contract-check.sh +58 -2
  64. package/skills/yad-checks/templates/checks/epic-open.sh +3 -3
  65. package/skills/yad-checks/templates/checks/install-deps.sh +46 -0
  66. package/skills/yad-checks/templates/checks/ledger-guard.sh +94 -18
  67. package/skills/yad-checks/templates/checks/lineage-check.sh +23 -9
  68. package/skills/yad-checks/templates/checks/package-manager.sh +140 -0
  69. package/skills/yad-checks/templates/checks/reconcile-debt-check.sh +4 -4
  70. package/skills/yad-checks/templates/checks/risk-map-check.sh +438 -0
  71. package/skills/yad-checks/templates/checks/verified-commits.sh +20 -46
  72. package/skills/yad-checks/templates/github/yad-checks.yml +37 -5
  73. package/skills/yad-checks/templates/github/yad-hub-checks.yml +5 -5
  74. package/skills/yad-checks/templates/github/yad-update-guard.yml +3 -4
  75. package/skills/yad-checks/templates/github/yad-verified-commits.yml +4 -4
  76. package/skills/yad-checks/templates/gitlab/.gitlab-ci.yml +7 -1
  77. package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +22 -4
  78. package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +5 -5
  79. package/skills/yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml +4 -4
  80. package/skills/yad-checks/templates/hooks/ledger-guard-cursor.sh +91 -0
  81. package/skills/yad-checks/templates/hooks/ledger-guard.sh +38 -7
  82. package/skills/yad-commit/SKILL.md +6 -6
  83. package/skills/yad-connect-design/SKILL.md +6 -6
  84. package/skills/yad-connect-design/references/design-context.md +1 -1
  85. package/skills/yad-connect-design/references/design-registry.md +2 -2
  86. package/skills/yad-connect-docs/SKILL.md +12 -12
  87. package/skills/yad-connect-docs/references/docs-registry.md +1 -1
  88. package/skills/yad-connect-learning/SKILL.md +5 -5
  89. package/skills/yad-connect-learning/references/learning-registry.md +2 -2
  90. package/skills/yad-connect-repos/SKILL.md +92 -54
  91. package/skills/yad-connect-repos/references/code-context.md +6 -6
  92. package/skills/yad-connect-repos/references/hub-config.md +68 -58
  93. package/skills/yad-connect-repos/references/repos-registry.md +10 -9
  94. package/skills/yad-connect-repos/references/risk-map.md +81 -0
  95. package/skills/yad-connect-testing/SKILL.md +6 -6
  96. package/skills/yad-connect-testing/references/testing-context.md +3 -4
  97. package/skills/yad-connect-testing/references/testing-registry.md +2 -2
  98. package/skills/yad-defects/SKILL.md +8 -8
  99. package/skills/yad-discovery/SKILL.md +130 -94
  100. package/skills/yad-discovery/references/discovery-schema.md +23 -7
  101. package/skills/yad-discovery/references/foundation-schema.md +374 -0
  102. package/skills/yad-docs/SKILL.md +16 -11
  103. package/skills/yad-docs/references/data-mapping.md +9 -7
  104. package/skills/yad-docs/templates/app/package-lock.json +3 -3
  105. package/skills/yad-docs-overview/SKILL.md +32 -17
  106. package/skills/yad-docs-overview/references/pipeline-model.md +47 -28
  107. package/skills/yad-docs-sync/SKILL.md +10 -5
  108. package/skills/yad-docs-sync/references/staleness.md +8 -7
  109. package/skills/yad-engineer-review/SKILL.md +88 -24
  110. package/skills/yad-engineer-review/references/ship-and-record.md +25 -16
  111. package/skills/yad-epic/SKILL.md +178 -100
  112. package/skills/yad-epic/references/state-schema.md +626 -117
  113. package/skills/yad-hub-bridge/SKILL.md +66 -48
  114. package/skills/yad-hub-bridge/references/bridge.md +110 -83
  115. package/skills/yad-hub-bridge/references/login-roster.md +163 -70
  116. package/skills/yad-hub-bridge/templates/checks/hub-route.sh +22 -19
  117. package/skills/yad-hub-bridge/templates/github/yad-gate-sync.yml +34 -14
  118. package/skills/yad-hub-bridge/templates/gitlab/gitlab-ci.include-root.yml +2 -2
  119. package/skills/yad-hub-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml +22 -12
  120. package/skills/yad-implement/SKILL.md +29 -15
  121. package/skills/yad-implement/references/implement-conventions.md +2 -2
  122. package/skills/yad-learn/SKILL.md +9 -9
  123. package/skills/yad-learn/references/learning-state.md +2 -2
  124. package/skills/yad-open-pr/SKILL.md +64 -29
  125. package/skills/yad-pair-review/SKILL.md +18 -16
  126. package/skills/yad-pair-review/references/session-state.md +4 -4
  127. package/skills/yad-pr-template/SKILL.md +48 -27
  128. package/skills/yad-pr-template/references/risk-routing.md +97 -24
  129. package/skills/yad-pr-template/templates/checks/pr-template.sh +37 -15
  130. package/skills/yad-pr-template/templates/checks/pr-title.sh +27 -13
  131. package/skills/yad-pr-template/templates/checks/risk-route.sh +107 -14
  132. package/skills/yad-pr-template/templates/github/pull_request_template.md +7 -5
  133. package/skills/yad-pr-template/templates/gitlab/merge_request_templates/Default.md +7 -5
  134. package/skills/yad-pr-template/templates/hub/github/pull_request_template.md +15 -14
  135. package/skills/yad-pr-template/templates/hub/gitlab/merge_request_templates/Default.md +15 -13
  136. package/skills/yad-reconcile/SKILL.md +3 -3
  137. package/skills/yad-report/SKILL.md +5 -5
  138. package/skills/yad-review-companion/SKILL.md +12 -9
  139. package/skills/yad-review-gate/SKILL.md +198 -79
  140. package/skills/yad-review-gate/references/gating.md +230 -54
  141. package/skills/yad-run/SKILL.md +86 -56
  142. package/skills/yad-run/references/run-loop.md +67 -45
  143. package/skills/yad-ship/SKILL.md +18 -14
  144. package/skills/yad-spec/SKILL.md +31 -17
  145. package/skills/yad-spec/references/spec-handoff.md +17 -5
  146. package/skills/yad-status/SKILL.md +114 -56
  147. package/skills/yad-stories/SKILL.md +42 -27
  148. package/skills/yad-stories/references/story-schema.md +10 -9
  149. package/skills/yad-stub/SKILL.md +59 -48
  150. package/skills/yad-sync-repos/SKILL.md +3 -3
  151. package/skills/yad-test-cases/SKILL.md +37 -30
  152. package/skills/yad-test-cases/references/test-cases-schema.md +8 -5
  153. package/skills/yad-timeline/SKILL.md +8 -7
  154. package/skills/yad-ui/SKILL.md +46 -25
  155. package/cli/roster.mjs +0 -164
  156. package/skills/sdlc/install.sh +0 -68
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: yad-hub-bridge
3
- description: 'The templated PR/MR bridge for the front-half 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 file-only 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.'
3
+ description: 'The templated PR/MR bridge for the Shape review gate. When the Product has a platform (.sdlc/hub.json), it opens a review PR/MR on the Product for an authored artifact (the optional analysis / epic / architecture+contract / ui-design / stories / test-cases), applies the touched-domain labels (it requests no reviewers), 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 Product: 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 front-half 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 bridge is an **alternate
8
+ **Goal:** Run the Shape review/comment/approval cycle through a **real PR/MR on the Product**,
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
@@ -17,14 +17,15 @@ keeps platform mechanics out of the gate). `yad-review-gate` *calls* it; it neve
17
17
 
18
18
  ## Conventions
19
19
 
20
- - `{project-root}` is the **product hub**. Hub platform + reviewer roster live in `.sdlc/hub.json`
21
- (`config.yaml` `hub.config`; schema in `../yad-connect-repos/references/hub-config.md`).
22
- - Per-step review-PR record: `epics/EP-<slug>/.sdlc/hub-prs.json` (`config.yaml` `hub.pr_ledger`) — a
20
+ - `{project-root}` is the **Product**. The Product platform lives in `.sdlc/hub.json` — it holds no
21
+ list of people (`config.yaml` `product.config` (older projects: `hub.config`); schema in `../yad-connect-repos/references/hub-config.md`).
22
+ - Per-step review-PR record: `epics/EP-<slug>/.sdlc/product-prs.json`, written together with its
23
+ older name `hub-prs.json` (`config.yaml` `product.pr_ledger` (older projects: `hub.pr_ledger`)) — a
23
24
  sibling ledger to `approvals.json`, so `state.json`'s locked step shape is untouched.
24
- - The review-PR body is the hub template from `yad-pr-template` (`templates/hub/<platform>/…`).
25
- - Branch per artifact: `review/EP-<slug>/<artifact-base>` (`config.yaml` `hub.artifact_branch`).
25
+ - The review-PR body is the Product template from `yad-pr-template` (`templates/hub/<platform>/…`).
26
+ - Branch per artifact: `review/EP-<slug>/<artifact-base>` (`config.yaml` `product.artifact_branch` (older projects: `hub.artifact_branch`)).
26
27
  - **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 file-only — never embed a credential.
28
+ authenticated, STOP this path and tell the gate to fall back to local — never embed a credential.
28
29
 
29
30
  ## Inputs
30
31
 
@@ -33,33 +34,41 @@ keeps platform mechanics out of the gate). `yad-review-gate` *calls* it; it neve
33
34
  - `action` — `open` | `route` | `wire` (default `route`). (`sync`'s ledger writes live in
34
35
  `yad-review-gate`; this skill provides the read recipes `sync` calls — see `references/bridge.md`.)
35
36
 
36
- ## Preconditions (the bridge runs only when all hold)
37
+ ## Preconditions (the verified ledger runs only when all hold)
37
38
 
38
- `.sdlc/hub.json` exists with a non-null `platform`, `bridge_enabled: true`, `config.yaml` `hub.bridge:
39
- true`, and `gh` (GitHub) / `glab` (GitLab) installed **and authenticated**. If any fails, report that the
40
- gate proceeds **file-only** (no error) and stop.
39
+ `.sdlc/hub.json` exists with a non-null `platform`, `ledger: "verified"` (or, before `yad migrate`, `bridge_enabled: true`), `config.yaml` `product.bridge: true`
40
+ (older projects: `hub.bridge: true`), and `gh` (GitHub) / `glab` (GitLab) installed **and authenticated**. If any fails, report that the
41
+ gate proceeds **local** (no error) and stop.
41
42
 
42
43
  ## On Activation
43
44
 
44
45
  ### Step 1 — Resolve platform + routing
45
- Read `.sdlc/hub.json` for the platform and roster, `epics/<epic>/epic.md` for `repos` + `owner`, and the
46
- matching `review+approve` step's `risk_tags` from `.sdlc/state.json`. Compute the **required reviewers**
47
- with `route` (below) — the same rule `yad-review-gate` enforces: base (owner + 1 reviewer); escalated
48
- (`risk_tags` ∩ {contract,auth,payments}, or the stories step) adds a domain-owner per touched repo. Map
49
- each required domain-owner to a platform `login` via the roster (a roster `name` equal to a repo's
50
- `domain_owner` in `repos.json` is that repo's domain-owner).
46
+ Read `.sdlc/hub.json` for the platform, `epics/<epic>/epic.md` for `repos` + `owner` (the artifact's
47
+ author), and the matching `review+approve` step's `risk_tags` from `.sdlc/state.json`. Compute the
48
+ **count** with `route` (below) — the same rule `yad-review-gate` enforces: `needed = base 1 + risk step`
49
+ distinct approvers, where `contract` adds 2 and `auth`/`payments` add 1 (the highest tag, never the sum).
50
+ Only the base (1 distinct approver, who should not be the author) holds the gate; the risk step is
51
+ advisory. The gate caps the count at the active people less one and prints it (E72), but does
52
+ not enforce it yet; when it cannot count the people — as in Product CI, which checks out only the hub —
53
+ no cap is shown. Compute the **touched domains** too: the union of story `repos` for
54
+ `stories-review`, the epic's `repos` for a step tagged `contract`, `auth` or `payments`, none otherwise.
55
+ They become `domain:<repo>` labels and
56
+ are a hint for whom to ask. There is no roster to turn them into people.
51
57
 
52
58
  ### Step 2 — `open` (create the review PR/MR)
53
- 1. From the hub default branch, create `review/EP-<slug>/<artifact-base>` and ensure the artifact file
59
+ 1. From the Product default branch, create `review/EP-<slug>/<artifact-base>` and ensure the artifact file
54
60
  (and, for architecture, `contract.md` + `.sdlc/contract-lock.json`) is committed on it. Push as the
55
61
  local user. **First gate of a new epic:** cut the review branch from the **authoring** branch
56
62
  (`epic/…`, `change/…`, `analysis/…`, `discovery/…`) instead, so it carries the `.sdlc/` **seed** —
57
63
  that PR/MR is the only way a new epic's ledger reaches the default branch, and `ledger-guard`
58
64
  exempts it (see step 4).
59
- 2. Open the PR/MR with `gh`/`glab` using the hub body template (`yad-pr-template` `templates/hub/…`),
65
+ 2. Open the PR/MR with `gh`/`glab` using the Product body template (`yad-pr-template` `templates/hub/…`),
60
66
  filled with the epic, artifact, gate step, owner, `epic.repos`, and the step's risk tags.
61
- 3. **Request the required reviewers** (their logins) and add a `domain:<repo>` label per touched repo so
62
- per-repo routing is legible on the PR.
67
+ 3. **Request no reviewers.** Assign the person opening it — `@me` on GitHub (`gh` resolves it), the
68
+ login `glab api user` reports on GitLab (no assignee when that lookup fails) — and add a
69
+ `domain:<repo>` label per touched repo. `yad gate open` prints
70
+ `no reviewers were requested — ask them on the PR itself`; the author asks people on the PR. (A Shape review PR gets no
71
+ reviewer suggestion: E68's suggestion reads a code change, so only `yad open-pr` (and `yad ship`) on a code repo prints it.)
63
72
  4. **Do not write the ledger.** CI is the sole writer and writes only at merge. During review nothing
64
73
  is recorded in the ledger — the platform PR/MR holds the review state (native approvals + threads).
65
74
  At merge, CI records the `hub-prs.json` entry (in the shape below) and advances on the default
@@ -68,22 +77,27 @@ each required domain-owner to a platform `login` via the roster (a roster `name`
68
77
  { "step": "<review step id>", "artifact": "<artifact>", "platform": "github|gitlab",
69
78
  "number": <n>, "url": "<pr/mr url>", "branch": "review/EP-<slug>/<artifact-base>", "lastSyncedAt": null }
70
79
  ```
71
- A human commit touching the gate-state files (`.sdlc/{state,approvals,comments,hub-prs}.json` or
80
+ A human commit touching the gate-state files (`.sdlc/{state,approvals,comments,product-prs,hub-prs}.json` or
72
81
  `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 bridge mode it opens the
82
+ by the `ledger-guard` check. (The `yad gate open` CLI behaves the same: in verified mode it opens the
74
83
  PR only and writes no ledger.) The **one** exception is a brand-new epic's **seed** — no CI path can
75
84
  create a ledger, so an epic whose `.sdlc/state.json` is absent from the base ref may be created by a
76
85
  human on this first PR/MR (#162). Every later change to it is CI's alone.
77
- 5. Report the PR/MR URL and the required reviewers. **Do not** record approvals or advance — reviewers
86
+ 5. Report the PR/MR URL and the count the step needs. **Do not** record approvals or advance — reviewers
78
87
  act on the platform; CI (`yad gate ci`) reconciles it onto the default branch at merge.
79
88
 
80
- ### Step 3 — `route` (print required reviewers)
81
- Compute and print the required reviewers as above. Use `templates/checks/hub-route.sh <body>` to parse a
82
- PR/MR body's Impact & Risk block when given one; otherwise derive from `epic.repos` + the step's
83
- `risk_tags`. Advisory only — it routes the human review, it does not approve.
84
-
85
- ### Step 4 — `wire` (merge-time sync on the hub)
86
- Install the hub CI that turns the human **merge** into a `yad gate ci` run, with CI as the **sole
89
+ ### Step 3 — `route` (print the count)
90
+ Compute and print the count as above. Use `templates/checks/hub-route.sh <body>` to parse a PR/MR
91
+ body's Impact & Risk block when given one; it prints e.g. `ROUTE: 3 approvers = base 1 + contract risk 2
92
+ (risk tag: contract)`, says only the base holds the gate (1 approval), that the risk step is advisory
93
+ and `yad gate status` prints it capped by the active people, and lists the touched repos as a hint for whom
94
+ to ask. With no `contract`/`auth`/`payments` tag it prints `ROUTE: 1 approver = base 1 (no risk step).`
95
+ and no repo list. Otherwise derive from
96
+ `epic.repos` + the step's `risk_tags`. Stories do not route per repo. Advisory only — it routes the
97
+ human review, it does not approve.
98
+
99
+ ### Step 4 — `wire` (merge-time sync on the Product)
100
+ Install the Product CI that turns the human **merge** into a `yad gate ci` run, with CI as the **sole
87
101
  writer** of the ledger. There is no pre-merge CI write — during review the platform PR/MR is the
88
102
  source of truth (native approvals + threads). On merge, CI re-reads approvals from the platform,
89
103
  advances the step, and flips the artifact `status:` on the **default branch** (the only place CI ever
@@ -94,21 +108,24 @@ Revoke-on-change is enforced at merge: on **GitHub** in code (an approval whose
94
108
  head is dropped — no setting needed); on **GitLab** it has no per-approval commit SHA, so enabling the
95
109
  platform's **"remove all approvals when commits are added to the source branch"** is **required** for
96
110
  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 bridge mode `yad gate sync` is advisory (read-only) and is **not**
111
+ artifact pushes dismiss approvals. In verified mode `yad gate sync` is advisory (read-only) and is **not**
98
112
  a recovery path; if a merge-time run fails, the scheduled reconcile job re-advances it automatically, or
99
113
  a maintainer can force it with `yad gate ci --branch <review-branch> --pr <n> --merged` locally on the
100
- default branch. (File-only mode keeps `yad gate sync` as the local writer.)
114
+ default branch. (local mode keeps `yad gate sync` as the local writer.)
101
115
 
102
116
  1. Run `yad check --fix` (the wiring is manifest-driven, like `yad-checks`): with a platform +
103
117
  enabled bridge in `.sdlc/hub.json` it installs
104
118
  - GitHub → `.github/workflows/yad-gate-sync.yml` (from `templates/github/yad-gate-sync.yml`)
105
119
  - GitLab → `.gitlab/ci/yad-gate-sync.yml` (from `templates/gitlab/yad-gate-sync.gitlab-ci.yml`)
106
- - plus the hub-side **verified-commits** gate (`checks/verified-commits.sh` + its workflow/fragment,
107
- owned by `yad-checks`) so review PRs accept only signed commits from roster-known authors
120
+ - plus the Product-side **verified-commits** gate (`checks/verified-commits.sh` + its workflow/fragment,
121
+ owned by `yad-checks`) so review PRs accept only platform-Verified (signed) commits — there is no
122
+ author allowlist
108
123
  - the wired job runs an **exact** version, resolved at run time from the repo: the `YAD_VERSION`
109
124
  variable, else `hub.json` `gate_sync_version`, else the `.sdlc/cli-version.json` stamp, else the
110
- floating `3`. It stopped floating on the major because that let a release change a scheduled job's
111
- behaviour unattended — how #163's churn reached hubs that never opted in. So upgrading is now a
125
+ floating major the fragment ships with (`YAD_MAJOR`, `4` in this release) — a committed pin is used
126
+ only when it is an exact release of that major, so `yad update` moves the fragment and the stamp
127
+ to a new major together. It stopped floating on the major because that let a release change a scheduled job's
128
+ behaviour unattended — how #163's churn reached Products that never opted in. So upgrading is now a
112
129
  deliberate act (`yad update`); if the resolved pin predates 3.15.3, upgrade or disable the
113
130
  schedule. Never edit a version into the wired file — `yad check --fix` rewrites it byte-for-byte
114
131
  from the template. See `references/bridge.md`.
@@ -128,7 +145,7 @@ default branch. (File-only mode keeps `yad gate sync` as the local writer.)
128
145
  case set the variable to a real tag. The variable lives in project settings, so it survives
129
146
  every `yad` sync. Single value only — `tags: [$VAR]` is one tag equal to the whole variable,
130
147
  not a comma-split.
131
- 3. Commit the workflow to the hub. GitHub needs nothing else — the ephemeral `github.token` reads the
148
+ 3. Commit the workflow to the Product. GitHub needs nothing else — the ephemeral `github.token` reads the
132
149
  PR and pushes the merge advance to the default branch, and the workflow's reconcile **schedule**
133
150
  runs automatically (no setup) as the safety net that recovers a merge whose run failed transiently.
134
151
  If the default branch is protected, see the workflow header for the bypass / PAT options; until then
@@ -139,31 +156,32 @@ default branch. (File-only mode keeps `yad gate sync` as the local writer.)
139
156
  ## Hard rules
140
157
 
141
158
  - **Local-user auth only; store no tokens.** Reviewers use their own `gh`/`glab`.
142
- - **The bridge is an input path, never the authority.** It opens PRs and reads state; the **file ledger
159
+ - **the verified ledger is an input path, never the authority.** It opens PRs and reads state; the **file ledger
143
160
  is the source of truth** and the gate predicate (in `yad-review-gate`) is unchanged.
144
- - **The bridge never approves on a reviewer's behalf.** Reviewers approve/merge with their own auth. The
161
+ - **the verified ledger never approves on a reviewer's behalf.** Reviewers approve/merge with their own auth. The
145
162
  step advances when a human **merges** the approved, fully-resolved review PR (the merge is that human
146
- act) — `yad gate sync` records the approvals + resolution + merged state and advances; unresolved
163
+ act) — `yad gate ci` at merge (or `yad gate sync` with a local ledger) records the approvals +
164
+ resolution + merged state and advances; unresolved
147
165
  comments or a changed artifact hold it `in_review`. The mechanical sync is the `yad gate` CLI.
148
166
  - **CI never approves and never merges.** The wired workflow only runs `gate ci` — the same sync +
149
167
  unchanged predicate. It does **nothing pre-merge** (the platform PR/MR holds the review state); at
150
168
  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; front gates
169
+ the **default branch** (the only place CI ever commits). CI is the sole ledger writer; Shape gates
152
170
  stay permanently human.
153
171
  - **The CI tokens are the one documented bend of "no stored tokens".** GitHub uses the platform's own
154
172
  ephemeral `github.token` (nothing stored). GitLab requires a stored masked `SDLC_GATE_TOKEN`
155
173
  project access token because `CI_JOB_TOKEN` can neither read the approvals API nor push — say so
156
174
  when wiring, and scope it to `read_api` + `write_repository` only.
157
- - **Protect the hub default branch.** Require that `epics/**` artifacts change only through a review
175
+ - **Protect the Product default branch.** Require that `epics/**` artifacts change only through a review
158
176
  PR/MR (branch protection). This keeps revoke-on-change sound: it removes the only window where a
159
177
  delayed reconcile could advance on an out-of-band post-merge artifact change (see `references/bridge.md`,
160
178
  "Known limitation"). Safe to require: a new epic's `.sdlc/` seed rides its first review PR/MR, so
161
179
  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 file-only with no error.
180
+ - **Degrade gracefully.** No platform / disabled bridge / no CLI → the gate runs local with no error.
163
181
 
164
182
  ## Reference
165
183
  - PR-body→ledger mapping, the read-only gh/glab recipes, idempotent re-sync, contract re-lock handling:
166
184
  `references/bridge.md`.
167
- - Roster schema, login→role resolution, unverified-login fallback, per-repo routing: `references/login-roster.md`.
185
+ - How approvals, comments and records are attributed to a platform login (no roster): `references/login-roster.md`.
168
186
  - The gate this feeds (open hook + sync action + unchanged predicate): `../yad-review-gate/SKILL.md`, `../yad-review-gate/references/gating.md`.
169
- - The hub PR/MR body template + the code-repo routing analogue: `../yad-pr-template/`.
187
+ - The Product PR/MR body template + the code-repo routing analogue: `../yad-pr-template/`.