Skip to content

feat(report): live graph report endpoint + quipu_report MCP tool (hq-ct27)#32

Merged
scbrown merged 1 commit into
mainfrom
feat/report-endpoint-hq-ct27
Jun 30, 2026
Merged

feat(report): live graph report endpoint + quipu_report MCP tool (hq-ct27)#32
scbrown merged 1 commit into
mainfrom
feat/report-endpoint-hq-ct27

Conversation

@scbrown

@scbrown scbrown commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Closes hq-ct27 (aegis-1p0 Gap 4 — backend for the graph-report skill).

What

graphify's static GRAPH_REPORT.md, but live and queryable. A new read-only
tool_report synthesizes three views of the current graph in one immutable pass:

  • hubs ("god-nodes") — top entities by PageRank, with in_degree as a
    secondary signal
  • surprising_connections — low-prior cross-community edges: relationships
    that bridge two otherwise-separate Louvain communities. Rarer bridges
    (bridge_rarity = how many edges cross the same community pair) rank first;
    ties break toward bridges touching higher-PageRank endpoints
  • suggested_questions — deterministic, template-generated prompts seeded by
    the hubs and bridges above

Plus a graph summary (nodes, edges, communities, modularity).

Surfaces

  • GET|POST /report (read-only; GET = defaults, POST = options body)
  • quipu_report MCP tool — registry now 24 tools default / 25 with owl
  • quipu report [--hubs N] [--surprises N] [--questions N] [--type IRI] [--predicate IRI] CLI
  • Docs: REST API + MCP tools reference updated

Reuses existing graph primitives (project / page_rank / in_degree /
louvain) — no new dependencies. Community membership here is emergent
clustering for surfacing, not an access boundary
(consistent with hq-2u3 / hq-zlph).

Tests

report::tests: three-section shape, hub PageRank ordering + in_degree
reporting, bridge-is-the-surprise (bridge_rarity == 1), determinism across
runs, limit handling. MCP definition count assertions bumped.

CI hygiene (quipu-strict): cargo fmt --check, cargo clippy -- -D warnings -A missing-docs (default / --no-default-features / --features shacl), and
cargo test (same matrix) all green locally.

🤖 Generated with Claude Code

…ct27)

graphify's GRAPH_REPORT.md equivalent, but live/queryable. New read-only
`tool_report` (src/report.rs) synthesizes three views in one immutable pass:

- hubs ("god-nodes"): top entities by PageRank, in-degree as secondary signal
- surprising_connections: low-prior cross-community edges — bridges between
  otherwise-separate Louvain communities, rarer bridges (bridge_rarity) first,
  ties broken toward higher-PageRank endpoints
- suggested_questions: deterministic templates seeded by hubs + bridges

Wiring: GET|POST /report (read-only, GET = defaults), quipu_report MCP tool
(24 tools default / 25 with owl), `quipu report` CLI subcommand. Reuses the
existing graph primitives (project/page_rank/in_degree/louvain) — no new deps.
Communities are emergent clustering for surfacing, not an access boundary.

Tests: three-section shape, hub PageRank ordering + in_degree reporting,
bridge-is-the-surprise, determinism across runs, limit handling. fmt + clippy
(default/--no-default-features/--features shacl) + tests all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H7b5eTqAZrisQN6NJ4Kn2z
@scbrown
scbrown merged commit 746dc06 into main Jun 30, 2026
10 checks passed
scbrown added a commit that referenced this pull request Jul 14, 2026
Louvain community detection (#31), live graph report + quipu_report tool (#32),
episode-scoped retraction (#33), and --base-ns/--timestamp CLI flags (#34).

Manual release: release-plz's release-pr step is blocked by the repo's
"Actions may not create PRs" setting (403); cutting the tag + GitHub release by
hand per the established fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsuPDxSUjMYqHvQyPvSAPW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant