Skip to content

Compile-to-weights ②: workflow -> training-dataset builder (stargraph compile-data) #166

Description

@se-jo-ma

Pipeline block ② (Data: workflow → training dataset). Part of the compile-to-weights epic.

Context. Full-parameter fine-tuning a small model to internalize a workflow needs a corpus of natural dialogues that traverse the procedure with no procedural annotations (the paper's minimal-prompt training format). stargraph already owns the path-validity primitive (Graph.simulate) and rich run-trajectory capture, but nothing renders them into a fine-tune dataset.

Proposal. New stargraph compile-data verb producing JSONL, from two sources:

  • Cold (no run history): enumerate acyclic node paths over NodeSpec/RuleSpec (GotoAction.target ir/_models.py:77, ParallelAction.targets:91, HaltAction:80), replay each through Graph.simulate (graph/definition.py:431, SimulationResult.rule_firings:499) to confirm the rule engine fires that path, then render turn-by-turn dialogue via the DSPy/LiteLLM seam. Sample, don't fully enumerate (path explosion).
  • Warm (from real runs): distill Checkpoint records (checkpoint/protocol.py:34) + Event stream (runtime/events.py:52, esp. ToolCallEvent/ToolResultEvent/TransitionEvent) + ReactState.trajectory (skills/react.py:55-79) + the audit JSONL (audit/jsonl.py).
  • Output: dialogues with NO procedural annotations; record source graph_hash + a dataset content hash for provenance.

Acceptance criteria.

  • compile-data emits JSONL from both cold (simulate) and warm (checkpoints/events) sources.
  • Each cold sample is confirmed valid by Graph.simulate before inclusion.
  • Cyclic graphs (RetryAction ir/_models.py:97, interrupt loops) handled via a cycle cap, not naive acyclic enumeration.
  • Dataset stamped with source graph_hash + dataset hash.

Caveat. Closed-loop dependence on one frontier model for cold dialogue rendering is the paper's own flagged limitation.


Source: arXiv:2605.22502v1 — "Compiling Agentic Workflows into LLM Weights" (subterranean agents). Part of the end-to-end compile-to-weights pipeline epic; file refs verified against current main. Determinism: per-graph knob (fully-compiled | hybrid | rules-only) defaults to honor #117 (no learned core router).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority: roadmap gap or DX/toolingarea/runtimeGraphRun, dispatch, lifecycle, mirrorenhancementNew feature or requestsize/L<1 week: cross-cutting feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions