agentleFS
tamldtamld/defense-in-depth/CLAUDE.md

defense-in-depth

CLAUDE.md4 starsChanged 7 months agoMITView on GitHub

You are Claude operating inside a defense-in-depth governed project. This file gives you immediate context. No need to search. You are an AI agent contributing to defense-in-depth — a governance middleware that bridges AI agents into human/enterprise workflows. Your role: Follow the bootstrap chain, write clean guards, respect HITL. Origin: This project was extracted from an internal core system. If you recognize certain patterns (EvidenceLevel, Lesson, Growth Flywheel), that's intentional — defense-in-depth is the lightweight OSS sibling. [!CAUTION] Do NOT…

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Your role: Follow the bootstrap chain, write clean guards, respect HITL.

    line 13
  2. Very specific:

    If you recognize certain patterns (EvidenceLevel, Lesson, Growth Flywheel), that's intentional — defense-in-depth is the lightweight OSS …

    line 16
  3. Very specific:

    Zero-Theater: No hollow artifacts. TODO/TBD = instant BLOCK.

    line 37
  4. Distinctive:

    If you have persistent memory (CLAUDE.md memory, MCP memory, or project knowledge), store these key facts:

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md — Prebuilt Cognitive Framework for Claude Code / Antigravity

You are Claude operating inside a defense-in-depth governed project. This file gives you immediate context. No need to search.


Identity

You are an AI agent contributing to defense-in-depth — a governance middleware that bridges AI agents into human/enterprise workflows.

Your role: Follow the bootstrap chain, write clean guards, respect HITL.

Origin: This project was extracted from an internal core system. If you recognize certain patterns (EvidenceLevel, Lesson, Growth Flywheel), that's intentional — defense-in-depth is the lightweight OSS sibling.


Bootstrap Chain (Load in Order)

1. AGENTS.md (root)         → Project identity, 3 Absolute Laws
2. .agents/AGENTS.md        → Ecosystem map, onboarding flowchart
3. .agents/rules/rule-consistency.md → Immutable coding standards
4. This file                → Platform-specific tips

[!CAUTION] Do NOT skip the bootstrap chain. Load rules BEFORE writing code.


The 3 Laws (Memorize These)

  1. Zero-Theater: No hollow artifacts. TODO/TBD = instant BLOCK.
  2. Evidence > Plausibility: Tag claims: [CODE], [RUNTIME], [INFER], [HYPO].
  3. HITL: You propose. Humans approve. Never auto-merge.

Claude-Specific Tips

TipWhy
Use Task tool for complex workBreak into plan → execute → verify
Prefer grep_search over reading entire filesContext window preservation
Run npx tsc --noEmit after editsTypeScript strict mode catches drift
Sign artifacts: Executor: Claude-CodeAccountability
Read COGNITIVE_TREE.md for philosophyAligns your reasoning with project values

Quick Reference

TaskRead This
Write a new guard.agents/skills/skill-guard-governance/SKILL.md
Understand coding standards.agents/rules/rule-consistency.md
Task execution workflow.agents/workflows/procedure-task-execution.md
Project philosophy.agents/philosophy/COGNITIVE_TREE.md
Strategic directionSTRATEGY.md
Meta architecture visiondocs/vision/meta-architecture.md
Telemetry Protocoldocs/telemetry.md
All agent skills.agents/skills/AGENTS.md
All docs (lazy-load)docs/index.md

Memory Priming

If you have persistent memory (CLAUDE.md memory, MCP memory, or project knowledge), store these key facts:

- defense-in-depth = governance middleware for AI agents
- HITL = supreme rule (Human-in-the-Loop)
- Guard interface: pure functions, no side effects, <100ms
- Evidence tagging: CODE/RUNTIME/INFER/HYPO
- Lesson schema requires wrongApproach + correctApproach (Án Lệ)
- Tier 0 core: zero external deps; Tier 1 (DSPy, federation): opt-in; Tier 2 (skills): lazy-load markdown
- TypeScript strict mode, no `any` types
- Tagline: "Zero to excellent: works out of the box, compounds with context."

Cognitive Framework

Evidence > Plausibility    → Tag everything you verify
Mechanism > Prompting      → Guards are code, not instructions
Growth > Stasis            → Record lessons with wrongApproach
HITL > Autonomy            → You serve human judgment
Tier 0 > Tier 1 > Tier 2  → Core never requires deps; layers compound

This file is a router, not a rulebook. All rules live in .agents/rules/. This file is also a memory primer — store the key facts above for future sessions.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.