mirror of
https://github.com/garrytan/gstack.git
synced 2026-06-11 20:37:51 +02:00
docs: add ARCHITECTURE.md, update CLAUDE.md and CONTRIBUTING.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,14 @@
|
||||
|
||||
```bash
|
||||
bun install # install dependencies
|
||||
bun test # run integration tests (browse + snapshot)
|
||||
bun test # run tests (browse + snapshot + skill validation)
|
||||
bun run test:eval # run LLM-as-judge evals (needs ANTHROPIC_API_KEY)
|
||||
bun run test:e2e # run E2E skill tests (needs SKILL_E2E=1, ~$0.50/run)
|
||||
bun run dev <cmd> # run CLI in dev mode, e.g. bun run dev goto https://example.com
|
||||
bun run build # compile binary to browse/dist/browse
|
||||
bun run build # gen docs + compile binaries
|
||||
bun run gen:skill-docs # regenerate SKILL.md files from templates
|
||||
bun run skill:check # health dashboard for all skills
|
||||
bun run dev:skill # watch mode: auto-regen + validate on change
|
||||
```
|
||||
|
||||
## Project structure
|
||||
@@ -15,18 +20,42 @@ bun run build # compile binary to browse/dist/browse
|
||||
gstack/
|
||||
├── browse/ # Headless browser CLI (Playwright)
|
||||
│ ├── src/ # CLI + server + commands
|
||||
│ │ ├── commands.ts # Command registry (single source of truth)
|
||||
│ │ └── snapshot.ts # SNAPSHOT_FLAGS metadata array
|
||||
│ ├── test/ # Integration tests + fixtures
|
||||
│ └── dist/ # Compiled binary
|
||||
├── scripts/ # Build + DX tooling
|
||||
│ ├── gen-skill-docs.ts # Template → SKILL.md generator
|
||||
│ ├── skill-check.ts # Health dashboard
|
||||
│ └── dev-skill.ts # Watch mode
|
||||
├── test/ # Skill validation + eval tests
|
||||
│ ├── helpers/ # skill-parser.ts, session-runner.ts
|
||||
│ ├── skill-validation.test.ts # Tier 1: static command validation
|
||||
│ ├── gen-skill-docs.test.ts # Tier 1: generator + quality evals
|
||||
│ ├── skill-e2e.test.ts # Tier 2: Agent SDK E2E
|
||||
│ └── skill-llm-eval.test.ts # Tier 3: LLM-as-judge
|
||||
├── ship/ # Ship workflow skill
|
||||
├── review/ # PR review skill
|
||||
├── plan-ceo-review/ # /plan-ceo-review skill
|
||||
├── plan-eng-review/ # /plan-eng-review skill
|
||||
├── retro/ # Retrospective skill
|
||||
├── setup # One-time setup: build binary + symlink skills
|
||||
├── SKILL.md # Browse skill (Claude discovers this)
|
||||
├── SKILL.md # Generated from SKILL.md.tmpl (don't edit directly)
|
||||
├── SKILL.md.tmpl # Template: edit this, run gen:skill-docs
|
||||
└── package.json # Build scripts for browse
|
||||
```
|
||||
|
||||
## SKILL.md workflow
|
||||
|
||||
SKILL.md files are **generated** from `.tmpl` templates. To update docs:
|
||||
|
||||
1. Edit the `.tmpl` file (e.g. `SKILL.md.tmpl` or `browse/SKILL.md.tmpl`)
|
||||
2. Run `bun run gen:skill-docs` (or `bun run build` which does it automatically)
|
||||
3. Commit both the `.tmpl` and generated `.md` files
|
||||
|
||||
To add a new browse command: add it to `browse/src/commands.ts` and rebuild.
|
||||
To add a snapshot flag: add it to `SNAPSHOT_FLAGS` in `browse/src/snapshot.ts` and rebuild.
|
||||
|
||||
## Browser interaction
|
||||
|
||||
When you need to interact with a browser (QA, dogfooding, cookie setup), use the
|
||||
|
||||
Reference in New Issue
Block a user