Configuration management for AI-assisted software work.
pip install nuclear-grade Copy PIP instructions
A simple, evidence-first way to let AI do serious software work and stay in control of what ships.
Your AI agent wrote the code, the tests, and the PR description. Who checked?
A small, dependency-free toolkit that keeps agent work questioned, controlled, and reviewable:
Borrows high-consequence engineering discipline, not its regulations (limits).
sim sends a simulated tool call through hooks/pre_tool_use.py; no agent runs. Recording: docs/assets/demo/demo.tape; a test replays its commands. Re-render with vhs docs/assets/demo/demo.tape.
See it work · Quick start · The one idea · The skills · Adopt at your pace · Keep the approved version · Common way vs. nuclear-grade · Does it work? · Limits · Project
A finished change record for a change that should make you nervous: letting an agent write files and call external APIs. Passing tests for the narrow claim, named gaps for the rest, and an honest note that its evidence path is mostly coupled to one AI-assisted maintainer. Standard library only; needs git and Python 3.11+.
git clone https://github.com/FlyFission/nuclear-grade-context-engineering cd nuclear-grade-context-engineering python tools/ng.py validate docs/03-worked-examples/ai-agent-tool-permissions/.nuclear/changes/add-agent-tool-permissions --strict-custody # OK: the record links claims to evidence and discloses custody/coupling (or a named gap). python -m pytest docs/03-worked-examples/ai-agent-tool-permissions/tests/test_workspace_guard.py -v # needs pytest # 4 passed: every write outside the agent's workspace was denied and logged. echo '{"tool_name":"Write","tool_input":{"file_path":".github/workflows/ci.yml"},"cwd":"'"$PWD"'"}' | python hooks/pre_tool_use.py # {"hookSpecificOutput": {... "permissionDecision": "deny", ... "protected trust surface (.github/workflows/**)" ...}} python tools/ng.py validate docs/03-worked-examples/ai-agent-tool-permissions/.nuclear/changes/add-agent-tool-permissions --json # "ok": true, "evidence_statuses": {"pass": 5, "deferred": 2, ...}, "open_evidence_items": 2, "inputs": {"digest": "..."} Copy that example as your template; QUICKSTART.md is the guided tour. It is a teaching example, not a production guarantee.
Test your own agent: challenge/ is a 15-minute game. A routine request quietly widens a toy agent's authority; score.py checks whether your agent recorded it, named what is unproven, and left the release to a human. One seeded trap, not a safety rating.
Claude Code (the repo is its own plugin marketplace):
/plugin marketplace add FlyFission/nuclear-grade-context-engineering /plugin install nuclear-grade@nuclear-grade # skills and command cards /plugin install nuclear-grade-guard@nuclear-grade # optional: the guard /reload-plugins The main plugin adds the skills and command cards: no hooks, nothing runs on its own, and no ng on your PATH; the CLI runs from a checkout. The optional guard is a separate plugin that stops the agent editing the files that judge it and asks before a tag, publish, or force-push (HOOKS.md).
Using an agent? Point it at AGENTS.md, the brief agents read first.
Repo map: docs/README.md. Live catalog: nuclear-grade.yaml; counts here are snapshots.
Go fast while exploring. Slow down the moment the work becomes a promise.
Throwaway ideas are cheap; let the agent try them. Rules tighten when work becomes a claim, a controlled file, a public statement, an approved version, a release, or a change to what the agent may do.
Every change walks one path. Zoomed out it is three moves, PRO: Plan · Run · Operate. With the gate named it is five, PROVE: Plan · Run · Observe · Verdict · Educate. The step you never fold away is Verdict, where a draft becomes a decision.
flowchart TB classDef plan fill:#DCE6FA,stroke:#3A5BA8,color:#12203F; classDef run fill:#E4DEF7,stroke:#5B49A6,color:#1E1640; classDef emb fill:#DCEFDE,stroke:#2E7D45,color:#102810; classDef gate fill:#FFD24D,stroke:#B07400,color:#3A2600,stroke-width:2px; subgraph LP["P — PLAN"] direction LR A1(["Question"]) --> A2(["Discover"]) --> A3(["Specify"]) --> A4(["Plan"]) end subgraph LRUN["R — RUN"] direction LR B1(["Execute"]) --> B2(["Verify"]) --> B3(["Review"]) --> B4{"Decide"} end subgraph LOPS["O — OPERATE"] direction LR C1(["Baseline"]) --> C2(["Operate"]) --> C3(["Learn"]) end A4 --> B1 B4 -->|"ship"| C1 B4 -.->|"block / defer"| A4 C3 -.->|"lessons feed the next basis"| A1 class A1,A2,A3,A4 plan class B1,B2,B3 run class B4 gate class C1,C2,C3 emb In text (for PyPI and other places SVGs do not render):
Question -> Discover -> Specify -> Plan -> Execute -> Verify -> Review -> Decide -> Baseline -> Operate -> Learn Each step stops one failure and leaves one artifact you can point at; a skipped step is a failure mode you chose to accept (WORKFLOWS.md). Under the path sit optional habits from high-reliability work, HPI for AI agents (Human Performance Improvement): brief before a risky step, double-check critical actions, hand off cleanly, get independent eyes when trust is on the line, learn from near misses.
Each skill is one job, with a trigger, a procedure, the record it leaves, and the decision it can block. A host shows the agent only each skill's name and one-line description; the full instructions load only when a skill is picked.
flowchart LR A[Auto-match on name + description] --> S R[Router: using-nuclear-grade] --> S C["Explicit /ng- command"] --> S S[Skill body loads] --> D[Decision contract] --> Rec[Record in .nuclear/changes/] --> G[ng validate + CI gate] --> T{Tier: block / warn / observe} T --> O[Proceed / stop / escalate to a human] How they fit together: the core path every change walks, and the heavier skills that switch on when the change calls for them (each arrow is labeled with its trigger):
All 31 by family, with a one-line "use when" for each: SKILLS.md. Which skills fire for which kind of change: CORE.md.
Which record does a change need? Both kinds live in .nuclear/changes/ /:
flowchart TD Start([Change request]) --> Q0{Purely administrative,
no new trust boundary?} Q0 -->|yes| Floor[Administrative floor
no packet — the commit message is the record] Q0 -->|no| Q1{Local, reversible,
no new trust boundary?} Q1 -->|yes| Quick[Quick packet
risk.md + proof.md] Q1 -->|no| Q2{User / data / dep /
permission / AI authority /
release consequence?} Q2 -->|yes| Standard[Standard packet
6 files] Q2 -->|severe, silent,
irreversible, external trust| Strong[Human-reviewed
stronger mode] Q2 -->|already went wrong| Incident[Incident pattern] Quick = risk.md + proof.md. Standard = risk.md, basis.md, plan.md, trace.md, verification.md, ship.md. Heavier patterns (high-consequence, incident, research-board, release) are written down; treat them as human-reviewed until your project has tested them.
Git, CI, and branch protection stay; this rides on top. A green pipeline says tests passed on a commit, not that someone weighed the leftover risk and chose to ship, or what would force a re-check. Nor do they cover what now drives an agent: prompts, model IDs, eval sets, AGENTS.md/CLAUDE.md, skills, and the agent's own permissions.
A baseline is the version everyone agreed is correct, plus the evidence behind it. Changes reach it only through evidence and a decision:
flowchart LR classDef item fill:#DCE6FA,stroke:#3A5BA8,color:#12203F; classDef gate fill:#FFD24D,stroke:#B07400,color:#3A2600,stroke-width:2px; classDef base fill:#DCEFDE,stroke:#2E7D45,color:#102810; CI["Controlled items
deps, docs, releases"]:::item --> CH["A change"] CH --> EV["Evidence
pass or gap, named"] EV --> DEC{"Decide
on purpose"}:::gate DEC -->|"ship"| BL["Saved baseline
the approved version"]:::base DEC -.->|"block / defer"| CH BL --> OP["Operate"] OP --> LE["Lessons learned"] LE -.->|"feed the next change"| CI Common way vs. nuclear-grade Common way Nuclear-grade Ask an agent, look at the diff, run the tests. Question assumptions, name what is controlled, check evidence, decide on purpose, record what you trust. PR text argues for a yes. A record links intent, what must not break, evidence, gaps, and the decision. The agent writes the code, the evidence, and the summary. Load-bearing evidence is reproducible by the reviewer or produced independently. Broad access, vague instructions. A role, what it may and may not do, what it must prove, and when to stop. Green tests = ship. A release record: evidence, leftover risk, rollback, what to watch, the decision. Lessons vanish into chat. Lessons change future plans, tests, monitors, and controls. Who it is for: teams whose agents write files, call APIs, touch credentials, or affect releases; reviewers who want evidence instead of a pitch. Works as plain markdown in any tool; native plugins for Claude Code and Codex (INTEGRATIONS.md).
Not a compliance program, certification, regulated quality-assurance system, safety analysis, production sandbox, regulatory submission, or legal advice, and no substitute for qualified engineering, legal, security, safety, or compliance review. Not an agent runtime, approval system, or observability platform either; it sits above those tools.
MIT licensed (LICENSE): you may use, copy, change, publish, distribute, sublicense, and sell copies under its terms. That permission is not a promise about quality. Using this repo does not create formal verification and validation, NQA-1 evidence, an NQA-1 record, compliance, certification, regulatory approval, or any safety, security, procurement, production, warranty, or support guarantee. It does not claim any system is safe, secure, compliant, approved, certified, or fit for regulated use. Named public sources are influences, not standards it claims to meet (source map).
Read before use: DISCLAIMER.md · compliance boundaries · do-not-cite-directly.
Discussions · Contributing · Governance · Security · Code of conduct · Support · Roadmap · Changelog · Maxims · Cite · Plain-concept crosswalk · PMBOK/PMI AI bridge
Why it exists. Complex systems rarely fail in one big step; they fail when authority outruns evidence, one reasonable shortcut at a time. AI agents are gaining that kind of authority over codebases. This ports the habits that keep high-consequence engineering honest (questioning attitude, configuration management, evidence before decisions) into a shape software teams can use at AI speed.
Written and maintained by Ben Huffer (@FlyFission): over a decade in the nuclear field; founder of FlyFission Consulting Group, an independent design-review and advisory practice for nuclear projects; builder of AscertAIn, an AI-powered engineering design-review platform. Field stories welcome in Discussions or on LinkedIn.
All 2 files in this release have provenance metadata.
ai-agents change-control claude-code code-review codex configuration-management context-engineering software-assurance
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




