Commit Graph
419 Commits
Author SHA1 Message Date
Garry TanandClaude Opus 4.6 5205070299 feat: SKILL.md template system, 3-tier testing, DX tools (v0.3.3) (#41)
* refactor: extract command registry to commands.ts, add SNAPSHOT_FLAGS metadata

- NEW: browse/src/commands.ts — command sets + COMMAND_DESCRIPTIONS + load-time validation (zero side effects)
- server.ts imports from commands.ts instead of declaring sets inline
- snapshot.ts: SNAPSHOT_FLAGS array drives parseSnapshotArgs (metadata-driven, no duplication)
- All 186 existing tests pass

* feat: SKILL.md template system with auto-generated command references

- SKILL.md.tmpl + browse/SKILL.md.tmpl with {{COMMAND_REFERENCE}} and {{SNAPSHOT_FLAGS}} placeholders
- scripts/gen-skill-docs.ts generates SKILL.md from templates (supports --dry-run)
- Build pipeline runs gen:skill-docs before binary compilation
- Generated files have AUTO-GENERATED header, committed to git

* test: Tier 1 static validation — 34 tests for SKILL.md command correctness

- test/helpers/skill-parser.ts: extracts $B commands from code blocks, validates against registry
- test/skill-parser.test.ts: 13 parser/validator unit tests
- test/skill-validation.test.ts: 13 tests validating all SKILL.md files + registry consistency
- test/gen-skill-docs.test.ts: 8 generator tests (categories, sorting, freshness)

* feat: DX tools (skill:check, dev:skill) + Tier 2 E2E test scaffolding

- scripts/skill-check.ts: health summary for all SKILL.md files (commands, templates, freshness)
- scripts/dev-skill.ts: watch mode for template development
- test/helpers/session-runner.ts: Agent SDK wrapper for E2E skill tests
- test/skill-e2e.test.ts: 2 E2E tests + 3 stubs (auto-skip inside Claude Code sessions)
- E2E tests must run from plain terminal: SKILL_E2E=1 bun test test/skill-e2e.test.ts

* ci: SKILL.md freshness check on push/PR + TODO updates

- .github/workflows/skill-docs.yml: fails if generated SKILL.md files are stale
- TODO.md: add E2E cost tracking and model pinning to future ideas

* fix: restore rich descriptions lost in auto-generation

- Snapshot flags: add back value hints (-d <N>, -s <sel>, -o <path>)
- Snapshot flags: restore parenthetical context (@e refs, @c refs, etc.)
- Commands: is → includes valid states enum
- Commands: console → notes --errors filter behavior
- Commands: press → lists common keys (Enter, Tab, Escape)
- Commands: cookie-import-browser → describes picker UI
- Commands: dialog-accept → specifies alert/confirm/prompt
- Tips: restore → arrow (was downgraded to ->)

* test: quality evals for generated SKILL.md descriptions

Catches the exact regressions we shipped and caught in review:
- Snapshot flags must include value hints (-d <N>, -s <sel>, -o <path>)
- is command must list all valid states (visible/hidden/enabled/...)
- press command must list example keys (Enter, Tab, Escape)
- console command must describe --errors behavior
- Snapshot -i must mention @e refs, -C must mention @c refs
- All descriptions must be >= 8 chars (no empty stubs)
- Tips section must use → not ->

* feat: LLM-as-judge evals for SKILL.md documentation quality

4 eval tests using Anthropic API (claude-haiku, ~$0.01-0.03/run):
- Command reference table: clarity/completeness/actionability >= 4/5
- Snapshot flags section: same thresholds
- browse/SKILL.md overall quality
- Regression: generated version must score >= hand-maintained baseline

Requires ANTHROPIC_API_KEY. Auto-skips without it.
Run: bun run test:eval (or ANTHROPIC_API_KEY=sk-... bun test test/skill-llm-eval.test.ts)

* chore: bump version to 0.3.3, update changelog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add ARCHITECTURE.md, update CLAUDE.md and CONTRIBUTING.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: conductor.json lifecycle hooks + .env propagation across worktrees

bin/dev-setup now copies .env from main worktree so API keys carry
over to Conductor workspaces automatically. conductor.json wires up
setup and archive hooks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: complete CHANGELOG for v0.3.3 (architecture, conductor, .env)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:08:12 -07:00
garrytanandcapy-ai[bot] 8bdc6327ab Merge main 1ccab0d8 into gsta258-c-review-depth (rule 19 grant, GSTA-36; review pins ported per GSTA-202 recipe)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-03 15:45:04 +00:00
garrytanandcapy-ai[bot] 8a1f2c0a27 Merge main f6d6215f4 into gsta258-c-review-depth (rule 19 grant, GSTA-36)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-03 09:08:29 +00:00
garrytanandcapy-ai[bot] 7d242814ab Merge origin/main 5f705f367 into gsta258-c-review-depth (pre-READY base merge)
lib/review-risk.ts: RISK_RULES keeps main's SECURITY_JOINED beside C's patterns;
the merged file is main's GST-942 bytes plus exactly the GSTA-258-C lines.
Repins lib/review-risk.ts under no-loss check GSTA-258-C+GST-942.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-03 04:57:11 +00:00
garrytan aae15e294e Merge origin/main (6f1dfd5b, #3852 squashed as 14d7414a) into gsta258-c-review-depth
Conflicts were the wave-vs-squash duplicates plus #3887 (targeted record binds its head): bin/gstack-review-dispatch keeps main targetedRead/head and adds the merged reader key; bin/gstack-ship-receipt keeps main targeted text and imports and adds --declare-risk and --platform-review; lib/ship-policy.ts keeps the stamped REVIEW_EXCLUDE_KEY_VERSION and adds REVIEW_POLICY_KEY_VERSION. Fixtures: review-exclude policyText min_gstack_version moves to REVIEW_POLICY_KEY_VERSION; Step 11.5 platform note moves to review-army.md (skeleton cap).
2026-11-03 03:13:10 +00:00
garrytanandcapy-ai[bot] 5497c18c16 wip(review): receipt platform depth, outside-voice diff file and slice, eval/policy classes, docs secret rule, run logs are data, prose and docs (GSTA-258 C)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-03 00:12:14 +00:00
garrytan f0ce23418c Merge main 68410828f (v1.93.17.0, train 92) into wave/review-53cfb5bfe011 (rule 19 grant)
Conflicts resolved keeping both sides: bin/gstack-review-plan (baseContainsHead and approval-record imports); scripts/harness-version.json (main's session-ledger and session-runner pins, the wave's skill-fixture pin); ship/DRIVER.md.tmpl (main's done-or-voices wording, regenerated DRIVER.md 12,278 B); test/review-packets-removed.test.ts (merged review-army.md, adversarial.md and review-depth.ts pinned under combined GST-508+GST-464+GST-967 and GST-508+R51+GST-911+GST-967 entries).
2026-11-02 19:52:15 +00:00
garrytan 0319046c83 Merge main fc292e22f (v1.93.7.0, train 90) into wave/review-53cfb5bfe011 (rule 19 grant) 2026-11-02 16:37:58 +00:00
garrytan 077604a1c8 Merge main 3d99c22497 into wave/review-53cfb5bfe011 (rule 19 grant) 2026-11-02 12:25:06 +00:00
garrytan 766c0e6ee9 Merge commit 'd06778528e6dd85a9a7b5bc74dfff4a85abe933e' into HEAD
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	TODOS.md
#	retro/SKILL.md
#	retro/SKILL.md.tmpl
#	scripts/harness-version.json
#	ship/DRIVER.md
#	ship/DRIVER.md.tmpl
#	test/fixtures/skill-md-size-allowlist.json
2026-11-02 08:50:41 +00:00
garrytanandcapy-ai[bot] d06778528e Merge origin/main (5b7b095) into gsta224-review-bots
Rule 19 grant (GStack Minder) for #3764. Only conflict: the generated
skill-md-size allowlist; resolved by taking main's pins and lowering the
eight gstack-review pins by B2's 85-char shrink.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-01 01:43:03 +00:00
garrytanandcapy-ai[bot] 28c92b4691 test: keep the cross-skill judge's rubric to one renamed bullet
Name review-bot-history.md beside the older greptile-history.md so the
calibration corpus still matches, and keep the REMOTE_SLUG bullet. One
live 3-sample panel at this tree: consistent 3/3, scores 4/4/4.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-31 22:36:19 +00:00
garrytanandcapy-ai[bot] 4f05f56c00 test: follow the review-bot rename in the remote free tier's three reds
The cross-skill consistency judge describes review-bot-history.md and its
record helper; the tracker-guard exemption for the removed raw Greptile
fetch in review/greptile-triage.md is dropped (the fetch now lives in
gstack-review-bots, whose bodies still reach context only through
gstack-issue-guard); the Step 10 PR-check test expects 'Review bots: not
run'. HARNESS_VERSION stays 6: skill-fixture.ts and llm-judge.ts are
recorded non-behavioral for every other case.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-31 22:30:49 +00:00
garrytanandcapy-ai[bot] b2fac690a9 fix: pre-landing review fixes (gh before 2.48 pages without --slurp; driver routes Step 10; tests for guards, review-bot fence, REMOTE_SLUG owner)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-31 21:47:14 +00:00
garrytanandcapy-ai[bot] 40ff8e25aa review-bots: /review and /ship triage every configured review bot, not only Greptile (#3122)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-10-31 21:29:37 +00:00
garrytan a7f5a044e8 Merge commit '995e442521516c707125ecce388c698aad0ff432' into HEAD
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	bin/gstack-review-dispatch
#	lib/review-depth.ts
#	lib/review-targeted.ts
#	lib/ship-receipt-depth.ts
#	test/review-packets-removed.test.ts
2026-11-02 08:36:21 +00:00
garrytan 995e442521 Merge remote-tracking branch 'origin/main' into gst-508-review-exclude-paths
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	lib/review-brief.ts
2026-11-01 17:46:31 +00:00
garrytan c204be95fb Merge remote-tracking branch 'origin/main' into gst-508-review-exclude-paths
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	bin/gstack-review-dispatch
#	bin/gstack-ship-receipt
#	lib/review-pass.ts
2026-11-01 14:26:07 +00:00
garrytanandcapy-ai[bot] c978f007bc review: apply the base policy's review_exclude_paths and the reviewer diff ceiling (GST-508)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2026-11-01 01:38:39 +00:00