The problem
What was broken before AI
AI coding tools often struggle when the codebase context is hidden in folder structure, naming conventions, undocumented flows, or a developer’s head. A model can inspect files, but it may not understand the architecture, the sequence of events, or why one module depends on another. Without that context, it may make locally plausible changes that miss the larger system shape.
What changed
What the use case made possible
John’s workflow makes context more explicit. Mermaid diagrams give Claude Code a visual and textual map of the system. Markdown notes and project files can explain task flows, dependencies, and constraints. Stop hooks or automated checks can run after changes so the assistant does not stop at code that only looks correct. Together, these artifacts turn context into something the AI can repeatedly use.
Why this matters
Why this use case is worth studying
This use case is valuable because it focuses on preparing the environment, not just improving the prompt. A better prompt helps once. A diagram, context file, or stop hook can help every future task. John’s approach shows how developers can make their codebases more AI-friendly by externalizing the knowledge that usually lives in their head.
Use this when
When this pattern applies
Use this pattern when AI coding tools keep missing the bigger shape of your codebase. It works especially well for event flows, state machines, data pipelines, architecture boundaries, or any system where a visual map makes the code easier to understand.


