Skip to content

Compile-to-weights ①: GraphAuthorSkill — generate a workflow IR from a prompt #165

Description

@se-jo-ma

Pipeline block ① (Generate: prompt → workflow IR). Part of the compile-to-weights epic.

Context. There is no surface that turns a natural-language workflow description into a stargraph graph. authoring.DurableGraph (authoring.py:218-438) synthesizes an IRDocument from caller-supplied functions + an edge map, but at compile time only — no LLM generation, no prompt input. The compile-to-weights story starts with "given a prompt for a workflow, generate the workflow."

Proposal. New GraphAuthorSkill that emits a validated IRDocument from an NL prompt.

  • Backbone: the existing DSPy/LiteLLM seam (adapters/dspy.py bind(), nodes/dspy.py), default Claude — schema-constrained generation.
  • Validate: IRDocument.model_validate(...) → construct Graphstructural_hash (graph/hash.py:6) → a verify pass (node-kind resolvability via cli/run.py:_resolve_node_factory:260, rule/goto target integrity). Reject + repair-loop on invalid IR.
  • Human-review gate before anything downstream compiles (generated graph is reviewed, then frozen by hash).

Where.

  • New src/stargraph/skills/graph_author/_skill.py (model on skills/extract/ or skills/triage/); register via stargraph.skills entry point (relates to [P2] EPIC: Rules + Skills + Plugins discovery registry #42).
  • Reuse authoring.DurableGraph._build_graph (authoring.py:288-313) IR-synthesis path.

Acceptance criteria.

  • Prompt → IRDocument that passes model_validate + node-kind resolution + structural hashing.
  • Invalid generations trigger a bounded repair loop, not a crash.
  • Generated graph is content-hash-frozen and surfaced for human review before compile.

Caveat. Open-ended generation can emit unresolvable node kinds / dangling goto targets — the verify pass is mandatory, not optional. Relates to #43 (KG-augmented authoring), #42 (discovery registry).


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/skillsSkill bundles + reference skillsenhancementNew feature or requestneeds-designDesign not yet settled — please don't open a PR yetsize/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