How I AIThe senior engineer's guide to AI coding: Context loading, custom hooks, and automation
At a glance
WHAT IT’S REALLY ABOUT
Advanced AI coding workflows: diagrams, context loading, hooks, and automation
- The episode focuses on how experienced engineers can get higher-quality, more predictable results from AI coding assistants by intentionally managing context and automation around the model.
- Lindquist shows how Mermaid diagrams and markdown “memory” folders compress an application’s behavior into AI-friendly artifacts that can be preloaded via Claude Code’s system prompt, reducing exploratory file reads and speeding up answers and edits.
- He then demonstrates productivity patterns in the terminal—short aliases for common Claude configurations and custom CLIs that wrap models like Gemini with pre-baked prompts—to make repeatable workflows effortless.
- Finally, he walks through Claude Code “stop hooks” that automatically run checks (e.g., TypeScript typecheck), feed errors back to the agent for self-correction, and optionally commit changes—turning quality enforcement into an automated loop.
IDEAS WORTH REMEMBERING
5 ideasPreload “how the system works,” not just rules.
Teams often provide AI tools with guidelines but omit architecture and flow. Mermaid diagrams and curated markdown let the model understand dependencies and impact, reducing risky edits that come from shallow context.
Mermaid diagrams are an AI-efficient compression format.
They can encode complex flows (auth, DB operations, event chains) in small text representations that models ingest quickly. Humans may find the diagrams hard to parse, but the AI can use them to answer questions without codebase exploration.
Use Claude Code’s system prompt to front-load project context.
By appending a system prompt that concatenates diagram markdown files (via glob + cat), you trade upfront tokens for faster, more reliable outputs and fewer file reads during the session.
Generate diagrams after the feature works (often at PR close).
Lindquist suggests spiking first, then diagramming once behavior is correct—especially valuable for legacy codebases that lack documentation. Claire adds a practical pattern: automate doc/diagram generation via GitHub Actions when PRs merge.
Make repeatable AI workflows one-keystroke operations.
Shell aliases can instantly launch Claude in specific modes (fast model, “dangerously” permissive mode, or “load all diagrams” mode). This eliminates retyping prompts and ensures consistent setup for recurring tasks.
WORDS WORTH SAVING
5 quotesContext and diagrams… are definitely the best way to get AI to do what you want.
— John Lindquist
It’s a way of essentially compressing your application down into very small lines of text that show how your application works.
— John Lindquist
This does come at the cost of a lot more context… and tokens being used up front, but the work that you do… is more valuable than that to me.
— John Lindquist
If you have nothing, you can’t iterate on nothing.
— John Lindquist
If I gave you infinite junior-to-mid-career talent… what would you do when a ticket came in?… All of that could just become a prompt.
— Claire Vo
High quality AI-generated summary created from speaker-labeled transcript.
Get more out of YouTube videos.
High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.
Add to Chrome