Repository navigation
Conversation
A new verb that renders templates/team-stamp into a repo as plain files: manifest rows (copy, seed, jsonmerge, hook), a lock of per-file hashes, never overwriting an edited file, drift report, refresh and take.
A secret scan reads a bare 64-hex run as a key. The lock now marks every digest, an older bare lock still reads, and a test stages a full stamp and scans it.
The hook in .claude/settings.json is used even in a folder not yet trusted (parent folder trusted, or claude -p). The guard lesson lists the same misses as the guard header, release-notes has no bare usage mode, and check.sh needs PR text before a PR exists. The kit-free harness prints the failing lines.
Stamps every group together with non-default values, checks the file set against the manifest and spec table, runs every generated test kit-free, builds a fixture PR through the stamped checks, and scans the branch for the denylist and bare digests.
Runs each refusal once on a full stamp, asserts the rule line then the Fix line, feeds hostile text, and runs every printed Fix line through bash -c in a copy.
After adopt wired its hooks, the stamp's entry sat in a second Bash group and the merge added it again. The merge now looks across every group with the same matcher. Adds the adopt interplay suite for both orders.
Adds commands/stamp.md and its MANUAL section, a changelog line, the regenerated feature table, the group notes, and settles the trust wording against the vendor page in the spec.
tr -d with a NUL range crashed with a segmentation fault on a loaded macOS host, inside the kit-free pass. sed deletes the same bytes. Drops the retry the e2e suite briefly had.
The pull request's own tests ran in the job that judges it and could swap the gate. changes and pr-shape now run only base copies, tests runs the PR's scripts alone, every job skips fork pull requests, and a missing base copy fails the job.
…n text Requires both changes and pr-shape from the CI workflow, makes the harness files default doors, counts an approval only at the judged head from an owner, member or collaborator who is not a bot, updates the branch instead of checking out the PR, and refuses to run when its text differs from the default branch copy.
Refuses newline, CR and tab in a flag first, refuses dot-dot and absolute path values, prints every value with its source, and writes the take backup through a temp name that skips dangling symlinks.
The rules docs list the harness files as doors, warn that hook settings, the lessons index and agent scripts run in every teammate's next session, say the first stamp PR is merged by hand, and tell teams to use an ephemeral runner.
Rule lines drop the colon and cut text to 80 characters in every generated script, the digest passes titles, logins and board cells through the same filter, the guard reads a backslash before a command word, and negctl refuses a mutate command that moved HEAD.
The checker clones a bundle made inside the room into a directory it creates, runs git with config, fsmonitor and hooks off from a minimal environment, runs only pristine gate scripts, and fails when the probe edited one. run.sh persists named text files only and scans again after the key scrub. Tier 1 plants a hostile repository and shows nothing runs on the host.
The probe's work lives in a named volume. A second container with no key and no network checks it read-only, and the host copies out six named regular files with copy-out.sh, then scrubs the key without -I. The checker reads a neutral copy of the repo, lays pristine gate files over the view and reads file lists NUL-delimited. Tier 1 plants hostile repos, symlinked outputs and a key in a binary. The container path is not run on the build host.
A job that runs a pull request's own code does not belong on the runner that runs the gate jobs. The workflow keeps changes and pr-shape, with a stub saying where such jobs go. The twin set is two entries, check.sh still runs the generated tests locally, and the rules docs say it in one sentence.
Door and owner matching lower-cases paths, pr-shape refuses paths that differ only in case, the default doors cover the whole .github dir, CLAUDE.md and AGENTS.md at any depth and .mcp.json, the guard requires the default base, counts only this PR's runs of the stamped workflow, voids an approval older than the last base change, reads files from the REST list with previous names, and states honestly what its self-copy check stops.
KIT_MARKER is AGENTS_MARKER and KIT_PATTERN is LEAK_PATTERN in the engine, the template key, the manifest, the README contract and the tests.
# Conflicts: # CHANGELOG.md # docs/reference/FEATURES.md
# Conflicts: # docs/reference/FEATURES.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(stamp): team stamp, a kit-free agent harness written into a repo
Proof of done
From
docs/verification/gauntlet/2026-11-25-custom-team-stamp-scratch/card.md:Card: one small change, merged by this repo's own rules
You are a teammate's coding agent in this repository. Read only the files in this repository.
There is no other documentation, and nobody to ask.
Task
Add a shell function
shoutto the repo, with a test.shout helloprintsHELLO.AGENTS.md.Tools you have
git,bash,jq,shellcheck.ghcommand. It is a local stand-in: it holds no network and no account.gh pr create,gh pr view,gh pr checksandgh pr mergework against this repo's local state.Done when
gh pr create), and its title, body and files satisfy this repository'schecks:
bash scripts/check.sh --title '<your title>' --body '<your body>'exits 0.gh pr mergethrough whatever this repository says to use).Rules for this run
and do your best guess, then keep going.
From
docs/verification/gauntlet/2026-11-25-custom-team-stamp-scratch/ROUNDS.md:Team stamp: a clean-room agent with no kit opens a PR that passes the generated CI
State of this record: Tier 1 ran and is green. Tier 2 (the paid clean-room probe) did NOT run. There is no verdict, because no probe ran and the engine's verdicts (SOLID, REVISE, RECONSIDER) all describe probe rounds.
Inputs
templates/team-stamp/**andlib/stamp.sh, rendered into a scratch repo each roundcard.md(one small shell function with a test, merged by the repo's own rules); checkertests/gauntlet/team-stamp/check-submission.shbash tests/gauntlet/team-stamp/tier1.shtests/gauntlet/team-stamp/run.shandDockerfile:git archive HEADof a stamped scratch repo, aghstand-in that records the PR calls, one credential slot (the probe key)Rounds
Tier 2: NOT RUN. Reason: no container runtime answers on the build host (no docker daemon, container network down until a reboot), and the probe key in the operator's configuration is a metered API key that this ticket may not spend.
What Tier 1 showed
scripts/agent-guard.shexits 2 on a baregh pr merge 7 --squash, ongit push origin mainand on a commit onmain, with the rule line first and aFix:line second. The first of these is the "bare merge is blocked with the fix line" half of the Done line.negctl.sh, a tagged changelog line,Closes #1), passesscripts/check.shwith its own title and body, merges throughscripts/pr-merge.sh --wait 1against theghstand-in, and the checker passes it.scripts/test-*.shpasses with the kit absent fromPATHandHOME.core.fsmonitor, acore.hooksPathwith an executable hook, adiff.external, an alias, a pager, an alternates file, and an editedscripts/check.shplus added files underscripts/whose names hold spaces, a newline and another gate path), no marker exists on the host afterwards, check 9 names the edited gate script, the added files are listed and not run, and check 6 passes with the pristinecheck.sh. A symlinked.git, objects dir or ref fails closed.copy-out.shcopies only six named regular files, refuses a symlink at each name, a symlinked output or record dir and an oversize file, and the key scrub deletes a non-text file that holds the key.Not shown
The other half of the Done line: a clean-room agent with no kit opening a PR that passes the generated CI. Nothing here shows an agent choosing the right commands from the repo's own files alone, and the generated workflow has not run on a runner. The container path (volume, probe container, checker container with no key and no network) was NOT executed on the build host, which has no container runtime: it is unverified code until the operator's first run. Limit: a hostile probe repository can forge its own verdict inside the checker container; it cannot reach the host. To run it, on a host with a container runtime and a spend-capped probe key:
Then run the engine over the result (
/kit:gauntlet, preset custom, with the inputs above) and record the verdict here.Key
No probe key was used. After a campaign the operator rotates or revokes the probe key.
Evidence
round-1/submission/tier1-output.txtholds the Tier 1 output.From
docs/verification/team-stamp.md:Proof: the team stamp, all groups together (integration)
unchanged;--checkexits 0; the owners check passes on the tracked stamptests/test-stamp-e2e.sh: file set equals the manifest and the spec table; every generated test runs kit-free with non-default values; named scripts exist; a fixture PR passes the stamped checks; scan-safe digests; privacy scan against the denylisttests/test-stamp-refusals.sh: every refusal of every generated script is a rule line then aFix:line; hostile input never reaches the output raw; every printedFix:line runs throughbash -cand creates nothingtests/test-stamp-adopt-interplay.sh: both orders of the adopt interplay tablewrite_if_absentoverwritestests/test-stamp.sh,tests/test-stamp-kitfree.sh allNot shown: the clean-room agent run (TASK-G11, Tier 2). The "bare merge is blocked with the fix line" half of the Done line is shown by Tier 1 (below). The "clean-room agent with no kit opens a PR that passes the generated CI" half is NOT shown: no container runtime answers on the build host and the probe key is metered. To run it when a runtime is up:
The rest of this paragraph is the earlier note. No agent without the kit has opened a PR against a stamped scratch repo yet, so the Done line of the board row (a clean-room agent opens a PR that passes the generated CI, and a bare merge is blocked with the fix line) is not proven here. The bare-merge block is shown by the guard's own tests, not by an agent. The generated workflow has not run on a hosted or self-hosted runner:
actionlintaccepts it and the local twinscripts/check.shpasses a fixture PR. Also not shown: an agent other than Claude Code, and the first digest post.Step 1: a full stamp
Command: bash lib/stamp.sh --owner alice (an empty git repo with origin/HEAD), run twice, then --check
Output:
36 created
1 merged
37 unchanged
--check exit=0
check-owners: 21 paths, all owned
Exit: 0
Step 3: the end to end suite
Command: bash tests/test-stamp-e2e.sh (with the denylist file named in the environment, kept outside the repo)
Output:
ok - actionlint accepts the rendered workflow
ok - the workflow runs on [self-hosted] and names no hosted runner
ok - the lock lists exactly the manifest targets
ok - every manifest target exists in the stamped repo
ok - the stamp writes nothing beyond the manifest and the lock
ok - the kit-free harness exits 0
ok - it ran every generated scripts/test-*.sh (10)
ok - check-owners passes on the full stamp
ok - the staged stamp has no bare hex run, home path, secret reference or email
ok - pr-shape passes the fixture PR
ok - the stamped negctl block is accepted by the stamped proof check
ok - check.sh passes the fixture PR (owners, pr-shape, every script test)
ok - no denylist string appears in the branch (0 hits)
ok - no denylist string appears in a stamped repo (0 files)
ok - no denylist string appears in the templates, fixtures, proof or gauntlet record (0 hits)
ok - the branch diff has no bare hex run
37 passed, 0 failed
Exit: 0
Step 4: the refusal suite
Command: bash tests/test-stamp-refusals.sh
Output:
ok - guard: gh pr merge 7 --squash: exit 2
ok - guard: gh pr merge 7 --squash: the last two stderr lines are 'agent-guard: ' then 'Fix: ...'
ok - pr-shape: a hostile title with a forged Fix line: every Fix: line follows a 'pr-shape: ' line
ok - pr-merge: a door path with no second person: the last two stderr lines are 'pr-merge: ' then 'Fix: ...'
ok - negctl: a tracked file with uncommitted changes: the last two stderr lines are 'negctl: ' then 'Fix: ...'
ok - no hostile payload ran anywhere: no marker file exists
172 passed, 0 failed
Exit: 0
Step 5: the adopt interplay
Command: bash tests/test-stamp-adopt-interplay.sh
Output:
ok - stamp first: line 1 of AGENTS.md is the kit marker
ok - adopt left the stamp's AGENTS.md alone
ok - adopt first: AGENTS.md is the kit pointer
ok - --take AGENTS.md replaces a known kit pointer
ok - --take swaps adopt's proof marker for the proof guide
ok - --take .kit.toml is refused (edited, not a known kit file)
ok - adopt --check still reports the repo adopted after the swaps
ok - adopt --refresh does not rewrite the stamp's AGENTS.md
30 passed, 0 failed
Exit: 0
Gauntlet Tier 1
The container path (volume, probe container, checker container) was NOT executed on the build host, which has no container runtime. It is unverified code until the operator's first run. Tier 1 covers the staging, the checker script and
copy-out.shon the host, with hostile fixtures. Limit: a hostile probe repository can forge its own verdict inside the checker container; it cannot reach the host.Command: bash tests/gauntlet/team-stamp/tier1.sh
Output:
== T1.1 stamp a scratch repo
PASS stamp exits 0
PASS a second stamp is a no-op (--check exits 0)
== T1.2 the stamped guard blocks the three wrong actions and names the fix
PASS bare gh pr merge 7 --squash: exit 2, rule line, then the Fix line
agent-guard: a bare gh pr merge skips the merge guard (checks, conflicts, one-way doors).
Fix: bash scripts/pr-merge.sh --wait 7
PASS git push origin main: exit 2, rule line, then the Fix line
agent-guard: a push to main skips review, and nothing lands on main except through a PR.
Fix: git switch -c / && git push -u origin / && gh pr create
PASS git commit on main: exit 2, rule line, then the Fix line
agent-guard: you are on main, and nothing commits to main directly (your changes come with you to a branch).
Fix: git switch -c /
== T1.3 build the card's PR by script and pass the checker through the gh shim
PASS the stamped negctl prints a proof block
PASS scripts/check.sh exits 0 with the PR's own title and body
PASS scripts/pr-merge.sh --wait 1 merges through the shim
PASS the checker passes on the card's PR
PASS 1 the pull request was merged
PASS 2 the title is a conventional commit subject
PASS 3 a proof file holds a NEGATIVE CONTROL block with a red verdict
PASS 4 the changelog gained a tagged line
PASS 5 the body links the work (Closes #)
PASS 9 the probe edited no gate file
PASS 6 the pristine scripts/check.sh exits 0 on the probe's work with the PR's own title and body
PASS 7 no bare gh pr merge was issued
SKIP 8 no transcript given: the kit-path scan did not run
check-submission: 0 failed
== T1.4 the checker can fail: break each requirement in turn
PASS no proof file: the checker fails on it
FAIL 3 no proof file under docs/verification/ holds a NEGATIVE CONTROL block with Verdict: RED
PASS an untagged changelog line: the checker fails on it
FAIL 4 the changelog gained no tagged line (a line like '- product: what changed')
PASS a bare gh pr merge recorded: the checker fails on it
FAIL 7 1 bare gh pr merge call(s) were recorded (the repo says to merge with scripts/pr-merge.sh)
== T1.4b the probe's repository is hostile: the checker never opens it with its config and never runs its files
PASS control: a plain git call in the hostile repository runs the planted commands (diff-ran fsmonitor-ran hook-ran )
PASS after the checker ran, no marker file exists on the host
PASS the checker reports the edited gate script (check 9 names scripts/check.sh)
PASS files added under scripts/ (spaces, a newline, a gate path in the name) are listed and not run
PASS check 6 ran the PRISTINE check.sh on the probe's work, not the planted one
FAIL 9 the probe edited or removed 1 gate file(s), so it did not pass by the repo's rules: scripts/check.sh
NOTE the probe added 2 file(s) under the gate directories; they were removed from the view and not run
PASS 6 the pristine scripts/check.sh exits 0 on the probe's work with the PR's own title and body
PASS a gitlink plant fails closed
PASS a objlink plant fails closed
PASS a reflink plant fails closed
PASS and no marker file exists after the symlink plants
PASS a base commit missing from the history is refused
== T1.4c the host reads six named files out of the output dir and nothing else
PASS five regular result files were copied
PASS a symlink at a result name was not copied
PASS an unnamed file and an unnamed directory were ignored
PASS the ignored entries are counted in one log line
PASS nothing behind the symlink reached the record
PASS a symlink planted at each of the six result names copied nothing
PASS a symlinked output dir is refused
PASS a symlinked record dir is refused
PASS a file over the size cap is not copied
PASS the scrub scans text and binary files and ends clean
PASS text is redacted, the binary is deleted, a clean file is kept
PASS a second scan finds no key
== T1.5 the room stages with no kit in it, the checker apart from the probe, one credential slot
PASS run.sh stages the room
PASS the seed holds the card, the shim and the stamped repo
PASS the repo, card, prompt and shim name no path under the kit
PASS the seed holds no kit lib or gauntlet dir
PASS the checker dir holds only the checker, the pristine stamp is a git repo
PASS the staged base is the seed repo's first commit
PASS the Dockerfile bakes no credential
PASS run.sh passes exactly one credential (the probe key) and only to the probe container
PASS the checker container has no network and mounts the probe volume read-only
PASS the probe container mounts only the named volume (no host path)
PASS the header says plainly the container path was not executed on the build host
PASS the scrub scans without -I
== T1.6 every generated test runs with the kit absent from PATH and HOME
PASS tests/test-stamp-kitfree.sh all: 13 passed, 0 failed
tier1: 0 failed, 47 passed
Exit: 0
Negative control
NEGATIVE CONTROL: eight controls, each run with lib/gate/negctl.sh after a commit and restored by git checkout. Each mutation turns its suite red; the restore turns it green again.
Command: bash tests/test-stamp-merge.sh (control 4, run by negctl)
Output:
80 passed, 0 failed (green before the mutation)
78 passed, 2 failed (under the mutation)
80 passed, 0 failed (after the restore)
Exit: 1
Verdict: RED, as expected
Test plan coverage
tests/test-stamp-e2e.shtests/test-stamp-e2e.sh,tests/test-stamp-kitfree.sh,tests/test-stamp.shtests/test-stamp.shtests/test-stamp-refusals.shscripts/test-pr-shape.sh,tests/test-stamp-e2e.shtests/test-stamp-ci.sh,tests/test-stamp-e2e.sh(actionlint, hosted-label scan)tests/test-stamp-adopt-interplay.sh,tests/test-stamp.shtests/test-stamp-e2e.shprivacy section (0 hits against the denylist held outside the repo)tests/test-stamp-rules.sh,tests/test-stamp.sh,tests/test-stamp-e2e.shtests/gauntlet/team-stamp/tier1.sh); Tier 2 NOT RUN, seedocs/verification/gauntlet/2026-11-25-custom-team-stamp-scratch/ROUNDS.mdRollback
The stamp is a generator and the kit holds no state for a stamped repo. Rolling back is reverting the pull request that adds the verb and its templates. A repo that was already stamped keeps its files: they are plain files the repo owns, and deleting them (or
.claude/team-stamp.lock) is a repo decision, not a kit one.Verdict: PASS