No changes recorded yet.
- Renamed the project from Context Layer to Paracortex: the distribution, the
command and the package are now
paracortex, the MCP server name isparacortex, environment variables arePARACORTEX_*, and the Obsidian plugin is the Paracortex Brain View (paracortex-brain). Entries below this one keep the old name where they describe earlier releases. See docs/RENAME.md. - Kept the 0.5 names working for this release: the
context-layercommand (one stderr line, stdout unchanged),import context_layerandpython -m context_layer.cli(aDeprecationWarning; the same module objects), andCONTEXT_LAYER_*variables when the new one is unset. Task children get both spellings.installreplaces, anduninstallremoves, a 0.5context-layerentry in.mcp.jsonand a 0.5 Codex block when they launch this tool, and replaces 0.5 hooks instead of adding a second set; a server of the user's that happens to use the old name is left alone. A 0.5 plan-default marker stays in use. Rule files with 0.5 record markers keep them.doctornames a 0.5 host entry instead of reporting no server, and warns while the 0.5 distribution is still installed: pip does not replace a distribution under a new name, sopip uninstall context-layercomes first. The import shim aliases past 0.5 modules left beside it. - Unchanged on purpose: vault state under
.context/and format identifiers such ascontext-layer-task-v1andcontext-layer-claim-check/v1, so files written by 0.5 and 0.6 read the same in both. MCP tool names are unchanged; hosts show them under the new server name (mcp__paracortex__search_vault). - Changed (may affect users): the Obsidian plugin id changed, so Obsidian treats
it as a new plugin; copy
data.jsonto keep settings (docs/RENAME.md). - Added five starter-brain templates for long multi-agent work: Memory (one fact
per note, with a one-line-per-note index), Handover (dated running log),
Directive Log (the owner's words, verbatim, dated, numbered), Claim Ledger (one
claim per row with an evidence status) and Board (the plan before the work),
documented in docs/working-records.md. They live in
the excluded
Templatesfolder, so retrieval results are unchanged. - Added docs/ROADMAP.md: structure-aware retrieval for those records, removal of the 0.5 names, and documentation follow-ups.
- Fixed: the host guide said the server lists ten tools; it lists nine.
CITATION.cffnamed version 0.4.0. On macOS, closing a managed process tree could raisePermissionErrorwhenkillpganswered EPERM for a group whose root had already exited and whose last members were still exiting; that case now counts as the end of the group, and EPERM while the root runs is still raised (seen once intests/test_platform_support.py, not reproduced in 17 later runs). - The sub-agent payload estimates in
docs/subagents.mdanddocs/validation.mdwere regenerated (eval/orchestration_cost.py --docs): the shorter name lowers the stand-in lean payloads by 4 estimated tokens and the vault-template naive payload by 36. No retrieval packet changed. - Documentation: the README is rewritten in three depths (what it is and a real
quick-start output; how it works; theory and evidence), with five figures
drawn as plain SVG in light and dark variants (
docs/img/, generated bydocs/img/src/make_figures.pyfrom a real run on the starter vault and from the benchmark table). New pages docs/retrieval.md (BM25, passage windows, bounded spreading activation with a traced example) and docs/integrity.md (paths, hashes, withheld sources, index reuse, and what a hash does not prove). docs/README.md is reorganised into start, theory and evidence, guides and reference. The sdist now carriesdocs/img/. No runtime behaviour changed. - Tests:
tests/test_rename.pycovers every compatibility path above;scripts/check_distribution.pychecks the installedcontext-layeralias and the import shim; the history audit keeps its allowlist for files under their pre-0.6 paths.
-
Added a 0.4 → 0.5 migration guide and installed-package checks for offline routing, API previews and missing-key failures.
-
Removed Jev's provider, configuration, search/hook/MCP and Obsidian advisor paths. Existing local retrieval remains deterministic, and
check_claimsstill checks cited source hashes, line ranges and exact spans. Its report schema is nowcontext-layer-claim-check/v1(formerlyjev-claim-report/v1); callers of that report must update. Historical logs are read as legacy data only. -
Added an explicit
decisions assesspreview/send command for public or synthetic text: typed source relevance, claim relation and review priority. It usesPOST /v1/decisionswithgpt-6-lunaonly when--sendis present. Its output is advisory; it does not authorize actions, establish source truth or change search results. Local notes are never uploaded automatically. -
Added manual
responses runfor a selected public or synthetic task, with an explicit model, preview by default,store: false, no tools by default, and one optional web search call. Added offlineapi planto suggest a local, Decisions or Responses route from explicit need and data scope. Neither command changes retrieval, hooks, memory or action authorization. -
The private-trace audit now exempts only the exact public Decisions model identifier; a standalone occurrence of the overlapping private term remains detectable.
-
Verify stored index and graph content digests before reuse, so corrupted state is rebuilt rather than reused. Legacy indexes without a receipt rebuild once; healthy unchanged indexes preserve their bytes and timestamps. These digests detect corruption, not authenticity against a hostile writer.
-
Faster setup.
indexchecks each folder's boundaries once instead of once per file, overlaps reading and hashing on a few threads (every file is still read and hashed), runs the builder in the same process, and hands the link graph what it hashed, so the graph does not read the notes again. The graph reuses the stored parse of every note whose bytes did not change (new tableparse_cacheingraph.sqlite); when only note contents changed it re-resolves just those notes' links in a copy that replaces the graph atomically (an added, removed or renamed note, or a changed file list, still rebuilds it). The CLI imports a component only when its command runs;--versionbuilds no parser.initwalks the vault once and skips tooling, dot and excluded folders. -
Changed (may affect callers): an
indexrun that finds nothing to change leavesindex.sqlite,index-manifest.jsonand an unchangedgraph.sqliteas they are, so theirbuilt_atis the time of the last build that changed them; it prints; index unchangedand the graph line ends in(unchanged). The.prevcopies are still refreshed.index --fullnow also rebuilds the graph without stored parses.context-layer indexruns the package's ownrouter/build_index.pyin process instead of$CONTEXT_LAYER_HOME/router/build_index.pyin a child process. -
Faster per-prompt path.
searchand the prompt hook runeval/retrieve.pyin their own process (no second interpreter); the hook keeps its 20 s limit on a thread. The MCP server keeps one warm retrieval worker (retrieve.py --serve); cancelling a search or a 120 s timeout kills the worker's process tree and the next search starts a new one. The index hash of the coverage receipt is computed every call, on a thread that overlaps the query; exclusions are checked only on the names a packet reads; name rules skip pathlib and Unicode work for plain names. Packets are unchanged. -
Fewer tokens per session and prompt: the MCP tool list and
instructionssay the same with less text (tools/list 12,781 -> 8,685 bytes), JSON-RPC lines and tool results use compact separators, and the hook context opens with one framing sentence; fts-part items of a synaptic hook context drop the repeatedreason: ftsline. -
Fewer hook tokens:
retrieve.py --delivery focus(andsearch --delivery focus) delivers the blocks that hold query terms with their same-section neighbours, even for a short note; with synaptic it reserves only strongly activated linked notes. A link-reached hook item opens with onevia <file>:<line> <kind>line, and a cut item saysexcerptin its marker. -
Changed (may affect callers): the prompt hook's default
--deliveryisfocus(--delivery windowgives the earlier items). On the development set the fts hook context falls from 1,188 to 1,033 characters (1,990 to 1,041 with longer notes), with the same 12/56 complete; see docs/validation.md. -
Changed (may affect callers): the prompt hook's default
--methodissynaptic(with the focused delivery);install --hookwithout--methodwrites no method, so the hook's default applies, andinstall --method ftsnow writes--method fts. Dev set: 56/56 complete at 1,602 characters (the 0.4 fts hook: 12/56 at 1,188); 56/56 at 1,898 with--extra-paragraph(0.4 fts hook: 12/56 at 1,990). An unknown--methodfalls back to synaptic.searchand MCPsearch_vaultstill default to fts. -
New, opt-in:
search --relevance-floor Randhook --relevance-floor Rleave out a top-k note whose bm25 is weaker than R times the strongest one (default 0 = off).install ... --hook --relevance-floor Rwrites the hook flag. -
Changed (may affect callers): the hook's header text is shorter (markers, nonce, items and packing are unchanged); MCP tool descriptions are shorter; the MCP server's error packets and augmented packets are serialised without spaces;
retrieve.py --serveis a new mode; the prompt reaches retrieval as a string, never as an argument, sosearch --prompt=--help(any prompt that starts with-) is now searched instead of printing retrieve.py's usage. ACONTEXT_LAYER_HOMEcheckout whoseeval/retrieve.pyhas norun()is run as a child process per call, as before. -
Put a runnable first example at the center of the README and move detailed measurements to the validation guide, retaining their automated checks. Simplify the package description and documentation navigation.
-
Refresh GitHub source/cache guidance, PowerShell examples, privacy retention and tested platform documentation. Add package project links and tested Linux/Windows classifiers; advance package metadata to 0.5.0.
-
Refresh development, conduct and security guidance, including private vulnerability reporting. MIT rights and third-party notices are unchanged.
-
GitHub source management with dry-run previews, branch/tag resolution to immutable commits, config backups and explicit old/new pin updates. Optional bounded cache with offline reads, integrity checks, refresh and purge controls; cached evidence stays separate from local source validation.
-
Portable file locks, private file handling and process-tree cleanup for Windows; portable test fixtures and installed-wheel checks. Windows CI is required. Verbatim CRLF evidence is preserved in console and saved packets. Encoded hook commands can be inspected and uninstalled without executing them. Atomic replacements and concurrent task-state reads tolerate bounded Windows sharing conflicts; persistent errors remain visible. Task output validation checks current file identity and hard-link counts.
-
Optional GitHub evidence for knowledge gaps:
github-context,search --githuband an MCP tool. Owner-enabled allowlists, commit-pinned public files, anonymous bounded reads, verified blob hashes and immutable citations. Questions and vault notes stay local. External evidence remains separate from local evidence, manual API commands and the session ledger; local retrieval defaults, errors and withheld-source handling are preserved. -
Retain prior runtime CI evidence and platform support. The 0.5.0 matrix has 11 required jobs; its result is recorded only after the actual hosted run. Earlier passing jobs do not establish a 0.5.0 CI pass.
-
Brain View: the HUD title and counts line take a lighter typography (a light, widely spaced title and a monospace line; local font stacks, themeable through
--nb-hud-fontand--nb-hud-mono). The resting colours, point sizes, opacities and link width already followed a fixed degree scale;tests/look.test.jsnow pins them and checks that the retrieval overlay colours stay distinct from them.
Retrieval that says what it searched and what it left out, hosts that get bounded answers and exit codes they can trust, verification a worker cannot forge, a memory that survives torn lines and forks, a Brain View that keeps its layout, and an optional advisor (Jev) that is off by default. Most entries close a finding of the 0.3.0 audit; the ids in brackets (A retrieval, B hosts, rules and brain, C memory, tasks and orchestration, D Obsidian plugin, E bench, CI, packaging and docs) are the audit's, and CONTRIBUTING.md names the suite that guards each area.
New
-
The optional advisor (Jev), off by default (the former
docs/jev.md, removed in 0.5.0).context-layer jev status|off|shadow|on|report|purgeandsearch --jev/--no-jev. The advisor asks a provider whether each passage, and each note the links reached but the packet did not deliver, would help answer the question.shadowonly counts and shows the answers;on(refused without a calibration receipt) appends the judged notes as byte-exact passages after the unchanged packet, withinjev_extra_tokens(default 400, at most 2,000). No default provider; no key in any file; privacy gates (local-only prefixes, a fail-closed frontmatter convention, a secret scan) before anything is sent; a freshness re-check after every call; every failure falls back to the local packet; a counters-only call log and a keyed-hash cache under.context/; kill switchesCONTEXT_LAYER_JEV_DISABLEand.context/jev.disabled. Providers:systemone,openai_compat,host_cli(theclaudeCLI in print mode with a JSON schema and no tools),cmd,recorded,fake. Onlycontext_layer/jev_client.pymay open a network connection or start a model CLI for the advisor;make network-guardscanscontext_layer/,router/andeval/for that (other modules start programs of their own, such as the task backends, andbench/andscripts/are not scanned).search, the prompt hook'sauto_context,answerandmemoryare wired (below). No quality number has been measured yet. -
Recording and calibration.
jev recordasks the configured provider a file of questions (dry run unless--run) and keeps onejev-recording/v1row per question: hashes, the validated answer or a failure code, counters, never text.jev calibrateturns the dev-set evaluation of a recording (tests/jev_dev_eval.py --provider recorded:FILE --json, with--dump-questionsfor the questions to record) into thejev-calibration/v1receiptonrequires,passedper question purpose against bars written before the first recording.jev shadow|on --provider-kind recorded --recording FILEconfigures the replaying provider. The development set (tests/fixtures/dev_jev.py, hashed) and its evaluator are development aids, not a benchmark. -
The advisor over MCP.
search_vaulttakesjev: true(default false): a plain packet unless the vault owner enabled the advisor, else the same shadow block or rescued passages assearch --jev; the new read-onlyjev_statustool prints whatjev status --jsonprints. That made eight tools;check_claims(below) is the ninth. -
The advisor in the prompt hook (
auto_context, enabled only byjev shadow|on --enable auto_context). On every prompt the hook asks a topicality question and the relevance questions withinhook_timeout_s(default 2 s, never past 25 s after the hook started; under 1 s left it asks nothing).shadowleaves the hook's output byte for byte and counts;on(a receipt covering relevance and topicality) appends rescued notes as marked blocks only when the gate passed. Every failure leaves the output unchanged with exit 0 and one counter row; the lossygate_skiplever is the only way to lose context. -
eval/retrieve.py --jev-candidates N: a model-free side channel listing the notes the packet did not deliver (link-reached notes the lexical link rule left out, and the bm25 tail); evidence unchanged. -
Match-anchored fts delivery (
--delivery window, the default). A note that fits--per-sourceis delivered whole, as before; a longer note is delivered as the paragraph-sized windows in which FTS5 finds query terms (most distinct terms first, at most 3 per note, blank-line neighbours merged), each a verbatim byte span with its lines.--delivery prefixkeeps the 0.3 behaviour for comparison;grepalways delivers prefixes. The fts part of a default synaptic packet follows the same rule, and its extras never overlap those spans. The prompt hook's fts marker gainslines=a-b. (indexed_notes,index_sha256,query_terms,match_expression,skipped_by_reason), so "nothing searched" can be told from "nothing found"; a prompt made of stopwords saysreason: "no searchable terms"(A-05, A-18). -
context-layer graph health: orphans, broken links by reason (with an alias hint), ambiguous links with their candidates, links into excluded paths, stale notes, frontmatter problems andsupersedescycles. Read-only. -
context-layer doctor [--host …]: offline, read-only checks of a host set-up (config present, paths exist, Python and SQLite FTS5, rule parity, hook command lines valid for this binary, hook event names known). -
context-layer brief VAULT [--json]: a session brief built from bytes only. Every line names its file and the first 8 hex of that file's SHA-256 and quotes it (cut, never summarised): index status, stale memory sources, the lastLOG.mdrecords, open work, newest memory records, the last activation.rules hook session-start --briefadds it to Claude Code's session context under a 3,000-character cap. -
Delivery ledger and citation check. Opt-in (
install --session-evidence, or--session-evidenceon the hook line andCONTEXT_LAYER_SESSION_EVIDENCE=1for the server, plus an existing.context/session-evidence/folder), the prompt hook and the MCP server record{path, sha256, packet_id, at}of every delivered item in.context/session-evidence/<session>.jsonl(ids and hashes only; appending stops at 4 MiB per file, and only the 50 most recently written session files are kept). The Stop hook's model-free check reports vault paths and hash prefixes the answer cites but the session never delivered; it never blocks. -
Verification ledger.
.context/tasks/LEDGER.jsonlis hash-chained;tasks ledger [--replay]checks the chain and recomputes verdicts;tasks listandtasks showmark a verdictUNATTESTEDwhen no ledger line records it (a rewrittenresult.jsonshows as UNATTESTED). Output directories are pinned by identity (device and inode of every component) atnewand re-checked at every step; leases stop two tasks from sharing a directory; runner claims stop double dispatch;tasks recoverends tasks whose runner is gone and stops the orphaned child (C-01, C-02, C-04, C-17). -
Memory format 2. Sorted sources in the id, explicit
closes, only in-force results close tasks, forks detected (verifyreports each fork point,resume.conflicts, a Conflicts section in MEMORY.md),--allow-fork, and a merge record whosesupersedeslists every head. New commands:memory repair(moves only a torn final fragment torecords.jsonl.torn-<utc>),memory rebind(a moved source's new path, as a superseding record;resumesuggestsmoved_tofrom the index manifest),memory mirror --notes FOLDER(one visible note per decision and task, frontmatter with wikilinkedsupersedes, the folder excluded from retrieval on the first run),memory session list|show(opt-in bill of materials withCONTEXT_LAYER_SESSION).memory.record_idis public; MCPmemory_recordtakescloses. Records written before 0.4 are still read (C-06, C-08, C-11, C-21 to C-24). -
Handback and jobs. A claim-span gate (a span anchors a claim only with at least 3 words or 12 visible characters), an audit sample drawn from a seed fixed at check time,
support-job/v1limits enforced at dispatch (max_elapsed_secondsbounds the run), exclusivejob.mdcreation, a 32 MiB packet size cap checked before reading, and one line model for every line number (C-03, C-07, C-12 to C-14, C-27). -
Backends. The
claudebackend runs the child in a temporary workspace outside the vault withpermissions.blockReadsOutsideWorkingDirectoriesand a--max-budget-usdspend cap; thecodexbackend's command line follows the public Codex documentation (codex exec --sandbox workspace-write --skip-git-repo-check --json --ephemeral …, prompt on stdin);tasks costlabels its USD figure host-estimated and addsmodelUsagetoken totals when the backend reports them (C-19, C-20, C-09). -
Rules and hooks.
install claude-code --rulesadds a PostToolUse hook that records the vault paths the agent wrote, so the Stop hook asks only about the agent's own edits; it honoursroutes.jsonexclusions, treats future timestamps as unknown, keeps vault snapshots for the eight most recent sessions and reports broken parity once in plan mode.rules init --single-sourcewrites aCLAUDE.mdthat imports@AGENTS.md(documented with its host caveats; byte-identical twins stay the default).rules initandbrain initexclude the root rule files from retrieval, since the host loads them (B-03, B-04, B-05, B-13). -
Installer.
--scope localwrites the hooks to.claude/settings.local.jsonand the installer says which entries carry machine-specific paths;--max-context-chars(default 9,000) packs the hook output under the host's context cap;install codex --hookand--ruleswrite Codex's documented hooks file (labelled expected but unverified),$CODEX_HOMEis honoured,config.tomlis parsed before it is written (B-06, B-10, B-19 to B-22). -
MCP server. Caps:
search_vaulttop_k≤ 20,budget≤ 24,000 characters,per_source≤ 6,000;memory_resumelimit≤ 200; one tool error names every over-cap argument.pingandnotifications/cancelledare answered while a call runs; malformed bytes and odd request ids get a JSON-RPC error, never a crash; tool annotations;initializenegotiates 2025-11-25, 2025-06-18, 2025-03-26 or 2024-11-05, and a request that carries a supported version in_metaworks without a handshake;read_sourcestreams in 64 KiB chunks; the prompt reacheseval/retrieve.pyon stdin; marker header fields are escaped so a file name cannot forge them (B-01, B-07 to B-09, B-11, B-12, B-24). -
Brain View (
obsidian-plugin/): a link-aware layout that stays stable across link edits and new notes (the remembered layout is a pinned cache, not a re-solve), a region palette chosen to stay apart under the common colour-vision deficiencies, keyboard focus and an ARIA role on the stage,normalizePath()for the trace-path setting (only anactivation*.jsondirectly inside a.contextfolder is accepted), deferred views and pop-out windows handled, per-file vault events applied incrementally, an unmatched trace reported as such instead of dimming the whole graph; 16 Node test files including static GLSL checks (no shader is compiled), a writer-to-plugin contract test and a bundle test (D-01 to D-14). -
Bench. Equal budgets are enforced per method and asserted; error rows stay in the denominator; a passage that is not a verbatim span of the file it names (exactly, or after whitespace and NFC normalisation) earns nothing; every result file records Python, SQLite, Unicode, platform, the scorer's hash and a
+dirtymark; TREC qrels/run export;bench/select_pilot.py --checkrecreates the 0.3 live pilot's case selection;bench/test_runner.py; and bench/INSPECTIONS.md lists every run of the sealed set with its purpose (E-01, E-10 to E-13, E-21). -
Release tooling and CI.
scripts/audit_history.py(an English and leak audit over the whole history, trailers listed) with arelease-auditworkflow;bench-reproduceanddoc-claimsjobs, backed bytests/test_doc_claims.py(every number in README and docs/subagents.md is regenerated from result files) andtests/test_docs_links.py; a reproducible sdist (scripts/normalize_sdist.py, pinned build backend,make dist);scripts/check_distribution.pywalks the 0.3 surface;make network-guard; pinned node24 actions, Dependabot, timeouts and concurrency groups, a non-blocking Windows smoke job; the Makefile and the bench runner run Python in UTF-8 mode (E-05 to E-09, E-16 to E-18, E-22). -
Docs. the former
docs/jev.md(removed in 0.5.0); a multi-host table in docs/host-integration.md (Claude Code, Codex, Cursor, Gemini CLI, Antigravity, OMP, OpenCode, Hermes Agent) with caps, exit codes, packing and protocol revisions; discipline/WORKED_EXAMPLE.md; format-version and exit-code tables for every command in docs/cli.md; memory format 2 in docs/memory.md; skip reasons and the rollback guard in docs/source-lifecycle.md; the Obsidian link rules, each with its source page, in docs/synapse.md; flag tables foreval/retrieve.pyin eval/README.md (E-25). -
Advisor answer checks.
context-layer jev answer VAULT --claims FILEchecks each citation mechanically and asks oneclaim_supportquestion per passing citation (claim, verbatim quote, enclosing section, never cut); a citation that fails is never asked. Verdicts are advisory: supported, contradicted, insufficient or uncertain.handback check --jevadds, inonmode only, an advisoryjevnote to each record that passed;ok,problems,mechanically_checked, the digest, the ledger line and the exit code never move, and shadow changes no output byte. MCPcheck_claimsis the ninth tool (at most 20 claims, 8 citations each;jev: trueis opt-in per call). -
Advisor memory review.
context-layer jev review-memory VAULT --proposal FILEchecks a memory proposal's spans without a model and, in shadow or on, asks the fourmemory_*questions (support, commitment, kind, relation to up to four prior records). The report is advisory; the memory store is only read. -
jev status --check: a loopback-only reachability probe (jev_client.probe;claude --versionforhost_cli; nothing for remote, recorded or fake providers). Plainjev statusstill sends nothing. -
jev onandjev calibraterequire the bars of every enabled feature's purposes (claim_supportfor answer, the fourmemory_*for memory);--disable answer|memoryturns a feature off instead. -
Brain View advisor layer (Obsidian plugin, hidden by default): what the advisor did in the last retrieval, read from the activation trace only; the trace's
jevblock now recordswould_rescue, and the shadow HUD shows "would rescue N". Empty states say why nothing is shown. -
Incremental indexing.
context-layer indexrewrites only the notes whose bytes changed, appeared or disappeared, keeps the record ids a full build would give, and falls back to a full build (saying why) when the old index cannot be updated in place;index --fullalways rebuilds. A property test compares the updated index with a--fullbuild after every step of randomized edit sequences (rows, ids, meta, schema, full-text postings, ranked scores, the manifest), and an interrupted update leaves the old index. The link graph is still rebuilt in full. No speed-up is claimed: on 10,000 small notes the walk and hashing dominate and both paths took about the same time. -
Name fields, opt-in.
index --name-fieldsadds note name, alias and heading columns;search --name-fieldsranks with them. Off by default, and default output is pinned byte for byte by a golden test. On the fictional dev set of questions that name a note (tests/dev_names_eval.py), 0/32 become 32/32; alias and heading questions already worked without it. -
Link suggestions from usage, opt-in (docs/synapse.md section 11). With
"record_usage": truein.context/routes.json, each fts or synaptic retrieval appends the delivered note paths (no text, a hashed session id) to.context/usage-ledger.jsonl(rotated at 1 MiB).context-layer graph suggest VAULT [--min-count N] [--limit N] [--json]lists notes delivered together that no link joins, with counts, sessions and days; it writes nothing. Nothing reads the ledger back into retrieval: a test holds the packet byte-identical with the ledger absent, present or over 5 MiB. Prior art: co-citation analysis and search click logs. -
context-layer session show VAULT [ID] [--json]andsession list: a read-only join, per agent session, of the delivered evidence, memory records, tasks and their ledger attestation, and advisor counters, each row citing the file and line it came from; torn or missing sources are reported, and output is bounded (--limit,--max-bytes). Advisor counters are matched by time window only and marked unattributed. -
installwritesPYTHONUTF8=1into every host command; a test scans the runtime code for text I/O withoutencoding=(E-17). An empty or blank hook prompt exits 0 with nothing on stdout (B-12). For Claude Code, the hook also shows the withheld-source notice to the user assystemMessage(B-26). -
CITATION.cff;docs/cli.mdlists the less common flags (E-25);eval/LIVE_COMPARE.mdsays the 0.2 judging was unblinded (E-14); a docs phrase-grep test and a canary write-boundary test (E-22).
Fixed
context-layer index VAULT --out=PATH(the=spelling) builds the link graph from that index (B-25).initand the router read and write notes, prompt files and run artifacts as UTF-8 whatever the locale (E-17).- Query terms were folded differently from the FTS5 tokenizer, so words with
some Unicode letters (
Straße) could not be found verbatim. One folding contract (router/textfold.py): terms go to MATCH as written, term boundaries follow the tokenizer (SQLite is asked once per character), and the five normalisers became one (A-01, A-22). - An exclusion entry with stray whitespace passed the strict loader and
excluded nothing; it is refused now, and
initwrites only entries its own loader accepts (A-02, A-04). - A file whose name holds
:in its first segment or\anywhere abortedindexwith a traceback; it is skipped asunsupported_nameand counted (A-03). - Notes over the size limit, unreadable notes and files that are not UTF-8
were skipped silently. They are recorded in the manifest by reason, printed
as one count, listed by
statusundernow_skipped(overalldegradedorstale, neverok) and named in the coverage receipt;graph.buildcounts them too. The limit ismax_file_bytesinroutes.json(default 2,000,000, at most 50,000,000). A rebuild that fails for another reason keeps the previous index and graph pair (A-05, A-23, C-25). - Default fts delivered the beginning of each matched file, so on a long note
whose only match lay further in, the passage held no query term and nothing
said the file continued. A note that fits
--per-sourceis still delivered whole; a longer one now arrives as match-anchored verbatim windows, each withstart/end,line_start/line_end,source_chars,truncatedandmatch_in_content(A-06, E-04; see New). - A UTF-8 BOM hid the frontmatter from the link graph; NFC and NFD note names did not meet in link resolution; the trace wrote on-disk paths the plugin could not match. Fixed together: BOM ignored, resolver keys NFC and casefolded, trace paths NFC (A-07, A-08, D-07).
- Default synaptic added no passage beyond the fts prefix unless a link or a named note triggered it. The complement-window step now runs on every seeded search with a readable graph; the superset property still holds (A-09).
- One note swapped for a symlink after indexing turned every query into
ERROR; it is withheld withreason: "symlink since indexing"and the other hits are delivered (A-11). - A damaged
graph.sqlitemade synapticERROR, sometimes with raw SQLite text; it degrades to exactly the fts packet withsynapse.decision: "graph_unreadable"and a note namingcontext-layer index <vault>(A-12). - Line numbers used
str.splitlines(), so U+2028, U+0085 and form feed shifted anchors away from what editors show. One line model everywhere (a line ends at\n; a trailing\ris dropped): graph, synaptic passages, packets, handback and memory; a memory record holding such a character no longer makes the store unreadable (A-13, C-06, C-07, C-12). - The frontmatter subset guessed: block scalars, trailing comments and multi-line lists produced garbage aliases. What it cannot parse is left out and counted (A-14).
- Link accounting: links to existing non-note files and to excluded notes were
missing; they areattachmentandexcludednow, ambiguous targets keep their candidates, and a bare[[alias]]no longer resolves (Obsidian's rule, checked against its help pages). Fences inside blockquotes and indented code are skipped;%%and HTML comments are kept because Obsidian records those links (A-15, A-16). - fts spent top-k slots on byte-identical text; duplicates are listed under the
first item's
duplicatesand take no slot. Task packets count them toward the fetch window, so allowed sources ranked past the first window are still fetched instead of leaving the packet empty (A-17, C-05). - Depth 2 was inert in dense vaults with no stop reason, and a node-cap hit
discarded the depth-1 expansion too.
stops.below_thresholdandstops.node_capare counted, and a cap hit undoes only that hop (A-19). score_packet.pycredited prompt words echoed in the routing metadata and dropped missing packets from the headline score (A-21).- Hook command lines could exit 2 on an argparse error, which made Claude Code
erase the prompt; every hook failure exits 1 and prints one line, and an
unknown
--methodruns fts (B-02).rules recordtext could inject the records end marker; a non-UTF-8 rule file crashed the rules commands; CRLF files received LF entries; the lock fallback never recovered from a stale marker; SessionStart wrote state into folders without rules (B-14 to B-18). install --scope useromitted thePYTHONPATHthe project entry carries;uninstallleft backups of the tool's own marker; the starter brain wrote routes for excluded folders and "missing" links and had no--no-examples;index --out=PATHbroke the graph step; the hook's withheld notices reached only the debug log and now reach the user throughadditionalContext("Not included: …") (B-19, B-22, B-23, B-25, B-26).resumelet a retracted result close a task and "Could not do " close it too; re-adopting superseded content was a silent no-op; reordered sources defeated de-duplication; forks went undetected; a renamed source was only "missing"; a torn final line blocked every write (C-08, C-21 to C-24).- Cost totals dropped an unreadable task silently and accepted negative or NaN
amounts;
statuscalled emptied or oversized files deleted;rollbackwithoutgraph.sqlite.prevmixed generations (it refuses now;--index-onlyrestores the index alone);live_compare.pyhad no host timeout and credited substring deliveries;tasksandpacketprinted home paths without--verbose; writes were not atomic (C-09, C-25, C-26, C-28 to C-30). - Brain View: a fresh trace matching no note was reported as shown and dimmed
the graph; the writer's
PARTIAL/NOT_FOUNDstatuses did not match the plugin'sOK; depth-2 back edges pulsed at the wrong hop; per-file events ran full rebuilds; legend listeners andsignalEventsgrew without bound; activated notes vanished when unlinked notes were hidden (D-01 to D-04, D-10, D-11, D-14). run_offline.py --budget-tokens Nwas a no-op; the published sub-agent payload numbers no longer reproduced; design-rationale §7 described a benchmark that did not exist; the 0.3 live-pilot description did not match the run; the bench README's hook sentence was stale; a relativePYTHONbrokemake test; 7 of 16 suites failed under a Latin-1 locale; the sdist embedded the builder's account name;eval/adapters/fts_sqlite.pyreused an index across vaults andembedding_stub.pycached vectors by text alone (E-01 to E-03, E-13, E-15 to E-18, E-23, E-24).doctoraccepted an unknownrules hookevent name in an installed hook.search --jev-candidatesis refused with exit 2 for grep, fts-canonical, router and compact synaptic, where it used to be dropped silently (F2-07).- One session-evidence writer: the hook and the MCP server used two writers with
different file-name schemes, so the ledger of a session id that is not a plain
name was never the file the Stop check reads. Both call
session_evidence.record_deliverynow; a session ledger stops at 4 MiB (one overflow line) and the 50 newest session files are kept (F2-08). hookrefuses a synaptic budget flag that changes nothing (exit 1, one line);rules checknames a line-ending-only difference between CLAUDE.md and AGENTS.md;tasks ledgeralso cross-checks the chain against each verdict's cited line, so an edited head line or a cut tail is exit 1; installer writes to a host settings file are atomic and a symlinked file is kept and named; the Jev secret scan recognises a bare JSON web token;initwrites the package version and a UTC time intoroutes.json(F2-30, F2-46, F2-44, F2-43, F2-42, F2-15).- The Jev advisor's frontmatter gate keeps a note local when a privacy value is not a plain scalar: a block scalar, an anchor, an alias, a tag, a flow value or a comment (F2-38).
- CI: the release audit now passes on a one-commit snapshot of the tree (the allow-list matches the tree and a test checks it), and the synthetic comparison results are regenerated with a test that fails on drift (F2-01, F2-02).
Changed (may affect callers)
searchrejects flags that do not apply to its method with exit 2, aspacket buildandinstallalready did:--max-hops,--extra-tokens,--budget-tokens,--compactand--record-queryare synaptic only;--jev-candidatesis for fts and default synaptic (E-08).- MCP tool schemas carry
maximum; an over-cap value is a tool error, not a clamp.memory_recordgainscloses;search_vaultgainsjev; the tool list has eight entries (jev_statusis new); the rule templates name it. - Hook command lines exit 1 on any failure, never 2.
rules initandbrain initexcludeCLAUDE.mdandAGENTS.mdfrom retrieval; an existingroutes.jsonis not changed (a notice is printed).- New memory records are format 2 (
format_version: 2,closes, sorted sources in the id);verifyandresumestill read format 1. - The activation trace gains
mode(superset/compact),max_hopsand a per-edgehop;packet.statusisPARTIALorNOT_FOUND, neverOK; paths are NFC.versionstays 1. graph.sqlitegains the tablesskippedandfrontmatterand two nullable columns onunresolved;schema_versionstays 1 and a 0.3 graph is still read.statusreports agraphobject andmatches_index.tasks costprints host-estimated USD and labelsusage"top-level agent loop only".- fts items of a note longer than
--per-sourceare match-anchored windows (several items per note are possible); every fts item carriesstart,end,line_start,line_endandsource_chars.--delivery prefixrestores the 0.3 delivery. Task packets and shared packets count notes, not items, againsttop_k. .context/tasks/gainsLEDGER.jsonland.leases/; tasks created before 0.4 have no pin and are marked as such.- The default synaptic packet may now hold complement windows on every seeded search (see A-09); the sealed-set numbers did not change beyond the estimate noise stated in bench/INSPECTIONS.md.
Measured
- Sealed benchmark, run twice on this tree (runs 9 and 10 in
bench/INSPECTIONS.md, the second after window delivery and the advisor):
completeness unchanged from 0.3 (grep 37, fts 33, synaptic 46 of 64
answerable; synaptic 10 of 20 two-hop bridges); synaptic mean packet 527
estimated tokens; the fts prefix and window arms give the same numbers on
this vault (every note fits
--per-source); the compact arm 37 of 64 at 334. No advisor arm was run: no recording of a live provider exists. - Sub-agent payloads (
eval/orchestration_cost.py --standin, regenerated into docs/subagents.md and tested): four workers' initial payloads 16,827 → 9,441 (56%) with own packets or 11,626 (69%) with one shared packet; verification reading 12,452 → 2,580; the one planted fabricated quote was caught. - The advisor: no quality number. No provider was called while building this
version. The pipeline was run with the oracle (the labels answering): 299
questions recorded and replayed, precision 1.0 and recall 16 of 16 at
rescue, the topicality gate right on 12 of 12 prompts, no privacy trap in any request, a receipt computed andonwithauto_contextaccepted for that fake provider. That checks the plumbing, not any model;jev onstays refused until a recording of your provider is calibrated.
Not in this version
jev review-memoryreviews proposal files only: the store keeps no spans, so a draft already stored cannot be reviewed.handback checkhas no--jev-priority: model output does not steer which records are sampled.- The routing/packet step (
context-layer route,router/context_router.py) is experimental and a candidate for removal later; nothing is removed here. - The wheel does not carry the Obsidian plugin bundle (D-17); PyPI publication is not planned (E-19). Windows stays out of scope while the smoke job is non-blocking.
Credits
- The advisor follows the design of the optional Jev advisor in Avenox Beyin (v3.1.0–v3.5.1, MIT, Avenox), whose Jev integration was contributed by Forn and adapts Forn's hafiza-os (MIT): off by default, off/shadow/on, per-feature switches, a kill switch, a counters-only log, privacy gates and a freshness re-check. No code was taken. The provider protocol shape follows TypeSafe's public API documentation; the services and programs the advisor can call are listed in THIRD_PARTY.md, none affiliated with this project.
Your own links become a retrieval signal, the agent's work becomes recorded and checkable, and you can see in Obsidian what a retrieval used.
New
- Synaptic retrieval (opt-in,
--method synaptic).indexalso extracts the vault's explicit link graph into.context/graph.sqlite(wikilinks with alias/heading/block, embeds, relative Markdown links, frontmatterrelated/up/parent/see_also/supersedes; code ignored; ambiguous targets recorded, never guessed). A synaptic packet is the unchanged FTS packet plus link-reached passages within--extra-tokens(default 600);--compactkeeps the smaller packer that can drop FTS evidence. Hub damping, fan-out and node caps, 1 hop by default (2 behind--max-hops), deterministic output, recorded stop reasons. MCPsearch_vaultgainsmethod/budget_tokens/extra_tokens/compact; new MCPgraph_neighbors. - Activation trace. Each synaptic retrieval writes
.context/activation.json(randomrun_id, no prompt hash, query text only on opt-in, never read back into ranking, excluded/stale notes never listed;write_activation: falseturns it off). - Context Layer Brain View (
obsidian-plugin/): a 3D view of the explicit link graph with the last retrieval's seeds, hops and traversed links. Plain JS, no npm dependencies, no network, writes nothing to the vault except its own settings file; 12 Node test files. - Starter brain.
context-layer brain initcreates an Obsidian vault with an English, emoji-free layout adapted from Avenox Beyin (--avenox-compatfor the original names), templates, example notes and the rule files. - Rules.
context-layer rules init|check|record|hook|settings: byte-identicalCLAUDE.md/AGENTS.md,LOG.md,BACKLOG.md; plan-first, stop-and-ask and evidence-label rules;install claude-code --rulesadds SessionStart/Stop hooks that block once when work was not recorded;--plan-defaultsets plan mode. - Lean sub-agents.
packet build/show(content-addressed shared evidence, re-verified before serving),job new/validate/estimate(support-job/v1, payload budgets),handback check(mechanical verification of worker evidence records; catches fabricated quotes),handoff write;tasks new --job/--packet,--host-context inherit|safe-mode|bare. - Sealed benchmark (
bench/): fictional 130-note vault, 72 sealed cases, offline scorer and a live-host arm.docs/design-rationale.md,docs/brain-guide.md,docs/cli.md,docs/privacy.md,docs/subagents.md,docs/synapse.md,SECURITY.md,CODE_OF_CONDUCT.md,CREDITS.md.
Fixed
tasks verifycould mark a pre-existing vault file as verified output when a backend rewrotetask.json; definitions are now pinned at dispatch and only run-produced outputs count.- Exclusions now match case- and Unicode-normalisation-insensitively
(
privateexcludedPrivate/secret.mdonly on case-sensitive systems). - One strict
routes.jsonloader everywhere; malformed files, wrong types and duplicate keys fail closed. - An emptied or inconsistent FTS index is an error (index
user_version, FTS5 integrity check at build, consistency check on read), not a quietNOT_FOUND. initno longer excludes note folders whose names merely contain a marker word ("Distributed…", "Temperature…", "Resources").- A dotted capital I (
İ) no longer splits a query term. - The MCP server negotiates
protocolVersioninstead of echoing any value. install claude-code --hook --method synaptic --budget-tokens Nwrote a flag the default synaptic hook ignores (it only sizes--compact).installnow takes--extra-tokens Nand--compact, and refuses--budget-tokenswithout--compact;search --helpnames all three.install claude-code --plan-defaultreplaced an existingpermissions.defaultMode(such as"acceptEdits") anduninstallthen deleted it. Install now refuses a different existing mode, and uninstall removes only a"plan"that install recorded setting (.claude/context-layer.plan-default.json).- Docs: the 0.2 live result is "about 54% of the baseline's mean total tokens (about 46% fewer)", not "46% of its tokens".
- A note that changed after indexing turned every search that matched it into
an
ERRORwith no evidence (andrules recordrewrites the indexedCLAUDE.md,AGENTS.mdandLOG.md).search, the hook and MCPsearch_vault(fts and synaptic) now withhold only that note, as the docs said, and list it underwithheldwith its reason andcontext-layer index <vault>; index-wide failures stayERROR, the router still withholds its whole packet, andpacket buildandtasks newrefuse to pin evidence while a note is withheld. - Stale-index messages name
context-layer index <vault>instead of "rebuild the index". indexon a vault without.context/routes.jsonnow says, in one stderr line, that it indexes with no exclusions and thatcontext-layer initshould run first (still exit 0).brain init --into-existingcounted every layout folder as "would create"; it now counts only folders that do not exist (new_directoriesin--json).packet build --method synaptic --budget-tokens Nhad no effect on the default synaptic packet.packet buildnow takes--extra-tokensand--compact, and refuses--budget-tokensfor synaptic without--compact(exit 2), likeinstall; ids of packets built without these flags are unchanged.
Changed (may affect callers)
- Error packets say
status: "ERROR"(wasPARTIAL);statusreportsoverall: "error"with exit 2. - MCP
memory_recordaccepts only drafts (approved/publishedare refused). - Hook evidence items are nonce-delimited; the 0.2 live comparison used the old
format. Installed hooks carry
timeout: 30; retrieval stops at 20 s. - First-run failures print one line naming the next command; absolute paths and
script traces need
--verbose; flag abbreviations are no longer accepted. - English only: stopwords and route aliases are English, with an optional
stopwordslist inroutes.json. - Evidence packets can carry a top-level
withheldlist; a search that withheld a changed note exits 0 with the status of the remaining evidence (PARTIALorNOT_FOUND), where it used to exit 1. - The test guarding against private-vault traces compares SHA-256 digests of words and word pairs instead of carrying the strings it guards against.
What a person needs after installing 0.1: a connected host, memory that outlives a session, bounded sub-agent work, visible source health, and a measurement. Scope, the support matrix and the per-phase definition of done are in SCOPE.md.
- A1 scope and scaffold. SCOPE.md: design principles, support matrix,
acceptance criteria per phase, and the end-to-end walk. Pre-registered the
phase modules, test files and
docs/so parallel work stayed disjoint, and fixed the memory interface contract the other phases build on. - A2 host integration.
context-layer mcp: an MCP stdio server (search_vault,read_source,vault_status,memory_record,memory_resume) for any JSON-RPC stdio client.context-layer install/uninstallfor Claude Code (.mcp.json, optionalUserPromptSubmithook), Codex (marker block, host unverified) and a printed generic snippet — dry run by default, backup before every write, this tool's own keys only.context-layer hook claude-codeprepends FTS evidence to a prompt and makes a helper failure visible instead of silently empty. - A3 shared memory. Append-only
.context/memory/records.jsonlwith a content-addressed id, aprevchain, source paths and the SHA-256 they had. Re-recording the same content appends nothing.resumereturns the records in force plus open tasks and flags stale sources;verifyreports chain gaps, bad ids and drift. Concurrent appends are locked;MEMORY.mdmirrors it for Obsidian. - A4 bounded sub-agent tasks.
context-layer tasks new/run/list/show/verify/ cancel/cost. A task carries a bounded evidence packet, not the vault, with allowed sources, one allowed output directory, model, budget, retries and timeout. A finished run ispending_reviewuntil a coordinator'sverify; unauthorized writes are detected by hashing the vault around each attempt and cause a rejection. A missing backend yieldsblocked, neverdone. Every attempt's tokens, cost and wall time are recorded and summed, with the host's own usage addable as acoordinatorline. - A5 source lifecycle.
context-layer statushashes every in-scope file and reports index age, changed/deleted/added/moved sources, exclusions and symlinks, withok/stale/degraded/missingmapped to the exit code. Builds now writeindex-manifest.jsonand keep the replaced index, socontext-layer rollbackcan restore it. Confirmed that stale evidence is withheld rather than delivered with a hash that no longer matches. Added the reviewedhook-visible-error.example.shlab candidate; nothing is installed. - A6 live measurement. Held-out before/after of one host with and without
this layer — source delivery, judged correctness, total tokens over
coordinator + agents + retries, and wall time. See
eval/LIVE_COMPARE.md, which also records the first measured run (12 held-out cases, one private vault, Claude Code + sonnet): the hook arm matched the baseline's judged correctness on about 46% of its tokens, while the MCP-only arm matched it at a higher token cost and added a source hash to every answer. - A7 sharing. Version 0.2.0. Added THIRD_PARTY.md: every distributed
component with its origin, licence, notice obligation and where that notice
lives, including the retained Avenox notice for the optional upstream patches.
Audited every tracked file for personal paths, accounts and e-mail addresses.
Extended
scripts/check_distribution.pyfrom an install smoke test into the full release walk in a throwaway environment outside the checkout — status, memory, a bounded task on thefakebackend, host install and uninstall in a temporary project with a temporaryHOME, index rollback, and a--force-reinstallupgrade after which the vault's.contextstate is still readable. Rewrote README.md, QUICKSTART.md, CONTRIBUTING.md and docs/README.md around the 0.2 components, with only tested platforms marked as supported.
Unchanged from 0.1.0: FTS remains the default search method, the router remains experimental, no runtime dependency is added, and no token or speed gain is claimed anywhere in the package.
- Added local init/index/search commands, with FTS as the default search method.
- Preserved the configurable router as an experimental option.
- Added frozen source/passage contracts, common-budget comparisons and raw packet capture.
- Withheld evidence on stale sources or broken indexes; preserved byte-exact UTF-8/CRLF data.
- Applied literal exclusions before reads and rejected symlink/path escapes.
- Bundled CLI runtime modules and fixtures in the wheel; added installed-package smoke checks.
- Pinned optional upstream patches and added strict source-hash checking with rollback metadata.
- Recorded synthetic comparison limits; independent semantic promotion remains outside this runner.