Skip to main content

Configuration

Reporecall reads its configuration from .memory/config.json in the project root (created by reporecall init). All keys are optional — anything you omit falls back to a built-in default. Unknown keys are rejected by a strict schema, and the effective config is validated on load.

A minimal config from init:

{
"embeddingProvider": "local"
}

The tables below cover the commonly-tuned keys. src/core/config.ts is the authoritative, full list of options and defaults.

Embedding providers

embeddingProvider selects the retrieval backend:

ValueBehavior
local (default)Local vector embeddings via Xenova/all-MiniLM-L6-v2 (384 dims). No external service.
keywordFTS-only, no vectors and no model download. Fastest to set up.
ollamaEmbeddings from a local Ollama server (ollamaUrl, default http://localhost:11434).
openaiOpenAI embeddings. Requires the OPENAI_API_KEY env var (see security note).

Related keys:

KeyDefaultDescription
embeddingModel"Xenova/all-MiniLM-L6-v2"Embedding model id.
embeddingDimensions384Vector dimensionality.
ollamaUrl"http://localhost:11434"Must resolve to localhost (localhost, 127.0.0.1, or [::1]).

Search & ranking

KeyDefaultDescription
searchWeights{ vector: 0.5, keyword: 0.3, recency: 0.2 }Fusion weights; should sum to ~1.0. doctor warns if the sum drifts.
rrfK60Reciprocal Rank Fusion constant.
graphExpansiontrueExpand candidates along the call/import graph.
graphDiscountFactor0.6Score discount applied to graph-expanded neighbors.
siblingExpansiontrueInclude sibling chunks.
siblingDiscountFactor0.4Score discount for siblings.
rerankingfalseEnable cross-encoder reranking.
rerankTopK25Candidates to rerank when enabled.
codeBoostFactor1.5Boost for code chunks.
testPenaltyFactor0.3Penalty for test files (unless the query asks for tests).

Context budgets & compression

KeyDefaultDescription
contextBudget0 (auto)Token budget for assembled context. 0 computes a dynamic budget from chunk count (clamped 2000–6000).
maxContextChunks0 (dynamic)Max chunks per context bundle.
sessionBudget2000Per-session token budget.
contextCompressionEnabledtrueCompress secondary code evidence.
contextCompressionMode"auto"off, auto, or always.
contextCompressionPreserveTopChunks1Top chunks kept as full source before compressing.
contextCompressionMinChunkTokens100Minimum chunk size before compression is attempted.
contextCompressionTargetRatio0.75Max compressed/full token ratio accepted.

Compressed evidence carries a chunkId; it is reversible via MCP search_code action=read_chunk.

Wiki, capability evidence & topology

KeyDefaultDescription
wikiBudget400Max tokens for wiki injection per prompt.
wikiMaxPages3Max wiki pages injected per prompt.
capabilityEvidencetrueUse code/wiki/graph evidence to select related files for trace/architecture/change prompts.
genericCapabilityHydrationtrueHydrate broad inventory evidence for "which files implement…" questions.
topologyEnabledtrueRun topology/community analysis after indexing.
topologyMaxChunks50000Skip full topology graph construction above this indexed chunk count.
autoRefreshtrueBackground-refresh the index when stale drift is detected.

Memory

KeyDefaultDescription
memorytrueEnable the memory layer.
memoryBudget500Token budget for memory injection per prompt.
memoryDirs[]Additional directories to scan for memory .md files.
memoryWatchtrueWatch memory directories live while the daemon runs.
memoryWritableDir".memory/reporecall-memories"Writable managed memory directory.
memoryArchiveDays30Archive episode memories older than this.
memoryCompactionHours6Run compaction every N hours.
memoryAutoCreatetrueAllow deterministic automatic memory creation.
memoryFactPromotionThreshold3Repeated retrievals before promoting a fact.

See Memory for the full model.

Fact extractors

factExtractors lets you register keyword-anchored regex patterns that pull structured facts from code. Each entry is { keyword, pattern, label }:

{
"factExtractors": [
{ "keyword": "env", "pattern": "process\\.env\\.([A-Z_]+)", "label": "env-var" }
]
}

Patterns are validated on load: invalid regex and patterns flagged as ReDoS-prone (via safe-regex2) are rejected with a warning and dropped.

Ignore patterns & .memoryignore

Two mechanisms exclude files from indexing:

  1. ignorePatterns in config.json — replaces the default list if you set it. The defaults already exclude node_modules, .git, .memory, dist, build, target, coverage, minified assets, lockfiles, and — importantly — assistant/client instruction files (AGENTS.md, CLAUDE.md, GEMINI.md, .mcp.json, .claude/**, .codex/**, .cursor/**, …) and common test fixture directories.

  2. .memoryignore in the project root — uses .gitignore syntax and is created empty by init:

    # Add patterns to exclude from memory indexing
    # Uses same syntax as .gitignore
    build/generated/**
    *.snap

Environment variables

VariableUsed byDescription
OPENAI_API_KEYopenai embedding providerThe only accepted source for the OpenAI key.
CLAUDE_PROJECT_DIRClaude Code hooksProject directory used by the generated curl hooks; falls back to $PWD.

Security note: OPENAI_API_KEY

When embeddingProvider is openai, the API key must come from the OPENAI_API_KEY environment variable. An openaiApiKey placed in config.json is intentionally ignored — the strict config schema rejects it, and Reporecall logs a warning telling you to use the env var instead. This keeps secrets out of a file that is easy to commit accidentally.

export OPENAI_API_KEY=sk-... # illustrative placeholder only
reporecall index

reporecall doctor reports whether OPENAI_API_KEY is set when the OpenAI provider is selected.