wiki / concepts / five-debts-of-agentic-engineering
Five Debts of Agentic Engineering
Machine ingest — raw context
loading…
~… tokensappend .md to any wiki URL for this view
Five Debts of Agentic Engineering
When probabilistic code generation is accelerated without senior-engineering discipline, systems accumulate five structural debts. Because language models optimize for immediate syntax generation and local token completion, they naturally skip the invisible scaffolding that senior engineers apply.
flowchart TD
subgraph Generative Failures
A[Intent Debt] -->|Misaligned goals| S1[Grilling & Executable Specs]
B[Context Debt] -->|Vocabulary drift & bloat| S2[CONTEXT.md & ADRs]
C[Verification Debt] -->|Self-fulfilling tests| S3[Red-Green TDD at Seams]
D[Architecture Debt] -->|Spaghetti & shallow modules| S4[Deep Modules & Boundary Rules]
E[Authorization Risk] -->|Overeager scope creep| S5[Sandboxes & Path Allowlists]
end
subgraph Durable System Controls
S1 --> G[Releasable Patch Gate]
S2 --> G
S3 --> G
S4 --> G
S5 --> G
end
1. Intent Debt
- Symptom: The agent builds a syntactically correct solution that solves the wrong business problem or assumes unstated product requirements.
- Root Cause: Underspecified prompts contain multiple plausible implementation branches. Fast code generation makes exploring the wrong branch expensive sooner.
- Control Mechanism: grilling doctrine and formal specifications (
to-spec). Interrogate the decision frontier, explicitly document non-goals, and establish observable acceptance criteria before writing code.
2. Context Debt (Semantic Drift)
- Symptom: Token bloat, naming inconsistencies, and vocabulary mismatch across modules.
- Root Cause: Each prompt re-explains domain concepts using ad-hoc synonyms, degrading the model’s attention window (smart zone) and inducing context rot.
- Control Mechanism: context engineering via canonical
CONTEXT.md(ubiquitous language),CONTEXT-MAP.md, and Architectural Decision Records (ADRs).
3. Verification Debt
- Symptom: Passing test suites that fail in production, tautological mocks, or test suites modified/deleted by the agent to force green.
- Root Cause: Making the generator the sole author and judge of its own tests.
- Control Mechanism: red green tdd at public seams, agentic manual testing, and protected baseline regression suites that remain read-only to the agent.
4. Architecture & Comprehension Debt
- Symptom: Cosmetic modularity (shallow folders), high coupling, duplicated business logic, and incomprehensible changes.
- Root Cause: The model lacks a holistic architectural mental model and optimizes solely for the localized file diff.
- Control Mechanism: Enforcing clean architecture boundaries, the deletion test (deep modules hiding substantial behavior behind small interfaces), and mandatory human walkthroughs.
5. Authorization & Operational Risk
- Symptom: Overeager scope expansion—the agent modifies adjacent configs, deletes credentials, or executes destructive side-effects outside task scope.
- Root Cause: Generative models lack intrinsic operational boundaries; if an action seems correlated with “fixing” the symptom, the model executes it.
- Control Mechanism: agent containment and blast radius, least-privilege sandboxes, strict path allowlists, and immutable audit trails.
Related Concepts
- software engineering fundamentals for agents — The foundational engineering competencies required to prevent these debts.
- agentic code quality — The risk-conditioned T0–T5 verification architecture.
- agent harness engineering — Designing runtime infrastructure around the model.
- releasable patch rate — Measuring quality across all five dimensions at the release boundary.
- constraint layering — Allocating controls to the cheapest reliable layer.
Evidence — verified primary sources
| agentic-engineering-systems-evidence-report-2026 | local:/opt/data/cache/documents/doc_7d5c60122087_agentic-engineering-report.md | ingested 2026-08-27 sha256:a02a8dda4752… |
| addy-osmani-agent-skills-2026 | https://addyosmani.com/blog/agent-skills/ | ingested 2026-08-27 sha256:8b3508b787f0… |
| mattpocock-skills-repo-2026 | https://github.com/mattpocock/skills | ingested 2026-08-22 sha256:1a38fb49eb8e… |
Graph context
References (11)
Grilling Doctrineand formal specifications (to-spec). Interrogate the decision frontier, explicitly document non-goals, and establish observable acceptance cSmart Zone) and inducing context-rot.Context Engineeringvia canonical CONTEXT.md (ubiquitous language), CONTEXT-MAP.md, and Architectural Decision Records (ADRs).Red/Green TDDat public seams, agentic-manual-testing, and protected baseline regression suites that remain read-only to the agent.Clean Architectureboundaries, the deletion test (deep modules hiding substantial behavior behind small interfaces), and mandatory human walkthroughs.Agent Containment and Blast Radius, least-privilege sandboxes, strict path allowlists, and immutable audit trails.Software Engineering Fundamentals for AgentsThe foundational engineering competencies required to prevent these debts.Agentic Code QualityThe risk-conditioned T0–T5 verification architecture.Agent Harness EngineeringDesigning runtime infrastructure around the model.Releasable Patch RateMeasuring quality across all five dimensions at the release boundary.Constraint LayeringAllocating controls to the cheapest reliable layer. Referenced by (7)
Agentic Code Qualitygenerative debt modes and control mappingsAgentic Engineering Patternsgenerative debt modes prevented by these patternsConstraint LayeringStructural debts prevented by proper constraint layering.Deterministic Lint Gatesverification debt closed by mechanical gatesReleasable Patch RateDebt categories that reduce patch releasability.Software Engineering Fundamentals for AgentsThe structural failure modes of unguided agentic code.Andrew NgThe structural failure modes of unsteered probabilistic code generation.