yadflow 1.4.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/README.md +123 -186
- package/bin/{sdlc.mjs → yad.mjs} +18 -17
- package/cli/commit.mjs +3 -3
- package/cli/epic-state.mjs +2 -2
- package/cli/gate.mjs +8 -8
- package/cli/lib.mjs +1 -1
- package/cli/manifest.mjs +77 -36
- package/cli/openpr.mjs +3 -3
- package/cli/plan.mjs +88 -1
- package/cli/platform.mjs +2 -2
- package/cli/reconcile.mjs +18 -10
- package/cli/repo.mjs +5 -5
- package/cli/setup.mjs +7 -7
- package/docs/index.html +1227 -0
- package/package.json +8 -4
- package/skills/sdlc/config.yaml +24 -24
- package/skills/sdlc/install.sh +2 -2
- package/skills/sdlc/module-help.csv +16 -16
- package/skills/{sdlc-author-analysis → yad-analysis}/SKILL.md +12 -12
- package/skills/{sdlc-author-architecture → yad-architecture}/SKILL.md +12 -12
- package/skills/{sdlc-author-architecture → yad-architecture}/references/contract-format.md +1 -1
- package/skills/{sdlc-backfill → yad-backfill}/SKILL.md +4 -4
- package/skills/{sdlc-backfill → yad-backfill}/references/backfill.md +2 -2
- package/skills/{sdlc-backfill → yad-backfill}/templates/checks/backfill-check.sh +1 -1
- package/skills/{sdlc-checks → yad-checks}/SKILL.md +20 -20
- package/skills/{sdlc-checks → yad-checks}/references/check-gates.md +21 -21
- package/skills/{sdlc-checks → yad-checks}/templates/checks/contract-check.sh +2 -2
- package/skills/{sdlc-checks → yad-checks}/templates/checks/verified-commits.sh +2 -2
- package/skills/{sdlc-checks/templates/github/sdlc-checks.yml → yad-checks/templates/github/yad-checks.yml} +3 -3
- package/skills/{sdlc-checks/templates/github/sdlc-verified-commits.yml → yad-checks/templates/github/yad-verified-commits.yml} +4 -4
- package/skills/{sdlc-checks → yad-checks}/templates/gitlab/gitlab-ci.include-root.yml +3 -3
- package/skills/{sdlc-checks/templates/gitlab/sdlc-checks.gitlab-ci.yml → yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml} +7 -7
- package/skills/{sdlc-checks/templates/gitlab/sdlc-verified-commits.gitlab-ci.yml → yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml} +4 -4
- package/skills/{sdlc-connect-repos → yad-connect-repos}/SKILL.md +7 -7
- package/skills/{sdlc-connect-repos → yad-connect-repos}/references/code-context.md +6 -6
- package/skills/{sdlc-connect-repos → yad-connect-repos}/references/hub-config.md +2 -2
- package/skills/{sdlc-author-epic → yad-epic}/SKILL.md +13 -13
- package/skills/{sdlc-author-epic → yad-epic}/references/state-schema.md +13 -13
- package/skills/{sdlc-hub-bridge → yad-hub-bridge}/SKILL.md +24 -24
- package/skills/{sdlc-hub-bridge → yad-hub-bridge}/references/bridge.md +11 -11
- package/skills/{sdlc-hub-bridge → yad-hub-bridge}/references/login-roster.md +2 -2
- package/skills/{sdlc-hub-bridge → yad-hub-bridge}/templates/checks/hub-route.sh +3 -3
- package/skills/{sdlc-hub-bridge/templates/github/sdlc-gate-sync.yml → yad-hub-bridge/templates/github/yad-gate-sync.yml} +10 -10
- package/skills/{sdlc-hub-bridge → yad-hub-bridge}/templates/gitlab/gitlab-ci.include-root.yml +3 -3
- package/skills/{sdlc-hub-bridge/templates/gitlab/sdlc-gate-sync.gitlab-ci.yml → yad-hub-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml} +11 -11
- package/skills/{sdlc-implement → yad-implement}/SKILL.md +14 -14
- package/skills/{sdlc-implement → yad-implement}/references/implement-conventions.md +4 -4
- package/skills/{sdlc-pr-template → yad-pr-template}/SKILL.md +11 -11
- package/skills/{sdlc-pr-template → yad-pr-template}/references/risk-routing.md +5 -5
- package/skills/{sdlc-pr-template → yad-pr-template}/templates/checks/risk-route.sh +2 -2
- package/skills/{sdlc-pr-template → yad-pr-template}/templates/github/pull_request_template.md +1 -1
- package/skills/{sdlc-pr-template → yad-pr-template}/templates/gitlab/merge_request_templates/Default.md +1 -1
- package/skills/{sdlc-pr-template → yad-pr-template}/templates/hub/github/pull_request_template.md +4 -4
- package/skills/{sdlc-pr-template → yad-pr-template}/templates/hub/gitlab/merge_request_templates/Default.md +4 -4
- package/skills/{sdlc-review-comments → yad-review-comments}/SKILL.md +6 -6
- package/skills/{sdlc-review-comments → yad-review-comments}/references/comment-conventions.md +6 -6
- package/skills/{sdlc-review-comments → yad-review-comments}/templates/github/REVIEW_COMMENTS.md +2 -2
- package/skills/{sdlc-review-comments → yad-review-comments}/templates/gitlab/REVIEW_COMMENTS.md +2 -2
- package/skills/{sdlc-review-gate → yad-review-gate}/SKILL.md +13 -13
- package/skills/{sdlc-review-gate → yad-review-gate}/references/gating.md +3 -3
- package/skills/{sdlc-run → yad-run}/SKILL.md +12 -12
- package/skills/{sdlc-run → yad-run}/references/run-loop.md +10 -10
- package/skills/{sdlc-ship → yad-ship}/SKILL.md +8 -8
- package/skills/{sdlc-ship → yad-ship}/references/ship-and-record.md +3 -3
- package/skills/{sdlc-ship → yad-ship}/templates/.coderabbit.yaml +1 -1
- package/skills/{sdlc-spec → yad-spec}/SKILL.md +11 -11
- package/skills/{sdlc-spec → yad-spec}/references/spec-handoff.md +2 -2
- package/skills/{sdlc-status → yad-status}/SKILL.md +6 -6
- package/skills/{sdlc-author-stories → yad-stories}/SKILL.md +10 -10
- package/skills/{sdlc-author-stories → yad-stories}/references/story-schema.md +1 -1
- package/skills/{sdlc-author-ui → yad-ui}/SKILL.md +9 -9
- /package/skills/{sdlc-checks → yad-checks}/templates/checks/build-test-lint.sh +0 -0
- /package/skills/{sdlc-checks → yad-checks}/templates/checks/spec-link.sh +0 -0
- /package/skills/{sdlc-checks → yad-checks}/templates/gitlab/.gitlab-ci.yml +0 -0
- /package/skills/{sdlc-connect-repos → yad-connect-repos}/references/repos-registry.md +0 -0
- /package/skills/{sdlc-implement → yad-implement}/templates/.gitmessage +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
## [2.0.1](https://github.com/abdelrahmannasr/yadflow/compare/v2.0.0...v2.0.1) (2026-06-12)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* publish README with pre-rendered SVG diagrams so they display on npm ([05382f6](https://github.com/abdelrahmannasr/yadflow/commit/05382f6bfe27bb0604165692ca6fe1cdb74b9a35))
|
|
7
7
|
|
|
8
8
|
# [1.1.0](https://github.com/abdelrahmannasr/sdlc-workflow/compare/v1.0.3...v1.1.0) (2026-06-09)
|
|
9
9
|
|
package/README.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/yadflow)
|
|
4
4
|
[](https://github.com/abdelrahmannasr/yadflow/actions/workflows/ci.yml)
|
|
5
5
|
[](https://docs.npmjs.com/generating-provenance-statements)
|
|
6
|
+
[](https://abdelrahmannasr.github.io/yadflow/)
|
|
7
|
+
|
|
8
|
+
> 📖 **Start here: the [Yadflow Terminology & Workflow Structure Report](https://abdelrahmannasr.github.io/yadflow/)** —
|
|
9
|
+
> the full picture of every term, artifact, gate and skill in one richly illustrated page.
|
|
6
10
|
|
|
7
11
|
**Yadflow** (*yahd-flow* — from **يد**, Arabic for "hand") is the AI-driven SDLC where a human hand
|
|
8
12
|
moves every gate. *AI builds. The hand decides.* On npm and GitHub as `yadflow`.
|
|
@@ -19,70 +23,11 @@ a scaffolded module that installs cleanly, and a working **team review gate** yo
|
|
|
19
23
|
|
|
20
24
|
The whole lifecycle, from an empty project to shipped code. Setup is one-time; the **front half**
|
|
21
25
|
is human-gated and runs once per epic in the product hub; the **build half** runs once per story
|
|
22
|
-
per code repo; **automation** is opt-in and earned. `
|
|
26
|
+
per code repo; **automation** is opt-in and earned. `yad-status` reads it all; `yad-hub-bridge`
|
|
23
27
|
mirrors front-half reviews to real PR/MRs.
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
classDef gated fill:#fdebd0,stroke:#ca6f1e,color:#000
|
|
28
|
-
classDef earns fill:#d6eaf8,stroke:#2471a3,color:#000
|
|
29
|
-
classDef locked fill:#eaecee,stroke:#566573,color:#000,stroke-dasharray:5 3
|
|
30
|
-
classDef artifact fill:#fcf3cf,stroke:#b7950b,color:#000
|
|
31
|
-
classDef sentinel fill:#d5f5e3,stroke:#1e8449,color:#000
|
|
32
|
-
|
|
33
|
-
subgraph SETUP["0 · One-time setup (per project)"]
|
|
34
|
-
direction TB
|
|
35
|
-
inst["install.sh<br/>copy sdlc-* skills into IDE dirs"]
|
|
36
|
-
wire["wire each repo:<br/>sdlc-checks · sdlc-pr-template · sdlc-review-comments"]
|
|
37
|
-
conn["sdlc-connect-repos<br/>repos.json + cached code-map"]
|
|
38
|
-
phub["optional: hub on a platform<br/>detect-hub · roster"]
|
|
39
|
-
inst --> wire --> conn --> phub
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
subgraph FRONT["A · Front half — product hub · human-gated · once per epic"]
|
|
43
|
-
direction TB
|
|
44
|
-
an["sdlc-author-analysis<br/>optional → analysis.md"]:::artifact
|
|
45
|
-
ep["sdlc-author-epic<br/>epic.md · assigns EP-<slug>"]:::artifact
|
|
46
|
-
ar["sdlc-author-architecture<br/>architecture.md + locked contract.md"]:::artifact
|
|
47
|
-
ui["sdlc-author-ui<br/>ui-design.md + DESIGN.md"]:::artifact
|
|
48
|
-
st["sdlc-author-stories<br/>repo-tagged stories/EP-<slug>-S0N.md"]:::artifact
|
|
49
|
-
gAn{{"gate · analysis"}}:::gated
|
|
50
|
-
gEp{{"gate · epic<br/>base: owner + reviewer"}}:::gated
|
|
51
|
-
gAr{{"gate · architecture<br/>escalated: + repo domain owners"}}:::gated
|
|
52
|
-
gUi{{"gate · UI · base"}}:::gated
|
|
53
|
-
gSt{{"gate · stories<br/>per-repo domain owners"}}:::gated
|
|
54
|
-
rfb(["currentStep: ready-for-build"]):::sentinel
|
|
55
|
-
an --> gAn --> ep --> gEp --> ar --> gAr --> ui --> gUi --> st --> gSt --> rfb
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
subgraph BUILD["B · Build half — per story, per code repo"]
|
|
59
|
-
direction TB
|
|
60
|
-
sp["sdlc-spec<br/>Spec Kit ceremony → specs/<story>/"]
|
|
61
|
-
im["sdlc-implement<br/>1 task = 1 branch = 1 commit"]:::earns
|
|
62
|
-
ck["sdlc-checks<br/>spec-link · contract-check · build/test/lint"]:::earns
|
|
63
|
-
prm["open PR/MR + sdlc-pr-template route"]
|
|
64
|
-
shp["sdlc-ship<br/>AI review (advisory)"]
|
|
65
|
-
eng{{"engineer review<br/>human · never automated"}}:::locked
|
|
66
|
-
merged(["merge → build-log.json"]):::sentinel
|
|
67
|
-
sp --> im --> ck --> prm --> shp --> eng --> merged
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
subgraph AUTO["C · Automation — earned & reversible"]
|
|
71
|
-
direction TB
|
|
72
|
-
run["sdlc-run<br/>reads automation dial + trust-log.json"]:::earns
|
|
73
|
-
kill["kill switch → everything human_approve"]
|
|
74
|
-
run --- kill
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
phub --> an
|
|
78
|
-
rfb --> sp
|
|
79
|
-
run -. drives earned back steps .-> im
|
|
80
|
-
bridge["sdlc-hub-bridge<br/>review PR/MR ↔ file ledger"]:::gated
|
|
81
|
-
bridge -. syncs approvals .-> gEp
|
|
82
|
-
status["sdlc-status<br/>read-only view over all of it"]
|
|
83
|
-
status -. observes .-> FRONT
|
|
84
|
-
status -. observes .-> BUILD
|
|
85
|
-
```
|
|
29
|
+
<!-- Source: docs/diagrams/sdlc-overview.mmd — edit the .mmd and run `npm run diagrams` to regenerate -->
|
|
30
|
+

|
|
86
31
|
|
|
87
32
|
**Legend.** <span>🟨</span> **artifact** = an author step writes a file and stops; <span>🟧</span>
|
|
88
33
|
**gate** = a human review that must pass (`open → comment → approve → advance`); <span>🟦</span>
|
|
@@ -96,30 +41,30 @@ human**. Detailed walkthroughs for each phase follow below.
|
|
|
96
41
|
|------|-----------|
|
|
97
42
|
| `RESEARCH-NOTES.md` | Verified Phase 0 facts about BMAD, Spec Kit, Repomix, Impeccable + deviations. |
|
|
98
43
|
| `skills/sdlc/` | Module source of truth (`config.yaml`, `module-help.csv`, `install.sh`). Survives BMAD updates. |
|
|
99
|
-
| `bin/`, `cli/` | The `
|
|
100
|
-
| `skills/
|
|
101
|
-
| `skills/
|
|
102
|
-
| `skills/
|
|
103
|
-
| `skills/
|
|
104
|
-
| `skills/
|
|
105
|
-
| `skills/
|
|
106
|
-
| `skills/
|
|
107
|
-
| `skills/
|
|
108
|
-
| `skills/
|
|
109
|
-
| `skills/
|
|
110
|
-
| `skills/
|
|
111
|
-
| `skills/
|
|
112
|
-
| `skills/
|
|
113
|
-
| `skills/
|
|
114
|
-
| `skills/
|
|
115
|
-
| `skills/
|
|
116
|
-
| `skills/
|
|
44
|
+
| `bin/`, `cli/` | The `yad` setup/update CLI (published to npm as `yadflow`). |
|
|
45
|
+
| `skills/yad-analysis/` | Optional front state 1: pressure-test the idea with the analyst into `analysis.md` (skippable). |
|
|
46
|
+
| `skills/yad-epic/` | Front state 1: author an epic with AI assist, assign its `EP-<slug>` ID, seed state. |
|
|
47
|
+
| `skills/yad-architecture/` | Front state 3: author `architecture.md` + the locked `contract.md`; hash-lock the contract surface. |
|
|
48
|
+
| `skills/yad-ui/` | Front state 5: author `ui-design.md` + `DESIGN.md` (Impeccable slash-commands, or graceful fallback). |
|
|
49
|
+
| `skills/yad-stories/` | Front state 7: break the epic into repo-tagged stories with stable `EP-<slug>-S0N` IDs. |
|
|
50
|
+
| `skills/yad-connect-repos/` | Connect code repos to the hub (GitHub/GitLab, local-user auth); cache a Repomix pack + **code-map** per repo so the front phases are code-aware. |
|
|
51
|
+
| `skills/yad-review-gate/` | The reusable **team review + approve gate** (used for all four reviews). |
|
|
52
|
+
| `skills/yad-spec/` | Build Step A: run the Spec Kit ceremony once per story per repo → `specs/<story-id>/`. |
|
|
53
|
+
| `skills/yad-implement/` | Build Step B: implement ONE atomic task as a small diff on its own branch. |
|
|
54
|
+
| `skills/yad-checks/` | Build Step C: wire + run the CI gates (spec-link, contract-check, build/test/lint, verified-commits). |
|
|
55
|
+
| `skills/yad-pr-template/` | Build Step D: install the platform PR/MR template + risk routing (code repos **and** the hub). |
|
|
56
|
+
| `skills/yad-review-comments/` | Install platform-matched PR/MR review-comment scaffolds (code repos and the hub). |
|
|
57
|
+
| `skills/yad-hub-bridge/` | The templated PR/MR **review bridge**: open a review PR/MR on the hub and sync platform approvals/comments into the file ledger. |
|
|
58
|
+
| `skills/yad-ship/` | Build Step E: AI review (advisory) → engineer review → ship + record in the build log. |
|
|
59
|
+
| `skills/yad-backfill/` | Generate a human-verified spec for already-built code (Repomix), gated per touched feature. |
|
|
60
|
+
| `skills/yad-run/` | Phase 4 orchestrator: drive a story's back half on the `automation` dial; kill switch. |
|
|
61
|
+
| `skills/yad-status/` | Read-only view: front chain, build-half dials, trust record, fleet roll-up. |
|
|
117
62
|
| `epics/EP-istifta-inquiries/` | A worked demo epic run **end to end** (front half + build half + automation). |
|
|
118
63
|
| `demo-repos/` | Throwaway code repos for the build half (separate git repos; regenerable — see `demo-repos/README.md`). |
|
|
119
64
|
| `docs/` | The phased build plans (`phase-2`…`phase-5`) and the original workflow design. |
|
|
120
65
|
| [`CONTRIBUTING.md`](CONTRIBUTING.md) | Commit & PR/MR title convention (Conventional Commits, lowercase after the type). |
|
|
121
66
|
|
|
122
|
-
## The `
|
|
67
|
+
## The `yad` CLI (install, update, reconcile)
|
|
123
68
|
|
|
124
69
|
The module ships a zero-dependency CLI, published to npm as
|
|
125
70
|
[`yadflow`](https://www.npmjs.com/package/yadflow). Run it
|
|
@@ -128,17 +73,17 @@ with `npx` from your **product hub** repo — no clone needed.
|
|
|
128
73
|
| Command | What it does |
|
|
129
74
|
|---------|--------------|
|
|
130
75
|
| `npx yadflow setup` | Guided first-run wizard (the steps below). |
|
|
131
|
-
| `npx yadflow check` | Read-only report: what is **missing** / **outdated** (drifted) / **stale** (code-context) vs the bundled manifest. |
|
|
76
|
+
| `npx yadflow check` | Read-only report: what is **missing** / **outdated** (drifted) / **stale** (code-context) / **legacy** (pre-2.0 `sdlc-*` names) vs the bundled manifest. |
|
|
132
77
|
| `npx yadflow check --fix` | Reconcile: fill what is missing **and** update what changed — touches nothing already correct. |
|
|
133
|
-
| `npx yadflow update` | Apply drift only (alias for `check --fix --scope=changed`). |
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `
|
|
140
|
-
| `
|
|
141
|
-
| `
|
|
78
|
+
| `npx yadflow update` | Apply drift only (alias for `check --fix --scope=changed`). Also migrates a pre-2.0 install in place: `sdlc-*` skill copies and marker-owned `sdlc-*.yml` CI files are replaced by their `yad-*` names (a same-named file *you* authored is never touched). |
|
|
79
|
+
| `yad gate open <epic> <artifact>` | Open the front-half **review PR/MR** for an artifact and mark the step `in_review`. |
|
|
80
|
+
| `yad gate sync <epic> [artifact]` | Pull the PR/MR's reviews + comment threads into the file ledger; **auto-advance** the step when approvals are satisfied, all threads are resolved, and the PR is merged. |
|
|
81
|
+
| `yad gate comments <epic> [artifact]` | Fetch the unresolved review comments to address (then reply on the PR; reviewers resolve their threads). |
|
|
82
|
+
| `yad gate status <epic>` | Show each review step and its recorded approvals. |
|
|
83
|
+
| `yad gate ci [--branch <head>] [--pr <n>]` | The CI entry the hub workflow calls on review/merge events: derive the epic/artifact from the `review/EP-*` branch, run the same sync, and commit **only the ledger** to the hub default branch (sweep every open review PR when no `--branch`). |
|
|
84
|
+
| `yad commit --type <t> -m <subject>` | Commit by the SDLC convention — Conventional subject, `Task`/`Contract-Change`/`Co-Authored-By` trailers, atomic-file guard. |
|
|
85
|
+
| `yad open-pr [--repo <name>]` | Open a code-repo **task** PR/MR from the repo's platform template (build half). |
|
|
86
|
+
| `yad repo list` / `yad repo refresh [name]` | List connected repos as **fresh / stale**, and re-pack a stale one — staleness is now an explicit human decision, never an automatic skill side-effect. |
|
|
142
87
|
| `npx yadflow --version` | Print the installed CLI version. |
|
|
143
88
|
|
|
144
89
|
Flags: `--dir <path>` targets a project other than the cwd; `--force` re-copies unchanged files (or
|
|
@@ -148,8 +93,8 @@ bypasses the commit atomic guard). Commit flags: `--type`, `-m/--message`, `--ta
|
|
|
148
93
|
|
|
149
94
|
### The PR-driven review gate
|
|
150
95
|
|
|
151
|
-
The front-half gate now rides the **PR/MR you open per step** (`
|
|
152
|
-
comment on the platform; `
|
|
96
|
+
The front-half gate now rides the **PR/MR you open per step** (`yad gate open`). Reviewers approve and
|
|
97
|
+
comment on the platform; `yad gate sync` maps that state into the file ledger (`approvals.json`,
|
|
153
98
|
`comments.json`, `reviews/*.md`) — which stays the source of truth — and the step **auto-advances on
|
|
154
99
|
merge** once three things hold: the reviewer rule is satisfied (owner + 1 reviewer, plus a domain-owner
|
|
155
100
|
per touched repo on escalated steps), every comment thread is resolved, and the review PR/MR is merged.
|
|
@@ -157,22 +102,22 @@ The merge click is the human approval act, so front steps still never `machine_a
|
|
|
157
102
|
**revoked when the reviewed artifact actually changes** (re-hash), giving reviewers a fresh pass. With no
|
|
158
103
|
hub platform / no `gh`/`glab`, the gate degrades to file-only with no error.
|
|
159
104
|
|
|
160
|
-
**Event-driven sync.** Wire the hub once (`
|
|
105
|
+
**Event-driven sync.** Wire the hub once (`yad check --fix` installs `.github/workflows/yad-gate-sync.yml`,
|
|
161
106
|
or the GitLab fragment + schedule) and every **approval, change request, and merge** on a review PR/MR
|
|
162
|
-
triggers `
|
|
163
|
-
— no manual `
|
|
107
|
+
triggers `yad gate ci` in the hub's own CI: the ledger updates land directly on the hub's default branch
|
|
108
|
+
— no manual `yad gate sync` needed (it stays valid as the fallback). CI never approves and never merges;
|
|
164
109
|
the human keeps the merge click. GitLab caveat: approvals are only picked up by the ~15-min scheduled
|
|
165
|
-
sweep (GitLab fires no pipeline on approval) — details in `skills/
|
|
110
|
+
sweep (GitLab fires no pipeline on approval) — details in `skills/yad-hub-bridge/references/bridge.md`.
|
|
166
111
|
Concurrency caveat: on GitHub the workflow's `concurrency` group serializes runs repo-wide and every
|
|
167
112
|
sync re-reads the full platform state, so racing reviewer events lose nothing. Outside that group —
|
|
168
|
-
a manual `
|
|
113
|
+
a manual `yad gate sync` racing CI, or GitLab pipelines — two simultaneous syncs serialize their
|
|
169
114
|
*commits* via the rebase retry but each works from the state it read at start, so the rarer of two
|
|
170
115
|
simultaneous advancements can be lost; the next event or scheduled sweep re-syncs and converges.
|
|
171
116
|
|
|
172
117
|
### What `setup` walks you through (7 steps)
|
|
173
118
|
|
|
174
119
|
1. **Preflight** — confirm the hub is a git repo (offers `git init`); check `git`/`node`/`npx`.
|
|
175
|
-
2. **Install the module** — copy all 17 `
|
|
120
|
+
2. **Install the module** — copy all 17 `yad-*` skills into the IDE skill dirs you pick
|
|
176
121
|
(`.claude/`, `.agents/`, `.zencoder/`, `.opencode/`) and register `_bmad/sdlc/`.
|
|
177
122
|
3. **Hub platform & roster** — detect GitHub/GitLab from the remote; record reviewers → `.sdlc/hub.json`.
|
|
178
123
|
4. **Connect code repos** — register each repo into `.sdlc/repos.json` and cache a Repomix pack.
|
|
@@ -201,12 +146,12 @@ provenance). See [`RELEASING.md`](RELEASING.md).
|
|
|
201
146
|
## Agent skills (all 17)
|
|
202
147
|
|
|
203
148
|
The CLI **installs and wires** the module; the skills below are the **agents you invoke by name** in your
|
|
204
|
-
AI IDE (e.g. *“run `
|
|
149
|
+
AI IDE (e.g. *“run `yad-epic`”*) to actually do the work. State lives in files you can also edit
|
|
205
150
|
directly. Each skill stops at a gate and never auto-advances unless a step has *earned* automation.
|
|
206
151
|
|
|
207
152
|
### Setup & code-awareness
|
|
208
153
|
|
|
209
|
-
- **`
|
|
154
|
+
- **`yad-connect-repos`** — Connects code repos to the product hub so the front/"brain" phases are
|
|
210
155
|
code-aware. Registers N code repos (GitHub or GitLab, local-user auth, no stored tokens) into
|
|
211
156
|
`.sdlc/repos.json`, then caches an AI-readable picture of each — a compressed Repomix pack and a
|
|
212
157
|
lightweight code-map (existing endpoints/events/data-models/modules), secret-scanned. Idempotent and
|
|
@@ -214,64 +159,64 @@ directly. Each skill stops at a gate and never auto-advances unless a step has *
|
|
|
214
159
|
|
|
215
160
|
### Front half — author the "thinking" (once per epic, human-gated)
|
|
216
161
|
|
|
217
|
-
- **`
|
|
162
|
+
- **`yad-analysis`** — *Optional* front state 1. With the analyst, pressure-test a feature idea
|
|
218
163
|
and write the discovery brief into `analysis.md`. Assigns the `EP-<slug>` ID and seeds `.sdlc/` state
|
|
219
164
|
(the 10-step chain that puts analysis before epic). If skipped, the epic step does this shaping inline.
|
|
220
|
-
- **`
|
|
165
|
+
- **`yad-epic`** — The epic front state. Shape the idea with the analyst (or read `analysis.md`
|
|
221
166
|
when it already ran), then write the epic with the pm into `epic.md`. The entry point when analysis is
|
|
222
167
|
skipped: assigns the `EP-<slug>` ID and seeds `.sdlc/` state.
|
|
223
|
-
- **`
|
|
168
|
+
- **`yad-architecture`** — Front state 3. With the architect, author `architecture.md` and the
|
|
224
169
|
locked `contract.md` (the shared cross-repo surface), then hash-lock the contract surface into
|
|
225
170
|
`.sdlc/contract-lock.json`. Reads `epic.md`; escalates on the contract risk tag.
|
|
226
|
-
- **`
|
|
171
|
+
- **`yad-ui`** — Front state 5. With the ux-designer, author `ui-design.md` and `DESIGN.md`,
|
|
227
172
|
driving Impeccable as harness slash-commands (document/extract/craft) when installed, or authoring
|
|
228
173
|
directly when not. Reads epic + architecture.
|
|
229
|
-
- **`
|
|
174
|
+
- **`yad-stories`** — Front state 7. With the pm, break the approved epic into user stories, each
|
|
230
175
|
tagged with the repos that must implement it. Assigns zero-padded `EP-<slug>-S0N` IDs, one file per
|
|
231
176
|
story under `stories/`. Reads epic + architecture + contract + UI.
|
|
232
177
|
|
|
233
178
|
### The review gate (cross-cutting — used by every review)
|
|
234
179
|
|
|
235
|
-
- **`
|
|
180
|
+
- **`yad-review-gate`** — The reusable team review + approve gate. Shares an authored artifact, records
|
|
236
181
|
reviewer comments and approvals as files, enforces the **owner + 1 reviewer** rule (escalating to
|
|
237
182
|
domain owners on contract/auth/payments), and advances the epic state **only** when approval is
|
|
238
183
|
recorded.
|
|
239
|
-
- **`
|
|
184
|
+
- **`yad-hub-bridge`** — The templated PR/MR bridge for the front-half gate. When the hub has a platform
|
|
240
185
|
(`.sdlc/hub.json`), it opens a review PR/MR per artifact, sets the required reviewers/labels, and
|
|
241
186
|
provides the read-only `gh`/`glab` recipes that sync platform comments + approvals back into the file
|
|
242
187
|
ledger. The file ledger stays the source of truth; degrades to a file-only gate with no platform.
|
|
243
|
-
- **`
|
|
188
|
+
- **`yad-review-comments`** — Installs platform-matched PR/MR review-comment scaffolds so reviewers
|
|
244
189
|
leave structured, attributable feedback that maps cleanly into the file ledger.
|
|
245
190
|
|
|
246
191
|
### Build half — turn stories into shipped code (once per story, per repo)
|
|
247
192
|
|
|
248
|
-
- **`
|
|
193
|
+
- **`yad-spec`** — Step A. For one ready-for-build story and one of its repos, run the Spec Kit ceremony
|
|
249
194
|
once (specify → clarify → plan → analyze → checklist → tasks) → `specs/<story-id>/`. Drives `/speckit.*`
|
|
250
195
|
when installed; references the locked contract — never re-invents the surface.
|
|
251
|
-
- **`
|
|
196
|
+
- **`yad-implement`** — Step B. With the dev lens, implement **one** atomic task as a small diff
|
|
252
197
|
(≤3 files) on its own branch. The diff stays inside the files the task declared (flag and STOP if it
|
|
253
198
|
would grow). Commit ends with the task ID; `Contract-Change: yes` only if it touches the locked
|
|
254
199
|
contract surface.
|
|
255
|
-
- **`
|
|
200
|
+
- **`yad-checks`** — Step C, the production-safety gates. Wire and run three CI gates: **spec-link**
|
|
256
201
|
(every change links a real story/spec), **contract-check** (a contract-surface diff without a
|
|
257
202
|
re-locked contract FAILS), and **build/test/lint**. CI-agnostic bash for GitHub Actions and GitLab CI.
|
|
258
|
-
- **`
|
|
203
|
+
- **`yad-pr-template`** — Step D. Detect the repo's platform and commit the matching PR/MR template with
|
|
259
204
|
an Impact & Risk block; high risk (or a contract/auth/payments surface) routes the review to domain
|
|
260
205
|
owners. Includes `risk-route.sh`.
|
|
261
|
-
- **`
|
|
206
|
+
- **`yad-ship`** — Step E. AI review (CodeRabbit, advisory) → engineer review (the human gate, owner +
|
|
262
207
|
1 reviewer with the same escalation) → on merge, record the ship in the epic build-log and update the
|
|
263
208
|
story state so the epic → story → task → PR chain stays traceable.
|
|
264
|
-
- **`
|
|
209
|
+
- **`yad-backfill`** — Step G. Generate specs for already-built features in an existing repo so new work
|
|
265
210
|
doesn't break them: pack one feature at a time with Repomix, write a DRAFT spec, require human approval
|
|
266
211
|
before it counts. A change is blocked only until the features it touches have approved specs.
|
|
267
212
|
|
|
268
213
|
### Automation & status
|
|
269
214
|
|
|
270
|
-
- **`
|
|
215
|
+
- **`yad-run`** — The Phase 4 orchestrator. Drives a story's back-half loop (spec → tasks → implement →
|
|
271
216
|
checks) on each step's automation dial, recording every run in the trust log. A clean `checks` pass
|
|
272
217
|
auto-advances to engineer-review; any failure, scope overrun, or contract-surface touch HALTS for a
|
|
273
218
|
human. Also sets a step's dial (gated by trust evidence) and flips the system-wide kill switch.
|
|
274
|
-
- **`
|
|
219
|
+
- **`yad-status`** — Read-only view of an epic: the current step, each step's dials (assistance/
|
|
275
220
|
automation) and status, which approvals are still required, per-story back-half trust records, the
|
|
276
221
|
kill-switch state, and a fleet roll-up across epics.
|
|
277
222
|
|
|
@@ -285,7 +230,7 @@ UI, stories) and their reviews are **locked** — they may not be set to `machin
|
|
|
285
230
|
version. A front state advances only on a **human act** — recording an approval and `advance`, or
|
|
286
231
|
merging the approved, fully-resolved review PR — never on a machine.
|
|
287
232
|
|
|
288
|
-
As of **Phase 4a** the `automation` dial is no longer inert: the orchestrator `
|
|
233
|
+
As of **Phase 4a** the `automation` dial is no longer inert: the orchestrator `yad-run` reads it and,
|
|
289
234
|
for the safe **back** steps, advances on its own when a step is set to `machine_advance` (and has
|
|
290
235
|
*earned* it — see "Run the back half on the dial" below). The engineer review and all four front
|
|
291
236
|
states stay `human_approve` forever.
|
|
@@ -294,7 +239,7 @@ states stay `human_approve` forever.
|
|
|
294
239
|
|
|
295
240
|
This is the full path from nothing to shipped code. Each numbered step names the skill to invoke; the
|
|
296
241
|
detailed sections below expand every phase. Invoke a skill by name in your agent/IDE (e.g. *“run
|
|
297
|
-
`
|
|
242
|
+
`yad-epic`”*); state lives in files you can also edit directly.
|
|
298
243
|
|
|
299
244
|
### 0 — One-time setup
|
|
300
245
|
|
|
@@ -308,66 +253,66 @@ detailed sections below expand every phase. Invoke a skill by name in your agent
|
|
|
308
253
|
live under `demo-repos/<repo>/` — regenerate from `demo-repos/README.md`.
|
|
309
254
|
3. **Optional tools** (the workflow degrades gracefully and records it if any are absent): **Spec Kit**
|
|
310
255
|
(`/speckit.*`), **Impeccable** (`/impeccable …`), **Repomix** (`npx repomix`, used by
|
|
311
|
-
`
|
|
312
|
-
4. **Wire each code repo once:** `
|
|
313
|
-
*merges* with any existing CI, never clobbers), `
|
|
314
|
-
template + risk routing), `
|
|
256
|
+
`yad-connect-repos` and `yad-backfill`), **CodeRabbit** (advisory AI review).
|
|
257
|
+
4. **Wire each code repo once:** `yad-checks repo:<repo> action: wire` (installs the CI gates —
|
|
258
|
+
*merges* with any existing CI, never clobbers), `yad-pr-template repo:<repo> action: wire` (PR/MR
|
|
259
|
+
template + risk routing), `yad-review-comments repo:<repo> action: wire` (review-comment scaffold).
|
|
315
260
|
5. **Connect each code repo to the hub** (so the front phases see what's already built):
|
|
316
|
-
`
|
|
261
|
+
`yad-connect-repos action: connect repo:<repo> path:<path-or-git_url> domain_owner:<who>`. It
|
|
317
262
|
registers the repo in `.sdlc/repos.json` and caches a Repomix pack + a lightweight **code-map**
|
|
318
263
|
(existing endpoints/events/data-models/modules, secret-scanned). Clones/fetches as the **local user**
|
|
319
264
|
(SSH or credential helper; GitHub or GitLab; no stored tokens). Re-run for any new repo. Freshness is a
|
|
320
|
-
**human decision**: `
|
|
265
|
+
**human decision**: `yad repo list` shows fresh/stale, `yad repo refresh [name]` re-packs a moved repo
|
|
321
266
|
(skills flag staleness and point here — they never silently re-pack). Greenfield → skip it.
|
|
322
267
|
6. **(Optional) Put the hub on a platform** so the front-half review runs through real PRs:
|
|
323
|
-
`
|
|
324
|
-
name + role), and `
|
|
325
|
-
wire` / `
|
|
268
|
+
`yad-connect-repos action: detect-hub`, then `action: roster` once per reviewer (login → SDLC
|
|
269
|
+
name + role), and `yad-pr-template repo:hub action: wire` / `yad-review-comments repo:hub action:
|
|
270
|
+
wire` / `yad-checks repo:hub action: wire`. With no hub platform the front gate just runs file-only.
|
|
326
271
|
7. **Conventions:** commits and PR/MR titles follow Conventional Commits (lowercase after the type), the
|
|
327
272
|
human author owns each commit with an optional per-commit `Co-Authored-By` AI trailer — see
|
|
328
273
|
[`CONTRIBUTING.md`](CONTRIBUTING.md).
|
|
329
274
|
|
|
330
275
|
### A — Front half (human-authored, once per epic)
|
|
331
276
|
Each author step writes its artifact, sets itself `done`, moves `currentStep` to its review, and
|
|
332
|
-
**stops at the gate**. Run every gate with **`
|
|
333
|
-
drive it deterministically with the **`
|
|
277
|
+
**stops at the gate**. Run every gate with **`yad-review-gate`** — or, when the hub is on a platform,
|
|
278
|
+
drive it deterministically with the **`yad gate`** CLI (`open → sync → … → merge`): the review rides
|
|
334
279
|
the per-step PR/MR and the step **auto-advances on merge** once approvals are satisfied and all comment
|
|
335
280
|
threads are resolved. Details: **“Run the full front half by hand”** below.
|
|
336
281
|
|
|
337
|
-
6. `
|
|
338
|
-
7. `
|
|
339
|
-
8. `
|
|
340
|
-
9. `
|
|
282
|
+
6. `yad-epic` → `epic.md` (assigns `EP-<slug>`, seeds state) → review (base rule).
|
|
283
|
+
7. `yad-architecture` → `architecture.md` + locked `contract.md` → review (**escalated**: contract).
|
|
284
|
+
8. `yad-ui` → `ui-design.md` + `DESIGN.md` → review (base rule).
|
|
285
|
+
9. `yad-stories` → repo-tagged `stories/EP-<slug>-S0N.md` → review (**per-repo**).
|
|
341
286
|
→ `state.json` reaches `currentStep: ready-for-build`.
|
|
342
287
|
|
|
343
288
|
### B — Build half (per story, per repo)
|
|
344
289
|
From a `ready-for-build` story, for **each** repo the story is tagged with. Details: **“Run the full
|
|
345
290
|
build half by hand”** below.
|
|
346
291
|
|
|
347
|
-
10. `
|
|
348
|
-
11. `
|
|
349
|
-
(repeat per task). Commit by convention with **`
|
|
292
|
+
10. `yad-spec story:<id> repo:<repo>` → writes `specs/<story-id>/` (spec/plan/tasks + `link.md`).
|
|
293
|
+
11. `yad-implement story:<id> repo:<repo> task:<T0N>` → one atomic task = one branch = one commit
|
|
294
|
+
(repeat per task). Commit by convention with **`yad commit --type <t> -m <subject> [--ai <tool>]`**
|
|
350
295
|
(Task/Contract-Change/Co-Authored-By trailers, atomic-file guard).
|
|
351
|
-
12. `
|
|
296
|
+
12. `yad-checks repo:<repo> action: run` → spec-link, contract-check, build/test/lint, and
|
|
352
297
|
verified-commits (platform-Verified signature + roster-allowlisted author) must pass.
|
|
353
|
-
13. Open the PR/MR from the wired template with **`
|
|
354
|
-
`
|
|
355
|
-
14. `
|
|
298
|
+
13. Open the PR/MR from the wired template with **`yad open-pr --repo <repo> [--risk <level>]`**;
|
|
299
|
+
`yad-pr-template repo:<repo> action: route` prints the required reviewers from the Impact & Risk block.
|
|
300
|
+
14. `yad-ship` → `ai-review` (advisory) → `approve` (the human engineer gate) → `ship` (merge, record
|
|
356
301
|
in `build-log.json`, update story status to `in-build`/`shipped`).
|
|
357
302
|
- **Multi-repo:** repeat 10–14 in each repo, all from the **one** locked contract.
|
|
358
|
-
- **Existing code:** `
|
|
303
|
+
- **Existing code:** `yad-backfill` first, to produce a human-verified spec for a built feature.
|
|
359
304
|
|
|
360
305
|
### C — Automation (optional, earned over time)
|
|
361
306
|
15. After a back step accumulates trust evidence, earn it:
|
|
362
|
-
`
|
|
307
|
+
`yad-run action: set-dial step:<step> to: machine_advance` (refused if evidence is short or for a
|
|
363
308
|
front state / the engineer review).
|
|
364
|
-
16. Drive a story's back half on the dials: `
|
|
309
|
+
16. Drive a story's back half on the dials: `yad-run story:<id> repo:<repo>` — it auto-advances
|
|
365
310
|
earned steps and stops for a human otherwise, always halting at the engineer review.
|
|
366
|
-
17. **Kill switch any time:** `
|
|
311
|
+
17. **Kill switch any time:** `yad-run action: kill` (everything → manual) / `action: unkill`.
|
|
367
312
|
Details: **“Run the back half on the dial”** below.
|
|
368
313
|
|
|
369
314
|
### Any time
|
|
370
|
-
- **`
|
|
315
|
+
- **`yad-status [EP-<slug>]`** — read-only: the front chain, each build step's dial + status, the
|
|
371
316
|
trust record, and (across epics) the fleet roll-up. Start here to see what's blocking.
|
|
372
317
|
|
|
373
318
|
## Run the full front half by hand
|
|
@@ -377,29 +322,29 @@ The front half walks **epic → review → architecture+contract → review →
|
|
|
377
322
|
but you can also edit the files directly — that's the point.
|
|
378
323
|
|
|
379
324
|
Each authoring step is the same shape: an author skill produces an artifact, sets its step `done`,
|
|
380
|
-
moves `currentStep` to the matching review, and **stops at the gate**. Then **`
|
|
325
|
+
moves `currentStep` to the matching review, and **stops at the gate**. Then **`yad-review-gate`**
|
|
381
326
|
(one gate, reused for all four reviews) takes `open → comment → approve → advance`. When the hub is on a
|
|
382
|
-
platform, the **`
|
|
327
|
+
platform, the **`yad gate`** CLI runs that gate over a real PR/MR — `open` raises the review PR, `sync`
|
|
383
328
|
pulls approvals + comment threads into the ledger, and the step **auto-advances when the approved,
|
|
384
329
|
fully-resolved PR is merged** (the merge is the human approval act).
|
|
385
330
|
|
|
386
|
-
**Code-aware (when repos are connected).** If you ran `
|
|
331
|
+
**Code-aware (when repos are connected).** If you ran `yad-connect-repos` in setup, each author step
|
|
387
332
|
first loads the connected repos' **code-maps** (from `.sdlc/code-context/<repo>/`) so it considers what
|
|
388
333
|
already exists: the epic references existing behaviour, **the architecture cross-checks the contract
|
|
389
334
|
surface against existing endpoints/events/entities before hash-locking it**, the UI reuses existing
|
|
390
335
|
components, and stories anchor to real modules. Each artifact stamps what it read in its `code-context:`
|
|
391
336
|
frontmatter; a repo that has moved since connect triggers a staleness warning — the step **flags it and
|
|
392
|
-
stops**, pointing you at `
|
|
337
|
+
stops**, pointing you at `yad repo refresh <repo>` (refreshing is a human decision, never an automatic
|
|
393
338
|
side-effect). With no repos connected the steps proceed exactly as before (greenfield-safe).
|
|
394
339
|
|
|
395
340
|
### Author steps
|
|
396
|
-
1. **`
|
|
341
|
+
1. **`yad-epic`** (state 1) → `epic.md`; assigns the stable `EP-<slug>` ID; seeds
|
|
397
342
|
`.sdlc/state.json` (all `human_approve`, front steps locked) + empty `.sdlc/approvals.json`.
|
|
398
|
-
2. **`
|
|
343
|
+
2. **`yad-architecture`** (state 3) → `architecture.md` + the locked `contract.md`; writes the
|
|
399
344
|
contract-surface SHA-256 to `.sdlc/contract-lock.json`.
|
|
400
|
-
3. **`
|
|
345
|
+
3. **`yad-ui`** (state 5) → `ui-design.md` + `DESIGN.md` (drives Impeccable
|
|
401
346
|
`document|extract|craft` slash-commands when installed; otherwise authors directly).
|
|
402
|
-
4. **`
|
|
347
|
+
4. **`yad-stories`** (state 7) → one file per story `stories/EP-<slug>-S0N.md`, each tagged
|
|
403
348
|
with the `repos` it implements.
|
|
404
349
|
|
|
405
350
|
### The one gate (every review)
|
|
@@ -409,28 +354,20 @@ accumulate, and the step moves forward only when the rule is met. **File-only**
|
|
|
409
354
|
`advance`; **PR-driven** (hub on a platform) ends when the approved, fully-resolved review PR is
|
|
410
355
|
**merged**:
|
|
411
356
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
a["author writes<br/>artifact"] --> o["open<br/>raise review PR/MR"]
|
|
415
|
-
o --> c["comment<br/>reviewers leave notes"]
|
|
416
|
-
c -->|owner addresses,<br/>edits in place| c
|
|
417
|
-
c --> ap["approve<br/>+ resolve threads"]
|
|
418
|
-
ap --> adv{"rule met,<br/>threads resolved,<br/>merged?"}
|
|
419
|
-
adv -->|no — names who's missing| o
|
|
420
|
-
adv -->|yes| nxt(["next step"])
|
|
421
|
-
```
|
|
357
|
+
<!-- Source: docs/diagrams/review-loop.mmd — edit the .mmd and run `npm run diagrams` to regenerate -->
|
|
358
|
+

|
|
422
359
|
|
|
423
|
-
**File-only** — invoke **`
|
|
360
|
+
**File-only** — invoke **`yad-review-gate`** with `open` (present the artifact; reviewers comment in
|
|
424
361
|
`reviews/<artifact>--<date>--comments.md`), `approve` (name + role → `.sdlc/approvals.json`), and
|
|
425
362
|
`advance` (moves **only if** the rule is satisfied, else it names the missing approval).
|
|
426
363
|
|
|
427
|
-
**PR-driven** — when the hub is on a platform, the **`
|
|
428
|
-
- `
|
|
429
|
-
- `
|
|
364
|
+
**PR-driven** — when the hub is on a platform, the **`yad gate`** CLI runs the same gate over a PR/MR:
|
|
365
|
+
- `yad gate open <epic> <artifact>` — raise the review PR/MR; mark the step `in_review`.
|
|
366
|
+
- `yad gate sync <epic> [artifact]` — pull approvals + comment threads into the **same** ledger (your
|
|
430
367
|
own `gh`/`glab`, no stored tokens) and **auto-advance on merge** once the rule is met and every thread
|
|
431
368
|
is resolved. Approvals are **revoked when the reviewed artifact changes** (re-hash), so reviewers get
|
|
432
369
|
a fresh pass. Unresolved comments hold the step `in_review`.
|
|
433
|
-
- `
|
|
370
|
+
- `yad gate comments <epic>` fetches the open threads to address; `yad gate status <epic>` shows
|
|
434
371
|
approvals (counting only the non-stale ones). The file ledger stays the source of truth; with no
|
|
435
372
|
platform / no CLI it degrades to file-only.
|
|
436
373
|
|
|
@@ -443,7 +380,7 @@ flowchart LR
|
|
|
443
380
|
in any story's `repos`**.
|
|
444
381
|
|
|
445
382
|
### Check status anytime
|
|
446
|
-
Invoke **`
|
|
383
|
+
Invoke **`yad-status`** (read-only) to see the full 8-step chain, every step's dials/status, the
|
|
447
384
|
contract lock, story repo tags, and which approvals the active gate still needs.
|
|
448
385
|
|
|
449
386
|
## Worked example (already in this repo)
|
|
@@ -479,23 +416,23 @@ gates that protect production. Per-repo specs live in each code repo; the contra
|
|
|
479
416
|
the product repo. Code repos are **separate git repos** under `demo-repos/<repo>/` (gitignored;
|
|
480
417
|
`demo-repos/README.md` explains regeneration). **Nothing auto-advances** — every gate is human-owned.
|
|
481
418
|
|
|
482
|
-
1. **Spec** — `
|
|
419
|
+
1. **Spec** — `yad-spec` runs the heavy Spec Kit ceremony **once per story per repo**
|
|
483
420
|
(`specify`→`clarify`→`plan`→`analyze`→`checklist`→`tasks`), writing `specs/<story-id>/` and a
|
|
484
421
|
`link.md` back to the story (drives `/speckit.*` when installed, else degrades). It **quotes** the
|
|
485
422
|
locked contract; it never widens it.
|
|
486
|
-
2. **Implement** — `
|
|
423
|
+
2. **Implement** — `yad-implement` (the `dev` step): one atomic task = one branch
|
|
487
424
|
(`feat/<story>-<task>-…`) = one PR. The diff stays inside the files the task declared. Commit with
|
|
488
|
-
**`
|
|
425
|
+
**`yad commit`** — it builds the conventional subject, derives the `Task:` trailer from the branch
|
|
489
426
|
(add `--contract-change` only if the locked surface is touched), appends an optional `--ai` co-author,
|
|
490
|
-
and refuses a non-atomic stage. Open the PR with **`
|
|
491
|
-
3. **Check gates** — `
|
|
427
|
+
and refuses a non-atomic stage. Open the PR with **`yad open-pr --repo <repo>`** (template prefilled).
|
|
428
|
+
3. **Check gates** — `yad-checks` wires three CI gates (GitHub + GitLab) that must pass before merge:
|
|
492
429
|
**spec-link** (links a real story/spec), **contract-check** (a contract-surface change without
|
|
493
430
|
`Contract-Change` + a re-locked contract FAILS, routing back to the architecture gate),
|
|
494
431
|
**build/test/lint**. They fail closed on a bad base ref.
|
|
495
|
-
4. **PR/MR template + risk routing** — `
|
|
432
|
+
4. **PR/MR template + risk routing** — `yad-pr-template` drops the platform-matched template with an
|
|
496
433
|
Impact & Risk block; `high` risk (or a contract/auth/payments surface) routes the review to domain
|
|
497
434
|
owners (`risk-route.sh`), the same escalation as the gate.
|
|
498
|
-
5. **AI review → engineer review → ship** — `
|
|
435
|
+
5. **AI review → engineer review → ship** — `yad-ship`: CodeRabbit is an advisory first pass (never
|
|
499
436
|
the authority); a human engineer approves (owner + 1 reviewer, escalating to domain owners); on
|
|
500
437
|
merge the ship is recorded in `.sdlc/build-log.json` and the story state becomes `in-build` →
|
|
501
438
|
`shipped`. The epic → story → task → PR → mergeCommit chain is traceable both ways.
|
|
@@ -503,7 +440,7 @@ the product repo. Code repos are **separate git repos** under `demo-repos/<repo>
|
|
|
503
440
|
**Multi-repo:** a story tagged `repos: [backend, mobile]` runs the above in each repo independently from
|
|
504
441
|
the **one** locked contract; the contract-check blocks a surface bypass in either repo.
|
|
505
442
|
|
|
506
|
-
**Backfill existing code:** `
|
|
443
|
+
**Backfill existing code:** `yad-backfill` packs one feature with **Repomix** (`npx repomix`, secret-scan
|
|
507
444
|
by default), drafts an *unverified* spec ("describe what exists, do not invent"), a human approves it,
|
|
508
445
|
and `backfill-check.sh` blocks a change to that feature until its spec is approved — gated per touched
|
|
509
446
|
feature, never the whole repo.
|
|
@@ -516,26 +453,26 @@ backfilled. The code repos are regenerable from `demo-repos/README.md`.
|
|
|
516
453
|
|
|
517
454
|
Phase 4 is **automation, earned with evidence and reversible in one move**. Phase 4a made the
|
|
518
455
|
`automation` dial real and earned the safest step (the check-gate advance); Phase 4b added the
|
|
519
|
-
`implement → check` hand-off and the `spec`/`tasks` trust hooks. The engine is `
|
|
456
|
+
`implement → check` hand-off and the `spec`/`tasks` trust hooks. The engine is `yad-run`; the
|
|
520
457
|
evidence lives in two new files per epic under `.sdlc/`: `build-state/<story-id>.json` (the back steps
|
|
521
458
|
with their dials, per repo) and `trust-log.json` (every run's verdict). See
|
|
522
459
|
`docs/phase-4-build-plan.md` and `docs/phase-4b-build-plan.md`.
|
|
523
460
|
|
|
524
|
-
- **Drive a story's back half:** `
|
|
461
|
+
- **Drive a story's back half:** `yad-run {story} {repo}` walks `spec → tasks → implement → checks`,
|
|
525
462
|
reading each step's dial. On `machine_advance` it advances on its own; on `human_approve` it stops
|
|
526
463
|
for a human; on any FAIL, scope overrun, or contract-surface touch it **halts and pulls in a human**.
|
|
527
|
-
It always stops at the engineer review (`
|
|
528
|
-
- **Read the trust log:** `
|
|
464
|
+
It always stops at the engineer review (`yad-ship`), which is never automated.
|
|
465
|
+
- **Read the trust log:** `yad-status {epic}` shows each back step's dial, status, and trust record —
|
|
529
466
|
runs, % `approved-unchanged`, and whether that clears the threshold (`automation.trust_threshold` in
|
|
530
467
|
`config.yaml`, default ≥5 runs and ≥80% unchanged). The engineer review records each run's verdict
|
|
531
468
|
(a diff merged as-authored is `approved-unchanged`; one edited first is `approved-with-edits`; a
|
|
532
469
|
failed one is `rejected`).
|
|
533
470
|
- **Earn automation for a step:** once a step's trust record clears the threshold,
|
|
534
|
-
`
|
|
471
|
+
`yad-run action: set-dial step: checks to: machine_advance` flips it. The setter **refuses** if the
|
|
535
472
|
evidence is short, or for any front state / the engineer review. Reverting
|
|
536
473
|
(`to: human_approve`) is always allowed — automation is reversible in one move.
|
|
537
|
-
- **Kill switch:** `
|
|
538
|
-
instantly (no code change, no per-step edits); `
|
|
474
|
+
- **Kill switch:** `yad-run action: kill` forces every step back to `human_approve` system-wide
|
|
475
|
+
instantly (no code change, no per-step edits); `yad-run action: unkill` restores earned automation.
|
|
539
476
|
|
|
540
477
|
**Earned so far:** `checks` (Step B, Phase 4a) and `implement` (Step D, Phase 4b — the
|
|
541
478
|
`implement → check` hand-off; the scope/contract halts and the engineer review still gate the merge).
|
|
@@ -554,5 +491,5 @@ the dial, and **front states and the engineer review stay `human_approve`, perma
|
|
|
554
491
|
unattended, read-only dashboards), built only when the CLI genuinely can't keep up, with git remaining
|
|
555
492
|
the source of truth. It is **trigger-gated** — `docs/phase-5-build-plan.md` is the build plan: its
|
|
556
493
|
three parts (read-index, unattended runner, dashboard) each ship only when *their* bottleneck is
|
|
557
|
-
measured, with the hard rules they inherit and the instrumentation (already shipped in `
|
|
494
|
+
measured, with the hard rules they inherit and the instrumentation (already shipped in `yad-status`)
|
|
558
495
|
that makes the decision data-driven. See also `docs/claude-code-build-plan.md` §8.
|