diff --git a/CHANGELOG.md b/CHANGELOG.md index 503433f118..22831dcd5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [1.59.1.0] - 2026年06月11日 + +## **Codex no longer pays for full gstack routing prose at startup.** + +Codex and other external hosts now get the same compact skill catalog treatment +Claude already had: frontmatter keeps only the short catalog lead, while the +long "Use when" and proactive-routing prose moves into the skill body. This +removes the skills-context-budget startup warning without deleting routing +guidance from the skills themselves. + +### Fixed +- External-host gstack skill generation now applies catalog trimming instead of + preserving full multi-line descriptions in always-loaded frontmatter. +- Added a Codex catalog budget regression test so the generated description set + stays compact across future skill additions. + ## [1.57.10.0] - 2026年06月10日 ## **Codex review now runs by default everywhere it matters.** diff --git a/VERSION b/VERSION index e535f09371..504ad96af2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.57.10.0 +1.59.1.0 diff --git a/package.json b/package.json index 86801282fe..0dd83531cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gstack", - "version": "1.57.10.0", + "version": "1.59.1.0", "description": "Garry's Stack — Claude Code skills + fast headless browser. One repo, one install, entire AI engineering workflow.", "license": "MIT", "type": "module", diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts index 45f617a1bc..e9ff2f3488 100644 --- a/scripts/gen-skill-docs.ts +++ b/scripts/gen-skill-docs.ts @@ -851,9 +851,10 @@ function processTemplate(tmplPath: string, host: Host = 'claude'): { outputPath: content = header + content; } - // Catalog trim (Claude only — external hosts have their own frontmatter shapes) + // Catalog trim: keep the always-loaded frontmatter catalog small for every + // host, then move routing/voice prose into the skill body. let catalogParts: CatalogParts | null = null; - if (host === 'claude' && CATALOG_MODE === 'trim') { + if (CATALOG_MODE === 'trim') { const trimmed = applyCatalogTrim(content, skillName); if (trimmed) { content = trimmed.content; diff --git a/test/fixtures/golden/codex-ship-SKILL.md b/test/fixtures/golden/codex-ship-SKILL.md index 95de614397..5ce98564c6 100644 --- a/test/fixtures/golden/codex-ship-SKILL.md +++ b/test/fixtures/golden/codex-ship-SKILL.md @@ -1,15 +1,19 @@ --- name: ship -description: | - Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, - update CHANGELOG, commit, push, create PR. Use when asked to "ship", "deploy", - "push to main", "create a PR", "merge and push", or "get it deployed". - Proactively invoke this skill (do NOT push/PR directly) when the user says code - is ready, asks about deploying, wants to push code up, or asks to create a PR. (gstack) +description: "Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, update CHANGELOG, commit, push, create PR. (gstack)" + --- + +## When to invoke this skill + +Use when asked to "ship", "deploy", +"push to main", "create a PR", "merge and push", or "get it deployed". +Proactively invoke this skill (do NOT push/PR directly) when the user says code +is ready, asks about deploying, wants to push code up, or asks to create a PR. + ## Preamble (run first) ```bash diff --git a/test/fixtures/golden/factory-ship-SKILL.md b/test/fixtures/golden/factory-ship-SKILL.md index dd8d0e01d1..4419dad556 100644 --- a/test/fixtures/golden/factory-ship-SKILL.md +++ b/test/fixtures/golden/factory-ship-SKILL.md @@ -1,17 +1,20 @@ --- name: ship -description: | - Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, - update CHANGELOG, commit, push, create PR. Use when asked to "ship", "deploy", - "push to main", "create a PR", "merge and push", or "get it deployed". - Proactively invoke this skill (do NOT push/PR directly) when the user says code - is ready, asks about deploying, wants to push code up, or asks to create a PR. (gstack) +description: "Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, update CHANGELOG, commit, push, create PR. (gstack)" user-invocable: true disable-model-invocation: true --- + +## When to invoke this skill + +Use when asked to "ship", "deploy", +"push to main", "create a PR", "merge and push", or "get it deployed". +Proactively invoke this skill (do NOT push/PR directly) when the user says code +is ready, asks about deploying, wants to push code up, or asks to create a PR. + ## Preamble (run first) ```bash diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 431209a7fb..49a613cb3c 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -253,6 +253,28 @@ describe('gen-skill-docs', () => { expect(violations).toEqual([]); }); + test('Codex generated skill catalog stays compact enough for startup context', () => { + const agentsDir = path.join(ROOT, '.agents', 'skills'); + if (!fs.existsSync(agentsDir)) return; + const descriptions: Array<{ name: string; length: number }> = []; + for (const entry of fs.readdirSync(agentsDir, { withFileTypes: true })) { + if (!entry.isDirectory()) continue; + const skillMd = path.join(agentsDir, entry.name, 'SKILL.md'); + if (!fs.existsSync(skillMd)) continue; + const content = fs.readFileSync(skillMd, 'utf-8'); + descriptions.push({ name: entry.name, length: extractDescription(content).length }); + } + + const total = descriptions.reduce((sum, d) => sum + d.length, 0); + const average = descriptions.length ? total / descriptions.length : 0; + const max = descriptions.reduce((m, d) => Math.max(m, d.length), 0); + + expect(descriptions.length).toBeGreaterThan(0); + expect(total).toBeLessThanOrEqual(6000); + expect(average).toBeLessThanOrEqual(120); + expect(max).toBeLessThanOrEqual(240); + }); + test('package.json version matches VERSION file', () => { const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf-8')); const version = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim(); @@ -1825,15 +1847,14 @@ describe('Codex generation (--host codex)', () => { expect(codexResult.stdout.toString()).toBe(agentsResult.stdout.toString()); }); - test('multiline descriptions preserved in Codex output', () => { - // office-hours has a multiline description — verify it survives the frontmatter transform + test('Codex output trims catalog description and preserves routing in body', () => { const content = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-office-hours', 'SKILL.md'), 'utf-8'); const fmEnd = content.indexOf('\n---', 4); const frontmatter = content.slice(4, fmEnd); - // Description should span multiple lines (block scalar) - const descLines = frontmatter.split('\n').filter(l => l.startsWith(' ')); - expect(descLines.length).toBeGreaterThan(1); - // Verify key phrases survived + expect(frontmatter).toContain('description: YC Office Hours'); + expect(frontmatter).not.toContain('Proactively invoke this skill'); + expect(content).toContain('## When to invoke this skill'); + expect(content).toContain('Proactively invoke this skill'); expect(frontmatter).toContain('YC Office Hours'); });

AltStyle によって変換されたページ (->オリジナル) /