Plus 15,384 real Claude Code & Codex turns analyzed
Stop letting coding agents grade their own homework.
Plain-file guardrails for repositories where coding agents write the code: rules the agent reads, deterministic checks it cannot skip, and a GitHub merge boundary it cannot approve for itself.
Distilled from 200B+ tokens of multi-repo engineering and 15,384 real Claude Code & Codex turns — unified by 9 entities, 5 axioms, 9 standards, 6 standalone skills, and zero-install verification scripts.
01 · EMPIRICAL EVIDENCE
Why green tests still ship broken AI code
Every control traces to measured production failures with explicit denominators — never extrapolated across mixed datasets.
454 deduplicated issues (~100K LOC); top 4 causes = 84%
100+ fixes (~380K LOC); only 16% found proactively
Plus 15/15 → 0/15 gate drift & 0/33 accurate diagrams
454 Frontend Defects · Top 4 Root Causes (84%)
Scale Phase Transition & Context Cliff
02 · AGENTIC SDLC ONTOLOGY
Five axioms that eliminate category errors
Agents rarely fail from missing prose steps; they fail by conflating session memory with code truth, single edits with coupled changes, or summaries with evidence.
-
A1
Reality Overrides Memory
Fresh
origin/main, real caller→constructor traces,STATUS.md, and live read-only probes override conversation memory and stale docs unconditionally. -
A2
Coupled Artifact Closure
Editing a primary node (code, API, schema) remains ontologically
PARTIALuntil coupled tests, contracts, docs, andSTATUS.mdsync — enforced byscripts/check-change-sync.py. -
A3
Non-Collapsing State Machine
NOT_RUN,UNKNOWN,RESULT_UNKNOWN,CONFLICT, andERRORare first-class states; never collapse them into booleantrueor fake defaults (?? 0,|| []). -
A4
Producer / Judge Separation
The actor producing a patch never certifies its own gate changes. Protected GitHub Rulesets and independent mechanism review hold final merge authority.
-
A5
Asymmetric Knowledge Evolution
Incidents graduate into failing negative tests and deterministic gates. Automated learning may only tighten constraints — never auto-expand permissions or remove approvals.
03 · 10-SECOND VERIFICATION
Verify it against your own repository
Pure Python 3.11+ standard library, strictly read-only, zero pip install. Run one command and inspect real findings in your own codebase.
git clone https://github.com/OpenAgenticSecurity/agentic-sdlc.git
# 1. Audit local repo in <1s (Python/JS/TS/Go/Rust/Java + CI Action SHA pins):
python3 agentic-sdlc/scripts/audit-repo.py /path/to/your-repo
# 2. Also inspect live GitHub Branch Rulesets read-only (requires `gh` CLI):
python3 agentic-sdlc/scripts/audit-repo.py /path/to/your-repo --github
# 3. Run the 21-case deterministic trust-boundary evals offline (17/17 traps, 0 false positives):
python3 -S agentic-sdlc/scripts/run-evals.py
FAIL OAS-AGT-01 Hidden/deceptive Unicode detected in AGENTS.md:4 (U+202E)
FAIL OAS-CI-01 Unpinned GitHub Actions (.github/workflows/ci.yml:7 — actions/checkout@v4)
FAIL OAS-CI-05 GitHub Actions prompt/script injection (.github/workflows/ai.yml:14 — github.event.pull_request.title)
FAIL OAS-GH-02 AI agent can push new commits after human approval (require_last_push_approval=false)
FAIL OAS-GH-03 Required status check source is unbound (integration_id: null — spoofable)
# Enforce PR-diff anti-reward-hacking, non-self-attestation banner & coupled sync:
python3 -S agentic-sdlc/scripts/audit-pr-diff.py \
--repo /path/to/your-repo \
--base origin/main --head HEAD
# Or run standalone coupled-change sync with an explicit auditable waiver:
python3 -S agentic-sdlc/scripts/check-change-sync.py \
--config agentic-sdlc/profiles/L1-team/agentic-sync.example.json \
--repo /path/to/your-repo \
--base origin/main --head HEAD \
--waiver "SYNC-TESTS: pure comment refactor verified by existing suite"
# Claude Code 2.1.275+ native one-step plugin install:
/plugin install agentic-sdlc --marketplace OpenAgenticSecurity/agentic-sdlc
# Cross-agent CLI (Claude Code / Cursor / Codex):
npx skills add OpenAgenticSecurity/agentic-sdlc
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: OpenAgenticSecurity candidate self-audit & PR referee
uses: OpenAgenticSecurity/agentic-sdlc@<40-char-commit-sha> # v0.4.0
with:
target: .
fail-on-findings: "true"
# Preview first (--dry-run writes nothing):
bash agentic-sdlc/scripts/bootstrap.sh --profile L0 --target /path/to/your-repo --dry-run
# Apply L1 team baseline (--ci python | node-ts | rust | go | java):
bash agentic-sdlc/scripts/bootstrap.sh --profile L1 --ci python --target /path/to/your-repo --with-skills
# Install reversible local Git hooks blocking direct commits/pushes on main:
python3 agentic-sdlc/scripts/workspace-git.py guardrails --apply
04 · WORKFLOW INTEGRATION
Five hook points — keep your existing tools
Keep Claude Code, Cursor, Codex, and superpowers for inner-loop coding. Attach deterministic guardrails only at the five handoffs where AI workflows fail.
Pick Up Task
Read unified root AGENTS.md + STATUS.md, branch in a fresh worktree, and block direct commits on main with workspace-git.py.
Plan & Code
Enforce non-trivial task gates (>3 files / >50 lines), secure-vibe-coding, and pre-coding reliability & performance invariants.
Before "Done"
Run check-change-sync.py, done-claim-verify, and audit-pr-diff — emit a DoneClaim with explicit does_not_prove[].
Open PR & CI
Run SHA-pinned fail-closed CI (Python/TS/Rust/Go/Java) + 4-line action.yml; cite OAS-* Rule IDs in review.
Merge & Launch
Enforce non-self-attesting GitHub Rulesets + CODEOWNERS, and run 5-dimension audit-production-readiness (H1/H2).
05 · SIX STANDALONE SKILLS & NINE STANDARDS
Language-agnostic guardrails, loaded on demand
Skills encode security, reliability, audit, and Git invariants — never formatting or language style rules. Every skill explicitly declares itself non-authoritative.
bootstrap-agentic-sdlc
Inspects your real stack and safely scaffolds unified AGENTS.md, thin @AGENTS.md CLAUDE.md, STATUS.md, PR templates, and fail-closed CI.
secure-vibe-coding
Enforces fail-closed auth/tenant scope, safe sinks, SSRF 169.254.169.254 defense, default-mutating tool manifests, read-only exfiltration blocks, and negative tests.
audit-pr-diff
Audits diffs with file:line grounding across Seven Sins, security red lines, 454-bug frontend traps, 8-class backend perf traps, and mechanism review.
audit-production-readiness
Full-repo 5-dimension audit enforcing 7 evidence disciplines, 3-layer defaults, data liveness, pre-release safety, asymmetric self-learning, and an H1 vs H2 verdict.
done-claim-verify
Refuses bare "done": true claims; preserves non-green states, dereferences 4 fake-done breakpoints, checks coupled sync, and requires does_not_prove[].
multi-agent-git-flow
Coordinates parallel agents via fresh remote baselines, isolated worktrees, Managed Issue Claims, cross-session handoffs, anti-stacked-PR rules, and safe cleanup.
Markdown rules and Skills are ergonomic projections — never merge authority. PR-controlled CI and local audits remain candidate/advisory; payments, auth, runtime semantics, and P99 load still require real integration tests, protected GitHub Rulesets, and human engineering judgment.