Loop Engineering

A Better Way to Think, Create, and Work with AI - Companion site

← All chapters

Chapter 6 - Layer 2a: Working Memory and the Scaffolding Loop

Last updated 2026-07-13. Explore the seven design commitments, the NOTES.md externalized-scratchpad pattern, and the loopmaxxing failure mode that appears when the discipline degrades.

Companion activity

Open the working-memory worked example or NOTES.md template, then draft a scratchpad contract for one multi-iteration task.

What this chapter argues

Working memory in the brain is small, fast, and lossy. Working memory in the AI partner is the model's context window - also small, fast, and lossy. The scaffolding loop is the discipline that extends usable working memory across that limit: an externalized scratchpad (NOTES.md), seven operational commitments that make the loop verifiable, and a cadence that prevents thrash. Without the scaffolding loop the AI hits its context limit and either silently drops earlier context or starts to confabulate. With it, sessions hours longer than the raw window become reliable.

Key sources

Chapter 6 cites in the print book: D8, D9, D24, D25, D30, D32, D33, D34, D57, D58, D60. Entries below are the sources this page draws on; some are related literature cited elsewhere in the book rather than in this chapter.

Primary-source links

Chapter contents

Related resources

The seven-commitments deep treatment on the companion site goes further into each commitment's failure mode and four-practice mapping. A working-memory worked example with a full NOTES.md trace and per-iteration state captures lives in the worked-examples section.

Practitioner prompts: the working-memory prompts page hosts the NOTES.md template, the scaffolding-loop contract, and the verifiable-stop checklist as copy-paste-ready text.