diff --git a/SKILL.md b/SKILL.md index eedcd0771..9105de88e 100644 --- a/SKILL.md +++ b/SKILL.md @@ -223,7 +223,7 @@ Generic “second opinion”, “outside review”, or “cross-model review” - User asks to import cookies for authenticated testing → invoke `/setup-browser-cookies` (fallback browser; Aside already has the sessions) - User asks to share the browser with another agent, "pair OpenClaw/Codex with my browser" → invoke `/pair-agent` (fallback browser) - User asks to codify or save the last `/scrape` as a reusable skill → invoke `/skillify` (fallback browser) -- User asks about page speed, performance regression, benchmarks → invoke `/benchmark` +- User asks about page speed, web performance regression → invoke `/benchmark`; model or skill benchmarks → invoke `/benchmark-models` - User asks what gstack has learned, "show learnings" → invoke `/learn` - User asks to tune question sensitivity, "stop asking me that" → invoke `/plan-tune` - User asks for code quality dashboard, "health check" → invoke `/health` diff --git a/SKILL.md.tmpl b/SKILL.md.tmpl index 4e6012ecf..62ece1c35 100644 --- a/SKILL.md.tmpl +++ b/SKILL.md.tmpl @@ -93,7 +93,7 @@ quality gates that produce better results than answering inline. - User asks to import cookies for authenticated testing → invoke `/setup-browser-cookies` (fallback browser; Aside already has the sessions) - User asks to share the browser with another agent, "pair OpenClaw/Codex with my browser" → invoke `/pair-agent` (fallback browser) - User asks to codify or save the last `/scrape` as a reusable skill → invoke `/skillify` (fallback browser) -- User asks about page speed, performance regression, benchmarks → invoke `/benchmark` +- User asks about page speed, web performance regression → invoke `/benchmark`; model or skill benchmarks → invoke `/benchmark-models` - User asks what gstack has learned, "show learnings" → invoke `/learn` - User asks to tune question sensitivity, "stop asking me that" → invoke `/plan-tune` - User asks for code quality dashboard, "health check" → invoke `/health` diff --git a/benchmark/SKILL.md b/benchmark/SKILL.md index adfe2cee7..924ea0269 100644 --- a/benchmark/SKILL.md +++ b/benchmark/SKILL.md @@ -2,11 +2,11 @@ name: benchmark preamble-tier: 1 version: 1.0.0 -description: Performance regression detection. (gstack) +description: Web performance regression detection. (gstack) triggers: - - performance benchmark + - web performance benchmark - check page speed - - detect performance regression + - detect page performance regression allowed-tools: - Bash - Read @@ -23,8 +23,9 @@ allowed-tools: Establishes baselines for page load times, Core Web Vitals, and resource sizes. Compares before/after on every PR. Tracks performance trends over time. -Use when: "performance", "benchmark", "page speed", "lighthouse", "web vitals", -"bundle size", "load time". +Use when: "web performance benchmark", "page speed", "lighthouse", "web vitals", +"bundle size", "load time". Not for AI model, agent eval or business +benchmarks; use /benchmark-models for cross-model skill comparisons. Voice triggers (speech-to-text aliases): "speed test", "check performance". diff --git a/benchmark/SKILL.md.tmpl b/benchmark/SKILL.md.tmpl index 91e19cda2..44fbef662 100644 --- a/benchmark/SKILL.md.tmpl +++ b/benchmark/SKILL.md.tmpl @@ -3,18 +3,19 @@ name: benchmark preamble-tier: 1 version: 1.0.0 description: | - Performance regression detection. Establishes + Web performance regression detection. Establishes baselines for page load times, Core Web Vitals, and resource sizes. Compares before/after on every PR. Tracks performance trends over time. - Use when: "performance", "benchmark", "page speed", "lighthouse", "web vitals", - "bundle size", "load time". (gstack) + Use when: "web performance benchmark", "page speed", "lighthouse", "web vitals", + "bundle size", "load time". Not for AI model, agent eval or business + benchmarks; use /benchmark-models for cross-model skill comparisons. (gstack) voice-triggers: - "speed test" - "check performance" triggers: - - performance benchmark + - web performance benchmark - check page speed - - detect performance regression + - detect page performance regression allowed-tools: - Bash - Read diff --git a/gstack/llms.txt b/gstack/llms.txt index 2f1e04e83..3110eff7b 100644 --- a/gstack/llms.txt +++ b/gstack/llms.txt @@ -11,7 +11,7 @@ Conventions: ## Skills - [/autoplan](autoplan/SKILL.md): Auto-review pipeline — reads the full CEO, design, eng, and DX review skills from disk and runs them sequentially with auto-decisions using 6 decision principles. -- [/benchmark](benchmark/SKILL.md): Performance regression detection. +- [/benchmark](benchmark/SKILL.md): Web performance regression detection. - [/benchmark-models](benchmark-models/SKILL.md): Cross-model benchmark for gstack skills. - [/browse](browse/SKILL.md): Drive a real browser through Aside: open a page, read it, click through a flow, take screenshots, check console errors. - [/canary](canary/SKILL.md): Post-deploy canary monitoring. diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 5f03336f0..01c8186f7 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -436,6 +436,20 @@ describe('gen-skill-docs', () => { expect(content).not.toContain('## Completeness Principle'); }); + test('benchmark routing is scoped to web page performance', () => { + const generated = fs.readFileSync(path.join(ROOT, 'benchmark', 'SKILL.md'), 'utf-8'); + const template = fs.readFileSync(path.join(ROOT, 'benchmark', 'SKILL.md.tmpl'), 'utf-8'); + for (const content of [generated, template]) { + const useWhen = content.match(/Use when:[\s\S]*?(?=\n\n|\(gstack\))/)?.[0] ?? ''; + expect(useWhen).toContain('"web performance benchmark"'); + expect(useWhen).not.toMatch(/"benchmark"|"performance"/); + expect(content).toContain('/benchmark-models'); + } + const router = fs.readFileSync(path.join(ROOT, 'SKILL.md.tmpl'), 'utf-8'); + expect(router).toContain('web performance regression → invoke `/benchmark`'); + expect(router).toContain('model or skill benchmarks → invoke `/benchmark-models`'); + }); + test('telemetry producer lives in the scripts; render documents the analytics sink', () => { // The skill-usage.jsonl producers moved into the scripts (Phase 1). expect(SKILL_START_SCRIPT).toContain('analytics/skill-usage.jsonl');