Map agent dependencies and arrange in topological order — no agent executes before its required inputs are available
Define cognitive sequences by mapping dependencies between agents (which outputs serve as inputs to which other agents), then arrange agents in topological order so no agent executes before its required inputs are available.
Why This Is a Rule
Topological sorting — ordering elements so that each element appears after all its dependencies — is a fundamental technique in computer science for managing dependencies. Applied to cognitive agents, it prevents a common workflow failure: executing a step before its prerequisites are complete.
"Review today's priorities" depends on "check calendar and email." "Plan deep work blocks" depends on "review today's priorities." If you attempt to plan deep work blocks before reviewing priorities, you'll either plan with incomplete information or re-plan after the review — wasted effort either way. The dependency map makes this explicit: calendar/email → priorities → work blocks. The topological order ensures correct sequencing.
Most people sequence their cognitive workflows intuitively, and intuition works well under normal conditions. But under load, stress, or disruption (Under stress, follow the written sequence — intuitive ordering degrades under load while externalized protocols remain stable), intuitive sequencing degrades — you start tasks before their prerequisites are complete, producing rework. Explicit dependency mapping and topological ordering create a stable sequence that survives cognitive impairment.
When This Fires
- When designing multi-step cognitive workflows (morning routines, project kickoffs, decision processes)
- When you frequently start tasks only to realize a prerequisite wasn't complete
- When workflow execution under stress produces worse results than under calm — sequencing may be degrading
- Complements Decouple independent sub-behaviors into separate agents — coupled sequences produce cascading failures when one step breaks (decouple independent agents) with the positive case: how to properly sequence dependent agents
Common Failure Mode
Sequencing by habit or convenience rather than dependency: "I always check email first because it's easy." But if your priority review doesn't depend on email (it depends on calendar), doing email first delays the dependency chain without contributing to it. Worse, email often derails priority review by introducing reactive tasks. Dependency-based sequencing puts email where it belongs in the chain — after priorities are set, not before.
The Protocol
(1) List all agents/steps in a multi-step workflow. (2) For each, identify its inputs: what information or outputs from other agents does it need to execute properly? (3) Draw the dependency graph: arrows from each agent to the agents that depend on its output. (4) Topologically sort: arrange so each agent appears after all agents it depends on. This is your execution sequence. (5) Where convergence occurs (one agent needs outputs from multiple upstream agents), ensure all upstream agents complete before the downstream agent begins (Map agent dependencies and arrange in topological order — no agent executes before its required inputs are available variant on synchronization). (6) Document the sequence explicitly (Under stress, follow the written sequence — intuitive ordering degrades under load while externalized protocols remain stable) — don't rely on intuitive recall of the dependency order.