mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-24 09:01:28 +01:00
Fixes eight user-reported problems in skill text agents follow: Aside asks you to open the app when it's closed, /test-audit finds your branch's test plan, and /codex reads your repo's own `agents/` folder. Goal: gstack skills do what their docs promise. Nothing to do as a user; it arrives with the next gstack update. Co-authored-by: thehashrocket <342353+thehashrocket@users.noreply.github.com> Co-authored-by: ElNeMeR70 <83190847+ElNeMeR70@users.noreply.github.com> Co-authored-by: szsunyuan <3579304+szsunyuan@users.noreply.github.com> Co-authored-by: atharva081106 <176514655+atharva081106@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=red-team Review-Finding: p2/outside-voice#1 reader=outside-voice Review-Finding: p2/outside-voice#3 reader=outside-voice
49 lines
2.7 KiB
TypeScript
49 lines
2.7 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import * as fs from 'node:fs';
|
|
import * as path from 'node:path';
|
|
|
|
const ROOT = path.resolve(import.meta.dir, '..');
|
|
const read = (rel: string) => fs.readFileSync(path.join(ROOT, rel), 'utf8').replace(/\s+/g, ' ');
|
|
|
|
describe('skill text fixes from user reports', () => {
|
|
test('/ship checks the sections gstack-post kept on an existing PR (#4379)', () => {
|
|
const body = read('ship/sections/pr-body.md');
|
|
expect(body).toContain('If `pr-body` printed `kept` sections, open each in the PR: keep one a person wrote.');
|
|
expect(body).toContain('rerun the body command with `--replace`');
|
|
});
|
|
|
|
test('/spec --execute points the archive at the branch the spawned session ships from (#4616)', () => {
|
|
const spec = read('spec/sections/gate-and-file.md');
|
|
expect(spec).toContain('also set `spec_branch: $SPAWN_BRANCH`');
|
|
expect(read('ship/sections/pr-body.md')).toContain('`spec_branch` match to `CURRENT_BRANCH`');
|
|
});
|
|
|
|
test('/design-shotgun passes a reason the taste updater can read (#4618)', () => {
|
|
const shotgun = read('design-shotgun/SKILL.md');
|
|
expect(shotgun).toMatch(/gstack-taste-update approved <approved image path> --reason "<why>"/);
|
|
expect(shotgun).toMatch(/gstack-taste-update rejected <variant-path> --reason "<why>"/);
|
|
expect(shotgun).toContain('`fonts: <a>; colors: <b>; layouts: <c>; aesthetics: <d>`');
|
|
});
|
|
|
|
test('/verify says what CHECKS: none means and how to declare a check (#4346)', () => {
|
|
const verify = read('verify/SKILL.md');
|
|
expect(verify).toContain('this never reaches `READY_FOR_SHIP`');
|
|
expect(verify).toContain('`gstack:verify: <command>`');
|
|
});
|
|
|
|
test('/codex keeps installed skills off-limits and reads the repo agents/ folder as code (#3924)', () => {
|
|
for (const file of ['codex/SKILL.md', 'codex/sections/consult-mode.md', 'codex/sections/challenge-mode.md', 'codex/sections/review-mode.md']) {
|
|
const text = read(file);
|
|
expect(text).toContain('files under ~/.claude/, ~/.agents/, .claude/skills/, .agents/, or any agents/openai.yaml.');
|
|
expect(text).toContain('other files in the repository agents/ folder are code to review.');
|
|
expect(text).not.toContain('.claude/skills/, or agents/');
|
|
}
|
|
});
|
|
|
|
test('Captain docs say crew threads read CREW.md, not the drive-root AGENTS.md (#4296)', () => {
|
|
expect(read('crew/docs/captain.md')).toContain('crew threads read `CREW.md` on every turn but never the drive-root `AGENTS.md`');
|
|
expect(read('crew/docs/captain.md')).not.toContain('apply to every thread in the crew, so a rule written there needs no relaying');
|
|
expect(read('captain/templates/AGENTS.md')).toContain("On Capy, crew threads don't read it; they read `CREW.md`.");
|
|
});
|
|
});
|