Skip to content

Epic: Work Graph — explicit task-DAG orchestration (graph engineering) #209

Description

@rdfitted

Why

hive-manager has exactly one formal graph (the Knowledge Atlas — typed edges, degrees, force layout, tests) while work and agent orchestration is a tree plus a flat queue: PlanTask has no depends_on, the run queue is FIFO-with-lease, blocking is workers polling a markdown ## Status: line, sequencing is "Phase 1/2/3" prose interpreted by the LLM, and TaskGraph has been a TODO placeholder at src-tauri/src/orchestrator/planner.rs:15 since the module was stubbed.

This epic makes the work graph real. The plan artifact becomes a typed graph the Master Planner emits and the scheduler enforces; review becomes structure instead of discipline; and the two knowledge systems we already run (per-repo .ai-docs/ project DNA + the institutional wiki) plus the deterministic code graph (/codegraph) feed the work graph as first-class inputs.

Reference framing: org graph (stable roles) vs work graph (ephemeral per-session task DAG). Templates are institutional; instances are ephemeral and archived.

Architecture invariants (apply to every child issue)

  1. Provenance is a first-class edge attribute from the first schema draft: planner | codegraph | knowledge | runtime. Never mix classes in a way consumers can't distinguish.
  2. Anti-hub guardrail: no node may be linked from a high fraction of all nodes. Context/gotcha nodes attach by scope-intersection, never broadcast.
  3. The graph never grades its own homework: effectiveness verdicts come from a separate evaluator (feat(retro): post-run graph retro — independent evaluator, topology-effectiveness metrics, learnings output #217), land as unreviewed learnings, and are graded by the existing curation pipeline.
  4. Knowledge nodes are derived views: sourced from .ai-docs/ + wiki at instantiation, rebuildable, no write-back from the work graph.
  5. Backward compatible: a plan with no dependency edges behaves exactly like today (all tasks immediately ready).

Children

Phase 1 — substrate (strictly ordered)

Phase 2 — governance + evidence (parallel after #210)

Phase 3 — knowledge interlock

Phase 4 — the compound loop

Supporting (schedule opportunistically)

Dependency graph

#210 schema ──► #211 planner emission ──► #212 readiness-gated queue
   │                                          │
   ├──► #213 review subgraphs                 │
   ├──► #214 runtime recording ───────────────┼──► #217 retro
   │        │                                 │      ▲
   │        └──► #227 API ──► #220 viz     │      │
   │                                          ▼      │
   └──► #218 gotcha nodes ◄── #215 codegraph ──► #216 templates
                (touches)        (repo shape)  (lineage feeds retro)

#219 transition table — independent

Critical path: #210 → #211 → #212 (ships standalone value: real dependency scheduling). Everything else compounds on top.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestscope:work-graphExplicit task-DAG orchestration (graph engineering)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions