Skip to content

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

TypeScript

Eval graders treat the agent's repo as hostile, plus two more team-learned habits (GST-3354) (#4602)

Garry Tan6af4d8a03f24
diff --git a/capy/skill/gstack/lane-card.md b/capy/skill/gstack/lane-card.md
index d6ad6a55e..d68659df9 100644
--- a/capy/skill/gstack/lane-card.md
+++ b/capy/skill/gstack/lane-card.md
@@ -10,6 +10,7 @@ For a crew lane (a thread working for a Captain). Read this once `gstack: ok <re
- Every subagent runs its own `--check` and puts its trailer in its first report; a read-only reviewer uses `--for review-voice`. One machine's install never covers another.
- A workflow that prints `INSTALL: fail …` and exits 3 refuses this install: run its fix and start again. A planning-only install does not admit `review`, `ship` or `qa`; run `--for <that skill>` first.
- Run directories and scratch live under `~/.capy/work/<name>`, never `/tmp`, which Capy wipes when a machine sleeps.
+- A write into a drive mount can succeed locally while the drive never keeps it: before you delete a source because the copy is in the drive, find that copy in the drive's version history (`tools.drive.history`).
## Plan, approve, ship
diff --git a/changelog.d/agent-habits-third-batch.md b/changelog.d/agent-habits-third-batch.md
new file mode 100644
index 000000000..a33857d04
--- /dev/null
+++ b/changelog.d/agent-habits-third-batch.md
@@ -0,0 +1 @@
+**Three more habits from teams that run evals.** `/eval-plan` says a grader that runs git inside an agent's repo treats that repo as hostile: a sanitized copy of `.git` with no config, hooks, attributes, textconv or signature display, the original index timestamps, no API keys in its environment, and a test that plants each setting. The agents' start card says to find a drive copy in the drive's version history before deleting its source. `docs/working-across-agent-systems.md` says to take each result row's model from the requests the run captured, on every scored row, timeouts included.
diff --git a/docs/working-across-agent-systems.md b/docs/working-across-agent-systems.md
index 7157c1b4a..d0bd8551a 100644
--- a/docs/working-across-agent-systems.md
+++ b/docs/working-across-agent-systems.md
@@ -42,9 +42,11 @@ What we learned, in short:
6. **Pin the other harness's version and model.** A coding-agent CLI can change its default model in a
release. Name the version and the model in every brief and every eval plan. Decide a new pin from a
repro on the candidate release, not from its release notes, and record the version and model that
- actually ran from the session record, not from the plan. In one team's case a fix merged upstream was
- missing from the next stable build, and a release that fixed one bug dropped turns in three of three
- runs; in another, a CLI release changed its default model.
+ actually ran from the session record, not from the plan. Take each result row's model from the
+ requests the run captured, on every scored row, timeouts included. In one team's case a fix merged
+ upstream was missing from the next stable build, and a release that fixed one bug dropped turns in
+ three of three runs; in another, a CLI release changed its default model, and a model check that
+ skipped timed-out rows would have let a timeout on the wrong model into a paired comparison.
## Keep runs cheap
diff --git a/eval-plan/SKILL.md b/eval-plan/SKILL.md
index e1d98c7e7..7727e02ee 100644
--- a/eval-plan/SKILL.md
+++ b/eval-plan/SKILL.md
@@ -160,7 +160,7 @@ Write (or open) the preregistration file. Each section is required and must be f
| Interim look | only when `paid:` is above 500 dollars: `at: 50%`, `looks: 1`, `bounds: O'Brien-Fleming`, `futility:` |
| Decoys | inputs the scorer must reject or score low; how many, how they were made, what a decoy pass proves |
| Stop rules | the spend cap, a bar missed on the pilot, a scorer below its bar, `budget_exhausted`, the first quota or rate-limit error on a seat-metered arm |
-| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`) |
+| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`); and, when a grader runs git in the agent's repo, how it treats that repo as hostile (below) |
| No-gstack arm | required with `stack: loaded` (below) |
```bash
@@ -183,6 +183,16 @@ gstack skill file is contaminated and gets zero credit.
`PREREG_NO_GSTACK_ARM` (exit 1) names what is missing. The PREREG line shows
`stack=loaded no_gstack_arm=ok` when it is complete, or `stack=none` for an opt-out.
+**A grader treats the agent's repo as hostile.** A grader that runs git inside a repo the
+agent worked in runs it against a sanitized copy of `.git`: no repo, system or global
+config, no hooks, no attributes (`.gitattributes` or `info/attributes`), no textconv or
+external diff, and no signature display. The copied index files keep their original
+timestamps, because a fresh mtime turns off git's same-second check and a same-second,
+same-size edit then reads as committed. The grader's environment holds no API keys, and a
+test plants each of these settings and asserts that nothing runs. On one eval, a planted
+`core.fsmonitor`, a clean filter, or `gpg.program` with `log.showSignature` each ran code
+on the grading machine next to the proxy that held the keys.
+
When the summarizer counts diagnostics, declare them before the freeze commit in a
`## Diagnostics` section: `summarizer: <command naming {fixture}>`, `fixture: <synthetic
records file>`, and one `| diagnostic | expected |` row per diagnostic, with the count the
diff --git a/eval-plan/SKILL.md.tmpl b/eval-plan/SKILL.md.tmpl
index 933862961..dee552470 100644
--- a/eval-plan/SKILL.md.tmpl
+++ b/eval-plan/SKILL.md.tmpl
@@ -75,7 +75,7 @@ Write (or open) the preregistration file. Each section is required and must be f
| Interim look | only when `paid:` is above 500 dollars: `at: 50%`, `looks: 1`, `bounds: O'Brien-Fleming`, `futility:` |
| Decoys | inputs the scorer must reject or score low; how many, how they were made, what a decoy pass proves |
| Stop rules | the spend cap, a bar missed on the pilot, a scorer below its bar, `budget_exhausted`, the first quota or rate-limit error on a seat-metered arm |
-| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`) |
+| Held-out exposure | every held-out set the plan touches: prior exposure (which runs, which models), the reservation on it; and how each task machine was checked, before any session, for answers the agent could read there (other git refs such as `git log --all`, build and package caches, archives and the task's own work tree; never a sweep of `/`, runner state or `~/.ssh`); and, when a grader runs git in the agent's repo, how it treats that repo as hostile (below) |
| No-gstack arm | required with `stack: loaded` (below) |
```bash
@@ -98,6 +98,16 @@ gstack skill file is contaminated and gets zero credit.
`PREREG_NO_GSTACK_ARM` (exit 1) names what is missing. The PREREG line shows
`stack=loaded no_gstack_arm=ok` when it is complete, or `stack=none` for an opt-out.
+**A grader treats the agent's repo as hostile.** A grader that runs git inside a repo the
+agent worked in runs it against a sanitized copy of `.git`: no repo, system or global
+config, no hooks, no attributes (`.gitattributes` or `info/attributes`), no textconv or
+external diff, and no signature display. The copied index files keep their original
+timestamps, because a fresh mtime turns off git's same-second check and a same-second,
+same-size edit then reads as committed. The grader's environment holds no API keys, and a
+test plants each of these settings and asserts that nothing runs. On one eval, a planted
+`core.fsmonitor`, a clean filter, or `gpg.program` with `log.showSignature` each ran code
+on the grading machine next to the proxy that held the keys.
+
When the summarizer counts diagnostics, declare them before the freeze commit in a
`## Diagnostics` section: `summarizer: <command naming {fixture}>`, `fixture: <synthetic
records file>`, and one `| diagnostic | expected |` row per diagnostic, with the count the
diff --git a/lib/eval-plan.ts b/lib/eval-plan.ts
index fc6ee6e01..0673d8856 100644
--- a/lib/eval-plan.ts
+++ b/lib/eval-plan.ts
@@ -77,6 +77,7 @@ export function preregTemplate(title = 'Eval preregistration'): string {
## Held-out exposure
<!-- Every held-out set this plan touches: | set | prior exposure (which runs, which models) | reservation (what this run may read) | -->
<!-- Answers on the task machine: how each unit's machine was checked, before any session, for answers the agent could read there (other git refs such as \`git log --all\`, build and package caches, archives and the task's own work tree; never a sweep of \`/\`, runner state or \`~/.ssh\`). -->
+<!-- Grader: when a grader runs git in the agent's repo, how it treats that repo as hostile: a sanitized copy of .git with no repo, system or global config, hooks, attributes, textconv or signature display; original index timestamps; no API keys in its environment; a test that plants each setting. -->
<!-- Optional: a \`## Diagnostics\` section declares the summarizer (\`summarizer: <command naming {fixture}>\`), its synthetic records (\`fixture: <path>\`) and one | diagnostic | expected | row per diagnostic; \`prereg --check --allow-repo-commands\` runs it. A count reported as zero needs its diagnostic declared here with a planted case (expected 1 or more). -->
`;
}
diff --git a/test/captain-skill.test.ts b/test/captain-skill.test.ts
index 4716fff60..fd8aa089d 100644
--- a/test/captain-skill.test.ts
+++ b/test/captain-skill.test.ts
@@ -144,7 +144,9 @@ describe('/captain skill', () => {
expect(cited).toContain('Plan, approve, ship');
expect(cited.filter(h => !headings.has(h!))).toEqual([]);
expect(capySkill).toMatch(/## Session start[^#]*?read \[lane-card\.md\]\(lane-card\.md\), not the rest of this file/);
- expect(Buffer.byteLength(card)).toBeLessThanOrEqual(6800);
+ // 7,000 for the drive-write line (confirm a copy in the drive's version history before deleting its source), reached by two
+ // crews on their own (crew habit H5).
+ expect(Buffer.byteLength(card)).toBeLessThanOrEqual(7000);
const doc = read('crew/docs/captain.md').replace(/\s+/g, ' ');
for (const s of ['`duration_seconds: 240`', 'stops re-issuing the timer', 'The controller never warm-waits', '4k characters or less', 'twice the crew\'s median lane spend', '`handoffs/<code>/next.md`']) expect(doc, s).toContain(s);
expect(read('captain/templates/brief.md')).toMatch(/^Read: <[^>]+>$/m);