yadflow 3.18.1 → 3.19.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -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-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
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-pair-review
|
|
3
|
-
description: 'The guided, two-way, teaching pair-review walkthrough for the SDLC review gates — the AI-driven companion face. The human opens a PR/MR with an AI session and the AI walks them through the change ONE STOP AT A TIME (highest-risk first), giving comprehensive context per change, then asking the human a Socratic question about it; the human answers and asks back, and both keep going until BOTH declare satisfied. The session doubles as a learning session: it demonstrates a transferable review method, scores the engineer against it, and records their review-skill growth in the local-only yad-learn ledger (rolled up by yad status). Works on the
|
|
3
|
+
description: 'The guided, two-way, teaching pair-review walkthrough for the SDLC review gates — the AI-driven companion face. The human opens a PR/MR with an AI session and the AI walks them through the change ONE STOP AT A TIME (highest-risk first), giving comprehensive context per change, then asking the human a Socratic question about it; the human answers and asks back, and both keep going until BOTH declare satisfied. The session doubles as a learning session: it demonstrates a transferable review method, scores the engineer against it, and records their review-skill growth in the local-only yad-learn ledger (rolled up by yad status). Works on the Build code PR/MR (yad review) and the Shape artifact-review PR/MR (yad gate). Soft and additive — it NEVER blocks a merge or gate; it rides the existing engagement signal and surfaces genuine concerns as normal blocking comments. Use when the user says "pair review this", "walk me through the PR/MR", "review with me", "co-review", or "teach me to review".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDLC — Pair Review (the guided, two-way, teaching walkthrough)
|
|
@@ -27,8 +27,8 @@ platform.**
|
|
|
27
27
|
## Conventions
|
|
28
28
|
|
|
29
29
|
- `{project-root}` resolves from the project working directory — the **product hub**.
|
|
30
|
-
-
|
|
31
|
-
-
|
|
30
|
+
- Build (code PR/MR): grounded by `yad review walkthrough --repo <r> --pr <n>`.
|
|
31
|
+
- Shape (artifact-review PR/MR): grounded by `yad gate walkthrough <epic> [artifact]`.
|
|
32
32
|
- The transferable review method + scorecard live in `references/review-rubric.md`.
|
|
33
33
|
- The session-record comment shape, the dual sign-off, and the learning record this writes live in
|
|
34
34
|
`references/session-state.md` (it reuses [`yad-learn`](../yad-learn/SKILL.md)'s ledger + gitignore
|
|
@@ -38,7 +38,7 @@ platform.**
|
|
|
38
38
|
|
|
39
39
|
## Inputs
|
|
40
40
|
|
|
41
|
-
-
|
|
41
|
+
- Build: `repo` + `pr`. Shape: `epic` + `artifact`.
|
|
42
42
|
- `member` — the learner being paired with (default: the invoking user). Used for the learning record.
|
|
43
43
|
- `action` — `walkthrough` (the full session, default) | `record` (just write the session comment +
|
|
44
44
|
learning record from an already-finished session) | `rubric` (print the review method and stop).
|
|
@@ -47,9 +47,9 @@ platform.**
|
|
|
47
47
|
|
|
48
48
|
### Step 1 — Get the ordered stops (the grounding)
|
|
49
49
|
Run the walkthrough grounding for the half you're on:
|
|
50
|
-
-
|
|
50
|
+
- Build: `yad review walkthrough --repo <r> --pr <n>` → prints the grounding bundle **plus an ordered
|
|
51
51
|
`stops[]`** (the code diff parsed into hunk-anchored, risk-tagged review stops, highest-risk first).
|
|
52
|
-
-
|
|
52
|
+
- Shape: `yad gate walkthrough <epic> [artifact]` → the same, over the artifact's review diff.
|
|
53
53
|
|
|
54
54
|
**Read the real material yourself** — run the bundle's `diffCmd`, and read the named `codeMap` / `pack` /
|
|
55
55
|
`contract` / `artifactPath` / `specs/<story>/` files. Never invent content. If a stop's material isn't
|
|
@@ -87,8 +87,8 @@ After the last stop:
|
|
|
87
87
|
concern remains*.
|
|
88
88
|
- **Human sign-off.** The human decides: **approve** or **request changes**. When they approve through
|
|
89
89
|
this session, submit the approval carrying the engagement marker so the gate records
|
|
90
|
-
`engagement: verified` —
|
|
91
|
-
(GitLab: `glab mr approve <n>` then a note with the marker);
|
|
90
|
+
`engagement: verified` — Build: `gh pr review <n> --approve --body "<note>\n\n<!-- yad:engagement verified -->"`
|
|
91
|
+
(GitLab: `glab mr approve <n>` then a note with the marker); Shape: the human approves via
|
|
92
92
|
[`yad-review-gate`](../yad-review-gate/SKILL.md) the normal way.
|
|
93
93
|
|
|
94
94
|
"**Both satisfied**" = the human approved **and** your verdict holds no unresolved blocking concern. If
|
|
@@ -101,7 +101,7 @@ addresses them) — nothing advances on a half-finished session.
|
|
|
101
101
|
never holds the gate): the transcript summary, the **review-skill scorecard**, your AI verdict, and
|
|
102
102
|
both sign-offs. Post it with the platform CLI (`gh pr comment` / `glab mr note`).
|
|
103
103
|
2. **Learning record (local-only).** Append a `yad-learn` record for the `member`: `concept` =
|
|
104
|
-
`review <repo> PR #<n> — <title>` (
|
|
104
|
+
`review <repo> PR #<n> — <title>` (Shape: `review <artifact> (<epic>)`), `stage` =
|
|
105
105
|
`engineer-review` (back) / `<artifact>-review` (front), `mode` = `deep` (or `quiz` when you scored
|
|
106
106
|
comprehension), `comprehension` = the scorecard roll-up, `tutorial` = a rendered
|
|
107
107
|
`learning/<member>--review-<pr>.md` capturing the method as applied to this PR + the engineer's gaps.
|
|
@@ -125,7 +125,7 @@ addresses them) — nothing advances on a half-finished session.
|
|
|
125
125
|
or push the records/tutorials, and never write them into a code repo.
|
|
126
126
|
- **You never approve for the human and never merge.** You pair and teach; the human acts.
|
|
127
127
|
|
|
128
|
-
##
|
|
128
|
+
## local mode (no platform)
|
|
129
129
|
|
|
130
130
|
With no hub platform there is no PR to post to: write the session record to
|
|
131
131
|
`reviews/<base>--<date>--pair-session.md` alongside the existing `reviews/*.md`, and the human records
|
|
@@ -138,7 +138,7 @@ the posting surface differs.
|
|
|
138
138
|
- The transferable review method + scorecard schema: `references/review-rubric.md`.
|
|
139
139
|
- The session comment shape, dual sign-off, and learning record: `references/session-state.md`.
|
|
140
140
|
- The four skim faces this complements: [`yad-review-companion`](../yad-review-companion/SKILL.md).
|
|
141
|
-
- The
|
|
142
|
-
- The
|
|
141
|
+
- The Build merge gate it enriches: [`yad-engineer-review`](../yad-engineer-review/SKILL.md).
|
|
142
|
+
- The Shape gate it enriches: [`yad-review-gate`](../yad-review-gate/SKILL.md).
|
|
143
143
|
- The learning layer it records into: [`yad-learn`](../yad-learn/SKILL.md) and its
|
|
144
144
|
`references/learning-state.md`.
|
|
@@ -22,7 +22,7 @@ Sections (you generate the prose; the helper composes them):
|
|
|
22
22
|
- **humanSignoff / aiSignoff** — the two satisfaction statements ("both satisfied").
|
|
23
23
|
|
|
24
24
|
Post it with the platform CLI (`gh pr comment <n> -b "<body>"` / `glab mr note <n> -m "<body>"`). In
|
|
25
|
-
|
|
25
|
+
local mode write it to `reviews/<base>--<date>--pair-session.md` instead.
|
|
26
26
|
|
|
27
27
|
## 2. The learning record (local-only, reuses yad-learn)
|
|
28
28
|
|
|
@@ -62,7 +62,7 @@ cross-project), using yad-learn's exact field shape:
|
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Field notes:
|
|
65
|
-
- `stage` = `engineer-review` (
|
|
65
|
+
- `stage` = `engineer-review` (Build) or `<artifact>-review` (Shape, e.g. `architecture-review`).
|
|
66
66
|
- `mode` = `deep` for a walkthrough that didn't score, `quiz` when you captured a comprehension roll-up.
|
|
67
67
|
- `comprehension` = the scorecard roll-up string (null when `mode: deep`).
|
|
68
68
|
- `tool` = `harness-native` (or `deeptutor` if a DeepTutor session backed the tutoring).
|
|
@@ -74,7 +74,7 @@ engineer's specific gaps and how to close them. Both files are **local-only, git
|
|
|
74
74
|
or pushed, and never written into a code repo** — they are a private personal skills log. `yad status`
|
|
75
75
|
rolls them up by stage (e.g. "engineer-review: 3").
|
|
76
76
|
|
|
77
|
-
## Optional: stamp the build-log (
|
|
77
|
+
## Optional: stamp the build-log (Build)
|
|
78
78
|
|
|
79
79
|
When the task later ships, [`yad-engineer-review`](../../yad-engineer-review/SKILL.md) may record on the
|
|
80
80
|
ship record's `companion` block that a pair session ran: `"companion": { "trailer": true, "cards": false,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-pr-template
|
|
3
|
-
description: 'Build
|
|
3
|
+
description: 'Build Step D of the gated SDLC. Detect a code repo''s platform and commit the matching PR/MR template — .github/pull_request_template.md (GitHub) or .gitlab/merge_request_templates/Default.md (GitLab). The template carries an Impact & Risk block; a high risk level (or a touched contract/auth/payments surface) routes the review to domain owners, reusing yad-review-gate''s escalation. Includes risk-route.sh to print the required reviewers from a PR body. Never auto-advances. Use when the user says "add the PR template" or "set up the MR template" for a repo.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC — PR/MR Template (
|
|
6
|
+
# SDLC — PR/MR Template (Build Step D)
|
|
7
7
|
|
|
8
8
|
**Goal:** Commit the platform-correct PR/MR template into a code repo so every PR/MR carries an
|
|
9
9
|
**Impact & Risk** block and a checklist tied to the check gates. A **high** risk level (or a touched
|
|
10
10
|
contract/auth/payments surface) **routes the review to domain owners** — the same escalation
|
|
11
|
-
`yad-review-gate` applies on the
|
|
11
|
+
`yad-review-gate` applies on the Shape gates (owner + 1 reviewer, plus one domain-owner per
|
|
12
12
|
touched domain). This step **never auto-advances**; it sets up the template and the routing helper.
|
|
13
13
|
|
|
14
14
|
## Conventions
|
|
@@ -21,7 +21,7 @@ touched domain). This step **never auto-advances**; it sets up the template and
|
|
|
21
21
|
- `templates/gitlab/merge_request_templates/Default.md` → installs to
|
|
22
22
|
`<repo>/.gitlab/merge_request_templates/Default.md`
|
|
23
23
|
- `templates/checks/risk-route.sh` → installs to `<repo>/checks/risk-route.sh` (advisory routing helper)
|
|
24
|
-
- **Hub variants** (`repo: hub`) —
|
|
24
|
+
- **Hub variants** (`repo: hub`) — Shape artifact-review PR/MR bodies:
|
|
25
25
|
`templates/hub/github/pull_request_template.md` → `{project-root}/.github/pull_request_template.md`;
|
|
26
26
|
`templates/hub/gitlab/merge_request_templates/Default.md` →
|
|
27
27
|
`{project-root}/.gitlab/merge_request_templates/Default.md`. The hub body carries no `Task:` trailer
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The PR/MR template (Phase 3 build plan §D) carries an **Impact & Risk** block so every change states
|
|
4
4
|
its blast radius before review, and so high-risk changes pull in the right reviewers automatically —
|
|
5
|
-
reusing the escalation `yad-review-gate` already applies on the
|
|
5
|
+
reusing the escalation `yad-review-gate` already applies on the Shape gates.
|
|
6
6
|
|
|
7
7
|
## The Impact & Risk block
|
|
8
8
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
# that bypassed the template.
|
|
6
6
|
# --profile code (default) — the code-repo task template (yad-pr-template templates/<platform>/):
|
|
7
7
|
# requires `## Summary`, `## Impact & Risk`, `## Checklist`, and a filled `Risk level:` (low|medium|high).
|
|
8
|
-
# --profile hub — the
|
|
9
|
-
# requires `## Artifact under review`, `## Impact & Risk (front-half)
|
|
8
|
+
# --profile hub — the Shape artifact-review template (templates/hub/<platform>/):
|
|
9
|
+
# requires `## Artifact under review`, `## Impact & Risk (front-half)` (or `(Shape)`), `## Checklist`, and a `Risk tags:` line.
|
|
10
10
|
# BUT only for review/EP-* head branches. Every other hub PR is a tooling/code change to the hub
|
|
11
11
|
# itself and uses the code task template instead; pass the head ref via --head so the gate knows
|
|
12
12
|
# which template to require. With no --head, the hub profile stays strict (artifact-review template).
|
|
13
|
-
# Branch name is not enough on its own: a non-review head that actually changes
|
|
13
|
+
# Branch name is not enough on its own: a non-review head that actually changes Shape
|
|
14
14
|
# artifacts (epics/**) would otherwise slip past the review workflow with only the code template.
|
|
15
15
|
# Pass the PR's changed paths via --changed <file> (one path per line); when they touch epics/**
|
|
16
16
|
# on a non-review head the gate FAILS — artifact changes must go through a review/EP-* PR.
|
|
@@ -35,7 +35,7 @@ while [ $# -gt 0 ]; do
|
|
|
35
35
|
done
|
|
36
36
|
case "$PROFILE" in code|hub) ;; *) echo "FAIL [pr-template]: unknown --profile '$PROFILE' (code|hub)."; exit 1 ;; esac
|
|
37
37
|
|
|
38
|
-
# True when the PR changes a
|
|
38
|
+
# True when the PR changes a Shape artifact (anything under epics/**). Reads the --changed list
|
|
39
39
|
# of paths CI computed from the PR diff; with no list (direct caller / test) it reports false.
|
|
40
40
|
artifact_changed() { [ -n "$CHANGED" ] && [ -f "$CHANGED" ] && grep -qE '^epics/' "$CHANGED"; }
|
|
41
41
|
|
|
@@ -91,13 +91,21 @@ check_code_body() {
|
|
|
91
91
|
fi
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
# The
|
|
94
|
+
# The Shape artifact-review template.
|
|
95
95
|
check_hub_body() {
|
|
96
96
|
require_heading '## Artifact under review' '## Artifact under review'
|
|
97
|
-
|
|
97
|
+
# Add before you remove (change-safety rule 3). `front-half` is the ORIGINAL spelling and it is
|
|
98
|
+
# still what `yad gate open` emits and what the shipped hub template carries; `Shape` is the
|
|
99
|
+
# replacement, accepted here first so that this script is lenient BEFORE anything starts writing
|
|
100
|
+
# the new wording. That ordering is the whole point: this file is refreshed by `yad update`
|
|
101
|
+
# (HUB_WIRING, cli/manifest.mjs), but the PR template beside it is NOT — it is installed only by
|
|
102
|
+
# the `yad-pr-template repo:hub action: wire` skill, which nothing runs automatically. So a hub
|
|
103
|
+
# WILL sit with a refreshed checker next to an old template, and the checker has to accept both.
|
|
104
|
+
# The emitter flips to `(Shape)` in the next major; only after that may `front-half` be dropped.
|
|
105
|
+
require_heading '## Impact & Risk \((front-half|Shape)\)' '## Impact & Risk (front-half)'
|
|
98
106
|
require_heading '## Checklist' '## Checklist'
|
|
99
107
|
if ! grep -qiE '(\*\*)?Risk tags:' "$BODY"; then
|
|
100
|
-
echo "FAIL [pr-template]: missing 'Risk tags:' line (
|
|
108
|
+
echo "FAIL [pr-template]: missing 'Risk tags:' line (Shape Impact & Risk)."
|
|
101
109
|
rc=1
|
|
102
110
|
fi
|
|
103
111
|
}
|
|
@@ -107,11 +115,11 @@ if [ "$PROFILE" = hub ]; then
|
|
|
107
115
|
case "$HEADREF" in
|
|
108
116
|
review/EP-*|"") check_hub_body ;; # artifact-review PR (or unknown head — stay strict)
|
|
109
117
|
*)
|
|
110
|
-
# tooling/code change to the hub itself — UNLESS it changes
|
|
118
|
+
# tooling/code change to the hub itself — UNLESS it changes Shape artifacts (epics/**),
|
|
111
119
|
# which must go through a review/EP-* PR. Without this guard a non-review head could carry an
|
|
112
|
-
# artifact change past the
|
|
120
|
+
# artifact change past the Shape review with only the code template.
|
|
113
121
|
if artifact_changed; then
|
|
114
|
-
echo "FAIL [pr-template]: head '${HEADREF}' changes
|
|
122
|
+
echo "FAIL [pr-template]: head '${HEADREF}' changes Shape artifacts (epics/**) but is not a review/EP-* branch — artifact changes must go through a review PR."
|
|
115
123
|
rc=1
|
|
116
124
|
else
|
|
117
125
|
check_code_body; KIND="hub-tooling"
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
# --profile code (default) — a Conventional-Commits subject "<type>: <description>", no trailing
|
|
5
5
|
# period (config.yaml build.pr_title_style: same_as_commit_subject; one task = one PR, the title is
|
|
6
6
|
# the squash-merge subject). Keep <type> in sync with cli/manifest.mjs COMMIT_TYPES.
|
|
7
|
-
# --profile hub — a
|
|
7
|
+
# --profile hub — a Shape artifact-review title "review: <artifact> (EP-<slug>)", the shape
|
|
8
8
|
# `yad gate open` creates (cli/gate.mjs) — BUT only for review/EP-* head branches. Every other
|
|
9
9
|
# hub PR is a tooling/code change to the hub itself and follows the code convention; pass the
|
|
10
10
|
# head ref via --head so the gate can tell the two apart (a tooling PR has no EP artifact to
|
|
11
11
|
# review). With no --head, the hub profile stays strict (requires the review shape).
|
|
12
|
-
# Branch name is not enough on its own: a non-review head that actually changes
|
|
12
|
+
# Branch name is not enough on its own: a non-review head that actually changes Shape
|
|
13
13
|
# artifacts (epics/**) would otherwise slip past the review workflow with a plain code title.
|
|
14
14
|
# Pass the PR's changed paths via --changed <file> (one path per line); when they touch epics/**
|
|
15
15
|
# on a non-review head the gate FAILS — artifact changes must go through a review/EP-* PR.
|
|
@@ -34,7 +34,7 @@ while [ $# -gt 0 ]; do
|
|
|
34
34
|
done
|
|
35
35
|
case "$PROFILE" in code|hub) ;; *) echo "FAIL [pr-title]: unknown --profile '$PROFILE' (code|hub)."; exit 1 ;; esac
|
|
36
36
|
|
|
37
|
-
# True when the PR changes a
|
|
37
|
+
# True when the PR changes a Shape artifact (anything under epics/**). Reads the --changed list
|
|
38
38
|
# of paths CI computed from the PR diff; with no list (direct caller / test) it reports false.
|
|
39
39
|
artifact_changed() { [ -n "$CHANGED" ] && [ -f "$CHANGED" ] && grep -qE '^epics/' "$CHANGED"; }
|
|
40
40
|
|
|
@@ -62,7 +62,7 @@ check_code_title() {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
if [ "$PROFILE" = hub ]; then
|
|
65
|
-
# review/EP-* head branch (or unknown head ref) =>
|
|
65
|
+
# review/EP-* head branch (or unknown head ref) => Shape artifact-review PR: 'review: <artifact> (EP-<slug>)'.
|
|
66
66
|
case "$HEADREF" in
|
|
67
67
|
review/EP-*|"")
|
|
68
68
|
if printf '%s' "$TITLE" | grep -qE '^review: .+ \(EP-[a-z0-9-]+\)$'; then
|
|
@@ -73,11 +73,11 @@ if [ "$PROFILE" = hub ]; then
|
|
|
73
73
|
exit 1
|
|
74
74
|
;;
|
|
75
75
|
*)
|
|
76
|
-
# Any other hub PR is a tooling/code change to the hub itself — UNLESS it changes
|
|
76
|
+
# Any other hub PR is a tooling/code change to the hub itself — UNLESS it changes Shape
|
|
77
77
|
# artifacts (epics/**), which must go through a review/EP-* PR. Without this guard a non-review
|
|
78
|
-
# head could carry an artifact change past the
|
|
78
|
+
# head could carry an artifact change past the Shape review with only a code title.
|
|
79
79
|
if artifact_changed; then
|
|
80
|
-
echo "FAIL [pr-title]: head '${HEADREF}' changes
|
|
80
|
+
echo "FAIL [pr-title]: head '${HEADREF}' changes Shape artifacts (epics/**) but is not a review/EP-* branch — artifact changes must go through a review PR."
|
|
81
81
|
exit 1
|
|
82
82
|
fi
|
|
83
83
|
# tooling only — fall through to the code convention.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- SDLC HUB PR template —
|
|
1
|
+
<!-- SDLC HUB PR template — Shape artifact review (epic / architecture+contract / ui-design / stories). -->
|
|
2
2
|
<!-- This PR is a REVIEW VEHICLE on the product hub, not a code merge. The file gate (yad-review-gate)
|
|
3
3
|
advances the step; do NOT rely on merging this PR to advance. Reviewers approve/comment here, then a
|
|
4
4
|
`yad-review-gate action: sync` pulls that into the file ledger. -->
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- SDLC HUB MR template —
|
|
1
|
+
<!-- SDLC HUB MR template — Shape artifact review (epic / architecture+contract / ui-design / stories). -->
|
|
2
2
|
<!-- This MR is a REVIEW VEHICLE on the product hub, not a code merge. The file gate (yad-review-gate)
|
|
3
3
|
advances the step; do NOT rely on merging this MR to advance. Reviewers approve/comment here, then a
|
|
4
4
|
`yad-review-gate action: sync` pulls that into the file ledger. -->
|
|
@@ -52,7 +52,7 @@ Writes nothing. This is the read-only sweep a human (or CI) runs to see the pict
|
|
|
52
52
|
|
|
53
53
|
### Step 2 — `refresh` (advisory, never silent)
|
|
54
54
|
For each flagged thread, **point the human at the fix** — open a reconcile change-epic with `yad-change`
|
|
55
|
-
(`kind: change`, threaded to the affected feature) to bring the
|
|
55
|
+
(`kind: change`, threaded to the affected feature) to bring the Shape artifacts back in step with what
|
|
56
56
|
shipped, and pay any open debt (update the artifacts + add a regression test, then set the
|
|
57
57
|
`reconcile-debt.json` entry `status: paid`). It never seeds the epic itself — opening a change-epic is a
|
|
58
58
|
human, triaged act (`yad-change` Step 2).
|
|
@@ -19,7 +19,7 @@ hand-craft issues.
|
|
|
19
19
|
Issues post to a **public** repo, so the reporter is **allowlist-first**. It sends ONLY:
|
|
20
20
|
- `yadflow` version, Node version, OS platform;
|
|
21
21
|
- tool state as booleans (`git` present; `gh` present + authenticated);
|
|
22
|
-
- the hub **platform enum** (`github` / `gitlab` / `
|
|
22
|
+
- the hub **platform enum** (`github` / `gitlab` / `local`) — never the URL, host, or roster;
|
|
23
23
|
- the `YadError` **code** + **hint**, and a **path-scrubbed** error message;
|
|
24
24
|
- the failing **command name and flag names only** — never flag values.
|
|
25
25
|
|