The Hidden Architecture of Good Automation: Why Context Must Be Separate From Action

Kevin

Hatched by Kevin

Sep 01, 2026

11 min read

94%

0

What if the main reason your automation fails is not that it lacks intelligence, but that it knows too much at once?

A folder monitor can become unreliable when every rule tries to inspect every file, every subfolder, and every possible exception. An AI coding assistant can become unreliable for the same reason when an entire codebase, every design discussion, and every historical decision are placed into one undifferentiated context. In both cases, the system appears to have more information, yet becomes less capable of making the right decision.

This reveals a deeper principle: reliable automation depends less on maximizing available information than on controlling where information enters the decision process, in what order, and at what level of abstraction.

That principle applies far beyond desktop folders and coding assistants. It describes how to design workflows, delegate work, organize knowledge, and build systems that remain understandable as they grow.

The surprising connection between a folder and a conversation

Consider a simple automated folder. You want its color to indicate whether it contains anything worth noticing. An empty folder should be unmarked. A folder containing files should turn red. Nested folders should also be inspected.

At first glance, this seems trivial. Yet the implementation depends on a subtle sequence:

  1. Detect whether the folder is empty.
  2. If it is a folder, descend into its contents.
  3. If a file is found inside, redirect the action back to the containing folder.
  4. Apply the visual state to that parent folder.

The crucial move is not the color change. It is the change in target. The system examines a child object, discovers a fact about the parent, and then deliberately returns to the parent before acting.

Now consider a coding assistant working on a large project. The assistant needs to know the project goals, conventions, architecture, and current plan. But it does not necessarily need the entire repository in every conversation. The most useful arrangement is often to keep stable project knowledge in a durable reference space, while supplying only the relevant source files for the immediate task.

This is structurally the same move. The system inspects local evidence, then acts at the correct level. It does not confuse the object being examined with the object that should be changed.

A file is not the folder. A source file is not the whole project. A current question is not the entire history of the work. Good automation preserves these distinctions.

The quality of a system depends on whether it can move between levels without confusing them.

This is why the two examples belong together. Both are problems of context routing. They ask: What should the system look at? What should it remember? Where should the result be applied? What must happen first?

Information is not context until it has a job

People often speak about context as if it were simply a larger quantity of information. More context is assumed to mean better performance. But information becomes useful context only when it is connected to a decision.

A receipt in a Downloads folder is information. Its presence may become context for deciding that the folder needs attention. The folder's location may become context for deciding what action to take. The rule sequence determines which facts matter at which moment.

The same is true in a software project. A style convention is useful when generating code. A database schema is useful when modifying a query. A product goal is useful when choosing between two designs. A long transcript of unrelated brainstorming may be accurate, but accuracy alone does not make it relevant.

This suggests a practical distinction between two kinds of knowledge:

Stable knowledge describes the environment. It includes goals, conventions, architecture, naming practices, and decisions that should remain available across many tasks.

Operational knowledge describes the present move. It includes the files under examination, the exact bug, the current refactoring phase, and the constraints of today's decision.

When these are mixed carelessly, two failures appear.

The first is context flooding. Important facts compete with irrelevant ones. The system spends effort reconstructing what matters instead of performing the task.

The second is context drift. Old plans, abandoned assumptions, and temporary exceptions remain present long after they stop being valid. The system follows historical residue as if it were current instruction.

An overloaded folder rule can misclassify items because a broad condition catches something before a more precise condition gets a chance to run. An overloaded AI session can produce brittle code because an incidental detail from an earlier discussion silently shapes a new answer.

In both cases, the problem is not insufficient intelligence. It is poor information architecture.

Rule order is a theory of attention

The order of rules in an automation system is not merely a technical implementation detail. It expresses a theory of what deserves attention first.

An empty folder is checked before the system descends into child items because emptiness is a terminal condition. There is no reason to inspect contents if there are none. A folder condition comes next because recursion is a structural operation. Only after the system reaches the contents does it search for evidence that should change the parent state.

This can be understood as a three layer decision model:

  1. Stop conditions: Is there an obvious state that requires no further investigation?
  2. Traversal conditions: Is the object a container whose internal structure must be examined?
  3. Action conditions: Has the investigation produced enough evidence to change something?

Many bad workflows reverse these layers. They act before they understand structure, investigate details after a decision has already been made, or allow a broad action to swallow a more specific exception.

The same model improves work with AI. Before asking an assistant to edit code, establish whether the request is a local change, a structural change, or a project level decision. Then provide the appropriate material.

For a local change, give the relevant file and its dependencies. For a structural change, provide the architecture and affected components. For a project level decision, provide the goals, constraints, and current plan. Do not begin with the entire repository simply because it is available.

A useful prompt sequence might look like this:

  1. Orient: Here is the project goal and the relevant convention.
  2. Constrain: Here is the exact component and the behavior that must change.
  3. Plan: Propose the smallest safe set of edits and identify risks.
  4. Act: Modify only the approved files.
  5. Record: Save the decision and progress for future work.

This sequence mirrors the folder workflow. First identify the state. Then navigate the structure. Then act on the right object.

The broader lesson is that attention should be staged. A system should not be forced to solve classification, navigation, interpretation, and execution in one undifferentiated step.

The parent problem: acting at the right level

The most interesting feature of the folder workflow is the return to the parent. The file supplies evidence, but the folder receives the label. This is a general pattern that appears throughout effective system design.

A customer complaint may be evidence about a product, not merely an isolated incident. A failing test may be evidence about an interface, not just a defective line. A confusing meeting may be evidence about an organizational process, not a communication problem between two individuals.

If the system acts only on the observed child, it may treat symptoms while leaving the relevant container unchanged.

AI work has the same danger. Suppose a function fails because several modules disagree about an interface. Editing the function may make the immediate test pass, but the real object requiring attention is the contract between modules. The local file was only the sensor. The architecture was the target.

This gives us a useful mental model: sensor, subject, and target.

The sensor is where evidence appears. The subject is what the evidence is about. The target is what should be changed.

These can be the same object, but they often are not.

A downloaded file is the sensor. Its containing folder is the subject. The folder label is the target. A compiler error is the sensor. A violated interface is the subject. The shared contract or design is the target.

Before automating a decision, ask three questions:

  • Where will the evidence appear?
  • What larger object does that evidence describe?
  • Which object should receive the action?

This prevents a common category error: mistaking visibility for importance. The thing easiest to inspect is not always the thing that needs to change.

Durable memory should preserve decisions, not exhaustiveness

A project knowledge base is valuable when it preserves what future work needs to know. That does not mean preserving every artifact equally.

A useful durable record might contain the project's purpose, architectural boundaries, coding conventions, important decisions, and the current sequence of planned work. It should function like a map, not a warehouse. A map omits most physical details because its purpose is to support navigation.

This distinction also changes how teams document work. After a substantial discussion, the most valuable artifact is rarely the raw transcript. It is a compact decision record that answers:

  • What problem are we solving?
  • What options did we consider?
  • What did we choose?
  • Why did we choose it?
  • What remains uncertain?
  • What should happen next?

Such records reduce repeated rediscovery. They also make future conversations more focused because the assistant or teammate can begin from the project's current state rather than reconstructing it from scattered evidence.

But durable memory must be maintained. A saved plan can become dangerous if nobody marks completed phases, superseded decisions, or changed assumptions. The same principle that makes rule order important also makes memory hygiene important: stale instructions can outrank useful ones if the system has no mechanism for revision.

One practical solution is to separate project knowledge into three layers:

Principles

These change slowly. They include product goals, architectural commitments, and nonnegotiable constraints.

Decisions

These explain choices that shape future work. Each should include its status, date, rationale, and any conditions under which it should be revisited.

Operations

These describe the current phase, open questions, recent progress, and next actions. They change frequently and should be updated aggressively.

This layered structure prevents temporary instructions from becoming permanent law. It also prevents permanent principles from being buried beneath today's task list.

Designing workflows that know when to stop

The deepest connection between these examples is not recursion, folders, or AI. It is the design of bounded autonomy.

A reliable system does not merely know how to proceed. It knows when to stop, when to descend, when to return, and when to ask for a new instruction.

For a personal workflow, this might mean:

  • Empty containers receive a neutral state.
  • Containers with relevant contents receive an attention state.
  • Unrecognized cases remain unchanged rather than being processed aggressively.
  • Major structural changes require a plan before execution.
  • Completed work is recorded, then removed from the active queue.

These boundaries make automation legible. If something goes wrong, you can inspect which stage failed. Did the system misclassify the state? Traverse the wrong structure? Route the result to the wrong target? Apply an action too early?

The same diagnostic questions work when an AI generated code that is technically plausible but architecturally wrong.

Good automation is therefore not a single intelligent command. It is a small state machine with explicit transitions. It separates observation from interpretation, interpretation from routing, and routing from action.

That design may appear slower at first. In practice, it creates speed by reducing rework. The system spends a little more effort deciding what it is looking at, so it spends much less effort undoing actions taken on the wrong thing.

Key Takeaways

  • Separate stable knowledge from task material. Keep goals, conventions, architecture, and durable decisions in a persistent reference space. Supply only the files and evidence needed for the current task.
  • Stage attention in the right order. Check terminal conditions first, inspect structure second, and act only after the relevant evidence is found.
  • Distinguish sensor, subject, and target. The place where a problem appears may not be the object that needs to change.
  • Treat documentation as active infrastructure. Record decisions, status, rationale, and next steps. Remove or mark obsolete guidance so old context does not silently control new work.
  • Design for bounded autonomy. Define when the system should stop, recurse, return to a parent level, preserve the current state, or request human judgment.

The common fantasy of intelligent automation is a system that sees everything and handles everything. But systems that see everything often understand nothing in particular. They become vulnerable to irrelevant detail, stale assumptions, and actions performed at the wrong level.

The better ambition is more disciplined: build systems that know what to inspect, what to ignore, where to send the result, and when not to act.

A folder becomes trustworthy when its visible state reflects a carefully routed judgment. A coding assistant becomes trustworthy when its memory supports the present task without drowning it. In both cases, intelligence is not the size of the context window or the number of rules. It is the architecture that gives each fact the right place, the right time, and the right consequence.

The future of useful automation will belong not to systems that remember everything, but to systems that remember selectively and act at the correct level.

Sources

← Back to Library

Hatch New Ideas with Glasp AI 🐣

Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)

Start Hatching 🐣