yadflow 4.9.0 → 4.11.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 (155) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/README.md +15 -5
  3. package/bin/commands.mjs +11 -1
  4. package/bin/yad.mjs +203 -14
  5. package/cli/agent-guard-worker.mjs +13 -0
  6. package/cli/agent-guard.mjs +1797 -73
  7. package/cli/agent-rules.mjs +64 -5
  8. package/cli/argv-flags.mjs +2 -2
  9. package/cli/brain/vendor/LICENSE-graphology-library.txt +21 -0
  10. package/cli/brain/vendor/LICENSE-graphology.txt +21 -0
  11. package/cli/brain/vendor/LICENSE-sigma.txt +12 -0
  12. package/cli/brain/vendor/graphology-library.min.js +2 -0
  13. package/cli/brain/vendor/graphology.umd.min.js +2 -0
  14. package/cli/brain/vendor/sigma.min.js +1369 -0
  15. package/cli/brain/view/app.js +382 -0
  16. package/cli/brain/view/index.html +63 -0
  17. package/cli/brain/view/live.css +228 -0
  18. package/cli/brain/view/live.html +110 -0
  19. package/cli/brain/view/live.js +884 -0
  20. package/cli/brain/view/style.css +141 -0
  21. package/cli/brain-about.mjs +206 -0
  22. package/cli/brain-activity.mjs +285 -0
  23. package/cli/brain-skills.mjs +118 -0
  24. package/cli/brain-vendor.mjs +71 -0
  25. package/cli/brain-view.mjs +344 -0
  26. package/cli/brain.mjs +810 -0
  27. package/cli/ci-check.mjs +48 -4
  28. package/cli/codeowners-command.mjs +72 -6
  29. package/cli/commit.mjs +17 -3
  30. package/cli/docs.mjs +2 -0
  31. package/cli/doctor.mjs +151 -25
  32. package/cli/epic-state.mjs +186 -4
  33. package/cli/epic.mjs +26 -10
  34. package/cli/errors.mjs +2 -1
  35. package/cli/find-product.mjs +69 -15
  36. package/cli/fold.mjs +31 -6
  37. package/cli/foundation-publish.mjs +256 -0
  38. package/cli/gate.mjs +29 -3
  39. package/cli/git-read.mjs +38 -0
  40. package/cli/guard-stream.mjs +409 -0
  41. package/cli/guide.mjs +3 -1
  42. package/cli/hook.mjs +102 -9
  43. package/cli/issue-links.mjs +61 -0
  44. package/cli/issues-act.mjs +371 -0
  45. package/cli/issues-write.mjs +441 -0
  46. package/cli/issues.mjs +513 -0
  47. package/cli/lib.mjs +37 -2
  48. package/cli/lifecycle.mjs +7 -0
  49. package/cli/local-page.mjs +138 -0
  50. package/cli/machine.mjs +1 -1
  51. package/cli/manifest.mjs +59 -3
  52. package/cli/map/view/app.js +712 -0
  53. package/cli/map/view/index.html +50 -0
  54. package/cli/map/view/style.css +142 -0
  55. package/cli/map-view.mjs +186 -0
  56. package/cli/map.mjs +637 -0
  57. package/cli/members.mjs +9 -15
  58. package/cli/next.mjs +1 -1
  59. package/cli/openpr.mjs +26 -6
  60. package/cli/plan.mjs +127 -0
  61. package/cli/platform.mjs +159 -4
  62. package/cli/product-index.mjs +1 -1
  63. package/cli/protection.mjs +53 -3
  64. package/cli/reconcile.mjs +9 -3
  65. package/cli/report.mjs +9 -3
  66. package/cli/reports-dir.mjs +391 -0
  67. package/cli/reports.mjs +65 -0
  68. package/cli/run-checks.mjs +15 -4
  69. package/cli/scan.mjs +314 -0
  70. package/cli/setup.mjs +42 -8
  71. package/cli/standup.mjs +120 -78
  72. package/cli/status.mjs +6 -5
  73. package/cli/story-frames.mjs +17 -6
  74. package/cli/test-agents-file.mjs +985 -12
  75. package/cli/test-brain-activity.mjs +753 -0
  76. package/cli/test-brain-view.mjs +381 -0
  77. package/cli/test-brain.mjs +795 -0
  78. package/cli/test-build.mjs +25 -0
  79. package/cli/test-ci-check.mjs +469 -10
  80. package/cli/test-guide.mjs +218 -0
  81. package/cli/test-machine.mjs +59 -0
  82. package/cli/test-map.mjs +615 -0
  83. package/cli/test-node.mjs +15 -0
  84. package/cli/test-reports.mjs +382 -0
  85. package/cli/test-run-checks.mjs +21 -0
  86. package/cli/test-setup-agent.mjs +14 -0
  87. package/cli/test-story-frames.mjs +74 -4
  88. package/cli/test-worktree.mjs +24 -3
  89. package/cli/toolbox-connect.mjs +259 -0
  90. package/cli/toolbox.mjs +187 -12
  91. package/cli/update-commit.mjs +101 -9
  92. package/cli/usage.mjs +8 -4
  93. package/package.json +12 -4
  94. package/skills/sdlc/config.yaml +1 -1
  95. package/skills/sdlc/module-help.csv +3 -1
  96. package/skills/yad-analysis/SKILL.md +4 -0
  97. package/skills/yad-architecture/SKILL.md +22 -4
  98. package/skills/yad-backfill/SKILL.md +4 -0
  99. package/skills/yad-change/SKILL.md +7 -1
  100. package/skills/yad-change/references/triage.md +2 -0
  101. package/skills/yad-checks/SKILL.md +15 -7
  102. package/skills/yad-checks/references/check-gates.md +70 -35
  103. package/skills/yad-checks/templates/checks/build-test-lint.sh +7 -0
  104. package/skills/yad-checks/templates/checks/install-deps.sh +6 -0
  105. package/skills/yad-checks/templates/checks/member-check.mjs +3 -2
  106. package/skills/yad-checks/templates/checks/package-manager.sh +42 -0
  107. package/skills/yad-checks/templates/checks/risk-map-check.sh +2 -2
  108. package/skills/yad-checks/templates/checks/verified-commits.sh +3 -3
  109. package/skills/yad-checks/templates/github/yad-checks.yml +358 -69
  110. package/skills/yad-checks/templates/github/yad-pr-text.yml +118 -0
  111. package/skills/yad-checks/templates/github/yad-product-checks.yml +130 -54
  112. package/skills/yad-checks/templates/github/yad-product-pr-text.yml +131 -0
  113. package/skills/yad-checks/templates/github/yad-update-guard.yml +2 -1
  114. package/skills/yad-checks/templates/github/yad-verified-commits.yml +49 -3
  115. package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +80 -20
  116. package/skills/yad-checks/templates/gitlab/yad-product-checks.gitlab-ci.yml +59 -9
  117. package/skills/yad-checks/templates/gitlab/yad-update-guard.gitlab-ci.yml +1 -0
  118. package/skills/yad-checks/templates/gitlab/yad-verified-commits.gitlab-ci.yml +49 -1
  119. package/skills/yad-checks/templates/hooks/agent-guard.mjs +44 -10
  120. package/skills/yad-checks/templates/hooks/ledger-guard-cursor.mjs +12 -6
  121. package/skills/yad-checks/templates/hooks/yad-activity.mjs +238 -0
  122. package/skills/yad-commit/SKILL.md +3 -1
  123. package/skills/yad-connect-design/SKILL.md +42 -10
  124. package/skills/yad-connect-design/references/design-context.md +35 -5
  125. package/skills/yad-connect-design/references/design-registry.md +3 -3
  126. package/skills/yad-connect-learning/SKILL.md +12 -2
  127. package/skills/yad-connect-repos/SKILL.md +18 -0
  128. package/skills/yad-connect-testing/SKILL.md +22 -5
  129. package/skills/yad-connect-testing/references/testing-context.md +1 -1
  130. package/skills/yad-discovery/SKILL.md +11 -0
  131. package/skills/yad-discovery/references/foundation-schema.md +11 -0
  132. package/skills/yad-docs/templates/app/package-lock.json +18 -10
  133. package/skills/yad-docs/templates/app/package.json +6 -1
  134. package/skills/yad-epic/SKILL.md +7 -0
  135. package/skills/yad-epic/references/state-schema.md +50 -1
  136. package/skills/yad-guide/SKILL.md +8 -4
  137. package/skills/yad-implement/SKILL.md +117 -4
  138. package/skills/yad-implement/references/implement-conventions.md +2 -1
  139. package/skills/yad-issues/SKILL.md +54 -0
  140. package/skills/yad-learn/SKILL.md +4 -0
  141. package/skills/yad-open-pr/SKILL.md +6 -0
  142. package/skills/yad-pr-template/SKILL.md +2 -1
  143. package/skills/yad-pr-template/templates/checks/pr-template.sh +8 -4
  144. package/skills/yad-pr-template/templates/checks/pr-title.sh +42 -6
  145. package/skills/yad-product-bridge/references/bridge.md +28 -0
  146. package/skills/yad-product-bridge/templates/github/yad-gate-sync.yml +25 -11
  147. package/skills/yad-product-bridge/templates/gitlab/yad-gate-sync.gitlab-ci.yml +38 -14
  148. package/skills/yad-run/SKILL.md +5 -0
  149. package/skills/yad-scan/SKILL.md +51 -0
  150. package/skills/yad-spec/SKILL.md +32 -2
  151. package/skills/yad-stories/SKILL.md +22 -4
  152. package/skills/yad-stories/references/story-schema.md +1 -1
  153. package/skills/yad-test-cases/SKILL.md +18 -2
  154. package/skills/yad-ui/SKILL.md +43 -8
  155. package/skills/yad-checks/templates/gitlab/.gitlab-ci.yml +0 -49
package/cli/report.mjs CHANGED
@@ -159,9 +159,15 @@ const OWN_FLAGS = new Set(['--json', '--post', '--confirm', '--kind']);
159
159
  const withoutOwnFlags = (argv) => argv.filter((a) => !OWN_FLAGS.has(String(a).split('=')[0]));
160
160
 
161
161
  // ---- open a URL (best-effort) -------------------------------------------------------------------
162
- function openUrl(url, { runner = run } = {}) {
163
- const cmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
164
- if (has(cmd)) runner(cmd, [url]);
162
+ // Returns whether an opener was found, so a caller can say "open it yourself" when none was. On Windows
163
+ // `start` is a built-in of cmd.exe, not a program, so it is never on PATH and cannot be spawned without a
164
+ // shell: `explorer.exe` opens a URL or a file in its default app, and takes the argument with no shell to
165
+ // parse it (E177 review 1).
166
+ export function openUrl(url, { runner = run, platform = process.platform, exists = has } = {}) {
167
+ const cmd = platform === 'darwin' ? 'open' : platform === 'win32' ? 'explorer' : 'xdg-open';
168
+ if (!exists(cmd)) return false;
169
+ runner(cmd, [url]);
170
+ return true;
165
171
  }
166
172
 
167
173
  // ---- the flow -----------------------------------------------------------------------------------
@@ -0,0 +1,391 @@
1
+ // The local reports folder (E180).
2
+ //
3
+ // A report shows the state of the work at one moment, and goes stale as soon as the work moves on. So
4
+ // every report yadflow writes — the standup, the usage and issues reports, the brain view page, and
5
+ // later the progress map and the doc sites — is saved on THIS machine only, in one folder beside the
6
+ // Product, and never committed or pushed unless the person asks for that themselves:
7
+ //
8
+ // acme/
9
+ // product/ <- the Product (its main checkout)
10
+ // product--EP-x/ <- a worktree of it (#115) — it saves into the same folder below
11
+ // product--reports/ <- the reports folder
12
+ // .gitignore `*`, so a folder that ends up inside a git tree is still never added
13
+ // index.html the catalog page: every saved report, newest first
14
+ // catalog.json the same list as data
15
+ // standup/2026-11-14-0900--standup--team--3-waiting.md
16
+ // usage/2026-11-01-1000--usage--team--all-time.html
17
+ //
18
+ // A file's name says what it is and what state it shows: `<date>-<time>--<kind>--<scope>--<state>.<ext>`.
19
+ // The date comes first, so sorting by name sorts by time. Each part is cut down to `a-z 0-9 -`, so the
20
+ // name is the same on every system (Windows refuses `:` and a few other characters).
21
+ //
22
+ // Where the folder is, first match wins:
23
+ // 1. `--out <file>` on the command — that file, exactly as before (the catalog is not touched);
24
+ // 2. YAD_REPORTS_DIR — a folder the person chose (for example on another disk);
25
+ // 3. `<main checkout>--reports`, beside the Product's main checkout. A run from a worktree, or from a
26
+ // code repo (yad finds the Product first), lands in the same one folder.
27
+ //
28
+ // The catalog records the Product commit each report was made at, so `yad reports list` can say which
29
+ // ones are stale: the Product's epics/ or .sdlc/ changed since then.
30
+ import fs from 'node:fs';
31
+ import path from 'node:path';
32
+ import { spawnSync } from 'node:child_process';
33
+ import { randomBytes } from 'node:crypto';
34
+ import { readJSONStrict, writeJSON } from './lib.mjs';
35
+
36
+ export const REPORTS_SUFFIX = '--reports';
37
+ export const CATALOG_FILE = 'catalog.json';
38
+ export const INDEX_FILE = 'index.html';
39
+ export const CATALOG_VERSION = 1;
40
+ export const REPORTS_ENV = 'YAD_REPORTS_DIR';
41
+ // A report may keep one side file beside it, `<file>.digest.json` (the progress map's item states, E181).
42
+ export const SIDE_SUFFIX = '.digest.json';
43
+
44
+ // The kinds of report. A kind is also its subfolder's name, so only these are accepted.
45
+ export const KINDS = Object.freeze({
46
+ 'progress-map': 'Progress map',
47
+ 'brain-view': 'Brain view',
48
+ usage: 'Usage report',
49
+ standup: 'Standup',
50
+ issues: 'Issues report',
51
+ 'docs-site': 'Docs site',
52
+ timeline: 'Timeline',
53
+ defects: 'Defects report',
54
+ learning: 'Learning tutorial',
55
+ status: 'Status',
56
+ history: 'History',
57
+ claims: 'Claims',
58
+ doctor: 'Doctor',
59
+ });
60
+
61
+ const git = (runner, cwd, args) => {
62
+ const r = runner('git', ['-C', cwd, ...args], { encoding: 'utf8' });
63
+ return { ok: r.status === 0, code: r.status, out: String(r.stdout ?? '').trim() };
64
+ };
65
+
66
+ // The Product's MAIN checkout: for a worktree, the folder that holds the shared .git; else `root` itself.
67
+ // Only when `root` is the TOP of its checkout: a Product folder inside some other repo (a test fixture,
68
+ // a monorepo) keeps its reports beside itself, never beside that other repo.
69
+ export function mainCheckout(root, { runner = spawnSync } = {}) {
70
+ const top = git(runner, root, ['rev-parse', '--show-toplevel']);
71
+ const real = (p) => { let r; try { r = fs.realpathSync.native(p); } catch { r = path.resolve(p); } return process.platform === 'win32' ? r.toLowerCase() : r; };
72
+ if (!top.ok || !top.out || real(top.out) !== real(root)) return path.resolve(root);
73
+ const r = git(runner, root, ['rev-parse', '--path-format=absolute', '--git-common-dir']);
74
+ if (!r.ok || !r.out) return path.resolve(root);
75
+ const common = path.resolve(root, r.out);
76
+ // A normal checkout keeps its git data in `<checkout>/.git`; anything else (a bare repo) has no
77
+ // checkout to stand beside, so the folder given is used.
78
+ return path.basename(common) === '.git' ? path.dirname(common) : path.resolve(root);
79
+ }
80
+
81
+ // → { dir, via: 'env' | 'beside' }
82
+ export function reportsDir(root, { env = process.env, runner = spawnSync } = {}) {
83
+ const chosen = env[REPORTS_ENV];
84
+ if (chosen && String(chosen).trim()) return { dir: path.resolve(String(chosen).trim()), via: 'env' };
85
+ const main = mainCheckout(root, { runner });
86
+ return { dir: path.join(path.dirname(main), `${path.basename(main)}${REPORTS_SUFFIX}`), via: 'beside' };
87
+ }
88
+
89
+ // One part of a name: lower case, `a-z 0-9 -` only, no doubled or end dashes, at most `max` long.
90
+ export function slug(s, max = 40) {
91
+ const out = String(s ?? '')
92
+ .normalize('NFKD').replace(/[̀-ͯ]/g, '')
93
+ .toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '')
94
+ .slice(0, max).replace(/-+$/g, '');
95
+ return out || 'none';
96
+ }
97
+
98
+ const pad = (n) => String(n).padStart(2, '0');
99
+ // The local date and time, `YYYY-MM-DD-HHmm` — the person reads it in their own time.
100
+ export const stamp = (at) => `${at.getFullYear()}-${pad(at.getMonth() + 1)}-${pad(at.getDate())}-${pad(at.getHours())}${pad(at.getMinutes())}`;
101
+
102
+ const EXT_RE = /^[a-z0-9]{1,8}$/;
103
+ export function reportName({ kind, scope, state, at = new Date(), ext }) {
104
+ if (!Object.hasOwn(KINDS, kind)) throw new Error(`unknown report kind: ${kind}`);
105
+ if (!EXT_RE.test(String(ext))) throw new Error(`bad report extension: ${ext}`);
106
+ return `${stamp(at)}--${kind}--${slug(scope, 40)}--${slug(state, 40)}.${ext}`;
107
+ }
108
+
109
+ // Write `content` as a NEW file in `dir`: `name`, else `name-2`, `name-3`… before the extension. Each name
110
+ // is taken with an exclusive create (`wx`), so two runs at the same moment never write the same file.
111
+ function writeFresh(dir, name, content) {
112
+ const dot = name.lastIndexOf('.');
113
+ const [base, ext] = dot > 0 ? [name.slice(0, dot), name.slice(dot)] : [name, ''];
114
+ for (let i = 1; i < 1000; i++) {
115
+ const n = i === 1 ? name : `${base}-${i}${ext}`;
116
+ try { fs.writeFileSync(path.join(dir, n), content, { flag: 'wx' }); return n; } catch (e) { if (e.code !== 'EEXIST') throw e; }
117
+ }
118
+ throw new Error(`no free name for ${name} in ${dir}`);
119
+ }
120
+
121
+ // Hold `catalog.lock` while the catalog is read, changed and written, so a run at the same moment never
122
+ // loses an entry.
123
+ // - The lock appears WHOLE: its `<pid> <token>` is written to a temp file first, then hard-linked to
124
+ // `catalog.lock` (a link fails when the lock is there), so no run ever reads a half-made, empty lock.
125
+ // - It is taken over only when its content is ours to judge — `<pid> <token>`, with that process no
126
+ // longer alive — or it is older than 5 minutes. A takeover renames the lock aside, then checks that
127
+ // what it moved is what it judged; a fresh lock another run made in between is linked back.
128
+ // - On the way out a run removes the lock only while it still holds its own token.
129
+ // - A lock that cannot be read (a folder, no permission) is never spun on: the deadline still ends it.
130
+ // The pid is this machine's: a reports folder shared with another machine or a container can see a
131
+ // live lock there as dead. One residual race is left (a third run locking in the instant between the
132
+ // rename and the link-back); it needs a crashed run and three runs in the same moment.
133
+ const LOCK_FILE = 'catalog.lock';
134
+ const LOCK_STALE_MS = 5 * 60 * 1000;
135
+ const LOCK_RE = /^(\d+) [0-9a-f]{16}$/;
136
+ const alive = (pid) => { if (!Number.isInteger(pid) || pid <= 0) return false; try { process.kill(pid, 0); return true; } catch (e) { return e.code === 'EPERM'; } };
137
+ function lockStale(held, age) {
138
+ if (age > LOCK_STALE_MS) return true;
139
+ const m = LOCK_RE.exec(String(held));
140
+ return !!m && !alive(Number(m[1]));
141
+ }
142
+ // A disk with no hard links (FAT, exFAT, some network shares) says so with one of these; there the lock is
143
+ // made with a plain exclusive create, which brings back the small "empty for an instant" window — a young
144
+ // lock yad cannot judge is waited on, never taken over, so that window costs a wait, not an entry.
145
+ const NO_LINKS = new Set(['EPERM', 'ENOTSUP', 'ENOSYS', 'EXDEV', 'EOPNOTSUPP']);
146
+ function tryLock(lock, token) {
147
+ const tmp = `${lock}.${randomBytes(6).toString('hex')}.new`;
148
+ try {
149
+ fs.writeFileSync(tmp, token, { flag: 'wx' });
150
+ fs.linkSync(tmp, lock);
151
+ return true;
152
+ } catch (e) {
153
+ if (e.code === 'EEXIST') return false;
154
+ if (!NO_LINKS.has(e.code)) throw e;
155
+ try { fs.writeFileSync(lock, token, { flag: 'wx' }); return true; } catch (e2) { if (e2.code === 'EEXIST') return false; throw e2; }
156
+ } finally { fs.rmSync(tmp, { force: true }); }
157
+ }
158
+ export function withCatalogLock(dir, fn, { waitMs = 5000 } = {}) {
159
+ const lock = path.join(dir, LOCK_FILE);
160
+ const token = `${process.pid} ${randomBytes(8).toString('hex')}`;
161
+ const until = Date.now() + waitMs;
162
+ for (;;) {
163
+ if (tryLock(lock, token)) break;
164
+ if (Date.now() > until) return { problem: `${lock} is held by another yad run that is still going`, held: true };
165
+ let held, age;
166
+ try { held = fs.readFileSync(lock, 'utf8'); age = Date.now() - fs.statSync(lock).mtimeMs; } catch (e) {
167
+ if (e.code === 'ENOENT') continue; // released between the two steps: try again
168
+ return { problem: `${lock} cannot be read (${e.code || e.message}) — remove it if no yad run is going`, held: true };
169
+ }
170
+ if (lockStale(held, age)) {
171
+ const aside = `${lock}.${randomBytes(6).toString('hex')}.stale`;
172
+ try { fs.renameSync(lock, aside); } catch { continue; } // another run moved it first
173
+ let moved = null; try { moved = fs.readFileSync(aside, 'utf8'); } catch { /* gone */ }
174
+ if (moved !== held && moved !== null) {
175
+ // Put the fresh lock back, exclusively: by a link, or on a disk with no hard links by writing its
176
+ // content again. Either fails when a newer lock is already there.
177
+ try { fs.linkSync(aside, lock); } catch (e) { if (NO_LINKS.has(e.code)) { try { fs.writeFileSync(lock, moved, { flag: 'wx' }); } catch { /* a newer lock is there */ } } }
178
+ }
179
+ fs.rmSync(aside, { force: true });
180
+ continue;
181
+ }
182
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 50);
183
+ }
184
+ try { return fn(); } finally {
185
+ try { if (fs.readFileSync(lock, 'utf8') === token) fs.rmSync(lock, { force: true }); } catch { /* already gone */ }
186
+ }
187
+ }
188
+
189
+ // Make `dir` (and its parents), refusing a path that exists and is not a plain folder.
190
+ function ownDir(dir) {
191
+ let st = null;
192
+ try { st = fs.lstatSync(dir); } catch { /* new */ }
193
+ if (st && !st.isDirectory()) return `${dir} is not a plain folder (a file or a link) — remove it, or set ${REPORTS_ENV}`;
194
+ fs.mkdirSync(dir, { recursive: true });
195
+ return null;
196
+ }
197
+
198
+ // Write by a temp file and a rename, never through a link.
199
+ function writeNew(file, content) {
200
+ const tmp = `${file}.${process.pid}.tmp`;
201
+ fs.rmSync(tmp, { force: true });
202
+ try {
203
+ fs.writeFileSync(tmp, content, { flag: 'wx' });
204
+ fs.renameSync(tmp, file);
205
+ } finally { fs.rmSync(tmp, { force: true }); }
206
+ }
207
+
208
+ // The `.gitignore` that keeps the folder out of any git tree it may sit in. Written once; a person's own
209
+ // edit to it is left alone.
210
+ function ensureIgnored(dir) {
211
+ const f = path.join(dir, '.gitignore');
212
+ if (!fs.existsSync(f)) writeNew(f, '# yadflow reports — local to this machine, never committed (E180)\n*\n');
213
+ }
214
+
215
+ // The catalog, or `{ problem }` when the file is there and cannot be read: it is never overwritten then.
216
+ export function readCatalog(dir) {
217
+ const file = path.join(dir, CATALOG_FILE);
218
+ let rec;
219
+ try { rec = readJSONStrict(file, null); } catch (e) { return { problem: `${file} cannot be read (${e.message.split('\n')[0]}) — fix or remove it; the catalog was not changed` }; }
220
+ if (rec === null) return { entries: [] };
221
+ if (typeof rec !== 'object' || Array.isArray(rec) || !Array.isArray(rec.entries)) return { problem: `${file} is not a reports catalog — fix or remove it; the catalog was not changed` };
222
+ if (rec.version !== CATALOG_VERSION) return { problem: `${file} is version ${JSON.stringify(rec.version ?? null)}, and this yadflow reads version ${CATALOG_VERSION} — the catalog was not changed` };
223
+ return { entries: rec.entries.filter((e) => e && typeof e.file === 'string') };
224
+ }
225
+
226
+ // The local date and time a report was made, as its file name spells it (`2026-11-14 09:05`).
227
+ const madeAt = (iso) => { const d = new Date(iso); return Number.isFinite(d.getTime()) ? stamp(d).replace(/^(\d{4}-\d{2}-\d{2})-(\d{2})(\d{2})$/, '$1 $2:$3') : '—'; };
228
+ const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (ch) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[ch]));
229
+
230
+ // The catalog page. Static: no script, no network; links are relative, so the folder can be moved.
231
+ export function renderIndex(entries) {
232
+ const kinds = [...new Set(entries.map((e) => e.kind))].sort((a, b) => (KINDS[a] || a).localeCompare(KINDS[b] || b));
233
+ const section = (k) => {
234
+ const rows = entries.filter((e) => e.kind === k).sort((a, b) => String(b.createdAt).localeCompare(String(a.createdAt)));
235
+ return `<h2>${esc(KINDS[k] || k)} <small>${rows.length}</small></h2>\n<table><tr><th>Report</th><th>Scope</th><th>State</th><th>Made (local time)</th><th>Product at</th></tr>\n${rows.map((e) =>
236
+ `<tr><td><a href="${esc(e.file.split('/').map(encodeURIComponent).join('/'))}">${esc(path.posix.basename(e.file))}</a>${e.anonymous ? ' <span class="tag">anonymous</span>' : ''}</td><td>${esc(e.scope)}</td><td>${esc(e.state)}</td><td>${esc(madeAt(e.createdAt))}</td><td><code>${esc(e.productSha ? e.productSha.slice(0, 10) : '—')}</code> ${esc(e.productBranch || '')}</td></tr>`).join('\n')}\n</table>`;
237
+ };
238
+ return `<!doctype html>
239
+ <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
240
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'">
241
+ <title>Saved reports</title>
242
+ <style>
243
+ :root{--bg:#fbfbfd;--ink:#1d2333;--muted:#667089;--line:#e3e6ee;--tag:#eef1f8;--link:#2457c5}
244
+ @media (prefers-color-scheme: dark){:root{--bg:#0d111c;--ink:#e6eaf4;--muted:#8d97ad;--line:#232a3b;--tag:#1b2233;--link:#8fb6ff}}
245
+ body{margin:0;padding:24px 16px;background:var(--bg);color:var(--ink);font:14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
246
+ main{max-width:1100px;margin:0 auto}h1{font-size:20px;margin:0 0 4px}p{color:var(--muted);margin:0 0 18px}
247
+ h2{font-size:15px;margin:26px 0 8px}h2 small{color:var(--muted);font-weight:500}
248
+ table{border-collapse:collapse;width:100%;display:block;overflow-x:auto}th,td{text-align:left;padding:6px 10px;border-top:1px solid var(--line);white-space:nowrap}
249
+ th{color:var(--muted);font-weight:600;font-size:12px;border-top:0}a{color:var(--link)}
250
+ .tag{background:var(--tag);border-radius:4px;padding:1px 6px;font-size:12px;color:var(--muted)}code{font-size:12px}
251
+ </style></head><body><main>
252
+ <h1>Saved reports</h1>
253
+ <p>Each report shows the state of the work when it was made. They are kept on this machine only and never committed. Run <code>yad reports list</code> to see which ones are stale.</p>
254
+ ${entries.length ? kinds.map(section).join('\n') : '<p>No reports saved yet.</p>'}
255
+ </main></body></html>
256
+ `;
257
+ }
258
+
259
+ function productAt(root, runner) {
260
+ const sha = git(runner, root, ['rev-parse', '--verify', '--quiet', 'HEAD^{commit}']);
261
+ const br = git(runner, root, ['rev-parse', '--abbrev-ref', 'HEAD']);
262
+ return { productSha: sha.ok && /^[0-9a-f]{40,64}$/.test(sha.out) ? sha.out : null, productBranch: br.ok && br.out !== 'HEAD' ? br.out : null };
263
+ }
264
+
265
+ // Save one report into the folder and add it to the catalog.
266
+ // → { file, dir, name, warnings: [] } | { problem }
267
+ // The report is written even when the catalog cannot be read: the person asked for the report, and
268
+ // the broken catalog is named in a warning, never overwritten.
269
+ export function saveReport(root, { kind, scope, state, ext, content, command = null, anonymous = false, at = new Date(), env = process.env, runner = spawnSync, lockWaitMs = 5000 } = {}) {
270
+ const { dir } = reportsDir(root, { env, runner });
271
+ const sub = path.join(dir, kind);
272
+ // A folder that cannot be made or written (a read-only parent, say) is a refusal, never a crash.
273
+ const cannot = (e) => ({ problem: `cannot save the report in ${dir} (${e.code || e.message}) — set ${REPORTS_ENV} to a folder you can write, or pass --out <file>` });
274
+ let file, name;
275
+ try {
276
+ const problem = ownDir(dir) || ownDir(sub);
277
+ if (problem) return { problem };
278
+ ensureIgnored(dir);
279
+ name = writeFresh(sub, reportName({ kind, scope, state, at, ext }), content);
280
+ file = path.join(sub, name);
281
+ } catch (e) { return cannot(e); }
282
+ const warnings = [];
283
+ try {
284
+ const done = withCatalogLock(dir, () => {
285
+ const cat = readCatalog(dir);
286
+ if (cat.problem) return cat;
287
+ const entry = { file: `${kind}/${name}`, kind, scope: String(scope ?? ''), state: String(state ?? ''), createdAt: at.toISOString(), ...productAt(root, runner), anonymous: !!anonymous, command };
288
+ const entries = [...cat.entries, entry];
289
+ writeJSON(path.join(dir, CATALOG_FILE), { version: CATALOG_VERSION, entries });
290
+ writeNew(path.join(dir, INDEX_FILE), renderIndex(entries));
291
+ return {};
292
+ }, { waitMs: lockWaitMs });
293
+ if (done.problem) warnings.push(done.held ? `the report was saved at ${file}, but not added to the catalog: ${done.problem}. It is in the folder; open it by that path` : done.problem);
294
+ } catch (e) { warnings.push(`the report was saved, but the catalog was not updated (${e.code || e.message})`); }
295
+ return { file, dir, name, warnings };
296
+ }
297
+
298
+ // Is a report stale? → 'fresh' | 'stale' | 'unknown'. Stale: the Product's epics/ or .sdlc/ changed
299
+ // between the commit the report was made at and the Product's HEAD now. Changes not yet committed are
300
+ // not counted — the record is what is committed.
301
+ export function freshness(root, sha, { runner = spawnSync } = {}) {
302
+ if (!sha || !/^[0-9a-f]{40,64}$/.test(sha)) return 'unknown';
303
+ const r = git(runner, root, ['diff', '--quiet', sha, 'HEAD', '--', 'epics', '.sdlc']);
304
+ return r.code === 0 ? 'fresh' : r.code === 1 ? 'stale' : 'unknown';
305
+ }
306
+
307
+ // Every catalog entry, newest first, with `n` (1 = newest), whether its file is still there, and its freshness.
308
+ export function listReports(root, { env = process.env, runner = spawnSync } = {}) {
309
+ const { dir, via } = reportsDir(root, { env, runner });
310
+ if (!fs.existsSync(dir)) return { dir, via, entries: [] };
311
+ const linked = linkedDir(dir);
312
+ if (linked) return { dir, via, problem: linked };
313
+ const cat = readCatalog(dir);
314
+ if (cat.problem) return { dir, via, problem: cat.problem };
315
+ const seen = new Map(); // one git run per commit, however many reports were made at it
316
+ const fresh = (sha) => { if (!seen.has(sha)) seen.set(sha, freshness(root, sha, { runner })); return seen.get(sha); };
317
+ const entries = [...cat.entries]
318
+ .sort((a, b) => String(b.createdAt).localeCompare(String(a.createdAt)))
319
+ .map((e, i) => ({ n: i + 1, ...e, present: insideDir(dir, e.file) && fs.existsSync(path.join(dir, e.file)), freshness: fresh(e.productSha) }));
320
+ return { dir, via, entries };
321
+ }
322
+
323
+ // A catalog path must be exactly `<kind>/<file name>`, with the kind folder a plain folder (not a link)
324
+ // inside the real reports folder: a hand-edited `../x`, `.gitignore` or a linked kind folder is never
325
+ // opened or deleted.
326
+ const NAME_RE = /^[a-z0-9][a-z0-9-]*\.[a-z0-9]{1,8}$/;
327
+ function insideDir(dir, rel) {
328
+ if (typeof rel !== 'string') return false;
329
+ const parts = rel.split('/');
330
+ if (parts.length !== 2 || !Object.hasOwn(KINDS, parts[0]) || !NAME_RE.test(parts[1])) return false;
331
+ const sub = path.join(dir, parts[0]);
332
+ let st; try { st = fs.lstatSync(sub); } catch { return false; }
333
+ if (!st.isDirectory()) return false;
334
+ try { return fs.realpathSync(sub) === path.join(fs.realpathSync(dir), parts[0]); } catch { return false; }
335
+ }
336
+
337
+ // The folder itself must be a plain folder: a link there is said, never followed for a delete.
338
+ function linkedDir(dir) {
339
+ let st; try { st = fs.lstatSync(dir); } catch { return null; }
340
+ return st.isDirectory() ? null : `${dir} is not a plain folder (a link or a file) — yad does not read or change it; set ${REPORTS_ENV} to a real folder`;
341
+ }
342
+
343
+ // The entries `prune` would remove: older than `days`, or whose file is gone.
344
+ // `days: null` drops only entries whose file is missing or not a report path — it deletes no file.
345
+ export function pruneReports(root, { days = null, apply = false, now = Date.now(), env = process.env, runner = spawnSync } = {}) {
346
+ const { dir } = reportsDir(root, { env, runner });
347
+ if (!fs.existsSync(dir)) return { dir, removed: [], kept: 0 };
348
+ const linked = linkedDir(dir);
349
+ if (linked) return { dir, problem: linked };
350
+ const plan = () => {
351
+ const cat = readCatalog(dir);
352
+ if (cat.problem) return { problem: cat.problem };
353
+ const cut = now - days * 864e5;
354
+ const old = (e) => { if (days === null) return false; const t = Date.parse(e.createdAt); return Number.isFinite(t) && t < cut; };
355
+ // The reason is decided BEFORE anything is deleted.
356
+ const marked = cat.entries.map((e) => ({ e, reason: !insideDir(dir, e.file) ? 'outside' : !fs.existsSync(path.join(dir, e.file)) ? 'missing' : old(e) ? 'old' : null }));
357
+ return { removed: marked.filter((m) => m.reason), kept: marked.filter((m) => !m.reason).map((m) => m.e) };
358
+ };
359
+ const act = () => {
360
+ const p = plan();
361
+ if (p.problem || !apply || !p.removed.length) return p;
362
+ for (const { e, reason } of p.removed) {
363
+ if (reason !== 'old') continue; // only a file proved inside the folder is deleted
364
+ const f = path.join(dir, e.file);
365
+ let st = null; try { st = fs.lstatSync(f); } catch { /* already gone */ }
366
+ if (st && (st.isFile() || st.isSymbolicLink())) fs.rmSync(f, { force: true });
367
+ // A report's own side file (the progress map's digest, E181) goes with it.
368
+ const side = `${f}${SIDE_SUFFIX}`;
369
+ let sst = null; try { sst = fs.lstatSync(side); } catch { /* none */ }
370
+ if (sst && (sst.isFile() || sst.isSymbolicLink())) fs.rmSync(side, { force: true });
371
+ }
372
+ writeJSON(path.join(dir, CATALOG_FILE), { version: CATALOG_VERSION, entries: p.kept });
373
+ writeNew(path.join(dir, INDEX_FILE), renderIndex(p.kept));
374
+ return p;
375
+ };
376
+ let r;
377
+ try { r = apply ? withCatalogLock(dir, act) : plan(); } catch (e) { return { dir, problem: `cannot change ${dir} (${e.code || e.message})` }; }
378
+ if (r.problem) return { dir, problem: r.problem };
379
+ return { dir, removed: r.removed.map(({ e, reason }) => ({ file: e.file, createdAt: e.createdAt, reason })), kept: r.kept.length };
380
+ }
381
+
382
+ // A command's report: to `out` when the person named a file (exactly as before E180, no catalog), else
383
+ // saved into the reports folder. → { file, warnings } | { problem }
384
+ export function writeOrSave(root, { out = null, ...rest }) {
385
+ if (out) {
386
+ fs.mkdirSync(path.dirname(path.resolve(out)), { recursive: true });
387
+ fs.writeFileSync(out, rest.content);
388
+ return { file: out, warnings: [], own: true };
389
+ }
390
+ return saveReport(root, rest);
391
+ }
@@ -0,0 +1,65 @@
1
+ // `yad reports list | open | prune` (E180) — the saved reports in the local reports folder.
2
+ // See reports-dir.mjs for where the folder is and how a file is named.
3
+ import path from 'node:path';
4
+ import { spawnSync } from 'node:child_process';
5
+ import { c, log, ok, info, warn, refuse, emitJSON, forTerminal } from './lib.mjs';
6
+ import { listReports, pruneReports, REPORTS_ENV } from './reports-dir.mjs';
7
+ import { openUrl } from './report.mjs';
8
+
9
+ export const REPORTS_USAGE = 'usage: yad reports [list] [--json] · yad reports open <n|file> · yad reports prune --older-than <days> | --missing [--apply] [--json]';
10
+
11
+ const FRESH = { fresh: 'fresh', stale: 'stale — the Product changed since', unknown: 'unknown' };
12
+
13
+ export async function runReports(root, { action = 'list', args = [], olderThan = null, missing = false, apply = false, json = false, env = process.env, runner = spawnSync, opener = openUrl } = {}) {
14
+ if (action === 'list') {
15
+ if (args.length) return refuse(`yad reports list takes no words (got: ${args.map(forTerminal).join(' ')})`, REPORTS_USAGE, { json });
16
+ const r = listReports(root, { env, runner });
17
+ if (r.problem) return refuse(r.problem, null, { json });
18
+ if (json) return emitJSON({ dir: r.dir, via: r.via, entries: r.entries });
19
+ log(c.bold('\nyad reports'));
20
+ info(`folder: ${forTerminal(r.dir)}${r.via === 'env' ? ` (from ${REPORTS_ENV})` : ''} — on this machine only, never committed`);
21
+ if (!r.entries.length) { info('no reports saved yet'); return r; }
22
+ for (const e of r.entries) {
23
+ const mark = !e.present ? c.red('missing') : e.freshness === 'stale' ? c.yellow(FRESH.stale) : e.freshness === 'fresh' ? c.green(FRESH.fresh) : c.dim(FRESH.unknown);
24
+ log(` ${String(e.n).padStart(3)} ${forTerminal(path.posix.basename(e.file))} ${mark}${e.anonymous ? c.dim(' · anonymous') : ''}`);
25
+ }
26
+ info('open one: yad reports open <n> · the catalog page: index.html in the folder');
27
+ return r;
28
+ }
29
+
30
+ if (action === 'open') {
31
+ if (args.length !== 1) return refuse('name one report: its number from `yad reports list`, or its file name', REPORTS_USAGE, { json });
32
+ const r = listReports(root, { env, runner });
33
+ if (r.problem) return refuse(r.problem, null, { json });
34
+ const want = String(args[0]);
35
+ const hit = /^\d+$/.test(want) ? r.entries.find((e) => e.n === Number(want)) : r.entries.find((e) => e.file === want || path.posix.basename(e.file) === want);
36
+ if (!hit) return refuse(`no saved report ${forTerminal(want)}`, 'see them with: yad reports list', { json });
37
+ if (!hit.present) return refuse(`${forTerminal(hit.file)} is in the catalog but its file is gone`, 'drop it from the catalog with: yad reports prune --missing --apply (it deletes no report)', { json });
38
+ const file = path.join(r.dir, hit.file);
39
+ const opened = opener(file);
40
+ if (json) return emitJSON({ file, opened, freshness: hit.freshness });
41
+ if (opened) ok(`opened ${forTerminal(file)}`);
42
+ else info(`no browser opener was found here (open, xdg-open or explorer) — open ${forTerminal(file)} yourself`);
43
+ if (hit.freshness === 'stale') warn('this report is stale: the Product changed since it was made — run the command again for a current one');
44
+ return { file, opened };
45
+ }
46
+
47
+ if (action === 'prune') {
48
+ if (args.length) return refuse(`yad reports prune takes no words (got: ${args.map(forTerminal).join(' ')})`, REPORTS_USAGE, { json });
49
+ if (missing && olderThan !== null) return refuse('pass --older-than <days> or --missing, not both', REPORTS_USAGE, { json });
50
+ const days = missing ? null : Number(olderThan);
51
+ if (!missing && (olderThan === null || olderThan === true || !Number.isInteger(days) || days < 0)) return refuse('say how old: --older-than <days> (a whole number, 0 or more), or --missing to drop only entries whose file is gone', REPORTS_USAGE, { json });
52
+ const r = pruneReports(root, { days, apply, env, runner });
53
+ if (r.problem) return refuse(r.problem, null, { json });
54
+ if (json) return emitJSON({ dir: r.dir, applied: !!apply, removed: r.removed, kept: r.kept });
55
+ log(c.bold(`\nyad reports prune${apply ? '' : ' (dry run)'}`));
56
+ if (!r.removed.length) { info(`${missing ? 'no entry is missing its file' : `nothing older than ${days} day(s)`} — ${r.kept} kept`); return r; }
57
+ for (const e of r.removed) log(` ${apply ? c.red('removed') : 'would remove'} ${forTerminal(e.file)}${e.reason === 'missing' ? c.dim(' (file already gone)') : e.reason === 'outside' ? c.dim(' (not a report path inside the folder — only dropped from the catalog)') : ''}`);
58
+ if (apply) ok(`removed ${r.removed.length}, kept ${r.kept}`);
59
+ else info(`nothing was deleted — add --apply to remove these ${r.removed.length}`);
60
+ return r;
61
+ }
62
+
63
+ return refuse(`unknown action: yad reports ${forTerminal(action)}`, REPORTS_USAGE, { json });
64
+ }
65
+
@@ -33,7 +33,7 @@ import path from 'node:path';
33
33
  import { spawn, spawnSync } from 'node:child_process';
34
34
  import { setTimeout, clearTimeout, setImmediate } from 'node:timers';
35
35
  import { c, log, info, warn, fail, hand, ok, run, exists, readJSON, refuse, inJSON, asset, contentSha } from './lib.mjs';
36
- import { detectPlatform, resolveBaseBranch } from './platform.mjs';
36
+ import { detectPlatform, forkBranch, forkBranchWords, resolveBaseBranch } from './platform.mjs';
37
37
  import { registryEntryFor } from './find-product.mjs';
38
38
  import { repoPathFromGitUrl } from './protection.mjs';
39
39
  import { rangeTasks, groupWarnings } from './build.mjs';
@@ -314,6 +314,7 @@ export async function runChecks(dir, opts = {}) {
314
314
 
315
315
  // The base: as given, else the branch `yad open-pr` would open the PR against, fetched first.
316
316
  let base = opts.base;
317
+ let chosenBase = null;
317
318
  if (!base) {
318
319
  // The Product's own default_branch counts only for the Product itself: a code repo's trunk is its own.
319
320
  const chosen = resolveBaseBranch(platform, { cwd: repoRoot, meta, productConfig: isProduct ? settings : null, probe: false });
@@ -321,6 +322,9 @@ export async function runChecks(dir, opts = {}) {
321
322
  if (!b) return refuse(`the base branch '${chosen.base}' (from ${chosen.source}) is not a branch name git accepts`, 'pass --base <ref>');
322
323
  if (opts.fetch !== false && !fetchBranch(repoRoot, b).ok) warn(`could not fetch ${b} from origin — the last fetched origin/${b} is the base`);
323
324
  base = `origin/${b}`;
325
+ // A base nobody chose may not be where this branch was cut from (#450) — `yad open-pr` stops there;
326
+ // this run only warns, as it opens nothing.
327
+ if (!['registry', 'product'].includes(chosen.source)) chosenBase = b;
324
328
  } else if (base.startsWith('-')) {
325
329
  return refuse(`--base '${base}' is not a ref`, 'pass a branch or commit, such as origin/main');
326
330
  }
@@ -328,6 +332,10 @@ export async function runChecks(dir, opts = {}) {
328
332
  return refuse(`base '${base}' is not a commit here`, 'fetch it (git fetch origin), or pass --base <ref>');
329
333
  }
330
334
  info(`${isProduct ? 'Product' : 'code repo'} ${path.basename(repoRoot)} · branch ${branchName} · base ${base}`);
335
+ if (chosenBase) {
336
+ const fork = forkBranch(repoRoot, { base: chosenBase, head: branchName });
337
+ if (fork && !fork.skipped) warn(forkBranchWords(fork, chosenBase, { ref: 'origin/', verb: 'check against' }));
338
+ }
331
339
  // A grouped PR (#350) — commits carrying several tasks — is warned about over its size limit, as
332
340
  // `yad open-pr` warns. Never a failed gate.
333
341
  if (!isProduct) {
@@ -412,7 +420,7 @@ export async function runChecks(dir, opts = {}) {
412
420
  const results = [];
413
421
  let record = null;
414
422
  try {
415
- // The changed paths, for the Product's pr-title/pr-template split, built as yad-product-checks.yml does.
423
+ // The changed paths, for the Product's pr-title/pr-template split, built as yad-product-pr-text.yml does.
416
424
  const changedFile = path.join(scratch, 'changed');
417
425
  if (isProduct) {
418
426
  const d = git(repoRoot, ['-c', 'core.quotePath=false', 'diff', '--no-renames', '--name-only', `${base}...HEAD`]);
@@ -442,8 +450,9 @@ export async function runChecks(dir, opts = {}) {
442
450
  { name: 'pr-title', script: 'pr-title.sh', args: ['--profile', profile, title], needs: titleNeeds },
443
451
  { name: 'pr-template', script: 'pr-template.sh', args: ['--profile', profile, bodyFile], needs: bodyNeeds },
444
452
  { name: 'risk-map', script: 'risk-map-check.sh', args: [base] },
445
- { name: 'install-deps', script: 'install-deps.sh', args: [], build: true },
446
- { name: 'build/test/lint', script: 'build-test-lint.sh', args: [], build: true, after: 'install-deps' },
453
+ // The base, as CI passes it: a Unity project skips both, unless its base has a package.json (#496).
454
+ { name: 'install-deps', script: 'install-deps.sh', args: [base], build: true },
455
+ { name: 'build/test/lint', script: 'build-test-lint.sh', args: [base], build: true, after: 'install-deps' },
447
456
  { name: 'contract-check', script: 'contract-check.sh', args: [base] },
448
457
  { name: 'lineage-check', script: 'lineage-check.sh', args: [base] },
449
458
  { name: 'epic-open', script: 'epic-open.sh', args: [base] },
@@ -531,6 +540,8 @@ export async function runChecks(dir, opts = {}) {
531
540
  } else {
532
541
  r.exit = p.status;
533
542
  r.status = p.status === 0 ? 'pass' : 'fail';
543
+ // A gate that passed by skipping says so (#496): a skipped gate is not a pass.
544
+ if (r.status === 'pass' && (g.name === 'install-deps' || g.name === 'build/test/lint') && /^SKIP \[(install-deps|build\/test\/lint)\]: a Unity project/m.test(r.output)) { r.status = 'skip'; r.reason = 'a Unity project: build and test it with Unity\'s own CI'; }
534
545
  }
535
546
  if (g.name === 'pr-title' && titleNote) info(titleNote);
536
547
  if (g.name === 'pr-template' && platform === 'gitlab') {