Defense In DepthSAFE
High-performance AI coding agent CLI written in Rust with zero unsafe code
Overview
High-performance AI coding agent CLI written in Rust with zero unsafe code
46a2537504c9OBSERVED · 2026-10-10What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: defense-in-depth
description: Multi-layer validation to catch bugs before they escape
version: 1.0.0
author: Ariff
when_to_use: When making changes - validate at multiple layers
---
# Defense in Depth
## Philosophy
```
MULTIPLE INDEPENDENT VALIDATION LAYERS
Each layer catches what others miss
```
One check can fail silently. Four layers rarely do.
## The Four Layers
### Layer 1: Type/Syntax
```
What: Static analysis, types, linting
Catches: Typos, syntax errors, type mismatches
Run: First, before anything else
```
### Layer 2: Unit Tests
```
What: Individual function/module tests
Catches: Logic errors, edge cases, regressions
Run: After each code change
```
### Layer 3: Integration Tests
```
What: Component interaction tests
Catches: Interface mismatches, data flow errors
Run: After unit tests pass
```
### Layer 4: End-to-End
```
What: Full system tests, user scenarios
Catches: Missing requirements, workflow bugs
Run: Before claiming complete
```
## The Pipeline
```
Code Change
↓
[Layer 1: Lint/Type Check]
↓ PASS?
[Layer 2: Unit Tests]
↓ PASS?
[Layer 3: Integration Tests]
↓ PASS?
[Layer 4: E2E / Manual Check]
↓ PASS?
Done
```
**Fail at any layer → FIX before proceeding**
## Why Every Layer Matters
| Without This Layer | What Escapes |
|-------------------|--------------|
| No type checks | Undefined calls crash at runtime |
| No unit tests | Logic bugs slip through |
| No integration | Components don't work together |
| No E2E | User workflows broken |
## Implementation Patterns
### For Code Changes
```
1. Make change
2. Run linter immediately
3. Run affected unit tests
4. Run integration suite
5. Test the actual feature
```
### For Bug Fixes
```
1. Write failing test first
2. Fix the bug
3. Run all tests (regression check)
4. Verify original symptom gone
```
### For New Features
```
1. Write unit tests for new logic
2. Implement feature
3. Add integration tests
4. Verify against requirements
```
## Layer-Specific Commands
Configure per project:
```yaml
layer_1:
command: "npm run lint && npm run typecheck"
when: "On save, before commit"
layer_2:
command: "npm run test:unit"
when: "After code changes"
layer_3:
command: "npm run test:integration"
when: "After unit tests pass"
layer_4:
command: "npm run test:e2e"
when: "Before claiming done"
```
## Recovery Procedures
### Layer 1 Fails
```
→ Syntax/type error in your code
→ Fix immediately, don't proceed
→ Never commit with lint errors
```
### Layer 2 Fails
```
→ Logic error or regression
→ Check: Did you break something?
→ Check: Is your new test wrong?
→ Fix root cause, not symptoms
```
### Layer 3 Fails
```
→ Interface/contract broken
→ Check: API changes?
→ Check: State management issues?
→ May need to update multiple files
```
### Layer 4 Fails
```
→ User-visible problem
→ Trace back through layers
→ Ask: Which layer SHOULD have caught this?
→ Add test to that layer
```
## Integration with Checker Agents
- `pre-action-verifier` → Runs before each layer
- `assumption-checker` → Validates test assumptions
- `scope-boundary-checker` → Ensures tests cover scope
- `rollback-planner` → Ready if pipeline failsTrust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (1)
.beads/beads.jsonl
Gates applied: no_behavioural_pass.
46a2537504c9full audit observations/trust-audit/skill/dicklesworthstone__defense-in-depth.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | 46a2537504c9 | SAFE | B | 89 | first audit |
Questions
What does the Defense In Depth skill do?
High-performance AI coding agent CLI written in Rust with zero unsafe code
Is Defense In Depth safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Defense In Depth access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (46a2537504c9), read on 2026-10-10. The repository is watched, and a new audit runs when it changes — this is the first audit.