yadflow 4.11.0 → 4.12.0

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +2 -0
  3. package/bin/commands.mjs +2 -0
  4. package/bin/yad.mjs +55 -2
  5. package/cli/agent-rules.mjs +26 -1
  6. package/cli/argv-flags.mjs +1 -1
  7. package/cli/brain/view/index.html +1 -1
  8. package/cli/brain/view/live.html +1 -1
  9. package/cli/brain-view.mjs +5 -4
  10. package/cli/brand-cmd.mjs +326 -0
  11. package/cli/brand.mjs +327 -0
  12. package/cli/doctor.mjs +65 -1
  13. package/cli/guide.mjs +26 -3
  14. package/cli/issues.mjs +9 -3
  15. package/cli/local-page.mjs +2 -2
  16. package/cli/local-setup-record.mjs +71 -0
  17. package/cli/local-setup-steps.mjs +186 -0
  18. package/cli/local-setup.mjs +611 -0
  19. package/cli/manifest.mjs +5 -0
  20. package/cli/map/view/index.html +1 -1
  21. package/cli/map-view.mjs +8 -4
  22. package/cli/plain-text.mjs +22 -0
  23. package/cli/plan.mjs +185 -36
  24. package/cli/reconcile.mjs +53 -11
  25. package/cli/reports-dir.mjs +6 -4
  26. package/cli/scan.mjs +3 -5
  27. package/cli/secret-text.mjs +66 -0
  28. package/cli/setup.mjs +25 -4
  29. package/cli/standup.mjs +8 -2
  30. package/cli/test-brand.mjs +558 -0
  31. package/cli/test-guide.mjs +227 -0
  32. package/cli/test-local-setup.mjs +1188 -0
  33. package/cli/toolbox.mjs +15 -1
  34. package/cli/update-commit.mjs +35 -18
  35. package/cli/usage.mjs +9 -3
  36. package/cli/workspace.mjs +11 -2
  37. package/package.json +3 -3
  38. package/skills/sdlc/module-help.csv +1 -0
  39. package/skills/yad-brand/SKILL.md +69 -0
  40. package/skills/yad-checks/templates/hooks/local-setup-notice.mjs +96 -0
  41. package/skills/yad-checks/templates/hooks/yad-activity.mjs +2 -2
  42. package/skills/yad-guide/SKILL.md +9 -6
package/CHANGELOG.md CHANGED
@@ -1,3 +1,58 @@
1
+ # [4.12.0](https://github.com/abdelrahmannasr/yadflow/compare/v4.11.0...v4.12.0) (2026-11-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **brand:** review round 1 — linear-time reading, a source path inside the Product, safe terminal text (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([6aff2ea](https://github.com/abdelrahmannasr/yadflow/commit/6aff2eafdf065688067236572f24f34bf630f520))
7
+ * **brand:** review round 2 — the dark block read inside itself; primary checked as link text (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([c67e888](https://github.com/abdelrahmannasr/yadflow/commit/c67e888fcc943b95fa6afef519959db54abafe9e)), closes [#9466f8](https://github.com/abdelrahmannasr/yadflow/issues/9466f8)
8
+ * **brand:** review round 3 — DESIGN.md's CSS read as rules in one pass (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([3a363d9](https://github.com/abdelrahmannasr/yadflow/commit/3a363d9257b1758a56bb0d22f6b7e0d9010dea69))
9
+ * **brand:** review round 4 — markdown prose, fences and html.dark read right (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([cac56be](https://github.com/abdelrahmannasr/yadflow/commit/cac56be6846c70dc34819ecead9d3beab4f22dff))
10
+ * **brand:** review round 5 — :not(.dark) is light; a /* in prose is not a comment (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([034c995](https://github.com/abdelrahmannasr/yadflow/commit/034c995689ad0c40f4d3859b71ba43d4c4aad56f))
11
+ * **brand:** review round 6 — a comment after a brace is a comment; nested :not() (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([a390ddc](https://github.com/abdelrahmannasr/yadflow/commit/a390ddc309554b910045cf09d276b3c9559fbe5b))
12
+ * **brand:** review round 7 — a fenced DESIGN.md is read only inside its CSS fences (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([fb908f8](https://github.com/abdelrahmannasr/yadflow/commit/fb908f8a3a022332b0e6defb567517e83ccbfa66))
13
+ * **brand:** review round 8 — fences read as CommonMark does, each on its own (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([5e5d989](https://github.com/abdelrahmannasr/yadflow/commit/5e5d989a7388d8ebf8a76ac41f0e791bea22b8a0))
14
+ * **brand:** review round 9 — the light look is the first :root rule with colours (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([0ee5f21](https://github.com/abdelrahmannasr/yadflow/commit/0ee5f21dbc01b54a3c2646a3a005e509062a6ad5))
15
+ * **local-setup:** CodeQL — refuse `--!>` too, and the version test builds no regex ([1cb4c65](https://github.com/abdelrahmannasr/yadflow/commit/1cb4c65b4de54fb34b76f102d297d360687542bf))
16
+ * **local-setup:** review round 1 — nothing hidden, the view as text, add writes only the team list (E185, part 3) ([558b46a](https://github.com/abdelrahmannasr/yadflow/commit/558b46a59a991f609307939c07db4a77b5aecf30))
17
+ * **local-setup:** review round 1 — the agent sees every command first, upkeep is not only an update, done and skip start no gh they do not need (E185) ([175ba90](https://github.com/abdelrahmannasr/yadflow/commit/175ba908cd56072b8b767603395d2f0b7593328d))
18
+ * **local-setup:** review round 1 — the notice runs yad's own copy in git's folder, never the Product's file (E185, part 4) ([ffaf7f9](https://github.com/abdelrahmannasr/yadflow/commit/ffaf7f90e9901ae9505f85e673c4f1451ebf1212))
19
+ * **local-setup:** review round 1 — vetted only by hash, markers refused, commands shown exactly (E185) ([936aeac](https://github.com/abdelrahmannasr/yadflow/commit/936aeac0549602624a294a8bca3ee3307c46930b))
20
+ * **local-setup:** review round 2 — a person step's commands are the person's, upkeep hands over person steps, done and skip run no extra checks (E185) ([fc1dea6](https://github.com/abdelrahmannasr/yadflow/commit/fc1dea64db806f9cbbaee073bbfcc6e37f5139fb))
21
+ * **local-setup:** review round 2 — nested secrets found, toolbox files read as before, the invite is update's (E185, part 3) ([03b9a1d](https://github.com/abdelrahmannasr/yadflow/commit/03b9a1d45f70a148a2462ae3acb004044fdf7e7d))
22
+ * **local-setup:** review round 2 — the notice in a linked worktree, a hand-wired hook, off removes any copy (E185, part 4) ([6d36755](https://github.com/abdelrahmannasr/yadflow/commit/6d367554cb1169c9056fe2a279de644eb5178fdf))
23
+ * **local-setup:** review round 2 — version skew, the view's PR rule, invisible characters (E185) ([8f1007f](https://github.com/abdelrahmannasr/yadflow/commit/8f1007f38bda4cb77a159fda3a48dfcd875cbd69))
24
+ * **local-setup:** review round 3 — --api-key= found again, every bit of HTML in the view escaped (E185, part 3) ([be6da2f](https://github.com/abdelrahmannasr/yadflow/commit/be6da2f7908b693e95e06323adada50f0ffcc80f))
25
+ * **local-setup:** review round 3 — "not vetted" never softened, no lowered CLI version (E185) ([5b724ef](https://github.com/abdelrahmannasr/yadflow/commit/5b724ef1e313512c6deee26ce04b1f296b7d06b3))
26
+ * **local-setup:** review round 3 — a husky hook with yad's line is wired; only a real line counts (E185, part 4) ([f1180a9](https://github.com/abdelrahmannasr/yadflow/commit/f1180a9db2d0e730d96364fd4498a81c963aacd7))
27
+ * **local-setup:** review round 4 — a hand-wired hook is read where git runs it (E185, part 4) ([0772ec1](https://github.com/abdelrahmannasr/yadflow/commit/0772ec19134c46113099c7c3a1b7d145a4c9e51e))
28
+ * **local-setup:** review round 4 — a quoted value is read whole; an empty value is not a secret (E185, part 3) ([47b7ff4](https://github.com/abdelrahmannasr/yadflow/commit/47b7ff4a1a03aa4dd381c850748c6f857950437d))
29
+ * **local-setup:** review round 4 — the machine section names unvetted steps, plain spaces only (E185) ([2006cdd](https://github.com/abdelrahmannasr/yadflow/commit/2006cddc402e6f1862e743979307a21c2ed1db5a))
30
+ * **local-setup:** review round 5 — a hook file with any carriage return is not wired (E185, part 4) ([9728616](https://github.com/abdelrahmannasr/yadflow/commit/9728616a35132a0f104999bb5e76d46957ded3b7))
31
+ * **local-setup:** review round 5 — a prompt's closing quote opens nothing; a quoted & value is a secret (E185, part 3) ([fc38d5e](https://github.com/abdelrahmannasr/yadflow/commit/fc38d5ecfef711506ed7044a3f98e22dcfbc99d2))
32
+ * **local-setup:** review round 5 — the unvetted bucket named directly, tested, and in --json (E185) ([3b9f36b](https://github.com/abdelrahmannasr/yadflow/commit/3b9f36bafe01b113a3bad32de36bcd853433b568))
33
+ * **local-setup:** review round 6 — a prompt before ; is not a secret, nor a bare query flag (E185, part 3) ([6a32b28](https://github.com/abdelrahmannasr/yadflow/commit/6a32b2878fc495d8000fe46892f1556900dae141))
34
+ * **local-setup:** review round 7 — a quoted value that starts with ; is a secret again (E185, part 3) ([b4cecd4](https://github.com/abdelrahmannasr/yadflow/commit/b4cecd4499fc5689e6ae52f9a50e8f3095cb0664))
35
+ * **local-setup:** review round 8 — a prompt with no space after ; or && is not a secret (E185, part 3) ([84d4256](https://github.com/abdelrahmannasr/yadflow/commit/84d4256e818eb2787eb42d24e35d50a090fcc970))
36
+ * **update:** a shared file the Product gitignores gets no row asking to commit it ([#555](https://github.com/abdelrahmannasr/yadflow/issues/555)) ([7a26f0f](https://github.com/abdelrahmannasr/yadflow/commit/7a26f0f495d47d9c2b876a1c6ce1ab45a02d0fc1))
37
+ * **update:** review round 1 — only a committed ignore rule is the team's; each shared file names what was left out ([#555](https://github.com/abdelrahmannasr/yadflow/issues/555)) ([1bc0b7b](https://github.com/abdelrahmannasr/yadflow/commit/1bc0b7b3747b2b348319a3a9cebcbb86de315ea6))
38
+ * **update:** review round 2 — the team's rule is a line the committed ignore file holds ([#555](https://github.com/abdelrahmannasr/yadflow/issues/555)) ([38795e9](https://github.com/abdelrahmannasr/yadflow/commit/38795e9c7c4e3a4c04fa2c71f7e8b85f45793624))
39
+ * **update:** review round 3 — the committed ignore file is read as git reads it ([#555](https://github.com/abdelrahmannasr/yadflow/issues/555)) ([b315bc0](https://github.com/abdelrahmannasr/yadflow/commit/b315bc00e14ece84700588fae822addf0804bc79))
40
+ * **update:** review round 4 — an ignore file's lines read by one helper that trims as git does ([#555](https://github.com/abdelrahmannasr/yadflow/issues/555)) ([989bcd6](https://github.com/abdelrahmannasr/yadflow/commit/989bcd63cedd3d2386ed4550f31d50f7104933b5))
41
+
42
+
43
+ ### Features
44
+
45
+ * **brand:** every page yad makes wears the Product's brand (E184, [#553](https://github.com/abdelrahmannasr/yadflow/issues/553)) ([924dd18](https://github.com/abdelrahmannasr/yadflow/commit/924dd184399e4b6580285e0b61857753048ed643))
46
+ * **doctor:** the local setup notice after a pull, in this clone (E185, part 4) ([d9cb264](https://github.com/abdelrahmannasr/yadflow/commit/d9cb264e2cf75087307163f8758e25760d3fa151))
47
+ * **doctor:** the local setup steps waiting on this machine, and a record it cannot read (E185, part 2) ([0043520](https://github.com/abdelrahmannasr/yadflow/commit/0043520b8aaef00a56053c13c87ab803996122e0))
48
+ * **guide:** local setup steps waiting for this machine ride the upkeep, and the local-setup rule (E185, part 2) ([eef939c](https://github.com/abdelrahmannasr/yadflow/commit/eef939ca18c54a14d66dd524f61cf10576e47712))
49
+ * **local-setup:** a one-line notice after a pull brings new local setup steps (E185, part 4) ([84b9860](https://github.com/abdelrahmannasr/yadflow/commit/84b9860b05964ecb4c11a59a0f6c168de3861806))
50
+ * **local-setup:** a step stays readable, and text that holds a secret is found (E185, part 3) ([5acc495](https://github.com/abdelrahmannasr/yadflow/commit/5acc4955550dbb23343c363b06fa6fd5cb3a71ea))
51
+ * **local-setup:** the agent proposes the project's own steps; the machine section says how to add them (E185, part 3) ([5fd8742](https://github.com/abdelrahmannasr/yadflow/commit/5fd8742682f4e7fa3c1b5f895b9bbfd330906048))
52
+ * **local-setup:** the local setup script and yad local-setup list (E185) ([97715bb](https://github.com/abdelrahmannasr/yadflow/commit/97715bbf92653e191b2f408750859ef7b0888eea))
53
+ * **local-setup:** this machine's record, and yad local-setup done and skip (E185, part 2) ([ce9226b](https://github.com/abdelrahmannasr/yadflow/commit/ce9226ba056021ac46120f7f21448bcdcae51eca))
54
+ * **local-setup:** yad local-setup add and remove, for the team's own steps (E185, part 3) ([c745184](https://github.com/abdelrahmannasr/yadflow/commit/c7451846cfc208da184ed7445e00fe9c2246e3f4))
55
+
1
56
  # [4.11.0](https://github.com/abdelrahmannasr/yadflow/compare/v4.10.0...v4.11.0) (2026-11-14)
2
57
 
3
58
 
package/README.md CHANGED
@@ -306,6 +306,8 @@ The record is worth trusting because people approve what goes into it.
306
306
  - `yad reports`, the reports you saved (standup, usage, issues, the brain view page, the progress map), kept on your machine only in `<product>--reports/` beside the Product, each named by date, kind, scope and state, and marked fresh or stale
307
307
  - `yad detect`, which lists the skills, agents, MCP servers and plugins installed for each AI agent
308
308
  - `yad toolbox list`, which shows the external tools yadflow can use, which ones you have, and what happens without each; `yad toolbox add` / `remove` record the tools your team uses, and `yad toolbox check` lists the ones not ready on your machine (`yad setup`, `check`, `update` and `join` print the same list, and never install anything without asking: your agent can connect a tool after one yes, with `yad toolbox connect`); each skill that uses a tool reads the same answer and says what it does without it
309
+ - `yad local-setup`, which lists the steps each team member's machine needs for this project — from the Product's `LOCAL-SETUP.md` script — each with why it is needed and what it changes for you, and whether it is done here; `yad local-setup done` and `skip` record your answer on this machine, so after an update only new or changed steps are asked; `yad local-setup add` and `remove` change your team's own steps, which the agent proposes at the first setup; after a `git pull` that brings new steps, one line says so (E185)
310
+ - `yad brand`, which makes every page yad makes for the Product (the progress map, the brain view, the standup, usage and issues reports, the reports catalog) wear the Product's own logo, colours and fonts, from one small committed file, `.sdlc/brand.json`, that `yad brand init` fills from DESIGN.md; with none, the pages wear yadflow's look (E184)
309
311
  - `yad skill recommend`, which lists hand-picked skills from the recommended skill collections for each step, why each fits, and the command to bind one; it binds nothing, and every pick was checked against its source
310
312
  - draft saving, claims and owners
311
313
  - the CI checks
package/bin/commands.mjs CHANGED
@@ -37,6 +37,7 @@ export { runMemberAdd, runMemberList, runMemberRemove } from '../cli/members.mjs
37
37
  export { runWorktreeAdd, runWorktreeList, runWorktreeRemove } from '../cli/worktree.mjs';
38
38
  export { runStandup, foreignFlags as standupForeignFlags } from '../cli/standup.mjs';
39
39
  export { runReports } from '../cli/reports.mjs';
40
+ export { runBrand, BRAND_USAGE } from '../cli/brand-cmd.mjs';
40
41
  export { runMap, MAP_USAGE } from '../cli/map-view.mjs';
41
42
  export { runIssuesNew, runIssuesAssign, runIssuesLabel, runIssuesEdit, runIssuesComment, runIssuesClose, runIssuesReopen, ACT_ACTIONS, actForeignFlags } from '../cli/issues-act.mjs';
42
43
  export { runFoundationPublish } from '../cli/foundation-publish.mjs';
@@ -55,6 +56,7 @@ export { runDocs } from '../cli/docs.mjs';
55
56
  export { runDetect } from '../cli/detect.mjs';
56
57
  export { runToolboxAdd, runToolboxCheck, runToolboxList, runToolboxRemove } from '../cli/toolbox.mjs';
57
58
  export { runToolboxConnect } from '../cli/toolbox-connect.mjs';
59
+ export { runLocalSetupList, runLocalSetupDone, runLocalSetupSkip, runLocalSetupAdd, runLocalSetupRemove } from '../cli/local-setup.mjs';
58
60
  export { runDoctor } from '../cli/doctor.mjs';
59
61
  export { runSigningCheck } from '../cli/signing.mjs';
60
62
  export { runCiCheck } from '../cli/ci-check.mjs';
package/bin/yad.mjs CHANGED
@@ -176,6 +176,15 @@ ${c.bold('Progress map')} ${c.dim('(E181 — read-only; names as roles, no score
176
176
  only), --json. The Production branch is "map.production" in
177
177
  product.json, else guessed (and the page says so)
178
178
 
179
+ ${c.bold('Brand')} ${c.dim('(E184 — the look every page yad makes wears)')}
180
+ yad brand [show] [--json] The brand the pages wear: the Product's (.sdlc/brand.json) or
181
+ yadflow's, with its colours, fonts, logo and any problem
182
+ yad brand init [--from <DESIGN.md>] [--logo <file>] [--mark <file>] [--force]
183
+ Make .sdlc/brand.json from the Product's DESIGN.md (its YAML
184
+ front matter or :root block); says each colour it found and
185
+ each it did not. For prose, ask the agent (yad-brand skill)
186
+ yad brand check [--json] Is the brand file usable, readable (contrast) and current
187
+
179
188
  ${c.bold('Saved reports')} ${c.dim('(E180 — on this machine only, never committed)')}
180
189
  yad reports [list] [--json] Every report saved in the local reports folder, newest first, each
181
190
  marked fresh or stale (the Product changed since it was made).
@@ -278,6 +287,19 @@ ${c.bold('Where am I / what next')}
278
287
  are yours, and the question to ask. Runs nothing. --verify
279
288
  checks it is found here, then records it as the team's choice;
280
289
  --replace when that replaces the team's current tool
290
+ yad local-setup [list] [--json] The local setup script (E185): the steps each team member's
291
+ machine needs (.sdlc/local-setup.json, shown in LOCAL-SETUP.md),
292
+ each with why and what it changes, and whether it is done here.
293
+ Runs only yad's own checks, never a step
294
+ yad local-setup done <id>… Record on this machine that you did these steps (a step yad can
295
+ check must pass its check first)
296
+ yad local-setup skip <id> --reason <text> Record that you said no to a step; it is asked again
297
+ only when the step changes. Both write inside .git, never a file
298
+ anyone commits
299
+ yad local-setup add --from <step.json> Add one of your team's steps (a JSON object: id, title,
300
+ purpose, impact, when, commands, and check, verify, person if
301
+ wanted) to the script and LOCAL-SETUP.md; commit both
302
+ yad local-setup remove <id> Take one of your team's steps out again
281
303
  yad detect [--json] [--dir <folder>] Which skills, agents, MCP servers and plugins are installed
282
304
  for the agents that work here — in this folder and in your
283
305
  home folder, and which agents read each place. Read-only;
@@ -712,6 +734,7 @@ const ACTIONS = {
712
734
  reconcile: { known: ['check', 'refresh', 'wire'] },
713
735
  hook: { known: ['ledger-guard', 'agent-guard'] },
714
736
  toolbox: { known: ['list', 'check', 'add', 'remove', 'connect'], default: 'list' },
737
+ 'local-setup': { known: ['list', 'done', 'skip', 'add', 'remove'], default: 'list' },
715
738
  signing: { known: ['check'], default: 'check' },
716
739
  ci: { known: ['check'], default: 'check' },
717
740
  member: { known: ['add', 'list', 'remove'], default: 'list' },
@@ -721,6 +744,7 @@ const ACTIONS = {
721
744
  run: { known: ['checks'] },
722
745
  build: { known: ['start', 'step', 'trust', 'ship', 'merged', 'done', 'sync'] },
723
746
  reports: { known: ['list', 'open', 'prune'], default: 'list' },
747
+ brand: { known: ['show', 'init', 'check'], default: 'show' },
724
748
  };
725
749
  // E80 — how each command finds its folder. A PRODUCT command works on the Product; a REPO command works
726
750
  // on the code repo it runs in and reads the Product beside it. The rest take their folder as given:
@@ -730,7 +754,7 @@ const PRODUCT_CMDS = new Set([
730
754
  'skip', 'unskip', 'defer', 'undefer', 'dial', 'mode', 'kill', 'unkill', 'unblock', 'gate', 'checkpoint',
731
755
  'capture', 'claims', 'assign', 'unassign', 'owners', 'fold', 'tidy', 'index', 'history', 'repo',
732
756
  'risk-map', 'codeowners', 'docs', 'thread', 'reconcile', 'member', 'standup', 'issues', 'scan', 'build', 'worktree', 'ci',
733
- 'story', 'brain', 'reports', 'map',
757
+ 'story', 'brain', 'reports', 'map', 'local-setup', 'brand',
734
758
  ]);
735
759
  // `status` reads the Product but must keep the folder it ran in: "here" is that checkout's task branch (#349).
736
760
  const REPO_CMDS = new Set(['commit', 'open-pr', 'ship', 'review', 'run', 'status', 'guide']);
@@ -748,6 +772,10 @@ function writesProduct(cmd, o) {
748
772
  if (cmd === 'brain') return action === 'build' || (action === 'view' && !!o.html);
749
773
  if (cmd === 'epic' || cmd === 'foundation') return action === 'new';
750
774
  if (cmd === 'skill') return action === 'bind' || action === 'unbind';
775
+ // `local-setup add|remove` write the Product's committed script (E185 part 3).
776
+ if (cmd === 'local-setup') return action === 'add' || action === 'remove';
777
+ // `brand init` writes the Product's .sdlc/brand.json: only into a Product found (review 1).
778
+ if (cmd === 'brand') return action === 'init';
751
779
  if (cmd === 'dial') return o.to !== undefined;
752
780
  if (cmd === 'member') return o._[1] === 'add' || o._[1] === 'remove';
753
781
  if (cmd === 'worktree') return o._[1] === 'add' || o._[1] === 'remove';
@@ -947,7 +975,7 @@ async function main() {
947
975
  if (noProduct()) break;
948
976
  if (o.push && o.openPr) { refuse('--push and --open-pr publish the update two different ways — pick one', 'use --open-pr for a branch and a PR/MR per repo, or --push to push straight to each default branch'); break; }
949
977
  if (o.openPr && o.allowBranch) { refuse('--allow-branch does not apply to --open-pr: the update branch is cut from each repo\'s default branch', 'switch each repo to its default branch, then run it again'); break; }
950
- result = await commands.reconcile(o.dir, { fix: true, scope: 'changed', force: o.force, push: o.push, openPr: o.openPr, allowBranch: o.allowBranch, overwriteLocal: o.overwriteLocal, today, toolbox: toolboxAt });
978
+ result = await commands.reconcile(o.dir, { fix: true, scope: 'changed', force: o.force, push: o.push, openPr: o.openPr, allowBranch: o.allowBranch, overwriteLocal: o.overwriteLocal, today, toolbox: toolboxAt, invite: true });
951
979
  break;
952
980
  case 'doctor':
953
981
  result = await commands.runDoctor(o.dir, { json: o.json });
@@ -1033,6 +1061,24 @@ async function main() {
1033
1061
  : commands.runToolboxRemove(productRoot, { id, custom: o.custom, role: o.role, fallback: o.fallback, detect: o.detect, install: o.install, source: o.source, json: o.json });
1034
1062
  break;
1035
1063
  }
1064
+ case 'local-setup': {
1065
+ // E185. `list` reads the Product's committed script and runs yad's own checks for this machine. `done` and
1066
+ // `skip` write only this machine's answers, inside git's own folder (cli/local-setup-record.mjs).
1067
+ const [, action = 'list', ...words] = o._;
1068
+ const usage = 'usage: yad local-setup [list] [--json] | done <id>… | skip <id> --reason "<why>" | add --from <step.json> | remove <id> [--dir <the Product>]';
1069
+ if (!['list', 'done', 'skip', 'add', 'remove'].includes(action)) { refuse(`unknown local-setup action: ${action} (list, done, skip, add, remove)`, usage); break; }
1070
+ if (action === 'add' && words.length) { refuse(`yad local-setup add takes the step from --from <step.json>, not words (got: ${words.join(' ')})`, usage); break; }
1071
+ if (action !== 'add' && o.from !== undefined) { refuse('--from goes with yad local-setup add', usage); break; }
1072
+ if (action === 'list' && words.length) { refuse(`yad local-setup list takes no more words (got: ${words.join(' ')})`, usage); break; }
1073
+ if (action !== 'skip' && o.reason !== undefined) { refuse(`--reason goes with yad local-setup skip`, usage); break; }
1074
+ if (!commands.hasProduct(o.dir)) { refuse(`no Product here (${o.dir}) — the local setup script is the Product's .sdlc/local-setup.json`, 'run it from the Product, or from a repo it registers'); break; }
1075
+ result = action === 'list' ? commands.runLocalSetupList(o.dir, { json: o.json })
1076
+ : action === 'done' ? commands.runLocalSetupDone(o.dir, { ids: words, json: o.json })
1077
+ : action === 'skip' ? commands.runLocalSetupSkip(o.dir, { ids: words, reason: o.reason, json: o.json })
1078
+ : action === 'add' ? commands.runLocalSetupAdd(o.dir, { from: o.from, json: o.json })
1079
+ : commands.runLocalSetupRemove(o.dir, { ids: words, json: o.json });
1080
+ break;
1081
+ }
1036
1082
  case 'detect': {
1037
1083
  // E50. Reads the folder and the home folder; writes nothing.
1038
1084
  const [, extra] = o._;
@@ -1405,6 +1451,13 @@ async function main() {
1405
1451
  result = await commands.runMap(o.dir, { args: o._.slice(1), html: !!o.html, open: !!o.open, live: !!o.live, anonymous: !!o.anonymous, fetch: !!o.fetch, json: !!o.json });
1406
1452
  break;
1407
1453
  }
1454
+ case 'brand': {
1455
+ // E184. The Product's brand file; `init` writes it, the rest read.
1456
+ const [, action, ...args] = o._;
1457
+ if (noProduct()) break;
1458
+ result = await commands.runBrand(o.dir, { action: action || 'show', args, from: o.from ?? null, logo: o.logo ?? null, mark: o.mark ?? null, force: !!o.force, json: !!o.json });
1459
+ break;
1460
+ }
1408
1461
  case 'reports': {
1409
1462
  // E180. The local reports folder; nothing here touches the Product or any repo.
1410
1463
  const [, action, ...args] = o._;
@@ -92,6 +92,15 @@ export const COMMAND_CLASS = {
92
92
  // records the team's choice — a team-wide file, as `toolbox add` writes — so only on the person's yes to
93
93
  // the question the read gave (the connect-tool rule); --replace changes the team's current tool.
94
94
  'toolbox connect': { class: 'read', flags: { verify: 'on-request', replace: 'on-request' } },
95
+ // E185: `list` reads the Product's local setup script and runs yad's own checks for this machine; `done` and
96
+ // `skip` record this machine's answers inside .git. None runs a step. A no is the person's: `skip` on request.
97
+ 'local-setup done': { class: 'local-write' },
98
+ 'local-setup list': { class: 'read' },
99
+ 'local-setup skip': { class: 'on-request' },
100
+ // E185 part 3: add and remove write the team's steps into the committed script, which reaches every member's
101
+ // agent — so only when the person asks, as `toolbox add`.
102
+ 'local-setup add': { class: 'on-request' },
103
+ 'local-setup remove': { class: 'on-request' },
95
104
  'skill list': { class: 'read' },
96
105
  'skill recommend': { class: 'read' },
97
106
  'skill bind': { class: 'on-request' },
@@ -184,6 +193,11 @@ export const COMMAND_CLASS = {
184
193
  'reports list': { class: 'read' },
185
194
  'reports open': { class: 'local-write' },
186
195
  'reports prune': { class: 'read', flags: { apply: 'on-request' } },
196
+ // E184: `brand` and `brand check` read; `brand init` writes the Product's committed brand file (and `--force`
197
+ // replaces the team's edits), so only when the person asks — as `toolbox add` and `skill bind` (review 1).
198
+ 'brand show': { class: 'read' },
199
+ 'brand check': { class: 'read' },
200
+ 'brand init': { class: 'on-request' },
187
201
  'issues list': { class: 'read' },
188
202
  // Adds labels on the team's repos: asked for, never a side effect.
189
203
  'issues labels': { class: 'on-request' },
@@ -260,7 +274,7 @@ const stronger = (a, b) => (STRENGTH.indexOf(b) > STRENGTH.indexOf(a) ? b : a);
260
274
  export const DEFAULT_ACTION = {
261
275
  skill: 'list', history: 'list', repo: 'list', 'risk-map': 'check', codeowners: 'check', docs: 'list',
262
276
  toolbox: 'list', member: 'list', issues: 'list', worktree: 'list', signing: 'check', ci: 'check', brain: 'status',
263
- reports: 'list',
277
+ reports: 'list', 'local-setup': 'list', brand: 'show',
264
278
  };
265
279
 
266
280
  // The entry for a command line's words: `<cmd> <action>` when it has one, else `<cmd>` (or its default action).
@@ -325,6 +339,7 @@ export const RULES = [
325
339
  { id: 'pushes', text: 'Commit, push your own branch, and open a review PR/MR without asking. Open a task PR/MR without asking only when `yad dial open-pr` is `auto`; otherwise ask first. Ask every time, right before anything that pushes straight to the default branch: say what it will push (the branch and the commits), and wait for a yes given then. A request made earlier, or "don\'t ask", is not that yes. Never force-push.' },
326
340
  { id: 'on-request', text: 'Run a command the guide classes `on-request` only when the person asked for that exact change or gave you what it records: `yad dial … --to`, `yad mode solo|team`, `yad kill`, `yad unkill`, `yad skip`, `yad defer`, `yad unblock`, `yad setup`/`new`/`init` (with the answers the person gave to the questions the guide lists), `yad skill bind`, `yad toolbox add`, `yad toolbox connect --verify` (after the yes the connect-tool rule asks for), a flag that passes a guard (`--force`, `--overwrite-local`, `--allow-branch`), and the others the guide marks.' },
327
341
  { id: 'connect-tool', text: 'Offer to connect a tool when yad hands you its `connect` command (a toolbox finding in `yad setup`, `check` or `update`, a `yad doctor` hint, or a design preflight) or a skill says to: one tool, one question — ask once per tool in a run, whichever offer comes first, and never again after a no. To connect a tool (install it on this machine and record it as the team\'s choice), run `yad toolbox connect <tool> --json` first and show the person its `ask` word for word. Ask once; go on only on a yes. Then run exactly its `agent` steps, in order, with no other source, version or flag; hand over its `person` steps with their `why`, and wait for them. Then run the `verify` command it gave (`--replace` is in it only when the question said what it replaces). If a step fails, stop and show the person its output; never try another way to install it. A new MCP server is loaded when the agent starts: if `verify` passed but your session does not see the server (in Claude Code, `/mcp`), tell the person to restart the agent and run the step again (for a design or testing tool, its connect skill with `action: refresh` and the same `tool` first); never record the tool as unavailable for that. A step that names `claude` or `claude-code` is Claude Code\'s: with another agent, hand every step to the person.' },
342
+ { id: 'local-setup', text: 'When yad says local setup steps are waiting for this machine (`yad setup`, `update`, `check`, `join`, `doctor`, or the guide\'s `upkeep`), run `yad local-setup list --json`. Go through the steps whose `state` is `pending` or `ask`, one at a time: tell the person its `title`, its `purpose`, its `impact` (what it changes for them), whether its `when` is `required` or `optional`, and show its `commands` word for word (and, for a team step, its `check.run`). When its `source` is `team`, or `vetted` is false, say "written by your team, not vetted by yadflow" (or "not what this yadflow writes" when `known` is false). The person decides each step. Run nothing a step names (its `commands`, `verify` or `check.run`) before their yes to that step; a `person: true` step is theirs to run (a login, a key): hand it to them with its commands, and wait until they say it is done. After the yes, run the `commands` of a step that is not `person: true`; then (for a person step, once they say it is done) run its `verify` command, and `yad local-setup done <id>`. On a no, run `yad local-setup skip <id> --reason "<their words>"`. For a step whose `state` is `ok` and `recorded` is false, run `yad local-setup done <id>` without asking. When `yad setup` or `update` says your team has no steps of its own yet (or the person asks), look for what a member\'s machine needs for this project that the list does not cover (a `.env.example` to copy, `docker-compose.yml`, the Node version in `.nvmrc`, a `make setup`, the README\'s setup section) and propose each as a step: its title, purpose, impact, `required` or `optional`, and its commands word for word, and say that a step they accept is committed and offered to every member\'s agent. Never put a secret value in a step: name where it comes from (an environment variable, the team\'s vault). Add only the steps the person says yes to: write each to a file outside the repo and run `yad local-setup add --from <file>`; `.sdlc/local-setup.json` and `LOCAL-SETUP.md` then go in a commit like any other change. Never edit those two files by hand: `add` and `remove` change the team\'s steps.' },
328
343
  { id: 'build-halts', text: 'A Build step the yad-run skill halted (`blocked`: a failing check, a scope overrun, a contract touch) waits for the person: never move it on (`yad build step … in_progress`) until they say it is resolved.' },
329
344
  { id: 'never-by-hand', text: 'Never hand-write `.sdlc/` files, approvals, or text between yad markers; only `yad` commands and the yad-* skills change them.' },
330
345
  { id: 'record-truly', text: 'When you record Build work you did yourself, say so: `yad build step … --via auto` and `yad build trust … --ran-by machine`, as the yad-run skill does. The defaults record a person\'s work.' },
@@ -439,6 +454,16 @@ export const SHIPPED_ALLOW_LISTS = Object.freeze([
439
454
  'gate status', 'gate review', 'gate walkthrough', 'review context', 'review chat', 'review cards', 'review walkthrough', 'member list',
440
455
  'worktree list', 'reports list', 'claims', 'owners', 'history list', 'history show', 'history search', 'repo list', 'risk-map check', 'codeowners check', 'story frames', 'docs list',
441
456
  'thread', 'reconcile check'].map((k) => `Bash(yad ${k}:*)`),
457
+ // next release (E185): `local-setup list`
458
+ ['guide', 'help', 'doctor', 'detect', 'signing check', 'ci check', 'toolbox list', 'toolbox check', 'local-setup list', 'skill list', 'skill recommend', 'foundation status', 'status', 'next',
459
+ 'gate status', 'gate review', 'gate walkthrough', 'review context', 'review chat', 'review cards', 'review walkthrough', 'member list',
460
+ 'worktree list', 'reports list', 'claims', 'owners', 'history list', 'history show', 'history search', 'repo list', 'risk-map check', 'codeowners check', 'story frames', 'docs list',
461
+ 'thread', 'reconcile check'].map((k) => `Bash(yad ${k}:*)`),
462
+ // next release (E184, #553): `brand show`, `brand check`
463
+ ['guide', 'help', 'doctor', 'detect', 'signing check', 'ci check', 'toolbox list', 'toolbox check', 'local-setup list', 'skill list', 'skill recommend', 'foundation status', 'status', 'next',
464
+ 'gate status', 'gate review', 'gate walkthrough', 'review context', 'review chat', 'review cards', 'review walkthrough', 'member list',
465
+ 'worktree list', 'reports list', 'brand show', 'brand check', 'claims', 'owners', 'history list', 'history show', 'history search', 'repo list', 'risk-map check', 'codeowners check', 'story frames', 'docs list',
466
+ 'thread', 'reconcile check'].map((k) => `Bash(yad ${k}:*)`),
442
467
  ].map((list) => Object.freeze(list)));
443
468
 
444
469
  // Entries an older yadflow pre-approved that this one does not (a command later reclassed as a write, say).
@@ -1,7 +1,7 @@
1
1
  // The flags `yad` reads a value after (`--dir <path>`), and those it reads a list of (`--approver a --approver b`).
2
2
  // Shared by the parser in bin/yad.mjs and the agent guard (cli/agent-guard.mjs), which must read a command line
3
3
  // the way yad does: `yad --dir ../product gate approve …` is still `gate approve`. `-m` takes a value too.
4
- export const VALUE_FLAGS = new Set(['--dir', '--issue', '--body-file', '--priority', '--status', '--assignee', '--date', '--sort', '--closed-since', '--type', '--message', '--task', '--ai', '--risk', '--repo', '--platform', '--base', '--title', '--scope', '--branch', '--pr', '--epic', '--team', '--body', '--out', '--since', '--until', '--member', '--format', '--reason', '--profile', '--parent', '--inherits', '--to', '--retro-ship', '--merge-commit', '--path', '--ide-targets', '--theme', '--thread', '--by', '--count', '--engagement', '--keep', '--role', '--fallback', '--detect', '--install', '--source', '--tz', '--verdict', '--ran-by', '--note', '--uid', '--run', '--via', '--kind', '--confirm', '--limit', '--older-than',
4
+ export const VALUE_FLAGS = new Set(['--dir', '--issue', '--body-file', '--priority', '--status', '--assignee', '--date', '--sort', '--closed-since', '--type', '--message', '--task', '--ai', '--risk', '--repo', '--platform', '--base', '--title', '--scope', '--branch', '--pr', '--epic', '--team', '--body', '--out', '--since', '--until', '--member', '--format', '--reason', '--profile', '--parent', '--inherits', '--to', '--retro-ship', '--merge-commit', '--path', '--ide-targets', '--theme', '--thread', '--by', '--count', '--engagement', '--keep', '--role', '--fallback', '--detect', '--install', '--source', '--tz', '--verdict', '--ran-by', '--note', '--uid', '--run', '--via', '--kind', '--confirm', '--limit', '--older-than', '--from', '--logo', '--mark',
5
5
  // E159: the setup answers an agent passes after asking the person.
6
6
  '--default-branch', '--design', '--design-url', '--testing', '--testing-url', '--learning', '--connect', '--coderabbit']);
7
7
  export const LIST_FLAGS = new Set(['--signal', '--approver', '--add-repo', '--label', '--add', '--remove']);
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self'; base-uri 'none'; form-action 'none'">
6
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src data:; connect-src 'self'; base-uri 'none'; form-action 'none'">
7
7
  <meta name="referrer" content="no-referrer">
8
8
  <title>Project brain</title>
9
9
  <link rel="stylesheet" href="style.css?t=__TOKEN__">
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self'; base-uri 'none'; form-action 'none'">
6
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src data:; connect-src 'self'; base-uri 'none'; form-action 'none'">
7
7
  <meta name="referrer" content="no-referrer">
8
8
  <title>Project brain, live</title>
9
9
  <link rel="stylesheet" href="style.css?t=__TOKEN__">
@@ -30,6 +30,7 @@ import { CSP, TYPES, startPageServer, inlineSnapshot, scriptSafeJSON, writeOwnFi
30
30
  import { saveReport } from './reports-dir.mjs';
31
31
  import { VENDORED } from './brain-vendor.mjs';
32
32
  import { openUrl } from './report.mjs';
33
+ import { brandForPage } from './brand.mjs';
33
34
  export { CSP, scriptSafeJSON };
34
35
  import { activityIndex, activitySources, follow, matchEvent, planOf, readBacklog } from './brain-activity.mjs';
35
36
  import { activityWanted } from './plan.mjs';
@@ -255,7 +256,7 @@ export function startBrainServer(root, { runner = run, host = '127.0.0.1', port
255
256
  const routes = (token) => new Map([
256
257
  ['/', () => ({ type: TYPES.html, body: readView(page.html).replaceAll('__TOKEN__', token) })],
257
258
  ['/app.js', () => ({ type: TYPES.js, body: readView(page.js) })],
258
- ['/style.css', () => ({ type: TYPES.css, body: readView(page.css) })],
259
+ ['/style.css', () => ({ type: TYPES.css, body: `${readView(page.css)}\n${brandForPage(root, live ? 'live' : 'brain').css}` })],
259
260
  ['/graph.json', () => {
260
261
  const m = loadModel(root, runner, { live });
261
262
  return m.model
@@ -272,10 +273,10 @@ export function startBrainServer(root, { runner = run, host = '127.0.0.1', port
272
273
 
273
274
  // One HTML file with everything inline, and a CSP that allows exactly the inline blocks it holds (by hash)
274
275
  // and no network at all (cli/local-page.mjs).
275
- export function snapshotHTML(model, { live = false } = {}) {
276
+ export function snapshotHTML(model, { live = false, brandCss = '' } = {}) {
276
277
  const page = live ? LIVE_PAGE : PAGE;
277
278
  const scripts = [...VENDORED.map((v) => readVendor(v.file).toString('utf8')), readView(page.js)];
278
- return inlineSnapshot({ shell: readView(page.html), scripts, css: readView(page.css), dataId: 'yad-brain-data', data: model });
279
+ return inlineSnapshot({ shell: readView(page.html), scripts, css: `${readView(page.css)}\n${brandCss}`, dataId: 'yad-brain-data', data: model });
279
280
  }
280
281
 
281
282
  // ---- the command ---------------------------------------------------------------------------------
@@ -297,7 +298,7 @@ export async function runBrainView(root, { args = [], html = false, open = false
297
298
  // E178: `--live` with `--html` is a REPLAY file — the recorded activity embedded, played back offline.
298
299
  if (live) m.model.replay = recordedReplay(root, m.model, runner);
299
300
  let page;
300
- try { page = snapshotHTML(m.model, { live }); } catch (e) { return refuse(`cannot build the page: ${e.message}`, null, { json }); }
301
+ try { page = snapshotHTML(m.model, { live, brandCss: brandForPage(root, live ? 'live' : 'brain').css }); } catch (e) { return refuse(`cannot build the page: ${e.message}`, null, { json }); }
301
302
  const saveWarnings = [];
302
303
  if (own) {
303
304
  const problem = writeOwnFile(file, page);