Skip to content

Commit 0f365df

Browse files
committed
docs: sync metadata; add self-test methodology; refresh README/architecture/glossary/anti-patterns
- README: bump counts (15->19 conduct, 9->12 engines, 14->21 codes, 4->8 recipes), add 'Pick the modules' selector, recipe table, resolved structural decisions section - docs/architecture: bump layer-table counts, add runbooks/ row, F15+ -> F22+ in stability commitments - docs/self-test: A/B fixture methodology + per-module inventory (0 of 19 shipped, honest) - glossary: add 7 new terms (Turn of Flip, Number of Flip, All-Add, DFA, Awareness code, Axes, BamlError) - anti-patterns: Conduct (recent additions) section with 6 cross-cutting items; F15+ -> F22+
1 parent b1f2461 commit 0f365df

5 files changed

Lines changed: 215 additions & 22 deletions

File tree

README.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,28 @@ The fixes for these are well-known to people who've shipped agents at scale. The
2626

2727
```
2828
agent-foundations/
29-
├── conduct/ ← 18 behavior modules: discipline, context, verification,
29+
├── conduct/ ← 19 behavior modules: discipline, context, verification,
3030
│ delegation, tool-use, formatting, skill-authoring,
3131
│ hooks, precedent, tier-sizing, web-fetch, failure-modes,
3232
│ doubt-engine, memory-hygiene, cost-accounting,
3333
│ refusal-and-recovery, latency-budgeting,
34-
│ eval-driven-self-improvement
34+
│ eval-driven-self-improvement, multi-turn-negotiation
3535
├── engines/ ← 12 algorithmic primitives: Aho-Corasick, Shannon entropy,
3636
│ Beta-Bernoulli, Markov drift, Hunt-Szymanski LCS,
3737
│ Zhang-Shasha tree edit, Tarjan SCC, Wald SPRT,
3838
│ Jaccard-Cosine boundary segmentation, LLM Bandit,
3939
│ Agentproof, Calibration
40-
├── taxonomy/ ← 21 named failure codes (F01–F21), one doc per code,
41-
with signature, counter, examples, escalation,
42-
plus multi-agent and alignment-failure clusters
40+
├── taxonomy/ ← 21 named failure codes (F01–F21) + axes.md (5-axis
41+
hybrid mapping: memory / reflection / planning /
42+
action / system) — flat for ops, axes for review
4343
├── runbooks/ ← 21 incident-response runbooks (one per F-code) with
4444
│ Detect / Triage / Rollback / Post-incident steps
45-
├── recipes/ ← Adoption guides for Claude Code, OpenAI Agents SDK,
46-
│ Cursor, generic system prompt, and eval harnesses
45+
├── recipes/ ← Adoption guides for 8 hosts: Claude Code, OpenAI
46+
│ Agents SDK, Cursor, generic system prompt, LangChain,
47+
│ Pydantic-AI, BAML, plus an eval-harness reference
4748
├── docs/ ← Architecture overview + ADRs (0001 four-layers,
48-
│ 0002 taxonomy expansion + deferred 5-axis decision)
49+
│ 0002 taxonomy expansion — resolved via hybrid),
50+
│ plus self-test.md (A/B fixture methodology)
4951
├── glossary.md ← Unified terminology
5052
├── anti-patterns.md ← Cross-cutting catalog of what not to do
5153
└── CLAUDE.md ← Repo-level instructions for agents editing this repo
@@ -96,8 +98,10 @@ Don't load everything. Start with the failure mode you're seeing, pull only the
9698
| Latency unpredictable in long workflows | `latency-budgeting.md` |
9799
| Agent refuses benign requests / over-refuses | `refusal-and-recovery.md` |
98100
| Want to learn from observed failures | `eval-driven-self-improvement.md` + `precedent.md` |
101+
| User pressures across turns until you flip | `multi-turn-negotiation.md` + `doubt-engine.md` |
99102
| Doubt-engine F01-counter prose isn't measurable | `engines/calibration.md` |
100103
| Failure happened — need incident steps | `runbooks/F<NN>.md` |
104+
| Want to A/B-validate a module's impact | `docs/self-test.md` |
101105
| Evaluating agent conduct | `recipes/eval-harnesses.md` |
102106

103107
The **production starter pack** is `discipline.md` + `context.md` + `verification.md` + `failure-modes.md` — about 4k tokens, catches the long tail.
@@ -167,7 +171,7 @@ Full guide: [`recipes/system-prompt.md`](recipes/system-prompt.md).
167171

168172
### Behavior rules that survive long contexts
169173

170-
[`conduct/`](conduct/) ships fifteen modules. The lightest pull-in is just `discipline.md` (~700 tokens) — four stances (think-first, simplicity, surgical, goal-driven) that catch the majority of unsolicited refactors, premature actions, and over-helpful substitutions.
174+
[`conduct/`](conduct/) ships nineteen modules. The lightest pull-in is just `discipline.md` (~700 tokens) — four stances (think-first, simplicity, surgical, goal-driven) that catch the majority of unsolicited refactors, premature actions, and over-helpful substitutions.
171175

172176
A heavier pull-in adds `context.md` (U-curve placement, checkpoint protocol), `verification.md` (independent checks, dry-run for destructive ops), and `failure-modes.md` (the F-code taxonomy summary). That's the production starter pack.
173177

@@ -218,17 +222,22 @@ Free-text learning notes don't compound. Tagged ones do. [`taxonomy/`](taxonomy/
218222

219223
Tag every entry in your failure log with one code. Now you can aggregate. Now you can learn.
220224

221-
The multi-agent cluster (F15–F17) maps to the MAST taxonomy (arxiv 2503.13657); the alignment cluster (F18–F21) draws from Anthropic, OpenAI, and DeepMind safety research. F19 and F20 are awareness codes — log them if observed; the counter is red-team probes and blind capability evaluation, not runtime detection. See [`taxonomy/README.md`](taxonomy/README.md) § Structural note for the deferred Option A/B decision on flat-vs-modular taxonomy structure.
225+
The multi-agent cluster (F15–F17) maps to the MAST taxonomy (arxiv 2503.13657); the alignment cluster (F18–F21) draws from Anthropic, OpenAI, and DeepMind safety research. F19 and F20 are awareness codes — log them if observed; the counter is red-team probes and blind capability evaluation, not runtime detection.
226+
227+
A parallel **5-axis layer** lives at [`taxonomy/axes.md`](taxonomy/axes.md) — every F-code is mapped to one of memory / reflection / planning / action / system (per AgentErrorTaxonomy, arxiv 2509.25370). Use flat codes for grep-able logs, axes for structural pressure analysis. The hybrid is intentional and documented in [`docs/adr/0002-taxonomy-expansion.md`](docs/adr/0002-taxonomy-expansion.md).
222228

223229
### Adoption guides, not just docs
224230

225-
[`recipes/`](recipes/) gives you the wiring for the four most common host platforms plus an eval-harness reference. No hand-waving — concrete file paths, concrete config, a verification step you can actually run.
231+
[`recipes/`](recipes/) gives you the wiring for seven host platforms plus an eval-harness reference. No hand-waving — concrete file paths, concrete config, a verification step you can actually run.
226232

227233
| Recipe | What it covers |
228234
|--------|----------------|
229235
| [`claude-code.md`](recipes/claude-code.md) | `@`-imports, hook enforcement wiring, scope precedence |
230236
| [`openai-agents.md`](recipes/openai-agents.md) | Python SDK integration, `Agent.clone()`, guardrail patterns |
231237
| [`cursor.md`](recipes/cursor.md) | `.cursor/rules/` activation, scoped pull-ins |
238+
| [`langchain.md`](recipes/langchain.md) | Middleware list enforcement, LangGraph interrupts, propagation |
239+
| [`pydantic-ai.md`](recipes/pydantic-ai.md) | `Agent[Deps, Output]` generics, output validation, tool retries |
240+
| [`baml.md`](recipes/baml.md) | Function-shaped LLM calls, Jinja prompt blocks, `BamlError` |
232241
| [`system-prompt.md`](recipes/system-prompt.md) | Raw API / llama.cpp / Ollama wiring |
233242
| [`eval-harnesses.md`](recipes/eval-harnesses.md) | Benchmark suite reference: τ²-bench, AgentDojo, AgentHarm, SYCON-Bench, etc. |
234243

@@ -290,14 +299,17 @@ See [`docs/architecture/README.md`](docs/architecture/README.md) for the structu
290299

291300
---
292301

293-
## Open structural decisions
302+
## Resolved structural decisions
303+
304+
Two architectural questions that earlier versions of the framework deferred have now been resolved:
294305

295-
Two known architectural questions are deferred to community deliberation rather than decided unilaterally:
306+
- **Taxonomy structure (resolved 2026-05-05).** Flat F-codes (current) AND 5-axis modular structure (AgentErrorTaxonomy, arxiv 2509.25370) — both layers ship. Hybrid path: F01–F21 stays as the operational identifier; [`taxonomy/axes.md`](taxonomy/axes.md) maps each code to one of memory / reflection / planning / action / system. Documented in [`docs/adr/0002-taxonomy-expansion.md`](docs/adr/0002-taxonomy-expansion.md).
307+
- **F19/F20 placement (resolved 2026-05-05).** Awareness codes stay in main `taxonomy/` with explicit `(awareness)` flag at the index entry and at the top of each file. Adopters who don't need alignment-research codes can filter by tag rather than file path.
296308

297-
- **Taxonomy structure** — flat F-codes (current) vs. 5-axis modular structure proposed by AgentErrorTaxonomy (arxiv 2509.25370). Migrating is a breaking change. See [`taxonomy/README.md`](taxonomy/README.md) § Structural note.
298-
- **Awareness vs. operational codes** — F19 (alignment faking) and F20 (sandbagging) are alignment-research concepts. Some adopters will want them in main `taxonomy/`; some will want a separate annex. Currently included in main with explicit awareness flags.
309+
What remains genuinely external — and only adopters can close:
299310

300-
Open a tracking issue if you have a strong opinion. The framework grows by deliberation, not speculation.
311+
- **Self-test fixtures.** [`docs/self-test.md`](docs/self-test.md) ships the A/B fixture methodology; **0 of 19 modules** currently have shipped fixtures. The framework is honest about being best-effort guidance, not measured-impact rules. This is the highest-leverage open contribution path.
312+
- **Real-world adoption signal.** Until a downstream project reports on living with the conduct, every module is a hypothesis.
301313

302314
---
303315

anti-patterns.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ This is **not the source of truth** — each pattern's home module is. But when
109109
- **Logging the fix, not the failure.** ([failure-modes.md](conduct/failure-modes.md))
110110
- **Multiple codes on one entry** — pick the dominant one. ([failure-modes.md](conduct/failure-modes.md))
111111
- **Logging at verdict time only** — log hypothesis before, outcome after. ([failure-modes.md](conduct/failure-modes.md))
112-
- **"Couldn't find a matching code"** — propose a new one (F15+) in a PR. ([failure-modes.md](conduct/failure-modes.md))
112+
- **"Couldn't find a matching code"** — propose a new one (F22+) in a PR. ([failure-modes.md](conduct/failure-modes.md))
113113

114114
## Doubt engine
115115

@@ -130,6 +130,15 @@ This is **not the source of truth** — each pattern's home module is. But when
130130
- **Idle-only segmentation in boundary detection** — multi-signal exists for a reason. ([boundary-segmentation.md](engines/boundary-segmentation.md))
131131
- **Confusing simplified Wagner-Fischer with true Zhang-Shasha** — document which version you ship. ([tree-edit.md](engines/tree-edit.md))
132132

133+
## Conduct (recent additions)
134+
135+
- **All-Add as the default** — appending every observation to working memory without pruning, leading to self-degradation. ([memory-hygiene.md](conduct/memory-hygiene.md))
136+
- **Spawn cap omitted from delegation prompts** — no per-subagent or session-wide token cap; total cost grows unbounded. ([cost-accounting.md](conduct/cost-accounting.md))
137+
- **Speculative evals** — adding eval cases for hypothetical bugs that haven't been observed. ([eval-driven-self-improvement.md](conduct/eval-driven-self-improvement.md))
138+
- **Sycophantic capitulation across turns** — flipping stance under sustained user pressure without new evidence. ([multi-turn-negotiation.md](conduct/multi-turn-negotiation.md))
139+
- **Blanket topic refusals** — refusing benign requests adjacent to refused topics (false-refusal cycle). ([refusal-and-recovery.md](conduct/refusal-and-recovery.md))
140+
- **Treating latency as a cost proxy** — assuming token cost and wall-clock latency move together; they don't. ([latency-budgeting.md](conduct/latency-budgeting.md))
141+
133142
## How to use this doc
134143

135144
- Before submitting work: scan the section for the kind of task you just did.

docs/architecture/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ How the four moving parts of agent-foundations compose. Read once; reference whe
2323

2424
| Layer | Surface | Role |
2525
|-------|---------|------|
26-
| `conduct/` | 12 rule modules | What the agent should do or avoid |
27-
| `engines/` | 9 algorithm docs | What the agent should compute |
28-
| `taxonomy/` | 14 failure-code docs | How the agent names what went wrong |
29-
| `recipes/` | 4 host adoption guides | How a project picks up the framework |
26+
| `conduct/` | 19 rule modules | What the agent should do or avoid |
27+
| `engines/` | 12 algorithm docs | What the agent should compute |
28+
| `taxonomy/` | 21 failure-code docs (+ axes.md) | How the agent names what went wrong |
29+
| `recipes/` | 8 host adoption guides | How a project picks up the framework |
30+
| `runbooks/` | 21 incident-response runbooks | How to triage and recover per failure code |
3031

3132
`anti-patterns.md` and `glossary.md` cross-cut all four.
3233

@@ -86,7 +87,7 @@ Adjacent docs that *describe* the framework but aren't part of it (this file, `a
8687
## Stability commitments
8788

8889
- **Conduct module names** are stable. Renaming `discipline.md` would break every adopter's `CLAUDE.md`.
89-
- **Taxonomy F-codes** are append-only. F03 is always context-decay. F15+ is for new patterns; existing codes are not renumbered.
90+
- **Taxonomy F-codes** are append-only. F03 is always context-decay. F22+ is for new patterns; existing codes are not renumbered.
9091
- **Engine names** can be renamed if the algorithm name is wrong. Document the rename in an ADR.
9192
- **Recipe paths** are loose; recipes are the most volatile surface and may be split or merged as host platforms evolve.
9293

0 commit comments

Comments
 (0)