Skip to content

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

TypeScript
1.5 KB
Raw Blame
import { expect, test } from 'bun:test';
import { readFileSync } from 'node:fs';
import { extractDesignResearchContract } from './helpers/skill-fixture';
const source = readFileSync(new URL('../design-consultation/SKILL.md', import.meta.url), 'utf8');

test('research-only fixture supplies actual readiness and egress dependencies without expanding scope', () => {
  const contract = extractDesignResearchContract(source);
  expect(contract.match(/console\.log\("ASIDE_READY /g)).toHaveLength(1);
  expect(contract).toContain('GSTACK_SKIP_ASIDE');
  expect(contract).toContain('Reuse the Phase 0 BROWSER SETUP result');
  expect(contract).toContain('_gstack_egress_run open aside-agent');
  expect(contract.indexOf('ASIDE_READY')).toBeLessThan(contract.indexOf('## Web research runs in Aside'));
  expect(contract).not.toContain('## Phase 2: Research');
  expect(contract).not.toContain('**Step 2: Visual research');
  expect(contract).not.toContain('best websites {current year}');
  expect(contract).not.toContain('DESIGN.md');
  expect(extractDesignResearchContract(source.replace('ASIDE_READY', 'PROBE_CHANGED'))).toContain('PROBE_CHANGED');
});

test.each(['## BROWSER SETUP', '### Rules for driving a real browser', '## Web research runs in Aside',
  '## Phase 2: Research', '**Step 1: Identify', '**Step 2: Visual research', '_aside_exec()'])('missing %s fails closed before a paid run', marker => {
  expect(() => extractDesignResearchContract(source.replace(marker, 'REMOVED'))).toThrow();
});