yadflow 3.18.1 → 4.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +355 -0
- package/README.md +79 -26
- package/bin/commands.mjs +41 -0
- package/bin/yad.mjs +437 -124
- package/cli/artifact-status.mjs +34 -15
- package/cli/checkpoint.mjs +69 -49
- package/cli/codeowners-command.mjs +170 -0
- package/cli/codeowners.mjs +397 -0
- package/cli/commit.mjs +13 -9
- package/cli/companion.mjs +2 -2
- package/cli/dial.mjs +183 -0
- package/cli/docs.mjs +88 -32
- package/cli/doctor.mjs +1472 -97
- package/cli/epic-state.mjs +3478 -232
- package/cli/epic.mjs +506 -0
- package/cli/errors.mjs +4 -1
- package/cli/gate.mjs +1002 -209
- package/cli/history.mjs +556 -0
- package/cli/hook.mjs +266 -55
- package/cli/hubcommit.mjs +6 -17
- package/cli/index-command.mjs +87 -0
- package/cli/ledger.mjs +57 -7
- package/cli/lib.mjs +184 -18
- package/cli/manifest.mjs +367 -56
- package/cli/migrate.mjs +726 -53
- package/cli/mode.mjs +170 -0
- package/cli/next.mjs +349 -90
- package/cli/openpr.mjs +191 -39
- package/cli/people.mjs +654 -0
- package/cli/plan.mjs +417 -132
- package/cli/platform.mjs +110 -129
- package/cli/product-index.mjs +287 -0
- package/cli/protection.mjs +706 -0
- package/cli/reconcile.mjs +38 -12
- package/cli/repo-publish.mjs +24 -26
- package/cli/repo.mjs +23 -14
- package/cli/report.mjs +21 -15
- package/cli/review.mjs +24 -27
- package/cli/riskmap-command.mjs +289 -0
- package/cli/riskmap.mjs +373 -0
- package/cli/setup.mjs +139 -287
- package/cli/ship.mjs +7 -6
- package/cli/skill.mjs +180 -0
- package/cli/skip.mjs +211 -30
- package/cli/thread.mjs +42 -17
- package/cli/tidy.mjs +20 -20
- package/cli/update-commit.mjs +22 -22
- package/cli/usage.mjs +115 -109
- package/package.json +3 -3
- package/skills/sdlc/config.yaml +166 -87
- package/skills/sdlc/module-help.csv +35 -35
- package/skills/yad-analysis/SKILL.md +125 -65
- package/skills/yad-architecture/SKILL.md +34 -23
- package/skills/yad-architecture/references/contract-format.md +10 -8
- package/skills/yad-backfill/SKILL.md +14 -8
- package/skills/yad-backfill/references/backfill.md +1 -1
- package/skills/yad-change/SKILL.md +127 -52
- package/skills/yad-change/references/triage.md +42 -28
- package/skills/yad-checks/SKILL.md +89 -45
- package/skills/yad-checks/references/check-gates.md +315 -92
- package/skills/yad-checks/templates/checks/build-test-lint.sh +25 -7
- package/skills/yad-checks/templates/checks/commit-message.sh +17 -3
- package/skills/yad-checks/templates/checks/contract-check.sh +58 -2
- package/skills/yad-checks/templates/checks/epic-open.sh +3 -3
- package/skills/yad-checks/templates/checks/install-deps.sh +46 -0
- package/skills/yad-checks/templates/checks/ledger-guard.sh +94 -18
- package/skills/yad-checks/templates/checks/lineage-check.sh +23 -9
- package/skills/yad-checks/templates/checks/package-manager.sh +140 -0
- package/skills/yad-checks/templates/checks/reconcile-debt-check.sh +4 -4
- package/skills/yad-checks/templates/checks/risk-map-check.sh +438 -0
- package/skills/yad-checks/templates/checks/verified-commits.sh +20 -46
- package/skills/yad-checks/templates/github/yad-checks.yml +37 -5
- package/skills/yad-checks/templates/github/yad-hub-checks.yml +5 -5
- package/skills/yad-checks/templates/github/yad-update-guard.yml +3 -4
- package/skills/yad-checks/templates/github/yad-verified-commits.yml +4 -4
- package/skills/yad-checks/templates/gitlab/.gitlab-ci.yml +7 -1
- package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +22 -4
- package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +5 -5
- package/skills/yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml +4 -4
- package/skills/yad-checks/templates/hooks/ledger-guard-cursor.sh +91 -0
- package/skills/yad-checks/templates/hooks/ledger-guard.sh +38 -7
- package/skills/yad-commit/SKILL.md +6 -6
- package/skills/yad-connect-design/SKILL.md +6 -6
- package/skills/yad-connect-design/references/design-context.md +1 -1
- package/skills/yad-connect-design/references/design-registry.md +2 -2
- package/skills/yad-connect-docs/SKILL.md +12 -12
- package/skills/yad-connect-docs/references/docs-registry.md +1 -1
- package/skills/yad-connect-learning/SKILL.md +5 -5
- package/skills/yad-connect-learning/references/learning-registry.md +2 -2
- package/skills/yad-connect-repos/SKILL.md +92 -54
- package/skills/yad-connect-repos/references/code-context.md +6 -6
- package/skills/yad-connect-repos/references/hub-config.md +68 -58
- package/skills/yad-connect-repos/references/repos-registry.md +10 -9
- package/skills/yad-connect-repos/references/risk-map.md +81 -0
- package/skills/yad-connect-testing/SKILL.md +6 -6
- package/skills/yad-connect-testing/references/testing-context.md +3 -4
- package/skills/yad-connect-testing/references/testing-registry.md +2 -2
- package/skills/yad-defects/SKILL.md +8 -8
- package/skills/yad-discovery/SKILL.md +130 -94
- package/skills/yad-discovery/references/discovery-schema.md +23 -7
- package/skills/yad-discovery/references/foundation-schema.md +374 -0
- package/skills/yad-docs/SKILL.md +16 -11
- package/skills/yad-docs/references/data-mapping.md +9 -7
- package/skills/yad-docs/templates/app/package-lock.json +3 -3
- package/skills/yad-docs-overview/SKILL.md +32 -17
- package/skills/yad-docs-overview/references/pipeline-model.md +47 -28
- package/skills/yad-docs-sync/SKILL.md +10 -5
- package/skills/yad-docs-sync/references/staleness.md +8 -7
- package/skills/yad-engineer-review/SKILL.md +88 -24
- package/skills/yad-engineer-review/references/ship-and-record.md +25 -16
- package/skills/yad-epic/SKILL.md +178 -100
- package/skills/yad-epic/references/state-schema.md +626 -117
- package/skills/yad-hub-bridge/SKILL.md +66 -48
- package/skills/yad-hub-bridge/references/bridge.md +110 -83
- package/skills/yad-hub-bridge/references/login-roster.md +163 -70
- package/skills/yad-hub-bridge/templates/checks/hub-route.sh +22 -19
- package/skills/yad-hub-bridge/templates/github/yad-gate-sync.yml +34 -14
- package/skills/yad-hub-bridge/templates/gitlab/gitlab-ci.include-root.yml +2 -2
- package/skills/yad-hub-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml +22 -12
- package/skills/yad-implement/SKILL.md +29 -15
- package/skills/yad-implement/references/implement-conventions.md +2 -2
- package/skills/yad-learn/SKILL.md +9 -9
- package/skills/yad-learn/references/learning-state.md +2 -2
- package/skills/yad-open-pr/SKILL.md +64 -29
- package/skills/yad-pair-review/SKILL.md +18 -16
- package/skills/yad-pair-review/references/session-state.md +4 -4
- package/skills/yad-pr-template/SKILL.md +48 -27
- package/skills/yad-pr-template/references/risk-routing.md +97 -24
- package/skills/yad-pr-template/templates/checks/pr-template.sh +37 -15
- package/skills/yad-pr-template/templates/checks/pr-title.sh +27 -13
- package/skills/yad-pr-template/templates/checks/risk-route.sh +107 -14
- package/skills/yad-pr-template/templates/github/pull_request_template.md +7 -5
- package/skills/yad-pr-template/templates/gitlab/merge_request_templates/Default.md +7 -5
- package/skills/yad-pr-template/templates/hub/github/pull_request_template.md +15 -14
- package/skills/yad-pr-template/templates/hub/gitlab/merge_request_templates/Default.md +15 -13
- package/skills/yad-reconcile/SKILL.md +3 -3
- package/skills/yad-report/SKILL.md +5 -5
- package/skills/yad-review-companion/SKILL.md +12 -9
- package/skills/yad-review-gate/SKILL.md +198 -79
- package/skills/yad-review-gate/references/gating.md +230 -54
- package/skills/yad-run/SKILL.md +86 -56
- package/skills/yad-run/references/run-loop.md +67 -45
- package/skills/yad-ship/SKILL.md +18 -14
- package/skills/yad-spec/SKILL.md +31 -17
- package/skills/yad-spec/references/spec-handoff.md +17 -5
- package/skills/yad-status/SKILL.md +114 -56
- package/skills/yad-stories/SKILL.md +42 -27
- package/skills/yad-stories/references/story-schema.md +10 -9
- package/skills/yad-stub/SKILL.md +59 -48
- package/skills/yad-sync-repos/SKILL.md +3 -3
- package/skills/yad-test-cases/SKILL.md +37 -30
- package/skills/yad-test-cases/references/test-cases-schema.md +8 -5
- package/skills/yad-timeline/SKILL.md +8 -7
- package/skills/yad-ui/SKILL.md +46 -25
- package/cli/roster.mjs +0 -164
- package/skills/sdlc/install.sh +0 -68
|
@@ -1,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 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
|
|
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**,
|
|
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 **
|
|
21
|
-
(`config.yaml` `hub.config
|
|
22
|
-
- Per-step review-PR record: `epics/EP-<slug>/.sdlc/
|
|
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
|
|
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
|
|
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
|
|
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
|
|
39
|
-
true
|
|
40
|
-
gate proceeds **
|
|
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
|
|
46
|
-
matching `review+approve` step's `risk_tags` from `.sdlc/state.json`. Compute the
|
|
47
|
-
with `route` (below) — the same rule `yad-review-gate` enforces: base
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
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
|
|
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
|
|
62
|
-
|
|
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
|
|
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
|
|
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
|
|
81
|
-
Compute and print the
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
|
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. (
|
|
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
|
|
107
|
-
owned by `yad-checks`) so review PRs accept only signed commits
|
|
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
|
|
111
|
-
|
|
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
|
|
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
|
-
- **
|
|
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
|
-
- **
|
|
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
|
|
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;
|
|
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
|
|
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
|
|
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
|
-
-
|
|
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
|
|
187
|
+
- The Product PR/MR body template + the code-repo routing analogue: `../yad-pr-template/`.
|