@yandy-r/ycc-opencode 6.5.0 → 6.6.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 (62) hide show
  1. package/README.md +11 -4
  2. package/agents/code-finder.md +1 -1
  3. package/agents/planner.md +1 -2
  4. package/agents/pr-evidence-collector.md +99 -0
  5. package/agents/root-cause-analyzer.md +1 -1
  6. package/index.js +9 -0
  7. package/package.json +1 -1
  8. package/registration.json +67 -0
  9. package/shared/references/standalone-dispatch.md +4 -1
  10. package/shared/references/target-capability-matrix.md +170 -30
  11. package/shared/references/worktree-strategy.md +7 -21
  12. package/skills/bundle-author/scripts/scaffold-skill.sh +9 -0
  13. package/skills/bundle-release/scripts/release_versions.py +19 -1
  14. package/skills/code-report/SKILL.md +0 -2
  15. package/skills/code-report/templates/report-structure.md +0 -2
  16. package/skills/compatibility-audit/SKILL.md +8 -4
  17. package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +75 -5
  18. package/skills/compatibility-audit/scripts/audit-target-features.sh +15 -9
  19. package/skills/feature-research/SKILL.md +1 -1
  20. package/skills/feature-research/scripts/validate-spec.sh +0 -4
  21. package/skills/formatters/references/templates/lint-autofix.yml.tmpl +7 -7
  22. package/skills/formatters/references/templates/lint.yml.tmpl +11 -11
  23. package/skills/formatters/scripts/bundle/go-tools.sh +73 -41
  24. package/skills/formatters/scripts/bundle/init-formatters.sh +1 -1
  25. package/skills/formatters/scripts/bundle/lib/modified-files.sh +0 -5
  26. package/skills/git-workflow/SKILL.md +1 -0
  27. package/skills/git-workflow/templates/agent-prompts.md +5 -6
  28. package/skills/git-workflow/templates/documentation-decision.md +1 -3
  29. package/skills/git-workflow/templates/pr-template.md +1 -3
  30. package/skills/go-patterns/references/design-and-tooling.md +16 -13
  31. package/skills/go-testing/references/advanced-testing.md +2 -2
  32. package/skills/implement-plan/references/agent-task-prompt.md +18 -20
  33. package/skills/implement-plan/scripts/parse-dependencies.sh +3 -9
  34. package/skills/init/templates/git/gitignore.tmpl +2 -0
  35. package/skills/init/templates/github/workflows/pr-title.yml.tmpl +1 -1
  36. package/skills/orchestrate/SKILL.md +1 -1
  37. package/skills/orchestrate/references/dispatch-playbook.md +1 -1
  38. package/skills/parallel-plan/SKILL.md +6 -10
  39. package/skills/plan-workflow/SKILL.md +3 -3
  40. package/skills/plan-workflow/references/plan-structure.md +1 -3
  41. package/skills/plan-workflow/scripts/validate-workflow-plan.sh +2 -8
  42. package/skills/pr-evidence/SKILL.md +138 -0
  43. package/skills/pr-evidence/references/perf-evidence.md +119 -0
  44. package/skills/pr-evidence/references/pr-body-and-hosting.md +112 -0
  45. package/skills/pr-evidence/references/ui-evidence.md +152 -0
  46. package/skills/pr-evidence/scripts/bench_report.py +331 -0
  47. package/skills/pr-evidence/scripts/capture-ui.mjs +311 -0
  48. package/skills/pr-evidence/scripts/classify-change.sh +135 -0
  49. package/skills/prp-plan/SKILL.md +4 -5
  50. package/skills/prp-plan/scripts/validate-prp-plan.sh +1 -11
  51. package/skills/prp-pr/SKILL.md +4 -0
  52. package/skills/releaser/references/ci-optimization-checklist.md +1 -1
  53. package/skills/releaser/references/ci-templates/docker-release.yml +8 -8
  54. package/skills/releaser/references/ci-templates/generic-release.yml +5 -5
  55. package/skills/releaser/references/ci-templates/go-release.yml +4 -4
  56. package/skills/releaser/references/ci-templates/node-release.yml +8 -8
  57. package/skills/releaser/references/ci-templates/python-release.yml +8 -8
  58. package/skills/releaser/references/ci-templates/rust-release.yml +10 -10
  59. package/skills/rust-testing/references/advanced-testing.md +1 -1
  60. package/skills/shared-context/SKILL.md +6 -10
  61. package/skills/ts-testing/references/advanced-testing.md +4 -4
  62. package/skills/visual-recap/SKILL.md +3 -4
@@ -0,0 +1,311 @@
1
+ #!/usr/bin/env node
2
+ // capture-ui.mjs — deterministic before/after UI evidence for pull requests.
3
+ //
4
+ // Subcommands:
5
+ // shoot --url <origin> --spec <spec.json> --label <before|after> --out <dir>
6
+ // Screenshot every route x viewport in the spec (and record videos
7
+ // for routes with "record": true) against one running app.
8
+ // compose --before <dir> --after <dir> --out <dir> [--threshold <0-255>]
9
+ // Pair same-named PNGs into one "Before | After | Diff" image each and
10
+ // write summary.json with the changed-pixel ratio per pair.
11
+ // render --input <file.svg|file.html> --out <file.png> [--width <px>]
12
+ // Render a local SVG/HTML file (e.g. a benchmark chart) to PNG.
13
+ //
14
+ // Playwright is resolved from the current project first, then globally.
15
+ // Exit codes: 0 success, 1 usage or runtime error.
16
+
17
+ import { createRequire } from 'node:module';
18
+ import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from 'node:fs';
19
+ import { basename, extname, join, resolve } from 'node:path';
20
+ import { pathToFileURL } from 'node:url';
21
+
22
+ const DEFAULT_VIEWPORTS = [
23
+ { name: 'mobile', width: 375, height: 667, deviceScaleFactor: 2, isMobile: true, hasTouch: true },
24
+ { name: 'tablet', width: 768, height: 1024, deviceScaleFactor: 2, isMobile: true, hasTouch: true },
25
+ { name: 'laptop', width: 1366, height: 768 },
26
+ { name: 'desktop', width: 1920, height: 1080 },
27
+ { name: 'wide', width: 2560, height: 1440 },
28
+ ];
29
+ const MAX_IMAGE_BYTES = 9.5 * 1024 * 1024; // GitHub attachments cap images at 10 MB.
30
+ const PANEL_CSS_WIDTH = 900; // each panel in a composite, before downscaling.
31
+
32
+ function die(msg) {
33
+ process.stderr.write(`capture-ui.mjs: error: ${msg}\n`);
34
+ process.exit(1);
35
+ }
36
+
37
+ function parseArgs(argv) {
38
+ const [cmd, ...rest] = argv;
39
+ const opts = {};
40
+ for (let i = 0; i < rest.length; i += 1) {
41
+ const key = rest[i];
42
+ if (!key.startsWith('--')) die(`unexpected argument: ${key}`);
43
+ const value = rest[i + 1];
44
+ if (value === undefined || value.startsWith('--')) die(`${key} needs a value`);
45
+ opts[key.slice(2)] = value;
46
+ i += 1;
47
+ }
48
+ return { cmd, opts };
49
+ }
50
+
51
+ function need(opts, ...keys) {
52
+ for (const k of keys) if (!opts[k]) die(`missing --${k}`);
53
+ }
54
+
55
+ async function loadPlaywright() {
56
+ const attempts = [
57
+ () => createRequire(join(process.cwd(), 'package.json'))('playwright'),
58
+ () => createRequire(join(process.cwd(), 'package.json'))('@playwright/test'),
59
+ () => createRequire(import.meta.url)('playwright'),
60
+ ];
61
+ for (const attempt of attempts) {
62
+ try {
63
+ return attempt();
64
+ } catch {
65
+ // try the next resolution strategy
66
+ }
67
+ }
68
+ try {
69
+ return await import('playwright');
70
+ } catch {
71
+ die('Playwright not found. Install it in the project (npm i -D playwright && npx playwright install chromium) or globally.');
72
+ }
73
+ }
74
+
75
+ function slug(text) {
76
+ return String(text).toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'root';
77
+ }
78
+
79
+ async function runActions(page, actions = []) {
80
+ for (const a of actions) {
81
+ if (a.click) await page.locator(a.click).first().click();
82
+ else if (a.hover) await page.locator(a.hover).first().hover();
83
+ else if (a.fill) await page.locator(a.fill).first().fill(String(a.value ?? ''));
84
+ else if (a.press) await page.keyboard.press(a.press);
85
+ else if (a.waitFor) await page.locator(a.waitFor).first().waitFor({ state: 'visible' });
86
+ else if (a.scroll) await page.locator(a.scroll).first().scrollIntoViewIfNeeded();
87
+ else if (a.wait) await page.waitForTimeout(Number(a.wait));
88
+ else die(`unknown action: ${JSON.stringify(a)}`);
89
+ }
90
+ }
91
+
92
+ async function settle(page, route) {
93
+ try {
94
+ await page.waitForLoadState('networkidle', { timeout: 15000 });
95
+ } catch {
96
+ // long-polling apps never go idle; the load event already fired
97
+ }
98
+ if (route.waitFor) await page.locator(route.waitFor).first().waitFor({ state: 'visible' });
99
+ await page.evaluate(() => document.fonts && document.fonts.ready);
100
+ }
101
+
102
+ async function shoot(opts) {
103
+ need(opts, 'url', 'spec', 'label', 'out');
104
+ const spec = JSON.parse(readFileSync(opts.spec, 'utf8'));
105
+ if (!Array.isArray(spec.routes) || spec.routes.length === 0) die('spec.routes must be a non-empty array');
106
+ const viewports = spec.viewports ?? DEFAULT_VIEWPORTS;
107
+ const outDir = resolve(opts.out);
108
+ mkdirSync(outDir, { recursive: true });
109
+ const { chromium } = await loadPlaywright();
110
+ const browser = await chromium.launch();
111
+ const written = [];
112
+ try {
113
+ for (const route of spec.routes) {
114
+ const name = slug(route.name ?? route.path);
115
+ for (const vp of route.viewports ? viewports.filter((v) => route.viewports.includes(v.name)) : viewports) {
116
+ const record = Boolean(route.record);
117
+ const context = await browser.newContext({
118
+ viewport: { width: vp.width, height: vp.height },
119
+ deviceScaleFactor: vp.deviceScaleFactor ?? 1,
120
+ isMobile: vp.isMobile ?? false,
121
+ hasTouch: vp.hasTouch ?? false,
122
+ colorScheme: spec.colorScheme ?? 'light',
123
+ locale: spec.locale ?? 'en-US',
124
+ timezoneId: spec.timezoneId ?? 'UTC',
125
+ // Recordings exist to show motion, so only stills reduce it.
126
+ reducedMotion: record ? 'no-preference' : 'reduce',
127
+ storageState: spec.storageState,
128
+ recordVideo: record ? { dir: outDir, size: { width: vp.width, height: vp.height } } : undefined,
129
+ });
130
+ const page = await context.newPage();
131
+ if (spec.freezeTime !== false) await page.clock.setFixedTime(new Date(spec.freezeTime ?? '2024-01-01T12:00:00Z'));
132
+ await page.goto(new URL(route.path, opts.url).toString(), { waitUntil: 'load' });
133
+ await settle(page, route);
134
+ if (record) {
135
+ await page.waitForTimeout(500);
136
+ await runActions(page, route.actions);
137
+ await page.waitForTimeout(Number(route.tail ?? 800));
138
+ } else {
139
+ await runActions(page, route.actions);
140
+ const css = spec.hideSelectors?.length
141
+ ? `${spec.hideSelectors.join(',')}{visibility:hidden !important}`
142
+ : undefined;
143
+ const file = join(outDir, `${name}--${vp.name}.png`);
144
+ await page.screenshot({
145
+ path: file,
146
+ fullPage: route.fullPage ?? spec.fullPage ?? true,
147
+ animations: 'disabled',
148
+ caret: 'hide',
149
+ scale: 'device',
150
+ mask: (spec.maskSelectors ?? []).map((s) => page.locator(s)),
151
+ maskColor: '#FF00FF',
152
+ style: css,
153
+ });
154
+ written.push(file);
155
+ }
156
+ const video = page.video();
157
+ await context.close();
158
+ if (video) {
159
+ const target = join(outDir, `${name}--${vp.name}--${opts.label}.webm`);
160
+ renameSync(await video.path(), target);
161
+ written.push(target);
162
+ }
163
+ }
164
+ }
165
+ } finally {
166
+ await browser.close();
167
+ }
168
+ process.stdout.write(`${JSON.stringify({ label: opts.label, files: written }, null, 2)}\n`);
169
+ }
170
+
171
+ function composeHtml() {
172
+ return `<!doctype html><html><head><meta charset="utf-8"><style>
173
+ body{margin:0;background:#f9f9f9;font:14px/1.4 -apple-system,Segoe UI,Helvetica,Arial,sans-serif;color:#191919}
174
+ #wrap{display:inline-flex;gap:16px;padding:16px;background:#f9f9f9}
175
+ figure{margin:0;background:#fff;border:1px solid rgba(11,11,11,.1);border-radius:6px;padding:8px}
176
+ figcaption{font-weight:600;margin:0 0 6px;color:#666}
177
+ canvas{display:block}
178
+ </style></head><body><div id="wrap"></div></body></html>`;
179
+ }
180
+
181
+ async function composePair(page, beforeFile, afterFile, threshold) {
182
+ const toData = (f) => `data:image/png;base64,${readFileSync(f).toString('base64')}`;
183
+ return page.evaluate(
184
+ async ({ a, b, threshold: t, panelWidth }) => {
185
+ const load = (src) =>
186
+ new Promise((ok, fail) => {
187
+ const img = new Image();
188
+ img.onload = () => ok(img);
189
+ img.onerror = fail;
190
+ img.src = src;
191
+ });
192
+ const [imgA, imgB] = await Promise.all([load(a), load(b)]);
193
+ const w = Math.max(imgA.width, imgB.width);
194
+ const h = Math.max(imgA.height, imgB.height);
195
+ const pixels = (img) => {
196
+ const c = document.createElement('canvas');
197
+ c.width = w;
198
+ c.height = h;
199
+ const ctx = c.getContext('2d');
200
+ ctx.fillStyle = '#ffffff';
201
+ ctx.fillRect(0, 0, w, h);
202
+ ctx.drawImage(img, 0, 0);
203
+ return { c, data: ctx.getImageData(0, 0, w, h).data };
204
+ };
205
+ const A = pixels(imgA);
206
+ const B = pixels(imgB);
207
+ const diff = document.createElement('canvas');
208
+ diff.width = w;
209
+ diff.height = h;
210
+ const dctx = diff.getContext('2d');
211
+ const out = dctx.createImageData(w, h);
212
+ let changed = 0;
213
+ for (let y = 0; y < h; y += 1) {
214
+ for (let x = 0; x < w; x += 1) {
215
+ const i = (y * w + x) * 4;
216
+ const outside = x >= imgA.width || y >= imgA.height || x >= imgB.width || y >= imgB.height;
217
+ const delta = Math.max(
218
+ Math.abs(A.data[i] - B.data[i]),
219
+ Math.abs(A.data[i + 1] - B.data[i + 1]),
220
+ Math.abs(A.data[i + 2] - B.data[i + 2]),
221
+ );
222
+ if (outside || delta > t) {
223
+ changed += 1;
224
+ out.data.set([220, 60, 61, 255], i); // changed pixel
225
+ } else {
226
+ const g = 200 + Math.round((B.data[i] + B.data[i + 1] + B.data[i + 2]) / 3 / 255 * 55);
227
+ out.data.set([g, g, g, 255], i); // unchanged, faded
228
+ }
229
+ }
230
+ }
231
+ dctx.putImageData(out, 0, 0);
232
+ const ratio = changed / (w * h);
233
+ const wrap = document.getElementById('wrap');
234
+ wrap.innerHTML = '';
235
+ const scale = Math.min(1, panelWidth / w);
236
+ for (const [label, canvas] of [
237
+ ['Before (base)', A.c],
238
+ ['After (this branch)', B.c],
239
+ [`Diff: ${(ratio * 100).toFixed(2)}% of pixels changed`, diff],
240
+ ]) {
241
+ const fig = document.createElement('figure');
242
+ const cap = document.createElement('figcaption');
243
+ cap.textContent = label;
244
+ canvas.style.width = `${Math.round(w * scale)}px`;
245
+ canvas.style.height = `${Math.round(h * scale)}px`;
246
+ fig.append(cap, canvas);
247
+ wrap.append(fig);
248
+ }
249
+ return { width: w, height: h, changedPixels: changed, changedRatio: ratio };
250
+ },
251
+ { a: toData(beforeFile), b: toData(afterFile), threshold, panelWidth: PANEL_CSS_WIDTH },
252
+ );
253
+ }
254
+
255
+ async function compose(opts) {
256
+ need(opts, 'before', 'after', 'out');
257
+ const threshold = Number(opts.threshold ?? 16);
258
+ const outDir = resolve(opts.out);
259
+ mkdirSync(outDir, { recursive: true });
260
+ const pngs = (d) => new Set(readdirSync(d).filter((f) => extname(f) === '.png'));
261
+ const before = pngs(opts.before);
262
+ const after = pngs(opts.after);
263
+ const names = [...new Set([...before, ...after])].sort();
264
+ const { chromium } = await loadPlaywright();
265
+ const browser = await chromium.launch();
266
+ const summary = [];
267
+ try {
268
+ const page = await browser.newPage({ viewport: { width: 1280, height: 800 } });
269
+ await page.setContent(composeHtml());
270
+ for (const name of names) {
271
+ if (!before.has(name) || !after.has(name)) {
272
+ summary.push({ name, status: before.has(name) ? 'removed' : 'added' });
273
+ continue;
274
+ }
275
+ const stats = await composePair(page, join(opts.before, name), join(opts.after, name), threshold);
276
+ let file = join(outDir, name);
277
+ await page.locator('#wrap').screenshot({ path: file });
278
+ if (statSync(file).size > MAX_IMAGE_BYTES) {
279
+ file = join(outDir, `${basename(name, '.png')}.jpg`);
280
+ await page.locator('#wrap').screenshot({ path: file, type: 'jpeg', quality: 80 });
281
+ }
282
+ summary.push({ name, status: stats.changedPixels === 0 ? 'unchanged' : 'changed', composite: file, ...stats });
283
+ }
284
+ } finally {
285
+ await browser.close();
286
+ }
287
+ writeFileSync(join(outDir, 'summary.json'), `${JSON.stringify(summary, null, 2)}\n`);
288
+ process.stdout.write(`${JSON.stringify(summary, null, 2)}\n`);
289
+ }
290
+
291
+ async function render(opts) {
292
+ need(opts, 'input', 'out');
293
+ const input = resolve(opts.input);
294
+ if (!existsSync(input)) die(`no such file: ${input}`);
295
+ const { chromium } = await loadPlaywright();
296
+ const browser = await chromium.launch();
297
+ try {
298
+ const page = await browser.newPage({ viewport: { width: Number(opts.width ?? 1000), height: 600 }, deviceScaleFactor: 2 });
299
+ await page.goto(pathToFileURL(input).toString());
300
+ const target = extname(input) === '.svg' ? page.locator('svg').first() : page.locator('body');
301
+ await target.screenshot({ path: resolve(opts.out) });
302
+ } finally {
303
+ await browser.close();
304
+ }
305
+ process.stdout.write(`${resolve(opts.out)}\n`);
306
+ }
307
+
308
+ const { cmd, opts } = parseArgs(process.argv.slice(2));
309
+ const commands = { shoot, compose, render };
310
+ if (!commands[cmd]) die('usage: capture-ui.mjs <shoot|compose|render> [--options]; see the header of this file');
311
+ commands[cmd](opts).catch((err) => die(err?.stack ?? String(err)));
@@ -0,0 +1,135 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # classify-change.sh — classify a branch's diff for pull-request evidence.
4
+ #
5
+ # Prints key=value lines that tell the pr-evidence skill which evidence a PR
6
+ # needs. The result is a hint: the agent confirms it against the diff before
7
+ # skipping or capturing anything.
8
+ #
9
+ # Usage:
10
+ # classify-change.sh [--base <ref>] [--head <ref>]
11
+ #
12
+ # Output (stdout):
13
+ # base=<ref> resolved comparison base (merge-base with head)
14
+ # ui=0|1 user-visible UI files changed
15
+ # perf=0|1 performance intent or benchmark files changed
16
+ # ui_files=<n> count of UI files
17
+ # perf_reasons=<a,b,...> why perf=1 (commit-type, keyword, bench-files)
18
+ # kind=ui|perf|ui+perf|none
19
+ #
20
+ # Exit codes:
21
+ # 0 - classified
22
+ # 1 - usage error, not a git repository, or unknown ref
23
+ #
24
+ set -euo pipefail
25
+
26
+ _die() {
27
+ echo "classify-change.sh: error: $*" >&2
28
+ exit 1
29
+ }
30
+
31
+ BASE=""
32
+ HEAD_REF="HEAD"
33
+ while [[ $# -gt 0 ]]; do
34
+ case "$1" in
35
+ --base)
36
+ [[ $# -ge 2 && -n "$2" ]] || _die "--base needs a ref"
37
+ BASE="$2"
38
+ shift 2
39
+ ;;
40
+ --head)
41
+ [[ $# -ge 2 && -n "$2" ]] || _die "--head needs a ref"
42
+ HEAD_REF="$2"
43
+ shift 2
44
+ ;;
45
+ -h | --help)
46
+ sed -n '2,22p' "$0" | sed 's/^# \{0,1\}//'
47
+ exit 0
48
+ ;;
49
+ *) _die "unknown argument: $1" ;;
50
+ esac
51
+ done
52
+
53
+ git rev-parse --git-dir >/dev/null 2>&1 || _die "not inside a git repository"
54
+ git rev-parse --verify --quiet "${HEAD_REF}^{commit}" >/dev/null || _die "unknown head ref: ${HEAD_REF}"
55
+
56
+ if [[ -z "$BASE" ]]; then
57
+ default_ref="$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null || true)"
58
+ for candidate in "$default_ref" origin/main origin/master main master; do
59
+ if [[ -n "$candidate" ]] && git rev-parse --verify --quiet "${candidate}^{commit}" >/dev/null; then
60
+ BASE="$candidate"
61
+ break
62
+ fi
63
+ done
64
+ [[ -n "$BASE" ]] || _die "cannot find a base branch; pass --base <ref>"
65
+ fi
66
+ git rev-parse --verify --quiet "${BASE}^{commit}" >/dev/null || _die "unknown base ref: ${BASE}"
67
+
68
+ MERGE_BASE="$(git merge-base "$BASE" "$HEAD_REF")" || _die "no merge base between ${BASE} and ${HEAD_REF}"
69
+
70
+ FILES="$(git diff --name-only --diff-filter=ACMR "$MERGE_BASE" "$HEAD_REF")"
71
+ SUBJECTS="$(git log --format='%s%n%b' "${MERGE_BASE}..${HEAD_REF}")"
72
+ BRANCH="$(git rev-parse --abbrev-ref "$HEAD_REF" 2>/dev/null || true)"
73
+
74
+ # UI: markup, styles, components and visual assets; tests and stories excluded.
75
+ UI_EXT_RE='\.(css|scss|sass|less|styl|pcss|tsx|jsx|vue|svelte|astro|html|htm|hbs|ejs|erb|liquid|twig|njk|razor|cshtml|xaml|swift|kt|dart)$'
76
+ UI_DIR_RE='(^|/)(components|pages|app|views|layouts|templates|ui|styles|theme|screens|widgets)/'
77
+ UI_CFG_RE='(^|/)(tailwind|postcss|uno|panda)\.config\.[a-z]+$'
78
+ UI_ASSET_RE='(^|/)(public|static|assets)/.*\.(svg|png|jpe?g|webp|gif|ico|woff2?)$'
79
+ TEST_RE='(^|/)(__tests__|tests?|e2e|spec|__snapshots__)/|\.(test|spec|stories|story)\.[a-z]+$'
80
+ NATIVE_RE='\.(swift|kt|dart|xaml)$'
81
+
82
+ ui_files=0
83
+ while IFS= read -r f; do
84
+ [[ -n "$f" ]] || continue
85
+ [[ "$f" =~ $TEST_RE ]] && continue
86
+ if [[ "$f" =~ $UI_CFG_RE || "$f" =~ $UI_ASSET_RE ]]; then
87
+ ui_files=$((ui_files + 1))
88
+ elif [[ "$f" =~ $UI_EXT_RE ]]; then
89
+ # Native-language sources count only inside a UI directory.
90
+ if [[ "$f" =~ $NATIVE_RE && ! "$f" =~ $UI_DIR_RE ]]; then
91
+ continue
92
+ fi
93
+ ui_files=$((ui_files + 1))
94
+ fi
95
+ done <<<"$FILES"
96
+
97
+ perf_reasons=()
98
+ if grep -Eiq '^perf(\([^)]*\))?!?:' <<<"$SUBJECTS"; then
99
+ perf_reasons+=("commit-type")
100
+ fi
101
+ if grep -Eiq '(^|[^[:alnum:]])(perf|performance|optimi[sz](e|ed|es|ing|ation)|faster|speed ?up|latency|throughput|benchmarks?|hot ?path|allocations?|memory usage)([^[:alnum:]]|$)' <<<"${SUBJECTS}"$'\n'"${BRANCH}"; then
102
+ perf_reasons+=("keyword")
103
+ fi
104
+ if grep -Eiq '(^|/)(benches|benchmarks?|perf)/|(_bench|\.bench|_benchmark|bench_)[^/]*$' <<<"$FILES"; then
105
+ perf_reasons+=("bench-files")
106
+ fi
107
+
108
+ ui=0
109
+ [[ "$ui_files" -gt 0 ]] && ui=1
110
+ perf=0
111
+ [[ ${#perf_reasons[@]} -gt 0 ]] && perf=1
112
+
113
+ kind="none"
114
+ if [[ "$ui" -eq 1 && "$perf" -eq 1 ]]; then
115
+ kind="ui+perf"
116
+ elif [[ "$ui" -eq 1 ]]; then
117
+ kind="ui"
118
+ elif [[ "$perf" -eq 1 ]]; then
119
+ kind="perf"
120
+ fi
121
+
122
+ reasons=""
123
+ if [[ ${#perf_reasons[@]} -gt 0 ]]; then
124
+ reasons="$(
125
+ IFS=,
126
+ echo "${perf_reasons[*]}"
127
+ )"
128
+ fi
129
+
130
+ printf 'base=%s\n' "$BASE"
131
+ printf 'ui=%s\n' "$ui"
132
+ printf 'perf=%s\n' "$perf"
133
+ printf 'ui_files=%s\n' "$ui_files"
134
+ printf 'perf_reasons=%s\n' "$reasons"
135
+ printf 'kind=%s\n' "$kind"
@@ -30,7 +30,7 @@ Extract flags from `$ARGUMENTS`:
30
30
  | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31
31
  | `--parallel` | Fan out research into 3 **standalone sub-agent** researchers; emit tasks with batch/dependency annotations. Works in opencode, Cursor, and Codex. |
32
32
  | `--worktree` | (legacy — now default; safe to omit) Worktree annotations are emitted by default. Accepted as a silent no-op so existing pipelines continue to work. |
33
- | `--no-worktree` | Opt out of worktree annotations. The plan will not contain a `## Worktree Setup` section or per-task `**Worktree**:` annotations. |
33
+ | `--no-worktree` | Opt out of worktree annotations. The plan will not contain a `## Worktree Setup` section. |
34
34
  | `--enhanced` | Enhanced research mode: grow the research fan-out from 3 to 7 specialized researchers (api/business/tech/ux/security/practices/recommendations — same coverage as feature-research). Output is still a single PRP-compliant plan file. Composes with --parallel (default) (Claude Code only), and --no-worktree. |
35
35
  | `--visual` | Render the finished plan as an Agent-Native visual artifact (MDX) via `visual-plan`; local-files by default, hosted shareable link requires `--share`. |
36
36
  | `--store=local\|linear` | Artifact-store override; strip it before interpreting the feature description or input path and forward it to every resolver and visual-plan call. |
@@ -147,7 +147,7 @@ Dispatch a single `prp-researcher` agent via the `subagent` tool, in codebase mo
147
147
 
148
148
  By default (`WORKTREE_MODE=true`), append the following directive to the researcher prompt. Omit when `--no-worktree` was passed (`WORKTREE_MODE=false`):
149
149
 
150
- > **WORKTREE MODE:** The plan you are helping to build will include worktree annotations. In the emitted plan, include a `## Worktree Setup` section with a single `**Parent**:` line naming the feature worktree; no `**Children**:` list; no per-task `**Worktree**:` annotations. All tasks (parallel and sequential) share this one feature worktree path. Follow `{{package-root}}/shared/references/worktree-strategy.md` for the naming scheme and annotation format.
150
+ > **WORKTREE MODE:** The plan you are helping to build will include worktree annotations. In the emitted plan, include a `## Worktree Setup` section with a single `**Parent**:` line naming the feature worktree. All tasks (parallel and sequential) share this one feature worktree path. Follow `{{package-root}}/shared/references/worktree-strategy.md` for the naming scheme and annotation format.
151
151
 
152
152
  ### Path B — Three standalone researchers (`PARALLEL_MODE=true`)
153
153
 
@@ -189,7 +189,7 @@ Define:
189
189
 
190
190
  ## Phase 6 — GENERATE
191
191
 
192
- **CRITICAL: Write the plan progressively in chunks to avoid timeouts.**
192
+ Write the plan progressively in chunks to avoid timeouts.
193
193
 
194
194
  Now that the dry-run exit is past, in linear mode apply the Linear call gate before ensuring the plan destination:
195
195
 
@@ -219,7 +219,6 @@ If `ENHANCED_MODE=true`, also read `{{package-root}}/skills/prp-plan/references/
219
219
  2. **Edit/append** the Patterns to Mirror section (populated from researcher discovery tables)
220
220
  3. **Edit/append** the Files to Change + NOT Building sections
221
221
  4. **Edit/append** the Step-by-Step Tasks section (this is usually the largest — keep each task description concise)
222
- - All tasks (parallel and sequential) share the single feature worktree. Do NOT add per-task `- **Worktree**: ...` annotation lines.
223
222
  5. **Edit/append** the Testing Strategy, Validation Commands, Acceptance Criteria, Completion Checklist, Risks, and Notes sections
224
223
 
225
224
  Each chunk should be a separate Write or Edit call. This prevents any single generation from being too large.
@@ -236,7 +235,7 @@ Use the feature slug resolved in Phase 1 for `<feature-slug>` (never derive it f
236
235
  - **Parent**: <repo-root>/.opencode/worktrees/<repo>-<feature-slug>/ (branch: feat/<feature-slug>)
237
236
  ```
238
237
 
239
- All tasks — parallel and sequential — share this one feature worktree path. No `**Children**:` list and no per-task `**Worktree**:` annotation lines are emitted.
238
+ All tasks — parallel and sequential — share this one feature worktree path.
240
239
 
241
240
  > **Plan-file handoff**: in local mode, leave `$OUT` in the current checkout; the implementor (`prp-implement`) will **move** it into the feature worktree once created — do not pre-write or copy it there (see `worktree-strategy.md` §7). In linear mode, never move the cache; the implementor loads the plan from it via `/ycc:prp-implement --store=linear {resolved cached plan path or Linear Document URL}`.
242
241
 
@@ -156,8 +156,7 @@ RECOMMENDED_SECTIONS=(
156
156
 
157
157
  # Optional sections: present → pass, absent → pass (no error, no warning).
158
158
  # Add new optional sections here as the plan format evolves.
159
- # Optional: --no-worktree plans omit this annotation. Worktree mode is now
160
- # default-on, but plans generated with --no-worktree skip the annotation.
159
+ # Worktree Setup: emitted by default, omitted by --no-worktree plans.
161
160
  OPTIONAL_SECTIONS=(
162
161
  "Worktree Setup"
163
162
  )
@@ -225,12 +224,6 @@ if [[ $TASK_COUNT -gt 0 ]]; then
225
224
  warning "No tasks have MIRROR fields"
226
225
  fi
227
226
 
228
- # Optional. Single worktree: per-task **Worktree** is not required; count is informational.
229
- WORKTREE_FIELD_COUNT=$(grep -c '\*\*Worktree\*\*:' <<< "$CONTENT" || true)
230
- if [[ $WORKTREE_FIELD_COUNT -gt 0 ]]; then
231
- success "Per-task **Worktree** field(s) present: $WORKTREE_FIELD_COUNT (deprecated — not required)"
232
- fi
233
-
234
227
  # Self-containment heuristic: tasks with all 4 core fields
235
228
  COMPLETE_TASKS=0
236
229
  # Extract task blocks and check each
@@ -372,9 +365,6 @@ if [[ $TASK_COUNT -gt 0 ]]; then
372
365
  echo " Batch fields: $BATCH_FIELD_COUNT"
373
366
  echo " Batch table rows: $BATCH_TABLE_ROWS"
374
367
  fi
375
- if [[ ${WORKTREE_FIELD_COUNT:-0} -gt 0 ]]; then
376
- echo " Worktree annotations: $WORKTREE_FIELD_COUNT"
377
- fi
378
368
  echo ""
379
369
  fi
380
370
 
@@ -187,6 +187,10 @@ Use this default format:
187
187
 
188
188
  Before creating the PR, run `pr-guard.sh backport-label --base <base> --title "<PR title>"` (add `--labels` when labels are known). On `backport=1`, ask `Backport to <branch>? (yes/no)`; on yes, add the printed label to the new PR and tell the user to run `/ycc:backport <PR#>` after it merges. Details: `{{package-root}}/shared/references/pr-base-and-backport.md#backport-prompt`.
189
189
 
190
+ ### Review evidence
191
+
192
+ Before creating the PR, apply `{{package-root}}/skills/pr-evidence/SKILL.md`: it adds before/after UI screenshots or base-vs-branch benchmark graphs to the body (or a one-line skip reason) and the `--attach` flags for the create call below.
193
+
190
194
  ### Create the PR
191
195
 
192
196
  PR creation is provider-aware. Detect the forge provider on `origin` first
@@ -65,7 +65,7 @@ Findings emitted by the audit agent use this format:
65
65
  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
66
66
  | Language-specific setup actions use their built-in cache (`setup-node` cache input, `setup-python` cache input, cargo cache via `Swatinem/rust-cache`, Go module cache via `actions/setup-go`) | high |
67
67
  | Cache keys include lockfile hashes, not just OS | medium |
68
- | Release artifacts use `actions/upload-artifact@v4` (v3 is deprecated) | high |
68
+ | Release artifacts use `actions/upload-artifact@v7` (Node 24; v4 and older run on Node 20) | high |
69
69
 
70
70
  ## 5. Build Matrix
71
71
 
@@ -31,16 +31,16 @@ jobs:
31
31
  id-token: write # cosign keyless signing
32
32
  attestations: write # SLSA provenance
33
33
  steps:
34
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v7
35
35
 
36
36
  - name: Set up QEMU
37
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 — TODO(releaser): verify latest SHA
37
+ uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 — TODO(releaser): verify latest SHA
38
38
 
39
39
  - name: Set up Buildx
40
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 — TODO(releaser): verify latest SHA
40
+ uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 — TODO(releaser): verify latest SHA
41
41
 
42
42
  - name: Login to GHCR
43
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 — TODO(releaser): verify latest SHA
43
+ uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0 — TODO(releaser): verify latest SHA
44
44
  with:
45
45
  registry: ${{ env.REGISTRY }}
46
46
  username: ${{ github.actor }}
@@ -48,7 +48,7 @@ jobs:
48
48
 
49
49
  - name: Extract metadata
50
50
  id: meta
51
- uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0 — TODO(releaser): verify latest SHA
51
+ uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 — TODO(releaser): verify latest SHA
52
52
  with:
53
53
  images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
54
54
  tags: |
@@ -57,11 +57,11 @@ jobs:
57
57
  type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }}
58
58
 
59
59
  - name: Install cosign
60
- uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 — TODO(releaser): verify latest SHA
60
+ uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 — TODO(releaser): verify latest SHA
61
61
 
62
62
  - name: Build and push
63
63
  id: build
64
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 — TODO(releaser): verify latest SHA
64
+ uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 — TODO(releaser): verify latest SHA
65
65
  with:
66
66
  context: .
67
67
  platforms: linux/amd64,linux/arm64 # TODO(releaser): trim to the --arch list
@@ -81,7 +81,7 @@ jobs:
81
81
  echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
82
82
 
83
83
  - name: Attest provenance
84
- uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v3.0.0 — TODO(releaser): verify latest SHA
84
+ uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 — TODO(releaser): verify latest SHA
85
85
  with:
86
86
  subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
87
87
  subject-digest: ${{ steps.build.outputs.digest }}
@@ -25,7 +25,7 @@ jobs:
25
25
  permissions:
26
26
  contents: read
27
27
  steps:
28
- - uses: actions/checkout@v4
28
+ - uses: actions/checkout@v7
29
29
 
30
30
  # TODO(releaser): add your toolchain setup here (e.g. actions/setup-<lang>).
31
31
 
@@ -41,7 +41,7 @@ jobs:
41
41
  find . -maxdepth 1 -type f -not -name 'SHA256SUMS*' -print0 \
42
42
  | xargs -0 sha256sum > SHA256SUMS.txt
43
43
 
44
- - uses: actions/upload-artifact@v4
44
+ - uses: actions/upload-artifact@v7
45
45
  with:
46
46
  name: dist
47
47
  path: dist/
@@ -55,13 +55,13 @@ jobs:
55
55
  permissions:
56
56
  contents: write
57
57
  steps:
58
- - uses: actions/checkout@v4
59
- - uses: actions/download-artifact@v4
58
+ - uses: actions/checkout@v7
59
+ - uses: actions/download-artifact@v8
60
60
  with:
61
61
  name: dist
62
62
  path: dist/
63
63
  - name: Create release
64
- uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 — TODO(releaser): verify latest SHA
64
+ uses: softprops/action-gh-release@88b783939ccdbabad21b9a37510aed7fad5f2e60 # v3.0.5 — TODO(releaser): verify latest SHA
65
65
  with:
66
66
  files: dist/*
67
67
  body_path: docs/releases/${{ github.ref_name }}.md # TODO(releaser): adjust path if needed
@@ -27,20 +27,20 @@ jobs:
27
27
  packages: write # for pushing container images if .goreleaser.yml defines `dockers:`
28
28
  id-token: write # for cosign keyless signing
29
29
  steps:
30
- - uses: actions/checkout@v4
30
+ - uses: actions/checkout@v7
31
31
  with:
32
32
  fetch-depth: 0 # goreleaser needs full history for changelog generation
33
33
 
34
- - uses: actions/setup-go@v5
34
+ - uses: actions/setup-go@v7
35
35
  with:
36
36
  go-version-file: 'go.mod'
37
37
  cache: true
38
38
 
39
39
  - name: Install cosign
40
- uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1 — TODO(releaser): verify latest SHA
40
+ uses: sigstore/cosign-installer@881c63bd87e38389154debd8331404ce7ca8a3ab # v4.1.4 — TODO(releaser): verify latest SHA
41
41
 
42
42
  - name: Run goreleaser
43
- uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0 — TODO(releaser): verify latest SHA
43
+ uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0 — TODO(releaser): verify latest SHA
44
44
  with:
45
45
  distribution: goreleaser
46
46
  version: '~> v2'