File-to-Responsibility Map
open-knowledge
A jump table into inkeep/open-knowledge. Paths are relative to the repo root;
line numbers match the tree at analysis time and may drift.
| Path |
Responsibility |
src/cli.ts |
Commander entry; ~23 commands registered at :65-168 |
src/commands/init.ts |
ok init — runInit (:587-769), writeEditorMcpConfig (:373-505), detection (:364-371, :1088-1096), launch.json (:290-362) |
src/commands/editors.ts |
The bridge. EditorMcpTarget interface (:222-234), EDITOR_TARGETS registry (:236-300), CHAIN_V1 launcher (:20-32), entry builders (:86-116) |
src/commands/start.ts |
ok start — boot collab server + spawn UI (:560-708) |
src/commands/ui.ts |
static web editor on :39847, /collab WS upgrade |
src/commands/mcp.ts |
ok mcp stdio server bootstrap (:14-98), bundle-proxy decision |
src/mcp/server.ts |
MCP server wiring (:145-260), per-call cwd routing (:219-225) |
src/integrations/write-project-skill.ts |
drop SKILL.md into each harness's skill dir (:57-91) |
| Path |
Responsibility |
index.ts |
registerAllTools (:33) — registers the 17 tools |
registry.test.ts |
tool-list contract (:11-29) |
shared.ts |
result helpers textResult/textPlusStructured (:99-132), outputSchemaWithText (:113-120), workflow frame / Karpathy context (:161-179), buildWorkflowHandler (:187-202) |
workflow.ts |
dispatcher for discover/ingest/research/consolidate (:39-114) |
discover-body.ts |
7-phase repo-discovery procedure (prose) |
ingest-body.ts |
7-step raw-source preservation procedure |
research-body.ts |
8-step provisional-research procedure (:28-41) |
consolidate-body.ts |
6-step promotion-to-canonical procedure |
| Path |
Responsibility |
src/server-factory.ts |
Hocuspocus bootstrap (:513-518), extension stack (:545-699), embedder wiring (:333-347) |
src/persistence.ts |
Yjs↔git binding (:25), commit pipeline (:350-437), OkActorEntry footer (:406-482) |
src/external-change.ts |
disk↔CRDT reconciliation; source/default Yjs fields (:63-64) |
src/shadow-repo.ts |
shadow repo; commitWip (:227-323), buildWipTree (:334-355), simple-git (:69) |
src/embeddings/semantic-search-service.ts |
chunk + embed + cache (:129-145) |
assets/skills/**/SKILL.md |
the ~11 bundled skills (discovery, project, packs); discovery frontmatter (discovery/SKILL.md:1-9) |
| Path |
Responsibility |
scripts/dump-schema.ts |
ProseMirror/MDAST schema snapshot (:71-119) |
src/constants/ok-dir.ts |
OK_DIR = '.ok' (:3) |
src/search/workspace-search.ts |
hybrid search: index (:142-149), lexical (:181-206), BM25 (:405-418), vector + RRF (:492-592, fusion :552-591) |
src/shadow-repo-layout.ts |
.git/ok/ layout |
src/markdown/pipeline.ts |
frontmatter strip + markdown pipeline |
| Path |
Responsibility |
TiptapEditor.tsx |
the WYSIWYG editor component |
extensions/slash-command.ts, drag-handle.ts, block-mover.ts, find-replace/, heading-anchors.ts, footnote-anchor-scroll.ts, table-insert-controls.ts, frozen-table-headers.ts |
TipTap extensions |
composer-mention/composer-mention.ts |
@-mentions |
extensions/bridge-id-plugin.ts, source-dirty-observer.ts |
rich-text ↔ markdown source reconciliation |
| Path |
Responsibility |
src/main/index.ts |
Electron main; webPreferences (:279-282), PTY fork (:1780), claude-assist handler (:2310) |
src/shared/ipc-invoke.ts, ipc-channels.ts |
typed IPC contract; HandoffStatsLine (ipc-channels.ts:109-124) |
src/utility/pty-host.ts |
node-pty shell spawn (:178-185) |
src/main/terminal-manager.ts |
multiplex PTY sessions + backpressure |
src/preload/index.ts |
renderer bridge incl. terminal (:498-525), claudePreflight (:522), rewireClaudeMcp (:524) |
src/main/mcp-wiring.ts |
first-launch MCP wiring + .ok/mcp-status.json (:1-30) |
src/main/ipc-handlers.ts |
Cursor spawn (:147-181) |
src/main/url-scheme.ts |
openknowledge:// + universal links (:83-93) |
src/main/ipc/install-skill.ts |
build claude-cowork skill ZIP (:32,68,105) |
src/utility/keyring-smoke.ts |
@napi-rs/keyring secret storage |
| Path |
Responsibility |
packages/plugin/.claude-plugin/plugin.json |
Claude Code plugin manifest (declarative shim) |
docs/content/integrations/{claude-code,codex,cursor,opencode}.mdx |
per-harness setup + "Open with AI" UX |
docs/content/features/{agent-activity,github-sync,timeline-and-recovery,editor}.mdx |
live agent review, sync, recovery |