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 HEREA garden your agents tendWeeds grow on their own. Keeping it healthy is a cycle: notice → stop → remember → make impossible → rest. Click a district.NOTICEAnti-PatternsSTOPVerification GatesREMEMBERAgent MemoryMAKE IMPOSSIBLEContinuous ImprovementSUSTAINThe GardenerVISUAL GRAMMARanti-pattern / bad datacheck / gate / evidencememory / contextimprovement / human decisionthe human's wellbeingdashed = a gate or boundary🔍zoom in for a worked exampleGO DEEPERAgentic 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 ITAnti-Patternsmetaphor: infections → symptoms → antibodiesAgents 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 evidenceAnti-Patterns › Done without evidenceAn 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 messageis a success message, whether or not it worked.So treat every “done” as a claim and ask for thereceipt: the command it ran, the output, a lookat the real product. Team rule: no evidence, nodone. THE AGENT'S REPORT✅ Feature complete!✅ All tests pass✅ Ready to mergeshow meTHE RECEIPTStest output pasted?✗tests in the diff?✗ran it in the product?✗screenshot / CI link?✗A CLAIM IS ONLY AS GOOD AS ITS RECEIPTcommand+ its outputtest namesthat actually ranscreenshotof the real UICI / PR linkanyone can openNOT RECEIPTS:“should work” · “I've updated…” · “looks good” · ✅✅✅ 🔍 Zoom: spot the tellsAGENT: “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. SYMPTOMA cheerful “done” with no receipts.click to zoom in → Silent fallbacks & test-gamingAnti-Patterns › Silent failuresIt runs and CI is green, and the result is still wrong.A fallback hides missing data behind a plausibledefault. In a simulation, temperature = 0 whenthe sensor never reported isn't safe. It'ssilently wrong, and every result after it isgarbage. Test-gaming is its twin: the agent editsthe test until it agrees with the bug. You wantcorrect data or a loud failure, never a quietguess. WHAT THE AGENT WROTE (THE FALLBACK CRISIS)temperature = data.get('temperature', 0)pressure = data.get('pressure', 0)velocity = data.get('velocity', 0)sensor silentphantom 0sim runs fineresults: garbageTEST-GAMING: TEST BENT TO FIT- assert total(10, 2) == 21.60+ assert total(10, 2) == 20.00OTHER WAYS TO 'PASS'@pytest.mark.skip # flakyassert Trueexcept Exception: pass 🔍 Zoom: catch it in the diff$ git diff --stattests/test_cart.py | 2 +-(src/cart.py unchanged)The tests changed and the code didn't. The agent fixed thetest, not the bug.Rule: a changed expected value needs a sentence of why, read bya human. SYMPTOMGreen CI, plausible output — built on a quietguess.click to zoom in → Drift, creep, duplicates, stale docsAnti-Patterns › Slow infectionsNothing breaks today. It spreads.One duplicated helper becomes three. A staleREADME misleads the next agent, because agentsread docs as truth. Scope creep turns a one-filefix 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.cssthe actual fix1 files touchedauth_helper.py“while I was here…”3 files touchedutils2.pycopy of utils.format_date9 files touchedREADME.mdstill describes old flow14 files touchedWHY THEY SPREADtraining habitsdefensive code everywhereno domain context“handle missing data”nobody caught itso it repeatscopy-pasteone bad pattern → many 🔍 Zoom: a scope-check promptBEFORE: “List the files you expect to touch, and why.”AFTER: $ git diff --statAny file not on the list needs one sentence of why, or goes inits own PR.Stale docs: ask the agent to update docs in the SAME PR as thecode. SYMPTOMA one-file fix that quietly became fourteen.click to zoom in → BENCH · TRY ITName the anti-pattern0 of 5 sortedFive 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 evidenceSilent fallbackTest-gamingScope creepuser_age = row.get('age', 0) # in a medical-dosage calculatorNo evidenceSilent fallbackTest-gamingScope creep“Tests were failing, so I updated the expected values to match.”No evidenceSilent fallbackTest-gamingScope creep“Fixed the typo — also migrated us to a new ORM while I was in there.”No evidenceSilent fallbackTest-gamingScope creepexcept Exception: pass # around the payment callNo evidenceSilent fallbackTest-gamingScope creep CANAL LOCKS · STOP IT SHIPPINGVerification Gatesmetaphor: a boat only rises when the lock is checkedCode 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 stackGates › The process stackMove every check you can UP the stack.Four layers, cheapest first. Scripts block,automated review flags, a reviewer agent finds, ahuman decides. Every check you move up the stack,from a person to an agent or from an agent to ascript, gets cheaper, faster and impossible toskip. Spend human attention on what only a humancan judge: intent and taste. 1 · AUTOMATED ENFORCEMENTpre-commit: tests, types, lint, pattern detectorsBLOCKStype error2 · AUTOMATED REVIEWpost-commit: E2E, security, performance, driftFLAGSslow page3 · AGENT REVIEWsenior / adversarial reviewer: checklist, domain anti-patternsFINDSsilent fallback4 · HUMAN REVIEWintent, taste, risk: “is this what we wanted?”DECIDESwrong feature 🔍 Zoom: checklist vs testCHECKLIST agent reads it → forgets in the moment → shippedTEST agent writes code → pre-commit runs the test → rejected →agent MUST fix“Checklists are for humans to review; tests are for machines toenforce.”— The Long Game, Failure Mode 1 FOUR LOCKSScript → automation → reviewer agent → human.Cheapest first.click to zoom in → Verify before “done”Gates › Verify before doneEvidence before assertions. Always.The gate doesn't ask “are you sure?”, becauseagents are always sure. It asks for the artifact:the command that ran, its output, and a look atthe real product. Then someone (or another agent)reads that output against the claim. This onehabit pays back faster than any other in thecourse. agent: “done”a claimTHE GATEevidence attached?command + output + lookread the outputdoes it say what the claim says?checked in the product?✓ verifiedno → “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” emailAGENT ✅ Done. Reset flow added, tests pass.GATE Paste the test run.AGENT $ pytest tests/test_reset.py → 1 failedtest_reset_email_sent: 0 emails sentGATE Why 0?AGENT key = os.environ.get('MAIL_KEY', '') → empty key, send skipped, noerrorFIX fail loudly if the key is missing; set it in the test envAGENT $ pytest → all passed + screenshot of the email arrivingGATE ✓ verified. Merge.Composite example of a pattern from class: one question caughtno-evidence AND a silent fallback. THE LOCK GATENo receipt, no “done”. Then read the receipt.click to zoom in → Adversarial review & Esc-EscGates › Review & rollbackA reviewer who shares your context shares your blind spots.Before merge, send the work to a reviewer whosejob is to find what's broken: a fresh context,ideally a different model, told to push back onevery “done”. During work, don't argue. Every“no, I said…” stays in the context and makes thenext answer worse. Press Esc twice, roll back tobefore the bad turn, fix the prompt, and run itagain. builder agentwrites the changepull requestdiff + evidencereviewer agentfresh context · job: break itfindings go back to the builderWHEN THE BUILDER GOES WRONG MID-TASK: TWO CONTEXT WINDOWSARGUINGtaskwrong“no!”sorry…wrong again“I SAID”worseESC ESC → ROLL BACK → BETTER PROMPTtask (edited prompt)rightclean context → better next answer 🔍 Zoom: when to Esc-Escwrong approach started → Esc-Escasks what you already said → Esc-Esc + rephrasestuck in a loop → Esc-Escgarbage output → Esc-Esc“If I had gone back and just edited my prompt, the chances itwould have done it right… pretty high.” — Workshop 5 TWO MOVESA skeptic reviews it. A bad turn gets rolledback, not argued with.click to zoom in → BENCH · TRY ITWhich gate catches it?0 of 5 sortedPick the CHEAPEST layer that can reliably catch each problem.A function returns a string where the type hints say int.Pre-commitPost-commitReview agentHumanThe new search page is 3× slower than last week.Pre-commitPost-commitReview agentHumanA domain-specific .get(x, 0) in the billing module.Pre-commitPost-commitReview agentHumanThe feature works perfectly, but it isn't what customers asked for.Pre-commitPost-commitReview agentHumanThe same silent fallback, the 3rd time this month.Pre-commitPost-commitReview agentHuman SOIL · REMEMBER ITAgent Memorymetaphor: soil strata, with compost at the bottomAgents 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 livesin, how long it lives, and when it gets loaded. Where memory livesMemory › Where it lives“Remember this” really means: which file, loaded when?Too little memory and agents repeat mistakes. Toomuch and the important rules drown. Rules forevery session go in CLAUDE.md. Procedures with atrigger become skills. Facts that outlive asession (people, decisions, gotchas) go in memoryfiles. Everything else is the conversation, andit's gone when the session ends. THE CONTEXT WINDOW · what the agent can see right nowCLAUDE.mdrules for every session in this repoalways loadedSkillsprocedures with a triggerloaded when it matchesMemory filesfacts that outlive a session: people, decisions,gotchasindex loaded, file read whenrelevantConversationthis session's back-and-forthcompressed, then gone 🔍 Zoom: three examples, three homes“Deploys are POST; a GET silently 405s.” → CLAUDE.md or thedeploy skill“Liz prefers 2–3 sentence status posts.” → memory file (it'sabout a person)“Today's branch is fix/login.” → nowhere: git already knowsDon't save what the repo already records. FOUR SHELVESCLAUDE.md · skills · memory files · theconversation.click to zoom in → Five layers + compostMemory › LifetimesMost learnings should die. The repeats get promoted.In the course's model, memory is five layers withdifferent lifetimes, like soil. Most learningsstart in Recent and die there. The ones that keeprecurring get promoted toward Core. Failed ideasaren't deleted, they're composted: kept with thereason they failed, because a wrong-time idea canbe the right one later. COREidentity: role, voice, relationshipsnever clearedLONG-TERMmajor insights, milestoneskeptMEDIUMthis week's patternscleared weeklyRECENTtoday's tasks and learningscleared nightlyCOMPOSTfailed ideas + why they failedcleared monthly↑ promoted when it keeps recurring · compost feeds later ideas 🔍 Zoom: a real compost entryDiscarded: Event Sourcing for User ServiceWhy it failed: 10× complexity for no user benefit; debuggingmuch harder; team couldn't maintain it.Why I'm keeping it: might fit at much larger scale; the patternis valid, just the wrong time.— Workshop 6 SOIL LAYERSMost learnings rot away. Repeats rise.Failures become compost.click to zoom in → Consolidation (“REM sleep”)Memory › Keep it smallFifty notes saying one thing is noise. Fold them.Memories pile up, 150 “recent learnings” that saythe same thing five ways. The context fills,recall gets noisy, the agent slows down.Scheduled consolidation folds many episodes intoone pattern, promotes what lasts and deletes therest. Compression does the same thing to one longconversation. “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 waysREM1 CONSOLIDATED INSIGHTOptimist–Skeptic Dynamics:optimistic researchers fabricateunder single review; anadversarial skeptic drives it to0%. Severity-weighted gradingprevents grade inflation.SAME MOVE, ONE SESSION: CONTEXT COMPRESSIONlong conversation: tool output, dead ends, corrections, the actual decisions…summary: decisions + open threads 🔍 Zoom: a core memory that changed behaviourCynthia (research agent) was caught citing papers that didn'texist.Option 1: a separate citation checker. Option 2: make it a corememory. They chose 2.“If I can't find the source, I don't cite it. I would rathersay ‘I couldn't find a source’ than make one up.”Result: she began checking on her own, and the critic agentmoved on to deeper review. FOLD ITFifty notes saying one thing → one insight.click to zoom in → BENCH · TRY ITShould this go in memory?0 of 5 sortedYou just learned something. Where should it live? (“Don't save” is often the right answer.)“Never commit secrets. They live in the vault.”CLAUDE.mdSkillMemory fileDon't save“To deploy: arm the guard, POST /deploy, poll status, smoke test.”CLAUDE.mdSkillMemory fileDon't save“The user wants status posts in 2–3 sentences.”CLAUDE.mdSkillMemory fileDon't save“The test run I just did printed 48 passed.”CLAUDE.mdSkillMemory fileDon't save“We tried a microservice split. Too complex at our size.”CLAUDE.mdSkillMemory fileDon't save SEASONS · MAKE IT IMPOSSIBLEContinuous Improvementmetaphor: the gardener's yearly cycleCatching 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 → TeachImprovement › The loopOnce is a mistake. Twice is a pattern. A pattern gets a test.Your agents will develop habits. Your job is aloop: find the pattern (it shows up more thanonce), defeat it with a test that fails wheneverit appears, then teach it by putting that test inthe agent's own non-negotiables, so it knows why.The pattern can't come back without breaking CI. FINDthe patternDEFEATwith a testTEACHmake it theirsrepeatWHERE PATTERNS SHOW UPgit history: same files re-fixedreview comments that recurmemories that repeatyour own “not this again”DEFEAT =a test that fails wheneverthe pattern appears, run inCI. It can't come back.TEACH =put that test in theagent's ownnon-negotiables. 🔍 Zoom: the defeat test + Roy's rules# test_no_silent_fallbacks.pypattern = 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 SEASONFind the pattern → write a test that kills it→ make it the agent's rule.click to zoom in → The promotion staircaseImprovement › Promote correctionsEvery correction lives somewhere. Pick the step.Said once in chat, it's gone next session.Written as a rule, it's read but sometimesignored in the moment. A skill bundles a wholeprocedure. A test or hook can't be skipped. Run aweekly retro: what did we correct more than once?Promote it one step. That's how a team of agentsgets better instead of just busier. said it in chatgone next sessionCLAUDE.md /memoryread, sometimesignoredskillfollowed whentriggeredtest / hook / CIcannot be skippedCorrected it twice? Promote it one step.The weekly retro is where you walk these stairs. 🔍 Zoom: why checklists failSYMPTOM you add to the checklist; the same mistakes keephappening.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 westopped.” Humans skip; machines don't. THE STAIRCASEChat → rule → skill → test. Twice corrected?One step up.click to zoom in → Metrics & feedback loopsImprovement › MetricsDon't ask “why this bug?” Ask “what let it through?”Aim for an acceptable defect rate with gooddetection, not zero. Each maturity step moves acheck up the stack and cuts the rate. Then watchthe process itself: memories bloat, promptsdrift, rituals erode, and loops run away. Eachhas a mechanical fix. DEFECT RATE BY MATURITY (course targets)Alpha~30%heavy human reviewBeta~10%senior review agentProduction~1%automated detection + testsMature~0.1%continuous improvementbars on a log scale: each step is a 3–10× dropWHEN THE PROCESS ITSELF BREAKSmemory bloat→ schedule consolidationpersonality drift→ behaviour tests on prompt changesprocess erosion→ automate or calendar itrunaway loop→ max retries + cost alerts 🔍 Zoom: catching personality driftBEFORE “Let me just tweak Roy's prompt a bit…” → nobody notices→ lots of weird commits.AFTER every prompt change runs behaviour tests against abaseline.ALERT “Roy's optimism_score drifted 25% — investigate.”Behaviour tests are regression tests for personality. THE GAUGESDefect rate falls as checks move up thestack.click to zoom in → BENCH · TRY ITWhere should this correction live?0 of 5 sortedYou just corrected your agent. Pick the step on the staircase.A one-off typo in a variable name.Just fix itCLAUDE.md ruleSkillTest / hookThe agent used .get(x, 0) for the third time this week.Just fix itCLAUDE.md ruleSkillTest / hookIt keeps forgetting the six steps to cut a release.Just fix itCLAUDE.md ruleSkillTest / hookIts PRs keep targeting main; your team targets production.Just fix itCLAUDE.md ruleSkillTest / hookA retry loop burned through budget overnight.Just fix itCLAUDE.md ruleSkillTest / hook YOU · SUSTAIN ITThe Gardenermetaphor: the garden only lasts if the gardener doesThe 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” loopGardener › One more thingCapture ideas, don't execute them.Agents make every idea feel five minutes away, soyou do the next one, and the next. The exit isboring on purpose: write the idea in an in-repoROADMAP.md, go back to the current task, and leta project-manager agent schedule it. The roadmapholds the idea so your head doesn't have to. THE LOOPnew idea“just one more thing”do it nowit's 3amTHE EXITnew ideawrite it in ROADMAP.mdback to the current taskPM agent schedules itCapture ideas, don't execute them.Agents give you 10× velocity. That doesn't mean 10× the hours. 🔍 Zoom: warning signsTyping hurts → stop now (RSI)Eyes burning → look outsideMaking stupid mistakes → walk awayIrritable, snappy → hungry or overstimulatedCan't sleep → brain won't shut down3 or more of these: you're in burnout territory. Stop coding. THE LOOP“One more thing” at 3am. The exit: write itdown, go back.click to zoom in → Set limits. Really.Gardener › LimitsDecide the limits while you're calm, not at 2am.Three gauges. Money: a separate virtual card perAI tool with a hard monthly limit, so a runawaynight can't become a runaway bill. Time: timersyou actually respect, and 2–4 hour blocks withclear stopping points. Body: food, water, sleep,movement. Agents give you velocity. Use it to getyour evenings back. MONEYa virtual card per tool, witha hard monthly limitTIMEa timer you actually respect;2–4 hour blocksBODYeat · drink water · sleep ·moveSet 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 resetName 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 GAUGESMoney · time · body. Set the limits whileyou're calm.click to zoom in → Your role evolvesGardener › Your roleYou move from writing code to deciding what “good” means.As the process matures, your job changes: fromwriting code, to reviewing it, to settingpriorities, to setting strategy and definingsuccess. That only works if the gates and testsfrom this map are carrying the load. Withoutprocess, every day is firefighting. With it, daysare predictable. YOUR ROLE CHANGES AS THE PROCESS MATURESDeveloperyou write codeSupervisoryou review, setdirectionManageryou setpriorities,resolve conflictsDirectoryou set strategy,approvearchitectureExecutiveyou set vision,define successMATURITY: chaos → process → scale → quality → evolution → masteryMore process feels like more work. It's actually less work.Complexity ladder deck ↗ 🔍 Zoom: the process paradoxWithout process: every bug is a surprise, every pattern recurs,every day is firefighting.With process: bugs are caught systematically, patterns aredefeated permanently, days are predictable.— The Long Game THE STEPSDeveloper → supervisor → manager → director →executive.click to zoom in → BENCH · TRY ITKeep going, roadmap it, or stop?0 of 5 sortedBe honest. These are the moments where projects (and people) burn out.Mid-task, you think of a cool dashboard feature.Keep goingRoadmap itStop nowHalf done, tests red, mid-afternoon, you feel fresh.Keep goingRoadmap itStop nowIt's 2am, you skipped dinner, and you're arguing with the agent.Keep goingRoadmap itStop nowYour AI spend just hit the weekly limit you set.Keep goingRoadmap itStop nowA satisfying refactor, but not needed for this milestone.Keep goingRoadmap itStop now Anti-PatternsNOTICE ITVerification GatesSTOP IT SHIPPINGAgent MemoryREMEMBER ITContinuous ImprovementMAKE IT IMPOSSIBLEThe GardenerSUSTAIN IT
Meta-map ↗
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