logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·30.10.26
← Back to news

The Brain Sandwich

Original article
terriblesoftware.org|44 points|17 comments|by keyle|Oct 18, 2026

The Brain Sandwich

During a recent 1:1 session with Emily—one of our top-tier engineers—we found ourselves venting about the current state of AI in software development. We discussed the overwhelming volume of code reviews and the shifting nature of the profession. However, the most pressing issue was the tendency for some developers to completely remove their cognitive involvement from the process, essentially outsourcing their entire workflow to an LLM.

Some in the industry have started calling this phenomenon a Meat Proxy.

To combat this, Emily utilizes a straightforward framework she calls the "Brain Sandwich." This method allows engineers to leverage the power of AI without letting their technical skills atrophy wither away.

The Core Philosophy

The concept is simple: your workflow should always be structured as a trilogy of cognitive effort.

The Formula: Your Brain →\rightarrow→ AI →\rightarrow→ Your Brain

In mathematical terms, we can view the quality of the output as: Quality=∫(Human Context+AI Generation+Human Verification) dt\text{Quality} = \int (\text{Human Context} + \text{AI Generation} + \text{Human Verification}) \, dtQuality=∫(Human Context+AI Generation+Human Verification)dt

🥪 The Sandwich Layers

LayerComponentActionPurpose
Top BunYour BrainAnalysis & PlanningEstablish context and intent.
FillingAIGenerationRapidly produce a draft or solution.
Bottom BunYour BrainReview & RefinementEnsure correctness and maintainability.

1. The Top Bun: Pre-AI Cognition

Before you prompt an agent to write a single line of code, you must actually read and comprehend the existing system.

While you don't need a granular, step-by-step implementation blueprint, you do need a general trajectory. If you skip this, you risk:

  • Building features that don't actually solve the core problem.
  • Introducing unnecessary complexity.
  • Following a "hallucinated" path that leads nowhere.

2. The Filling: AI Execution

Once you have established the necessary context and a rough goal, it is time to bring in the AI. This is where the heavy lifting happens.

# Example of the AI phase
def ai_generation_phase(context, goal):
    solution = llm.generate(context, goal)
    return solution

3. The Bottom Bun: Post-AI Verification

When the AI delivers a solution, your job isn't done—it's just beginning. You must critically evaluate the output to determine if it is:

  • Correct
  • Over-engineered
  • Solving the wrong problem entirely

The goal here is to make the work reviewable. You cannot simply pass an AI-generated diff to your teammates. You must:

  1. Analyze the diff.
  2. Verify that the added complexity is justified.
  3. Write a high-quality PR description.

Final Pre-Flight Checklist

  • I have read every line of the generated code.
  • I can explain what is changing.
  • I can explain why it is changing.
  • The PR description is clear and concise.

Visualizing the Workflow

The Golden Rule: If you find yourself unable to explain the logic and the reasoning behind a change, it is not ready for a human review.

Free bold abstract painting background