Skip to content

Tooling: static path enumerator over a ruleset (fathom paths) — coverage + procedure-graph export #158

Description

@se-jo-ma

Context. Fathom has no traversable procedure graph and no path enumerator, yet its rulesets are decision graphs (the committed SSVC pack enumerates a decision tree one-rule-per-branch via action: route + metadata.decision). A static enumerator turns the implicit rule/module graph into an explicit F=(N,E,n0,T) over acyclic paths — useful today as rule-pack coverage tooling, and later as a seed corpus for compile-to-weights.

Proposal. New src/fathom/flowgraph.py (NOT paths.pyfathom.integrations.paths already exists for path-jailing) + a fathom paths <ruleset> CLI.

  • Build a static producer/consumer DAG: each rule = an edge whose LHS templates are consumed and RHS asserts produced; modules + focus_order give hub ordering; terminal actions (allow/deny/escalate, or route+metadata.decision) = terminal nodes.
  • Walk MAIN→focus modules emitting acyclic paths; per-path emit ordered rule_trace, hubs crossed, terminal. JSON export for an external dialogue generator.

Where.

  • Derive nodes/edges from compiler.compile_module (compiler.py:328) + compile_focus_stack (compiler.py:491); rule LHS FactPattern consumers / RHS AssertSpec producers (models.py:165, models.py:191). Reuse module::rule trace format from evaluator._capture_trace (evaluator.py:89-113). Mirror inverse precedent scripts/generate_ssvc_rules.py.

Acceptance criteria.

  • fathom paths <ruleset> lists acyclic paths with ordered rule trace + terminal per path; JSON export.
  • Coverage view: which rules/terminals are unreachable.
  • Per-module bounding + dedup-by-terminal to cap combinatorial blowup.

Honest framing (medium confidence). Forward-chaining graphs are not truly acyclic and activation is fact-dependent — this is a static over-approximation, not symbolic execution, and may emit infeasible paths. Must be documented as such.


Source: arXiv:2605.22502v1 — "Compiling Agentic Workflows into LLM Weights" (subterranean agents). Distilled from arXiv-research/2605.22502v1/analysis.md; file refs verified against current main by the analysis pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority: roadmap gap or DX/toolingcliCLI (validate, test, bench, info, repl)enhancementNew 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