Repository navigation
v1.0.0
π Jev Judgment Layer β semantic evidence scoring
zerikai_memory now integrates Jev, TypeSafe AI's System One model β a fast, structured judgment engine that decides which retrieved passages actually answer your question. Your LLM still writes the answer; Jev judges the evidence it's built from.
What it adds
- Per-passage judgment β every candidate passage is scored for relevance, evidence, contradiction, and prompt-injection. Weak passages are dropped, conflicting ones flagged, and
injection attempts removed. - Better ordering β Jev's semantic ranking replaces the keyword-based lexical re-rank while enabled.
- An evidence report β each answer carries a plain-text Assessment / Evidence / Guidance block: overall status, coverage, conflicts, per-passage scores, and a plain-English action
line, so your agent knows exactly which source to cite and when to be cautious. - Blazing fast β ~111 ms mean round-trip per call β 10β100Γ faster than an LLM call.
- Plays with local models β run Jev for judgment while your local Ollama writes the answer (MEMORY_MODE=local + JEV_ALLOW_IN_LOCAL=true).
Safe by default
- Off by default. With ENABLE_JEV=false, behavior is byte-identical to the previous release β nothing changes until you opt in.
- Fail-open. Any Jev error or timeout falls back to the normal pipeline; Jev never blocks an answer.
- Air-gap preserved. local mode skips Jev unless you explicitly allow it.
Enable it
TYPESAFE_API_KEY=your_key_here
ENABLE_JEV=true Jev is in early access β create a key at console.typesafe.ai β then restart the MCP server.
π Full details and every parameter: documentation/10-jev-judgment-layer.md
DeepSeek Thinking Mode is now configurable
DeepSeek's thinking mode (chain-of-thought) is enabled by default at effort high when no parameter is sent. For extractive work β briefs and indexing summaries β that reasoning burns the output-token budget. On a real 9-section brief run, ~84.6% of output tokens were reasoning, and the Technical Stack section spent its entire max_tokens on CoT and returned empty content.
Thinking mode is now controlled independently for each DeepSeek call path, instead of relying on the API default.
New .env settings
| Setting | Applies to | Default |
|---|---|---|
DEEPSEEK_THINKING_BRIEF |
9-section project brief generation | disabled |
DEEPSEEK_THINKING_SCAN |
File-indexing summaries (non-tree-sitter files + bare-code fallback) | disabled |
DEEPSEEK_THINKING_QUERY |
query_memory answer synthesis |
disabled |
DEEPSEEK_REASONING_EFFORT_BRIEF |
Brief path, when enabled (low / high / max) |
low |
DEEPSEEK_REASONING_EFFORT_SCAN |
Scan path, when enabled (low / high / max) |
low |
DEEPSEEK_REASONING_EFFORT_QUERY |
Query path, when enabled (low / high / max) |
low |
Each path has its own toggle and its own effort, so enabling one never constrains another. Invalid values fall back silently to the default, so a typo in .env won't stop the server booting.
Other changes
- Scan summaries now run at
temperature=0for deterministic output. - The toggle is sent in OpenAI format (
extra_body={"thinking": {"type": "disabled"}}/reasoning_effort) and is DeepSeek-only β the Ollama path never receives it. Inlocalmode these settings are inert. - Briefs and query synthesis are separate pipelines with separate toggles; they are not shared.
Expected impact
- Brief sections no longer come back blank from exhausted token budgets.
- Large drop in completion tokens per brief (reasoning tokens bill as output).
- Queries behave exactly as before β thinking was never explicitly enabled, and the default remains
disabled.
Docs
README.md, .env.example, documentation/02-configuration-reference.md, documentation/05-llm-backends.md, and documentation/03-architecture-overview.md updated with the new settings and a Thinking Mode section.
Brief retrieval pool decoupled from the query pool
- Added BRIEF_FETCH_CAP (default 20) for the per-section ChromaDB candidate pool during project-brief synthesis.
- FETCH_CAP now controls the query_memory retrieval pool only. Previously, it drove both, so a low query setting silently starved briefs.
- Docs and .env.example updated.
Fixed: Any nested files whose relative path starts with the ignored directory path (like dir/xyz/) will be correctly identified and skipped.