mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-20 23:23:26 +01:00
fix(benchmark): scope /benchmark routing to web page performance
/benchmark claimed the bare words "benchmark" and "performance", so model
and eval benchmark requests could route to the web performance skill
instead of /benchmark-models. Narrow the description, Use-when list and
triggers to web-specific phrases, point model/skill benchmarks at
/benchmark-models, and split the root router line the same way. The
catalog lead stays within the discovery budget ("Web performance ...").
Adopts #2302 and closes duplicate #2083 (rewritten on current main).
Co-authored-by: Nader Helmy <31414549+creatornader@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
f67c478f05
commit
f4ea24ed55
6 files changed
+29
-13
No files matched your search
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user