defense-in-depth
AGENTS.md4 starsChanged 7 months agoMITView on GitHub
This is the inner AGENTS.md for the .agents/ directory. Root AGENTS.md defines project identity. This file defines the governance ecosystem. When an AI agent enters this project for the first time, it MUST use the Bootstrap Agent Skill which guides through 5 phases: [!CAUTION] Do NOT skip the bootstrap chain. Agents that skip directly to coding will violate consistency rules and have their PRs rejected.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 32,671 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skill-ai-dspy-validatorSkill
- Bootstrap AgentSkill
- CreatorSkill
- Deep ResearchSkill
- skill-devops-github-actionsSkill
- skill-guard-governanceSkill
- skill-impact-predictorSkill
- skill-review-codeSkill
- Self ReflectionSkill
- skill-surgical-refactorerSkill
- skill-test-architectSkill
- skill-threat-modeling-expertSkill
- [Skill Name]Skill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 14
When an AI agent enters this project for the first time, it MUST use the Bootstrap Agent Skill which guides through 5 phases:
- Very specific: line 130
Every file under .agents/ follows this format:
≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md 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
.agents/ — Governance Ecosystem
This is the inner AGENTS.md for the
.agents/directory. RootAGENTS.mddefines project identity. This file defines the governance ecosystem.
Bootstrap Protocol (Agent Onboarding)
When an AI agent enters this project for the first time, it MUST use the Bootstrap Agent Skill which guides through 5 phases:
flowchart TD
A["🤖 Agent enters project"] --> P1["① IDENTIFY\nRead AGENTS.md, detect platform"]
P1 --> P2["② DISCOVER\nRead all 20 rules + COGNITIVE_TREE"]
P2 --> P3["③ SCAFFOLD\nCheck/create required artifacts"]
P3 --> P4["④ CONTRIBUTE\nLearn evidence tags, lesson schema"]
P4 --> P5["⑤ VERIFY\nRun defense-in-depth doctor"]
P5 -->|"Pass"| READY["✅ Ready to work"]
P5 -->|"Fail"| P3[!CAUTION] Do NOT skip the bootstrap chain. Agents that skip directly to coding will violate consistency rules and have their PRs rejected.
Ecosystem Map
.agents/
├── AGENTS.md ← YOU ARE HERE
├── philosophy/ # System mindset (1 total)
│ └── COGNITIVE_TREE.md (3 branches + HITL trunk)
├── rules/ # Immutable project standards (20 total)
│ ├── rule-consistency.md (project standards)
│ ├── rule-guard-lifecycle.md (guard maturity)
│ ├── rule-contribution-workflow.md (how to contribute)
│ ├── rule-evidence-tagging.md (proof mandate)
│ ├── rule-hitl-enforcement.md (supreme law)
│ ├── rule-lesson-quality.md (specificity gate)
│ ├── rule-zero-theater.md (substance mandate)
│ ├── rule-adaptive-language.md (language policy)
│ ├── rule-translation-glossary.md (canonical bilingual terms)
│ ├── rule-anti-yes-man.md (brainstorm mandate)
│ ├── rule-agent-workspace.md (workspace zones)
│ ├── rule-security-continuity.md (fortress mandate)
│ ├── rule-git-governance.md (version control)
│ ├── rule-coderabbit-integration.md (PR review bot contract)
│ ├── rule-living-document.md (anti-staleness)
│ ├── rule-cross-platform.md (OS compatibility)
│ ├── rule-context-discipline.md (context hygiene)
│ ├── rule-document-budget.md (doc size limits)
│ ├── rule-flowchart-mandate.md (visual compliance)
│ └── rule-file-type-contract.md (format selection)
├── workflows/ # Operational procedures (2 total)
│ ├── procedure-task-execution.md (task lifecycle)
│ └── procedure-multi-agent-coordination.md (cross-agent handoffs)
├── skills/ # Agent capabilities (13 total + meta)
│ ├── AGENTS.md (skill-index router for agents)
│ ├── SKILL_STANDARDS.md (frontmatter + structure contract)
│ ├── skill-bootstrap-agent/
│ │ └── SKILL.md (5-phase onboarding wizard)
│ ├── skill-creator/
│ │ └── SKILL.md (scaffold skills/rules/workflows)
│ ├── skill-self-reflection/
│ │ └── SKILL.md (growth engine — 5-phase reflection)
│ ├── skill-deep-research/
│ │ └── SKILL.md (research pipeline with cross-check)
│ ├── skill-impact-predictor/
│ │ └── SKILL.md (pre-implementation blast-radius analysis)
│ ├── skill-review-code/
│ │ └── SKILL.md (PR-level governance review)
│ ├── skill-threat-modeling-expert/
│ │ └── SKILL.md (adversary-first threat coverage)
│ ├── skill-guard-governance/
│ │ └── SKILL.md (canonical guard design / impl / register)
│ ├── skill-surgical-refactorer/
│ │ └── SKILL.md (minimum-blast guard refactors)
│ ├── skill-test-architect/
│ │ └── SKILL.md (adversarial test-suite design)
│ ├── skill-ai-dspy-validator/
│ │ └── SKILL.md (DSPy integration quality / WARN-not-BLOCK)
│ ├── skill-devops-github-actions/
│ │ └── SKILL.md (CI/CD workflow authoring)
│ └── _template/
│ └── SKILL.md
├── config/ # Machine-readable configs (1 total)
│ └── guards.yml
└── contracts/ # Interface contracts (2 total)
├── guard-interface.md (Guard / Provider contract)
└── jules.md (Jules async-builder contract)Philosophy: Human-in-the-Loop (HITL)
defense-in-depth is a middleware layer that bridges AI agents into human operational processes.
The Division of Labor
| Responsibility | Owner | Why |
| Artifact collection | 🤖 AI Agent | Repetitive, token-efficient |
| Execution plans | 🤖 AI Agent | Structured, verifiable |
| Code generation | 🤖 AI Agent | Fast, iterative |
| Business logic decisions | 👨💼 Human | Context, judgment, domain expertise |
| Ground truth validation | 👨💼 Human | Only humans know what "correct" means |
| Architecture direction | 👨💼 Human | Strategic, long-term vision |
The Supreme Rule
HITL is non-negotiable. defense-in-depth reduces the noise so humans can focus on what matters:
- Guards handle mechanical checks (hollow artifacts, commit format)
- Humans handle semantic checks (is this the RIGHT solution?)
- The system never auto-merges without meeting configurable criteria
File Consistency Standards
Every file under .agents/ follows this format:
---
id: RULE-EXAMPLE # Unique identifier
status: active # active | deprecated | draft
version: 1.0.0 # Semantic version
enforcement: deterministic # deterministic | advisory
---
# Title
> Description
## Content...No exceptions. This enables lazy-loading discovery by any agent on any platform.
Discovery Convention
Agents discover capabilities by convention, not by configuration:
| Pattern | Meaning |
.agents/rules/rule-*.md | Immutable rules (always load) |
.agents/workflows/procedure-*.md | Operational procedures (load on demand) |
.agents/skills/*/SKILL.md | Agent capabilities (lazy load) |
.agents/config/*.yml | Machine-readable configs |
.agents/contracts/*.md | Interface contracts |
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.

