Skip to content

feat: graph visualization scaling + auto-publish governance - #3

Merged
simonperegrinvs merged 2 commits into
mainfrom
feat/psi-literature-map
Feb 18, 2026
Merged

simonperegrinvs merged 2 commits into
mainfrom
feat/psi-literature-map

Conversation

@simonperegrinvs

Copy link
Copy Markdown
Owner

Summary

  • Clustered graph layout — Category-based Dagre compound layout with collapsible cluster boundaries, degree-scaled node sizing, and overlap resolution
  • Interactive filter panel — Filter by category, edge trust threshold, source API, date range, node type, review status, recent changes; focus mode (k-hop ego graph) with configurable hop count
  • Pre-publish governance — Validation gate with daily node caps, required-field checks, duplicate rejection, configurable via .mpsi-governance.json; batch import auto-snapshots and aborts on validation errors unless --force
  • Snapshot management — Immutable dated snapshots to research/snapshots/ with save/list/show/diff/rollback CLI commands
  • Extended audit trail — Audit entries now include aiRationale, validationErrors, and cap-exceeded outcome

New files (8)

File Purpose
src/lib/graph-utils.ts BFS ego graph, node degrees/sizes, filter pipeline, overlap resolution
src/domain/publish-validation.ts Pre-publish validation gate (node/ref validation, daily caps, trust deltas)
src/agent/governance.ts .mpsi-governance.json config load/save
src/agent/snapshot.ts Snapshot save/list/load/rollback
src/components/graph/ClusterNode.tsx Cluster boundary renderer
src/components/graph/FilterPanel.tsx Filter controls sidebar
src/cli/commands/governance.ts governance config/validate/audit/stats CLI
src/cli/commands/snapshot.ts snapshot save/list/show/diff/rollback CLI

Modified files (13)

types.ts, layout.ts, graph-store.ts, audit.ts, batch.ts, GraphCanvas.tsx, TrustNode.tsx, GraphToolbar.tsx, AppShell.tsx, index.css, CLI index, README.md, CLI.md

Test plan

  • npx tsc --noEmit passes (verified)
  • npx eslint src/ --quiet passes (verified)
  • All 62 existing tests pass (verified)
  • npx vite build succeeds (verified)
  • npm run mpsi -- governance config --show displays defaults
  • npm run mpsi -- snapshot save creates snapshot in research/snapshots/
  • npm run mpsi -- snapshot list lists snapshots
  • npm run mpsi -- batch import --input test.json runs publish gate, auto-snapshots
  • Visual: load graph in web UI, verify filter panel opens, cluster boundaries render, recent-change glow appears

🤖 Generated with Claude Code

simonperegrinvs and others added 2 commits February 18, 2026 19:25
Add clustered graph layout with interactive filtering (categories, trust
threshold, source API, date range, focus mode) and pre-publish governance
guardrails (daily caps, required fields, duplicate rejection, snapshots).

New files: graph-utils.ts, publish-validation.ts, governance.ts,
snapshot.ts, ClusterNode.tsx, FilterPanel.tsx, governance CLI, snapshot CLI.
Modified: types.ts, layout.ts, graph-store.ts, audit.ts, batch.ts,
GraphCanvas, TrustNode, GraphToolbar, AppShell, CLI index.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…liance

publish-validation.ts imports from src/agent/ (audit.ts, dedup.ts) which
use Node.js fs/path. The app tsconfig excludes src/agent/ and has no Node
types, so placing it in src/domain/ caused tsc -b to fail. Also fix
GovernanceConfig cast to use double-cast via unknown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonperegrinvs
simonperegrinvs merged commit 7a37fd1 into main Feb 18, 2026
1 check passed
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