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