Cortexes synthesis
Type: agentic-system-analyses/types/agentic-system-synthesis.md
Bounded synthesis
A vault loop inside Claude Code
Cortexes is a Claude Code knowledge-vault plugin with a companion Python CLI, not an enclosing agent executor. It aims to retain session material, turn selected material into Notes/Projects, maintain related pages and retrieve them in later sessions. Claude Code owns foreground model execution, tools, permissions, transcripts and lifecycle events. Cortexes supplies capture hooks, a menu interface, model-followed procedures and executable indexing/navigation commands (RT-CLM-vault-purpose, RT-CMP-claude-code).
This account covers the shipped state loop at commit 2b8e79f0099203e0453147b708346349952bb963 of https://github.com/xbluesky/cortexes, with an applicability cutoff of 2026-11-08. The whole-system functional boundary includes initialization, capture, curation, retrieval, continuation and evaluation; it excludes host/provider implementations, private vaults and later revisions. SRC-1 supplies implementation and doctrine/design evidence, not observed runs or causal experiments. No target code or tests were executed. Executable checks and requested model behavior therefore retain different evidence strengths throughout (boundary and evidence, Source register).
Capture first, then selective admission
SessionStart supplies top-level topic metadata and repo-selected baton previews. A compatible deck interface can replace the menu portion of hook context and submit a chosen action as user input; it does not inject the full vault. On SessionEnd, eligibility guards precede a detached writer that filters the host transcript into dated Raw Markdown and can commit/push it. Hook return does not certify that capture or remote persistence finished (RT-RTE-session-start, RT-RTE-session-capture).
Raw is already a lossy derivative, not a pristine transcript. Deterministic filters and an optional separate classifier choose what to preserve; the classifier returns a retention verdict rather than a truth judgment. Its selected text prefix is sent before final whole-body redaction. Error paths favor preservation, including retaining an unredacted body if that final redaction fails. This is reachable source behavior, not an observed leak, and rules out a universal privacy guarantee. Automatic capture does not require per-record human approval (MEM-OBJ-raw, RT-RTE-session-capture).
Durable page admission has several routes. Evolve accepts user-supplied material and lets the model author and place a page without the final-draft confirmation required by distill. Distill prescribes both a human verdict and draft confirmation; broadcast prescribes target selection and approval of changes to existing pages. These are interpreted procedures, not a CLI-enforced confirmation monitor. The distinction prevents treating all retained content as human-validated knowledge (RT-RTE-direct-save, MEM-OBJ-notes-projects, RT-BAP-plugin-guidance).
A connected review-to-delivery workflow
The representative workflow is a request to distill saved Raw, taking a new-note outcome through inline broadcast and later retrieval. It is explicitly connected by shipped instructions, not reconstructed from unrelated APIs. One foreground agent owns the next step; no independent reviewing subagent is prescribed (workflow account).
The agent selects map cards and exact source spans through a source-bound plan. The CLI accounts emitted characters and reviewed ranges, rejects source drift and requires coverage before sealing a negative no-insight outcome. Positive candidates can stop earlier after registering reviewed evidence. These controls constrain the page API, not direct host Read/Bash, model understanding or factual correctness. A caller's new-session flag resets accounting without host-session attestation. Returned pages remain in the foreground window; the API does not evict earlier context (RT-RTE-distill-review, MEM-OBJ-distill-plan).
The model presents excerpts and a candidate verdict, then asks the human whether to create a page, defer to a merge target or skip. Search scores guide placement rather than determine admission. New pages require draft confirmation; pending merge records a target without creating a new page. The prescribed delivery includes page/index/log/marker changes and commits. Seal checks expected outcome and negative coverage; completion checks normalized source identity and matching marker outcome. Neither proves that the note, index, log or commit exists (RT-RTE-distill-review, workflow annotations).
New and pending-merge outcomes dispatch broadcast inline in the same context. The human still chooses destinations and accepts or rejects exact changes. Contradictions can become inline flags or user-directed rewrites, not automatically adjudicated truths. Aborting a page discards its uncommitted proposals but leaves earlier page commits intact. Finalization may resolve the Raw marker even with zero pages changed. Delivery is thus a procedural local result, not a transaction spanning every store or proof that knowledge propagated (RT-RTE-broadcast-edit, workflow account).
Retained content and access structures have different force
Canonical Markdown and Git history are distinct from rebuildable retrieval state. Chroma retains body/summary documents, metadata and dense document embeddings; BM25 retains lexical tokens and display metadata; a process-local graph derives adjacency from wikilinks. Summary generation sees title/tags and only the first 3000 body characters, then automatically admits its output or a title/tags fallback. Later display extraction narrows the matched text again. A displayed summary is neither a complete page nor evidence of faithful compression (MEM-OBJ-vectorstore, MEM-OBJ-bm25, MEM-OBJ-wikilink-graph, EPI-RTE-summary-build).
A later query combines vector and lexical candidates through reciprocal-rank fusion, optionally expands graph neighbors and reranks existing candidates. It returns metadata first; a selected full-file read supplies detailed content. Repo filtering deliberately keeps Notes cross-repo and is not tenant isolation. Direct grep/Read remain separate host-controlled routes. Zero cosine can mean unavailable measurement or failed backfill, so distill/broadcast's every-hit measured-cosine wording cannot support a duplicate-absence judgment in all modes (RT-RTE-vault-search).
Retained prose supplies interpreted context; tokens, embeddings and links influence discovery/ranking. Plan identities and coverage enforce named API conditions, while processed markers control queue eligibility. A marker is not proof of successful review. Index deletion is not epistemic retraction: a vector-empty early return can leave BM25 searchable, and canonical files remain readable or reindexable. Reclaim instead removes prefix-covered Raw bodies under a repo-equality check, without proving preservation of unique pre-turn metadata (MEM-BAP-page-context, MEM-OBJ-distilled-marker, MEM-RTE-index-delete, MEM-RTE-reclaim-raw, EPI-RTE-prefix-check).
Continuation and the limits of improvement claims
The strongest supported trace-fed adaptation is the prescribed takeoff baton: the model curates goal, progress, next steps and gotchas from mixed session/tool experience into a retained topic note, without separate content approval. A later session is instructed to load it fully as continuation guidance. This supports claimed automatic trace-fed memory formation and later instruction/context supply, not observed improved capacity. Startup pushes previews; full-body resume is requested. Overwrite replaces the active topic, loading does not delete it, and completion soft-deletes it (MEM-OBJ-takeoff, RT-RTE-takeoff-handoff, RT-BAP-baton-context, profile verification).
The baton keeps unselected old-session material out of a fresh session, but Cortexes itself does not pop or compact the original host window. Separate classifier, summary and rerank calls similarly receive selected inputs and return bounded outputs, rather than delegating the full foreground task. Baton's ignored-path preflight is separate from the actual host Write and is not a universal non-commit monitor. Prepare can also amend and commit the vault's ignore rule, an additional helper effect identified by verification (RT-RTE-session-capture, RT-RTE-vault-search, RT-RTE-takeoff-handoff, report verification limits).
Generic page revision affords content-specific disagreement and replacement. For actual vault theories, however, theory-builder condition 1 (a localized whole theory unit), condition 2 (decisions depending on its content), condition 3 (stated content-directed criticism with blame and changed reliance/revision), and condition 4 (that result shaping another round) each remain uninspected. Exact-section editing affords addressability; it does not supply those instances. Whether criticism improved future capacity is separately uninspected. Reflection's two causal directions are unestablished. Autonomous theory building is not established by routes that prescribe human decisions. Exercised self-improvement is also unestablished: no retained change is traced through subsequent operation causally depending on it. These conclusions neither deny the continuation mechanism nor infer hidden model properties (RT-RTE-broadcast-edit, epistemic bounded conclusion).
For resuming a topic, the baton provides a concrete designed continuation channel. For reviewing large Raw archives, bounded paging and resumable accounting provide concrete controls, but not complete-reading attestation. For factual reliance, neither human retention approval nor retrieval rank establishes truth. The offline evaluator can compare ranked paths with supplied gold and report metrics, but proposed gold is not enforced as reviewed; adapters can use unequal index freshness, and no result automatically revises production policy. No retrieval quality or causal gain was measured (EPI-RTE-eval-score, EPI-RTE-query-propose).
A traced capture–approval–write–query episode would establish exercised operation beyond wiring. Paired source/draft/revision artifacts would resolve semantic and theory-criticism questions. Later operation demonstrably depending on a retained update, with independently specified objectives and suitable comparisons, would change the improvement assessment. Freshness-controlled evaluation with reviewed labels would support bounded retrieval comparisons, not automatically component causality.
Limitations
| Limitation | Affected SRC IDs and record citations | Inspected boundary | Conclusion prevented | Evidence that would resolve it |
|---|---|---|---|---|
| No supplied execution, private vault or causal comparison | SRC-1; RT-RTE-session-capture, MEM-BAP-page-context | Frozen implementation and procedures | Successful capture, adherence, later behavioral dependence or demonstrated benefit | Linked execution artifacts and appropriately bounded outcome comparisons |
| Host grants, compaction and provider state remain opaque | SRC-1; RT-CMP-claude-code, RT-CMP-summary-model, RT-CMP-embedding-model | Plugin interfaces and named model clients | Deployment isolation, host-window eviction, immutable model identity or complete parameter-learning classification | Host/provider contracts, pinned versions and inspectable operational evidence |
| Lossy capture and fail-preserving redaction | SRC-1; MEM-OBJ-raw, RT-RTE-session-capture | Selected capture/filter branches; not every reducer audited | Universal semantic/rationale preservation or no-secret-egress guarantee | Full relevant reducer/dataflow coverage and bounded capture/egress traces |
| Review controls are API accounting, not human/cognitive attestation | SRC-1; RT-RTE-distill-review, MEM-OBJ-distill-plan, workflow annotations | Page, seal, complete, reset and direct-tool alternatives | Guaranteed complete reading, approval, note correctness or all delivery side effects | Authenticated review/approval and linked write/index/commit evidence; stronger gates if a guarantee is required |
| Initial provenance and durable reasoning are incomplete | SRC-1; MEM-OBJ-notes-projects, MEM-OBJ-takeoff, EPI-RTE-summary-build | Page templates, free-form baton and prefix-limited summary path | Complete lineage/trace-learning inventory, faithful summaries or universally retained reasons | Provenance-bearing paired inputs/outputs and later consumers of retained rationale |
| Selection and withdrawal are route-local | SRC-1; RT-RTE-vault-search, MEM-OBJ-vectorstore, MEM-RTE-index-delete, MEM-OBJ-wikilink-graph | Rebuild versus upsert, filters, zero backfill, graph cache and delete early return | Universal corpus confinement, measured cosine on every hit, live freshness or synchronized withdrawal | Mode-specific score provenance, freshness checks and cross-index withdrawal evidence or repaired controls |
| Cleanup preserves compared bodies, not every fact | SRC-1; EPI-RTE-prefix-check, MEM-RTE-reclaim-raw | Prefix/repo comparison and Git/unlink application | Metadata-complete losslessness, transactional removal or recovery of untracked files | Metadata-aware comparison, stable snapshots and demonstrated recovery |
| Takeoff write inventory omits helper configuration/Git effects | SRC-1; RT-RTE-takeoff-handoff, MEM-OBJ-takeoff, report verification limits | Prepare can append and commit the ignore rule before ignored-status checking | Treating analyst write inventory as complete; neither baton-content commit nor universal Write enforcement follows | A record covering helper configuration/Git effects and the separate host-write boundary |
| Evaluation labels, freshness and outcomes are not established | SRC-1; EPI-RTE-eval-score, EPI-RTE-query-propose | Metric/proposal code and adapter initialization | Measured retrieval benefit, verified gold or clean component attribution | Reviewed query/gold artifacts, freshness-controlled runs and independently varied components |
| No actual theory-criticism or improvement episode supplied | SRC-1; RT-RTE-broadcast-edit, RT-BAP-baton-context | Generic revision and continuation procedures | Established conditions 1–4, criticism-caused capacity gain, reflection, autonomous theory building or exercised self-improvement | Localized theory and decision traces, blame/revision and next-round evidence; separate two-direction reflection and self-change/dependence evidence |