Skip to content

ADR 0005: Unidirectional control flow through the execution stack - #104

Merged
ralphbean merged 3 commits into
mainfrom
adr-0005-unidirectional-control-flow
Apr 7, 2026
Merged

ADR 0005: Unidirectional control flow through the execution stack#104
ralphbean merged 3 commits into
mainfrom
adr-0005-unidirectional-control-flow

Conversation

@ralphbean

Copy link
Copy Markdown
Member

Summary

  • Establishes that control flows strictly downward through the execution stack (Dispatch → Infrastructure → Sandbox → Harness → Runtime)
  • No layer may influence, configure, or depend on layers above it
  • Distinguishes prohibited upward control flow from permitted upward data flow (telemetry, failure signals)
  • Renames "Work Coordinator" to "Agent Dispatch and Coordination Layer"
  • Adds "Execution Stack" section to architecture.md

Dependencies

🤖 Generated with Claude Code

No layer may influence, configure, or depend on layers above it:

- The **agent runtime** cannot modify the harness (its own system prompt,
skills, tool definitions).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to consider something like allocating test resource (VMs, clustes), is that a tool? Is that something the infrastructure layer needs to do ahead of time? Knowing ahead of time could be really useful for managing resources with e.g. Kueue but then we risk over-allocating...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I wonder .. if the implementation/coder agent needs to provision resources in order to perform tests, then - that's a different infrastructure layer than the infrastructure layer described in this ADR.

If the an agent tries to request infra from "somewhere", that's just tool use. If it happens to be the same infrastructure that the agent is running on - that can work, but the fact that the agent is running there shouldn't somehow influence the infra's provisioning API.

In other words, if an agent needs to provision compute for tests, that should work the same way whether the agent is running in a gh action, or if the agent is running in a kube pod.

No layer may influence, configure, or depend on layers above it:

- The **agent runtime** cannot modify the harness (its own system prompt,
skills, tool definitions).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Letting the agent improving its skills is very useful
It should be done through a pr process.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directly relevant is #131

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should update this to say that "No layer may directly influence, configure, or depend on layers above it."

@ralphbean
ralphbean marked this pull request as ready for review March 30, 2026 20:47
@ralphbean

Copy link
Copy Markdown
Member Author

Taking this out of draft. Ready for review!

ralphbean and others added 2 commits April 7, 2026 08:25
Establishes that control flows strictly downward through the execution
stack (Dispatch → Infrastructure → Sandbox → Harness → Runtime) and
no layer may influence layers above it. Distinguishes prohibited upward
control flow from permitted upward data flow (telemetry, failure signals).

Renames "Work Coordinator" to "Agent Dispatch and Coordination Layer"
for clarity. Adds an "Execution Stack" section to architecture.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…action-layer ADR

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ralphbean
ralphbean force-pushed the adr-0005-unidirectional-control-flow branch from 4f607cf to aaec32c Compare April 7, 2026 12:30
Addresses PR feedback: add "directly" qualifier to the decision
statement and a new permitted-action bullet explaining that agents
may propose harness changes through PRs subject to human review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants