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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-review-companion
|
|
3
|
-
description: 'The fun, easy, transparent review companion for the SDLC review gates. Generates a 60-second AI "trailer" of what changed and where the risk is, deals a swipe-through deck of small review "cards", and runs a grounded chat where a reviewer asks anything and their questions become the review record — then records an engagement signal on the approval (verified vs none) and posts a friendly public nudge on a bare rubber-stamp. Works on the
|
|
3
|
+
description: 'The fun, easy, transparent review companion for the SDLC review gates. Generates a 60-second AI "trailer" of what changed and where the risk is, deals a swipe-through deck of small review "cards", and runs a grounded chat where a reviewer asks anything and their questions become the review record — then records an engagement signal on the approval (verified vs none) and posts a friendly public nudge on a bare rubber-stamp. Works on the Shape artifact-review PR/MR (yad gate) and the Build code PR/MR (yad review). Use when the user says "review this", "run the companion", "give me the trailer/cards", or wants reviewing to be less of a chore.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDLC — Review Companion (fun & easy, transparent review)
|
|
@@ -14,8 +14,8 @@ reviewers skip, and it makes review *quality* visible to the whole team.
|
|
|
14
14
|
> raises the cost of a bare rubber-stamp and shines a light on it; it never claims certainty. State that
|
|
15
15
|
> openly — do not oversell it.
|
|
16
16
|
|
|
17
|
-
This companion is the AI layer on top of [`yad-review-gate`](../yad-review-gate/SKILL.md) (
|
|
18
|
-
and [`yad-engineer-review`](../yad-engineer-review/SKILL.md) (
|
|
17
|
+
This companion is the AI layer on top of [`yad-review-gate`](../yad-review-gate/SKILL.md) (Shape)
|
|
18
|
+
and [`yad-engineer-review`](../yad-engineer-review/SKILL.md) (Build). The **gate** still owns the
|
|
19
19
|
predicate and advancement; the companion only enriches the *input* and records the *engagement* field.
|
|
20
20
|
The CLI never calls an LLM — **you** (this skill) generate the text and post it via the platform.
|
|
21
21
|
|
|
@@ -46,12 +46,12 @@ The CLI never calls an LLM — **you** (this skill) generate the text and post i
|
|
|
46
46
|
|
|
47
47
|
## On activation
|
|
48
48
|
|
|
49
|
-
Inputs: `epic` + `artifact` (
|
|
49
|
+
Inputs: `epic` + `artifact` (Shape) **or** `repo` + `pr` (Build); and the `action`
|
|
50
50
|
(`trailer` | `cards` | `chat` | `approve` | `nudge`, default the full flow).
|
|
51
51
|
|
|
52
|
-
1. **Get the grounding bundle.**
|
|
52
|
+
1. **Get the grounding bundle.** Shape: `yad gate review <epic> [artifact]` prints JSON with the
|
|
53
53
|
artifact path, risk tags, PR number, contract path, touched domains, repo code-map paths, and
|
|
54
|
-
`requireEngagement`.
|
|
54
|
+
`requireEngagement`. Build: `yad review chat --repo <r>` (see `yad-engineer-review`) provides the
|
|
55
55
|
diff + code-map grounding. Read the named files yourself — never invent content.
|
|
56
56
|
2. **Trailer.** Generate ≤6 lines (what / risk / read-time), grounded only in the bundle. Post it:
|
|
57
57
|
`yad gate trailer <epic> <artifact> --body "<text>" [--pr <n>]` (idempotent; re-run after edits).
|
|
@@ -81,7 +81,7 @@ Inputs: `epic` + `artifact` (front half) **or** `repo` + `pr` (back half); and t
|
|
|
81
81
|
proof. The strict-mode switch is `hub.review.requireEngagement` (off by default).
|
|
82
82
|
- **The companion never approves on a human's behalf and never merges.** It assists; the human acts.
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## local mode (no platform)
|
|
85
85
|
|
|
86
86
|
With no hub platform, there is no PR to post to: write the trailer to
|
|
87
87
|
`reviews/<artifact-base>--<date>--trailer.md` and the card/chat notes alongside the existing
|
|
@@ -11,15 +11,15 @@ UI, stories, test-cases) uses this exact gate. **No step advances until its revi
|
|
|
11
11
|
recorded as a file. The `analysis-review`, `epic`/`ui-design`, and `test-cases` reviews use the **base**
|
|
12
12
|
rule (owner + 1 reviewer); escalation applies only where `risk_tags` or per-repo routing call for it.
|
|
13
13
|
|
|
14
|
-
This gate is **swappable and file-driven**: it talks only through files. A
|
|
15
|
-
human act — recording an approval and `advance`, or (with
|
|
14
|
+
This gate is **swappable and file-driven**: it talks only through files. A Shape step advances only on a
|
|
15
|
+
human act — recording an approval and `advance`, or (with a verified ledger) **merging the approved,
|
|
16
16
|
fully-resolved review PR/MR**. It works the same whether a human or the `yad gate` CLI triggers it — the
|
|
17
17
|
trigger is a parameter, not a hardcoded human.
|
|
18
18
|
|
|
19
19
|
## Conventions
|
|
20
20
|
- `{project-root}` resolves from the project working directory.
|
|
21
21
|
- Operate on one epic: `{project-root}/epics/EP-<slug>/`.
|
|
22
|
-
- State files: `.sdlc/state.json`, `.sdlc/approvals.json`, `.sdlc/comments.json`, and (when the
|
|
22
|
+
- State files: `.sdlc/state.json`, `.sdlc/approvals.json`, `.sdlc/comments.json`, and (when the verified ledger is
|
|
23
23
|
used) `.sdlc/hub-prs.json`. Review records: `reviews/`.
|
|
24
24
|
- The artifact base name drops the extension (`epic.md` → `epic`; story `stories/...S01.md` → `stories-S01`).
|
|
25
25
|
|
|
@@ -54,13 +54,13 @@ touched `repos` — never a forked or copied gate.
|
|
|
54
54
|
|
|
55
55
|
### Step 2 — Dispatch on `action`
|
|
56
56
|
|
|
57
|
-
> **Check the mode first — in
|
|
58
|
-
> **
|
|
57
|
+
> **Check the mode first — in verified mode you write nothing to the ledger.** Read `.sdlc/hub.json`:
|
|
58
|
+
> **verified mode** is `platform` set AND `ledger: "verified"` — or, on a project that has not run `yad migrate` yet, `bridge_enabled` (or legacy `bridge`) `true`. `ledger` wins whenever it is present. Under the verified ledger
|
|
59
59
|
> the ledger is CI-owned — `ledger-guard` rejects any non-bot commit touching
|
|
60
60
|
> `epics/*/.sdlc/{state,approvals,comments,hub-prs}.json` or `epics/*/reviews/*.md`, local `yad gate
|
|
61
61
|
> sync` is advisory, and `yad gate ci --merged` writes the whole transition when the review PR merges.
|
|
62
|
-
> So every "set / append / write" instruction below is the **
|
|
63
|
-
> gate-sync CI** path. In
|
|
62
|
+
> So every "set / append / write" instruction below is the **local, or a platform with no
|
|
63
|
+
> gate-sync CI** path. In verified mode do the human-facing half — present the artifact, route the
|
|
64
64
|
> required reviewers, help the owner address comments — and let the platform PR/MR carry the review
|
|
65
65
|
> state; the approvals, comments, review records and the advance all land through CI at merge.
|
|
66
66
|
|
|
@@ -68,13 +68,13 @@ touched `repos` — never a forked or copied gate.
|
|
|
68
68
|
the rule above, and tell reviewers how to comment/approve. Set the step `status` to `in_review` and
|
|
69
69
|
`currentStep` to this step in `state.json` if not already. Do not advance.
|
|
70
70
|
|
|
71
|
-
If `.sdlc/hub.json` has a non-null `platform` and `
|
|
72
|
-
`.sdlc/hub.json` is the only source the CLI reads, see `
|
|
71
|
+
If `.sdlc/hub.json` has a non-null `platform` and `ledger: "verified"` (or, before `yad migrate`, `bridge_enabled: true` / legacy `bridge: true` —
|
|
72
|
+
`.sdlc/hub.json` is the only source the CLI reads, see `isVerifiedLedger` in `cli/manifest.mjs`), and `gh`/`glab`
|
|
73
73
|
is authenticated, **also open a review PR/MR on the hub** by invoking `yad-hub-bridge action: open`
|
|
74
74
|
(epic + artifact), and report the URL + required reviewers. **CI records the PR** in
|
|
75
75
|
`epics/<epic>/.sdlc/hub-prs.json` (`{step, artifact, platform, number, url, branch, lastSyncedAt}`) —
|
|
76
|
-
write that file yourself only on the
|
|
77
|
-
proceed **
|
|
76
|
+
write that file yourself only on the local path. Otherwise (no platform / disabled / no CLI)
|
|
77
|
+
proceed **local** exactly as before — no error. Opening the PR records no approvals and never
|
|
78
78
|
advances.
|
|
79
79
|
|
|
80
80
|
**`comment`** — Capture reviewer feedback. Append/create a review file
|
|
@@ -156,7 +156,7 @@ gate sync`), `sync` advances the step when Step 3 passes on a **merged**, fully-
|
|
|
156
156
|
|
|
157
157
|
### Step 3 — Gate predicate (the only path that advances)
|
|
158
158
|
The step may advance **iff ALL hold**:
|
|
159
|
-
1. `automation` is `human_approve` (it always is for
|
|
159
|
+
1. `automation` is `human_approve` (it always is for Shape steps) and the required approvals exist:
|
|
160
160
|
≥1 `owner` AND ≥`review_gate.default_reviewers` (1) distinct non-owner `reviewer`, AND — if the
|
|
161
161
|
step is escalated — ≥1 `domain-owner` for each touched domain.
|
|
162
162
|
2. The artifact has not changed since the latest approval round (no newer authored edit than the
|
|
@@ -172,10 +172,10 @@ If the predicate **passes**:
|
|
|
172
172
|
- Mark this review step `status: "done"`.
|
|
173
173
|
- **`stories-review`** is the end of the gating chain: set `currentStep: "ready-for-build"` (the Phase 3
|
|
174
174
|
handoff sentinel; intentionally not a `steps[]` entry) **and** open the parallel **`test-cases`** track
|
|
175
|
-
(set its step `blocked` → `in_progress`).
|
|
175
|
+
(set its step `blocked` → `in_progress`). Build can now start **and** the tester can work
|
|
176
176
|
`test-cases` at the same time.
|
|
177
177
|
- **`test-cases-review`** is the parallel track's gate: mark it `done` but **leave `currentStep` at
|
|
178
|
-
`ready-for-build`** — completing test cases must never pull the epic back from
|
|
178
|
+
`ready-for-build`** — completing test cases must never pull the epic back from Build.
|
|
179
179
|
- Any **other** review step: set the next step in `steps[]` from `blocked` to `in_progress` (authoring)
|
|
180
180
|
or `in_review`, and set `currentStep` to that next step.
|
|
181
181
|
- Write `state.json`. Report the advance and what the next authored artifact is (or that the epic is
|
|
@@ -187,7 +187,7 @@ PR only — against the `review/<epic>/<artifact>` branch, which must already ex
|
|
|
187
187
|
`yad open-pr` from it, which pushes it first). CI (`yad gate ci`) writes the `.sdlc/` + `reviews/`
|
|
188
188
|
records this skill describes. The skill's
|
|
189
189
|
job is the human half: presenting the artifact, helping the owner address comments, and narrating the
|
|
190
|
-
gate. Local `yad gate sync` is advisory in
|
|
190
|
+
gate. Local `yad gate sync` is advisory in verified mode (reads the platform, prints status, writes
|
|
191
191
|
nothing); a human must never commit gate-state files (the `ledger-guard` check rejects it, and the
|
|
192
192
|
`hooks/ledger-guard.sh` harness hook refuses an agent the edit up front, naming `yad gate open`
|
|
193
193
|
instead — see `yad-checks`). The single
|
|
@@ -210,11 +210,11 @@ platform PR/MR is the source of truth (native approvals + threads), and CI never
|
|
|
210
210
|
branch (so an in-flight approval is never dismissed and required checks never strand). On the human
|
|
211
211
|
**merge** CI re-reads approvals, advances the step, and flips the artifact `status:` on the **default
|
|
212
212
|
branch**. After a merge, `git checkout <default> && git pull` to see it. The predicate and the human
|
|
213
|
-
merge are unchanged — CI never approves and never merges.
|
|
213
|
+
merge are unchanged — CI never approves and never merges. Local mode (no platform) keeps the local
|
|
214
214
|
write path.
|
|
215
215
|
|
|
216
216
|
### Hard rules (build plan §1, §5)
|
|
217
|
-
- **The merge click is the human approval act.** A
|
|
217
|
+
- **The merge click is the human approval act.** A Shape step advances only when a human merges the
|
|
218
218
|
approved, fully-resolved review PR — there is no machine-driven advance. A step `locked: true` may not
|
|
219
219
|
be switched to `machine_advance`; refuse such a request.
|
|
220
220
|
- **Approvals are revoked when the reviewed artifact changes.** `sync` re-hashes the artifact (the locked
|
|
@@ -223,7 +223,7 @@ write path.
|
|
|
223
223
|
- The gate talks only through `.sdlc/` and `reviews/` files — never hidden state.
|
|
224
224
|
- **The platform is an input path only.** `open`/`sync` use the local user's own `gh`/`glab` (no stored
|
|
225
225
|
tokens), and the **file ledger remains the source of truth** — the Step 3 predicate is unchanged
|
|
226
|
-
whether approvals arrive manually or via `sync`. With no hub platform / no CLI, the gate runs
|
|
226
|
+
whether approvals arrive manually or via `sync`. With no hub platform / no CLI, the gate runs local
|
|
227
227
|
with no error (record approvals manually and `advance`).
|
|
228
228
|
|
|
229
229
|
## Reference
|
|
@@ -77,8 +77,8 @@ marker, and the gate **excludes marked threads** from the unresolved-thread bloc
|
|
|
77
77
|
not "resolve to pass" — it ignores them). A reviewer's *genuine* concern is posted **without** the
|
|
78
78
|
marker and blocks normally, exactly as a `CHANGES_REQUESTED` or any unresolved human thread does.
|
|
79
79
|
|
|
80
|
-
## Platform-backed input (the
|
|
81
|
-
When the hub has a platform (`.sdlc/hub.json`) and the
|
|
80
|
+
## Platform-backed input (the verified ledger)
|
|
81
|
+
When the hub has a platform (`.sdlc/hub.json`) and the ledger is verified, reviewers can approve/comment
|
|
82
82
|
on a real PR/MR instead of (or as well as) the skill recording it directly. `action: sync`
|
|
83
83
|
(`yad-hub-bridge`) reads that platform state with the reviewer's own `gh`/`glab` and writes the **same**
|
|
84
84
|
`approvals.json` / `comments.json` / `reviews/*.md` records the manual path writes — bridge approvals
|
|
@@ -99,7 +99,7 @@ approvals regardless of how they were recorded.
|
|
|
99
99
|
new ones (see `../yad-hub-bridge/references/bridge.md` → "Idempotent re-sync").
|
|
100
100
|
- The architecture+contract staleness rule applies to bridge approvals too: a re-lock discards bridge
|
|
101
101
|
approvals dated before the new lock.
|
|
102
|
-
- No platform / no CLI → the gate runs
|
|
102
|
+
- No platform / no CLI → the gate runs local with no error. Detail: `../yad-hub-bridge/references/bridge.md`.
|
|
103
103
|
|
|
104
104
|
## Why this shape
|
|
105
105
|
- Owner + 1 reviewer keeps review load low on a small team (design priority 2) while still requiring
|
package/skills/yad-run/SKILL.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-run
|
|
3
|
-
description: 'Phase 4 (automation) — the orchestrator that makes the second dial real. Drives a story''s
|
|
3
|
+
description: 'Phase 4 (automation) — the orchestrator that makes the second dial real. Drives a story''s Build loop (spec → tasks → implement → checks) in one code repo, reading each step''s automation dial from build-state: on machine_advance it advances on its own, on human_approve it stops for a human. Records every run in the trust log (the evidence base for earning automation). Realizes Step B: when checks is earned, a clean gate pass auto-advances to engineer-review; any failure, scope overrun, or contract-surface touch HALTS and pulls in a human. Also sets a step''s dial (gated by trust evidence) and flips the system-wide kill switch. Never advances a Shape step or the engineer review. Use when the user says "run Build", "advance story <id>", "set the checks dial", or "kill switch".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDLC — Run (Phase 4 orchestrator)
|
|
7
7
|
|
|
8
8
|
**Goal:** Be the **engine** that the `automation` dial finally drives. Until Phase 4 the dial was inert
|
|
9
|
-
config; this skill reads it and acts. For ONE story in ONE code repo, walk the
|
|
9
|
+
config; this skill reads it and acts. For ONE story in ONE code repo, walk the Build steps —
|
|
10
10
|
`spec → tasks → implement → checks → engineer-review` — and at each step either **advance on its own**
|
|
11
11
|
(dial `machine_advance`, step succeeded) or **stop for a human** (dial `human_approve`, or any halt
|
|
12
12
|
condition). Every run is recorded in the **trust log**, the evidence that earns a step its automation.
|
|
13
13
|
|
|
14
14
|
This is the most dangerous skill in the system, so it is built to **halt-and-escalate over guess**:
|
|
15
15
|
a failing check, ambiguity, a scope overrun, or a contract-surface touch stops the loop and pulls in a
|
|
16
|
-
human regardless of any dial. The **
|
|
16
|
+
human regardless of any dial. The **Shape steps and the engineer review never auto-advance** — they
|
|
17
17
|
are not in `automation.back_steps` and `engineer-review` is `locked`.
|
|
18
18
|
|
|
19
19
|
Earned so far: **`checks`** (Step B, Phase 4a — safest, a gate's pass/fail was never human judgment)
|
|
@@ -30,14 +30,14 @@ signal to seed them from, so they are earned only on real runs.
|
|
|
30
30
|
(`config.yaml` `build.code_repos_root`). Operate inside them with absolute paths.
|
|
31
31
|
- Automation config is `skills/sdlc/config.yaml` → `automation:` (`back_steps`, `default`,
|
|
32
32
|
`trust_threshold`, `locked_steps`, `kill_switch`).
|
|
33
|
-
- Per-story
|
|
33
|
+
- Per-story Build state: `epics/<epic>/.sdlc/build-state/<story-id>.json` (per repo).
|
|
34
34
|
- Trust ledger: **shard-then-fold** — each run is its own shard file
|
|
35
35
|
`epics/<epic>/.sdlc/trust-log/<story>-<repo>-<step>-<uid>.json` (a fresh `uid` per run, so concurrent
|
|
36
36
|
writers never conflict); readers UNION the folded `trust-log.json` with every loose shard, and
|
|
37
37
|
`yad tidy up` folds finished shards back into `trust-log.json`. Schemas:
|
|
38
38
|
`../yad-epic/references/state-schema.md`.
|
|
39
|
-
- These machine-written
|
|
40
|
-
committed by **`yad checkpoint`** — the
|
|
39
|
+
- These machine-written Build files (`build-state/<story>.json`, the `trust-log/` shards) are
|
|
40
|
+
committed by **`yad checkpoint`** — the Build analogue of the Shape `yad gate` sync; the loop
|
|
41
41
|
calls it each iteration so the state is durable and shared without a human commit. (`yad checkpoint`
|
|
42
42
|
stages the shard dirs; `yad tidy up` later folds finished shards — loose objects + `git gc`.)
|
|
43
43
|
- The orchestrator **calls the existing step skills unchanged** — `yad-spec` (A), `yad-implement`
|
|
@@ -86,7 +86,7 @@ Walk the steps for `repo` starting at `from`/`currentStep`. For each step:
|
|
|
86
86
|
|
|
87
87
|
**Commit the machine-written state.** After each iteration's writes (the trust-log shard in 2 and the
|
|
88
88
|
build-state change in 4), run `yad checkpoint --push` from `{project-root}`. It commits *only* the
|
|
89
|
-
`trust-log/` shards + `build-state/<story>.json` (never a
|
|
89
|
+
`trust-log/` shards + `build-state/<story>.json` (never a Shape gate file) as one `chore(hub): …`
|
|
90
90
|
audit-trail commit, and only ever on the default branch. It is a safe no-op when nothing changed, so
|
|
91
91
|
call it every iteration — teammates don't review these machine writes, but CI and `yad status` on
|
|
92
92
|
other machines must see current trust evidence. Never run it off the default branch (it will refuse):
|
|
@@ -94,8 +94,8 @@ an unpushed or branch-stranded trust log quietly undermines the "earned automati
|
|
|
94
94
|
|
|
95
95
|
### `action: set-dial` — earn (or revert) a step's automation
|
|
96
96
|
Flip `step`'s `automation` to `to` in build-state. Enforce, in order:
|
|
97
|
-
- **Refuse** if `step` is in `automation.locked_steps` or is a
|
|
98
|
-
these can never be `machine_advance` (
|
|
97
|
+
- **Refuse** if `step` is in `automation.locked_steps` or is a Shape step or `engineer-review` —
|
|
98
|
+
these can never be `machine_advance` (Shape step lock, build plan §E). Report the refusal reason.
|
|
99
99
|
- For `to: machine_advance`, **refuse unless the trust threshold is met**: the step's slice of the trust
|
|
100
100
|
ledger — the **union** of the folded `trust-log.json` `runs` PLUS every `trust-log/` shard, filtered to
|
|
101
101
|
this step (and repo) — has `>= trust_threshold.min_runs` entries AND the fraction with
|
|
@@ -117,7 +117,7 @@ reversible (build plan §Safety). Report the new state and that `yad-status` wil
|
|
|
117
117
|
one command and no code change.
|
|
118
118
|
- **Halt-and-escalate beats guess.** A failing check, ambiguity, scope overrun, or contract-surface
|
|
119
119
|
touch halts the loop and pulls in a human, regardless of the dial.
|
|
120
|
-
- **
|
|
120
|
+
- **Shape steps and the engineer review never auto-advance.** They are not in `back_steps`;
|
|
121
121
|
`engineer-review` is `locked`; the kill switch and locks always override the dial.
|
|
122
122
|
- **The orchestrator never changes what a step does** — it calls the existing skills and owns only the
|
|
123
123
|
advance decision and the trust record.
|
|
@@ -4,7 +4,7 @@ This is the detail behind `SKILL.md`. It restates the orchestration so the skill
|
|
|
4
4
|
and pins down the two judgments the skill makes: **what trust verdict to record** and **when a step
|
|
5
5
|
has earned `machine_advance`**.
|
|
6
6
|
|
|
7
|
-
## The
|
|
7
|
+
## The Build steps
|
|
8
8
|
|
|
9
9
|
From `config.yaml` `automation.back_steps` plus the human merge gate:
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ cfg = config.yaml.automation
|
|
|
23
23
|
bs = build-state/<story>.json.repos[<repo>] # create from defaults if absent
|
|
24
24
|
step = from or bs.currentStep
|
|
25
25
|
|
|
26
|
-
while step is a
|
|
26
|
+
while step is a Build step (not engineer-review):
|
|
27
27
|
result = run_step_skill(step) # yad-spec | yad-implement | yad-checks
|
|
28
28
|
|
|
29
29
|
signals = derive_signals(step, result) # see "Deriving signals"
|
|
@@ -50,14 +50,14 @@ nudge; otherwise `human`. Persist build-state after every transition so a halt l
|
|
|
50
50
|
resumable record.
|
|
51
51
|
|
|
52
52
|
`checkpoint` = run `yad checkpoint --push` from `{project-root}`. It commits the machine-written
|
|
53
|
-
|
|
53
|
+
Build ledgers (in this loop, the loose `trust-log/` shards this run wrote + `build-state/<story>.json`;
|
|
54
54
|
also the `build-log/` shards at engineer-review) — the shard dirs are what checkpoint stages, the same
|
|
55
55
|
way `git gc` folds loose objects later (`yad tidy up` folds finished shards into the folded
|
|
56
56
|
`trust-log.json` / `build-log.json`) — plus any story `status:` flip (→ in-build/shipped) once that
|
|
57
57
|
story has a build-log ship (#112) — as one
|
|
58
|
-
`chore(hub): sync
|
|
58
|
+
`chore(hub): sync Build state — <epic>/<story> by @<login> [skip ci]`
|
|
59
59
|
audit-trail commit, on the default branch only,
|
|
60
|
-
staging *only* those files by an explicit allowlist (never a
|
|
60
|
+
staging *only* those files by an explicit allowlist (never a Shape gate file — so `ledger-guard`
|
|
61
61
|
never trips). It is idempotent (a no-op when nothing changed), so calling it after every transition —
|
|
62
62
|
including a halt — is safe and keeps the shared trust evidence current for CI, teammates, and
|
|
63
63
|
`yad status` on other machines. It refuses to run off the default branch (an unsigned `[skip ci]`
|
|
@@ -73,7 +73,7 @@ if step in cfg.locked_steps: eff = "human_approve"
|
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
So a kill switch, a `locked` flag, or membership in `locked_steps` forces a stop no matter what the
|
|
76
|
-
per-step dial says. `engineer-review` and the five
|
|
76
|
+
per-step dial says. `engineer-review` and the five Shape steps are covered by `locked` / `locked_steps`.
|
|
77
77
|
|
|
78
78
|
## Deriving signals & the provisional verdict
|
|
79
79
|
|
|
@@ -93,7 +93,7 @@ finalizes the entry — a human always has the last word on the trust signal.
|
|
|
93
93
|
- `contract_touch` — `true` if the diff touched the locked contract surface without an upstream
|
|
94
94
|
re-lock (routes back to the architecture gate).
|
|
95
95
|
|
|
96
|
-
`derive_verdict(signals)` — the same three-way shape for every
|
|
96
|
+
`derive_verdict(signals)` — the same three-way shape for every Build step:
|
|
97
97
|
```
|
|
98
98
|
edited = human_edited_diff or human_edited_spec or task_rescoped
|
|
99
99
|
if checks == "fail" or scope_overrun or contract_touch: verdict = "rejected"
|
|
@@ -134,7 +134,7 @@ Reverting (`to: human_approve`) is never gated — automation must be reversible
|
|
|
134
134
|
## What stays human, always
|
|
135
135
|
|
|
136
136
|
- `engineer-review` — the merge gate. `yad-run` always stops here and hands to `yad-engineer-review`.
|
|
137
|
-
- The five
|
|
137
|
+
- The five Shape steps (`epic`, `architecture`, `ui-design`, `stories`, `test-cases`) — not in
|
|
138
138
|
`back_steps`, in `locked_steps`; the dial-setter refuses them.
|
|
139
139
|
- Any contract-surface change — halts the loop and routes back to the architecture gate, regardless of
|
|
140
140
|
the dial.
|
package/skills/yad-ship/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-ship
|
|
3
|
-
description: 'Build
|
|
3
|
+
description: 'Build helper of the gated SDLC — commit AND open the task PR/MR in one step. A thin orchestration over yad-commit then yad-open-pr: commit the staged atomic change by the conventions (Conventional-Commits subject, Task → Contract-Change trailers, an OPTIONAL Co-Authored-By footer that is OFF by default and added only when --ai <id> is explicitly passed, ≤3-file atomic guard), then push the branch and open the PR/MR from the committed template with the roster auto-assigned. The PR step runs ONLY if the commit lands (a failed commit, tripped guard, or --dry-run stops before pushing). Drives the `yad ship` CLI; never merges. Use when the user says "ship this task", "commit and open the PR", or "commit and raise the MR". (For the engineer review + merge, use yad-engineer-review.)'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC — Commit + Open PR/MR (
|
|
6
|
+
# SDLC — Commit + Open PR/MR (Build helper)
|
|
7
7
|
|
|
8
|
-
**Goal:** Do the two routine
|
|
8
|
+
**Goal:** Do the two routine Build hand-actions for ONE atomic task in a single step — **commit by
|
|
9
9
|
convention, then open the task PR/MR** — so an implemented diff becomes a reviewable PR/MR without two
|
|
10
10
|
separate invocations. It is a thin wrapper over `yad-commit` and `yad-open-pr`; it holds no logic of
|
|
11
11
|
its own and **never merges**. The engineer review + merge are Step E (`yad-engineer-review`).
|
|
@@ -23,7 +23,7 @@ its own and **never merges**. The engineer review + merge are Step E (`yad-engin
|
|
|
23
23
|
- **Order matters:** the PR/MR is opened **only if the commit lands**. A failed commit, a tripped
|
|
24
24
|
atomic guard, or `--dry-run` stops the step before anything is pushed.
|
|
25
25
|
- **Stage-aware on the product hub** (via `yad-open-pr`): on a `review/EP-*` branch `ship` opens the
|
|
26
|
-
|
|
26
|
+
Shape **artifact-review** PR (delegating to `yad gate open` — `--title` is ignored); on any
|
|
27
27
|
other hub branch it opens the **code-task** PR from the bundled code-task template. In a code repo
|
|
28
28
|
it is unchanged.
|
|
29
29
|
|
package/skills/yad-spec/SKILL.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-spec
|
|
3
|
-
description: 'Build
|
|
3
|
+
description: 'Build Step A of the gated SDLC. For one ready-for-build story and one of its repos, run the heavy Spec Kit ceremony ONCE (specify → clarify → plan → analyze → checklist → tasks) inside that code repo, writing specs/<story-id>/ in Spec Kit''s own layout. Drives /speckit.* as harness slash-commands when installed; authors the same files by hand and records speckit: not-installed when absent. References the locked contract — never re-invents the surface. Writes link.md back to the story. Never auto-advances. Use when the user says "spec story <id> in <repo>" or after a story is ready-for-build.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC — Author Spec (
|
|
6
|
+
# SDLC — Author Spec (Build Step A)
|
|
7
7
|
|
|
8
8
|
**Goal:** Turn ONE `ready-for-build` story into a per-repo Spec Kit spec/plan/tasks inside that
|
|
9
9
|
story's code repo. The heavy spec ceremony runs **once per story per repo**; the light
|
|
10
10
|
tasks → implement loop is **Step B** (`yad-implement`). This step **never re-locks the contract** —
|
|
11
11
|
the cross-repo surface is owned upstream by the architecture gate (build plan §A, Cross-cutting
|
|
12
|
-
"Heavy spec once per story, light loop per task"). It does not advance the
|
|
12
|
+
"Heavy spec once per story, light loop per task"). It does not advance the Shape state machine;
|
|
13
13
|
when driven by the orchestrator (`yad-run`, Phase 4) it records a `spec`/`tasks` trust signal
|
|
14
|
-
(Step 8) — but it never auto-advances a contract change or a
|
|
14
|
+
(Step 8) — but it never auto-advances a contract change or a Shape step.
|
|
15
15
|
|
|
16
16
|
Spec Kit is driven as **harness slash-commands** (`/speckit.*`), not a subprocess CLI (Phase 0
|
|
17
17
|
Deviation 3). When Spec Kit is not installed, the same files are hand-authored in Spec Kit's exact
|
|
@@ -43,11 +43,10 @@ is the same graceful-degradation pattern `yad-ui` uses for Impeccable.
|
|
|
43
43
|
|
|
44
44
|
### Step 1 — Resolve the story and check readiness
|
|
45
45
|
Read `{project-root}/epics/<epic>/.sdlc/state.json`. Proceed only when
|
|
46
|
-
`currentStep == "ready-for-build"` (the gating
|
|
47
|
-
The **`test-cases` track may still be `in_progress`**: it is parallel and non-blocking, so the
|
|
48
|
-
half runs alongside it — its status does not affect readiness here. Read the story file
|
|
46
|
+
`currentStep == "ready-for-build"` (the gating Shape — through the **stories** gate — is `done`).
|
|
47
|
+
The **`test-cases` track may still be `in_progress`**: it is parallel and non-blocking, so Build runs alongside it — its status does not affect readiness here. Read the story file
|
|
49
48
|
`epics/<epic>/stories/<story>.md`; confirm `repo` is in its `repos`. If the epic is not ready, STOP
|
|
50
|
-
and point the user at `yad-status`. **Do not mutate
|
|
49
|
+
and point the user at `yad-status`. **Do not mutate Shape state** — `ready-for-build` semantics
|
|
51
50
|
stay intact.
|
|
52
51
|
|
|
53
52
|
### Step 2 — Resolve the target code repo
|
|
@@ -87,13 +86,13 @@ frontmatter linking the spec back to the product repo: `story`, `epic`, `repo`,
|
|
|
87
86
|
in the code repo), `speckit` (`installed | not-installed`), `generated` (date). This `link.md` plus the
|
|
88
87
|
spec folder is the authoritative record that this story's spec exists.
|
|
89
88
|
|
|
90
|
-
### Step 7 — Stop (
|
|
89
|
+
### Step 7 — Stop (Shape state untouched)
|
|
91
90
|
Report: the spec folder path, the files written, whether Spec Kit was used, the task count from
|
|
92
91
|
`tasks.md`, and that the next action is **Step B — `yad-implement`**. Do **not** edit the epic's
|
|
93
|
-
`state.json`, `approvals.json`, or `contract-lock.json`. Step A is a generation step, not a
|
|
92
|
+
`state.json`, `approvals.json`, or `contract-lock.json`. Step A is a generation step, not a Shape gate.
|
|
94
93
|
|
|
95
94
|
### Step 8 — Record the `spec` trust signal (Phase 4b)
|
|
96
|
-
When this step runs under the orchestrator (`yad-run`), the generated spec is a
|
|
95
|
+
When this step runs under the orchestrator (`yad-run`), the generated spec is a Build run that the
|
|
97
96
|
trust log measures (it is the evidence that could later earn the `spec` step a `machine_advance`). The
|
|
98
97
|
verdict is **anchored to the human who accepts the spec**, never self-graded:
|
|
99
98
|
- the human approves the generated `specs/<story>/` untouched → `approved-unchanged`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-status
|
|
3
|
-
description: 'Read-only view of an SDLC epic: prints the current step, each step''s dials (assistance/automation) and status, and which approvals are still required at the active gate. For stories in
|
|
3
|
+
description: 'Read-only view of an SDLC epic: prints the current step, each step''s dials (assistance/automation) and status, and which approvals are still required at the active gate. For stories in Build it also prints each Build step''s automation dial, status, and trust record (runs / % approved-unchanged / whether it clears the threshold to be earned), plus the system-wide kill-switch state — so the team can see WHY a step is automated and reverse it with evidence. Also prints the cross-cutting personal skills-log roll-up from the LOCAL-ONLY learning ledger (gitignored, never committed/pushed — the local learner''s own learning, by stage). Surfaces the Phase 5 instrumentation signals: per-step "earned but manual" (nudge cost) and, across multiple epics, a fleet roll-up (scale of read). Use when the user says "yad status", "where is epic EP-...", "what is blocking the gate", "show the trust record", "team skills", or "fleet status".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDLC — Status (read-only)
|
|
@@ -20,7 +20,7 @@ report all if the user asked for an overview).
|
|
|
20
20
|
|
|
21
21
|
### Step 2 — Read state
|
|
22
22
|
Read `.sdlc/state.json`, `.sdlc/approvals.json`, `epic.md` frontmatter (for `repos`), and — if present
|
|
23
|
-
— `.sdlc/contract-lock.json`. For
|
|
23
|
+
— `.sdlc/contract-lock.json`. For Build (Phase 4), also read — if present — every
|
|
24
24
|
`.sdlc/build-state/<story-id>.json`, and the trust ledger read as the **union** of the folded
|
|
25
25
|
`.sdlc/trust-log.json` `runs` PLUS every loose `.sdlc/trust-log/` shard (concatenate — every shard is a
|
|
26
26
|
distinct run; never dedup by story/repo/step — but DO skip a shard whose full identity
|
|
@@ -40,13 +40,13 @@ Print, in this order:
|
|
|
40
40
|
absent) — followed by `epicId`, then `status` from `epic.md` frontmatter, `currentStep`, and `repos`
|
|
41
41
|
(the touched domains). Example: `Defect EP-checkout-queue-filter — draft @ stories`. A bug is a defect
|
|
42
42
|
(`kind: defect`) — there is no separate noun. This is presentation only; the artifact is still an epic.
|
|
43
|
-
2. **Steps table** — for every
|
|
43
|
+
2. **Steps table** — for every Shape step in `steps[]` order (10, or 12 when the optional analysis step
|
|
44
44
|
was run): `id`, `type`, `status`, `assistance`, `automation`, `locked`, and `risk_tags`. Mark the
|
|
45
45
|
`currentStep` with `→`. The gating chain is `[analysis → analysis-review →] epic → epic-review →
|
|
46
46
|
architecture → architecture-review → ui-design → ui-design-review → stories → stories-review` →
|
|
47
47
|
**`ready-for-build`** (the bracketed `analysis` prefix is present only when `yad-analysis` seeded it).
|
|
48
48
|
`test-cases → test-cases-review` is a **parallel, non-blocking track**: it opens when `stories-review`
|
|
49
|
-
passes and runs alongside
|
|
49
|
+
passes and runs alongside Build, so when `currentStep` is `ready-for-build` the `test-cases`
|
|
50
50
|
step may still be `in_progress`/`in_review` — show its status, and note "parallel" so it is clear it
|
|
51
51
|
does not gate the build. Always render exactly the steps present in `steps[]`.
|
|
52
52
|
- **Skipped (N/A) steps:** the optional `ui-design` step may be marked N/A for an epic with no
|
|
@@ -78,25 +78,25 @@ Print, in this order:
|
|
|
78
78
|
(and, when at/after `architecture-review`, whether the current surface still matches it).
|
|
79
79
|
5. **Stories** — if `stories/` has files, list each story `id` and its `repos` tags.
|
|
80
80
|
6. **Files** — list the review records present under `reviews/` for the current artifact.
|
|
81
|
-
7. **Build
|
|
82
|
-
each such story and each of its repos print the
|
|
81
|
+
7. **Build (per story, per repo)** — if any `.sdlc/build-state/<story-id>.json` exists, then for
|
|
82
|
+
each such story and each of its repos print the Build chain
|
|
83
83
|
`spec → tasks → implement → checks → engineer-review`, marking each step's `status`, its
|
|
84
84
|
`automation` dial, and `locked`. Mark that repo's `currentStep` with `→`. This shows, at a glance,
|
|
85
|
-
which
|
|
85
|
+
which Build steps are automated and where a run is waiting. (For the single *next* build sub-step to
|
|
86
86
|
take per story/repo — rather than this full status view — point the user at `yad next <epic>`, which
|
|
87
87
|
reads the same `build-state` files.)
|
|
88
88
|
8. **Automation & trust** — print the system-wide **kill switch** state from `config.yaml`
|
|
89
89
|
`automation.kill_switch` (when `on`, note that every step is forced to `human_approve`). Then, for
|
|
90
|
-
each
|
|
90
|
+
each Build step that has entries in the trust ledger — the **union** of the folded
|
|
91
91
|
`.sdlc/trust-log.json` `runs` plus every loose `.sdlc/trust-log/` shard — print its **trust record**:
|
|
92
92
|
number of runs, the fraction with `verdict == "approved-unchanged"`, and whether that clears
|
|
93
93
|
`automation.trust_threshold` (`min_runs`, `min_approved_unchanged`) — i.e. whether the step is
|
|
94
94
|
**earned** (eligible to be flipped to `machine_advance`) or still **gathering evidence**. Restate
|
|
95
95
|
the predicate (self-contained): `earned = runs >= min_runs AND unchanged/runs >= min_approved_unchanged`.
|
|
96
|
-
Never recommend flipping a locked step or a
|
|
96
|
+
Never recommend flipping a locked step or a Shape step — those can never be `machine_advance`.
|
|
97
97
|
|
|
98
|
-
**Nudge-cost signal (Phase 5 instrumentation).** For each
|
|
99
|
-
is still `human_approve`** (and it is not locked / not a
|
|
98
|
+
**Nudge-cost signal (Phase 5 instrumentation).** For each Build step that is **earned but its dial
|
|
99
|
+
is still `human_approve`** (and it is not locked / not a Shape step), flag it:
|
|
100
100
|
`⚠ earned but manual — could be machine_advance`. This is the *nudge cost* the Phase 5 trigger
|
|
101
101
|
watches: automation that is proven safe but still hand-started. It is a read-only observation, not a
|
|
102
102
|
recommendation to flip — earning the evidence and flipping the dial stay deliberate human acts
|
|
@@ -117,10 +117,10 @@ Print, in this order:
|
|
|
117
117
|
|
|
118
118
|
10. **Fleet roll-up (overview only).** When the user asked for an overview, or more than one epic exists
|
|
119
119
|
under `{project-root}/epics/`, print a one-line-per-epic roll-up across the fleet: each epic's
|
|
120
|
-
`currentStep` (
|
|
120
|
+
`currentStep` (Shape gate) and, for stories in Build, a count of Build steps **waiting
|
|
121
121
|
at a human gate** and of steps flagged **earned-but-manual**, plus a **local skills-log** count (records
|
|
122
122
|
in the local-only `learning-records.json`: learned / in-progress). Close with fleet totals (epics at
|
|
123
|
-
each
|
|
123
|
+
each Shape gate; total earned-but-manual Build steps; total concepts learned locally across the fleet).
|
|
124
124
|
This is the
|
|
125
125
|
*scale-of-read* signal the Phase 5 trigger watches — when this roll-up stops fitting in one glance,
|
|
126
126
|
that is the measured bottleneck. Still strictly read-only; it only scans the per-epic files.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-stories
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Shape step 7 of the gated SDLC. With the pm, break the approved epic into user stories, each tagged with the repos that must implement it. Assigns zero-padded EP-<slug>-S0N IDs and writes one file per story under stories/. Reads epic + architecture + contract + UI as input. Never auto-advances — hands off to the team review gate (per-repo reviewer routing). Use when the user says "author the stories" or after the UI gate passes.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# SDLC — Author Stories (
|
|
6
|
+
# SDLC — Author Stories (Shape step 7)
|
|
7
7
|
|
|
8
8
|
**Goal:** Break an approved epic into human-authored, AI-assisted user stories, each with a stable
|
|
9
|
-
`EP-<slug>-S0N` ID and a `repos` tag listing which repos must implement it. This is a **
|
|
9
|
+
`EP-<slug>-S0N` ID and a `repos` tag listing which repos must implement it. This is a **Shape step**:
|
|
10
10
|
human-authored with AI assist, **never auto-advances**. When the stories are drafted, control passes
|
|
11
11
|
to `yad-review-gate`, which routes **per-repo reviewers** (each repo's engineer reviews the stories
|
|
12
12
|
touching their repo).
|
|
@@ -38,7 +38,7 @@ Open the stories authoring branch `stories/EP-<slug>` per the shared procedure
|
|
|
38
38
|
(`../yad-epic/references/state-schema.md` → "Authoring branches"): git-safe (skip with a note
|
|
39
39
|
if `{project-root}` is not a git work tree), check out the branch if it exists, else create it from the
|
|
40
40
|
hub's default branch. Author and commit the story files under `stories/` on it. This is **distinct**
|
|
41
|
-
from the
|
|
41
|
+
from the verified ledger's `review/…` branch.
|
|
42
42
|
|
|
43
43
|
### Step 2 — Read inputs
|
|
44
44
|
Read `epic.md` (scope, acceptance signals, `repos`), `architecture.md` (components by repo, flows),
|
|
@@ -102,9 +102,9 @@ As a <role>, I want <capability>, so that <outcome>.
|
|
|
102
102
|
|
|
103
103
|
### Step 6 — Advance the authoring step (NOT the gate)
|
|
104
104
|
**Check the mode first — the two modes have opposite instructions here.** Read `.sdlc/hub.json`:
|
|
105
|
-
**
|
|
105
|
+
**verified mode** is `platform` set AND `ledger: "verified"` — or, on a project that has not run `yad migrate` yet, `bridge_enabled` (or legacy `bridge`) `true`. `ledger` wins whenever it is present.
|
|
106
106
|
|
|
107
|
-
**
|
|
107
|
+
**verified mode — do NOT write `state.json`.** The ledger is CI-owned: the `ledger-guard` check rejects
|
|
108
108
|
any non-bot commit touching `epics/*/.sdlc/{state,approvals,comments,hub-prs}.json` or
|
|
109
109
|
`epics/*/reviews/*.md`, `yad gate open` deliberately skips this write for the same reason, and
|
|
110
110
|
`yad gate ci --merged` performs the whole transition when the review PR merges. Making the edit here
|
|
@@ -112,26 +112,26 @@ fails the gate if it rides the review PR, and desynchronises the ledger CI is ab
|
|
|
112
112
|
is pushed around the gate. Commit **the story files under `stories/` only** — nothing else
|
|
113
113
|
under `.sdlc/` — then hand off to `yad-review-gate`.
|
|
114
114
|
|
|
115
|
-
**Otherwise —
|
|
115
|
+
**Otherwise — local, or a platform with no gate-sync CI — write it.** In `state.json`: set
|
|
116
116
|
`stories.status: "done"`, set `stories-review.status: "in_review"`, and set
|
|
117
117
|
`currentStep: "stories-review"`. Write `state.json`. Do **not** touch `approvals.json`.
|
|
118
118
|
|
|
119
|
-
> **
|
|
119
|
+
> **local branch only.** Since 3.11 the CLI also closes the authoring step when its review gate
|
|
120
120
|
> opens or advances, so this edit is a no-op once `yad gate open` has run. A `stories` step left
|
|
121
121
|
> `in_progress` behind a passed `stories-review` used to block the parallel `test-cases` track
|
|
122
|
-
> (`YAD-STATE-005`). In
|
|
122
|
+
> (`YAD-STATE-005`). In verified mode `gate open` writes nothing and local `gate sync` is advisory —
|
|
123
123
|
> `gate ci` closes the step at merge.
|
|
124
124
|
|
|
125
125
|
### Step 7 — Stop at the gate (do NOT advance)
|
|
126
126
|
Report: the story IDs created, the repos each touches, and that the next action is **review** via
|
|
127
127
|
`yad-review-gate`. Note that this review routes **per-repo reviewers**: owner + 1 reviewer **plus**, for
|
|
128
128
|
each repo appearing in any story's `repos`, a `domain-owner` approval for that repo. When this gate
|
|
129
|
-
passes the epic becomes **`ready-for-build`** —
|
|
129
|
+
passes the epic becomes **`ready-for-build`** — Build can start **and** the parallel
|
|
130
130
|
**`test-cases`** track opens for the tester (`yad-test-cases`); the two run at the same time. **Never record
|
|
131
|
-
approval here.**
|
|
131
|
+
approval here.** Shape steps do not auto-advance. When the hub has a platform, the gate opens a review
|
|
132
132
|
PR on the hub (via `yad-hub-bridge`, with a `domain:<repo>` label per touched repo) and
|
|
133
133
|
`yad-review-gate action: sync` pulls platform approvals/comments into the ledger; otherwise the review
|
|
134
|
-
is recorded
|
|
134
|
+
is recorded local.
|
|
135
135
|
|
|
136
136
|
## Reference
|
|
137
137
|
- Story frontmatter and body template: `references/story-schema.md`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Story schema
|
|
2
2
|
|
|
3
|
-
Each story authored at
|
|
3
|
+
Each story authored at Shape step 7 is one Markdown file under `epics/EP-<slug>/stories/`, named
|
|
4
4
|
`EP-<slug>-S0N.md` (zero-padded, never renamed).
|
|
5
5
|
|
|
6
6
|
## Frontmatter
|
|
@@ -9,10 +9,10 @@ Each story authored at front state 7 is one Markdown file under `epics/EP-<slug>
|
|
|
9
9
|
|-------|--------|---------|
|
|
10
10
|
| `id` | `EP-<slug>-S0N` | Stable story ID. Engine-assigned, zero-padded, never renamed. |
|
|
11
11
|
| `epic` | `EP-<slug>` | Parent epic ID — the unbroken link back to the epic. |
|
|
12
|
-
| `owner` | name | Inherited from `epic.md` `owner` (the single source — not retyped per story). Carries the responsible owner through to
|
|
12
|
+
| `owner` | name | Inherited from `epic.md` `owner` (the single source — not retyped per story). Carries the responsible owner through to Build. |
|
|
13
13
|
| `status` | `draft` \| `in_review` \| `approved` | Story lifecycle within the stories gate. |
|
|
14
14
|
| `repos` | subset of the epic's `repos` | Which repos must implement this story. **Drives per-repo review routing now and (Phase 3) where specs are scaffolded.** |
|
|
15
|
-
| `code-context` | `{ repos: [<name@sha>], loaded: <date> }` | Optional. Which connected-repo code-maps anchored "Notes for build" (
|
|
15
|
+
| `code-context` | `{ repos: [<name@sha>], loaded: <date> }` | Optional. Which connected-repo code-maps anchored "Notes for build" (Shape step 7 Step 2b). The `@sha` (a repo's `syncedHead`) is recommended so freshness is recorded but may be omitted; the SKILL templates show the empty placeholder `{ repos: [], loaded: <date or none> }`. `none` / `[]` when no repos are connected. |
|
|
16
16
|
|
|
17
17
|
## Body
|
|
18
18
|
|
package/skills/yad-stub/SKILL.md
CHANGED
|
@@ -86,7 +86,7 @@ Leave `owner` for the human to set. Set `repos` to the code repo(s) the feature
|
|
|
86
86
|
|
|
87
87
|
### Step 5 — Seed the stub `state.json` (a `backfill-pending` sentinel)
|
|
88
88
|
Create `{project-root}/epics/EP-<slug>/.sdlc/state.json`. It carries the top-level marker
|
|
89
|
-
`kind: "stub"` and the sentinel `currentStep: "backfill-pending"`, and the **same 10-step
|
|
89
|
+
`kind: "stub"` and the sentinel `currentStep: "backfill-pending"`, and the **same 10-step Shape chain**
|
|
90
90
|
as a normal epic (`yad-epic` Step 5) but with **every step `status: "blocked"`** — so the state is valid
|
|
91
91
|
(`validateState` needs a non-empty `steps` + a string `currentStep`) and `promote` can later "wake" it
|
|
92
92
|
into normal authoring with zero re-seeding.
|
|
@@ -117,7 +117,7 @@ Also create the empty ledgers `{.sdlc/approvals.json}` and `{.sdlc/comments.json
|
|
|
117
117
|
`reviews/` directory. **Do NOT** write a `contract-lock.json` — a stub has no locked surface yet.
|
|
118
118
|
|
|
119
119
|
Commit the seed on this step's authoring branch; it reaches the hub's default branch through the
|
|
120
|
-
epic's **first** review PR/MR (or, for a stub, the PR that carries the stub itself). In
|
|
120
|
+
epic's **first** review PR/MR (or, for a stub, the PR that carries the stub itself). In verified mode
|
|
121
121
|
`ledger-guard` exempts a new epic's ledger — creation, not mutation (#162) — while every later change
|
|
122
122
|
to it stays CI's. See `../yad-epic/references/state-schema.md`, "Authoring branches".
|
|
123
123
|
|
|
@@ -130,7 +130,7 @@ Report the new `EP-<slug>`, that it is a **stub (backfill pending)**, and the tw
|
|
|
130
130
|
- **Make it real later:** `yad-backfill` for the code repo, then `yad-backfill promote EP-<slug>` to flip
|
|
131
131
|
the stub to `verified: true`.
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
Shape steps do not auto-advance. Suggest `yad next EP-<slug>` (prints the backfill-pending guidance) and
|
|
134
134
|
`yad thread EP-<slug>` to see the anchor and everything threaded off it.
|
|
135
135
|
|
|
136
136
|
## Hard rules
|
|
@@ -5,7 +5,7 @@ description: 'Brings every connected code repo up to date in one shot: switches
|
|
|
5
5
|
|
|
6
6
|
# SDLC — Sync Connected Repos (one command, every repo on its default branch)
|
|
7
7
|
|
|
8
|
-
**Goal:** Before
|
|
8
|
+
**Goal:** Before Shape/Build work starts, get every connected code repo onto its default branch at the
|
|
9
9
|
latest commit, so nobody implements on a stale or wrong branch. This is the deterministic counterpart to
|
|
10
10
|
the `sync-before-implementation` discipline: one command instead of N manual `git checkout && git pull`.
|
|
11
11
|
|