@jlongo78/agent-spaces 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.claude/settings.local.json +55 -0
- package/.next/standalone/.claude/spaces-env.json +1 -0
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -1
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +27 -3
- package/.next/standalone/.next/required-server-files.json +19 -19
- package/.next/standalone/.next/routes-manifest.json +6 -0
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/cortex/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/cortex/page/react-loadable-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/cortex/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.rsc +7 -6
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +7 -6
- package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.html +1 -1
- package/.next/standalone/.next/server/app/admin/users.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.html +1 -1
- package/.next/standalone/.next/server/app/analytics.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/assess/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/publish/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/refine/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/review/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/curation/seed/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/export/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/pending/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/resolve/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/federation/teach/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/edges/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/entities/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/graph/populate/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/import/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/bootstrap/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/ingest/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/knowledge/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/lobes/share/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/browse/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/marketplace/preview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/call/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/mcp/tools/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/settings/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/timeline/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/usage/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/cortex/workspace/[id]/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/cortex.html +1 -1
- package/.next/standalone/.next/server/app/cortex.rsc +3 -3
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects.html +1 -1
- package/.next/standalone/.next/server/app/m/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions.html +1 -1
- package/.next/standalone/.next/server/app/m/sessions.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/settings.html +1 -1
- package/.next/standalone/.next/server/app/m/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page/build-manifest.json +3 -3
- package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal.html +1 -1
- package/.next/standalone/.next/server/app/m/terminal.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.html +1 -1
- package/.next/standalone/.next/server/app/m.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.html +1 -1
- package/.next/standalone/.next/server/app/network.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.html +1 -1
- package/.next/standalone/.next/server/app/sessions.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.html +1 -1
- package/.next/standalone/.next/server/app/terminal.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/vr/page/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/vr/page/build-manifest.json +18 -0
- package/.next/standalone/.next/server/app/vr/page/next-font-manifest.json +11 -0
- package/.next/standalone/.next/server/app/vr/page/react-loadable-manifest.json +11 -0
- package/.next/standalone/.next/server/app/vr/page/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/vr/page.js +17 -0
- package/.next/standalone/.next/server/app/vr/page.js.map +5 -0
- package/.next/standalone/.next/server/app/vr/page.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/vr/page_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/vr.html +1 -0
- package/.next/standalone/.next/server/app/vr.meta +15 -0
- package/.next/standalone/.next/server/app/vr.rsc +21 -0
- package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +21 -0
- package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +6 -0
- package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/vr.segments/vr/__PAGE__.segment.rsc +9 -0
- package/.next/standalone/.next/server/app/vr.segments/vr.segment.rsc +4 -0
- package/.next/standalone/.next/server/app/workspaces.html +1 -1
- package/.next/standalone/.next/server/app/workspaces.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0041efe4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__00bf0ace._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08a68343._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0add852f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c113ed0._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e1a27e0._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e71d908._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e9142f3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__10e47926._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1194f2c1._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1665dc78._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__175cbabf._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c2d094._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1adae357._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1d359752._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1e8fabeb._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1f8deca0._.js +8 -8
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__253fdda1._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__28e6434f._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a386564._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2acbd703._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2acefabb._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2c20fb38._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__309132cd._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__33fec964._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3786d8ae._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3ae92407._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3beda9fe._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3e3f25a1._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4619e9bd._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a051043._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__50208a5f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__508002e4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5086c373._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5913e097._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5b5f68d2._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c1f2459._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5ec8c977._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f8c694a._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__63cebc6c._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__64d30d4d._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c54fc2e._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6dc1fb7e._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6e568102._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__6faa04c0._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__727d05f1._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__74a34dc3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__75d12b32._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7e7250a4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8309e0a4._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__86cc0e2b._.js +6 -6
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8915603e._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__89c2565a._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d178ad9._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__93ee06f3._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e4c154a._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fbc199._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9d2e1d3._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ae53d343._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b3a04cef._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b4270b77._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b6b6ce60._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b9545dd9._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c200e21a._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c3c74ca4._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c88b63f7._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cba5f007._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cbf4ceb0._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cefdba2f._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cf9e82bb._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d15515e3._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d2897392._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d3b2d856._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d73273ca._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d8417eb6._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__db4726bc._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dc2a55de._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dc6e2e5f._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e0d4690b._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3ecfd17._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e678dd53._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e9223f55._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ea630076._.js +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__eb8acb65._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f26ca49d._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f33e1101._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f3a4c668._.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f515f865._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fceb5d60._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fed41403._.js +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff2e98c2._.js +2 -2
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_339169c8.js +1 -1
- package/.next/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_97dac613.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0d8d81ca._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1425c64f._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1d2ce8f1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__31137509._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__3633a587._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__3c79441b._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__4ca0f26b._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__5b90d3ad._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__62a0b363._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__68205a46._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__69fd2efa._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__85dcf0f7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__8c53a5da._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__aecb1873._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__b02cd143._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__b9bcde11._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__cac90169._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__d25de2f0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e2f86be8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__ee626b5b._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__f39a9e98._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__f3c566cd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__f76aa221._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_149d7fd4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_2e0dd6a7._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_3cd2355c._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_3d206597._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/_47cc9af0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_5cf334fd._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_7082788b._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_7154d8ae._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_75bb1b9a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_aeeff784._.js → _81abf587._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_8acf81e2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_8c36feb8._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_91e9bb86._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_ac4c1838._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_ad8515fc._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_b1f49e81._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_c0fe7614._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_d4825f5a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_da10a9f4._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_db0abd0a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_dee5d4a1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_ef482c0c._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_efe43d2f._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_f4a4e116._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_f4d525d2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_f4e57187._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_vr_page_actions_3fb70d92.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/node_modules_32f9d62f._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02f39477.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_40fa36ce._.js +7 -0
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_cortex_page_tsx_0f33d8b3._.js +3 -0
- package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__32a0045c._.js +1 -1
- package/.next/standalone/.next/server/edge/chunks/_d73df637._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware-manifest.json +5 -5
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.json +4 -0
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/045c83caa4d15373.js +1 -0
- package/.next/standalone/.next/static/chunks/07ea09e6024a523b.js +1 -0
- package/.next/standalone/.next/static/chunks/232d8aae4fefab70.js +1 -0
- package/.next/standalone/.next/static/chunks/2ad22562bb37ecad.js +1011 -0
- package/.next/standalone/.next/static/chunks/396eac60f496f178.js +1 -0
- package/.next/standalone/.next/static/chunks/{a4e5c700421eaa46.js → 412140a02893327a.js} +1 -1
- package/.next/standalone/.next/static/chunks/481cc11ae80b08b1.js +1 -0
- package/.next/standalone/.next/static/chunks/5325351ef49cb65f.js +1 -0
- package/.next/standalone/.next/static/chunks/559735e598ca3cbb.js +1 -0
- package/.next/standalone/.next/static/chunks/59c63d5af5cf3daf.js +1 -0
- package/.next/standalone/.next/static/chunks/5d5d7b0095dd52ae.js +1 -0
- package/.next/standalone/.next/static/chunks/6ae575967d091df4.js +1 -0
- package/.next/standalone/.next/static/chunks/7a7c0d9d875332a3.js +1 -0
- package/.next/standalone/.next/static/chunks/7f8455bb855a6c84.js +1 -0
- package/.next/standalone/.next/static/chunks/898f380eba90427a.js +1 -0
- package/.next/standalone/.next/static/chunks/95339e55722bb4ca.js +5 -0
- package/.next/standalone/.next/static/chunks/9cd594813c539df9.js +1 -0
- package/.next/standalone/.next/static/chunks/ad1423eed05d129b.js +1 -0
- package/.next/standalone/.next/static/chunks/ae7b146884c67d2a.js +1 -0
- package/.next/standalone/.next/static/chunks/b84072d72aa86417.js +1 -0
- package/.next/standalone/.next/static/chunks/c1a95aebf6725f64.css +3 -0
- package/.next/standalone/.next/static/chunks/c515eb77d9410aa0.js +5 -0
- package/.next/standalone/.next/static/chunks/{9899cf4c2bdbe61d.js → d9ae203a7f123546.js} +2 -2
- package/.next/standalone/.next/static/chunks/e23f20b51a75a5bb.js +757 -0
- package/.next/standalone/.next/static/chunks/fdc09bd135846960.js +1 -0
- package/.next/standalone/.next/static/chunks/ff0196911449e745.js +1 -0
- package/.next/standalone/.next/static/chunks/{turbopack-4c21186b79fb4c10.js → turbopack-e1a0994ed4af988c.js} +1 -1
- package/.next/standalone/.spaces/cortex-context.md +70 -0
- package/.next/standalone/bin/cortex-hook.sh +62 -62
- package/.next/standalone/bin/cortex-mcp.js +60 -60
- package/.next/standalone/docs/superpowers/plans/2026-03-13-cortex-wiring.md +1387 -1387
- package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-entity-graph.md +1923 -1923
- package/.next/standalone/docs/superpowers/plans/2026-03-14-cortex-v2-knowledge-evolution.md +1113 -1113
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-boundary-engine.md +853 -853
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-context-engine.md +1274 -1274
- package/.next/standalone/docs/superpowers/plans/2026-03-15-cortex-v2-signal-ingestion.md +933 -933
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-lobes.md +1080 -1080
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-gravity-system.md +768 -768
- package/.next/standalone/docs/superpowers/plans/2026-03-16-cortex-v2-ui.md +1108 -1108
- package/.next/standalone/docs/superpowers/plans/2026-03-18-cortex-ui-integration.md +1846 -1846
- package/.next/standalone/docs/superpowers/specs/2026-03-13-cortex-wiring-design.md +268 -268
- package/.next/standalone/docs/superpowers/specs/2026-03-14-cortex-v2-design.md +623 -623
- package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-lobes-design.md +263 -263
- package/.next/standalone/docs/superpowers/specs/2026-03-16-cortex-v2-ui-design.md +240 -240
- package/.next/standalone/docs/superpowers/specs/2026-03-18-cortex-ui-integration-design.md +341 -341
- package/.next/standalone/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-linux-x64 → sharp-win32-x64}/package.json +39 -46
- package/.next/standalone/package.json +103 -102
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/app/(desktop)/cortex/page.tsx +78 -78
- package/.next/standalone/src/app/api/cortex/context/route.ts +78 -78
- package/.next/standalone/src/app/api/cortex/curation/assess/route.ts +27 -27
- package/.next/standalone/src/app/api/cortex/curation/publish/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/curation/refine/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/curation/review/route.ts +29 -29
- package/.next/standalone/src/app/api/cortex/curation/seed/route.ts +23 -23
- package/.next/standalone/src/app/api/cortex/export/route.ts +40 -40
- package/.next/standalone/src/app/api/cortex/federation/pending/route.ts +20 -20
- package/.next/standalone/src/app/api/cortex/federation/resolve/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/federation/search/route.ts +35 -35
- package/.next/standalone/src/app/api/cortex/federation/teach/route.ts +76 -76
- package/.next/standalone/src/app/api/cortex/graph/edges/route.ts +112 -112
- package/.next/standalone/src/app/api/cortex/graph/entities/[id]/route.ts +73 -73
- package/.next/standalone/src/app/api/cortex/graph/entities/route.ts +75 -75
- package/.next/standalone/src/app/api/cortex/graph/populate/route.ts +203 -203
- package/.next/standalone/src/app/api/cortex/import/route.ts +75 -75
- package/.next/standalone/src/app/api/cortex/import/status/route.ts +15 -15
- package/.next/standalone/src/app/api/cortex/ingest/bootstrap/route.ts +29 -29
- package/.next/standalone/src/app/api/cortex/ingest/status/route.ts +15 -15
- package/.next/standalone/src/app/api/cortex/knowledge/[id]/route.ts +91 -91
- package/.next/standalone/src/app/api/cortex/knowledge/route.ts +93 -93
- package/.next/standalone/src/app/api/cortex/lobes/[id]/route.ts +67 -67
- package/.next/standalone/src/app/api/cortex/lobes/route.ts +22 -22
- package/.next/standalone/src/app/api/cortex/lobes/share/route.ts +80 -80
- package/.next/standalone/src/app/api/cortex/marketplace/browse/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/marketplace/preview/route.ts +46 -46
- package/.next/standalone/src/app/api/cortex/mcp/call/route.ts +11 -11
- package/.next/standalone/src/app/api/cortex/mcp/tools/route.ts +6 -6
- package/.next/standalone/src/app/api/cortex/search/route.ts +43 -43
- package/.next/standalone/src/app/api/cortex/settings/route.ts +33 -33
- package/.next/standalone/src/app/api/cortex/status/route.ts +169 -169
- package/.next/standalone/src/app/api/cortex/timeline/route.ts +42 -42
- package/.next/standalone/src/app/api/cortex/usage/route.ts +31 -31
- package/.next/standalone/src/app/api/cortex/workspace/[id]/context/route.ts +41 -41
- package/.next/standalone/src/components/cortex/constants.ts +29 -29
- package/.next/standalone/src/components/cortex/cortex-dashboard.tsx +304 -304
- package/.next/standalone/src/components/cortex/cortex-indicator.tsx +44 -44
- package/.next/standalone/src/components/cortex/cortex-panel.tsx +140 -140
- package/.next/standalone/src/components/cortex/cortex-settings.tsx +221 -221
- package/.next/standalone/src/components/cortex/curation-tab.tsx +810 -810
- package/.next/standalone/src/components/cortex/entity-detail.tsx +101 -101
- package/.next/standalone/src/components/cortex/entity-graph.tsx +382 -382
- package/.next/standalone/src/components/cortex/import-dialog.tsx +212 -212
- package/.next/standalone/src/components/cortex/injection-badge.tsx +72 -72
- package/.next/standalone/src/components/cortex/knowledge-card.tsx +109 -109
- package/.next/standalone/src/components/cortex/knowledge-tab.tsx +158 -158
- package/.next/standalone/src/components/cortex/lobe-settings.tsx +215 -215
- package/.next/standalone/src/components/cortex/marketplace-card.tsx +126 -126
- package/.next/standalone/src/components/cortex/marketplace-tab.tsx +113 -113
- package/.next/standalone/src/lib/cortex/config.ts +40 -40
- package/.next/standalone/src/lib/cortex/debug.ts +10 -10
- package/.next/standalone/src/lib/cortex/distillation/usage-store.ts +18 -18
- package/.next/standalone/src/lib/cortex/graph/resolver.ts +10 -10
- package/.next/standalone/src/lib/cortex/graph/types.ts +22 -22
- package/.next/standalone/src/lib/cortex/index.ts +56 -56
- package/.next/standalone/src/lib/cortex/ingestion/bootstrap.ts +14 -14
- package/.next/standalone/src/lib/cortex/knowledge/compat.ts +14 -14
- package/.next/standalone/src/lib/cortex/knowledge/contradiction.ts +10 -10
- package/.next/standalone/src/lib/cortex/knowledge/types.ts +67 -67
- package/.next/standalone/src/lib/cortex/lobes/config.ts +16 -16
- package/.next/standalone/src/lib/cortex/lobes/resolver.ts +8 -8
- package/.next/standalone/src/lib/cortex/lobes/shares.ts +14 -14
- package/.next/standalone/src/lib/cortex/mcp/server.ts +8 -8
- package/.next/standalone/src/lib/cortex/portability/exporter.ts +6 -6
- package/.next/standalone/src/lib/cortex/portability/importer.ts +10 -10
- package/.next/standalone/src/lib/cortex/retrieval/context-engine.ts +10 -10
- package/.next/standalone/src/lib/cortex/types.ts +39 -39
- package/.next/standalone/tsconfig.json +34 -34
- package/LICENSE +661 -661
- package/README.md +131 -131
- package/bin/cortex-hook.sh +62 -62
- package/bin/cortex-mcp.js +60 -60
- package/bin/fix-standalone-externals.js +79 -79
- package/bin/lib/auto-setup.js +110 -110
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -35
- package/bin/setup-admin.js +195 -195
- package/bin/spaces-dev.js +208 -208
- package/bin/spaces-install.js +599 -599
- package/bin/spaces-reset-totp.js +50 -50
- package/bin/spaces-service.js +1020 -1020
- package/bin/spaces-setup.js +253 -253
- package/bin/spaces.js +776 -776
- package/bin/ssh-auth-keys.sh +68 -68
- package/bin/terminal-server.js +1683 -1649
- package/package.json +103 -102
- package/.next/standalone/.next/server/chunks/ssr/_078dd64d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_701606d5._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_72b1de37._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_950142a4._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/src_components_terminal_terminal-pane_tsx_803c5e2c._.js +0 -7
- package/.next/standalone/.next/static/chunks/18f168665aef1aab.js +0 -1
- package/.next/standalone/.next/static/chunks/25b7a243a404a1a7.js +0 -1
- package/.next/standalone/.next/static/chunks/4a50d2a3e9bc9b41.js +0 -1
- package/.next/standalone/.next/static/chunks/6c78a1dfa7ec2959.css +0 -3
- package/.next/standalone/.next/static/chunks/7e0091ab6c5ee8bd.js +0 -1
- package/.next/standalone/.next/static/chunks/869f562dc32e55f4.js +0 -1
- package/.next/standalone/.next/static/chunks/8b3f4572fec83caa.js +0 -5
- package/.next/standalone/.next/static/chunks/8d5419afc4b9116b.js +0 -1
- package/.next/standalone/.next/static/chunks/9b2c5451f0b67975.js +0 -1
- package/.next/standalone/.next/static/chunks/ac339e970df82fa5.js +0 -5
- package/.next/standalone/.next/static/chunks/e7772d64463868eb.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- /package/.next/standalone/.next/static/{77VYbwIoyxFNr5xevTrCu → ncDe4k4gvD0788HAnq_3G}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{77VYbwIoyxFNr5xevTrCu → ncDe4k4gvD0788HAnq_3G}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{77VYbwIoyxFNr5xevTrCu → ncDe4k4gvD0788HAnq_3G}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-win32-x64}/versions.json +0 -0
|
@@ -1,623 +1,623 @@
|
|
|
1
|
-
# Cortex v2: Organization-Scale Knowledge System
|
|
2
|
-
|
|
3
|
-
**Date:** 2026-03-14
|
|
4
|
-
**Status:** Design approved, pending implementation plan
|
|
5
|
-
**Scope:** Evolution of Cortex from flat-layer RAG to graph-connected, evidence-tracked, boundary-aware organizational knowledge system
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
Cortex v2 evolves the existing personal/workspace/team knowledge system into an organization-scale knowledge graph with bi-directional knowledge flow, dynamic multi-source retrieval, and three-layer access control. The system observes how the organization actually works — from conversations to git commits to deployment patterns — and builds a living model of knowledge, expertise, and relationships.
|
|
10
|
-
|
|
11
|
-
### Design Principles
|
|
12
|
-
|
|
13
|
-
- **Graph distance is gravity** — knowledge relevance is modeled as proximity in a relationship graph, not flat layer membership
|
|
14
|
-
- **Evidence over assertion** — knowledge earns trust through independent corroboration, not just by existing
|
|
15
|
-
- **Contextual truth** — there is no single truth; the system serves the perspective most relevant to the requester and surfaces conflicts transparently
|
|
16
|
-
- **Most restrictive wins** — three layers of boundary enforcement (auto-classification, policy, creator override) where the tightest restriction always applies
|
|
17
|
-
- **Adapter pattern for extensibility** — every signal source normalizes to a common envelope; new sources require zero pipeline changes
|
|
18
|
-
|
|
19
|
-
### Key Constants
|
|
20
|
-
|
|
21
|
-
| Constant | Value | Purpose |
|
|
22
|
-
|----------|-------|---------|
|
|
23
|
-
| `DEDUP_COSINE_THRESHOLD` | 0.90 | Two units are duplicates (keep higher-scored) |
|
|
24
|
-
| `CONTRADICTION_COSINE_THRESHOLD` | 0.80 | Two units are similar enough to be potential contradictions (0.80-0.90 is the "contradiction zone") |
|
|
25
|
-
| `CORROBORATION_COSINE_THRESHOLD` | 0.85 | Two units from different sources confirm each other |
|
|
26
|
-
| `HOP_DECAY_FACTOR` | 0.85 | Confidence multiplier per propagation hop (v1 used 0.80; increased to preserve more signal across hops) |
|
|
27
|
-
| `PROMOTION_DECAY` | 0.85 | Same as HOP_DECAY_FACTOR (applied on promotion) |
|
|
28
|
-
| `GRAVITY_INTERVAL_MS` | 21600000 | Gravity scheduler runs every 6 hours |
|
|
29
|
-
| `ARCHIVE_THRESHOLD` | 0.1 | Evidence score below which units are archived after 6 months |
|
|
30
|
-
| `MAX_GRAPH_HOPS` | 4 | Maximum BFS depth for graph proximity computation |
|
|
31
|
-
|
|
32
|
-
### Current State (v1)
|
|
33
|
-
|
|
34
|
-
- 3 flat layers: personal, workspace, team
|
|
35
|
-
- 9 knowledge types with confidence scores and staleness
|
|
36
|
-
- LanceDB vector store with local MiniLM-L6-v2 embeddings (384d)
|
|
37
|
-
- Two-phase deduplication (hash + cosine)
|
|
38
|
-
- Regex-based extractors for error_fix, decision, command types
|
|
39
|
-
- Learn hook captures Q&A from Claude Code sessions
|
|
40
|
-
- RAG hook injects context into prompts (<150ms)
|
|
41
|
-
- Federation search across connected nodes
|
|
42
|
-
- LLM distillation queue (requires API key)
|
|
43
|
-
- ~542 knowledge units across personal and workspace layers
|
|
44
|
-
|
|
45
|
-
## Architecture: Six Pillars
|
|
46
|
-
|
|
47
|
-
The system is built in three implementation phases (plus a future learning phase) across six interconnected pillars:
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
Phase 1 (Foundation): ① Entity Graph + ② Knowledge Unit Evolution
|
|
51
|
-
Phase 2 (Intelligence): ③ Context Assembly Engine + ④ Boundary Engine
|
|
52
|
-
Phase 3 (Expansion): ⑤ Observable Signal Ingestion + ⑥ Gravity System
|
|
53
|
-
Phase 4 (Future): Learned attention weights over the Context Assembly Engine
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Pillar 1: Entity Graph
|
|
59
|
-
|
|
60
|
-
A lightweight relationship graph modeling people, teams, departments, projects, systems, and their connections. Stored in SQLite (adjacency list + recursive CTEs), not a full graph database — the graph is hundreds-to-thousands of nodes, not millions.
|
|
61
|
-
|
|
62
|
-
### Entity Types (Nodes)
|
|
63
|
-
|
|
64
|
-
**People & Groups:**
|
|
65
|
-
- **Person** — id, name, email, role, expertise[]
|
|
66
|
-
- **Team** — id, name, purpose, department_id
|
|
67
|
-
- **Department** — id, name, org_id
|
|
68
|
-
- **Organization** — id, name, domain (one per Spaces instance)
|
|
69
|
-
|
|
70
|
-
**Technical Entities:**
|
|
71
|
-
- **Project** — id, name, repo_url, workspace_id
|
|
72
|
-
- **System** — id, name, type, project_id (e.g., "Auth Service", "Cortex")
|
|
73
|
-
- **Module** — id, name, path_pattern, system_id (e.g., `src/lib/cortex/**`)
|
|
74
|
-
- **Topic** — id, name, description (e.g., "authentication", "vector-search")
|
|
75
|
-
|
|
76
|
-
### Relationship Types (Edges)
|
|
77
|
-
|
|
78
|
-
All edges carry a `weight` (0-1) and `metadata` JSON.
|
|
79
|
-
|
|
80
|
-
**Organizational:**
|
|
81
|
-
- Person —MEMBER_OF→ Team (role: "lead" | "member")
|
|
82
|
-
- Person —BELONGS_TO→ Department (inferred via team)
|
|
83
|
-
- Team —PART_OF→ Department
|
|
84
|
-
- Department —PART_OF→ Organization
|
|
85
|
-
|
|
86
|
-
**Technical:**
|
|
87
|
-
- Person —WORKS_ON→ Project (weight from commit frequency)
|
|
88
|
-
- Person —EXPERT_IN→ Topic (weight grows with evidence)
|
|
89
|
-
- Person —TOUCHES→ Module (from git blame/commits)
|
|
90
|
-
- Team —OWNS→ Project
|
|
91
|
-
- Team —OWNS→ System
|
|
92
|
-
- Project —CONTAINS→ System
|
|
93
|
-
- System —CONTAINS→ Module
|
|
94
|
-
- System —DEPENDS_ON→ System (inter-service deps)
|
|
95
|
-
- Module —RELATES_TO→ Topic
|
|
96
|
-
|
|
97
|
-
**Knowledge:**
|
|
98
|
-
- KnowledgeUnit —CREATED_BY→ Person
|
|
99
|
-
- KnowledgeUnit —ABOUT→ Topic | System | Module
|
|
100
|
-
- KnowledgeUnit —SCOPED_TO→ Team | Department | Organization
|
|
101
|
-
- KnowledgeUnit —DERIVED_FROM→ KnowledgeUnit (distillation lineage)
|
|
102
|
-
|
|
103
|
-
### Storage
|
|
104
|
-
|
|
105
|
-
Entity IDs use the format `{type}-{slug}` (e.g., `person-alice`, `team-platform`, `system-auth-service`, `topic-authentication`). Slugs are lowercase, hyphen-separated, derived from the entity name.
|
|
106
|
-
|
|
107
|
-
```sql
|
|
108
|
-
-- SQLite tables
|
|
109
|
-
entities(id TEXT PRIMARY KEY, type TEXT NOT NULL, name TEXT NOT NULL, metadata JSON, created TEXT, updated TEXT)
|
|
110
|
-
edges(source_id TEXT NOT NULL, target_id TEXT NOT NULL, relation TEXT NOT NULL, weight REAL DEFAULT 1.0, metadata JSON, created TEXT,
|
|
111
|
-
PRIMARY KEY (source_id, target_id, relation),
|
|
112
|
-
FOREIGN KEY (source_id) REFERENCES entities(id),
|
|
113
|
-
FOREIGN KEY (target_id) REFERENCES entities(id))
|
|
114
|
-
entity_aliases(entity_id TEXT NOT NULL, alias TEXT NOT NULL,
|
|
115
|
-
FOREIGN KEY (entity_id) REFERENCES entities(id))
|
|
116
|
-
access_grants(knowledge_id TEXT NOT NULL, grantee_entity_id TEXT NOT NULL, granted_by TEXT NOT NULL, created TEXT,
|
|
117
|
-
PRIMARY KEY (knowledge_id, grantee_entity_id))
|
|
118
|
-
|
|
119
|
-
-- Indexes
|
|
120
|
-
CREATE INDEX idx_edges_target ON edges(target_id, relation);
|
|
121
|
-
CREATE INDEX idx_aliases_alias ON entity_aliases(alias);
|
|
122
|
-
CREATE INDEX idx_grants_grantee ON access_grants(grantee_entity_id);
|
|
123
|
-
|
|
124
|
-
-- Key queries via recursive CTEs:
|
|
125
|
-
-- Graph distance between two entities (BFS)
|
|
126
|
-
-- All entities within N hops of a person
|
|
127
|
-
-- All knowledge linked to entities within N hops
|
|
128
|
-
-- Entity resolution: "auth" → which entity?
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Edge weights are updated in-place (UPSERT on the composite primary key). A given source-target-relation triple can only have one edge; multiple relationships between the same entities use different `relation` values.
|
|
132
|
-
|
|
133
|
-
### Auto-Population
|
|
134
|
-
|
|
135
|
-
- People → from Spaces user accounts
|
|
136
|
-
- Teams/Departments → admin configures or inferred from workspace membership
|
|
137
|
-
- Projects → from workspaces + git remotes
|
|
138
|
-
- Systems/Modules → inferred from directory structure + package.json
|
|
139
|
-
- Topics → extracted from knowledge units, file paths, git tags
|
|
140
|
-
- WORKS_ON edges → computed from git commit frequency
|
|
141
|
-
- TOUCHES edges → computed from git blame
|
|
142
|
-
- EXPERT_IN edges → grows when a person's knowledge on a topic is accessed
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Pillar 2: Knowledge Unit Evolution
|
|
147
|
-
|
|
148
|
-
The KnowledgeUnit schema evolves to support graph connections, evidence tracking, sensitivity classification, and propagation history.
|
|
149
|
-
|
|
150
|
-
### Schema Changes (v1 → v2)
|
|
151
|
-
|
|
152
|
-
**Removed:**
|
|
153
|
-
- `layer: Layer` — replaced by `scope`
|
|
154
|
-
|
|
155
|
-
**Added:**
|
|
156
|
-
```typescript
|
|
157
|
-
// Graph Links
|
|
158
|
-
entity_links: EntityLink[] // connections to graph nodes
|
|
159
|
-
scope: Scope // replaces flat layer
|
|
160
|
-
|
|
161
|
-
// Evidence Tracking
|
|
162
|
-
evidence_score: number // computed from access, corroboration, authority
|
|
163
|
-
corroborations: number // independent sources confirming this knowledge
|
|
164
|
-
contradiction_refs: string[] // IDs of contradicting units
|
|
165
|
-
|
|
166
|
-
// Boundaries
|
|
167
|
-
sensitivity: SensitivityClass // auto-classified: public|internal|restricted|confidential
|
|
168
|
-
creator_scope: ScopeOverride | null // creator's restriction override
|
|
169
|
-
|
|
170
|
-
// Provenance
|
|
171
|
-
origin: Origin // where this knowledge came from
|
|
172
|
-
propagation_path: PropHop[] // audit trail of scope changes
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### New Types
|
|
176
|
-
|
|
177
|
-
```typescript
|
|
178
|
-
interface EntityLink {
|
|
179
|
-
entity_id: string
|
|
180
|
-
entity_type: EntityType // "person" | "team" | "system" | "topic" | etc.
|
|
181
|
-
relation: "created_by" | "about" | "scoped_to" | "derived_from"
|
|
182
|
-
weight: number // 0-1
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
interface Scope {
|
|
186
|
-
level: "personal" | "team" | "department" | "organization"
|
|
187
|
-
entity_id: string // which person/team/dept/org (format: {type}-{slug})
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
type SensitivityClass = "public" | "internal" | "restricted" | "confidential"
|
|
191
|
-
|
|
192
|
-
interface ScopeOverride {
|
|
193
|
-
max_level: Scope["level"]
|
|
194
|
-
// Creator can restrict further but never widen beyond policy
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
interface Origin {
|
|
198
|
-
source_type: "conversation" | "git_commit" | "pr_review" | "document"
|
|
199
|
-
| "behavioral" | "distillation" | "manual"
|
|
200
|
-
source_ref: string // session ID, commit SHA, PR URL, etc.
|
|
201
|
-
creator_entity_id: string
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
interface PropHop {
|
|
205
|
-
from_scope: Scope
|
|
206
|
-
to_scope: Scope
|
|
207
|
-
reason: "evidence_threshold" | "policy_push" | "manual_promote"
|
|
208
|
-
timestamp: string
|
|
209
|
-
confidence_at_hop: number // decays per hop (×0.85)
|
|
210
|
-
}
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Evidence Score Computation
|
|
214
|
-
|
|
215
|
-
`evidence_score` is a derived value (0-1), recomputed on access and during gravity scheduling:
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
evidence_score = min(1.0,
|
|
219
|
-
base_confidence
|
|
220
|
-
× (1 + 0.1 × corroborations)
|
|
221
|
-
× (1 + 0.01 × min(access_count, 50))
|
|
222
|
-
× authority_factor
|
|
223
|
-
÷ (1 + 0.5 × contradiction_count)
|
|
224
|
-
)
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
- `base_confidence`: from KnowledgeType defaults (decision: 0.8, pattern: 0.8, preference: 0.95, error_fix: 0.8, context: 0.6, etc.)
|
|
228
|
-
- `corroborations`: count of independent sources confirming this knowledge (capped contribution at 10)
|
|
229
|
-
- `access_count`: how often this knowledge was retrieved (diminishing returns, capped at 50)
|
|
230
|
-
- `authority_factor`: 1.0 for conversations, 1.1 for git commits, 1.2 for documents/ADRs, 1.3 for manual/admin teach
|
|
231
|
-
- `contradiction_count`: number of active contradictions (penalizes contested knowledge)
|
|
232
|
-
|
|
233
|
-
### Migration Strategy
|
|
234
|
-
|
|
235
|
-
Existing ~542 units migrate with these mappings:
|
|
236
|
-
- `layer: "personal"` → `scope: { level: "personal", entity_id: "person-{user}" }`
|
|
237
|
-
- `layer: "workspace"` → `scope: { level: "team", entity_id: "team-default" }`
|
|
238
|
-
- `layer: "team"` → `scope: { level: "organization", entity_id: "org-default" }`
|
|
239
|
-
- New fields get defaults: `evidence_score: 0.5`, `sensitivity: "internal"`, `entity_links: []` (backfilled by signal ingestion)
|
|
240
|
-
- Old API still accepts `layer` param, maps internally to scope (backward compatible)
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
## Pillar 3: Context Assembly Engine
|
|
245
|
-
|
|
246
|
-
The retrieval brain. Replaces the current single-vector-search with a 6-stage pipeline that dynamically weights multiple knowledge sources.
|
|
247
|
-
|
|
248
|
-
### Stage 1: Intent Detection
|
|
249
|
-
|
|
250
|
-
Classify the query into intent categories using regex patterns + embedding similarity against intent exemplars:
|
|
251
|
-
|
|
252
|
-
| Intent | Weight Bias |
|
|
253
|
-
|--------|-------------|
|
|
254
|
-
| debugging | +personal, +error_fix, +recent |
|
|
255
|
-
| architecture | +team, +decisions, +department |
|
|
256
|
-
| onboarding | +org-wide, +patterns, +docs |
|
|
257
|
-
| policy | +org-wide, +decisions, +confidential |
|
|
258
|
-
| how-to | +personal, +commands, +patterns |
|
|
259
|
-
| review | +team, +code_patterns, +preferences |
|
|
260
|
-
| security | +security-team, +restricted scope |
|
|
261
|
-
| general | no bias, pure graph distance |
|
|
262
|
-
|
|
263
|
-
No LLM call — fast regex + embedding match.
|
|
264
|
-
|
|
265
|
-
### Stage 2: Entity Resolution
|
|
266
|
-
|
|
267
|
-
Extract entity references from query text:
|
|
268
|
-
1. Exact alias lookup (`entity_aliases` table)
|
|
269
|
-
2. Fuzzy alias match (Levenshtein distance ≤ 2)
|
|
270
|
-
3. Embedding similarity against entity name/description vectors
|
|
271
|
-
|
|
272
|
-
### Stage 3: Weight Computation
|
|
273
|
-
|
|
274
|
-
For each accessible knowledge scope:
|
|
275
|
-
|
|
276
|
-
```
|
|
277
|
-
weight(scope) = graph_proximity × intent_bias × freshness_bonus × authority
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
- `graph_proximity`: `1 / (1 + shortest_path_distance)` from requester to scope
|
|
281
|
-
- `intent_bias`: from Stage 1 intent category (values defined in the intent table above)
|
|
282
|
-
- `freshness_bonus`: 1.1 if scope has relevant activity in last 7 days, 1.05 if last 30 days, 1.0 otherwise
|
|
283
|
-
- `authority`: computed as `max(1.0, role_boost + expertise_weight)` where:
|
|
284
|
-
- `role_boost`: 0.0 for member, 0.1 for lead, 0.15 for senior/principal, 0.2 for director+ (from Person entity role field)
|
|
285
|
-
- `expertise_weight`: the EXPERT_IN edge weight (0-1) between the source entity and query-relevant topics
|
|
286
|
-
- For non-person sources (org standards, official docs): `origin.source_type === "document"` gets authority 1.2 (documents outrank conversations)
|
|
287
|
-
|
|
288
|
-
Computed via SQLite recursive CTE for graph_proximity, cached per request (~10ms warm, ~30ms cold; precompute proximity for current user at session start as fallback).
|
|
289
|
-
|
|
290
|
-
### Stage 4: Parallel Multi-Source Search
|
|
291
|
-
|
|
292
|
-
Query all weighted sources concurrently via `Promise.allSettled`:
|
|
293
|
-
- Higher-weight sources get more result slots (proportional to weight)
|
|
294
|
-
- 100ms timeout per source; failures don't block other sources
|
|
295
|
-
- Boundary Engine filters inaccessible scopes BEFORE search begins
|
|
296
|
-
|
|
297
|
-
### Stage 5: Fusion + Re-Ranking
|
|
298
|
-
|
|
299
|
-
Score each candidate:
|
|
300
|
-
|
|
301
|
-
```
|
|
302
|
-
final_score = vector_similarity × source_weight × evidence_score × (1 - stale_score) × type_boost
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
- Deduplicate: if two results have cosine > 0.9, keep higher-scored, note corroboration
|
|
306
|
-
- Sort by final_score, take top K (default: 5)
|
|
307
|
-
|
|
308
|
-
### Stage 6: Conflict Detection + Context Formatting
|
|
309
|
-
|
|
310
|
-
- Check `contradiction_refs` across top results
|
|
311
|
-
- Flag contested knowledge with both perspectives
|
|
312
|
-
- Format as annotated `<cortex-context>` with source attribution, conflict callouts, and evidence indicators
|
|
313
|
-
|
|
314
|
-
### Performance Budget
|
|
315
|
-
|
|
316
|
-
| Stage | Target | Method |
|
|
317
|
-
|-------|--------|--------|
|
|
318
|
-
| 1-2: Intent + Entities | ~5ms | Regex + alias lookup |
|
|
319
|
-
| 3: Weight Computation | ~10ms | Graph BFS, cached SQLite CTE |
|
|
320
|
-
| 4-6: Search + Fuse | ~80ms | Parallel vector search |
|
|
321
|
-
| **Total** | **<150ms** | Within hook's 5s timeout |
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
## Pillar 4: Boundary Engine
|
|
326
|
-
|
|
327
|
-
Three-layer access control evaluated in order. Most restrictive classification always wins.
|
|
328
|
-
|
|
329
|
-
### Layer 1: Auto-Classification
|
|
330
|
-
|
|
331
|
-
Regex-based content analysis assigns sensitivity (fast, deterministic, auditable):
|
|
332
|
-
|
|
333
|
-
| Detector | Triggers | Classification |
|
|
334
|
-
|----------|----------|----------------|
|
|
335
|
-
| Secrets | API keys, tokens, passwords, connection strings | confidential |
|
|
336
|
-
| Personnel | Performance reviews, salary, hiring, 1:1 notes | confidential |
|
|
337
|
-
| Security | Vulnerabilities, exploits, CVEs, incident details | restricted |
|
|
338
|
-
| Business | Revenue, strategy, unreleased plans, customer data | restricted |
|
|
339
|
-
| Technical | Architecture, patterns, code, decisions | internal |
|
|
340
|
-
| General | Common patterns, public docs, well-known techniques | public |
|
|
341
|
-
|
|
342
|
-
### Layer 2: Organizational Policy
|
|
343
|
-
|
|
344
|
-
Admin-defined rules that control propagation and access:
|
|
345
|
-
|
|
346
|
-
```typescript
|
|
347
|
-
interface Policy {
|
|
348
|
-
name: string
|
|
349
|
-
match: {
|
|
350
|
-
type?: KnowledgeType
|
|
351
|
-
topics?: string[]
|
|
352
|
-
sensitivity?: SensitivityClass
|
|
353
|
-
scope_level?: Scope["level"]
|
|
354
|
-
}
|
|
355
|
-
action: {
|
|
356
|
-
max_scope?: Scope["level"] // can't propagate beyond this level
|
|
357
|
-
propagate_to?: PropagationTarget[] // MUST reach these specific scopes
|
|
358
|
-
trickle_down?: boolean // auto-visible to child scopes
|
|
359
|
-
cannot_propagate?: boolean // locked to current scope
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
interface PropagationTarget {
|
|
364
|
-
level: Scope["level"]
|
|
365
|
-
entity_id?: string // specific entity, or omit for "all at this level"
|
|
366
|
-
// e.g., { level: "team", entity_id: "team-security" } = must reach security team
|
|
367
|
-
// e.g., { level: "department" } = must reach at least department level
|
|
368
|
-
}
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
`propagate_to` replaces the previous `min_scope` and `required_scope` — it's a single array that handles both "must reach this level" and "must reach this specific team." When multiple targets are specified, all must be satisfied. `max_scope` takes precedence: if a target would exceed `max_scope`, it's skipped (policy contradiction logged as warning).
|
|
372
|
-
|
|
373
|
-
Example policies:
|
|
374
|
-
- Security findings must reach security team, cannot leave department
|
|
375
|
-
- Architecture decisions always propagate to department+
|
|
376
|
-
- Org decisions auto-trickle-down to all teams
|
|
377
|
-
- Confidential knowledge cannot propagate from personal scope
|
|
378
|
-
|
|
379
|
-
Stored in Cortex config, admin-editable. Evaluated at ingestion time and query time.
|
|
380
|
-
|
|
381
|
-
### Layer 3: Creator Override
|
|
382
|
-
|
|
383
|
-
The person who created knowledge can restrict further (never widen):
|
|
384
|
-
- Creator can restrict: team → personal
|
|
385
|
-
- Creator CANNOT widen: restricted → public
|
|
386
|
-
- Policy overrides auto-class only upward (more restrictive wins)
|
|
387
|
-
|
|
388
|
-
Set via MCP tool (`cortex_teach --scope personal`), API, or future UI toggle.
|
|
389
|
-
|
|
390
|
-
### Query-Time Enforcement
|
|
391
|
-
|
|
392
|
-
Before the Context Assembly Engine searches, compute accessible scopes:
|
|
393
|
-
|
|
394
|
-
| Sensitivity | Same Scope | Same Dept | Same Org | Cross Org |
|
|
395
|
-
|-------------|-----------|-----------|----------|-----------|
|
|
396
|
-
| public | read | read | read | read |
|
|
397
|
-
| internal | read | read | read | denied |
|
|
398
|
-
| restricted | read | policy-gated | denied | denied |
|
|
399
|
-
| confidential | grant-only | denied | denied | denied |
|
|
400
|
-
|
|
401
|
-
**Grant mechanism for confidential knowledge:** Creators can grant access to specific people via the `access_grants` table (defined in Pillar 1 Storage). Grants are explicit: `{ knowledge_id, grantee_entity_id, granted_by, created }`. At query time, confidential knowledge is accessible if `requester_entity_id === creator_entity_id` OR an `access_grants` row exists for that requester. Grants are set via MCP tool (`cortex_teach --grant person-alice`), API (`POST /api/cortex/knowledge/{id}/grant`), or future UI.
|
|
402
|
-
|
|
403
|
-
### Audit Trail
|
|
404
|
-
|
|
405
|
-
Every access decision logged in append-only SQLite table: who requested, what returned, what denied and why. Queryable by admins. Default retention: 90 days.
|
|
406
|
-
|
|
407
|
-
---
|
|
408
|
-
|
|
409
|
-
## Pillar 5: Observable Signal Ingestion
|
|
410
|
-
|
|
411
|
-
Seven signal sources, each with an adapter that normalizes to a common `SignalEnvelope`.
|
|
412
|
-
|
|
413
|
-
### Signal Sources
|
|
414
|
-
|
|
415
|
-
1. **Conversations** (existing, evolved) — Claude Code Q&A via learn hook. Enhanced with auto-entity linking, multi-turn context extraction, intent tagging.
|
|
416
|
-
|
|
417
|
-
2. **Git History** — commits, blame, file change frequency. Extracts: who works on what (TOUCHES edges), commit messages → decisions/fixes, co-change clusters → system boundaries.
|
|
418
|
-
|
|
419
|
-
3. **PR Reviews** — review comments, approval patterns. Extracts: code quality patterns, architectural preferences, reviewer expertise (EXPERT_IN edges), team conventions.
|
|
420
|
-
|
|
421
|
-
4. **Documents** — ADRs, READMEs, runbooks, wiki pages. Higher authority weight than conversations. Extracts: official decisions, architecture documentation, operational procedures.
|
|
422
|
-
|
|
423
|
-
5. **Test Signals** — test failures, flaky tests, coverage gaps. Extracts: reliability patterns, modules that break together (DEPENDS_ON edges), error-prone areas.
|
|
424
|
-
|
|
425
|
-
6. **Deployment Patterns** — deploy frequency, rollbacks, incidents. Extracts: system stability patterns, risky change areas, deployment best practices, incident response knowledge.
|
|
426
|
-
|
|
427
|
-
7. **Behavioral Inference** — derived from observing all other signals. Infers: actual team boundaries vs org chart, expertise decay, knowledge gaps, de facto ownership.
|
|
428
|
-
|
|
429
|
-
### Adapter Architecture
|
|
430
|
-
|
|
431
|
-
```typescript
|
|
432
|
-
interface SignalEnvelope {
|
|
433
|
-
text: string
|
|
434
|
-
origin: Origin
|
|
435
|
-
entities: EntityLink[] // detected entity references
|
|
436
|
-
suggested_type: KnowledgeType
|
|
437
|
-
suggested_sensitivity: SensitivityClass
|
|
438
|
-
raw_metadata: Record<string, unknown>
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
interface SignalAdapter {
|
|
442
|
-
name: string
|
|
443
|
-
schedule: "realtime" | "polling" | "webhook" | "cron"
|
|
444
|
-
extract(): AsyncIterable<SignalEnvelope>
|
|
445
|
-
healthCheck(): Promise<boolean>
|
|
446
|
-
}
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
All adapters produce `SignalEnvelope`. Adding a new source = implement one interface, zero pipeline changes.
|
|
450
|
-
|
|
451
|
-
### Unified Signal Pipeline
|
|
452
|
-
|
|
453
|
-
A new `SignalPipeline` consumes envelopes from all adapters and replaces the existing `IngestionPipeline` as the primary entry point (the old pipeline is wrapped as the Conversation adapter for backward compatibility).
|
|
454
|
-
|
|
455
|
-
```typescript
|
|
456
|
-
class SignalPipeline {
|
|
457
|
-
async ingest(envelope: SignalEnvelope): Promise<IngestResult> {
|
|
458
|
-
// 1. Dedup: hash check (pre-embed) + cosine check (post-embed)
|
|
459
|
-
// 2. Entity resolution: resolve envelope.entities against graph,
|
|
460
|
-
// create EntityLinks for the knowledge unit
|
|
461
|
-
// 3. Sensitivity: envelope.suggested_sensitivity is the starting point,
|
|
462
|
-
// then Boundary Engine Layer 1 (auto-classification) can UPGRADE
|
|
463
|
-
// sensitivity (never downgrade). Most restrictive wins.
|
|
464
|
-
// 4. Type resolution: envelope.suggested_type is accepted unless
|
|
465
|
-
// extractors detect a more specific type (e.g., adapter says
|
|
466
|
-
// "conversation" but regex detects error_fix pattern → error_fix)
|
|
467
|
-
// 5. Embed: batch via current EmbeddingProvider
|
|
468
|
-
// 6. Store: add to LanceDB with full v2 schema
|
|
469
|
-
// 7. Graph updates: process any edge updates from envelope.raw_metadata
|
|
470
|
-
// (e.g., git adapter includes TOUCHES/EXPERT_IN edge updates)
|
|
471
|
-
// 8. Distillation queue: enqueue distillable types (decision, error_fix)
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
The existing `IngestionPipeline.ingest(messages, context)` is preserved as the internal implementation of the Conversation adapter. It converts `SessionMessage[]` into `SignalEnvelope[]` and feeds them to the unified pipeline.
|
|
477
|
-
|
|
478
|
-
### Signal Source → Knowledge Type Mapping
|
|
479
|
-
|
|
480
|
-
New signal sources map to existing knowledge types (no new types needed):
|
|
481
|
-
|
|
482
|
-
| Signal Source | Primary Types | Mapping Logic |
|
|
483
|
-
|--------------|---------------|---------------|
|
|
484
|
-
| Git commits | error_fix, decision | Commit message regex: "fix" → error_fix, "refactor/migrate/switch to" → decision |
|
|
485
|
-
| PR reviews | preference, pattern, code_pattern | Review comments → preference; approval patterns → pattern |
|
|
486
|
-
| Documents (ADRs) | decision | ADRs are decisions by definition |
|
|
487
|
-
| Documents (runbooks) | pattern, command | Operational procedures → pattern; shell blocks → command |
|
|
488
|
-
| Test signals | error_fix, pattern | Failures → error_fix; flaky patterns → pattern |
|
|
489
|
-
| Deployment | error_fix, pattern, decision | Rollbacks → error_fix; deploy practices → pattern |
|
|
490
|
-
| Behavioral | pattern, context | Inferred structures → pattern; gap analysis → context |
|
|
491
|
-
|
|
492
|
-
### Scheduling
|
|
493
|
-
|
|
494
|
-
| Source | Trigger | Frequency |
|
|
495
|
-
|--------|---------|-----------|
|
|
496
|
-
| Conversations | Real-time (Stop hook) | Every Claude Code response |
|
|
497
|
-
| Git History | Post-commit hook or polling | On commit or every 15 min |
|
|
498
|
-
| PR Reviews | GitHub webhook or polling | On PR close/merge |
|
|
499
|
-
| Documents | File watcher on docs/** | On file change |
|
|
500
|
-
| Test Signals | CI pipeline webhook | On test run completion |
|
|
501
|
-
| Deployment | Deploy webhook | On deploy/rollback events |
|
|
502
|
-
| Behavioral Inference | Scheduled background job | Daily |
|
|
503
|
-
|
|
504
|
-
---
|
|
505
|
-
|
|
506
|
-
## Pillar 6: Gravity System
|
|
507
|
-
|
|
508
|
-
Bi-directional knowledge flow with evidence-based promotion and decision propagation.
|
|
509
|
-
|
|
510
|
-
### Bubble-Up: Evidence-Based Promotion
|
|
511
|
-
|
|
512
|
-
Knowledge becomes a candidate for promotion when:
|
|
513
|
-
|
|
514
|
-
```
|
|
515
|
-
promotion_score = evidence_score × type_weight × freshness
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
**Type weights:** decision (1.5), error_fix (1.3), pattern (1.2), conversation (0.5)
|
|
519
|
-
|
|
520
|
-
**Promotion thresholds:**
|
|
521
|
-
- personal → team: score ≥ 0.6, corroborations ≥ 2, sensitivity ≤ internal
|
|
522
|
-
- team → department: score ≥ 0.75, corroborations ≥ 3 (from 2+ teams), sensitivity ≤ internal
|
|
523
|
-
- department → organization: score ≥ 0.9, corroborations ≥ 5 (from 2+ depts), sensitivity ≤ internal, no active contradictions
|
|
524
|
-
|
|
525
|
-
**On promotion:**
|
|
526
|
-
1. Knowledge is COPIED (not moved) — original stays with full history
|
|
527
|
-
2. Confidence decays per hop: ×0.85
|
|
528
|
-
3. Entity links broadened (scoped_to changes)
|
|
529
|
-
4. Propagation_path entry recorded
|
|
530
|
-
5. Creator notified
|
|
531
|
-
|
|
532
|
-
### Trickle-Down: Decision Push + Standard Spread
|
|
533
|
-
|
|
534
|
-
Two modes:
|
|
535
|
-
- **PUSH** — copies knowledge into lower scopes. For critical decisions, standards, policy changes. Visible without searching.
|
|
536
|
-
- **VISIBILITY** — knowledge accessible at query time via graph proximity but not copied. For general org wisdom, best practices.
|
|
537
|
-
|
|
538
|
-
| Knowledge type | Default | Override |
|
|
539
|
-
|---------------|---------|----------|
|
|
540
|
-
| Org decisions | PUSH to all | Policy |
|
|
541
|
-
| Security policies | PUSH to affected | Policy |
|
|
542
|
-
| Best practices | VISIBILITY | Manual push |
|
|
543
|
-
| Standards | PUSH to depts | Policy |
|
|
544
|
-
| General patterns | VISIBILITY | — |
|
|
545
|
-
|
|
546
|
-
### Conflict Detection
|
|
547
|
-
|
|
548
|
-
Four states:
|
|
549
|
-
- **UNRESOLVED** — contradiction exists, no human input. Both surfaced with "[Contested]" flag during retrieval.
|
|
550
|
-
- **CONTEXTUAL** — marked as "both valid in different contexts." System serves the context-appropriate one.
|
|
551
|
-
- **RESOLVED** — human chose a winner or created synthesis. Loser downranked (evidence_score × 0.3).
|
|
552
|
-
- **BLOCKED** — contradicts higher-scope knowledge. Cannot promote until resolved.
|
|
553
|
-
|
|
554
|
-
Contradiction detection: during ingestion, when a new unit has cosine similarity > `CONTRADICTION_COSINE_THRESHOLD` (0.80) with an existing unit but opposite sentiment/conclusion (keyword analysis). Units in the 0.80-0.90 range are potential contradictions; above 0.90 (`DEDUP_COSINE_THRESHOLD`) they're duplicates.
|
|
555
|
-
|
|
556
|
-
### Gravity Scheduler
|
|
557
|
-
|
|
558
|
-
Runs periodically (configurable, default every 6 hours):
|
|
559
|
-
1. Scan for promotion candidates (evidence_score changed since last run)
|
|
560
|
-
2. Execute pending trickle-down (push queue)
|
|
561
|
-
3. Detect new conflicts
|
|
562
|
-
4. Decay stale knowledge (reduce evidence for unaccessed units, auto-archive below 0.1 after 6 months)
|
|
563
|
-
5. Update graph edge weights (decay inactive EXPERT_IN, strengthen active, prune below threshold)
|
|
564
|
-
|
|
565
|
-
---
|
|
566
|
-
|
|
567
|
-
## Phase 4 (Future): Learned Attention Weights
|
|
568
|
-
|
|
569
|
-
Once Phases 1-3 generate sufficient usage data, layer in learned attention weights that optimize the Context Assembly Engine's weight computation:
|
|
570
|
-
|
|
571
|
-
- Collect training data: which sources produced results that were actually useful (measured by user behavior after retrieval — did they use the suggested fix? did they ask a follow-up indicating the context was wrong?)
|
|
572
|
-
- Train lightweight attention weights per intent category
|
|
573
|
-
- The graph provides cold-start structure; attention learns what the graph can't encode
|
|
574
|
-
- Transition: graph weights serve as priors, learned weights modulate them
|
|
575
|
-
|
|
576
|
-
---
|
|
577
|
-
|
|
578
|
-
## Sub-Project Decomposition
|
|
579
|
-
|
|
580
|
-
Each pillar is a separate implementation cycle (spec → plan → implement → review):
|
|
581
|
-
|
|
582
|
-
| # | Sub-Project | Dependencies | Estimated Complexity |
|
|
583
|
-
|---|------------|-------------|---------------------|
|
|
584
|
-
| 1 | Entity Graph Foundation | None | Medium — SQLite schema, CRUD API, auto-population from users/workspaces |
|
|
585
|
-
| 2 | Knowledge Unit Schema Evolution | Pillar 1 | Medium — schema migration, backward-compatible API layer |
|
|
586
|
-
| 3 | Context Assembly Engine | Pillars 1, 2 | High — 6-stage pipeline, intent detection, parallel search, fusion |
|
|
587
|
-
| 4 | Boundary Engine | Pillars 1, 2 | Medium — auto-classification, policy engine, enforcement layer |
|
|
588
|
-
| 5 | Observable Signal Ingestion | Pillars 1, 2, 4 | High — 7 adapters, unified pipeline, scheduling |
|
|
589
|
-
| 6 | Gravity System | All above | High — promotion logic, trickle-down, conflict detection, scheduler |
|
|
590
|
-
|
|
591
|
-
Pillars 1-2 can be built in parallel. Pillars 3-4 can be built in parallel after 1-2 complete. Pillars 5-6 depend on all prior work.
|
|
592
|
-
|
|
593
|
-
---
|
|
594
|
-
|
|
595
|
-
## Degraded / Cold-Start Behavior
|
|
596
|
-
|
|
597
|
-
The system must degrade gracefully when the graph is incomplete:
|
|
598
|
-
|
|
599
|
-
- **No graph (fresh install):** Context Assembly Engine falls back to v1 flat-layer behavior (search personal, then workspace, then team with fixed weights). No promotion, no policies, no entity resolution.
|
|
600
|
-
- **Single user, no teams:** Scope is always `personal`. Promotion thresholds adapt: "2+ teams" becomes "2+ independent sessions" (the user corroborates their own knowledge across separate conversations). Trickle-down is a no-op.
|
|
601
|
-
- **No knowledge units:** RAG hook returns empty context silently (already handles this). Learn hook operates normally, building the knowledge base from scratch.
|
|
602
|
-
- **Sparse graph (some entities, few edges):** Graph proximity falls back to scope-level distance when no path exists between entities (personal=0, same team=1, same dept=2, same org=3). Edge weights default to 0.5 when not computed from signals.
|
|
603
|
-
|
|
604
|
-
## MCP Tool Backward Compatibility
|
|
605
|
-
|
|
606
|
-
The `cortex_teach` MCP tool and all API endpoints accept both old and new parameters:
|
|
607
|
-
- `--layer personal` maps internally to `scope: { level: "personal", entity_id: "{current-user}" }`
|
|
608
|
-
- New parameters `--scope`, `--sensitivity`, `--grant` are added alongside old ones
|
|
609
|
-
- Existing hooks (`cortex-hook.js`, `cortex-learn-hook.js`) continue working unchanged; enhanced versions are opt-in
|
|
610
|
-
|
|
611
|
-
## Gravity Scheduler Implementation
|
|
612
|
-
|
|
613
|
-
The Gravity Scheduler runs as a `setInterval` timer within the Spaces Node.js process (consistent with `FederationSync.start()`). On process restart, it resumes from the last checkpoint stored in SQLite (`gravity_state` table with `last_run` timestamp). Incomplete cycles are idempotent — re-running a promotion scan or decay pass produces the same result.
|
|
614
|
-
|
|
615
|
-
## Success Criteria
|
|
616
|
-
|
|
617
|
-
- Retrieval latency remains <150ms (current: ~50ms single-source)
|
|
618
|
-
- Knowledge from the right source surfaces first (measured by graph-distance correlation with user satisfaction)
|
|
619
|
-
- Confidential knowledge never leaks across scope boundaries (verified by audit trail)
|
|
620
|
-
- Evidence-based promotion reduces noise in higher scopes (measured by corroboration ratio)
|
|
621
|
-
- New signal sources can be added by implementing a single adapter interface
|
|
622
|
-
- Conflict surfacing reduces silent contradictions (measured by unresolved conflict count trending down)
|
|
623
|
-
- Existing 542+ units migrate without data loss, old API stays backward compatible
|
|
1
|
+
# Cortex v2: Organization-Scale Knowledge System
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-03-14
|
|
4
|
+
**Status:** Design approved, pending implementation plan
|
|
5
|
+
**Scope:** Evolution of Cortex from flat-layer RAG to graph-connected, evidence-tracked, boundary-aware organizational knowledge system
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Cortex v2 evolves the existing personal/workspace/team knowledge system into an organization-scale knowledge graph with bi-directional knowledge flow, dynamic multi-source retrieval, and three-layer access control. The system observes how the organization actually works — from conversations to git commits to deployment patterns — and builds a living model of knowledge, expertise, and relationships.
|
|
10
|
+
|
|
11
|
+
### Design Principles
|
|
12
|
+
|
|
13
|
+
- **Graph distance is gravity** — knowledge relevance is modeled as proximity in a relationship graph, not flat layer membership
|
|
14
|
+
- **Evidence over assertion** — knowledge earns trust through independent corroboration, not just by existing
|
|
15
|
+
- **Contextual truth** — there is no single truth; the system serves the perspective most relevant to the requester and surfaces conflicts transparently
|
|
16
|
+
- **Most restrictive wins** — three layers of boundary enforcement (auto-classification, policy, creator override) where the tightest restriction always applies
|
|
17
|
+
- **Adapter pattern for extensibility** — every signal source normalizes to a common envelope; new sources require zero pipeline changes
|
|
18
|
+
|
|
19
|
+
### Key Constants
|
|
20
|
+
|
|
21
|
+
| Constant | Value | Purpose |
|
|
22
|
+
|----------|-------|---------|
|
|
23
|
+
| `DEDUP_COSINE_THRESHOLD` | 0.90 | Two units are duplicates (keep higher-scored) |
|
|
24
|
+
| `CONTRADICTION_COSINE_THRESHOLD` | 0.80 | Two units are similar enough to be potential contradictions (0.80-0.90 is the "contradiction zone") |
|
|
25
|
+
| `CORROBORATION_COSINE_THRESHOLD` | 0.85 | Two units from different sources confirm each other |
|
|
26
|
+
| `HOP_DECAY_FACTOR` | 0.85 | Confidence multiplier per propagation hop (v1 used 0.80; increased to preserve more signal across hops) |
|
|
27
|
+
| `PROMOTION_DECAY` | 0.85 | Same as HOP_DECAY_FACTOR (applied on promotion) |
|
|
28
|
+
| `GRAVITY_INTERVAL_MS` | 21600000 | Gravity scheduler runs every 6 hours |
|
|
29
|
+
| `ARCHIVE_THRESHOLD` | 0.1 | Evidence score below which units are archived after 6 months |
|
|
30
|
+
| `MAX_GRAPH_HOPS` | 4 | Maximum BFS depth for graph proximity computation |
|
|
31
|
+
|
|
32
|
+
### Current State (v1)
|
|
33
|
+
|
|
34
|
+
- 3 flat layers: personal, workspace, team
|
|
35
|
+
- 9 knowledge types with confidence scores and staleness
|
|
36
|
+
- LanceDB vector store with local MiniLM-L6-v2 embeddings (384d)
|
|
37
|
+
- Two-phase deduplication (hash + cosine)
|
|
38
|
+
- Regex-based extractors for error_fix, decision, command types
|
|
39
|
+
- Learn hook captures Q&A from Claude Code sessions
|
|
40
|
+
- RAG hook injects context into prompts (<150ms)
|
|
41
|
+
- Federation search across connected nodes
|
|
42
|
+
- LLM distillation queue (requires API key)
|
|
43
|
+
- ~542 knowledge units across personal and workspace layers
|
|
44
|
+
|
|
45
|
+
## Architecture: Six Pillars
|
|
46
|
+
|
|
47
|
+
The system is built in three implementation phases (plus a future learning phase) across six interconnected pillars:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Phase 1 (Foundation): ① Entity Graph + ② Knowledge Unit Evolution
|
|
51
|
+
Phase 2 (Intelligence): ③ Context Assembly Engine + ④ Boundary Engine
|
|
52
|
+
Phase 3 (Expansion): ⑤ Observable Signal Ingestion + ⑥ Gravity System
|
|
53
|
+
Phase 4 (Future): Learned attention weights over the Context Assembly Engine
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Pillar 1: Entity Graph
|
|
59
|
+
|
|
60
|
+
A lightweight relationship graph modeling people, teams, departments, projects, systems, and their connections. Stored in SQLite (adjacency list + recursive CTEs), not a full graph database — the graph is hundreds-to-thousands of nodes, not millions.
|
|
61
|
+
|
|
62
|
+
### Entity Types (Nodes)
|
|
63
|
+
|
|
64
|
+
**People & Groups:**
|
|
65
|
+
- **Person** — id, name, email, role, expertise[]
|
|
66
|
+
- **Team** — id, name, purpose, department_id
|
|
67
|
+
- **Department** — id, name, org_id
|
|
68
|
+
- **Organization** — id, name, domain (one per Spaces instance)
|
|
69
|
+
|
|
70
|
+
**Technical Entities:**
|
|
71
|
+
- **Project** — id, name, repo_url, workspace_id
|
|
72
|
+
- **System** — id, name, type, project_id (e.g., "Auth Service", "Cortex")
|
|
73
|
+
- **Module** — id, name, path_pattern, system_id (e.g., `src/lib/cortex/**`)
|
|
74
|
+
- **Topic** — id, name, description (e.g., "authentication", "vector-search")
|
|
75
|
+
|
|
76
|
+
### Relationship Types (Edges)
|
|
77
|
+
|
|
78
|
+
All edges carry a `weight` (0-1) and `metadata` JSON.
|
|
79
|
+
|
|
80
|
+
**Organizational:**
|
|
81
|
+
- Person —MEMBER_OF→ Team (role: "lead" | "member")
|
|
82
|
+
- Person —BELONGS_TO→ Department (inferred via team)
|
|
83
|
+
- Team —PART_OF→ Department
|
|
84
|
+
- Department —PART_OF→ Organization
|
|
85
|
+
|
|
86
|
+
**Technical:**
|
|
87
|
+
- Person —WORKS_ON→ Project (weight from commit frequency)
|
|
88
|
+
- Person —EXPERT_IN→ Topic (weight grows with evidence)
|
|
89
|
+
- Person —TOUCHES→ Module (from git blame/commits)
|
|
90
|
+
- Team —OWNS→ Project
|
|
91
|
+
- Team —OWNS→ System
|
|
92
|
+
- Project —CONTAINS→ System
|
|
93
|
+
- System —CONTAINS→ Module
|
|
94
|
+
- System —DEPENDS_ON→ System (inter-service deps)
|
|
95
|
+
- Module —RELATES_TO→ Topic
|
|
96
|
+
|
|
97
|
+
**Knowledge:**
|
|
98
|
+
- KnowledgeUnit —CREATED_BY→ Person
|
|
99
|
+
- KnowledgeUnit —ABOUT→ Topic | System | Module
|
|
100
|
+
- KnowledgeUnit —SCOPED_TO→ Team | Department | Organization
|
|
101
|
+
- KnowledgeUnit —DERIVED_FROM→ KnowledgeUnit (distillation lineage)
|
|
102
|
+
|
|
103
|
+
### Storage
|
|
104
|
+
|
|
105
|
+
Entity IDs use the format `{type}-{slug}` (e.g., `person-alice`, `team-platform`, `system-auth-service`, `topic-authentication`). Slugs are lowercase, hyphen-separated, derived from the entity name.
|
|
106
|
+
|
|
107
|
+
```sql
|
|
108
|
+
-- SQLite tables
|
|
109
|
+
entities(id TEXT PRIMARY KEY, type TEXT NOT NULL, name TEXT NOT NULL, metadata JSON, created TEXT, updated TEXT)
|
|
110
|
+
edges(source_id TEXT NOT NULL, target_id TEXT NOT NULL, relation TEXT NOT NULL, weight REAL DEFAULT 1.0, metadata JSON, created TEXT,
|
|
111
|
+
PRIMARY KEY (source_id, target_id, relation),
|
|
112
|
+
FOREIGN KEY (source_id) REFERENCES entities(id),
|
|
113
|
+
FOREIGN KEY (target_id) REFERENCES entities(id))
|
|
114
|
+
entity_aliases(entity_id TEXT NOT NULL, alias TEXT NOT NULL,
|
|
115
|
+
FOREIGN KEY (entity_id) REFERENCES entities(id))
|
|
116
|
+
access_grants(knowledge_id TEXT NOT NULL, grantee_entity_id TEXT NOT NULL, granted_by TEXT NOT NULL, created TEXT,
|
|
117
|
+
PRIMARY KEY (knowledge_id, grantee_entity_id))
|
|
118
|
+
|
|
119
|
+
-- Indexes
|
|
120
|
+
CREATE INDEX idx_edges_target ON edges(target_id, relation);
|
|
121
|
+
CREATE INDEX idx_aliases_alias ON entity_aliases(alias);
|
|
122
|
+
CREATE INDEX idx_grants_grantee ON access_grants(grantee_entity_id);
|
|
123
|
+
|
|
124
|
+
-- Key queries via recursive CTEs:
|
|
125
|
+
-- Graph distance between two entities (BFS)
|
|
126
|
+
-- All entities within N hops of a person
|
|
127
|
+
-- All knowledge linked to entities within N hops
|
|
128
|
+
-- Entity resolution: "auth" → which entity?
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Edge weights are updated in-place (UPSERT on the composite primary key). A given source-target-relation triple can only have one edge; multiple relationships between the same entities use different `relation` values.
|
|
132
|
+
|
|
133
|
+
### Auto-Population
|
|
134
|
+
|
|
135
|
+
- People → from Spaces user accounts
|
|
136
|
+
- Teams/Departments → admin configures or inferred from workspace membership
|
|
137
|
+
- Projects → from workspaces + git remotes
|
|
138
|
+
- Systems/Modules → inferred from directory structure + package.json
|
|
139
|
+
- Topics → extracted from knowledge units, file paths, git tags
|
|
140
|
+
- WORKS_ON edges → computed from git commit frequency
|
|
141
|
+
- TOUCHES edges → computed from git blame
|
|
142
|
+
- EXPERT_IN edges → grows when a person's knowledge on a topic is accessed
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Pillar 2: Knowledge Unit Evolution
|
|
147
|
+
|
|
148
|
+
The KnowledgeUnit schema evolves to support graph connections, evidence tracking, sensitivity classification, and propagation history.
|
|
149
|
+
|
|
150
|
+
### Schema Changes (v1 → v2)
|
|
151
|
+
|
|
152
|
+
**Removed:**
|
|
153
|
+
- `layer: Layer` — replaced by `scope`
|
|
154
|
+
|
|
155
|
+
**Added:**
|
|
156
|
+
```typescript
|
|
157
|
+
// Graph Links
|
|
158
|
+
entity_links: EntityLink[] // connections to graph nodes
|
|
159
|
+
scope: Scope // replaces flat layer
|
|
160
|
+
|
|
161
|
+
// Evidence Tracking
|
|
162
|
+
evidence_score: number // computed from access, corroboration, authority
|
|
163
|
+
corroborations: number // independent sources confirming this knowledge
|
|
164
|
+
contradiction_refs: string[] // IDs of contradicting units
|
|
165
|
+
|
|
166
|
+
// Boundaries
|
|
167
|
+
sensitivity: SensitivityClass // auto-classified: public|internal|restricted|confidential
|
|
168
|
+
creator_scope: ScopeOverride | null // creator's restriction override
|
|
169
|
+
|
|
170
|
+
// Provenance
|
|
171
|
+
origin: Origin // where this knowledge came from
|
|
172
|
+
propagation_path: PropHop[] // audit trail of scope changes
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### New Types
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
interface EntityLink {
|
|
179
|
+
entity_id: string
|
|
180
|
+
entity_type: EntityType // "person" | "team" | "system" | "topic" | etc.
|
|
181
|
+
relation: "created_by" | "about" | "scoped_to" | "derived_from"
|
|
182
|
+
weight: number // 0-1
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface Scope {
|
|
186
|
+
level: "personal" | "team" | "department" | "organization"
|
|
187
|
+
entity_id: string // which person/team/dept/org (format: {type}-{slug})
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
type SensitivityClass = "public" | "internal" | "restricted" | "confidential"
|
|
191
|
+
|
|
192
|
+
interface ScopeOverride {
|
|
193
|
+
max_level: Scope["level"]
|
|
194
|
+
// Creator can restrict further but never widen beyond policy
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
interface Origin {
|
|
198
|
+
source_type: "conversation" | "git_commit" | "pr_review" | "document"
|
|
199
|
+
| "behavioral" | "distillation" | "manual"
|
|
200
|
+
source_ref: string // session ID, commit SHA, PR URL, etc.
|
|
201
|
+
creator_entity_id: string
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
interface PropHop {
|
|
205
|
+
from_scope: Scope
|
|
206
|
+
to_scope: Scope
|
|
207
|
+
reason: "evidence_threshold" | "policy_push" | "manual_promote"
|
|
208
|
+
timestamp: string
|
|
209
|
+
confidence_at_hop: number // decays per hop (×0.85)
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Evidence Score Computation
|
|
214
|
+
|
|
215
|
+
`evidence_score` is a derived value (0-1), recomputed on access and during gravity scheduling:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
evidence_score = min(1.0,
|
|
219
|
+
base_confidence
|
|
220
|
+
× (1 + 0.1 × corroborations)
|
|
221
|
+
× (1 + 0.01 × min(access_count, 50))
|
|
222
|
+
× authority_factor
|
|
223
|
+
÷ (1 + 0.5 × contradiction_count)
|
|
224
|
+
)
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
- `base_confidence`: from KnowledgeType defaults (decision: 0.8, pattern: 0.8, preference: 0.95, error_fix: 0.8, context: 0.6, etc.)
|
|
228
|
+
- `corroborations`: count of independent sources confirming this knowledge (capped contribution at 10)
|
|
229
|
+
- `access_count`: how often this knowledge was retrieved (diminishing returns, capped at 50)
|
|
230
|
+
- `authority_factor`: 1.0 for conversations, 1.1 for git commits, 1.2 for documents/ADRs, 1.3 for manual/admin teach
|
|
231
|
+
- `contradiction_count`: number of active contradictions (penalizes contested knowledge)
|
|
232
|
+
|
|
233
|
+
### Migration Strategy
|
|
234
|
+
|
|
235
|
+
Existing ~542 units migrate with these mappings:
|
|
236
|
+
- `layer: "personal"` → `scope: { level: "personal", entity_id: "person-{user}" }`
|
|
237
|
+
- `layer: "workspace"` → `scope: { level: "team", entity_id: "team-default" }`
|
|
238
|
+
- `layer: "team"` → `scope: { level: "organization", entity_id: "org-default" }`
|
|
239
|
+
- New fields get defaults: `evidence_score: 0.5`, `sensitivity: "internal"`, `entity_links: []` (backfilled by signal ingestion)
|
|
240
|
+
- Old API still accepts `layer` param, maps internally to scope (backward compatible)
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Pillar 3: Context Assembly Engine
|
|
245
|
+
|
|
246
|
+
The retrieval brain. Replaces the current single-vector-search with a 6-stage pipeline that dynamically weights multiple knowledge sources.
|
|
247
|
+
|
|
248
|
+
### Stage 1: Intent Detection
|
|
249
|
+
|
|
250
|
+
Classify the query into intent categories using regex patterns + embedding similarity against intent exemplars:
|
|
251
|
+
|
|
252
|
+
| Intent | Weight Bias |
|
|
253
|
+
|--------|-------------|
|
|
254
|
+
| debugging | +personal, +error_fix, +recent |
|
|
255
|
+
| architecture | +team, +decisions, +department |
|
|
256
|
+
| onboarding | +org-wide, +patterns, +docs |
|
|
257
|
+
| policy | +org-wide, +decisions, +confidential |
|
|
258
|
+
| how-to | +personal, +commands, +patterns |
|
|
259
|
+
| review | +team, +code_patterns, +preferences |
|
|
260
|
+
| security | +security-team, +restricted scope |
|
|
261
|
+
| general | no bias, pure graph distance |
|
|
262
|
+
|
|
263
|
+
No LLM call — fast regex + embedding match.
|
|
264
|
+
|
|
265
|
+
### Stage 2: Entity Resolution
|
|
266
|
+
|
|
267
|
+
Extract entity references from query text:
|
|
268
|
+
1. Exact alias lookup (`entity_aliases` table)
|
|
269
|
+
2. Fuzzy alias match (Levenshtein distance ≤ 2)
|
|
270
|
+
3. Embedding similarity against entity name/description vectors
|
|
271
|
+
|
|
272
|
+
### Stage 3: Weight Computation
|
|
273
|
+
|
|
274
|
+
For each accessible knowledge scope:
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
weight(scope) = graph_proximity × intent_bias × freshness_bonus × authority
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
- `graph_proximity`: `1 / (1 + shortest_path_distance)` from requester to scope
|
|
281
|
+
- `intent_bias`: from Stage 1 intent category (values defined in the intent table above)
|
|
282
|
+
- `freshness_bonus`: 1.1 if scope has relevant activity in last 7 days, 1.05 if last 30 days, 1.0 otherwise
|
|
283
|
+
- `authority`: computed as `max(1.0, role_boost + expertise_weight)` where:
|
|
284
|
+
- `role_boost`: 0.0 for member, 0.1 for lead, 0.15 for senior/principal, 0.2 for director+ (from Person entity role field)
|
|
285
|
+
- `expertise_weight`: the EXPERT_IN edge weight (0-1) between the source entity and query-relevant topics
|
|
286
|
+
- For non-person sources (org standards, official docs): `origin.source_type === "document"` gets authority 1.2 (documents outrank conversations)
|
|
287
|
+
|
|
288
|
+
Computed via SQLite recursive CTE for graph_proximity, cached per request (~10ms warm, ~30ms cold; precompute proximity for current user at session start as fallback).
|
|
289
|
+
|
|
290
|
+
### Stage 4: Parallel Multi-Source Search
|
|
291
|
+
|
|
292
|
+
Query all weighted sources concurrently via `Promise.allSettled`:
|
|
293
|
+
- Higher-weight sources get more result slots (proportional to weight)
|
|
294
|
+
- 100ms timeout per source; failures don't block other sources
|
|
295
|
+
- Boundary Engine filters inaccessible scopes BEFORE search begins
|
|
296
|
+
|
|
297
|
+
### Stage 5: Fusion + Re-Ranking
|
|
298
|
+
|
|
299
|
+
Score each candidate:
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
final_score = vector_similarity × source_weight × evidence_score × (1 - stale_score) × type_boost
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
- Deduplicate: if two results have cosine > 0.9, keep higher-scored, note corroboration
|
|
306
|
+
- Sort by final_score, take top K (default: 5)
|
|
307
|
+
|
|
308
|
+
### Stage 6: Conflict Detection + Context Formatting
|
|
309
|
+
|
|
310
|
+
- Check `contradiction_refs` across top results
|
|
311
|
+
- Flag contested knowledge with both perspectives
|
|
312
|
+
- Format as annotated `<cortex-context>` with source attribution, conflict callouts, and evidence indicators
|
|
313
|
+
|
|
314
|
+
### Performance Budget
|
|
315
|
+
|
|
316
|
+
| Stage | Target | Method |
|
|
317
|
+
|-------|--------|--------|
|
|
318
|
+
| 1-2: Intent + Entities | ~5ms | Regex + alias lookup |
|
|
319
|
+
| 3: Weight Computation | ~10ms | Graph BFS, cached SQLite CTE |
|
|
320
|
+
| 4-6: Search + Fuse | ~80ms | Parallel vector search |
|
|
321
|
+
| **Total** | **<150ms** | Within hook's 5s timeout |
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Pillar 4: Boundary Engine
|
|
326
|
+
|
|
327
|
+
Three-layer access control evaluated in order. Most restrictive classification always wins.
|
|
328
|
+
|
|
329
|
+
### Layer 1: Auto-Classification
|
|
330
|
+
|
|
331
|
+
Regex-based content analysis assigns sensitivity (fast, deterministic, auditable):
|
|
332
|
+
|
|
333
|
+
| Detector | Triggers | Classification |
|
|
334
|
+
|----------|----------|----------------|
|
|
335
|
+
| Secrets | API keys, tokens, passwords, connection strings | confidential |
|
|
336
|
+
| Personnel | Performance reviews, salary, hiring, 1:1 notes | confidential |
|
|
337
|
+
| Security | Vulnerabilities, exploits, CVEs, incident details | restricted |
|
|
338
|
+
| Business | Revenue, strategy, unreleased plans, customer data | restricted |
|
|
339
|
+
| Technical | Architecture, patterns, code, decisions | internal |
|
|
340
|
+
| General | Common patterns, public docs, well-known techniques | public |
|
|
341
|
+
|
|
342
|
+
### Layer 2: Organizational Policy
|
|
343
|
+
|
|
344
|
+
Admin-defined rules that control propagation and access:
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
interface Policy {
|
|
348
|
+
name: string
|
|
349
|
+
match: {
|
|
350
|
+
type?: KnowledgeType
|
|
351
|
+
topics?: string[]
|
|
352
|
+
sensitivity?: SensitivityClass
|
|
353
|
+
scope_level?: Scope["level"]
|
|
354
|
+
}
|
|
355
|
+
action: {
|
|
356
|
+
max_scope?: Scope["level"] // can't propagate beyond this level
|
|
357
|
+
propagate_to?: PropagationTarget[] // MUST reach these specific scopes
|
|
358
|
+
trickle_down?: boolean // auto-visible to child scopes
|
|
359
|
+
cannot_propagate?: boolean // locked to current scope
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
interface PropagationTarget {
|
|
364
|
+
level: Scope["level"]
|
|
365
|
+
entity_id?: string // specific entity, or omit for "all at this level"
|
|
366
|
+
// e.g., { level: "team", entity_id: "team-security" } = must reach security team
|
|
367
|
+
// e.g., { level: "department" } = must reach at least department level
|
|
368
|
+
}
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
`propagate_to` replaces the previous `min_scope` and `required_scope` — it's a single array that handles both "must reach this level" and "must reach this specific team." When multiple targets are specified, all must be satisfied. `max_scope` takes precedence: if a target would exceed `max_scope`, it's skipped (policy contradiction logged as warning).
|
|
372
|
+
|
|
373
|
+
Example policies:
|
|
374
|
+
- Security findings must reach security team, cannot leave department
|
|
375
|
+
- Architecture decisions always propagate to department+
|
|
376
|
+
- Org decisions auto-trickle-down to all teams
|
|
377
|
+
- Confidential knowledge cannot propagate from personal scope
|
|
378
|
+
|
|
379
|
+
Stored in Cortex config, admin-editable. Evaluated at ingestion time and query time.
|
|
380
|
+
|
|
381
|
+
### Layer 3: Creator Override
|
|
382
|
+
|
|
383
|
+
The person who created knowledge can restrict further (never widen):
|
|
384
|
+
- Creator can restrict: team → personal
|
|
385
|
+
- Creator CANNOT widen: restricted → public
|
|
386
|
+
- Policy overrides auto-class only upward (more restrictive wins)
|
|
387
|
+
|
|
388
|
+
Set via MCP tool (`cortex_teach --scope personal`), API, or future UI toggle.
|
|
389
|
+
|
|
390
|
+
### Query-Time Enforcement
|
|
391
|
+
|
|
392
|
+
Before the Context Assembly Engine searches, compute accessible scopes:
|
|
393
|
+
|
|
394
|
+
| Sensitivity | Same Scope | Same Dept | Same Org | Cross Org |
|
|
395
|
+
|-------------|-----------|-----------|----------|-----------|
|
|
396
|
+
| public | read | read | read | read |
|
|
397
|
+
| internal | read | read | read | denied |
|
|
398
|
+
| restricted | read | policy-gated | denied | denied |
|
|
399
|
+
| confidential | grant-only | denied | denied | denied |
|
|
400
|
+
|
|
401
|
+
**Grant mechanism for confidential knowledge:** Creators can grant access to specific people via the `access_grants` table (defined in Pillar 1 Storage). Grants are explicit: `{ knowledge_id, grantee_entity_id, granted_by, created }`. At query time, confidential knowledge is accessible if `requester_entity_id === creator_entity_id` OR an `access_grants` row exists for that requester. Grants are set via MCP tool (`cortex_teach --grant person-alice`), API (`POST /api/cortex/knowledge/{id}/grant`), or future UI.
|
|
402
|
+
|
|
403
|
+
### Audit Trail
|
|
404
|
+
|
|
405
|
+
Every access decision logged in append-only SQLite table: who requested, what returned, what denied and why. Queryable by admins. Default retention: 90 days.
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Pillar 5: Observable Signal Ingestion
|
|
410
|
+
|
|
411
|
+
Seven signal sources, each with an adapter that normalizes to a common `SignalEnvelope`.
|
|
412
|
+
|
|
413
|
+
### Signal Sources
|
|
414
|
+
|
|
415
|
+
1. **Conversations** (existing, evolved) — Claude Code Q&A via learn hook. Enhanced with auto-entity linking, multi-turn context extraction, intent tagging.
|
|
416
|
+
|
|
417
|
+
2. **Git History** — commits, blame, file change frequency. Extracts: who works on what (TOUCHES edges), commit messages → decisions/fixes, co-change clusters → system boundaries.
|
|
418
|
+
|
|
419
|
+
3. **PR Reviews** — review comments, approval patterns. Extracts: code quality patterns, architectural preferences, reviewer expertise (EXPERT_IN edges), team conventions.
|
|
420
|
+
|
|
421
|
+
4. **Documents** — ADRs, READMEs, runbooks, wiki pages. Higher authority weight than conversations. Extracts: official decisions, architecture documentation, operational procedures.
|
|
422
|
+
|
|
423
|
+
5. **Test Signals** — test failures, flaky tests, coverage gaps. Extracts: reliability patterns, modules that break together (DEPENDS_ON edges), error-prone areas.
|
|
424
|
+
|
|
425
|
+
6. **Deployment Patterns** — deploy frequency, rollbacks, incidents. Extracts: system stability patterns, risky change areas, deployment best practices, incident response knowledge.
|
|
426
|
+
|
|
427
|
+
7. **Behavioral Inference** — derived from observing all other signals. Infers: actual team boundaries vs org chart, expertise decay, knowledge gaps, de facto ownership.
|
|
428
|
+
|
|
429
|
+
### Adapter Architecture
|
|
430
|
+
|
|
431
|
+
```typescript
|
|
432
|
+
interface SignalEnvelope {
|
|
433
|
+
text: string
|
|
434
|
+
origin: Origin
|
|
435
|
+
entities: EntityLink[] // detected entity references
|
|
436
|
+
suggested_type: KnowledgeType
|
|
437
|
+
suggested_sensitivity: SensitivityClass
|
|
438
|
+
raw_metadata: Record<string, unknown>
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
interface SignalAdapter {
|
|
442
|
+
name: string
|
|
443
|
+
schedule: "realtime" | "polling" | "webhook" | "cron"
|
|
444
|
+
extract(): AsyncIterable<SignalEnvelope>
|
|
445
|
+
healthCheck(): Promise<boolean>
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
All adapters produce `SignalEnvelope`. Adding a new source = implement one interface, zero pipeline changes.
|
|
450
|
+
|
|
451
|
+
### Unified Signal Pipeline
|
|
452
|
+
|
|
453
|
+
A new `SignalPipeline` consumes envelopes from all adapters and replaces the existing `IngestionPipeline` as the primary entry point (the old pipeline is wrapped as the Conversation adapter for backward compatibility).
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
class SignalPipeline {
|
|
457
|
+
async ingest(envelope: SignalEnvelope): Promise<IngestResult> {
|
|
458
|
+
// 1. Dedup: hash check (pre-embed) + cosine check (post-embed)
|
|
459
|
+
// 2. Entity resolution: resolve envelope.entities against graph,
|
|
460
|
+
// create EntityLinks for the knowledge unit
|
|
461
|
+
// 3. Sensitivity: envelope.suggested_sensitivity is the starting point,
|
|
462
|
+
// then Boundary Engine Layer 1 (auto-classification) can UPGRADE
|
|
463
|
+
// sensitivity (never downgrade). Most restrictive wins.
|
|
464
|
+
// 4. Type resolution: envelope.suggested_type is accepted unless
|
|
465
|
+
// extractors detect a more specific type (e.g., adapter says
|
|
466
|
+
// "conversation" but regex detects error_fix pattern → error_fix)
|
|
467
|
+
// 5. Embed: batch via current EmbeddingProvider
|
|
468
|
+
// 6. Store: add to LanceDB with full v2 schema
|
|
469
|
+
// 7. Graph updates: process any edge updates from envelope.raw_metadata
|
|
470
|
+
// (e.g., git adapter includes TOUCHES/EXPERT_IN edge updates)
|
|
471
|
+
// 8. Distillation queue: enqueue distillable types (decision, error_fix)
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
The existing `IngestionPipeline.ingest(messages, context)` is preserved as the internal implementation of the Conversation adapter. It converts `SessionMessage[]` into `SignalEnvelope[]` and feeds them to the unified pipeline.
|
|
477
|
+
|
|
478
|
+
### Signal Source → Knowledge Type Mapping
|
|
479
|
+
|
|
480
|
+
New signal sources map to existing knowledge types (no new types needed):
|
|
481
|
+
|
|
482
|
+
| Signal Source | Primary Types | Mapping Logic |
|
|
483
|
+
|--------------|---------------|---------------|
|
|
484
|
+
| Git commits | error_fix, decision | Commit message regex: "fix" → error_fix, "refactor/migrate/switch to" → decision |
|
|
485
|
+
| PR reviews | preference, pattern, code_pattern | Review comments → preference; approval patterns → pattern |
|
|
486
|
+
| Documents (ADRs) | decision | ADRs are decisions by definition |
|
|
487
|
+
| Documents (runbooks) | pattern, command | Operational procedures → pattern; shell blocks → command |
|
|
488
|
+
| Test signals | error_fix, pattern | Failures → error_fix; flaky patterns → pattern |
|
|
489
|
+
| Deployment | error_fix, pattern, decision | Rollbacks → error_fix; deploy practices → pattern |
|
|
490
|
+
| Behavioral | pattern, context | Inferred structures → pattern; gap analysis → context |
|
|
491
|
+
|
|
492
|
+
### Scheduling
|
|
493
|
+
|
|
494
|
+
| Source | Trigger | Frequency |
|
|
495
|
+
|--------|---------|-----------|
|
|
496
|
+
| Conversations | Real-time (Stop hook) | Every Claude Code response |
|
|
497
|
+
| Git History | Post-commit hook or polling | On commit or every 15 min |
|
|
498
|
+
| PR Reviews | GitHub webhook or polling | On PR close/merge |
|
|
499
|
+
| Documents | File watcher on docs/** | On file change |
|
|
500
|
+
| Test Signals | CI pipeline webhook | On test run completion |
|
|
501
|
+
| Deployment | Deploy webhook | On deploy/rollback events |
|
|
502
|
+
| Behavioral Inference | Scheduled background job | Daily |
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Pillar 6: Gravity System
|
|
507
|
+
|
|
508
|
+
Bi-directional knowledge flow with evidence-based promotion and decision propagation.
|
|
509
|
+
|
|
510
|
+
### Bubble-Up: Evidence-Based Promotion
|
|
511
|
+
|
|
512
|
+
Knowledge becomes a candidate for promotion when:
|
|
513
|
+
|
|
514
|
+
```
|
|
515
|
+
promotion_score = evidence_score × type_weight × freshness
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Type weights:** decision (1.5), error_fix (1.3), pattern (1.2), conversation (0.5)
|
|
519
|
+
|
|
520
|
+
**Promotion thresholds:**
|
|
521
|
+
- personal → team: score ≥ 0.6, corroborations ≥ 2, sensitivity ≤ internal
|
|
522
|
+
- team → department: score ≥ 0.75, corroborations ≥ 3 (from 2+ teams), sensitivity ≤ internal
|
|
523
|
+
- department → organization: score ≥ 0.9, corroborations ≥ 5 (from 2+ depts), sensitivity ≤ internal, no active contradictions
|
|
524
|
+
|
|
525
|
+
**On promotion:**
|
|
526
|
+
1. Knowledge is COPIED (not moved) — original stays with full history
|
|
527
|
+
2. Confidence decays per hop: ×0.85
|
|
528
|
+
3. Entity links broadened (scoped_to changes)
|
|
529
|
+
4. Propagation_path entry recorded
|
|
530
|
+
5. Creator notified
|
|
531
|
+
|
|
532
|
+
### Trickle-Down: Decision Push + Standard Spread
|
|
533
|
+
|
|
534
|
+
Two modes:
|
|
535
|
+
- **PUSH** — copies knowledge into lower scopes. For critical decisions, standards, policy changes. Visible without searching.
|
|
536
|
+
- **VISIBILITY** — knowledge accessible at query time via graph proximity but not copied. For general org wisdom, best practices.
|
|
537
|
+
|
|
538
|
+
| Knowledge type | Default | Override |
|
|
539
|
+
|---------------|---------|----------|
|
|
540
|
+
| Org decisions | PUSH to all | Policy |
|
|
541
|
+
| Security policies | PUSH to affected | Policy |
|
|
542
|
+
| Best practices | VISIBILITY | Manual push |
|
|
543
|
+
| Standards | PUSH to depts | Policy |
|
|
544
|
+
| General patterns | VISIBILITY | — |
|
|
545
|
+
|
|
546
|
+
### Conflict Detection
|
|
547
|
+
|
|
548
|
+
Four states:
|
|
549
|
+
- **UNRESOLVED** — contradiction exists, no human input. Both surfaced with "[Contested]" flag during retrieval.
|
|
550
|
+
- **CONTEXTUAL** — marked as "both valid in different contexts." System serves the context-appropriate one.
|
|
551
|
+
- **RESOLVED** — human chose a winner or created synthesis. Loser downranked (evidence_score × 0.3).
|
|
552
|
+
- **BLOCKED** — contradicts higher-scope knowledge. Cannot promote until resolved.
|
|
553
|
+
|
|
554
|
+
Contradiction detection: during ingestion, when a new unit has cosine similarity > `CONTRADICTION_COSINE_THRESHOLD` (0.80) with an existing unit but opposite sentiment/conclusion (keyword analysis). Units in the 0.80-0.90 range are potential contradictions; above 0.90 (`DEDUP_COSINE_THRESHOLD`) they're duplicates.
|
|
555
|
+
|
|
556
|
+
### Gravity Scheduler
|
|
557
|
+
|
|
558
|
+
Runs periodically (configurable, default every 6 hours):
|
|
559
|
+
1. Scan for promotion candidates (evidence_score changed since last run)
|
|
560
|
+
2. Execute pending trickle-down (push queue)
|
|
561
|
+
3. Detect new conflicts
|
|
562
|
+
4. Decay stale knowledge (reduce evidence for unaccessed units, auto-archive below 0.1 after 6 months)
|
|
563
|
+
5. Update graph edge weights (decay inactive EXPERT_IN, strengthen active, prune below threshold)
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
## Phase 4 (Future): Learned Attention Weights
|
|
568
|
+
|
|
569
|
+
Once Phases 1-3 generate sufficient usage data, layer in learned attention weights that optimize the Context Assembly Engine's weight computation:
|
|
570
|
+
|
|
571
|
+
- Collect training data: which sources produced results that were actually useful (measured by user behavior after retrieval — did they use the suggested fix? did they ask a follow-up indicating the context was wrong?)
|
|
572
|
+
- Train lightweight attention weights per intent category
|
|
573
|
+
- The graph provides cold-start structure; attention learns what the graph can't encode
|
|
574
|
+
- Transition: graph weights serve as priors, learned weights modulate them
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## Sub-Project Decomposition
|
|
579
|
+
|
|
580
|
+
Each pillar is a separate implementation cycle (spec → plan → implement → review):
|
|
581
|
+
|
|
582
|
+
| # | Sub-Project | Dependencies | Estimated Complexity |
|
|
583
|
+
|---|------------|-------------|---------------------|
|
|
584
|
+
| 1 | Entity Graph Foundation | None | Medium — SQLite schema, CRUD API, auto-population from users/workspaces |
|
|
585
|
+
| 2 | Knowledge Unit Schema Evolution | Pillar 1 | Medium — schema migration, backward-compatible API layer |
|
|
586
|
+
| 3 | Context Assembly Engine | Pillars 1, 2 | High — 6-stage pipeline, intent detection, parallel search, fusion |
|
|
587
|
+
| 4 | Boundary Engine | Pillars 1, 2 | Medium — auto-classification, policy engine, enforcement layer |
|
|
588
|
+
| 5 | Observable Signal Ingestion | Pillars 1, 2, 4 | High — 7 adapters, unified pipeline, scheduling |
|
|
589
|
+
| 6 | Gravity System | All above | High — promotion logic, trickle-down, conflict detection, scheduler |
|
|
590
|
+
|
|
591
|
+
Pillars 1-2 can be built in parallel. Pillars 3-4 can be built in parallel after 1-2 complete. Pillars 5-6 depend on all prior work.
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
## Degraded / Cold-Start Behavior
|
|
596
|
+
|
|
597
|
+
The system must degrade gracefully when the graph is incomplete:
|
|
598
|
+
|
|
599
|
+
- **No graph (fresh install):** Context Assembly Engine falls back to v1 flat-layer behavior (search personal, then workspace, then team with fixed weights). No promotion, no policies, no entity resolution.
|
|
600
|
+
- **Single user, no teams:** Scope is always `personal`. Promotion thresholds adapt: "2+ teams" becomes "2+ independent sessions" (the user corroborates their own knowledge across separate conversations). Trickle-down is a no-op.
|
|
601
|
+
- **No knowledge units:** RAG hook returns empty context silently (already handles this). Learn hook operates normally, building the knowledge base from scratch.
|
|
602
|
+
- **Sparse graph (some entities, few edges):** Graph proximity falls back to scope-level distance when no path exists between entities (personal=0, same team=1, same dept=2, same org=3). Edge weights default to 0.5 when not computed from signals.
|
|
603
|
+
|
|
604
|
+
## MCP Tool Backward Compatibility
|
|
605
|
+
|
|
606
|
+
The `cortex_teach` MCP tool and all API endpoints accept both old and new parameters:
|
|
607
|
+
- `--layer personal` maps internally to `scope: { level: "personal", entity_id: "{current-user}" }`
|
|
608
|
+
- New parameters `--scope`, `--sensitivity`, `--grant` are added alongside old ones
|
|
609
|
+
- Existing hooks (`cortex-hook.js`, `cortex-learn-hook.js`) continue working unchanged; enhanced versions are opt-in
|
|
610
|
+
|
|
611
|
+
## Gravity Scheduler Implementation
|
|
612
|
+
|
|
613
|
+
The Gravity Scheduler runs as a `setInterval` timer within the Spaces Node.js process (consistent with `FederationSync.start()`). On process restart, it resumes from the last checkpoint stored in SQLite (`gravity_state` table with `last_run` timestamp). Incomplete cycles are idempotent — re-running a promotion scan or decay pass produces the same result.
|
|
614
|
+
|
|
615
|
+
## Success Criteria
|
|
616
|
+
|
|
617
|
+
- Retrieval latency remains <150ms (current: ~50ms single-source)
|
|
618
|
+
- Knowledge from the right source surfaces first (measured by graph-distance correlation with user satisfaction)
|
|
619
|
+
- Confidential knowledge never leaks across scope boundaries (verified by audit trail)
|
|
620
|
+
- Evidence-based promotion reduces noise in higher scopes (measured by corroboration ratio)
|
|
621
|
+
- New signal sources can be added by implementing a single adapter interface
|
|
622
|
+
- Conflict surfacing reduces silent contradictions (measured by unresolved conflict count trending down)
|
|
623
|
+
- Existing 542+ units migrate without data loss, old API stays backward compatible
|