Add a State Hub workplan/wait graph as a Fabric explorer mode.
Coordination is a view, not topology. Open workplans and wait tasks project into graph-explorer; citation edges recover depends_on from task prose. UI: /ui/graph-explorer?mode=coordination. Assistant: grok Assistant-Session: 01a09dc1-b21e-77e1-919e-fcad2f82b267
This commit is contained in:
parent
18fabb37ce
commit
b7724dedea
8 changed files with 366 additions and 2 deletions
|
|
@ -84,7 +84,8 @@ def build_parser() -> argparse.ArgumentParser:
|
|||
|
||||
export = sub.add_parser("export", help="Export graph as JSON, Mermaid, graph-explorer, or financial payload.")
|
||||
export.add_argument("paths", nargs="*", type=Path, default=[Path(".")])
|
||||
export.add_argument("--format", choices=["json", "mermaid", "graph-explorer", "financial"], default="json")
|
||||
export.add_argument("--format", choices=["json", "mermaid", "graph-explorer", "financial", "coordination"], default="json")
|
||||
export.add_argument("--state-hub", default=None, help="State Hub API base for --format coordination")
|
||||
|
||||
scan = sub.add_parser("scan", help="Scan a repo for deterministic discovery candidates.")
|
||||
scan.add_argument("path", nargs="?", type=Path, default=Path("."))
|
||||
|
|
@ -347,6 +348,12 @@ def main(argv: list[str] | None = None) -> int:
|
|||
return 0
|
||||
|
||||
if args.command == "export":
|
||||
if args.format == "coordination":
|
||||
from .coordination_graph import coordination_graph_payload, default_hub, fetch_hub_lists
|
||||
|
||||
workplans, tasks = fetch_hub_lists(args.state_hub or default_hub())
|
||||
print(json.dumps(coordination_graph_payload(workplans, tasks), indent=2, sort_keys=True))
|
||||
return 0
|
||||
graph = _load_graph_or_exit(args.paths)
|
||||
export_payload = _export_with_provenance(graph.to_export(), args.paths)
|
||||
if args.format == "mermaid":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue