Add a committable, provenance-tagged knowledge graph layer with CLI generation and query support. - Extract TypeScript, Markdown, and FNXC knowledge into deterministic graph nodes and edges. - Persist recoverable graph artifacts outside ignored Fusion state and expose build/query CLI commands. - Document configuration and add core and CLI coverage for graph structure, serialization, and recovery. Files changed: .changeset/fn-8921-knowledge-graph.md | 7 + .gitattributes | 3 + AGENTS.md | 1 + docs/README.md | 2 + docs/cli-reference.md | 4 + docs/knowledge-graph.md | 37 +++++ docs/settings-reference.md | 4 + docs/storage.md | 2 + packages/cli/package.json | 3 +- .../__tests__/knowledge-graph-bundle-shape.test.ts | 4 + .../src/__tests__/knowledge-graph-command.test.ts | 115 ++++++++++++++ packages/cli/src/bin.ts | 19 +++ packages/cli/src/commands/knowledge-graph.ts | 79 ++++++++++ packages/cli/tsup.config.ts | 2 + packages/core/package.json | 4 +- packages/core/src/config/settings-schema.ts | 2 + packages/core/src/index.ts | 1 + .../__tests__/derive-modules.test.ts | 11 ++ .../__tests__/extract-file-composition.test.ts | 20 +++ .../knowledge-graph/__tests__/extract-fnxc.test.ts | 33 ++++ .../__tests__/extract-markdown.test.ts | 21 +++ .../__tests__/extract-typescript.test.ts | 30 ++++ .../__tests__/file-discovery.test.ts | 26 ++++ .../graph-artifact-not-gitignored.test.ts | 15 ++ .../__tests__/graph-builder-equivalence.test.ts | 76 ++++++++++ .../__tests__/graph-builder-incremental.test.ts | 52 +++++++ .../__tests__/graph-identity.test.ts | 11 ++ .../knowledge-graph/__tests__/graph-query.test.ts | 13 ++ .../__tests__/graph-serialization.test.ts | 29 ++++ .../__tests__/graph-store-recovery.test.ts | 106 +++++++++++++ .../__tests__/resolve-imports.test.ts | 10 ++ .../core/src/knowledge-graph/derive-modules.ts | 4 + packages/core/src/knowledge-graph/extract-file.ts | 6 + packages/core/src/knowledge-graph/extract-fnxc.ts | 168 +++++++++++++++++++++ .../core/src/knowledge-graph/extract-markdown.ts | 9 ++ .../core/src/knowledge-graph/extract-typescript.ts | 107 +++++++++++++ .../core/src/knowledge-graph/file-discovery.ts | 85 +++++++++++ packages/core/src/knowledge-graph/graph-builder.ts | 141 +++++++++++++++++ .../core/src/knowledge-graph/graph-manifest.ts | 4 + packages/core/src/knowledge-graph/graph-query.ts | 126 ++++++++++++++++ .../src/knowledge-graph/graph-serialization.ts | 134 ++++++++++++++++ packages/core/src/knowledge-graph/graph-store.ts | 97 ++++++++++++ packages/core/src/knowledge-graph/graph-types.ts | 54 +++++++ packages/core/src/knowledge-graph/index.ts | 14 ++ .../core/src/knowledge-graph/resolve-imports.ts | 4 + packages/core/src/types/settings/settings-scope.ts | 2 + pnpm-lock.yaml | 12 +- 47 files changed, 1700 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-8921 Fusion-Task-Lineage: 7014d0f1-fc47-454b-afe5-5f0d9b229f33 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
22 lines
1.4 KiB
Plaintext
22 lines
1.4 KiB
Plaintext
# FNXC:RepoAssets 2026-06-25-09:00:
|
|
# Demo reel GIFs dominate repo size (the same captures get re-shot and re-committed,
|
|
# and git keeps every old blob forever). Route them through Git LFS so the binaries
|
|
# live outside the packfile and future regenerations stop bloating .git.
|
|
# Scoped to demo/assets/*.gif (track-forward only — existing history was left intact).
|
|
demo/assets/*.gif filter=lfs diff=lfs merge=lfs -text
|
|
|
|
# FNXC:RepoAssets 2026-06-25-09:40:
|
|
# Documentation/marketing PNG screenshots are pure doc assets (referenced only from
|
|
# markdown, rendered by GitHub) so they are safe to route through LFS alongside the GIFs.
|
|
# IMPORTANT: scope to doc/demo dirs ONLY. App-runtime/build images must stay as real
|
|
# blobs because a build env without LFS hydration would otherwise embed a pointer stub:
|
|
# - packages/dashboard/app/public/icons/*.png (PWA manifest icons, served)
|
|
# - packages/desktop/src/icons/*.png (Electron app/tray icons, packaged)
|
|
# - packages/dashboard/app/public/fonts/SymbolsNerdFontMono-Regular.ttf (@font-face src)
|
|
demo/**/*.png filter=lfs diff=lfs merge=lfs -text
|
|
docs/screenshots/**/*.png filter=lfs diff=lfs merge=lfs -text
|
|
screenshots/**/*.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
# FNXC:RepoAssets 2026-08-10-10:00: Graph JSON is byte-stable across platforms only when Git retains LF endings.
|
|
.fusion-knowledge/**/*.json text eol=lf
|