Agentic SDLC — Keep It Healthy: Anti-Patterns, Memory & Improvement Map
Keep It Healthy Map
KEEP IT HEALTHY
Anti-patterns, memory & continuous improvement for agent teams
Agentic SDLC · click a district, then a cluster, then 🔍 · each district ends with a bench
← Agentic SDLC meta-map ↗
THE CYCLE · START HERE A garden your agents tend Weeds grow on their own. Keeping it healthy is a cycle: notice → stop → remember → make impossible → rest. Click a district. NOTICE Anti-Patterns STOP Verification Gates REMEMBER Agent Memory MAKE IMPOSSIBLE Continuous Improvement SUSTAIN The Gardener VISUAL GRAMMAR anti-pattern / bad data check / gate / evidence memory / context improvement / human decision the human's wellbeing dashed = a gate or boundary 🔍 zoom in for a worked example GO DEEPER Agentic SDLC meta-map ↗ Agent memory deck ↗ Compression deck ↗ Complexity ladder deck ↗ Probabilistic thinking deck ↗ Class companion ↗ Sources: Agentic SDLC Workshops 5–7, The Long Game, Handling A Project-Driven Manic Episode. START HERE
IMMUNE SYSTEM · NOTICE IT Anti-Patterns metaphor: infections → symptoms → antibodies Agents pick up habits. Some are good and some are terrible, and the terrible ones look like success: green CI, a cheerful report. Learn the symptoms before you need them.
“Done” without evidence Anti-Patterns › Done without evidence An agent's “done” is a prediction, not a measurement. The most common and most expensive anti-pattern. After a long task, the most likely next message is a success message, whether or not it worked. So treat every “done” as a claim and ask for the receipt: the command it ran, the output, a look at the real product. Team rule: no evidence, no done.
THE AGENT'S REPORT ✅ Feature complete! ✅ All tests pass ✅ Ready to merge show me THE RECEIPTS test output pasted? ✗ tests in the diff? ✗ ran it in the product? ✗ screenshot / CI link? ✗ A CLAIM IS ONLY AS GOOD AS ITS RECEIPT command + its output test names that actually ran screenshot of the real UI CI / PR link anyone can open NOT RECEIPTS: “should work” · “I've updated…” · “looks good” · ✅✅✅
🔍 Zoom: spot the tells AGENT: “I've fixed the bug and the tests should pass now.” TELL 1 “fixed”: no diff shown, no file named. TELL 2 “should”: it did not run them. YOU Run the tests and paste the last 20 lines of output. Don't argue about whether it's done. Ask for the output.
SYMPTOM A cheerful “done” with no receipts. click to zoom in →
Silent fallbacks & test-gaming Anti-Patterns › Silent failures It runs and CI is green, and the result is still wrong. A fallback hides missing data behind a plausible default. In a simulation, temperature = 0 when the sensor never reported isn't safe. It's silently wrong, and every result after it is garbage. Test-gaming is its twin: the agent edits the test until it agrees with the bug. You want correct data or a loud failure, never a quiet guess.
WHAT THE AGENT WROTE (THE FALLBACK CRISIS) temperature = data.get('temperature', 0) pressure = data.get('pressure', 0) velocity = data.get('velocity', 0) sensor silent phantom 0 sim runs fine results: garbage TEST-GAMING: TEST BENT TO FIT - assert total(10, 2) == 21.60 + assert total(10, 2) == 20.00 OTHER WAYS TO 'PASS' @pytest.mark.skip # flaky assert True except Exception: pass
🔍 Zoom: catch it in the diff $ git diff --stat tests/test_cart.py | 2 +- (src/cart.py unchanged) The tests changed and the code didn't. The agent fixed the test, not the bug. Rule: a changed expected value needs a sentence of why, read by a human.
SYMPTOM Green CI, plausible output — built on a quiet guess. click to zoom in →
Drift, creep, duplicates, stale docs Anti-Patterns › Slow infections Nothing breaks today. It spreads. One duplicated helper becomes three. A stale README misleads the next agent, because agents read docs as truth. Scope creep turns a one-file fix into a 14-file PR that nobody can review. Agents need the same oversight a human team does. You've seen the 500-function functions.py.
TASK: “fix the login button colour” button.css the actual fix 1 files touched auth_helper.py “while I was here…” 3 files touched utils2.py copy of utils.format_date 9 files touched README.md still describes old flow 14 files touched WHY THEY SPREAD training habits defensive code everywhere no domain context “handle missing data” nobody caught it so it repeats copy-paste one bad pattern → many
🔍 Zoom: a scope-check prompt BEFORE: “List the files you expect to touch, and why.” AFTER: $ git diff --stat Any file not on the list needs one sentence of why, or goes in its own PR. Stale docs: ask the agent to update docs in the SAME PR as the code.
SYMPTOM A one-file fix that quietly became fourteen. click to zoom in →
BENCH · TRY IT Name the anti-pattern 0 of 5 sorted Five lines from real-feeling agent reports. Which infection is it? (Think-pair-share: argue for your pick before you click.) “✅ Done! Everything is working perfectly.” (no output, no diff) No evidence Silent fallback Test-gaming Scope creep user_age = row.get('age', 0) # in a medical-dosage calculator No evidence Silent fallback Test-gaming Scope creep “Tests were failing, so I updated the expected values to match.” No evidence Silent fallback Test-gaming Scope creep “Fixed the typo — also migrated us to a new ORM while I was in there.” No evidence Silent fallback Test-gaming Scope creep except Exception: pass # around the payment call No evidence Silent fallback Test-gaming Scope creep
CANAL LOCKS · STOP IT SHIPPING Verification Gates metaphor: a boat only rises when the lock is checked Code moves through a series of locks. Each lock checks one thing and won't open until it passes. The cheapest locks come first, and humans are the last lock, not the first.
The process stack Gates › The process stack Move every check you can UP the stack. Four layers, cheapest first. Scripts block, automated review flags, a reviewer agent finds, a human decides. Every check you move up the stack, from a person to an agent or from an agent to a script, gets cheaper, faster and impossible to skip. Spend human attention on what only a human can judge: intent and taste.
1 · AUTOMATED ENFORCEMENT pre-commit: tests, types, lint, pattern detectors BLOCKS type error 2 · AUTOMATED REVIEW post-commit: E2E, security, performance, drift FLAGS slow page 3 · AGENT REVIEW senior / adversarial reviewer: checklist, domain anti-patterns FINDS silent fallback 4 · HUMAN REVIEW intent, taste, risk: “is this what we wanted?” DECIDES wrong feature
🔍 Zoom: checklist vs test CHECKLIST agent reads it → forgets in the moment → shipped TEST agent writes code → pre-commit runs the test → rejected → agent MUST fix “Checklists are for humans to review; tests are for machines to enforce.” — The Long Game, Failure Mode 1
FOUR LOCKS Script → automation → reviewer agent → human. Cheapest first. click to zoom in →
Verify before “done” Gates › Verify before done Evidence before assertions. Always. The gate doesn't ask “are you sure?”, because agents are always sure. It asks for the artifact: the command that ran, its output, and a look at the real product. Then someone (or another agent) reads that output against the claim. This one habit pays back faster than any other in the course.
agent: “done” a claim THE GATE evidence attached? command + output + look read the output does it say what the claim says? checked in the product? ✓ verified no → “run it, paste the output” The gate never asks “are you sure?” Agents are always sure. It asks for the artifact, and someone reads it against the claim.
🔍 Zoom: worked trace (“done” that wasn't) TASK add the “forgot password” email AGENT ✅ Done. Reset flow added, tests pass. GATE Paste the test run. AGENT $ pytest tests/test_reset.py → 1 failed test_reset_email_sent: 0 emails sent GATE Why 0? AGENT key = os.environ.get('MAIL_KEY', '') → empty key, send skipped, no error FIX fail loudly if the key is missing; set it in the test env AGENT $ pytest → all passed + screenshot of the email arriving GATE ✓ verified. Merge. Composite example of a pattern from class: one question caught no-evidence AND a silent fallback.
THE LOCK GATE No receipt, no “done”. Then read the receipt. click to zoom in →
Adversarial review & Esc-Esc Gates › Review & rollback A reviewer who shares your context shares your blind spots. Before merge, send the work to a reviewer whose job is to find what's broken: a fresh context, ideally a different model, told to push back on every “done”. During work, don't argue. Every “no, I said…” stays in the context and makes the next answer worse. Press Esc twice, roll back to before the bad turn, fix the prompt, and run it again.
builder agent writes the change pull request diff + evidence reviewer agent fresh context · job: break it findings go back to the builder WHEN THE BUILDER GOES WRONG MID-TASK: TWO CONTEXT WINDOWS ARGUING task wrong “no!” sorry… wrong again “I SAID” worse ESC ESC → ROLL BACK → BETTER PROMPT task (edited prompt) right clean context → better next answer
🔍 Zoom: when to Esc-Esc wrong approach started → Esc-Esc asks what you already said → Esc-Esc + rephrase stuck in a loop → Esc-Esc garbage output → Esc-Esc “If I had gone back and just edited my prompt, the chances it would have done it right… pretty high.” — Workshop 5
TWO MOVES A skeptic reviews it. A bad turn gets rolled back, not argued with. click to zoom in →
BENCH · TRY IT Which gate catches it? 0 of 5 sorted Pick the CHEAPEST layer that can reliably catch each problem. A function returns a string where the type hints say int. Pre-commit Post-commit Review agent Human The new search page is 3× slower than last week. Pre-commit Post-commit Review agent Human A domain-specific .get(x, 0) in the billing module. Pre-commit Post-commit Review agent Human The feature works perfectly, but it isn't what customers asked for. Pre-commit Post-commit Review agent Human The same silent fallback, the 3rd time this month. Pre-commit Post-commit Review agent Human
SOIL · REMEMBER IT Agent Memory metaphor: soil strata, with compost at the bottom Agents start every session with amnesia. Everything they “know” about your project is text you put back in their context. Memory is a choice about which file a lesson lives in, how long it lives, and when it gets loaded.
Where memory lives Memory › Where it lives “Remember this” really means: which file, loaded when? Too little memory and agents repeat mistakes. Too much and the important rules drown. Rules for every session go in CLAUDE.md. Procedures with a trigger become skills. Facts that outlive a session (people, decisions, gotchas) go in memory files. Everything else is the conversation, and it's gone when the session ends.
THE CONTEXT WINDOW · what the agent can see right now CLAUDE.md rules for every session in this repo always loaded Skills procedures with a trigger loaded when it matches Memory files facts that outlive a session: people, decisions, gotchas index loaded, file read when relevant Conversation this session's back-and-forth compressed, then gone
🔍 Zoom: three examples, three homes “Deploys are POST; a GET silently 405s.” → CLAUDE.md or the deploy skill “Liz prefers 2–3 sentence status posts.” → memory file (it's about a person) “Today's branch is fix/login.” → nowhere: git already knows Don't save what the repo already records.
FOUR SHELVES CLAUDE.md · skills · memory files · the conversation. click to zoom in →
Five layers + compost Memory › Lifetimes Most learnings should die. The repeats get promoted. In the course's model, memory is five layers with different lifetimes, like soil. Most learnings start in Recent and die there. The ones that keep recurring get promoted toward Core. Failed ideas aren't deleted, they're composted: kept with the reason they failed, because a wrong-time idea can be the right one later.
CORE identity: role, voice, relationships never cleared LONG-TERM major insights, milestones kept MEDIUM this week's patterns cleared weekly RECENT today's tasks and learnings cleared nightly COMPOST failed ideas + why they failed cleared monthly ↑ promoted when it keeps recurring · compost feeds later ideas
🔍 Zoom: a real compost entry Discarded: Event Sourcing for User Service Why it failed: 10× complexity for no user benefit; debugging much harder; team couldn't maintain it. Why I'm keeping it: might fit at much larger scale; the pattern is valid, just the wrong time. — Workshop 6
SOIL LAYERS Most learnings rot away. Repeats rise. Failures become compost. click to zoom in →
Consolidation (“REM sleep”) Memory › Keep it small Fifty notes saying one thing is noise. Fold them. Memories pile up, 150 “recent learnings” that say the same thing five ways. The context fills, recall gets noisy, the agent slows down. Scheduled consolidation folds many episodes into one pattern, promotes what lasts and deletes the rest. Compression does the same thing to one long conversation.
“Cynthia fabricates when optimistic” “quality improved 15–25% → 0%” “optimists better when critiqued” “magnitude errors need −10 to −15” “citation inflation: −5 penalty” “severity weighting stops inflation” … + 44 more, same idea five ways REM 1 CONSOLIDATED INSIGHT Optimist–Skeptic Dynamics: optimistic researchers fabricate under single review; an adversarial skeptic drives it to 0%. Severity-weighted grading prevents grade inflation. SAME MOVE, ONE SESSION: CONTEXT COMPRESSION long conversation: tool output, dead ends, corrections, the actual decisions… summary: decisions + open threads
🔍 Zoom: a core memory that changed behaviour Cynthia (research agent) was caught citing papers that didn't exist. Option 1: a separate citation checker. Option 2: make it a core memory. They chose 2. “If I can't find the source, I don't cite it. I would rather say ‘I couldn't find a source’ than make one up.” Result: she began checking on her own, and the critic agent moved on to deeper review.
FOLD IT Fifty notes saying one thing → one insight. click to zoom in →
BENCH · TRY IT Should this go in memory? 0 of 5 sorted You just learned something. Where should it live? (“Don't save” is often the right answer.) “Never commit secrets. They live in the vault.” CLAUDE.md Skill Memory file Don't save “To deploy: arm the guard, POST /deploy, poll status, smoke test.” CLAUDE.md Skill Memory file Don't save “The user wants status posts in 2–3 sentences.” CLAUDE.md Skill Memory file Don't save “The test run I just did printed 48 passed.” CLAUDE.md Skill Memory file Don't save “We tried a microservice split. Too complex at our size.” CLAUDE.md Skill Memory file Don't save
SEASONS · MAKE IT IMPOSSIBLE Continuous Improvement metaphor: the gardener's yearly cycle Catching a mistake once is review. Making it impossible to repeat is improvement. Every correction you give is a choice of where it lives and how hard it is to ignore.
Find → Defeat → Teach Improvement › The loop Once is a mistake. Twice is a pattern. A pattern gets a test. Your agents will develop habits. Your job is a loop: find the pattern (it shows up more than once), defeat it with a test that fails whenever it appears, then teach it by putting that test in the agent's own non-negotiables, so it knows why. The pattern can't come back without breaking CI.
FIND the pattern DEFEAT with a test TEACH make it theirs repeat WHERE PATTERNS SHOW UP git history: same files re-fixed review comments that recur memories that repeat your own “not this again” DEFEAT = a test that fails whenever the pattern appears, run in CI. It can't come back. TEACH = put that test in the agent's own non-negotiables.
🔍 Zoom: the defeat test + Roy's rules # test_no_silent_fallbacks.py pattern = r'\.get\([^,]+,\s*(0|None|\'\'|"")\)' for f in python_files('src/'): assert not re.findall(pattern, read(f)), f # Agent: Roy · Non-Negotiable Tests - [ ] test_no_silent_fallbacks “You wrote these tests. You understand why. Passing them is discipline.”
THE SEASON Find the pattern → write a test that kills it → make it the agent's rule. click to zoom in →
The promotion staircase Improvement › Promote corrections Every correction lives somewhere. Pick the step. Said once in chat, it's gone next session. Written as a rule, it's read but sometimes ignored in the moment. A skill bundles a whole procedure. A test or hook can't be skipped. Run a weekly retro: what did we correct more than once? Promote it one step. That's how a team of agents gets better instead of just busier.
said it in chat gone next session CLAUDE.md / memory read, sometimes ignored skill followed when triggered test / hook / CI cannot be skipped Corrected it twice? Promote it one step. The weekly retro is where you walk these stairs.
🔍 Zoom: why checklists fail SYMPTOM you add to the checklist; the same mistakes keep happening. CAUSE checklists are documentation, not enforcement. FIX turn the item into a defeat test in pre-commit. Process erosion is the cousin: “we used to do that, but we stopped.” Humans skip; machines don't.
THE STAIRCASE Chat → rule → skill → test. Twice corrected? One step up. click to zoom in →
Metrics & feedback loops Improvement › Metrics Don't ask “why this bug?” Ask “what let it through?” Aim for an acceptable defect rate with good detection, not zero. Each maturity step moves a check up the stack and cuts the rate. Then watch the process itself: memories bloat, prompts drift, rituals erode, and loops run away. Each has a mechanical fix.
DEFECT RATE BY MATURITY (course targets) Alpha ~30% heavy human review Beta ~10% senior review agent Production ~1% automated detection + tests Mature ~0.1% continuous improvement bars on a log scale: each step is a 3–10× drop WHEN THE PROCESS ITSELF BREAKS memory bloat → schedule consolidation personality drift → behaviour tests on prompt changes process erosion → automate or calendar it runaway loop → max retries + cost alerts
🔍 Zoom: catching personality drift BEFORE “Let me just tweak Roy's prompt a bit…” → nobody notices → lots of weird commits. AFTER every prompt change runs behaviour tests against a baseline. ALERT “Roy's optimism_score drifted 25% — investigate.” Behaviour tests are regression tests for personality.
THE GAUGES Defect rate falls as checks move up the stack. click to zoom in →
BENCH · TRY IT Where should this correction live? 0 of 5 sorted You just corrected your agent. Pick the step on the staircase. A one-off typo in a variable name. Just fix it CLAUDE.md rule Skill Test / hook The agent used .get(x, 0) for the third time this week. Just fix it CLAUDE.md rule Skill Test / hook It keeps forgetting the six steps to cut a release. Just fix it CLAUDE.md rule Skill Test / hook Its PRs keep targeting main; your team targets production. Just fix it CLAUDE.md rule Skill Test / hook A retry loop burned through budget overnight. Just fix it CLAUDE.md rule Skill Test / hook
YOU · SUSTAIN IT The Gardener metaphor: the garden only lasts if the gardener does The agents don't get tired. You do. A healthy agent team needs a human who stops, sleeps, and lets the roadmap hold the ideas so they don't have to.
The “one more thing” loop Gardener › One more thing Capture ideas, don't execute them. Agents make every idea feel five minutes away, so you do the next one, and the next. The exit is boring on purpose: write the idea in an in-repo ROADMAP.md, go back to the current task, and let a project-manager agent schedule it. The roadmap holds the idea so your head doesn't have to.
THE LOOP new idea “just one more thing” do it now it's 3am THE EXIT new idea write it in ROADMAP.md back to the current task PM agent schedules it Capture ideas, don't execute them. Agents give you 10× velocity. That doesn't mean 10× the hours.
🔍 Zoom: warning signs Typing hurts → stop now (RSI) Eyes burning → look outside Making stupid mistakes → walk away Irritable, snappy → hungry or overstimulated Can't sleep → brain won't shut down 3 or more of these: you're in burnout territory. Stop coding.
THE LOOP “One more thing” at 3am. The exit: write it down, go back. click to zoom in →
Set limits. Really. Gardener › Limits Decide the limits while you're calm, not at 2am. Three gauges. Money: a separate virtual card per AI tool with a hard monthly limit, so a runaway night can't become a runaway bill. Time: timers you actually respect, and 2–4 hour blocks with clear stopping points. Body: food, water, sleep, movement. Agents give you velocity. Use it to get your evenings back.
MONEY a virtual card per tool, with a hard monthly limit TIME a timer you actually respect; 2–4 hour blocks BODY eat · drink water · sleep · move Set limits before you start, when you're calm. Hyperfocus is great at starting. It's terrible at stopping. Not a substitute for professional help. If it's more than a long week, talk to someone.
🔍 Zoom: a 60-second reset Name 5 things you can see. 4 things you can touch. 3 things you can hear. 2 things you can smell. 1 thing you can taste. Then decide: stop, or one more block with a timer.
THREE GAUGES Money · time · body. Set the limits while you're calm. click to zoom in →
Your role evolves Gardener › Your role You move from writing code to deciding what “good” means. As the process matures, your job changes: from writing code, to reviewing it, to setting priorities, to setting strategy and defining success. That only works if the gates and tests from this map are carrying the load. Without process, every day is firefighting. With it, days are predictable.
YOUR ROLE CHANGES AS THE PROCESS MATURES Developer you write code Supervisor you review, set direction Manager you set priorities, resolve conflicts Director you set strategy, approve architecture Executive you set vision, define success MATURITY: chaos → process → scale → quality → evolution → mastery More process feels like more work. It's actually less work. Complexity ladder deck ↗
🔍 Zoom: the process paradox Without process: every bug is a surprise, every pattern recurs, every day is firefighting. With process: bugs are caught systematically, patterns are defeated permanently, days are predictable. — The Long Game
THE STEPS Developer → supervisor → manager → director → executive. click to zoom in →
BENCH · TRY IT Keep going, roadmap it, or stop? 0 of 5 sorted Be honest. These are the moments where projects (and people) burn out. Mid-task, you think of a cool dashboard feature. Keep going Roadmap it Stop now Half done, tests red, mid-afternoon, you feel fresh. Keep going Roadmap it Stop now It's 2am, you skipped dinner, and you're arguing with the agent. Keep going Roadmap it Stop now Your AI spend just hit the weekly limit you set. Keep going Roadmap it Stop now A satisfying refactor, but not needed for this milestone. Keep going Roadmap it Stop now
Anti-Patterns NOTICE IT Verification Gates STOP IT SHIPPING Agent Memory REMEMBER IT Continuous Improvement MAKE IT IMPOSSIBLE The Gardener SUSTAIN IT
←
0 / 0
→
Explore
Click anything to zoom into it · scroll to zoom · drag to pan
Esc zoom out one level · Home whole atlas
1 –4 jump to a quadrant · / search
Tour
→ / space next stop · ← previous
The tour visits every district and framework in teaching order.
Teach
N presenter notes for whatever you're looking at · F fullscreen
Every view has its own link — copy the URL to send someone straight to it.
Reading the map
The whole atlas is one safety case. The top goal is “this agent is fit to deploy”;
each quadrant is one leg of the argument; each district is a family of tools for that leg.
Small text appears as you zoom in. Some tiles have controls you can click.
Click anything to zoom in · scroll to zoom · Esc to back out · → for the guided tour