Runtime vs Skills/Subagents Boundary

Status: accepted Date: 2026-05-26

Decision

Keep hermes-workflows as a boring durable workflow runtime: a ledger, gate, and status surface.

Do not turn it into a smart orchestrator brain. Planning taste, TDD doctrine, milestone review, artifact quality, and model-specific operating prompts belong in skills, Codex /goal prompts, and subagent review loops.

The runtime should answer:

If it starts trying to answer “what is the tasteful plan?” or “how should this agent behave?”, it is probably in the wrong layer.

Why

A workflow runtime is valuable because it preserves state across crashes, model handoffs, and human pauses. That value comes from boring mechanics:

Those mechanics get weaker when the runtime also carries subjective agent judgment. A big custom orchestrator brain would be a worse agent with a database strapped to it. Bad trade.

Skills and subagent loops are the right place for operating taste because they can evolve quickly as the maintainer corrects us:

Ownership boundary

Workflow runtime owns

Skills, Codex, and subagents own

Design rule

Put a feature in the runtime only when it improves one of these:

  1. replay correctness
  2. approval provenance
  3. lease/worker safety
  4. memoization/determinism
  5. inspectability/status clarity
  6. durable evidence for a human gate

Put it in a skill, prompt template, or subagent loop when it improves one of these:

  1. planning judgment
  2. implementation taste
  3. review strictness
  4. artifact polish
  5. model-specific instructions
  6. operating procedure

Examples

Need Layer Reason
“Do not implement before plan approval.” Runtime gate + skill rule Runtime enforces the stop; skill makes the plan worth reviewing.
“Use TDD for every code change.” Skill / Codex /goal This is operating discipline, not workflow replay semantics.
“Resume after a worker crashes.” Runtime Requires durable events, command leases, and memoized step output.
“Make the plan artifact concrete enough to approve.” Skill / artifact template The quality bar will evolve faster than the runtime should.
“Show why this workflow is stuck.” Runtime Waiting state, outbox commands, events, claims, and errors must be inspectable.
“Review spec compliance before code quality.” Subagent loop This is a review process, not a persistence primitive.
“Never trust caller-supplied approval metadata.” Runtime Approval provenance must fail closed before side effects.

Codex /goal operating skeleton

Use this kind of prompt when an approved plan moves into implementation:

/goal Implement the approved plan in small milestones.

Rules:
1. Before each milestone, restate the acceptance criteria.
2. Write or update tests first.
3. After each milestone, stop and run a spec-review subagent.
4. Do not continue until spec review passes.
5. Then run quality review.
6. If either review fails, fix and re-review.
7. Keep commits small and include validation evidence.
8. Never merge or deploy without explicit landing approval.

That loop should be reusable outside hermes-workflows. The workflow runtime should only record the durable gates, commands, outputs, approvals, and landing packets around it.

Consequences

Good consequences:

Trade-offs:

That is fine. Durable state is the scarce thing here; taste belongs closer to the agents doing the work.

Near-term direction

The next useful slices should follow this order:

  1. Keep improving inspectability and provenance where workflows are already durable.
  2. Dogfood one Codex/subagent milestone loop using an approved implementation plan.
  3. Extract repeated review and artifact lessons into skills/templates before adding more runtime surface area.

Runtime features that fail the design rule should be deferred until the skill/subagent version proves insufficient.