Load the never-print-secrets rule in every skill on every host, with the commands it missed (GST-2753) (#4382)

* Load the never-print-secrets rule in every skill on every host, with the commands it missed (GST-2753)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Point the shared CI-wait rule at gstack-pr-wait and name the missed secret-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>

* Say which skills carry the new rule in its release note

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>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-16 02:57:22 +00:00
1 parent fdf3f1e1b6
commit 28822af38c
114 files changed
+461 -107

No files matched your search

+2
View File
@@ -49,6 +49,7 @@ import { generateCompletenessSection } from './preamble/generate-completeness-se
import { generateConfusionProtocol } from './preamble/generate-confusion-protocol';
import { generateEvidenceDirective } from './preamble/generate-evidence-directive';
import { generateContextHealth } from './preamble/generate-context-health';
import { generateGroundRules } from './preamble/generate-ground-rules';
// Tier 3+ repo mode + search
import { generateRepoModeSection } from './preamble/generate-repo-mode-section';
@@ -108,6 +109,7 @@ export const PREAMBLE_PIECES: readonly PreamblePiece[] = [
{ id: 'question-tuning', minTier: 2, render: generateQuestionTuning },
{ id: 'repo-mode', minTier: 3, render: () => generateRepoModeSection() },
{ id: 'search-before-building', minTier: 3, render: generateSearchBeforeBuildingSection },
{ id: 'ground-rules', minTier: 1, render: generateGroundRules },
{ id: 'completion-status', minTier: 1, render: generateCompletionStatus },
];
@@ -0,0 +1,23 @@
import type { TemplateContext } from '../types';
/**
* Ground Rules: the few habits every skill on every host carries, at every
* tier. Tier 1 skills inline it; tier 2+ skills read it from the shared
* sections/preamble.md. Each rule is here because agents broke it in real
* runs, so keep each bullet to one habit and the block at or under
* GROUND_RULES_MAX_BYTES; test/ground-rules.test.ts pins that budget.
*/
export const GROUND_RULES_MAX_BYTES = 850;
export const GROUND_RULES_HEADING = '## Ground Rules';
export const GROUND_RULES_BULLETS = [
'Never print a whole environment, git config or process table; tokens ride in them. Banned: `env`, bare `printenv`, `set` or `export` (or an empty `export $(...)`), `export -p`/`-n`, `declare -p`/`-x`, `typeset -p`, `set -x`, `git config --list`/`-l`, any `ps` with full args (`aux`, `-ef`, `-o args`), `docker top ... args`, `docker inspect` Env. Read one value by name (`git config --get <name>`), check a variable with `[ -n "${NAME:-}" ] && echo set`, list processes by name or pid.',
'Wait on CI with one `gstack-pr-wait <n> --until green` call, never a poll loop or `gh pr checks --watch`.',
] as const;
export function generateGroundRules(_ctx?: TemplateContext): string {
return `${GROUND_RULES_HEADING}
${GROUND_RULES_BULLETS.map(bullet => `- ${bullet}`).join('\n')}`;
}