-
Notifications
You must be signed in to change notification settings - Fork 1
schema orchestration
title: Schema-Based Orchestration category: concepts tags: [harness, orchestration, archon, dag, layer-7] status: developing created: 2026-04-28 updated: 2026-04-28 sources:
- "harness-implementation-plan" related:
- "agentic-harness"
- "persistent-memory"
- "structured-planning" layer: "Layer_7" summary: Layer 7 composes all other layers into a coherent pipeline using Archon's YAML workflow engine. DAG execution, loop nodes, human approval gates, worktree isolation, and run persistence come from Archon — no custom orchestration code. provenance: extracted: 0.85 inferred: 0.15 ambiguous: 0.0
Human coordination is narrative (Slack, PRs, standups). Agent coordination should be structured data passing. Each agent publishes typed schemas; orchestration routes work based on declared capabilities. No "asking" — only task routing based on capability declaration.
Rather than building custom orchestration, Layer 7 uses Archon's YAML workflow engine:
| Need | Archon provides | Alternative build cost |
|---|---|---|
| DAG execution | YAML workflow nodes with dependencies | Custom task graph executor |
| Loop nodes | loop: { until: CONDITION } |
Custom rework loop logic |
| Human approval gates | loop: { until: APPROVED, interactive: true } |
Custom approval UI |
| Worktree isolation | Auto git worktree per run | Custom branch management |
| Run persistence | SQLite/PostgreSQL | Custom state storage |
| Multi-platform invocation | CLI, Web UI, Slack, Telegram, GitHub | Custom API layer |
| Parallel nodes | Concurrent independent nodes | Custom parallel dispatch |
pi.dev extensions implement intelligence (spec hardening, planning, critic review, grounding, memory). Archon implements orchestration (sequencing, looping, isolation, persistence).
The workflow defines nodes for each layer:
-
harden-spec → Spec hardening using
harden-spectool - resolve-ambiguities → Loop until no blocking ambiguities (interactive)
- create-plan → Plan from hardened spec
- review-plan → Adversarial review of plan
- approve-plan → Loop until approved (interactive, max 3 iterations)
- execute-plan → Loop until all tasks complete (fresh_context: true, max 100 iterations)
- capture-memory → Store results via wiki-ingest skill
- harness-fix-issue.yaml — GitHub issue → full pipeline
- harness-quick-review.yaml — Standalone critic review on latest diff
| State | Meaning |
|---|---|
completed |
All control objectives passed |
blocked |
Mandatory gate/dependency unresolved |
replan_required |
Drift, failed critics, or spec change |
cancelled |
Precondition not met |
failed |
Retries/limits exhausted |
- Node retries for transient errors only; fatal errors fail closed
- Every interactive loop has bounded
max_iterationsand gate message - Compensation is a harness responsibility, not Archon's
- Resume only from last verified checkpoint, only if prior run ended in resumable state
| Type | Name | Description |
|---|---|---|
| Event consumed | plan_approved |
Begin orchestrated execution |
| Event consumed | subtask_verified |
Task passed critics, advance wave |
| Event consumed | subtask_failed |
Task failed, mark dependents blocked |
| Event emitted | execution_complete |
All tasks done or failed |
| Tool | orchestrate-plan |
Begin orchestrated execution |
| Tool | register-agent-capability |
Declare agent capabilities |
| Command | /harness-orchestration-status |
Agents, capabilities, wave progress |
{
"orchestration": {
"max_parallel": 2
}
}-
lib/harness-orchestrator.ts— Orchestrator class, schema validation, wave tracking -
extensions/harness-orchestrator.ts— pi.dev extension registration .archon/workflows/harness-pipeline.yaml.archon/workflows/harness-fix-issue.yaml.archon/workflows/harness-quick-review.yaml