* chore(scripts): retire hollow and legacy paid package scripts behind one-release stubs (W8a, DX-4, CEO-31) test:codex*, test:evals*, test:e2e*, test:gate, test:periodic, eval:bg, eval:bg:all, eval:flake-rank, eval:watch and test:audit now print their replacement and exit 1 via scripts/retired-command.ts. CONTRIBUTING.md carries the same table; test/retired-commands.test.ts pins both. Eval CLI empty-state hints point at eval:bg:pr. * chore: delete dead update-readme-throughput, eval-watch, orphan fixtures and QA_FUNCTIONAL_INPUTS (W8b, CEO-24) Retired with named behavior: - update-readme-throughput.ts + readme-throughput test: replaced a README anchor that no longer exists from a JSON file that was never produced; the script was a no-op. Guarantee withdrawn (nothing to protect). - eval-watch.ts + its dashboard tests: rendered ~/.gstack-dev/e2e-live.json and _partial-e2e.json, written only by unsharded runs, so it showed nothing for every supported (sharded) entry point. Guarantee withdrawn; live progress is the gstack-detach log or gh run watch. Manual-review rendering stays covered by eval-list and eval-summary tests. - Orphan fixtures (autoplan-pending-artifact-ae.json, autoplan-existing-app/, autoplan-sign-in-ui/, parity baselines v1.47.0.0/v1.57.7.0/v1.69.1.0): no test, touchfile or script reads them; superseded baselines stay in git history. - QA_FUNCTIONAL_INPUTS: exported, never imported. * refactor(test-free): delete dead WORKER_HOSTILE list and buildShardArgs parallel mode Neither had a production caller: full-suite mode runs shard processes, so the worker quarantine was inert and --parallel was never passed (W8b). * docs(test-value): narrow prompt-byte contract to machine-read tokens (D2) Define prompt-byte contract as machine-read tokens (markers, field names, command lines, enum values, file paths, security-boundary strings) and add a sentence-pin glossary entry: convert to structural checks or delete when a behavioral eval covers the behavior. * test(ratchet): count free tests that slice a paid test's source A free test that binds readFileSync(<paid test file>) and cuts it with .slice() tests the paid harness's code out of context even when it imports a lib/ symbol. Record the 15 existing files with reasons; new ones fail with fix text. Self-test covers positive and negative shapes. * test(browse): un-quarantine compare-board; all 16 board tests pass headless (W8d, CEO-24) The GSTACK_COMPARE_BOARD_TESTS opt-in hid a headless mismatch that no longer reproduces: all 16 tests pass on Bun 1.4.0 with the bundled headless Chromium, solo, repeated, and beside other in-process browser files. Protected behavior (the comparison-board DOM contract the plan-design-review/office-hours/design-consultation feedback loop polls) is checked on every free run again. * test: replace silent existsSync early returns with explicit skips or assertions (W8d) - browse/test/build.test.ts: server-node.mjs checks skip only when the bundle is absent and GSTACK_EXPECT_BINARIES is unset; the free CI lane and test:ubicloud build it and set the flag, so a dropped build step fails with the build command instead of passing with no assertions. - gstack-update-check: VERSION is tracked; the guard could only hide a bug. - gen-skill-docs host leakage/frontmatter checks assert the host tree exists (the module-level render always produces it). - cso-docker staged-runtime test uses test.skipIf so reports show it as skipped, not passed. * test(ship): convert ship-workflow-clarity sentence pins to structural checks Add test/helpers/prompt-structure.ts (between, expectTokens, expectAbsent, expectOrdered, expectMentions) with fix text on failure. ship-workflow-clarity now pins headings, step order and machine-read tokens (commands, fields, enum and status strings); safety rules are meaning-level keyword checks. Wording is judged by the 'ship/SKILL.md workflow' judge in skill-llm-eval. Sentence pins: 90 -> 0. * ci: add platform-qualification lane for opt-in ML, gitleaks and Swift tests (W8d, CEO-24) security-bench + security-live-playwright L4 (SECURITY_BENCH), the real gitleaks 8.30.1 memory-ingest cases (GSTACK_TEST_GITLEAKS) and the DebugBridge Swift build invariants (GSTACK_TEST_SWIFT) self-skip in every lane today. No scheduled lane has their prerequisites, so per CEO-24 they move to an owned dispatch + quarterly workflow instead of being deleted. Each job was run locally (ML 10 pass, gitleaks 130 pass; Swift needs macOS). test/platform-qualification-workflow.test.ts pins gate variable, job and file together. * fix(scripts): capture-baseline and preflight-agent-sdk no longer act on --help or typos (W8e) capture-baseline parses its flags strictly: --help prints usage, an unknown or valueless flag exits 2, and only a valid invocation writes a fixture (--help used to write test/fixtures/parity-baseline-current.json). preflight-agent-sdk gains --help, rejects unknown flags, and runs the live SDK query (API spend) only with --live. * test(evals): register the three keyless periodic paid files with case ids (W1b) skill-e2e-auq-consistency, skill-e2e-auq-verbose-vs-carved-ab and codex-e2e-recommendation-substance now carry touchfiles, a periodic tier and kind rule (one trial, unchanged), so editing one selects its own case instead of restoring the full PR gate. The verbose A/B case also registers the vendored pre-cut fixture it reads, and review-army-migration-safety registers the SQL fixture it reads. * feat(evals): narrow PR fallback for free-only inputs (W1a, CEO-13/20, ENG-13) The PR profile now exempts the duration seeds, every free-lane workflow (explicit list; inventory test fails on an unclassified workflow, .yaml and workflow_call included), scripts/ubicloud/** and fixtures declared in the explicit FREE_FIXTURES map. Each remaining unknown file carries a label and fix (needs touchfile entry / add to FREE_ONLY_PR_FILES / real unknown dependency). evals.yml itself still restores the full gate. * ci: delete ci-image.yml; the eval workflows already build and push the same content-hash tag (W8f) evals.yml, evals-periodic.yml and evals-marathon.yml each compute the identical hashFiles() tag and build/push it (with :buildcache and :latest) when missing, so ci-image's push trigger and weekly cron were no-ops (30-day median 0.5 min, 36/36 success). ci-image-tag-binding now pins the three eval workflows. * ci(evals): key periodic/marathon concurrency on ref+event; branch periodic dispatch skips the gate census (W2a, ENG-9, CEO-04) * refactor(paid): drop ~160 unused imports; leaf paid-types/paid-select modules break the paid-* import cycle (W8c) * ci(quality-gate): per-PR concurrency, free runner, drop unscoped bun audit (W2a, W8f) - Concurrency keys on pull_request.number || run_id, so back-to-back main pushes no longer cancel each other's credential scan. - ubuntu-24.04 instead of a billed 8-vCPU Ubicloud runner for a ~1 min job. - bun audit --audit-level=critical ran on every PR regardless of diff, so a newly published advisory turned unrelated PRs red, with its own ignore policy. dependency-review (lockfile PRs, fail >= high) and the weekly OSV sweep remain the dependency gates. * chore(test-free): refresh the free duration seed from the audit's Ubicloud recording Adds the 19 files merged after the last refresh, including the 115 s claude-overlay-setup that packed as ~1 s and doubled a shard (W6a). The seed is re-recorded on the final tree at the end of this wave. * ci: move tiny ubicloud-standard-2 jobs to free ubuntu-24.04 runners (W8f) actionlint, skill-docs, dependency-review, version-gate and pr-title-sync are sub-minute jobs; GitHub-hosted runners are free for this public repo. * feat(test-free): pessimistic unseeded packing, seed growth ratchet and CI health summary - Unseeded files pack at the seed's p99 instead of p75 (W6a). - --ci-plan warns in the job summary past 5 unseeded files; --ci-verify lists shards that outran their prediction by 1.5x (and 30 s) plus every flaky pass absorbed by the serial retry (W6a, W7a job summary). - test/free-seed-ratchet.test.ts fails when a seeded file over 60 s is not on scripts/free-test-seed-allowlist.json, when an entry is stale, and when the allowlist grows versus its merge-base copy unless the new entry is an annotated exception with a todo (CEO-10, DX-7). free-plan runs it with full history so the shrink check is real in the required lane. - Every message names the fix command and docs anchor (DX-6). * feat(evals): state PR coverage mode, counts, reuse and fallback files in the summary and comment (CEO-13) * test: make the tracked-tree skill-doc freshness check local-only; tidy skill-docs header (W8f) Every free CI shard regenerates the tracked SKILL.md files before running tests, so the --dry-run freshness assertion compared the regenerated tree with itself and could not fail there. It now skips under GitHub Actions; skill-docs.yml's git diff --exit-code is CI's freshness gate. Removes a stale concurrency comment in skill-docs.yml. * ci(free-tests): install zsh so the bash+zsh portability arms run (W6f) ~42 zsh-arm tests (aside-probe-shell, qa-browser-preservation, generated-docs-fences) skipped in CI because zsh is not in the runner image. All 141 tests in those files pass with zsh present. * feat(evals): executors write negative receipts at the execution boundary (CEO-25, ENG-6) A completed single-trial rule/judge shard that did not pass now writes its negative receipt beside the pass receipts in the slice artifact, so a cancelled run's FAIL still blocks an older PASS when its report never runs. Receipts merge negatives first and order by (run attempt, completedAt); a same-second FAIL/PASS tie resolves to FAIL. The runner call site is a one-line hunk in scripts/test-paid-shards.ts. * docs(cso): state that contained runtime/scanner execution is unavailable today The scanner catalog is empty while its build inputs await review and the runtime catalog holds no qualified profile until the private evaluator exists, so /cso runs static assessment only. AGENTS.md, README and docs/cso-release-qualification.md now say so; docs/cso-scanners.md already did. * test(helpers): expectMentions splits on sentence ends only Clauses joined by ';' or ':' are one rule; splitting there made a reworded rule fail for punctuation. * test(plan-ceo): convert skill-ceo-section-ordering sentence pins Safety and authority rules (never/do not/stop/only/without/wait/approval) are meaning-level expectMentions checks; other sentence pins are dropped. Headings, labels, option rows, placeholders and machine-read lines (auto-decide annotation, Mode:/approved decisions format, STATUS/SOURCE fields, CROSS-MODEL marker, gstack-ceo-mode-handoff) stay as tokens; ordering checks unchanged. Behavior is covered by the periodic PTY case in skill-e2e-plan-ceo-review-section-loading.test.ts. Sentence pins: 210 -> 23. * test(helpers): expectMentions treats wrapped lines as one sentence Templates hard-wrap prose; only sentence ends and blank lines separate rules. * test(gen-skill-docs): convert sentence pins to meaning checks or drop them Safety/authority sentences become expectMentions keyword checks; other English sentences are dropped (wording is judged by the per-skill workflow judges in skill-llm-eval and the E2E cases in touchfiles-data). Commands, config keys, markers (PLAN MODE EXCEPTION, NO UNRESOLVED DECISIONS, Gate outcome), field names and alternation-based meaning regexes stay. Removed the now-empty 'contains opt-in AskUserQuestion text' test (only pinned a sentence; the resolver's AskUserQuestion wiring is covered by the codex second-opinion tests in the same describe). Lane E's existsSync hunks are untouched. Sentence pins: 216 -> 65 (remaining lines carry machine tokens). * ci(windows): shard the Windows lane via --ci-plan/--ci-run/--ci-verify; move native campaigns to native-qualification.yml - windows-free-tests.yml: a Linux plan job curates and packs the Windows-safe files into 6 shards, one strict serial shard per windows-latest job, and a Linux aggregate verifies exact coverage and every result (8.1 min on one runner today). --windows-only now combines with the CI modes; the plan binds the curated file set (W6e). - Every Windows plan and --list run prints the curated count with its top exclusion reasons in the job summary; a free ratchet fails when the curated subset drops below its floor, with the fix (W6e). - The four Dia/cookie diagnostic dispatch campaigns move to the dispatch-only native-qualification.yml with one exclusive `mode` choice input, so their red dispatch runs no longer read as a red PR lane (W8f). Their workflow pins move to test/windows-native-workflows.test.ts; the boolean-exclusivity guard is replaced by the choice input. * feat(paid): per-slice CI job ceilings and an in-process slice deadline with not_run/hung outcomes and checkpoints (W2c, ENG-2) * fix(pass-rates): segment trial history strictly by EVAL_POLICY version Reader-compatibility floor for EVAL_POLICY v2 (ENG-14/CEO-35/DX-12). Only trials under the reader's own policy version feed labels and alarms; older policy trials stay visible but are never scored or used as a drift baseline; trials from a newer policy are ignored with a printed count and fix text. Reverting the later v2 writer commits leaves a reader that cannot pool v2 records into v1 series (the pre-PR reader at2db0b3adoes: it reports a mixed fixture as FAILING with drift alarms). * docs: one contributor command table; retired commands, seed sources and current workflows (W8g, DX-5, DX-13, CEO-12) - CONTRIBUTING.md gains 'Which command do I run?' (task -> command -> cost/time -> needs, including branch validation via gh workflow run); CLAUDE.md, AGENTS.md and TESTING_INTERNALS.md link to it instead of repeating command lists. Tier tables drop retired commands and stale per-run dollar estimates. - Retired names (test:evals, test:e2e, eval:bg, eval:flake-rank, eval:watch, ...) are gone from CLAUDE.md, CONTRIBUTING.md, TESTING_INTERNALS.md, ARCHITECTURE.md and USING_GBRAIN_WITH_GSTACK.md. - The flake-ledger claim now says what happens: CI uploads flake-ledger-* artifacts; eval:pass-rates reads only the local ledger. - TESTING_INTERNALS states that only test:ubicloud --record-durations produces an acceptable duration seed (DX-13). - CI section: quality gate no longer runs bun audit; dependency-review's real trigger; the platform-qualification lane. - docs/test-audit-2026-09.md gets a corrections section for its stale claims. - TODOS.md: audit follow-ups (post-merge metrics, stub removal, name reclaim, diff-aware planner); eval-watch shard-awareness and the image freshness tripwire closed as won't-do. * feat(evals): recover receipts of cancelled PR runs (W1c, CEO-14/34, ENG-4/5/7) A new recover-receipts job runs base-ref code with actions: read, restores the PR's store, merges the receipts of completed cancelled evals.yml runs for this PR (provenance-checked, at most 5, oldest first, negatives first), reconstructs completed panel negatives with panelVerdict() (partial panels get no credit) and keeps a recovery.json checkpoint that never advances past an unresolved run. plan-slices keeps contents: read, takes the store as an artifact, turns reuse off when recovery degraded or a run is unresolved, and carries the whole store to slices-report so nothing is lost. Any gh problem degrades to no recovered receipts with a named reason. * feat(evals): classify this wave's free-only tools and workflows for PR selection platform-qualification.yml, retired-command.ts, test-health-report.ts, bump-harness-version.ts and eval-bg.ts never run inside a paid case. * feat(evals): debounce PR push bursts before planning paid slices (W1d, CEO-15, ENG-11, DX-7) A tiny ubuntu-24.04 job waits 90 s only on synchronize when another run for the PR started in the last 15 minutes; cancel-in-progress supersedes, and a run that outlives the wait reports "superseded by <sha>" and plans nothing. Labels: evals-no-debounce skips the wait, evals-fresh disables receipt reuse. * perf(test): move the real-process browser settlement cases out of test-free-shards.test.ts (W6b) The 19 owned-browser settlement modes were 85 s of the file's 95 s and could not be packed apart from the fast runner unit cases. They move to a shared fixture with two files (lifecycle 47 s, ownership 39 s); the unit file drops to 10 s. Same modes, same assertions. * chore(evals): delete the finished validation_phase dispatch and its inline planner (W8f) Retirement (CEO-24): the protected behavior was a one-off cookie-repair validation subset (eight dependent cases) and a quality/behavior split of the census; that validation is complete, so the guarantee is withdrawn. Branch validation dispatches evals.yml with evals_all. * perf(test): inject the office-hours record grace in non-cooperative deadline tests * perf(test): shrink aside-render process slack via GSTACK_RENDER_SLACK_MS in timeout tests * perf(test): make the memorable lock give-up configurable for lock-contention tests * perf(test): check install-timeout knob normalization through its own setup lines * perf(test): inject a 2 s storage-reset deadline in the late isolated dispatch test * perf(test): shorten the slow gbrain fake to 1 s, still past the 300 ms probe timeout * ci(free-tests): run only cso-docker-integration in the free CSO Docker job (F16) cso-node-lifecycle-integration and cso-stack-cold-integration need GSTACK_CSO_TEST_STACK images and always skipped there; they stay in the CSO runtime workflows through test:cso:docker. * test(gen-skill-docs,plan-ceo): split mixed sentence pins into tokens and rules Sentences that wrap a backticked or bold token keep the token (expectTokens) and, when they state a safety rule, a keyword check; short safety sentences (25-39 chars) get the same treatment. * test(plan-ceo): convert ceo-workflow-clarity.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: periodic PTY case skill-e2e-plan-ceo-review-section-loading and the plan-ceo workflow judges. Sentence pins: 13 -> 1. * test(plan-eng): convert eng-review-routing.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: plan-eng E2E cases (skill-e2e-plan-eng-*) and the plan-eng workflow judge. Sentence pins: 28 -> 6. * test(plan-eng): convert eng-scope-entry-ap.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: plan-eng E2E cases (skill-e2e-plan-eng-*) and the plan-eng workflow judge. Sentence pins: 16 -> 5. * test(plan): convert plan-scope-selection.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: plan-review E2E cases and workflow judges in skill-llm-eval. Sentence pins: 19 -> 2. * test(qa): convert qa-lazy-sections.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: qa/qa-only E2E cases (skill-e2e-qa-*) and the qa workflow judge. Sentence pins: 71 -> 11. * test(qa): convert qa-browser-preservation.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: qa/qa-only E2E cases (skill-e2e-qa-*) and the qa workflow judge. Sentence pins: 25 -> 11. * test(qa): convert qa-probe-gates.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: qa/qa-only E2E cases (skill-e2e-qa-*) and the qa workflow judge. Sentence pins: 20 -> 5. * test(qa): convert qa-checkpoint-evidence.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: qa/qa-only E2E cases (skill-e2e-qa-*) and the qa workflow judge. Sentence pins: 7 -> 5. * test(qa): convert qa-evidence.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: qa/qa-only E2E cases (skill-e2e-qa-*) and the qa workflow judge. Sentence pins: 4 -> 3. * test(design): convert design-consultation-contract.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: design-consultation E2E/judge cases in touchfiles-data. Sentence pins: 44 -> 11. * test(outside-voice): convert run-in-background-guidance.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: outside-voice E2E cases and plan-review workflow judges. Sentence pins: 35 -> 5. * test(spec): convert spec-template-invariants.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: spec E2E/judge cases in touchfiles-data. Sentence pins: 36 -> 21. * perf(evals): 420 s census slice budget; case-shard skill-e2e-qa-workflow; seed its case walls (W5c) * feat(evals): evals.yml dispatch contract for eval:bg (CEO-17/29, DX-1, ENG-8/12) workflow_dispatch gains base_ref, base_sha, expected_sha, nonce and pr_receipts. The nonce appears in run-name so the dispatcher resolves its own run; evals_all=false runs the PR profile against base_sha/base_ref; a checkout that differs from expected_sha fails before any paid work with a named fix; pr_receipts reads that PR's receipts read-only through the recover-receipts artifact path (never the cache) and never saves. * ci(windows): pack the Windows lane with Windows-measured durations (W6e) The first sharded run (37221451711) finished in 6.0 min: the Linux seed has browse/test/cookie-import-native-job.test.ts at ~0 s (its cases skip on Linux) but it takes 122 s on Windows, so one shard ran 242 s against an 84 s prediction. The plan now reads scripts/free-test-durations-windows.json; a record_durations dispatch times every Windows-safe file alone and uploads it. * test(free): settlement case files import the runner rule they exercise Keeps the split files out of the test-of-test ratchet: the retry-eligibility rule is a direct runner import passed to the shared fixture. * fix(marathon): no hollow plan-decision-classification shard; office-hours marathon scenario scoped to the pilot (W2f) * test(free): satisfy the typecheck:test ratchet in the seed ratchet test * refactor(ci-history): one shared GitHub history reader with the CI flake-ledger reader Extract pass-rates' gh fetch layer into scripts/lib/ci-history.ts (CEO-09) and add the W7a reader: paged run listings that fail whole on any page error, per-run artifact downloads (cached, size-capped, data only), flake-ledger parsing, the pre-registered flaky-file rule (> 5% of main free-tests runs over a window of at least 20 runs, widened to the newest 20 runs when the window is thinner), a job-summary table, and named unavailable reasons with next steps. * feat(test-health): test:health report of the audit success metrics scripts/test-health-report.ts (CEO-09/06/22/32, DX-8/9/12/13) prints every success metric with its counting rule from CI history: PR full-fallback rate, reused PR trial records, PR-lane spend per merged PR and per validated revision, cancelled slice-minutes per week, push-to-verdict p50/p95, census expected failed trials per run with raw failure rate per kind/class and P(lane red) under the recorded panels vs single-trial aggregation, INFRA re-dispatches, quarantine evidence (insufficient evidence distinct from healthy), free flaky-pass rate, free/Windows wall, free serial time and the net-complexity line. An unreadable input prints 'unavailable: <reason>; next: <step>', never 0. --enforce fails on a flaky file (W7a) or > 5 unseeded free files (CEO-10); unavailable checks never fail and keep the issue open. * test(review): convert review-workflow-clarity.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: review E2E cases (skill-e2e-review*) and the review workflow judge in skill-llm-eval. Sentence pins: 85 -> 17. * test(review): convert review-entry-and-design-clarity-au.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: review E2E cases (skill-e2e-review*) and the review workflow judge in skill-llm-eval. Sentence pins: 15 -> 4. * test(review): convert review-enum-lifecycle.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: review E2E cases (skill-e2e-review*) and the review workflow judge in skill-llm-eval. Sentence pins: 8 -> 0. * test(ship): convert ship-control-flow.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 74 -> 9. * test(ship): convert ship-skip-requeue.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 28 -> 3. * test(ship): convert ship-plan-completion-invariants.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 28 -> 12. * test(ship): convert ship-reentry-gates.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 16 -> 4. * test(ship): convert ship-document-release-dispatch.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 11 -> 4. * test(ship): convert ship-apple-gate.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 7 -> 0. * test(ship): convert ship-skip-actor.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 6 -> 1. * test(ship): convert ship-template-redaction.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 5 -> 4. * test(ship): convert ship-publication-gates.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 5 -> 2. * test(ship): convert ship-review-loop.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 3 -> 1. * test(ship): convert ship-version-sync.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 5 -> 2. * test(ship): convert ship-pr-liveness-policy.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: ship E2E cases (skill-e2e-ship*, skill-e2e-workflow) and the 'ship/SKILL.md workflow' judge. Sentence pins: 4 -> 0. * test(plan-review): convert plan-review-cases.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: plan-review E2E cases and workflow judges in skill-llm-eval. Sentence pins: 58 -> 15. * test(autoplan): convert autoplan-phase-order.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: autoplan E2E cases (skill-e2e-autoplan-*) and the autoplan workflow judge. Sentence pins: 42 -> 11. * test(autoplan): convert autoplan-phase-handoff.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: autoplan E2E cases (skill-e2e-autoplan-*) and the autoplan workflow judge. Sentence pins: 20 -> 4. * test(autoplan): convert autoplan-snapshot.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: autoplan E2E cases (skill-e2e-autoplan-*) and the autoplan workflow judge. Sentence pins: 21 -> 5. * test(outside-voice): convert outside-voice-preflight.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: outside-voice E2E cases and plan-review workflow judges. Sentence pins: 26 -> 9. * test(ask-format): convert resolver-ask-user-format.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: AUQ E2E cases (skill-e2e-auq-*); prompt-injection rule kept as a meaning check. Sentence pins: 32 -> 15. * test(skills): convert binding-template-drift.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: workflow judges in skill-llm-eval. Sentence pins: 19 -> 13. * test(skills): convert carve-plan-fixture.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: workflow judges in skill-llm-eval. Sentence pins: 20 -> 6. * test(land-and-deploy): convert land-and-deploy-postfail.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: land-and-deploy E2E cases and its workflow judge. Sentence pins: 21 -> 14. * test(land-and-deploy): convert land-and-deploy-ci-gate.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: land-and-deploy E2E cases and its workflow judge. Sentence pins: 5 -> 4. * test(land-and-deploy): convert land-and-deploy-flow.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: land-and-deploy E2E cases and its workflow judge. Sentence pins: 5 -> 3. * test(office-hours): convert office-hours-completion.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: office-hours E2E cases (skill-e2e-office-hours*). Sentence pins: 16 -> 1. * test(plan-ceo): restore the stale closing-route guard The negative check for 'Closing hooks' / 'return to section' guards a retired route token, not a sentence; the first conversion pass dropped it. * ci(test-health): weekly test-health workflow with an honest tracking issue New test-health.yml (CEO-18/DX-9): Monday 10:00 UTC after the periodic census plus dispatch, free ubuntu-24.04 runner, permissions contents:read + actions:read + issues:write only. Runs bun run test:health --since-days 7 --enforce; an enforced failure upserts one tracking issue, a run with unavailable inputs keeps it open and lists them, and it closes only when every enforced check has evidence and passes. Only main runs touch the issue. * feat(evals): an edited paid test file runs its own gate cases in the PR lane (DX-11) A gate case outside the audited fast profile is selected when its single owning paid test file changed and the runner can select it by name (its Bun test is named by the case id). The manifest records directCases and validation accepts only recorded, name-addressable ones; the runner and planner read the file->cases map from test-pr-profile. Cases the runner cannot address stay deferred with the fix. An inventory test covers every owned gate case. Touches one hunk each in test-paid-shards.ts and lib/paid-plan.ts, and pr-shared-input-selection.test.ts's ship-skip pin. * ci(osv): tracking issue for scheduled reds and a 14-day suppression expiry test F11/W8f: a failed main OSV scan now upserts one tracking issue and a clean scan closes it (scheduled reds notified no one during the August backlog). A free test fails 14 days before any .osv-scanner.toml ignoreUntil (all four expire 2026-11-30), with the fix: upgrade and delete, or re-justify and move the date. * test(ship,review): keep guards against retired fail-open instructions 'skip silently' on reviewer failure and 'do not block /ship on subagent failure' were harmful instructions, not prose style; keep them absent with the shortest distinctive phrase. * feat(eval-select): default to the pr profile DX-10: eval:select previews the PR lane's selection by default, matching test:pr and eval:bg:pr; --profile full (or EVALS_PROFILE=full) keeps the plain touchfile selection. * test(evals): type-clean the recovery gh fake (typecheck:test ratchet) * chore(windows): record the Windows duration seed (run 37221963236) 573 Windows-safe files timed alone on windows-latest; cookie-import-native-job is 102 s there. Six shards now predict 154 s each. * feat(evals): eval:bg dispatches the pushed ref to CI or runs locally under a 1.5x-planned cap (W5d, CEO-17/29, DX-1/2/3/7, ENG-12/19) * feat(runners): --help on both shard runners via the shared flag loop; paid runner header describes today's planner/executor/report (W8e) * test(windows): drop the stale Playwright exclusion and force-include probe-proven files (W6e) A temporary windows-latest probe (run 37221995077) ran each of the 97 files excluded for 'launches Playwright browser' or 'raw /tmp/ path' alone: all 17 Playwright files pass (Chromium is installed and Bun drives it there), and 41 of the /tmp files pass with executed cases. The Playwright pattern is removed and the 41 files are force-included with the probe as their reason; the 36 real failures stay excluded. The curated subset grows from 573 to 631 files and the ratchet floor follows. Windows curation moves to scripts/lib/windows-curation.ts (the runner drops to 2000 lines). * test(free): one install fixture cloned from a read-only seed (W6c, ENG-1) Merge test/helpers/setup-codex-scope-fixture.ts into install-fixture.ts. The checkout is built once per test file into a read-only seed and cloned per fixture with copy-on-write where the filesystem has it (full copy otherwise), restoring each file's own mode; clones never hard-link the seed because put() and tests write in place. Callers register afterAll(cleanupSeed); Bun's runner fires no exit event, so seeds of killed runs are swept by pid. test/install-fixture.test.ts is the ENG-1 tripwire: put/setVersion/chmod in one clone leave the seed and a sibling unchanged, and clones share no inodes with the read-only seed. * test(free): split claude-overlay-setup by describe (W6b) The 115 s serial file becomes default/lifecycle/installs files (5/4/3 tests, unchanged bodies) sharing test/helpers/claude-overlay-fixture.ts, so the shard packer can balance them. * test(cso): convert cso-contracts.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: cso E2E/judge cases (skill-e2e-cso*, cso-eval). Sentence pins: 16 -> 8. * test(cso): convert cso-preserved.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: cso E2E/judge cases (skill-e2e-cso*, cso-eval). Sentence pins: 10 -> 3. * test(cso): convert cso-eval.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: cso E2E/judge cases (skill-e2e-cso*, cso-eval). Sentence pins: 7 -> 4. * test(browser): convert aside-driver.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: Aside/browse E2E cases; the installer ban stays a meaning check. Sentence pins: 27 -> 9. * test(browser): convert third-party-actions.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: Aside/browse E2E cases; the installer ban stays a meaning check. Sentence pins: 17 -> 2. * test(skills): convert skill-validation.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: workflow judges in skill-llm-eval. Sentence pins: 19 -> 6. * test(skills): convert workflow-excerpt.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: workflow judges in skill-llm-eval. Sentence pins: 37 -> 10. * test(skills): convert question-tuning-registry-path.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: workflow judges in skill-llm-eval. Sentence pins: 4 -> 0. * test(skills): convert host-conformance.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: workflow judges in skill-llm-eval. Sentence pins: 4 -> 4. * test(memory): convert memory-ingest-landing.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: memory-ingest free tests that run the binary. Sentence pins: 11 -> 9. * test(windows): exclude the skip-only claude-overlay setup files from the Windows subset Their real-setup cases are describe.skipIf(win32); after the split their bin/ spawns live in the shared helper, so the source scan stopped seeing them. * test(skills): convert agents-digest.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 1 -> 0. * test(skills): convert brain-preflight.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 2 -> 1. * test(skills): convert codex-skill-isolation.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 1 -> 0. * test(skills): convert office-hours-review.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 2 -> 1. * test(skills): convert onboarding-moved-literals.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 2 -> 2. * test(skills): convert open-gstack-browser-liveness.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 3 -> 2. * test(skills): convert plan-floor-review.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 3 -> 2. * test(skills): convert plan-review-report-recording.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 4 -> 2. * test(skills): convert regression-1539-review-self-verify.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 4 -> 0. * test(skills): convert skill-fixture.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 6 -> 3. * test(skills): convert template-context-parity.test.ts sentence pins Safety and authority sentences become expectMentions keyword checks (reword freely, keep the rule); other English sentence pins are dropped. Headings, labels, placeholders, commands, field names, enum/status tokens and ordering checks stay. Behavior and wording: the owning skills' E2E cases and workflow judges; CLI/hook output and fixture-data pins in the tail were left alone. Sentence pins: 1 -> 0. * test: restore pins on renderer output and paid-fixture inputs cso-contracts (the report renderer's required empty phrase), memory-ingest (binary output), carve-plan-fixture, ship-skip-actor and cso-eval (inputs the paid harness builds) assert product or fixture output, not skill prose, so the value-bar narrowing does not apply to them. * feat(eval-policy): v2 series identity, HARNESS_VERSION guard and identity backtest W4a (CEO-27/ENG-3/DX-6), not yet wired to the writer: caseSeriesIdentitiesV2 keys a case by the bytes it owns (paid test file, fixtures, its skills' prompt files including the generated SKILL.md) plus HARNESS_VERSION, and records the full consumed-input fingerprint as provenance. scripts/harness-version.json pins the blob of every shared-harness file (GLOBAL_TOUCHFILES plus the session runners, PTY harness, e2e gate and LLM judge), one line per file; test/harness-version.test.ts fails on drift with both fixes, and scripts/bump-harness-version.ts records the decision: --bump (new series for every case) or --non-behavioral (compatibility entry, no reset). eval-trial-series --backtest replays identities over weekly main revisions and recorded trials (ENG-3/DX-12). * feat(pass-rates): weekly history is main's scheduled runs plus main dispatches W4b: pass-rates reads evals-periodic history from main only, keeping scheduled runs and main dispatches and never a branch dispatch, so back-to-back branch validation runs neither feed pass rates nor count as weeks for quarantine expiry or drift. --branch <name> still reads one branch's runs for inspection. * docs(test-audit): EVAL_POLICY v2 decision memo with the identity backtest D1 memo (CEO-33, ENG-3, DX-12, CEO-27): P(green) arithmetic, false-blocking targets, the v2 identity rule and harness guard, weekly history, W4c evidence (the named 'stochastic' cases pass 26/27 to 34/34, so they stay rule), the backtest over 29 weekly main revisions and 14,898 recorded trials, what it means for quarantine reachability, alternatives (gating vs trended, adaptive panels not adopted, buy vs build), and the rollback proof on the pre-PR reader. * feat(eval-policy): EVAL_POLICY v2 writer: case-owned series identity The v2 writer, last commit of the W4 block (DX-12/ENG-14/ENG-21): the report job's stamp now writes caseSeriesIdentitiesV2 (case-owned bytes plus HARNESS_VERSION) as series_identity, the full consumed-input fingerprint as series_fingerprint and harness_version as provenance, and EVAL_POLICY.version is 2 (approved 2026-10-04, D1). The v1 touchfile identity is removed. Rollback = revert this commit (and the W4 commits above the reader-compat floor); readers then ignore the v2 records with a printed count. * test: restore pins on paid-harness prompt inputs review-enum-lifecycle and plan-review-report-recording assert the prompt a paid case's harness builds (opts.prompt / call.prompt), a fixture contract, not skill prose. * test(security): check injected safety lines on meaning, not capitals content-security, the canary instruction and the arm judge prompt still must carry their never-follow / never-output / exact-"none" rules; the checks are case-insensitive keyword checks so emphasis can change. The UNTRUSTED envelope markers and "none" value stay exact tokens. (Hidden element stripping fails locally only because Playwright Chromium is not installed; same at base.) * test(plan-ceo): keep the outside-voice scope-summary rule as a meaning check The first codemod pass left an empty if body (TS1313). * chore(windows): re-record the Windows duration seed for the 631-file subset (run 37222668939) * ci(free-tests): summarize every shard's flake ledger in the aggregate job (W7a) The aggregate downloads flake-ledger-* (one subdirectory per shard) and appends lane C's `scripts/test-health-report.ts flake-summary` output to the job summary before strict verification. The runner's own flaky table is dropped so the ledger reader stays the single source; --ci-verify keeps the shard-overrun warning. * feat(evals): free test files anywhere and the stored-zip helper never restore the full PR gate (W1a) The CEO-23 replay found design/test free tests forcing fallback (36485436963). * feat(evals): replay recorded PR pushes through today's selector (CEO-23, ENG-18) scripts/replay-pr-selection.ts reports per push the recorded vs replayed mode and case count, dropped gate cases, retired failed cases and every miss (a failed case that depends on the diff but is no longer selected). * refactor(evals): one case-sharded carve-section-loading file with a case id and touchfiles per skill (W5a) * test(free): hold qa-deadline's full-pipe case on a FIFO, not a paused Bun stream Bun gives a child 'pipe' stdio a unix socketpair, so whether the 2 MB fill actually blocks depends on the parent's reader and the host's socket buffer sizes. CI (run 36761671811, both attempts) saw exit 0 after ~130 ms; with net.core.{w,r}mem_default=4 MiB locally the old case fails 3/3 the same way. A FIFO the test never reads is bounded by the kernel pipe buffer, so the receipt write genuinely blocks and the 5 s settlement deadline must fire. The 7 s bound now starts once the preload has queued the write. * test(free): event-driven waits in pty-output-wake close-releases-observers: the 500 ms wall race becomes an ordering check (the waiter is released while only SIGINT has been sent, before close's escalation finishes), and the Bun.spawn spy fakes only the PTY launch so a shard neighbor's in-process spawn cannot add a stray SIGTERM (CI runs 36015568981, 36036582721, 36074636848). continuous-redraws: the fixture spinner stops once the observer has made five coalesced reads, so the run reaches its work deadline with no redraw in flight. Streaming right up to the deadline raced the helper's screen drain and failed as 'PTY screen parse failed; viewport is incomplete' (5 CI runs 09-30..10-03; 4/40 locally under 8 busy loops, 0/40 after). * test(free): session-runner long-capture handshake waits for the collected Read event The fake CLI's init line arms the runner's work-phase timer, so the worker's handshake (work-ready + a >200 s timer) could pass before the runner's read loop had collected the Read event printed just before work-ready. Advancing the clock then killed the run with the Read lost: readSection false (CI run 37194511124). The worker now also waits for the runner's own progress line for that Read. Forcing the observed ordering (work-ready 200 ms before the Read line) fails the old test deterministically and passes the new one. * test(free): budget-override restores the CI variables it rewrites Its provenance cases set and then deleted CI, GITHUB_ACTIONS, GITHUB_REF_NAME, GITHUB_SHA and the GitLab CI_* names without restoring them, so in a CI shard every later file ran with CI unset. qa-only-cleanup's real browse daemons then launched Chromium without --no-sandbox, the sandbox failed on the runner, and both real-Chromium cases timed out with 'QA cleanup fixture did not become ready' (shard 12 attempt 1 of six runs on 10-04, retry alone green). Retained startup log: 'Chromium sandboxing failed!', child env with no CI. Reproduced 3/3 with CI=true, userns denied and budget-override ahead of qa-only-cleanup in one process; 0/3 after. * test(free): pr-shared-input-selection names its base and package history Every selection now passes EVALS_BASE and packageVersionOnly explicitly, so no case reads the checkout's git state. Before, 12 calls ran detectBaseBranch and the cumulative case diffed package.json against merge-base(origin/main, HEAD) — the ambient input that turned main red in runs 36572856858 and 36594314027. A PATH git spy counts 14 git calls in the old file and 0 now. * feat(evals): derive PR-lane dependents for unmapped files instead of restoring the full gate scripts/pr-dependencies.ts derives, from the checked-out tree, which paid cases consume each repository file: test import closures, repo paths and path.join segments in code/shell/skill text (whole-line comments and selection data excluded), bin script names, compiled binaries by outfile path (scripts/build.sh), package scripts, template placeholders through RESOLVERS, and host configs by host id. The global touchfiles' import closure is global. PR selection: an unmapped file with derived consumers puts the run in the new 'dependents' mode (every dependent gate case and judge, no profile cut); a tracked file under a derivable directory that nothing reaches is exempt; periodic/marathon workflows, .gitignore and tsconfig.test.json never run the PR gate. PR_FULL_GATE_FILES is the fail-closed list (deps, CI image, setup, build, evals.yml and its actions, test preload, tsconfig.json, .gitattributes, the skill generator and preamble resolvers, the eval policy). Untracked or underivable files restore the full gate with fix text. The summary and PR comment list derived dependents. * feat(evals): replay misses count derived dependents; report wave vs ordinary pushes (CEO-23) * test: drop FREE_FIXTURES entries for fixtures deleted in W8b * test: re-shape the census attribution fixture to qa-workflow and carve case shards * test: census fixture case order * ci: 420 s PR-lane slices with per-slice ceilings; periodic tracking issue only on main evals.yml joins the census lanes at the 420 s slice budget (W5c/CEO-15) and indexes each eval slice's job timeout from .plan.sliceCiTimeoutMinutes with the slice-deadline clock as its first step (W2c/ENG-2). evals-periodic.yml's tracking-issue upsert and close run only on refs/heads/main, so a branch dispatch whose gate census is skipped (CEO-04) never opens or closes #2755. * docs: integrate lane docs for the audit wave (eval-bg backends, PR fallback, policy v2, ceilings, evidence) - CLAUDE.md: 'Running evals as an agent' describes scripts/eval-bg.ts's dispatch and local backends, forcing flags, the sentinel and status; eval:select's PR-profile default; prompt-structure helper and value-bar terms. instruction-facts now requires scripts/eval-bg.ts in that section. - CONTRIBUTING.md: decision table gains test:health, eval:select default, eval:bg backends and the include_gate_census / evals_all dispatch lines; 420 s runners and per-runner ceilings; flake ledger, OSV tracking issue and expiry test, weekly test health; prompt-structure guidance. - AGENTS.md: build commands name the eval:bg backend choice and test:health. - docs/TESTING_INTERNALS.md: anchors the fix texts point to (#pr-paid-lane-fallback, #pass-rate-policy-versions, #harness-version, #flake-ledger, #duration-seed), receipts/recovery/debounce, per-slice ceilings, the slice deadline with not_run/hung and checkpoints, the eval-bg cap formula in place of the detach floors, EVAL_POLICY v2 history, carve case shards via --case. - docs/test-audit-2026-10.md: CEO-23 replay (165/168 -> 164/168 full-fallback, 0 misses), ENG-17 slice table (re-measured on this tree), D2 prose-pin metric. - TODOS.md: progress note on 'Let pass-rate history decide the rest'. - test/testing-internals-anchors.test.ts: every TESTING_INTERNALS.md#anchor named in code must match a heading. * test(free): hold qa-deadline's blocked-output-pipe receipts on a FIFO The five 'guard %s receipts survive a blocked output pipe' cases filled a paused Bun child pipe with 2 MiB. That pipe is a unix socketpair, so the fill only blocks while the host's socket buffers are smaller than the write: with net.core.{w,r}mem_default=4 MiB the old cases fail 13 of 15 case runs (the guard finishes before the test resumes the stream). The held stream is now a FIFO the test drains only after resume(), bounded by the kernel pipe buffer; Windows keeps the paused pipe. Bounds and assertions are unchanged. * test(free): qa-deadline waits for a written pid, not just the pid file DRIVER and LEAF write their pid with writeFileSync, so under load ready() can see the file before its digits and fail 'expected > 0, received 0' (seen once in 150 loaded runs). After any early failure the finally SIGKILLs the CLI, which orphans the detached command group; a leaf whose pid file is not yet readable then keeps the output stream open and the case hangs to its 15 s timeout (2/80 old-file runs and 3/310 FIFO-only runs under 8 busy loops; the instrumented hang showed the CLI already SIGKILLed by the finally). ready() now polls within the same 3 s bound until the file holds a positive pid. * fix(evals): a deleted file selects the dependents of the live files that still reference it PR selection treated every path absent from the head tree as an unknown dependency, so any PR that deleted a file forced the full gate. A deleted path is now placed like a live one, against the head tree: a matching touchfile selects its cases; live code, skill text or a full-gate input that still references it (path, extensionless import target, relative import, bin name, ancestor directory, compiled-binary outfile; whole-line comments and data files excluded) contributes its dependents, a full-gate referencer restores the full gate with a 'deleted but still referenced' fix, and an unreferenced deleted path has no dependents. Deleted PR_FULL_GATE_FILES entries still force the full gate. Tests that used absent paths as stand-ins for new unmapped files now use tracked root files (or an explicit tracked set); the CEO-23 replay counts misses through those references too. * docs: integrate free-suite lane docs (seed anchor, Windows lane, native qualification, install fixture, flake rules) - docs/TESTING_INTERNALS.md: '### Free suite duration seed' (the anchor the seed messages link) with DX-13, the 99th-percentile packing, --ci-plan warning, --ci-verify overruns and the CEO-10 seed ratchet; the Windows 6-job lane, its Windows-measured seed and refresh dispatch, curation and WINDOWS_CURATED_FLOOR; native-qualification.yml modes; the merged install fixture; test-only timing knobs; the flake-ledger job summary, Windows ledger names and three free-suite flake rules; zsh in the Ubicloud mirror. - scripts/test-health-report.ts links #free-suite-duration-seed, so the two seed messages share one heading (the anchor test caught the split). - CONTRIBUTING.md: Windows seed refresh and native qualification rows; seed-source pointer. AGENTS.md: Windows six-job lane. - docs/cso-release-qualification.md: the free CSO Docker job runs only cso-docker-integration.test.ts. - docs/test-audit-2026-10.md: free-suite evidence lines. - TODOS.md: CEO-11b progress note on the pre-push hook hang. * test: final duration seeds on the integrated tree; retire the emptied cookie-validation-phases file Linux seed re-recorded on Ubicloud standard-16 and the Windows seed from dispatch run 37227140871, both atc903310. The seed allowlist drops the three entries that are no longer over the ceiling. cookie-validation-phases lost its validation-phase pins with W8f and its Windows/Dia pins moved to windows-native-workflows with native-qualification.yml, so the file is deleted and the curated Windows floor rises to 638. The Windows recorder writes the seed at its default path so GSTACK_FREE_TEST_DURATIONS never leaks into timed tests. * test: re-express stale PR-lane pins against the new evals.yml contract - ci-eval-cache: the profile/fresh expressions now include evals_all=false dispatches and pr_receipts/evals-fresh; the PR store is restored only by recover-receipts (still scoped to repository_id + PR, PR events only), plan-slices takes it as an artifact and never touches the cache, saves stay PR-only, EVALS_CACHE_PR binds pr_receipts dispatches, and the report verdict artifact carries report receipts. - ci-paid-coordination: plan-slices needs only the two ubuntu coordination jobs (never the image); the fork/Dependabot clause is unchanged on plan-slices and also gates debounce and recover-receipts; only recovery holds actions: read. - qa-supervision-selection: auq-consistency and auq-verbose-vs-carved-ab (W1b) reach claude-pty-runner and pty-screen through auq-sdk-capture, exactly as auq-format-gate does. - paid-retry-supervision: the full-validation plan uses a tracked full-gate input (setup); an absent path is now a deletion placed by its references. * ci(windows): record the Windows seed at the default path * chore: HARNESS_VERSION non-behavioral decision for the audit-wave integration * v1.91.20.0 release metadata: test, eval and CI audit wave * test(compare-board): wait for the post-submit state the feedback POST settles The two post-submit assertions read the board once, but the board disables the submit button and shows the message only after its feedback POST resolves. On a loaded Ubicloud shard the read beat the round trip (FLAKY-PASS in the final free-suite run). Delaying the POST by 400 ms reproduces both failures at HEAD; polling for the settled state passes. * test(plan-eng plan-mode): run the seeded STOP-gate smoke in its own fixture project The seeded plan proposes a custom test runner, so the review's Step 0 reads the working tree's test setup. In the gstack checkout that is gstack's own sharded runner, and the case timed out at 300 s in census 37228573062 after this wave reshaped the runner. It now runs in a four-file Bun project with git history, with the product-notice suppression auto-decide-preserved's standalone fixture already uses. Local pass on Bun 1.4.0 + Claude Code 2.1.284: asked in 121 s, seed tokens observed. * test(plan-mode evidence): pin the seeded eng smoke's isolated fixture cwd and env * ci(image): Git >= 2.44 so paid shared-libs cases run the supported safe-git path bin/gstack-safe-git prefixes every /deslop-shared-libs Git read with --no-lazy-fetch, which noble's git 2.43 rejects (exit 129). The eval image therefore ran every paid shared-libs case on the unsupported-Git fallback: local history unavailable, branch HEAD unknown. shared-libs-read-only failed on exactly that in PR run 37230639146 ("Current branch HEAD: unknown. The safe-git probe failed (unknown option: --no-lazy-fetch, git 2.43.0)") and in 2 of 74 earlier PR runs. The image installs current Git from the Ubuntu Git Maintainers PPA and fails its build if --no-lazy-fetch is missing; the deliberate unsupported-Git case keeps its fake Git. * eval: pool matching branch census trials into main's pass-rate series (D1 option b) Approved 2026-10-05. eval:pass-rates also reads completed branch census runs in the weekly window. A branch trial counts only toward a series a main run also has (same case-owned bytes, HARNESS_VERSION, model and CLI), so a branch extends main's history but never starts or becomes a case's current series; weeks for quarantine expiry still count main runs only. The D1 backtest put this at 67 of 210 cases with enough trials for the entry rule, against 0 of 195 on main alone. * C2: /qa defines its outcome filename fields; QA report templates name the measured timing fields Low judge samples in failing panels named both: qa workflow (37186854666) 'an undefined {user} in the outcome filename', and qa-only workflow (37198445662) 'template asks for Duration / durationMs totals while reporting.md mandates Probe budget and Guarded command time'. The qa union stays under its 1.11 size ratio (93292 of 93294 bytes). (cherry picked from commite14c0c1de1) * C2: Browser Quick gets a feasible budget; QA loop names its directory and stop path Judge rationales on the qa-only panels (2 of the last 3) cited the 30 s Browser Quick budget: homepage + 5 targets, each a checkpoint write and a guarded command, left ~5 s per probe. Quick is now 180 s (method text: 3 minutes); the qa-only-no-fix paid check expects the same native deadline. PROBE_DIR points at its source line, a stopped loop goes to the final report steps (annotations, materialize, Markdown), and /review and /ship say that after smoke expiry only plan checks rerun in revalidation. (cherry picked from commit78d4a2a343) * qa: fit the C2 judge fixes under the qa and review size caps Brings GSTA-21's qa.ts trims (3bd625d,ce73af0) for the cherry-picked C2 wording: PROBE_DIR keeps 'owned', the stop line points at §4, and the post-expiry rule is one sentence, so /review fits its cap. qa measures 93,303 / 84,049 = 1.11010 against the same 1.1102 cap GSTA-21 set. The qa-only workflow judge passed 10 of 10 local trials on this wording (7 of 10 before the C2 fixes). * test: qa-only fixture keeps its caller-set 30 s deadline The qa-only-no-fix fixture tells the model to start the guard with 30 s (a caller limit), so its deadline assertion's default stays 30 000 ms; the product's Browser Quick default (180 s) does not apply to it. Reverts the helper and its test to their base. (cherry picked from commite36e622add) * test: qa-quick sets a caller probe limit and drains past its session budget C2 raised Browser Quick's native budget to 180 s. qa-quick is the only gate case on the native budget, and its wall went 194 s (main periodic, pre-C2) -> 254 s and 274 s (this PR's runs) -> 300 s session timeout (run 37242691913): the agent now probes every navigation target with a checkpoint, then needs ~80 s to report. Like qa-only-no-fix, the eval now sets a caller probe limit (30 s), scopes the fixture, and gives bun's outer timeout the session drain margin instead of racing the 300 s session. The product's 180 s budget and the session budget are unchanged. Diagnostic rerun passed in 195 s. (cherry picked from commitf8dc64031e) * chore: restore the audit wave's package scripts after the main merge (version 1.91.23) * qa: keep main's one-sentence post-expiry rule for /review and /ship The C2 variants ("step 4c reruns plan checks only" and "even in 4c") read to the review workflow judge as conflicting with Step 5.8's repeat-pass reruns: 6 of 10 local trials passed with the longer sentence and PR run 37248650879 failed on the shorter one. Main's "Post-expiry smoke rechecks are not-run." passed 10 of 10. qa (9/10), qa-only (10/10) and ship-managed-hook-refresh (10/10) were measured on the same tree. * v1.91.24.0: move off the slot #3036 claims
68 KiB
Contributing to gstack
Thanks for wanting to make gstack better. Whether you're fixing a typo in a skill prompt or building an entirely new workflow, this guide will get you up and running fast.
Quick start
gstack skills are Markdown files that Claude Code discovers from a skills/ directory. Normally they live at ~/.claude/skills/gstack/ (your global install). But when you're developing gstack itself, you want Claude Code to use the skills in your working tree — so edits take effect instantly without copying or deploying anything.
That's what dev mode does. It symlinks your repo into the local .claude/skills/ directory so Claude Code reads skills straight from your checkout.
git clone https://github.com/garrytan/gstack.git && cd gstack
bun install # install dependencies
bin/dev-setup # activate dev mode
Full clone vs shallow. The README's user-facing install uses
--depth 1for speed. As a contributor, use a full clone (no--depthflag) — you'll need history forgit log,git blame,git bisect, and reviewing PRs against earlier versions. If you already have a--depth 1clone from following the README, promote it to a full clone withgit fetch --unshallow.
First free check (no API key, no browser)
bun install --frozen-lockfile
bun run typecheck # expect no output and exit 0 (about a second)
bun run typecheck:test # expect "test typecheck ratchet: N known diagnostics, none new."
typecheck covers product code (browse/src, lib, scripts, bin, hosts, and the other
entries in tsconfig.json) and must stay at zero errors. typecheck:test holds test code to the
committed scripts/typecheck-test-baseline.json: a new or repeated diagnostic fails and names
the file, TS code and message; fixing diagnostics also fails until you lock the smaller allowance
in with bun run typecheck:test --write-baseline. Editing lib/cso/*.ts? Run
bun run format:cso before committing; CI runs format:cso:check. All three run in the required
free-tests check.
Now edit any SKILL.md, invoke it in Claude Code (e.g. /review), and see your changes live. When you're done developing:
bin/dev-teardown # deactivate — back to your global install
Operational self-improvement
gstack automatically learns from failures. At the end of every skill session, the agent
reflects on what went wrong (CLI errors, wrong approaches, project quirks) and logs
operational learnings to ~/.gstack/projects/{slug}/learnings.jsonl. Future sessions
surface these learnings automatically, so gstack gets smarter on your codebase over time.
No setup needed. Learnings are logged automatically. View them with /learn.
The contributor workflow
- Use gstack normally — operational learnings are captured automatically
- Check your learnings:
/learnorls ~/.gstack/projects/*/learnings.jsonl - Fork and clone gstack (if you haven't already)
- Symlink your fork into the project where you hit the bug:
Setup creates per-skill directories with SKILL.md symlinks inside (
# In your core project (the one where gstack annoyed you) ln -sfn /path/to/your/gstack-fork .claude/skills/gstack cd .claude/skills/gstack && bun install && bun run build && ./setupqa/SKILL.md -> gstack/qa/SKILL.md), links each skill's runtime assets alongside (sections/, templates, checklists — everything except SKILL.md, tests, build output, and.tmplsources), and asks your prefix preference. Pass--no-prefixto skip the prompt and use short names. - Fix the issue — your changes are live immediately in this project
- Test by actually using gstack — do the thing that annoyed you, verify it's fixed
- Open a PR from your fork
This is the best way to contribute: fix gstack while doing your real work, in the project where you actually felt the pain.
What CI does on a fork PR. GitHub never gives a fork PR this repository's
secrets, so CI runs everything that needs none: the required free-tests check
(the Linux free suite, typecheck, the macOS and Windows gates), Windows Free
Tests, Skill Docs Freshness, Workflow Lint, Version Gate, Quality gate, the
make-pdf gate, and any path-triggered gates your change touches. E2E Evals
still builds the CI image from your Dockerfile.ci without publishing it, and
skips its paid eval jobs, which need provider API keys. That skip is expected
and does not block your PR. It is also not a pass: a maintainer runs the paid
evals from a branch in this repository before merging. A first-time
contributor's runs wait for a maintainer to approve them.
Session awareness
When you have 3+ gstack sessions open simultaneously, every question tells you which project, which branch, and what's happening. No more staring at a question thinking "wait, which window is this?" The format is consistent across all skills.
Working on gstack inside the gstack repo
When you're editing gstack skills and want to test them by actually using gstack
in the same repo, bin/dev-setup wires this up. It creates .claude/skills/
symlinks (gitignored) pointing back to your working tree, so Claude Code uses
your local edits instead of the global install.
gstack/ <- your working tree
├── .claude/skills/ <- created by dev-setup (gitignored)
│ ├── gstack -> ../../ <- symlink back to repo root
│ ├── review/ <- real directory (short name, default)
│ │ └── SKILL.md -> gstack/review/SKILL.md
│ ├── ship/ <- or gstack-review/, gstack-ship/ if --prefix
│ │ └── SKILL.md -> gstack/ship/SKILL.md
│ └── ... <- one directory per skill
├── review/
│ └── SKILL.md <- edit this, test with /review
├── ship/
│ └── SKILL.md
├── browse/ <- /browse skill + gstack's own browser engine (the fallback)
│ ├── src/ <- TypeScript source
│ └── dist/ <- compiled binary (gitignored)
├── lib/
│ ├── aside-render.ts <- local-HTML rendering: Aside first, browse engine fallback
│ └── design-catalog.ts <- typed design anti-pattern catalog; review/design-checklist.md is generated from it
├── bin/
│ └── gstack-render.ts <- the CLI skills call to render a local HTML file
└── ...
Setup creates real directories (not symlinks) at the top level with a SKILL.md
symlink inside, plus links to each skill's runtime assets (sections/, templates,
checklists). Alias skills (_gstack-command, connect-chrome) install as
rewritten copies, never symlinks — editing a symlinked alias would corrupt the
generated source. This ensures Claude discovers them as top-level skills, not nested
under gstack/. Names depend on your prefix setting (~/.gstack/config.yaml).
Short names (/review, /ship) are the default. Run ./setup --prefix if you
prefer namespaced names (/gstack-review, /gstack-ship).
Day-to-day workflow
# 1. Enter dev mode
bin/dev-setup
# 2. Edit a skill template (SKILL.md files are generated — edit the .tmpl)
vim review/SKILL.md.tmpl
bun run gen:skill-docs # or: bun run dev:skill (watch mode, auto-regen on change)
# 3. Test it in Claude Code — changes are live
# > /review
# 4. Editing browse source? Rebuild the binary
bun run build
# 5. Done for the day? Tear down
bin/dev-teardown
Brain-aware blocks in a dev workspace (gbrain installed)
If gbrain is installed and usable (bin/gstack-gbrain-detect --is-ok exits 0),
bin/dev-setup keeps your tracked SKILL.md files canonical and renders the
brain-aware variant (the GBRAIN_CONTEXT_LOAD / GBRAIN_SAVE_RESULTS blocks)
into .claude/gstack-rendered/ (gitignored, per-workspace). It then repoints the
workspace's SKILL.md symlinks at that render, so your Claude sessions get the
full gbrain experience while git status stays clean. Under the hood, dev-setup
passes GSTACK_SKIP_GBRAIN_REGEN=1 inline to the nested ./setup (so it never
dirties tracked source) and runs gen:skill-docs:user --out-dir .claude/gstack-rendered,
which rewrites only the section-base paths to point at the render. bin/dev-teardown
removes the render. To make the blocks live across your other projects' Claude
sessions, run gstack-config gbrain-refresh, which renders them to a user render
dir (${GSTACK_USER_RENDER_DIR:-~/.gstack/render/claude}, swapped in only on a
successful render) and repoints the installed skills at it via gstack-relink —
the global install checkout stays git-clean, and the refresh is guarded so it
never touches a symlinked or non-gstack directory.
Testing & evals
Codex evals and the GPT benchmark adapter default to gpt-6-astra:
explicit model > GSTACK_CODEX_MODEL > default. Claude capture and judge
defaults are claude-fable-5-1, resolved through lib/eval-model.ts:
- Claude session, PTY, and Agent SDK eval runners and the Claude benchmark adapter: explicit model >
EVALS_MODEL>GSTACK_EVAL_MODEL_CAPTURE>GSTACK_EVAL_MODEL> default. - Shared judge calls (including benchmark quality scoring): explicit model >
GSTACK_EVAL_MODEL_JUDGE>GSTACK_EVAL_MODEL> default.EVALS_MODELapplies to capture runners, not judges.
Warmup stays on claude-haiku-4-5; distill stays on
claude-haiku-4-5-20251001. Explicit test and historical benchmark model
selections still win. Known frontier defaults are maintained in releases;
there is no automatic model discovery. Paid-run costs shown below are
historical estimates from before this default change, not measurements of
the new defaults.
Which command do I run?
| I want to… | Command | Cost / time | Needs |
|---|---|---|---|
| Check an ordinary edit quickly | bun run test:quick |
Free, about a minute | Bun 1.4.0 |
| Run one free test file while repairing | bun test <file> |
Free, seconds | Never bare bun test for the suite |
| Run full free acceptance before publishing | bun run test |
Free, a few minutes | Bun 1.4.0 |
| Run the full free suite from a small machine | bun run test:ubicloud |
Free suite on a billed 16-vCPU VM, about 5 minutes | UBICLOUD_API_KEY |
| Run the curated Windows-safe subset | bun run test:windows (CI: six windows-latest jobs) |
Free | Windows, Git Bash |
| Refresh the Windows duration seed | gh workflow run windows-free-tests.yml --ref <branch> -f record_durations=true, then commit the free-test-durations-windows artifact |
Free CI runners | Pushed branch, gh with workflow rights |
| Run a native Windows or Dia qualification campaign | gh workflow run native-qualification.yml --ref <branch> -f mode=<mode> (modes) |
Free CI runners | Pushed branch, gh with workflow rights |
| Preview which paid cases my diff selects | bun run eval:select (PR profile; --profile full for the plain touchfile selection) |
Free | — |
| Preview the CI paid slice plan | bun run scripts/test-paid-shards.ts --tier periodic --list --slice-budget 420 --jobs 2 (diff-selected; EVALS_ALL=1 lists everything) |
Free | — |
| Run paid coverage for my change (agents: detached) | bun run eval:bg:pr (foreground: bun run test:pr) |
API spend for the selected cases only; about 10 minutes when dispatched to CI | Dispatch: a clean, pushed HEAD and gh. Local fallback: ANTHROPIC_API_KEY, Claude Code CLI, a plain terminal |
| Run the full gate + periodic censuses before a release | bun run eval:bg:release (foreground: bun run test:release) |
The largest API spend; local runs are capped at 4 hours | Same as above |
| Run one paid tier | bun run test:gate:sharded / bun run test:periodic:sharded (detached: eval:bg:gate / eval:bg:periodic) |
API spend for that tier | Same as above |
| Run one paid case as its CI panel | bun run scripts/test-paid-shards.ts --tier <tier> --case <case-id> --trials 3 |
API spend for that case | Same as above |
| Validate gate cases on a branch in CI | gh workflow run evals.yml --ref <branch> -f evals_all=true |
CI runners + API spend | Pushed branch, gh with workflow rights |
| Validate periodic cases on a branch in CI | gh workflow run evals-periodic.yml --ref <branch> (periodic lane only) |
CI runners + API spend | Pushed branch, gh with workflow rights |
| Validate periodic cases plus the weekly gate census on a branch | gh workflow run evals-periodic.yml --ref <branch> -f include_gate_census=true |
CI runners + API spend | Pushed branch, gh with workflow rights |
| Run the opt-in ML, gitleaks and Swift checks | gh workflow run platform-qualification.yml --ref <branch> |
Free CI runners | Pushed branch, gh with workflow rights |
| Look at past local eval runs | bun run eval:list / eval:compare / eval:summary |
Free | Local eval history |
| See a case's pass rate across recent weekly runs | bun run eval:pass-rates --case <case-id> |
Free | gh with repo read access |
| See the audit success metrics and weekly health | bun run test:health [--since-days 7] [--json] [--enforce] |
Free; 5–20 minutes of gh reads |
gh with repo read access |
Old command names are listed under Retired commands.
Setup
Development and tests require Bun 1.4.0 or newer; CI pins and tests 1.4.0. Earlier Linux versions can close unrelated live file descriptors during subprocess garbage collection, causing intermittent browser and HTTP fixture failures (upstream diagnosis).
# 1. Copy .env.example and add your API key
cp .env.example .env
# Edit .env → set ANTHROPIC_API_KEY=sk-ant-...
# 2. Install deps (if you haven't already)
bun install
Bun auto-loads .env — no extra config. Conductor workspaces inherit .env from the main worktree automatically (see "Conductor workspaces" below).
Test tiers
Functional QA changes need native fixture proof as well as prompt checks. Add declared CLI or loopback API/worker contracts in isolated temporary repositories, outside this checkout. Exercise success and adverse paths, durable effects, and setup failure. Report-only evaluations must leave mutation-capable tools available and independently detect forbidden writes, including an edit later restored; a clean final diff is not enough. Validate the observer with deliberately bad controls before a paid run.
For exploratory regressions, retain the actual pre-repair failure, post-repair pass, original probe and adjacent happy path. Automatic caller tests must enter through review/ship, not tell the agent to run the component being tested. Documentation tests must prove the real child completed and the parent used its result before publication; the existing dispatch-only test is narrower evidence. Register new cases and all consumed section/resolver inputs in touchfiles, tiers and the PR profile so they run. Share sanitized reproduction commands and fixture evidence when reporting a problem, never credentials, private payloads or an entire unreviewed agent transcript.
| Tier | Runs through | What it tests |
|---|---|---|
| 1 — Static | bun run test (free) |
Command validation, snapshot flags, Aside contract pins, render-wrapper option mapping, SKILL.md correctness, TODOS-format.md refs, observability unit tests |
| 2 — E2E | The sharded paid runner (bun run eval:bg:pr, eval:bg:release) |
Full skill execution via claude -p, PTY and Agent SDK sessions |
| 3 — LLM eval | The same runner; test/skill-llm-eval*.test.ts |
LLM-as-judge scoring of generated SKILL.md docs |
Pick commands from Which command do I run?.
The PR paid gate uses an explicit short behavioral profile. Every selected quality
judge remains included; the manifest lists deferred behaviors separately from
passes. Unknown source dependencies restore the full gate; the job summary names
each file that caused it and its fix (PR paid lane fallback).
A new prompt without
registered coverage fails planning. Known broad behaviors remain visibly deferred
when their prompts change; they do not silently gain PR-pass credit. The full
gate and periodic censuses run fresh weekly and on manual
dispatch of evals-periodic.yml; bun run eval:bg:release runs both.
Some broad behavioral failures will therefore be found after the PR gate.
Blocking paid lanes (the PR gate and the weekly periodic + gate census) aim for
a median of about 10 minutes including setup. The planner packs recorded wall
times (scripts/paid-test-durations.json, per tier) into as many 7-minute
(420-second) runners as the work needs, one file or a tightly packed group each;
files whose cases are short but whose total is long run one case per runner.
Matrix size and each runner's job timeout come from that plan, so a hung runner
fails within its own ceiling. Preview it for free with
bun run scripts/test-paid-shards.ts --tier periodic --list --slice-budget 420 --jobs 2.
Complete start-to-finish flows belong to the marathon tier
(describeE2ETier('marathon')), which runs only in the non-blocking
evals-marathon.yml lane (weekly and on dispatch) and never gates a merge.
Verdicts: paid evals never retry. Each case's kind in E2E_KINDS
(test/helpers/touchfiles-data.ts) fixes its trials before the run, from the
constants in EVAL_POLICY (test/helpers/periodic-exclude-data.ts):
rule(the default): one trial; any failed assertion fails the case. Use it when nothing stochastic decides the verdict, or when the verdict checks a contract the product must meet every run (no writes in plan mode, a question before a decision, a skill-mandated step, no leaked secret).behavior: a panel of 3 independent trials run as parallel case shards, PASS at 2 or more with no contract violation (expectContract()). Use it only when a live model choice decides the verdict and an occasional deviation is acceptable product behavior; the one-line reason goes inBEHAVIOR_WHY.judge: an LLM judge scoring a fixed input; 3 samples of the same prompt, gated on the per-dimension mean (booleans on a majority) against the unchanged threshold. An erroring sample fails the panel and is never resampled.
A timed-out, crashed or infrastructure-failed trial counts as a failed trial and
is reported with its class; a missing trial makes the case INCOMPLETE, which
fails the lane. A 2-of-3 pass is reported as PASS 2/3 with the failed trial's
cause, never as a clean pass. Case budgets and thresholds never change with
this policy. Quarantine (CASE_QUARANTINE) and history are described in
docs/TESTING_INTERNALS.md; bun run eval:pass-rates --case <id> shows a
case's per-trial pass rate with its Wilson interval.
CI enables verified first-attempt reuse for 16 workflow quality judges for
24 hours within the same PR. The cookie workflow's custom input and the other 11
quality cases stay fresh. PR-profile E2E shards that run once (no retry, so the
pass is provably a first attempt) reuse a pass from the same PR when every
consumed input is byte-identical: the test's import closure, every tracked file
its registered cases' touchfiles and the global touchfiles match, the runner and
workflow, the child's EVALS_/GSTACK_/CLAUDE_/ANTHROPIC_ environment (secret
presence only), the CI image and Claude CLI version (scripts/e2e-shard-reuse.ts).
A computed case registration or a touchfile pattern matching nothing keeps the
shard fresh. The weekly census, marathon and release lanes never reuse. Local runs stay fresh unless
the complete scoped cache and runtime configuration is supplied. The key includes complete prompt bytes, generated inputs,
fixtures, runner/rubric code, installed dependencies, model settings and runtime.
The current assertions validate a reused score again. Records retain the original
run, revision and time; reuse never renews that time. Failed, retried, partial or
unknown-input results cannot be reused.
EVALS_FRESH=1 bypasses reuse; periodic and release runs always bypass it.
Timing goals are under one minute for edit feedback, 3–5 minutes for typical PR
checks, and 60–90 seconds for complete free test execution across isolated CI
machines. They are targets, not timeout reductions or guarantees. The complete
local suite uses available CPU affinity, up to 16 workers on Linux and six on
macOS and Windows; use test:quick for the shorter edit loop. On a small dev
box, container, or cloud sandbox, bun run test:ubicloud runs the complete suite
on a fresh 16-vCPU Ubicloud VM with the CI lane's environment instead (about
four and a half minutes end to end, including VM boot and setup). The
historical six-worker result below and the
four-CPU portfolio comparison
are machine-specific measurements. CI setup, build and queue time are reported
separately. Refresh measurements with bun run test:ubicloud --record-durations
(a laptop recording is not an acceptable seed; see
free suite duration seed);
before publication, classify new regressions for quick feedback using that seed
and the existing QUICK_CORE list. Do not classify unknown files as fast or use
quick results as release acceptance. The runner retains full logs in
.context/free-test-logs/ and explains the next repair step on failure; see
free-runner recovery for details. For full acceptance,
the required free CI lane packs the complete inventory across isolated runners,
then checks every shard's receipt before reporting success. Local worker counts
remain bounded to avoid browser/process contention.
Historical measurements from 2026-09-21:
| Run | Coverage | Elapsed |
|---|---|---|
| Local edit feedback | 861 of 993 free test files | 38 seconds |
| Local complete free suite | All 993 files, six workers | 4m 35s |
| Complete Linux CI | All 993 files, 20 isolated runners | 1m 40s across test steps; 3m 7s including setup and aggregation |
After the 2026-09-29 test audit (evidence):
| Run | Coverage | Elapsed |
|---|---|---|
Complete free suite, bun run test:ubicloud (standard-16) |
All 857 files, 20,302 passing tests | 136 seconds on the VM; 1,738 seconds of recorded serial test time |
The Linux CI run
on 25030d68 included one recorded successful retry. Its slowest test step was 77 seconds;
staggered starts made the complete test span longer. Typical PR paid-gate timing
still needs measurement on a small change. Explicitly exempt free-only runner
changes do not select paid work; mapped dependencies take precedence, and unknown
dependencies retain the broad fallback. See the
coverage boundaries.
When a paid eval fails, fix the product or the harness and add the captured case as one row in
the detector's owner test (the detector → owner table is in
TEST_PORTFOLIO.md); never add a new per-incident file.
A row is one describe block or table entry next to the others, for example a new
describe('eng-cache-writes-at', …) in test/eng-first-review.test.ts that loads its fixture and asserts
engFirstReviewAUQ on the captured call. Run bun test <owner-test>, then
bun test test/test-of-test-ratchet.test.ts: the ratchet fails on any new test file that imports only
test/ code, or that reads a paid test file's source and slices it, and names the owner test to use instead.
Tests on templates and generated SKILL.md use test/helpers/prompt-structure.ts (between,
expectTokens, expectAbsent, expectOrdered, expectMentions): machine-read tokens and step order
exactly, safety rules as case-insensitive keyword co-occurrence in one sentence. Don't pin English
sentences; see the test value bar.
Follow Validation discipline in AGENTS.md: reproduce known failures with focused checks, verify adjacent source and generation contracts, then run the affected and remaining required selected evaluations. Finish review fixes and release preparation before running the full free suite once on the frozen code. During repairs, focused checks replace a full-suite run before every commit.
Tier 1: Static validation (free)
Runs with bun run test, which routes through scripts/test-free-shards.ts: N
concurrent shard processes under a strict output contract — a shard that exits
without bun's own terminal summary line, or a crashed worker, fails the run, so
silent truncation can never report green. Pass --verbose to forward the full
child stream; --wall-timeout <secs> overrides the per-shard kill deadline.
GSTACK_FREE_JOBS=<n> overrides the shard count (digits only, loud on garbage),
and GSTACK_FREE_RETRY_FLAKY=1 opts into one serial retry pass for
syscall-supervised sandboxes (off by default locally — dev boxes should see
flakes; the required CI free lane turns it on and uploads every flaky pass
in a flake-ledger-<shard> JSONL artifact; the weekly test-health run fails when
a file flakes in more than 5% of main runs, see
flake ledger).
Working in a cloud sandbox? Run scripts/sandbox-doctor.sh once per boot to
make the suite run green (details in
docs/TESTING_INTERNALS.md), or skip the sandbox's
limits entirely with bun run test:ubicloud.
Don't type bare bun test for the suite: it walks the whole repo, loads paid
eval files, and misses the strict classifier. No API keys needed.
- Skill parser tests (
test/skill-parser.test.ts) — Extracts every$Bcommand from SKILL.md bash code blocks and validates against the command registry inbrowse/src/commands.ts. Catches typos, removed commands, and invalid snapshot flags. - Skill validation tests (
test/skill-validation.test.ts) — Validates that SKILL.md files reference only real commands and flags, and that command descriptions meet quality thresholds. Also cross-checks the skill inventory in AGENTS.md and docs/skills.md. - Aside driver contract (
test/aside-driver.test.ts) — Browser behaviour in skills is written againstscripts/resolvers/aside.ts({{ASIDE_SETUP}}) and verified live against the Aside CLI on a Mac. CI cannot run Aside, so the Aside E2E tests self-skip whereasideis not installed; the static pins (detection, fallback hand-off, consent, credential, one-flow-per-script, sentinel) are what CI proves. - Aside render wrapper (
test/aside-render.test.ts) — Pins the option mapping and generated script oflib/aside-render.tseverywhere, and drives both engines hermetically with fakeaside/browseexecutables (probe classification, the stdout contract, loopback-server policy, failure paths, the timeout kill, engine choice and the mid-run fallback); the live render (PDF + screenshot through a real Aside) runs only where Aside is open and self-skips elsewhere. make-pdf's render gates (make-pdf/test/e2e/*-gate.test.ts) andtest/skill-e2e-diagram.test.tsare engine-agnostic: they run through whichever engine resolves (browserAvailable()— Aside, or the browse binarybun run build:gatescompiles, which is what Linux CI does) and skip only when neither exists. - Render CLI (
test/gstack-render-cli.test.ts) — Pinsbin/gstack-render.tsagainst a fake daemon (GSTACK_SKIP_ASIDE=1+GSTACK_BROWSE_BIN): argv guards exit 1 with the usage line,--helpexits 0,ENGINE=first thenOK <path>then fencedEVAL/PAGE_ERRORS,--serve-rootcontainment, the no-browser first line, and prompt exit after a successful render.make-pdf/test/cli-exit-codes.test.tsandmake-pdf/test/setup-smoke.test.tspin thepdfbinary's error-to-exit-code map and$P setup's engine report. - Generator tests (
test/gen-skill-docs.test.ts) — Tests the template system: verifies placeholders resolve correctly, output includes value hints for flags (e.g.-d <N>not just-d), enriched descriptions for key commands (e.g.islists valid states,presslists key examples). - Design detector, catalog, and DESIGN.md (
test/gstack-design-detect.test.ts,test/design-detect-contract.test.ts,test/design-catalog.test.ts,test/design-checklist-sync.test.ts,test/design-md.test.ts,test/frontend-scope.test.ts,test/impeccable-fixtures.test.ts) — Drivebin/gstack-design-detect.tsthrough the fake engine intest/fixtures/fake-impeccable.ts(probe order, the never-execute-a-repository-file rule, the--changedtarget allow-list,design_detector: off, analytics lines, output sanitizing), pin the catalog invariants and the generatedreview/design-checklist.md, round-trip the open DESIGN.md reader/writer, and check the real engine captures (test/fixtures/impeccable-*.json, engine 0.1.3) against the contract.test/dom-dump-hygiene.test.tsrunslib/dom-dump.jsin a real Chromium page through the built browse binary; it self-skips without the binary and is opt-in outside CI (GSTACK_DOM_DUMP_HYGIENE=1). - Tier-alignment invariant (
test/e2e-tier-alignment.test.ts) — For every self-gatedtest/skill-e2e-*.test.tsnamed in a touchfiles dep list, the file'sEVALS_TIERself-gate must match its declared tier inE2E_TIERS. Kills the "inert demotion" class where a test is re-tiered intouchfiles.tsbut the file still gates on the old tier and keeps running in the wrong lane. Unmapped or mixed-tier files are reported, never silently skipped. - Catalog budget (
test/catalog-budget.test.ts) — Caps the aggregate discovery surface: the sum of every skill's frontmattername+description(what every host loads at discovery, every session) must stay under 1,171 token-equivalents, with a 260-byte per-skill cap. Counting goes through the shared census intest/helpers/skill-census.ts(physical files vs authored skills vs registry entries — three deliberately different counts). Adding a skill? The failure message carries the re-measure + ratchet protocol. - Context-budget ratchet (
test/context-budget-ratchet.test.ts) — CI ceilings on the two token ledgers the catalog budget doesn't cover: the always-on full-frontmatter aggregate and each skill's per-invocation eager tokens (SKILL.md + forced-read references), graded againsttest/fixtures/context-budget.jsonvialib/context-bill.ts. New skills fail until they have a ceiling; ceilings for removed skills must be pruned. Legitimate growth or a landed reduction: re-runbun test/helpers/capture-context-budget.tsand commit the refreshed fixture in the same commit, so the change is a visible decision in the diff. - Dependency security regressions (
test/dependency-security.test.ts) — Runbun test test/dependency-security.test.tsto check the resolvedsharpandadm-zipversion floors, load Sharp, verify ordinary ZIP extraction, and reject extraction through destination-file and destination-directory symlinks. The symlink cases skip Windows. These checks complement the OSV scan; they do not change its existing exceptions.
Tier 2: E2E via claude -p
Spawns claude -p as a subprocess with --output-format stream-json --verbose, streams NDJSON for real-time progress, and scans for browse errors. This is the closest thing to "does this skill actually work end-to-end?"
# Must run from a plain terminal — can't nest inside Claude Code or Conductor
EVALS_RUN_ID="local-$(bun -e 'console.log(crypto.randomUUID())')" EVALS=1 bun test test/skill-e2e-*.test.ts
- Gated by
EVALS=1env var (prevents accidental expensive runs) - Auto-skips if running inside Claude Code (
claude -pcan't nest) - API connectivity pre-check — fails fast on ConnectionRefused before burning budget
- Real-time progress to stderr:
[Ns] turn T tool #C: Name(...) - Saves full NDJSON transcripts and failure JSON for debugging
- Tests live in
test/skill-e2e-*.test.ts(split by category), runner logic intest/helpers/session-runner.ts
Supply a fresh EVALS_RUN_ID for each invocation, including detached runs below.
Functional QA and documentation cases refuse acceptance without it. CI supplies
its own run/attempt/job/slice identity; see Testing internals
for the retained native-capture artifacts.
Hermetic by default. Every E2E runner (claude -p, the real-PTY plan-mode
runner, the Agent SDK runner, plus the codex and gemini runners) spawns its child
through test/helpers/hermetic-env.ts: an allowlist-scrubbed environment, a fresh
seeded CLAUDE_CONFIG_DIR, a temp GSTACK_HOME, and --strict-mcp-config. Your
operator ~/.claude config, MCP servers (gbrain, Conductor), skills, ~/.gstack
decision logs, and CONDUCTOR_* env never leak into the child. The GITHUB_
and EVALS_ prefix rules preserve CI metadata but reject credential-shaped
names such as GITHUB_TOKEN, GITHUB_PERSONAL_ACCESS_TOKEN, and
GITHUB_APP_PRIVATE_KEY. The screen reads every underscore-separated segment, so a trailing qualifier does not carry a name past it (GITHUB_APP_PRIVATE_KEY_BASE64, GITHUB_TOKEN_1), while a segment that merely contains a credential word stays metadata (GITHUB_PATH, GITHUB_TOKENIZER). Named provider auth, runner extraAllow entries, and
per-test overrides are deliberate exceptions; a name-based rule cannot identify
a secret assigned to an arbitrary metadata name. This keeps local eval signal
aligned with CI instead of disagreeing for reasons unrelated to the code under
test. The hermetic CLAUDE_CONFIG_DIR seeds no skills by default; a PTY test
that types a /skill slash command passes seedSkills: true to the PTY runner,
which swaps in hermeticSkillsConfigDir() — a seeded skill registry that
symlinks the LIVE working tree's SKILL.md files (by design: the skills are the
subject under test, so a snapshot would measure stale copies). Set
EVALS_HERMETIC=0 to debug against your real operator state (this also
drops --strict-mcp-config). The wiring is pinned by test/hermetic-wiring.test.ts
(a free static tripwire), two gate-tier isolation canaries in
test/skill-e2e-hermetic-canary.test.ts, and the skill-seeding tripwires in
test/hermetic-skills-seeding.test.ts / test/pty-skill-seeding-wiring.test.ts.
E2E observability
When E2E tests run, they produce machine-readable artifacts in ~/.gstack-dev/:
| Artifact | Path | Purpose |
|---|---|---|
| Heartbeat | e2e-live.json |
Current test status (updated per tool call) |
| Partial results | evals/_partial-e2e.json |
Completed tests (survives kills) |
| Progress log | e2e-runs/{runId}/progress.log |
Append-only text log |
| NDJSON transcripts | e2e-runs/{runId}/{test}.ndjson |
Raw claude -p output per test |
| Failure JSON | e2e-runs/{runId}/{test}-failure.json |
Diagnostic data on failure |
Live progress: a detached run's log under ~/.gstack-dev/eval-runs/ streams each shard's result as it lands; for a CI run use gh run watch <run-id>. Per-test progress is in each shard's progress.log.
Eval history tools:
bun run eval:list # list all eval runs (turns, duration, cost per run)
bun run eval:compare # compare two runs — shows per-test deltas + Takeaway commentary
bun run eval:summary # aggregate stats + per-test efficiency averages across runs
bun run eval:pass-rates # per-case trial pass rates + Wilson intervals from recent weekly runs (--case, --runs, --dir, --backfill, --json, --gate)
Detached runs for agents and long suites. When an agent (or you, for a run
you don't want to babysit) launches a long eval, use the eval:bg:* scripts
(scripts/eval-bg.ts). Each picks a backend and prints it:
- dispatch (a clean HEAD pushed to garrytan/gstack, with
gh): runs the lane in CI on that exact revision and follows the run from a local log; - local (anything else, or
--local): runs the sharded paid runner on this machine, capped at ceil(1.5 × planned serial seconds /EVALS_JOBS) + 20 minutes, at most 4 hours (--timeout SECSoverrides).
Both run under bin/gstack-detach: a fresh session that escapes a
turn-boundary SIGTERM, a caffeinate wrapper that blocks idle-sleep, a machine-wide
gstack-evals lock so concurrent worktrees serialize instead of saturating the
model API, a run-scoped log under ~/.gstack-dev/eval-runs/, and a guaranteed
### gstack-detach EXIT=<code> ### sentinel so a poller never mistakes silence
for success. bun run scripts/eval-bg.ts --help lists the flags and
bun run scripts/eval-bg.ts status <log-or-run-id> reconnects to a run.
bun run eval:bg:pr # changed coverage (CI: evals.yml, evals_all=false)
bun run eval:bg:release # fresh full gate + periodic (CI: both workflows)
bun run eval:bg:gate # gate tier (CI: evals.yml, evals_all=true)
bun run eval:bg:periodic # periodic tier (CI: evals-periodic.yml)
The local backend runs through
the sharded paid runner (scripts/test-paid-shards.ts, also available directly
as bun run test:gate:sharded / bun run test:periodic:sharded): one Bun
process per test file, an external wall-clock timeout that kills the shard's
whole process group (stray claude/codex grandchildren included), a per-shard
eval dir (GSTACK_EVAL_DIR=<evalDir>/shards/<slug>/), and an aggregate that
distinguishes failed vs timed-out vs never-started shards. The runner also
selects by diff: shards untouched by your branch are reported as
skipped-by-diff, with a selection banner naming the reason (EVALS_ALL=1
forces everything). EVALS_JOBS sets how many shard processes run at once
(default 8; test:pr sets 2); EVALS_CONCURRENCY is bun's concurrency WITHIN a shard
(default 2) — they are deliberately separate knobs. eval:list,
eval:compare, eval:summary, and eval:pass-rates are shard-aware. Humans running
bun run test:pr foreground in their own terminal don't need this — Ctrl-C
is intended there.
Eval comparison commentary: eval:compare generates natural-language Takeaway sections interpreting what changed between runs — flagging regressions, noting improvements, calling out efficiency gains (fewer turns, faster, cheaper), and producing an overall summary. This is driven by generateCommentary() in eval-store.ts.
Artifacts are never cleaned up — they accumulate in ~/.gstack-dev/ for post-mortem debugging and trend analysis.
Tier 3: LLM-as-judge
Uses claude-fable-5-1 by default to score generated SKILL.md docs on three dimensions.
Override the judge model per run with GSTACK_EVAL_MODEL_JUDGE:
- Clarity — Can an AI agent understand the instructions without ambiguity?
- Completeness — Are all commands, flags, and usage patterns documented?
- Actionability — Can the agent execute tasks using only the information in the doc?
Each dimension is scored 1-5 by a panel of 3 samples of the same prompt, drawn
concurrently; each dimension's panel mean must meet that judge's threshold (≥ 4
for most dimensions; see each case). An erroring sample fails the panel. There's also a regression test that compares generated docs against the hand-maintained baseline from origin/main — generated must score equal or higher.
Needs ANTHROPIC_API_KEY in .env. The judge files run in every paid lane
(bun run eval:bg:pr selects the ones your diff touches).
- Resolves the judge model through
lib/eval-model.ts, using the override order above - Tests live in
test/skill-llm-eval.test.ts - Calls the Anthropic API directly (not
claude -p), so it works from anywhere including inside Claude Code
Paid-test touchfiles
test/helpers/touchfiles-data.ts maps each paid case to the files whose edits select it. Free
*.test.ts files are never listed: editing a free test does not run paid evals. test/touchfiles.test.ts
derives each paid file's static test/helpers / test/fixtures import closure, plus the fixture and helper
paths it names in string literals, and fails when that closure is not covered by the case's key. When it
fails, add the named path to the named key and check selection with
bun run scripts/test-paid-shards.ts --tier gate --profile pr --list. The rule is a lower bound: a fixture
path the test builds at runtime is not visible to it, so add such paths to the key by hand.
Add a paid eval
- Test file. Write the case in a paid test file, registered with a literal
name (
testIfSelected('<case-id>', ...)), grading the outcome (files, git state, native questions, exit status) rather than wording, unless the step itself is the contract. Wrap contract assertions inexpectContract(). - Touchfiles. Add
'<case-id>': [...]toE2E_TOUCHFILES;bun test test/touchfiles.test.tsnames any missing closure path. - Tier. Add it to
E2E_TIERS:gatefor cheap contracts every PR needs,periodicfor long or model-quality cases,marathonfor complete flows. - Kind. Add it to
E2E_KINDS(ruleunless a live model choice may acceptably deviate; thenbehaviorplus aBEHAVIOR_WHYline).bun test test/eval-kinds.test.tsprints the literal to add. - PR profile. If a PR should run it, add it to
scripts/test-pr-profile.tsand checkbun run scripts/test-paid-shards.ts --tier gate --profile pr --list. - Try the panel locally.
bun run scripts/test-paid-shards.ts --tier <tier> --case <case-id> --trials 3runs the same panel CI runs, before you push.
Retired commands
These package scripts are stubs for one release: each prints its replacement
and exits 1 (scripts/retired-command.ts). The next release deletes them.
| Retired | Use instead | Why it was retired |
|---|---|---|
test:evals |
bun run eval:bg:pr |
Tierless: skipped every tier-gated paid file |
test:evals:all |
bun run eval:bg:release |
Tierless: skipped every tier-gated paid file |
test:e2e |
bun run eval:bg:pr |
Tierless: skipped every tier-gated paid file |
test:e2e:all |
bun run eval:bg:release |
Tierless: skipped every tier-gated paid file |
test:gate |
bun run test:gate:sharded |
The single-process fan-out never completed a run |
test:periodic |
bun run test:periodic:sharded |
The single-process fan-out never completed a run |
test:codex |
bun run test:periodic:sharded |
Set no EVALS_TIER, so both periodic-tier Codex files ran zero cases |
test:codex:all |
bun run test:periodic:sharded |
Same as test:codex |
eval:bg |
bun run eval:bg:pr |
Detached the retired test:evals |
eval:bg:all |
bun run eval:bg:release |
Detached the retired test:evals:all |
eval:flake-rank |
bun run eval:pass-rates |
Second name for the same script |
eval:watch |
Tail the gstack-detach log, or gh run watch <run-id> |
Read a file only the unsharded runner wrote, so it showed nothing for sharded runs |
test:audit |
bun run test |
test/audit-compliance.test.ts already runs in the free suite |
CI
A GitHub Action (.github/workflows/skill-docs.yml) generates all hosts on pushes to main and on PRs, then rejects tracked differences and nonignored untracked output. Generation errors also fail the job. Optional ignored host caches are not compared against Git.
Supply-chain gates run alongside it:
-
Quality gate (
.github/workflows/quality-gate.yml, every PR and push) — scans the diff's added lines for credentials using gstack's own redact engine (.github/scripts/gate-secret-scan.mjs). HIGH findings fail the job; MEDIUM findings surface as an advisory count. Fails closed if the scan can't produce a report. Also runs ShellCheck on the setup/build boundaries. -
Dependency review (
.github/workflows/dependency-review.yml) — reviews dependency changes on PRs that touchpackage.jsonorbun.lockfiles and fails on high or critical advisories. It and the weekly OSV scan are the dependency gates. -
OSV scanner (
.github/workflows/osv-scanner.yml) — weekly vulnerability scan against the OSV database. Config lives in.osv-scanner.tomland is loaded via an explicit--configflag (OSV does not auto-discover that filename); every ignore entry needs a reason and anignoreUntilexpiry, enforced bytest/osv-config-wiring.test.ts. A failed main scan upserts the tracking issue "OSV scanner: vulnerable dependency needs triage" and a clean scan closes it;test/osv-ignore-expiry.test.tsfails 14 days before anyignoreUntil, so an expiring suppression surfaces in a PR. -
Weekly test health (
.github/workflows/test-health.yml, Mondays and on dispatch) — runsbun run test:health --since-days 7 --enforce. It fails when a free test file flakes in more than 5% of at least 20 main runs or more than 5 free files are missing from the duration seed, upserts one tracking issue on failure and closes it only when every previously failing check has evidence and passes. Metrics it cannot read print "unavailable: ; next: " and never fail the run. -
Dependabot (
.github/dependabot.yml) — grouped dependency update PRs. -
OpenSSF Scorecard (
.github/workflows/scorecard.yml) — weekly and on main pushes; results in the Security tab and api.scorecard.dev. -
Platform qualification (
.github/workflows/platform-qualification.yml, dispatch and quarterly) — runs the opt-in tests no other lane has prerequisites for: the ML prompt-injection classifier (SECURITY_BENCH=1), memory ingest against real gitleaks (GSTACK_TEST_GITLEAKS), and the DebugBridge Swift build (GSTACK_TEST_SWIFT=1, macOS).test/platform-qualification-workflow.test.tspins each gate to its job.
Every workflow pins its third-party actions to commit SHAs (test/workflow-action-pins.test.ts). The PR template (.github/PULL_REQUEST_TEMPLATE.md) asks for evidence — tests run, eval output — not promises.
Tests run against the browse binary directly — they don't require dev mode. Anything that needs Aside itself (test/skill-e2e-aside.test.ts, the Aside qa/design cases, the live render in test/aside-render.test.ts) runs only on a Mac with the Aside app open and self-skips elsewhere; make-pdf's render gates and the /diagram E2E run on whichever engine resolves, so CI runs them on the browse binary it builds with bun run build:gates.
Editing SKILL.md files
SKILL.md files are generated from .tmpl templates. Don't edit the .md directly — your changes will be overwritten on the next build.
# 1. Edit the template
vim SKILL.md.tmpl # or browse/SKILL.md.tmpl
# 2. Regenerate for all hosts
bun run gen:skill-docs --host all
# 3. Check health (reports all hosts)
bun run skill:check
# Or use watch mode — auto-regenerates on save
bun run dev:skill
skill:check renders all hosts into temporary storage using canonical content
paths and host defaults, validates the complete generated content, and compares
expected tracked artifacts against the checkout. Missing, changed, or nonignored
untracked output fails. Local ignored host caches, including symlinked caches,
are left untouched; the checker works without them. A generation failure cannot
produce a successful check of partial output.
For template authoring best practices (natural language over bash-isms, dynamic branch detection, {{BASE_BRANCH_DETECT}} usage), see CLAUDE.md's "Writing SKILL templates" section.
Browser steps in skills are aside repl scripts that follow the cookbook in scripts/resolvers/aside.ts, each paired with its $B equivalent for the fallback engine; run the Aside shape against the Aside CLI before committing. To add a browse command, add it to browse/src/commands.ts. To add a snapshot flag, add it to SNAPSHOT_FLAGS in browse/src/snapshot.ts. Then rebuild.
Render through lib/aside-render.ts; don't bundle puppeteer/Chromium in a
skill. A skill that needs to rasterize or print its own HTML/JSON (diagrams,
cards, og-images, PDFs) calls bin/gstack-render.ts from its template
(--screenshot, --pdf, --eval JS --out FILE) or imports render from
lib/aside-render.ts in TypeScript (renderWithAside / renderWithBrowse are
the engine-specific halves; render picks between them and retries once on the
browse engine if Aside's CLI cannot start or loses its CDP bridge mid-run). The
wrapper prints through Aside when it is open and through the browse daemon
when it is not (newtab --json, goto the loopback URL, js readiness
polling, pdf --from-file, viewport + screenshot, js --out, closetab)
— the one shared Chromium per box, same flags and OK <path> lines,
ENGINE=aside|browse saying which one actually rendered, EVAL /
PAGE_ERRORS lines fenced as untrusted web content. The loopback server
serves one per-render secret URL and never follows a symlink out of its
directory. Sized screenshots are 1x on the fallback (2x on Aside); JPEG
quality and pageRanges/scale are Aside-only; --landscape swaps paper
dimensions. Never npm i puppeteer, never download a second Chromium that
drifts out of version sync, never point the renderer at a website. If the
wrapper lacks an option you need, add it to lib/aside-render.ts (pin it in
test/aside-render.test.ts, and in test/gstack-render-cli.test.ts when it
is a CLI flag) so every caller gets it on both paths. Exported test seams:
pickEngine(fresh, deps) (inject the probe and the binary resolver),
serveDir(root, nonce), SAFE_TMP_DIR, and PAGE_NUMBER_FOOTER (the one
page-number footer make-pdf, gstack-render, and the browse pdf command share).
Prompt audit at each frontier-model release
When a new frontier Claude model ships, audit the text models read for
instructions the new model over-applies or no longer needs. The audit is
Anthropic's /claude-api prompt-audit, a Claude Code skill you run in your own
Claude Code session; gstack only prints what to feed it.
bun run audit:manifest # slices of templates, resolvers, overlays, CLAUDE.md and wording-pinning tests (--json for a machine-readable list)
- In Claude Code, run
/claude-api prompt-auditwith the new model as the target, one slice at a time, giving it that slice's file list.s01is the shared text every skill reads (CLAUDE.md, model overlays, preamble resolvers); a skill's template and its sections share one slice. - Fix findings in templates and resolvers, never in generated SKILL.md files,
then run
bun run gen:skill-docs --host all. - Treat safety rules as held: reword one only where an eval shows the model obeys it both before and after the change.
- Work through the "tests that pin skill wording" slices last. Where prose changed, replace exact-sentence pins with structural or meaning checks (the prompt-bytes rule in CLAUDE.md's testing section).
test/archaeology-lint.test.tskeeps issue numbers and incident stories out of the generated text; its failure names the source file to fix.
Jargon list (V1 writing style)
gstack's Writing Style section (injected into every tier-≥2 skill's preamble)
glosses technical terms on first use per skill invocation. The list of terms
that qualify for glossing lives at scripts/jargon-list.json — ~50 curated
high-frequency terms (idempotent, race condition, N+1, backpressure, etc.).
Terms not on the list are assumed plain-English enough.
Adding or removing a term: open a PR editing scripts/jargon-list.json.
Run bun run gen:skill-docs after the edit — terms are baked into every
generated SKILL.md at gen time, so changes take effect only after regeneration.
No runtime loading; no user-side override. The repo list is the source of truth.
Good candidates for addition: high-frequency terms that non-technical users encounter in review output without context (common database/concurrency terminology, security jargon, frontend framework concepts). Don't add terms that only appear in one or two niche skills — the cost-to-value trade isn't worth the review overhead.
Multi-host development
gstack generates SKILL.md files for 10 hosts from one set of .tmpl templates.
Each host is a typed config in hosts/*.ts. The generator reads these configs
to produce host-appropriate output (different frontmatter, paths, tool names).
Supported hosts: Claude (primary), Codex, Factory, Kiro, OpenCode, Slate, Cursor, OpenClaw, Hermes, GBrain.
Generating for all hosts
# Generate for a specific host
bun run gen:skill-docs # Claude (default)
bun run gen:skill-docs --host codex # Codex
bun run gen:skill-docs --host opencode # OpenCode
bun run gen:skill-docs --host all # All 10 hosts
# Or use build, which does all hosts + compiles binaries
bun run build
What changes between hosts
Each host config (hosts/*.ts) controls:
| Aspect | Example (Claude vs Codex) |
|---|---|
| Output directory | {skill}/SKILL.md vs .agents/skills/gstack-{skill}/SKILL.md |
| Frontmatter | Full (name, description, hooks, version) vs minimal (name + description) |
| Paths | ~/.claude/skills/gstack vs $GSTACK_ROOT |
| Tool names | "use the Bash tool" vs same (Factory rewrites to "run this command") |
| Hook skills | hooks: frontmatter vs inline safety advisory prose |
| Suppressed sections | GBrain blocks vs GBrain blocks and Review Army; Codex retains outside-review sections routed to Claude Code |
| Model overlay | claude vs gpt (per-host defaultModel; --model or, at setup time, the Codex config.toml model overrides) |
See scripts/host-config.ts for the full HostConfig interface.
Testing host output
# Run all static tests (includes parameterized smoke tests for all hosts)
bun run test
# Check freshness for all hosts
bun run gen:skill-docs --host all --dry-run
# Health dashboard covers all hosts
bun run skill:check
Adding a new host
See docs/ADDING_A_HOST.md for the full guide. Short version:
- Create
hosts/myhost.ts(copy fromhosts/opencode.ts), including itstierandcapabilities - Add to
hosts/index.ts - Add
.myhost/to.gitignore - Run
bun run gen:skill-docs --host myhost - Run
bun run test(parameterized tests auto-cover it)
Rendering needs no generator code. Installing does: an installable host also
needs a setup install arm, a row in gstack_host_tier
(bin/gstack-install-registry.sh), a README host-matrix row, and the
conformance kit (test/host-conformance.test.ts). It ships as experimental
until a dated certification record exists; see "Certify your host" and the
install ownership rules in the guide.
Adding a new skill
When you add a new skill template, all hosts get it automatically:
- Create
{skill}/SKILL.md.tmpl - Run
bun run gen:skill-docs --host all - The dynamic template discovery picks it up, no static list to update
- Budget it: run
bun test/helpers/capture-context-budget.tsand commit the refreshedtest/fixtures/context-budget.json— the context-budget ratchet fails any skill without a ceiling - Commit
{skill}/SKILL.md, external host output is generated at setup time and gitignored
Conductor workspaces
If you're using Conductor to run multiple Claude Code sessions in parallel, conductor.json wires up workspace lifecycle automatically:
| Hook | Script | What it does |
|---|---|---|
setup |
bin/dev-setup |
Copies .env from main worktree, installs deps, symlinks skills, runs ./setup non-interactively, and (if gbrain is installed) renders brain-aware blocks into .claude/gstack-rendered/ without dirtying tracked source |
archive |
bin/dev-teardown |
Removes skill symlinks, the .claude/gstack-rendered/ render, and cleans up .claude/ directory |
When Conductor creates a new workspace, bin/dev-setup runs automatically. It detects the main worktree (via git worktree list), copies your .env so API keys carry over, and sets up dev mode — no manual steps needed.
bin/dev-setup runs ./setup fully non-interactively (it passes --plan-tune-hooks=prompt and closes stdin), so a forwarded Conductor TTY can never hang on a hidden setup prompt. It also never installs the plan-tune Claude Code hooks, which means a throwaway workspace can't rewrite your global ~/.claude/settings.json to point at an ephemeral worktree path. To install the plan-tune hooks deliberately, run ./setup --plan-tune-hooks outside dev-setup (or gstack-config set plan_tune_hooks yes). The explicit flag counts as an explicit decision: setup's Conductor auto-opt-in for AskUserQuestion hooks fires only on the true silent fall-through (no flag, no GSTACK_PLAN_TUNE_HOOKS env var, no plan_tune_hooks key literally present in config, checked via gstack-config has), so it can never override dev-setup into installing hooks. One stated repair exception: setup's heal-first pass (gstack-settings-hook prune-stale --repoint) may prune dead gstack hook entries and re-point existing ones at the stable ~/.claude/skills/gstack install. That is strictly convergent repair, never a new registration, and registration itself is canonical-only, so an ephemeral tree path can never be baked into settings.json.
First-time setup: Put your ANTHROPIC_API_KEY in .env in the main repo (see .env.example). Every Conductor workspace inherits it automatically.
GSTACK_* env prefix (Conductor-injected keys). Conductor explicitly strips ANTHROPIC_API_KEY and OPENAI_API_KEY from every workspace's process env. The .env copy path doesn't restore them either — the strip happens after env inheritance. Users who want paid evals, /sync-gbrain embeddings, or claude-agent-sdk calls to work in a Conductor workspace must set GSTACK_ANTHROPIC_API_KEY and GSTACK_OPENAI_API_KEY in Conductor's workspace env config; Conductor passes those through untouched. On the gstack side, TS entry points import lib/conductor-env-shim.ts as a side effect, which promotes GSTACK_FOO_API_KEY to FOO_API_KEY when the canonical name is empty. If you add a new TS entry point that hits a paid API, add import "../lib/conductor-env-shim"; to the top of the file. Today the shim is imported from bin/gstack-gbrain-sync.ts, bin/gstack-model-benchmark, scripts/preflight-agent-sdk.ts, and test/helpers/e2e-helpers.ts.
Things to know
- SKILL.md files are generated. Edit the
.tmpltemplate, not the.md. Runbun run gen:skill-docsto regenerate. The same run generatesreview/design-checklist.mdfromlib/design-catalog.tsandlib/dom-dump.jsfromlib/dom-dump-script.ts: edit those sources, never the generated files (test/design-checklist-sync.test.tsfails on drift). - TODOS.md is the unified backlog. Organized by skill/component with P0-P4 priorities.
/shipauto-detects completed items. All planning/review/retro skills read it for context. - Browse, make-pdf, design, and
lib/source changes need a rebuild. If you touchbrowse/src/*.ts,make-pdf/src/*.ts,design/src/*.ts, or anything underlib/(the canonicalclaude-bin.ts,error-handling.ts, andaside-render.tsthe binaries embed, plusdesign-catalog.ts, whoseMOCKUP_NEVER_NAMESthe design binary's mockup prompt embeds;browse/srcre-exports the first three), runbun run build../setupmakes the same call on its own: it rebuilds when any of the three binaries is missing or when those sources,package.json, orbun.lockare newer than the browse binary (test/setup-needs-build.test.tspins the decision). - Dev mode shadows your global install. Project-local skills take priority over
~/.claude/skills/gstack.bin/dev-teardownrestores the global one. - Conductor workspaces are independent. Each workspace is its own git worktree.
bin/dev-setupruns automatically viaconductor.json. .envpropagates across worktrees. Set it once in the main repo, all Conductor workspaces get it..claude/skills/is gitignored. The symlinks never get committed.- Never write raw
ln -snfinsetup. Every link site insetupMUST route through the_link_or_copy SRC DSThelper near theIS_WINDOWSdetection. The helper preservesln -snfon Unix and switches tocp -R/cp -fon Windows without Developer Mode, where plainln -snfproduces frozen file copies that don't refresh ongit pull.test/setup-windows-fallback.test.tsenforces this with a static invariant — a single rawlncall outside the helper body fails CI. - Synchronous subagent dispatches must state the flag. Claude Code runs Agent-tool subagents in the background by default (since v2.1.198), so any template step that dispatches a subagent and consumes its output must carry
run_in_background: false. Use the{{FOREGROUND_DISPATCH_NOTE}}placeholder (scripts/resolvers/constants.ts) instead of hand-writing the guidance, and add the generated carrier file toGENERATED_WITH_GUIDANCEintest/run-in-background-guidance.test.tsin the same commit — its structural scanner fails CI on any generated dispatch imperative that lacks the flag. - Never delete or link over a skill entry
setupcannot prove is gstack's. Every destructive site insetup(the linker, the alias installer, both prefix-flip cleanups) and inbin/gstack-relinkgoes through the ownership helpers (_claude_entry_is_ours/_claude_entry_owned_stronglyinsetup,_entry_is_ours/_entry_owned_stronglyin relink). The retired-skill prune (_prune_stale_generated) applies the same strong/weak split through its own gate: a real host directory is a candidate only when its SKILL.md carries the generated banner (_owned_for_windows_refresh), a host symlink is removed only when it resolves into gstack (_gstack_target_is_ours), a bannered real directory is cleaned through_cleanup_weak_dir, and a symlink inside the render tree is never followed. A symlink into gstack or the.gstack-ownedmarker proves the whole directory; a byte-identical or generated-banner SKILL.md proves only that file, and a differing one is moved to~/.gstack/backups/skills/<ts>/first.test/setup-link-ownership.test.ts,test/setup-cleanup-orphans.test.ts,test/setup-prune-stale-generated.test.ts, andtest/relink.test.tspin it. The rule is duplicated in the two scripts until the shared helper filed in TODOS.md lands: change both. ./setupnever fails on Chromium. The Playwright bootstrap (section# 2ofsetup) is best-effort and bounded: every failure becomes a reason code (skipped,chromium-install,chromium-install-timeout,chromium-install-locked,windows-no-node,windows-node-modules,post-install-launch) printed in the final summary alongside the browser-dependent skills, and skill registration always runs.GSTACK_PLAYWRIGHT_INSTALL_TIMEOUT=<seconds>(default 600) bounds the download;GSTACK_SKIP_PLAYWRIGHT=1skips it, the right knob for a no-browser box or a setup-only test loop.GSTACK_SKIP_ASIDE=1makes the browser summary (like the skills' probe and the renderer) treat Aside as absent, so the summary never promises a fallback the bootstrap did not deliver (test/setup-browser-hint.test.ts). Anything you add after the bootstrap must stay independent of the browser.test/setup-playwright-best-effort.test.tspins the block.
Testing your changes in a real project
This is the recommended way to develop gstack. Symlink your gstack checkout into the project where you actually use it, so your changes are live while you do real work.
Step 1: Symlink your checkout
# In your core project (not the gstack repo)
ln -sfn /path/to/your/gstack-checkout .claude/skills/gstack
Step 2: Run setup to create per-skill symlinks
The gstack symlink alone isn't enough. Claude Code discovers skills through
individual top-level directories (qa/SKILL.md, ship/SKILL.md, etc.), not through
the gstack/ directory itself. Run ./setup to create them:
cd .claude/skills/gstack && bun install && bun run build && ./setup
Setup will ask whether you want short names (/qa) or namespaced (/gstack-qa).
Your choice is saved to ~/.gstack/config.yaml and remembered for future runs.
To skip the prompt, pass --no-prefix (short names) or --prefix (namespaced).
Step 3: Develop
Edit a template, run bun run gen:skill-docs, and the next /review or /qa
call picks it up immediately. No restart needed.
Going back to the stable global install
Remove the project-local symlink. Claude Code falls back to ~/.claude/skills/gstack/:
rm .claude/skills/gstack
The per-skill directories (qa/, ship/, etc.) contain SKILL.md symlinks that point
to gstack/..., so they'll resolve to the global install automatically.
Switching prefix mode
If you installed gstack with one prefix setting and want to switch:
cd .claude/skills/gstack && ./setup --no-prefix # switch to /qa, /ship
cd .claude/skills/gstack && ./setup --prefix # switch to /gstack-qa, /gstack-ship
Setup cleans up the old symlinks automatically. No manual cleanup needed. Only
entries gstack created are removed: a skill of your own that shares a name (a
hand-written qa/, say) is left in place and named in setup's final summary.
Alternative: point your global install at a branch
If you don't want per-project symlinks, you can switch the global install:
cd ~/.claude/skills/gstack
git fetch origin
git checkout origin/<branch>
bun install && bun run build && ./setup
This affects all projects. To revert: git checkout main && git pull && bun run build && ./setup.
Community PR triage (wave process)
When community PRs accumulate, batch them into themed waves:
- Categorize — group by theme (security, features, infra, docs)
- Deduplicate — if two PRs fix the same thing, pick the one that changes fewer lines. Close the other with a note pointing to the winner.
- Collector branch — create
pr-wave-N, merge clean PRs, resolve conflicts for dirty ones, verify withbun run test && bun run build - Close with context — every closed PR gets a comment explaining why and what (if anything) supersedes it. Contributors did real work; respect that with clear communication.
- Ship as one PR — single PR to main with all attributions preserved in merge commits. Include a summary table of what merged and what closed.
See PR #205 (v0.8.3) for the first wave as an example.
Upgrade migrations
When a release changes on-disk state (directory structure, config format, stale
files) in ways that ./setup alone can't fix, add a migration script so existing
users get a clean upgrade.
When to add a migration
- Changed how skill directories are created (symlinks vs real dirs)
- Renamed or moved config keys in
~/.gstack/config.yaml - Need to delete orphaned files from a previous version
- Changed the format of
~/.gstack/state files
Don't add a migration for: new features (users get them automatically), new skills (setup discovers them), or code-only changes (no on-disk state).
How to add one
- Create
gstack-upgrade/migrations/v{VERSION}.shwhere{VERSION}matches the VERSION file for the release that needs the fix. - Make it executable:
chmod +x gstack-upgrade/migrations/v{VERSION}.sh - The script must be idempotent (safe to run multiple times) and non-fatal (failures are logged but don't block the upgrade).
- Include a comment block at the top explaining what changed, why the migration is needed, and which users are affected.
Example:
#!/usr/bin/env bash
# Migration: v0.15.2.0 — Fix skill directory structure
# Affected: users who installed with --no-prefix before v0.15.2.0
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
"$SCRIPT_DIR/bin/gstack-relink" 2>/dev/null || true
How it runs
During /gstack-upgrade, after ./setup completes (Step 4.75), the upgrade
skill scans gstack-upgrade/migrations/ and runs every v*.sh script whose
version is newer than the user's old version. Scripts run in version order.
Failures are logged but never block the upgrade.
Testing migrations
Migrations are tested as part of bun run test (tier 1, free). The test suite
verifies that all migration scripts in gstack-upgrade/migrations/ are
executable and parse without syntax errors.
Shipping your changes
When you're happy with your skill edits:
/ship
This runs tests, reviews the diff, triages Greptile comments (with 2-tier escalation), manages TODOS.md, bumps the version, and opens a PR. See ship/SKILL.md for the full workflow.