- Parent task and subtask hierarchy
- Priority, owner, milestone, labels
- Human approvals and escalations
- Readable progress summaries
Deterministic control plane, agent judgment plane
This is the hybrid model for a Ralph-style process on OpenClaw. The orchestration core should be deterministic code. Linear stays human-friendly via MCP, OpenClaw acts as the operator shell, and LLM workers are only invoked where judgment is actually needed.
High-level architecture
The key move is to avoid making either Linear or prompt-driven skills do the job of a workflow engine. A deterministic orchestrator script owns reconciliation and state. OpenClaw wraps that control plane with visibility, messaging, session spawning, and intervention.
- Sync issue status and assignee changes
- Create comments for milestones only
- Listen for operator inputs as signals
- Build normalized task graph from Linear
- Compute ready, blocked, awaiting_human
- Apply concurrency, retry, stale-task, and projection rules
- No LLM required for the same-input same-output path
- Scoper, coder, reviewer, repairer
- One isolated worktree per active coding attempt
- Can target GitHub, CI, and local repo tools
- Invoked explicitly, not used to decide routine orchestration
- tasks normalized from planning tools
- task_runs attempt-by-attempt execution ledger
- task_events append-only timeline
- artifacts prompts, PRs, CI, logs, diffs
- PR open, review changes requested, CI failed
- These become internal events, not just comments
- Parent issue board
- Task timeline and replay
- Fleet metrics and stuck-task queue
- Chat approvals, nudges, interventions, and debug views
Projection model, what goes to Linear vs what stays internal
Keep Linear coarse and intentional. Keep OpenClaw detailed and forensic.
| Concern | Linear | OpenClaw internal |
|---|---|---|
| Human-visible task status | yes | Projected from current internal state |
| Run attempts and retries | summary only | Full attempt ledger with start, stop, exit reason |
| Prompt bundles and worker config | no | Artifact records linked to each run |
| PR and CI milestones | milestone comments | Structured event entries with URLs and classification |
| Failure taxonomy | human summary | tests_failed, spec_ambiguous, review_rejected, etc. |
| Exact timeline replay | no | Append-only event stream |
Recommended internal entities
Task state machine
This is the richer internal lifecycle that gets projected into a much simpler Linear workflow. It separates execution truth from PM-facing status.
Important nuance: task state is different from run state. One task can have multiple task runs over time.
Internal schema, visually
This is the minimum shape I’d want for implementation. It’s enough for replay, debugging, and dashboards without becoming over-designed too early.
- idstable task key
- external_sourcelinear issue reference
- parent_idhierarchy
- orchestration_stateruntime status
- priority / owner / labelsnormalized planning fields
- last_projected_atprojection hygiene
- task_iddependent task
- depends_on_task_idblocking task
- kindhard, soft, review gate
- id / task_id / attemptidentity
- worker_typescoper, coder, reviewer, repairer
- agent_id / session_key / modelexecution metadata
- statusactive, succeeded, failed, timed_out
- started_at / finished_attiming
- exit_reasonclassified failure or completion
- id / task_id / run_idlinkage
- tsordered timeline
- kindstate_transition, pr_opened, ci_failed
- actor_type / actor_idhuman, agent, system
- data_jsonstructured evidence payload
- id / task_id / run_idlinkage
- kindprompt, diff, PR, CI, summary
- uridurable pointer
- metadata_jsonshape varies by artifact type
- task_idprojection target
- linear_statuslast pushed state
- last_comment_hashavoid noisy duplicate comments
- projected_atsync timestamp
Dashboard wireframe, parent task / subtask observability
This is the view I’d want while running a parent initiative. Left for the frontier, center for exact task history, right for rescue and heat signals.
What this dashboard should answer instantly
- Which subtasks are actually runnable right now?
- Why is a blocked task blocked?
- What happened in the last failed run, exactly?
- Which tasks are consuming retries or human attention?
- What should the operator look at next?
Budget-aware packaging plan
To keep the OpenClaw workspace healthy, large architecture and orchestration material should live in artifacts, not in always-loaded prompt files. The goal is to keep root prompt context tiny and move operational complexity into skills, docs, and implementation repos.
Practical rule of thumb
- If humans need to read it once, publish or document it.
- If agents need to repeatedly follow it, make it a skill.
- If the runtime depends on it, put it in the implementation repo.
- If it must live in root prompt context, compress it to a pointer and one sentence.
Deterministic control loop
This is the operational heartbeat of the system, and it should be code, not vibes.
Suggested coarse Linear statuses mapped from richer internal state
- todo ← discovered, blocked-but-unstarted
- in_progress ← queued, coding, revising, awaiting_ci
- blocked ← blocked, awaiting_human, auth_or_permissions
- in_review ← awaiting_review, pr_open, awaiting_decision
- done ← completed