Adapt the coordination graph to flavor and indexed depends_on.
Omit flavor=residual by default, draw hub depends_on first, and keep citation waits_on as a tagged fallback. Explorer checkbox and CLI --include-residuals match State Hub include_residuals. Assistant: grok Assistant-Session: 01a09dc1-b21e-77e1-919e-fcad2f82b267
This commit is contained in:
parent
0b0abedbe8
commit
725e440b1e
8 changed files with 410 additions and 39 deletions
|
|
@ -86,6 +86,11 @@ def build_parser() -> argparse.ArgumentParser:
|
|||
export.add_argument("paths", nargs="*", type=Path, default=[Path(".")])
|
||||
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")
|
||||
export.add_argument(
|
||||
"--include-residuals",
|
||||
action="store_true",
|
||||
help="Include flavor=residual workplans in --format coordination (default omits them)",
|
||||
)
|
||||
|
||||
scan = sub.add_parser("scan", help="Scan a repo for deterministic discovery candidates.")
|
||||
scan.add_argument("path", nargs="?", type=Path, default=Path("."))
|
||||
|
|
@ -352,7 +357,17 @@ def main(argv: list[str] | None = None) -> int:
|
|||
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))
|
||||
print(
|
||||
json.dumps(
|
||||
coordination_graph_payload(
|
||||
workplans,
|
||||
tasks,
|
||||
include_residuals=args.include_residuals,
|
||||
),
|
||||
indent=2,
|
||||
sort_keys=True,
|
||||
)
|
||||
)
|
||||
return 0
|
||||
graph = _load_graph_or_exit(args.paths)
|
||||
export_payload = _export_with_provenance(graph.to_export(), args.paths)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue