Smarter AI comes from engineered context structure, not more words—fewer degrees of freedom, more reliable decisions.


Previous · Part 8
Build a Simple AI Context Sandbox in 20 Minutes (Free Tests, Real Comparisons)

Next · Part 10
The Cost Advantage: Build Context That’s Cheaper, Faster, and More Consistent
This builds on Part 8: Build a Simple AI Context Sandbox in 20 Minutes (Free Tests, Real Comparisons)
Continue with Part 10: The Cost Advantage: Build Context That’s Cheaper, Faster, and More Consistent
At some point, this stops being a concept.
If you’re using this system consistently, you’ll start to notice something:
you’re already doing the same operations over and over.
- summarising inputs
- updating context
- cleaning contradictions
- running tasks with structured state
This part is about making that explicit.
Not with a full app.
Just enough code logic to show:
this can be systemised without becoming a project.
The two core operations
Everything you’ve done in this series reduces to two actions:
- Update context
- Run a task with context
That’s it.
So the simplest possible system is just two functions.
1) Updating context (the real engine)
This is your rolling context logic in code form.
function updateContext(oldContext, newData) {
const summary = summarise(newData)
const merged = mergeAndClean(oldContext, summary)
return merged
}
That’s the entire idea.
But what matters is what those inner steps actually do.
summarise(newData)
This is not “shorten text.”
It is:
- extract goals
- extract constraints
- extract decisions
- extract open questions
- ignore everything else
mergeAndClean(oldContext, summary)
This is where most people fail.
This function must:
- overwrite outdated truths
- preserve still-valid constraints
- append new decisions (not duplicates)
- remove contradictions
- prune low-value noise
Conceptually:
function mergeAndClean(oldContext, summary) {
return {
goals: overwrite(oldContext.goals, summary.goals),
constraints: overwrite(oldContext.constraints, summary.constraints),
preferences: overwrite(oldContext.preferences, summary.preferences),
decisions: appendUnique(oldContext.decisions, summary.decisions),
openLoops: overwrite(oldContext.openLoops, summary.openLoops),
// optional: prune anything stale or duplicated
}
}
Continue reading with a subscription
Explorer and Immersion subscribers get full access to all premium dispatches, series, and long-form guides.
If this resonates, see how to apply it to your own work with the interactive Dispatch agent.
Be first to like this dispatch



