Repository navigation
Load the never-print-secrets rule in every skill on every host, with the commands it missed (GST-2753) - #4382
Merged
Merged
Conversation
…the commands it missed (GST-2753) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…ecret-printing commands The Ground Rules section told every skill to wait with gh pr checks --watch, which spends the shared GitHub GraphQL quota gstack moved off; it now names gstack-pr-wait. The banned list also covers ps aux and ps -ef, set -x, git config -l and an export $(...) that expands to a bare export. Size caps raised to the measured +70 bytes. Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
Merged
capy-ai Bot
added a commit
that referenced
this pull request
Nov 17, 2026
- /autoplan's approval page no longer hides a reviewer's product objection behind "keep your direction". (#4431) - Every skill that loads the shared preamble, on every host, now says to ask a question once and to check a file before handing it over. (#4383) - The Captain manuals now name the `Failed or skipped:` and `Also changed:` lines that READY and lane reports carry. (#4432) - gstack's shell locks hold again on Ubuntu 26.04, where `mkdir` reports success when another process won the race (GST-2247). (#4262) - `test/gstack-lock-race.test.ts` runs the old pattern and the helper against a PATH shim that behaves like uutils 0.8.0 `mkdir`, so it runs on any runner image: the old pattern lets two of four racers win, the helper admits exactly one in each of 60 races and never overlaps across take, hold and release loops, and parallel `gstack-config` writers keep every key. (#4262) - Windows Setup E2E now runs when `bin/gstack-lock.sh` changes. (#4433) - Claude Code's skill list now says when to use each gstack skill, so Opus loads /review and /plan-eng-review when a request fits. (#4387) - A pull request's merge head can no longer keep its `/ship` receipt without a full review. (#4365) - `/ship` now counts review rounds per pull request, and the head that merges always gets a full review. (#4360) - /ship's documentation audit no longer accepts a passing result when an earlier line from the same audit said "blocked". (#4434) - /ship's documentation audit no longer spends an attempt when the audit child writes text after its result. (#4285) - The README lists the two new guides, and the install doc counts its hooks right. (#4403) - docs/releases.md now says the stable release cut treats a failed commit status as red and a pending one as still going, as it has since #4257. (#4436) - /ship's `finish --docs-requested` now accepts a docs fix when the audit named the file with a line number. (#4437) - Document the `.gstack/approval-classes.json` schema, `gstack-approval-classes` CLI commands, and owner approval citation format in `docs/ship-policy.md#approval-classes`. (#4355) - `/eval-plan` now runs four result checks instead of leaving them to judgment. (#4384) - The /review coverage-audit eval no longer fails a run that really read the source file when zsh stops a command line at an `echo ====` separator. (#4364) - Sixteen in-repo documentation links reach their section again. (#4394) - gstack agents now open every status report with what failed, what they didn't verify and what else they changed. (#4273) - Two new short guides. (#4380) - A skill you wrote whose contract still lists `check_after_last_edit` keeps the rest of its contract. (#4439) - The ship policy guide now explains how to merge any pull request with `gstack-ship-queue land`, even in a repository with one maintainer. (#4377) - /ship's test step runs a large unit suite on Linux. (#4426) - Every skill that loads the shared preamble, on every host, now says never to print a whole environment, git config or process table. (#4382) - Pull requests from /ship now open with at most three plain lines, and every merge lands as one commit titled with the PR title. (#4438) - `gstack-pr-wait`, `gstack-ci-gate` and the release cut no longer call a commit green while a check on it failed. (#4257) - `gstack-runaway` now says what a thread's cold and empty wakes cost, not just how many there were (GST-2770). (#4385) - The optional Stop hook no longer checks for a test run after the last edit, and /verify asks for it in plain words instead. (#4428) - /ship's test step says when it ran out of time, and you can set its budget. (#4429) - The remote test command no longer puts every file on one command line. (#4429) - The stable release no longer waits on the nightly Windows tests (GST-2815). (#4400) - Ubicloud fan-outs can no longer overshoot the vCPU limit, and owners no longer delete each other's VMs. (#4430) - hono is pinned to 4.13.16, which fixes five advisories the weekly OSV scan found in 4.13.13 (gstack#4406). (#4408) - `package.json` overrides (#4408) - `test/dependency-security.test.ts`: the lockfile floor check now covers `hono >= 4.13.16`. (#4408) - The nightly Windows test run finishes again. (#4409) - A short write-up checklist in ETHOS.md. (#4381) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
Every gstack skill, on every host, now tells the agent never to print a whole environment, git config or process table, and how to read the one value it needs instead.
Why: in our own agent teams, tokens leaked through exactly these commands, and the old rule loaded only in the Capy wrapper and missed
git config --listand process listings.Nothing to do: the next
./setupor upgrade picks it up.Summary, why and blast radius
Summary
A new Ground Rules section in the shared preamble lists the commands that print a whole environment, git config or process table, with the safe form for each. It also says to wait on CI with one
gstack-pr-waitcall instead of a poll loop orgh pr checks --watch.Why
Run tokens leaked through these commands in real agent sessions. The old rule lived only in the Capy wrapper, so other hosts never saw it.
Blast radius
Prompt text only. Every skill that loads the shared preamble gets about 600 more bytes. Seven skills with no shared preamble (careful, cso, deslop-shared-libs, freeze, gstack-upgrade, guard, unfreeze) are unchanged.
Documentation audit
Status: current. No documentation edits were needed, because the branch already updated the affected doc.
Scope: The audit covered base 0326b14 to head 15d80ac on
never-print-secrets-shared-rule, plus the unstaged change tochangelog.d/never-print-secrets-shared-rule.md. The change adds a pinned shared-preamble piece,ground-rules, generated byscripts/resolvers/preamble/generate-ground-rules.ts. It tells every skill never to print a whole environment, git config or process table, and to wait on CI with onegstack-pr-waitcall. The rest of the diff is the regenerated SKILL.md and preamble outputs, plus updated size guards and budgets.Documentation health
docs/loadouts.md: current. Its Pinned row and its Lite on Claude Opus 5.5 section name the Ground Rules, which matchesmodules/loadouts.jsonandPREAMBLE_PIECES.changelog.d/never-print-secrets-shared-rule.md: current. It is accurate against the generator and againstgstack-pr-wait --help. I reviewed it but did not edit it, because changelog edits belong to the parent.docs/capy-install.md,docs/state-root.md,capy/skill/gstack/SKILL.mdandcapy/skill/gstack/lane-card.md: current. They agree with the new rule.AGENTS.md,CLAUDE.mdandCONTRIBUTING.md: no change needed.Coverage debt: The Ground Rules piece has reference coverage in docs/loadouts.md and explanation coverage in its generator docstring and the changelog fragment. It has no how-to or tutorial, which is acceptable for a guardrail rule. There are no critical gaps.
Diagram drift: None. No architecture diagram names preamble pieces.
Agent notes
Where the rule lives. A new preamble piece,
scripts/resolvers/preamble/generate-ground-rules.ts, renders a## Ground Rulessection at every tier (minTier: 1). Tier 1 skills carry it inline; tier 2+ skills get it in the sharedsections/preamble.mdthatpreamble-hoist.tswrites for every host.gen:skill-docs --host allrenders it for Claude Code, Codex, Factory, Kiro, OpenCode and the other hosts, so this is the one place every host loads. ETHOS.md is only pointed at, never loaded, so it was not the home. The piece is pinned inmodules/loadouts.jsonso no model loadout drops it, anddocs/loadouts.mdlists it with the other pinned pieces.What it bans.
env; bareprintenv,setandexport, and anexport $(...)that expands to a bareexport;export -p/-n;declare -p/-x;typeset -p;set -x;git config --list/-l(it can print a proxy login header); anypswith full args (ps aux,ps -ef,ps -o args);docker top ... argsanddocker inspect's Env block. The safe form:git config --get <name>,[ -n "${NAME:-}" ] && echo setfor a variable, processes by name or pid.printenv NAMEis not taught as the safe form:test/launch-env-echo-ratchet.test.tsbansprintenvwith a name in every skill fence, and printing a named secret still prints it.CI waits. One line: wait on CI with one
gstack-pr-wait <n> --until greencall, never a poll loop orgh pr checks --watch. The first draft recommendedgh pr checks --watch; review pointed out that it spends the shared GitHub GraphQL quota gstack moved off (GST-1713), so it now names gstack's REST-based watcher.Left alone. The Capy wrapper's launch-file sentence (
capy/skill/gstack/SKILL.md) keeps its own short ban, because it loads before any workflow and explains theexport $(...)trap specific to the launch file.Size guards. +614 bytes per skill (+544 at b681106, +70 from the review fixes). Raised to measured, each with a comment: eight parity ratio caps and two tier 1 skeleton caps in
test/helpers/carve-guards.ts, the runaway-stopper eager ceiling intest/fixtures/context-budget.json(that one value only; a full recapture would have moved 38 unrelated ceilings), and a /ship size-ledger entry. Ship goldens refreshed.Evidence and measurement. A safety guard, so no eval is owed. Evidence of the leaks stays private.
test/ground-rules.test.tspins the byte budget, every banned command, the safe forms, the render in a tier 1 skill and the shared preamble, and the loadout pin.Checks run locally. At 15d80ac: 148 focused tests (ground rules, parity, context budget, size ledger, host config, size guards, catalog budget), 0 fail; typecheck clean. At b681106:
bun run typecheckclean; 1,023 tests across the parity suite, size guards, context budget, preamble compose and hoist, loadouts, launch-env ratchet, carve guards, generator, host config and conformance, agents digest and prose lint: 0 fail.Plan. Plan: exempt: Garry-approved safety guard (A1), no plan review
Paid coverage. Paid coverage of the preamble change is left to the release gate; no paid evals at PR tier
Review fixes. Pass 1 red-team findings p1/red-team#1 (the CI-wait bullet named the GraphQL-spending watcher) and p1/red-team#2 (the banned list missed
ps aux/-ef,set -x,git config -land an emptyexport $(...)) were fixed in 15d80ac. The release note was narrowed to skills that load the shared preamble in c204cca.Review notes.
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
scripts/resolvers/preamble/generate-ground-rules.ts:16The CI-wait rule names gstack-pr-wait by its bare name; a standard install does not put gstack's bin/ on PATH, so the host-resolved path (~/.claude/skills/gstack/bin/gstack-pr-wait, as land-and-deploy uses) would be more reliable.scripts/resolvers/preamble/generate-ground-rules.ts:16CI-wait rule names gstack-pr-wait bare; a standard install does not put gstack's bin/ on PATH (same as fix-check note).scripts/resolvers/preamble/generate-ground-rules.ts:16gstack-pr-wait blocks up to 60 minutes; the rule does not say to run it in the background or with a --timeout sized to the host shell limit, so a foreground run gets killed and rerun.changelog.d/never-print-secrets-shared-rule.md:1Changelog says every skill on every host; seven skills with no shared preamble (careful, cso, deslop-shared-libs, freeze, gstack-upgrade, guard, unfreeze) do not carry Ground Rules.Agent notes