Generates fake knowledge-graph.json with configurable node count
for testing Web Worker layout performance. Forward-only edges to
avoid dagre stack overflow on cyclic graphs.
Usage: node scripts/generate-large-graph.mjs [nodeCount]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes#14 — dashboard becomes unusable with large knowledge graphs (2,700+ nodes).
- Web Worker for dagre layout: graphs above 200 nodes compute layout off the
main thread via a dedicated Web Worker, keeping the UI responsive
- Request ID correlation: concurrent layout calls are routed by incrementing
request ID, preventing race conditions where results cross-wire
- Worker error handling: onerror rejects pending promises; GraphView catches
errors and clears the loading spinner
- Cancellation cleanup: effect cleanup clears layouting state to prevent
stuck spinners when the graph switches below the async threshold
- Topology/visual split: dagre only re-runs when graph structure changes;
node selection, tour highlights, and search results are applied as a
cheap O(n) overlay without triggering relayout
- React.memo on CustomNode: prevents O(n) re-renders when selecting
individual nodes in large graphs
- Zero overhead for small graphs: below 200 nodes, the original synchronous
layout path is used unchanged
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Set minZoom to 0.01 so fit-view works on graphs with hundreds of nodes
- Add TourFitView to pan/zoom to highlighted nodes during guided tours
- Add SelectedNodeFitView to center graph on node selected via search
- Wrap GraphView in ReactFlowProvider to enable useReactFlow() hooks
Thanks to @blackboxaicode for the insight on these improvements.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The original commit 9fe003a introduced normalization logic in three
separate places (Phase 4 inline, Phase 5 inline, Phase 5.5), creating
an ordering conflict where "do not use field X" rules appeared before
"convert field X to field Y" rules. An LLM following instructions
sequentially could drop legacy fields before converting them.
- Consolidate all layer normalization into Phase 4 as ordered steps
- Consolidate all tour normalization into Phase 5 as ordered steps
- Remove redundant Phase 5.5 entirely
- Fix misleading "from current prompt" comments about envelope format
- Add defensive handling for nodes-as-objects edge case
- Wrap JSON examples in arrays for visual consistency with prompts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update raw GitHub URLs in README to remove understand-anything-plugin/
prefix for Codex and OpenClaw INSTALL.md paths. Replace Cursor section
with auto-discovery via .cursor-plugin/plugin.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add .cursor-plugin/plugin.json with skills/agents paths pointing into
understand-anything-plugin/. Add .claude-plugin/plugin.json alongside
existing marketplace.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move .codex/, .opencode/, .openclaw/ from understand-anything-plugin/ to
repo root so each AI coding platform discovers its config at the standard
location. Delete .cursor/ (replaced by .cursor-plugin/plugin.json in next
commit). Plugin source code stays inside understand-anything-plugin/.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace full flatten approach with minimal restructure: only move platform
config directories (.codex, .opencode, .openclaw) to repo root for discovery.
Add Cursor/Claude plugin descriptors. Remove Gemini extension. Keep all
plugin source code inside understand-anything-plugin/.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all named agent dispatches (project-scanner, file-analyzer,
architecture-analyzer, tour-builder, graph-reviewer) with subagent
dispatches using prompt template files. Add context injection for each
phase including README content, package manifest, directory tree,
framework-specific guidance, and cross-validation data.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each subagent dispatch now injects relevant context from the main session:
- Scanner: README + package manifest
- File Analyzer: framework info + project description from Phase 1
- Architecture Analyzer: framework layer hints + directory tree
- Tour Builder: README + entry point
- Graph Reviewer: scan inventory for cross-validation + phase warnings
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Guard diffNodeIds construction and per-edge lookups behind diffMode
check to avoid unnecessary Set spreads and has() calls on every
graph recompute when diff mode is inactive.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Edge weights, node ID prefix conventions, and tag formatting were listed
in both Check 1 (Schema Validation — Critical) and Check 7 (Quality —
Warning). A deterministic script following check headings would classify
these as warnings, potentially approving invalid graphs. Remove the
duplicates from Check 7 since Check 1 already covers them as critical.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The exclusion rule conditionally kept .sh files for bash-first projects,
but the source-file whitelist and language mapping table had no .sh entry,
causing retained shell files to be dropped or untyped. Add .sh/.bash to
the whitelist and language table (mapped to 'bash'), and remove the
conditional exclusion rule.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Duplicate node IDs were listed under Check 6 (Warning) but classified as
critical in the Severity Classification section. A script following check
headings would classify duplicates as warnings, letting invalid graphs
pass review. Move duplicate-ID check to its own Check 5 (Critical) and
renumber subsequent checks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Redesign all 5 agent prompts with a "Phase 1 — Script" + "Phase 2 — LLM
Reasoning" structure. Agents now write and execute scripts for deterministic
work (validation, file discovery, structure extraction, graph analysis)
before applying LLM judgment for semantic tasks (summaries, tags, pedagogy).
Key changes per agent:
- graph-reviewer: script performs all 6 validation checks deterministically
- project-scanner: script handles file discovery, language detection, line counting
- file-analyzer: script extracts functions/classes/imports via regex patterns
- architecture-analyzer: script computes import adjacency, inter-group frequency
- tour-builder: script calculates fan-in, BFS traversal, cluster detection
Design safeguards:
- scriptCompleted sentinel field guards against partial script output
- Batch-indexed temp paths prevent collision in concurrent file-analyzer agents
- Explicit "trust the script" directives prevent LLM from re-reading raw data
- Up to 2 script retries on failure
- Explicit instructions to strip intermediate fields from final output
- Bash tool added to all agent tool lists
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously only FILE nodes responded to clicks with the code viewer overlay.
Now all node types open the detail viewer on click. Also added a direct click
handler on CustomNode to fix click events not firing for child nodes inside
group layers on Windows.
Bump version to 1.0.4.
Add Vite resolve aliases for core subpath exports (schema, search, types)
to fix import resolution on Windows where Node.js package exports are not
properly followed by Vite's import analysis.
Bump version to 1.0.3.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add pnpm-workspace.yaml to plugin distribution so workspace:* deps resolve on install
- Add devlop and hast-util-to-jsx-runtime as explicit dashboard dependencies (pnpm strict hoisting)
- Make tsconfig.json files self-contained to work outside monorepo root
- Add prepare script to auto-build core package after pnpm install
- Bump version to 1.0.2
The nested plugin.json inside understand-anything-plugin/.claude-plugin/
conflicted with the root marketplace.json, causing Claude Code to fail
when installing the plugin in user scope with "Source path does not exist" error.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>