Model-Based Agentic Software Engineering

Front Matter
  1. The MAGE Method at a Glance
  2. The Book's Language
  3. Preface
  4. List of Figures and Tables
  5. How to read this book
  6. Acknowledgments
Part 1 — The Mindset
  1. 1The Printer
  2. 2MAGE by Example
  3. 3Loops and Models
  4. 4Why MAGE Follows from the Machine
  5. 5The Engineer's Seat
Part 2 — The Governed Engineering Environment
  1. 6The Agent Stack
  2. 7Models and the Semantic Gap
  3. 8The Governed Environment: Ex-Ante and Ex-Post
  4. 9Lifecycles and Runbooks
  5. 10Metrics
  6. 11When Guardrails Collide
Part 3 — The Model Zoo
  1. 12The Executable Zoo
  2. 13The Logical View
  3. 14The Process View
  4. 15The Development View
  5. 16The Physical View
  6. 17The Scenarios View
  7. 18The Scope of Modeling
  8. 19Keeping the Models in Sync with the Code — A Measurement
Part 4 — Putting It to Work
  1. 20Brownfield
  2. 21The Skills
  3. 22Everything Is a Transformation
  4. 23Training Data and the Novelty Axis
  5. 24Lessons Learned
  6. 25Validation with Agents
Part 5 — The Context
  1. 26The ADA Context
  2. 27The Timeline and the Work
  3. 28The Built System
  4. 29The Road to MAGE
Back Matter
  1. Toward a Theory of MAGE
  2. Implications for Software Engineering
  3. Conclusion
  4. About the Author
  5. Colophon: Dogfooding MAGE
Appendix A — MAGE Engineering Stacks
  1. AAppendix A — MAGE Engineering Stacks
  2. AAppendix A - 1. The provenance + fidelity stack
  3. AAppendix A - 2. The model-coherence stack
  4. AAppendix A - 3. The specification + verification stack
  5. AAppendix A - 4. The observe → react loop
  6. AAppendix A - 5. The resource-mediation stack
  7. AAppendix A - 6. The governance-of-governance stack
  8. AAppendix A - 7. The context-management stack
Appendix B — Flagship Mechanisms
  1. BAppendix B — Flagship Mechanisms
  2. BAppendix B - 1. Brief-linting
  3. BAppendix B - 2. Dynamic context injection
  4. BAppendix B - 3. Staged deploy gates (canary → smoke → promote)
  5. BAppendix B - 4. Resource-pressure gating (admit before, shed during)
  6. BAppendix B - 5. Test-serializer (N=1 flock on dotnet test)
  7. BAppendix B - 6. Agent registry (append-only log + marker cache)
  8. BAppendix B - 7. Lifecycle hooks (interpose on the agent runtime's events)
  9. BAppendix B - 8. Orchestrator-as-reactor over an event bus
  10. BAppendix B - 9. CLAUDE.md rule index (the governance document as a mechanism)
  11. BAppendix B - 10. Epic Definition-of-Done (Final-Opus trust-nothing re-run)
  12. BAppendix B - 11. Operational playbooks
  13. BAppendix B - 12. Self-governance (detect your own recurring issues; convert each into a tasteful control)
  14. BAppendix B - 13. Composed state-machine model (typed lifecycles + cross-machine invariants)
  15. BAppendix B - 14. Control↔substrate dependency (computed blast-radius)
  16. BAppendix B - 15. Coverage → model-node mapping (which invariants are actually tested)
  17. BAppendix B - 16. Drift & parity gates
  18. BAppendix B - 17. Executable source-of-truth models
  19. BAppendix B - 18. Formal invariant verification (temporal form → model checking)
  20. BAppendix B - 19. Governance graph (mechanism-interaction model)
  21. BAppendix B - 20. Meta-model consumption discipline (read, don't hardcode)
  22. BAppendix B - 21. Model-derived test-obligation census (derive what should be tested, lint the gap)
  23. BAppendix B - 22. Symbol-anchored traceability graph (derived edges)
  24. BAppendix B - 23. Synchronization model (meta-sync)
  25. BAppendix B - 24. PdfModel (sole PDF mutation surface)
  26. BAppendix B - 25. ContentValidator (input ⊆ output fidelity)
  27. BAppendix B - 26. Blocking semantic lints
  28. BAppendix B - 27. Fuzz campaigns (+ auto-coverage)
  29. BAppendix B - 28. Per-mutator attribution stamps
  30. BAppendix B - 29. Closed remediation-verb sets
Appendix C — Mechanism Catalog
  1. CAppendix C — Mechanism Catalog
Appendix D — Operator's Reference
  1. DAppendix D — Operator's Reference
  2. DAppendix D - 1. The Operator's Dashboard
  3. DAppendix D - 2. From Drifted Wiki to Trusted Model
Appendix E — How to Write a Skill
  1. EAppendix E — How to Write a Skill
  2. EAppendix E - 1. The recipe — three steps
Index
  1. Index (terms)
  2. Figures Gallery
  3. Bibliography
© James C. Davis, 2026–present