decommission-gate
Skill1 starsChanged 3 months agoMITView on GitHub
The governed turn-off primitive — no legacy component is severed until its replacement has PROVEN independence and the old side is provably safe, recorded in an append-only operator-bound validation ledger the gate RE-DERIVES from live re-checks at turn-off time (fail-closed, waiver-blind). Drives scripts/foundry-decommission.py: validate-register (class-aware register, GENERATED gate_status), record (append-only ledger; refuses incomplete VALIDATED rows incl. the custody real-operation proof), gate-check (GO only on latest-VALIDATED + live reverify/old-safe re-checks under a forced waiver-blind phase; else NO-GO exit 1). Turn-off is structurally the LAST wave. Trigger: "decommission", "turn off the legacy", "is it safe to delete", "sever the old side", "/foundry:decommission-gate".
In this repository71 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- amendSkill
- auditSkill
- authorize-releaseSkill
- authorizeSkill
- certify-localSkill
- certify-stagingSkill
- coherence-checkSkill
- command-deckSkill
- contextSkill
- cut-releaseSkill
- dashboards-as-codeSkill
- data-tier-cutoverSkill
- deploy-statusSkill
- dispatchSkill
- doctorSkill
- drift-sweepSkill
- env-hygieneSkill
- extract-specSkill
- fleetSkill
- grounding-conformanceSkill
- id-applySkill
- id-architectSkill
- id-baselineSkill
- id-discoverSkill
- id-documentSkill
- id-driftSkill
- id-impactSkill
- id-implementSkill
- id-importSkill
- id-planSkill
- id-promoteSkill
- id-reviewSkill
- id-rollbackSkill
- id-simulateSkill
- id-syncSkill
- id-testSkill
- id-validateSkill
- id-verifySkill
- indexSkill
- infra-sandboxed-applySkill
- initSkill
- intakeSkill
- learn-captureSkill
- learn-distillSkill
- merge-when-greenSkill
- mode-autonomousSkill
- mode-interactiveSkill
- modeSkill
- post-upgradeSkill
- releaseSkill
- relockSkill
- report-citation-graphSkill
- reposSkill
- research-captureSkill
- research-firstSkill
- revertSkill
- sd-debugSkill
- sd-discoverSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
NOT on the allow-set — a dependency reached by an un-enumerated hostname cannot pass by omission.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
decommission-gate — build-and-validate first, turn-off last, GO re-derived live
Turn-off is the one irreversible, highest-blast-radius action of a migration. This skill governs it
with three machine-checkable stages driven through scripts/foundry-decommission.py. The gate
consumes a recorded design principle: a persisted "validated" flag alone NEVER authorizes a sever —
GO is re-derived from live re-checks at the moment of turn-off.
The register (one YAML, class-aware, generated status)
- Enumerate every in-scope component in
decommission-register.yaml: stableid, thelegacy_identitybeing turned off, thereplacementand how it is reached, aclass, aparallel_name, acustodyflag, asoak_window, per-componentchecks.reverify/checks.old_safeslot commands (read-only by contract), and a generatedgate_status— derived from the ledger byvalidate-register --regen, NEVER hand-edited (a hand edit that disagrees with the ledger fails validation closed). - Class semantics decide the old-side safety question (they are OPPOSITES, not variants):
- endpoint-bearing (inbound) — safe when ZERO consumers remain over the soak window (flow logs to the old interface / load-balancer request+connection counts == 0).
- headless (outbound worker: signer, poller, listener) — the hazard is DUAL-OPERATION (double-spend, conflicting signatures, duplicated side effects), so safe means the old instance is QUIESCED: stopped + confirmed down AND no new outbound activity.
- decommission-only (no replacement) — zero-traffic corroboration of the dead claim, so a live component cannot be hand-downgraded to "dead" to skip the gate.
The independence policy (positive-leaning — no pass-by-omission)
The policy template denies on any known legacy marker AND denies any host-like endpoint ref NOT on the allow-set — a dependency reached by an un-enumerated hostname cannot pass by omission. Evaluate it over the component's EFFECTIVE rendered config (the
checks.reverifyslot renders — e.g.helm templateoutput + IaC source literals — and evaluates; a render error is FATAL, never skipped):package decommission.independence # deny: any configured legacy marker (substrings/regexes from allow-deny.yaml) deny contains msg if { some m in input.legacy_markers contains(input.effective_config, m) msg := sprintf("legacy marker %q present", [m]) } # deny: any host-like ref NOT matched by the allow-set (positive-leaning — no pass-by-omission) deny contains msg if { some h in input.endpoint_refs not allowed_host(h) msg := sprintf("endpoint %q not on the allow-set", [h]) } allowed_host(h) if { some a in input.allow_hosts; glob.match(a, [], h) }- Two phases:
validate(scoped, EXPIRING waivers honoured) andreverify(waiver-blind — a temporary migration-window waiver can never authorize a permanent turn-off). The gate FORCESDECOM_PHASE=reverifyinto the slot environment, so a validate-only pass is structurally NO-GO. - The typed slot-verdict contract the gate enforces (the two hardening floors that proved
load-bearing): the reverify slot must emit
{"verdict":"pass","canary_denied":true,"refs_scanned":N}— canary_denied must be true (the policy was run on a known-dirty input and DENIED it, so a vacuous conftest pass on a load error can never read as "independent"), and refs_scanned must be > 0 for an endpoint-bearing/ headless component (zero host-like refs is a fail-closed setup error, never a silent PASS).
The ledger + the gate (the only authorization path)
recordappends the single authorization event tovalidation-ledger.jsonl— bound to a REGISTERED operator (the existing operator registry; no invented dual-control), verdictVALIDATED/REJECTED(retained as evidence) /TURNED_OFF(the sever write-back), with an operator-supplied--timestamp. The tool refuses an incomplete VALIDATED row: independence pass + old-safe evidence per class, and forcustody: truecomponents a real-operation proof it will not let you omit.gate-checkreturns GO only when the latest row is a completeVALIDATEDAND the live re-checks still hold (waiver-blind reverify + old-safe + custody proof). Anything else — no row, a REJECTED latest, a failing or missing re-check, a register inconsistency — is NO-GO, exit 1, fail-closed. Wire a sever atom's merge/execute step to this exit code.- Turn-off is structurally the LAST wave: build-and-validate atoms for every component precede the program's single teardown wave, and the parallel-run endpoint stays live until then — the rollback for a bad sever is trivially "drop the parallel name; the old side never stopped".
Anti-patterns
- Severing on a spreadsheet / chat-thread "is it safe?" — only a
gate-checkGO authorizes. - Trusting the persisted validation at turn-off time — config drifts, consumers appear, waivers outlive their purpose; the gate re-derives live.
- Ingress-only thinking for headless workers — quiesce-first, or old and new dual-operate.
- An allow-by-default independence policy — deny anything not enumerated; omission is not independence.
- Turn-off interleaved with build waves — it is the last wave, once, with the ledger green.
- On a harness denial of a
recordorgate-checkinvocation, seedocs/harness-denial-fallback.mdand STOP: hand back the exact denied command; never retry it or route around it via another credential.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

