Customize the agent’s identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.
ChatCLI offers two complementary systems for customizing and contextualizing the agent: bootstrap files to define personality and rules, and persistent memory to maintain context across sessions.
The bootstrap and memory system is fully connected to the system prompt flow. Files are automatically loaded and injected into all interactions — in chat mode as well as in /agent and /coder modes.
How well this memory works is measured on a public benchmark: chatcli on LongMemEval, 90.8% over 500 questions about past conversations.
Bootstrap files are Markdown documents automatically loaded into the agent’s system prompt. They define who the assistant is, how it behaves, and which rules it should follow.
ChatCLI loads exactly 5 bootstrap files, in this order. All are optional — if they don’t exist, they are simply skipped:
File
Purpose
When to use
AGENTS.md
Sub-agent definitions and their roles
When you want to instruct the orchestrator about available agents and how to use them
SOUL.md
Assistant personality, tone and style
To define “who” the assistant is — how it speaks, thinks and behaves
USER.md
User preferences and project context
To inform the stack, conventions, preferred tools and project context
IDENTITY.md
Agent identity and capabilities
To define “what” the assistant is — name, capabilities, limitations
RULES.md
Explicit rules and restrictions
For strict guardrails — what it MUST and MUST NOT do
File names are exact and case-sensitive. ChatCLI looks for AGENTS.md, SOUL.md, USER.md, IDENTITY.md and RULES.md. A directory without AGENTS.md may carry CHATCLI.md or CLAUDE.md in its place (that order); any other name (README.md, …) is not loaded by the bootstrap system.
AGENTS.md is not a single file: ChatCLI reads one from every directory between the project root and the working directory, root first, so a package-level file refines the repository-level one (the same layout Codex and Claude Code use). Nested files are prefixed with a <!-- path --> comment so the model knows where each block came from; the assembled text is capped at 32 KiB (truncated at a line boundary with a visible note). The global ~/.chatcli/AGENTS.md is always merged first (Claude Code semantics; it used to be a fallback only). AGENTS.local.md / CLAUDE.local.md / CHATCLI.local.md append per-machine, gitignored additions after their shared file; AGENTS.override.md replaces a directory’s AGENTS.md outright (the Codex convention); .claude/rules is read below .chatcli/rules (a same-name rule in .chatcli/rules wins). @import targets are symlink-resolved and must live under the workspace or the global instruction directory — an out-of-tree import is logged and left as text — and each imported file is capped at 32 KiB on its own before the hierarchy cap, so a cloned repository’s instruction file cannot pull arbitrary files from your disk into the prompt. A watched context watches at most 2,000 directories, skips directory names matched by the root’s .gitignore, and warns when the watch is partial.Any bootstrap file can pull another in with an import line of its own:
Paths resolve relative to the importing file (absolute and ~ paths work too), up to 4 hops deep and never the same file twice; a missing target leaves the line as written, and lines inside code fences are ignored. Imported files take part in cache invalidation like the bootstrap files themselves.
ChatCLI uses detectProjectDir() to find the real project root. Instead of simply using the current directory (CWD), it walks up the directory tree looking for project markers:
Checks if the current directory contains .git/ or .agent/
If not found, moves to the parent directory and repeats
Continues until a marker is found or it reaches the filesystem root
If no marker is found, falls back to the CWD
This means you can run ChatCLI from any subdirectory of your project and bootstrap files at the root will be found normally.
Recognized markers: .git (Git repository) and .agent (explicit ChatCLI marker). Only one needs to exist to define the workspace root.
Defines personality and tone. Place at ~/.chatcli/SOUL.md (global) or ./SOUL.md (project):
# PersonalityYou are a technical assistant specialized in software engineering.Be concise and direct. Prefer practical examples over theoretical explanations.When suggesting code, use best practices and tests.# Tone- Professional but approachable- Prefer short and objective responses- Use bullet points for lists- Default language: English
Defines user and project context. Ideal for ./USER.md in the project directory:
# Project Context- Stack: Go 1.25, gRPC, Kubernetes- Database: PostgreSQL 16- CI/CD: GitHub Actions- Style: conventional commits, trunk-based development# Preferences- Always use tables for comparisons- Prefer simple solutions without over-engineering- Tests with idiomatic Go table-driven tests
Defines what the assistant is. Usually global at ~/.chatcli/IDENTITY.md:
# IdentityYou are ChatCLI, an intelligent terminal assistant.## Capabilities- Code reading and editing via @coder plugin- Shell command execution with user approval- Log analysis and error diagnosis- Git operations (status, diff, log, commit)## Limitations- You do NOT have internet access- You CANNOT install packages without approval- Your patches may fail if context has changed
Defines strict rules and guardrails. Can be global or per-project:
# Mandatory Rules1. NEVER execute `rm -rf` without explicit confirmation2. NEVER commit directly to the main branch3. ALWAYS run tests after modifying code4. ALWAYS use conventional commits (feat:, fix:, chore:)# Security Restrictions- Do not expose secrets, tokens or API keys in logs- Do not modify files outside the project directory- Do not execute commands with sudo
Defines sub-agents and their roles for the orchestrator:
# Custom Agents## @devopsInfrastructure specialist for Docker, Kubernetes and CI/CD.Use for deployment, monitoring and pipeline configuration tasks.## @dbaPostgreSQL database specialist.Use for queries, optimization, migrations and performance analysis.## @securitySecurity auditor focused on OWASP Top 10.Use for code review with focus on vulnerabilities.
“Project root” means the directory containing .git/ or .agent/ — automatically detected by detectProjectDir(), not necessarily the CWD.
# GLOBAL configuration (applies to all projects)~/.chatcli/SOUL.md~/.chatcli/IDENTITY.md~/.chatcli/RULES.md~/.chatcli/USER.md~/.chatcli/AGENTS.md# Per-PROJECT configuration (overrides global)# "Project root" = directory with .git/ or .agent/<project-root>/SOUL.md # In project root<project-root>/USER.md # In project root<project-root>/RULES.md # In project root (project rules)<project-root>/IDENTITY.md # In project root (rare)<project-root>/AGENTS.md # In project root (project agents)<project-root>/services/AGENTS.md # Nested: read when the cwd is under services/<project-root>/services/CLAUDE.md # Fallback name for the same role (CHATCLI.md first)
CHATCLI_BOOTSTRAP_DIR only overrides the global directory (~/.chatcli/), not the workspace detection. Project-level files (detected via .git or .agent) still take priority over global ones, regardless of CHATCLI_BOOTSTRAP_DIR.
Recommended strategy: SOUL.md and IDENTITY.md global (they’re about the assistant), USER.md and RULES.md per-project (they’re about the work context).
The memory system maintains context across ChatCLI sessions using structured storage with multiple components that learn about you and your work over time.
Extraction depends on a background LLM call — and a provider outage must not cost the conversation its memory. Three layered defenses:
Fallback chain: extraction tries the session’s active client and, on failure, walks CHATCLI_MEMORY_FALLBACK_PROVIDERS (or CHATCLI_FALLBACK_PROVIDERS), with a per-attempt timeout.
Durable on-disk queue: a segment that fails on every provider is written to ~/.chatcli/memory/pending/ (atomic writes) and retried on later runs, oldest first — it survives restarts. The worker drains the backlog at boot and on every extraction tick (a -p-only user no longer fills the queue until the oldest segments are dropped), a segment that fails repeatedly is dropped after two attempts, the queue is capped (100 segments) and corrupt files are dropped without wedging the rest. On exit the unextracted tail of the session is queued for the next one, and shutdown waits up to 5 s for an in-flight extraction to finish its write (a hung provider call never holds the exit).
A visible notice: two consecutive failures print a one-liner in the terminal (memory: extraction failing…) — days of silent fact loss can no longer happen.
The gateway consults this memory too: the daemon’s persona calls @memory recall before answering “I don’t know” to personal questions. See Chat Gateway.
Frequently accessed and recent facts get higher scores. Old, never-accessed facts naturally decay.
UserProfile -- User Profile
Automatically detected by the AI during extraction and editable by you/the model in any mode:
Name, role, expertise level, company, location
Preferred language and communication style
Lists with lifecycle: certifications, skills, goals, interests and directives (restating an item supersedes the old one instead of duplicating; _replace/_done/_remove suffixes rewrite)
Directives with severity (hard rules vs preferences) and per-project scope ([scope:<project>] rule is only injected when that workspace is active)
Stances — technical positions recorded with the why ("position :: reason")
Milestones — dated timeline of what happened
Structured Environment (env_os, env_shell, …) — auto-migrated from legacy preferences
Per-field provenance and freshness: each attribute knows whether it came from you or from extraction and when it was last confirmed; fields unconfirmed for 120+ days are flagged as possibly stale in the prompt
Privacy tier: finance/health/family/document keys are auto-tagged [sensitive] — they personalize answers but never enter code, examples or generated artifacts (sensitive_mark/sensitive_unmark for manual control)
Most used commands (top 10) and general preferences
View your profile with /memory profile. Old profiles polluted by append-only versions self-heal on the next load (fragments, progress duplicates and completed goals leave on their own).
The ## Related (graph) section is the knowledge graph participating in recall: the top-ranked facts are expanded one hop through the graph, surfacing structurally adjacent memories (a neighboring fact, the episode from the day it was learned, a connected topic or session) that keyword and vector ranking missed. It is purely additive — it never displaces a ranked fact, only spends leftover budget — and it appears both in full-mode injection and in every @memory recall pull.
Facts accessed by the retriever automatically get their scores bumped, creating a virtuous cycle: the more useful a fact is, the more it appears.
How memory reaches the model — in every mode: chat, /agent and /coder — is controlled by CHATCLI_MEMORY_MODE:
Mode
Behavior
index (default)
Injects only a compact, stable index (profile summary + top topic/project names + fact tally by category + episode count) and lets the model pull detail on demand via the memory recall tool. Bounded, cacheable per-turn cost.
full
Injects the full Smart Retrieval (above) every turn — the classic “push” behavior.
off
Injects no memory; bootstrap files still apply.
Persistent-memory bootstrap card — every surface’s system prompt opens with a [PERSISTENT MEMORY — REAL, CROSS-SESSION] card: a session-start snapshot of live counts (long-term facts, dated episodes, saved conversations with the latest one named, in-flight work-board cards) plus an explicit anti-amnesia directive — never claim you have no memory of past sessions; pull first (@memory recall, @session search, @board list; in chat, the card points the user at /session attach instead of tools chat does not have). In agent and coder modes it also teaches dates: compute “how long ago” from the save date and age each @session search hit shows, narrow with from/to or move the counting date for one call with as_of (Dates), and answer a current value, count or state from the most recent dated mention rather than the first session found. The card is frozen per session so it lives in the cached prefix. Proactive recall also fires from the very first turn of a fresh session: the current message feeds the ranking hints, purely referential questions (“what did we talk about earlier?”) list the most recent sessions instead of lexically strong old ones, and the ambient recall window covers the 60 most recently saved sessions.Proactive auto-recall closes the pull model’s gap: models sometimes skip the recall call even when a stored gotcha is exactly what they need. In index mode, each turn also ranks the fact index against keywords from the recent messages and rides the top 3 matches into the prompt as a tiny [MEMORY AUTO-RECALL] block (700-byte cap; labeled as data, not instructions, each fact on one line — an external provider’s answer rides under its own [EXTERNAL MEMORY] fence), followed by a one-line Related (graph): pointer naming what sits next to those facts in the knowledge graph — so the model knows there is more to pull before it claims ignorance. The block lives in the uncached trailing region next to the wall-clock context, so the stable digest stays byte-identical and prompt caching is unaffected. Gated by CHATCLI_MEMORY_AUTORECALL (on by default).Two quality rules govern what the block may carry. Relevance floor: a fact found by keywords alone must match roughly a third of the turn’s hints (computeRelevance ≥ 0.34), and a fact found by the vector index must clear the cosine floor (min_cosine_score, 0.25) — one incidental token can no longer inject an unrelated fact into every turn. Vectors when available: with an embedding provider configured (CHATCLI_EMBED_PROVIDER), the block ranks with the same blended semantic + lexical + temporal ranker the recall tool uses, embedding the turn’s message once (skipped for messages under 8 characters), so a paraphrase with zero keyword overlap can surface; keyless setups keep the lexical ranker. No reinforcement on push: facts injected proactively are no longer marked accessed — reinforcing a fact merely for being pushed was self-entrenching (a spuriously surfaced fact climbed its own ranking). Access is reinforced when the model actually pulls detail through the memory tool.Reinforcement waits for evidence. The facts a turn injected are remembered, and after the reply only those the answer evidently drew on — enough of the fact’s own significant terms appear in the reply (two, or a third of them for long facts) — get their access counter bumped. A fact the model ignored keeps its score; nothing is demoted. Episodes ride along: when the turn’s message is long enough, up to two timeline episodes ranked by BM25 over the episodic store (summary, outcome, project, refs) are appended as dated bullets, so “what did we do about the invoice migration” surfaces the work unit, not just the facts around it. The same BM25 ranking now powers @memory timeline queries inside a date window.The pull mode (index) shrinks the per-turn memory block by ~88% on a 500-fact store without losing access to detail — see Token Efficiency › Pull-first memory for the full measurement. Chat honors index too: the sanctioned chat memory tool exception (CHATCLI_CHAT_MEMORY, on by default) gives chat the same pull path, so it receives the compact digest plus a recall hint instead of the full retrieval. Only when that exception is disabled does chat fall back to full — chat without a pull path must never be starved of memory. Chat also receives the proactive [MEMORY AUTO-RECALL] and [SESSION RECALL] blocks and the knowledge-graph card, previously agent/coder-only (the session-recall wording in chat suggests /session attach, since chat has no session tool). The recall tool uses HyDE + vector search, so pulled detail matches push quality. Check the active mode with /config memory.
The background worker now extracts 6 types of information (previously only 2):
DAILY — What was done (files, commands, errors, tasks)
LONGTERM — New facts to remember permanently
PROFILE_UPDATE — Information about the user (name, role, expertise)
TOPICS — Technical topics discussed
PROJECTS — Projects worked on
EPISODES — Dated, durable units of completed work (see Episodic memory)
The worker fires after 4+ new messages with a 2-minute cooldown, and also every 3 minutes during long sessions.What a call costs, and what it is worth. The extraction request is shaped for the prompt cache: the instructions are one cached system block, the workspace line and the existing long-term memory another, and only the new conversation segment travels as the user message. On a provider with a prefix cache the three-minute cadence reads the first two back from a warm entry and pays the write for the segment alone; nothing is sent twice. The worker runs on the session model unless CHATCLI_COMPACT_MODEL names a cheaper one, which serves the worker as well as compaction — a fast model there is the single largest lever on background spend. /cost shows the balance under the worker’s line: facts and episodes written, cost per item, and how many proactive recalls put stored facts back in front of the model. A worker that writes memory the session never reads is what that line exposes.
EnhancedExtractionPrompt: Sends the recent conversation history to the LLM with a structured prompt requesting information extraction
Expected output: The LLM returns text with well-defined section headers:
## DAILY — Summary of what was done in the session
## LONGTERM — New facts for long-term memory
## PROFILE_UPDATE — User profile updates
## TOPICS — Technical topics identified
## PROJECTS — Projects mentioned or worked on
ParseEnhancedResponse(): Parses the response and extracts each section individually
Deduplication: Each fact receives a unique ID via SHA-256 content hash. Facts with a hash matching an existing one are automatically discarded
Profile merging with lifecycle: PROFILE_UPDATE changes are merged with the existing profile. List fields upsert (restating an item supersedes the old one instead of duplicating), and extraction may emit rewrite operations: goals_done=/goals_remove= remove finished goals (moving them to milestone=/certifications=), goals_replace= replaces the whole list — the same suffixes work for certifications, skills, interests and directives. Your instructions about the profile (“remove X from my goals”) are applied, never recorded as if they were facts
Daily notes expire after ~30 days — rollups preserve the long-range narrative before that:
When an ISO week ends, that week’s daily notes consolidate into weekly/2026-W27.md (LLM summary with a deterministic fallback — never depends on the provider being up).
When a month ends, its weekly digests consolidate into monthly/2026-06.md.
A bounded Trajectory section enters the memory context with the latest monthly + recent weeklies — that is how “what you have been doing these past months” survives daily-note cleanup.
The process is idempotent and runs on its own in the memory worker (startup check plus every 12h).
When starting for the first time with the new system, ChatCLI detects if a legacy MEMORY.md exists (without memory_index.json) and migrates automatically:
Each line/bullet is converted to an individual fact
Explicitly add a long-term fact (accepts a [category] prefix)
/memory forget <substring>
Remove long-term facts containing the substring
/memory topics
Show tracked topics with frequency
/memory projects
Show tracked projects with status
/memory stats
Full statistics (sessions, peak hours, errors, features)
/memory facts [category]
List facts with scores (filter by category)
/memory timeline [q]
Dated episode history; q filters by time (“3 meses atrás”, “abril”, “2026-04”) and/or content
/memory compact
Force immediate compaction (LLM + note cleanup)
/memory export [path]
Write facts, episodes, topics, projects and profile as JSONL (default ~/.chatcli/exports/memory-<ts>.jsonl, mode 0600; sealed line by line only with a key from CHATCLI_ENCRYPTION_KEY, so it can be imported elsewhere; with the default keychain key it is plaintext and the command says so)
/memory import <path>
Merge an export into this machine’s memory: every fact is sanitized (one line, bounded, secrets masked) and its id re-derived from the content (known content keeps the stronger metadata; a chosen id cannot smuggle a duplicate), confidence is clamped, tags capped and categories validated; episodes dedup, topics/projects/profile merge field by field; a file whose header declares a newer schema is refused; nothing is deleted
/memory recall <query>
Dry-run of auto-recall: the facts the query would inject, each with its score and why (keyword/semantic/recency signals, use count, provenance, source project)
/memory why
The last turn’s auto-recall with the same reasons
Every store also reconciles with its file before rewriting it — facts and episodes already did; the profile, topics and projects now merge too (fresher field wins, lists union), so a REPL, a gateway daemon and an MCP server writing the same memory never erase each other’s learning. Daily notes are appended through an atomic rename, so a crash mid-write cannot tear a note. A fact learned in another project is labeled (from: ~/path) in the recalled block, a git root and its packages counting as one project.
Automatic detection doesn’t always catch everything, so you can edit memory explicitly. Beyond name/role/expertise/company/location, the profile covers certifications, skills, goals, interests, directives, stances, milestones and environment (env_*).List fields have a lifecycle, they are not append-only: new items enter, a restated item (same text apart from status/parenthetical) supersedes the old one in place, and operation suffixes rewrite — _replace overwrites the whole list (empty value clears it), _done/_remove delete matching items. Commas inside parentheses are safe ("Quiz X (Provider, 60 questões)" stays whole).
> /memory profile set company=ACME Corp> /memory profile set certifications=CKA, AWS SAA # upsert, deduplicated> /memory profile set goals_done=earn the CKA # finished goal leaves the list> /memory profile set milestone=Earned the CKA # ...and becomes a dated milestone> /memory profile set goals_replace=launch product Y # replaces ALL goals> /memory profile set stance=prefer keyless backends :: less setup friction> /memory profile set directives=[scope:my-repo] always run the linter before pushing> /memory profile set env_shell=zsh> /memory profile set sensitive_mark=monthly_income # marks as private> /memory remember [preference] Prefers Go over Python for CLIs> /memory forget Python # removes FACTS containing "Python"
forget only acts on facts; to remove profile items use the suffixes (goals_remove=...). Directives with [scope:<project>] are only injected when that workspace is active; without the tag they apply globally.
Inside /agent and /coder, the model can persist and explore memory on its own via the @memory tool (cmds remember, profile, forget, recall, timeline, neighbors, map):
<tool_call name="@memory" args='{"cmd":"remember","args":{"content":"User earned the AWS Solutions Architect certification","category":"personal"}}' />
So when you tell the agent something new (e.g. a fresh certification), it records it into your profile/long-term facts without you running /memory manually. The profile subcommand accepts every lifecycle operation (goals_done, goals_replace, stance, milestone, env_*, sensitive_mark, …).In chat too: memory/profile updates are the fourth sanctioned exception of tool-less chat (alongside ask_user, read-only knowledge and @graphview). When you reveal or correct a durable fact about yourself, the model persists it in the same turn — no more “I’ll keep that in mind” without writing anything. The exception also carries the read side: it is the pull path that lets chat honor index memory mode (compact digest + on-demand recall) and receive the proactive auto-recall, session-recall and graph-card blocks. Gated by CHATCLI_CHAT_MEMORY (on by default), flippable with /config chat memory on|off — disabling it reverts chat to the full-push memory model.
Facts capture what is true; episodes capture what happened. An episode is a dated, durable unit of completed work — summary, outcome and refs (files, PRs, commands) — extracted automatically by the background worker (## EPISODES section) and stored forever in ~/.chatcli/memory/episodes.json. Unlike daily notes (30-day retention) and their digests, episodes never expire, so “what did we do three months ago?” finally has a structured answer.
Storage follows the fact-index disciplines: atomic writes, quarantine on corruption, and reconciling multi-process rewrites under a cross-process file lock (<store>.lock next to each store, taken for the merge-and-write critical section, so the REPL, the gateway daemon and the MCP server never erase each other — the same lock guards the context store and the vector index). The same work item re-extracted on the same day dedups and enriches outcome/refs instead of duplicating. Capped at 2000 episodes (oldest dropped first).
@memory timeline is the model-facing chronological view: {project?, from?, to?, query?, limit?, as_of?} (as_of, also accepted by recall, counts relative expressions from another date for that one call). from/to accept ISO dates (2026-04, 2026-04-12) or natural expressions in English and Portuguese (“3 months ago”, “há 3 meses”, “abril”, “last week”) — a time expression inside query works too.
Temporal recall: a @memory recall query carrying a time expression (“o que fizemos em abril?”) automatically prepends the matching timeline slice to the result — relevance ranking alone cannot answer “when”. When the window came from natural language and the leftover words match nothing, the window wins and returns unfiltered (the date was the real signal).
/memory timeline [q] is the human view — same temporal parsing, rendered in the terminal.
Rollups are grounded in episodes: weekly/monthly digests now lead with the period’s episodes and use daily notes as color, so the long-range narrative stops decaying — and a week whose notes already expired still gets its digest from episodes alone.
What ChatCLI knows about you is not a flat list: facts, topics, projects, skills, tags — and, since the persisted graph landed, episodes, saved sessions and knowledge bases — form a graph (Obsidian-style, in the core) derived from the relationships the stores already record (topic↔fact, fact→project, episode↔project, episode↔same-day facts, session↔project, session↔episode, KB↔tags, skill triggers) plus [[wikilinks]] in note text. Access is through @memory itself:
recall → search by content (“which facts match these words?”) — the output now ends with a ## Related (graph) section of one-hop neighbors.
neighbors <subject> → local graph: backlinks + related notes for a subject (“what connects to this?”).
map → overview (counts by kind + hubs).
The graph is a persisted cache, not a per-call derivation: it lives at ~/.chatcli/memory/graph.json and rebuilds only when a source actually changes (a fact is learned or forgotten, a session is saved, a skill is installed, a context is created — whether by you or by the model through its tools). On the next boot the cache is adopted instantly, so @memory map and the per-turn card cost nothing. The file is self-healing: a corrupt or stale copy is simply discarded and re-derived. Gate: CHATCLI_MEMORY_GRAPH (on by default; off restores the old derive-per-call behavior with no recall expansion). Node/edge counts are visible in /config memory.Context discipline: only a tiny, deterministic index card rides each turn (cache-friendly); depth is pulled on demand. To visualize, use /graph (renders the graph to an image via embedded go-graphviz).
Each fact carries confidence and provenance: what you state directly outranks a background-extraction guess, and a re-observed fact climbs — confidence scales the score (ranking and survival against decay/pruning). On write, ChatCLI reconciles: a rephrasing reinforces the existing fact instead of duplicating, and a same-subject update of equal-or-higher confidence supersedes the stale one (conservatively — a weak guess never wipes a strong fact). Topics gain a rolling summary of what was discussed, becoming real knowledge nodes. Legacy memory indexes are enriched once on startup, without losing anything.
The ContextBuilder assembles the following block and injects it as a system prompt prefix:
## AGENTS.md[content of AGENTS.md]---## SOUL.md[content of SOUL.md]---## USER.md[content of USER.md]---## IDENTITY.md[content of IDENTITY.md]---## RULES.md[content of RULES.md]---# Memory## Long-term Memory[content of MEMORY.md]## Recent Daily Notes### 2026-03-04[content of March 4th note]### 2026-03-05[content of March 5th note]### 2026-03-06[content of today's note]
Empty sections (missing files) are automatically omitted — only what exists is injected.
ChatCLI automatically injects into the system prompt:
The current date and time
The current working directory (the process CWD)
A disambiguation instruction: the model is told to ALWAYS resolve “here”, “this project” and relative paths against the current CWD — never against paths found in long-term memory
This solves the common problem where long-term memory holds paths of earlier projects and the model mistakes “the current project” for one that was in memory. Facts from other projects are annotated with (from: /other/project) so their origin is clear.
Besides the global RULES.md, you can create conditional rules per path in .chatcli/rules/:
.chatcli/rules/├── go-style.md # Rules for Go files├── api-conventions.md # Rules for APIs└── testing.md # Rules for tests
Each file can carry a paths: frontmatter that sets which files the rule applies to:
---paths: ["*.go", "src/**"]---Always wrap errors with fmt.Errorf("%w", err) in Go.Never ignore returned errors.
Rules without a paths: frontmatter apply globally. Workspace rules (.chatcli/rules/) take priority over global rules (~/.chatcli/rules/) with the same name.
Alternative directory for global bootstrap files. Use this when you want to keep your files (SOUL.md, RULES.md, etc.) in another location, such as a versioned repository or a directory shared across machines
CHATCLI_MEMORY_ENABLED
true
Enable/disable the persistent memory system
CHATCLI_BOOTSTRAP_DIR only overrides the global directory (~/.chatcli/). Project-level files (detected via .git or .agent markers) still take priority over global ones.
# values.yamlbootstrap: enabled: true definitions: SOUL.md: | You are a DevOps assistant... USER.md: | The user prefers Go...memory: enabled: true subPath: memory # default: memory's own directory of the sessions PVC
The Helm chart creates ConfigMaps for bootstrap files and mounts them at /home/chatcli/.chatcli/bootstrap/; a change to bootstrap.definitions rolls the pods on helm upgrade, while an edited bootstrap.existingConfigMap needs kubectl rollout restart. bootstrap.enabled with neither definitions nor existingConfigMap mounts nothing.With persistence on, memory lives in its own directory of the sessions PVC (memory.subPath, default memory, mounted at ~/.chatcli/memory) while the sessions stay at the PVC root; without persistence it is a 200Mi emptyDir. Earlier charts (up to 1.211.x) kept memory at the PVC root, among the session files: on the first start after the upgrade the server copies memory’s own files from there into the memory directory, once and without moving or overwriting anything (the chart sets CHATCLI_MEMORY_LEGACY_DIR for this). memory.subPath: "" keeps the old shared layout. Details in Kubernetes deployment.
CHATCLI_MEMORY_PROVIDER=mcp-only:<server> uses the external provider alone (no embedded recall block). The embedded memory stays the default. An organization that already runs a memory service plugs it in through MCP with no ChatCLI code: CHATCLI_MEMORY_PROVIDER=mcp:<server> where <server> is a configured MCP server exposing two tools:
Tool
Arguments
Role
memory_recall
query, hints[], budget_chars
returns text appended to the auto-recall block of every turn (chat and agent/coder), bounded to 900 chars, 5 s
memory_store
messages[{role, content}], session
receives every turn’s new messages (system messages excluded), forwarded asynchronously and best-effort, 10 s
The embedded facts, episodes and graph keep working alongside; the provider’s answer rides after them. Any failure or timeout adds nothing and never blocks a turn. Shown in /config memory.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"ChatCLI","description":"Official ChatCLI documentation — a multi-provider AI CLI with agent mode, gRPC server and Kubernetes operator.","colors":{"primary":"#0F766E","light":"#2DD4BF","dark":"#0D9488"},"logo":{"light":"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=965a0feb9bd2f65a11b3c486e2488101","dark":"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=ac3f6607cdea0039d0b66b80f700e512","href":"/"},"favicon":"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/favicon.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=c774e29d1b243b7c3b4bf5e173fef299","api":{"openapi":"api-reference/openapi.json","playground":{"display":"interactive"}},"appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#F7F7F5","dark":"#0E0F10"}},"navbar":{"links":[{"href":"/cookbook/agent-refactoring","label":"Cookbook"},{"href":"/releases","label":"Releases"},{"href":"https://github.com/diillson/chatcli","type":"github"}],"primary":{"type":"button","label":"Install","href":"/start/installation"}},"footer":{"socials":{"github":"https://github.com/diillson/chatcli","x":"https://x.com/diillson"},"links":[{"header":"Resources","items":[{"label":"Documentation","href":"/"},{"label":"Cookbook","href":"/cookbook/agent-refactoring"},{"label":"API Reference","href":"/reference/api/overview"}]},{"header":"Community","items":[{"label":"GitHub","href":"https://github.com/diillson/chatcli"},{"label":"Issues","href":"https://github.com/diillson/chatcli/issues"},{"label":"Discussions","href":"https://github.com/diillson/chatcli/discussions"},{"label":"Releases","href":"https://github.com/diillson/chatcli/releases"}]},{"header":"Distribution","items":[{"label":"ArtifactHub","href":"https://artifacthub.io/packages/search?ts_query_web=chatcli"},{"label":"Helm Charts","href":"https://artifacthub.io/packages/helm/chatcli/chatcli"},{"label":"Container Registry","href":"https://github.com/diillson/chatcli/pkgs/container/chatcli"}]}]},"search":{"prompt":"Search"},"seo":{"metatags":{"og:type":"website","og:site_name":"ChatCLI Documentation","twitter:card":"summary_large_image","twitter:site":"@diillson"}},"fonts":{"heading":{"family":"Geist","weight":600},"body":{"family":"Geist"}},"styling":{"eyebrows":"section","codeblocks":"system","latex":true},"integrations":{},"errors":{"404":{"redirect":false}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"pt-BR","footer":{"socials":{"github":"https://github.com/diillson/chatcli","x":"https://x.com/diillson"},"links":[{"header":"Recursos","items":[{"label":"Documentação","href":"/pt"},{"label":"Cookbook","href":"/pt/cookbook/agent-refactoring"},{"label":"API Reference","href":"/pt/reference/api/overview"}]},{"header":"Comunidade","items":[{"label":"GitHub","href":"https://github.com/diillson/chatcli"},{"label":"Issues","href":"https://github.com/diillson/chatcli/issues"},{"label":"Discussions","href":"https://github.com/diillson/chatcli/discussions"},{"label":"Releases","href":"https://github.com/diillson/chatcli/releases"}]},{"header":"Distribuição","items":[{"label":"ArtifactHub","href":"https://artifacthub.io/packages/search?ts_query_web=chatcli"},{"label":"Helm Charts","href":"https://artifacthub.io/packages/helm/chatcli/chatcli"},{"label":"Container Registry","href":"https://github.com/diillson/chatcli/pkgs/container/chatcli"}]}]},"navbar":{"links":[{"href":"/pt/cookbook/agent-refactoring","label":"Cookbook"},{"href":"/pt/releases","label":"Releases"},{"href":"https://github.com/diillson/chatcli","type":"github"}],"primary":{"type":"button","label":"Instalar","href":"/pt/start/installation"}},"href":"pt"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"encom","hasAudioNarration":false,"actualSubdomain":"encom","customDomains":["chatcli.edilsonfreitas.com"],"gitSource":{"type":"github","owner":"diillson","repo":"chatcli.ai","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad7d0ebd8a64fb93f78a90e","collectionId":"8cbbcbec-1722-4fa8-be01-aad6ba324d29","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad7d0ebd8a64fb93f78a90e"},"entitlements":{},"buildId":"6ad7d0ebd8a64fb93f78a90e","clientVersion":"0.0.3908","searchFilterCounts":[{"language":"en","tag":"Documentation","count":201},{"language":"pt-BR","tag":"Documentação","count":201},{"language":"en","tag":"Reference","count":55},{"language":"pt-BR","tag":"Referência","count":55},{"language":"en","tag":"REST API","count":50},{"language":"pt-BR","tag":"REST API","count":50},{"language":"en","tag":"Agents","count":20},{"language":"pt-BR","tag":"Agentes","count":20},{"language":"en","tag":"Cookbook","count":16},{"language":"pt-BR","tag":"Cookbook","count":16},{"language":"en","tag":"Context \u0026 memory","count":15},{"language":"en","tag":"Using ChatCLI","count":15},{"language":"pt-BR","tag":"Contexto e memória","count":15},{"language":"pt-BR","tag":"Usando o ChatCLI","count":15},{"language":"en","tag":"Kubernetes \u0026 AIOps","count":14},{"language":"pt-BR","tag":"Kubernetes e AIOps","count":14},{"language":"en","tag":"Channels \u0026 gateway","count":11},{"language":"en","tag":"Releases","count":11},{"language":"pt-BR","tag":"Canais e gateway","count":11},{"language":"pt-BR","tag":"Releases","count":11}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-branches-v2-autocommit","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-branches-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"teamspace","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"client-snapshot-docs-config","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n@keyframes cb-blink{50%{opacity:0}}@keyframes cc-nav-in{0%{opacity:0;transform:translateX(18px)}}@keyframes cc-nav-out{0%{opacity:0;transform:translateX(-18px)}}:root{--cc-accent:#0f766e;--cc-accent-strong:#115e59;--cc-accent-soft:rgb(13 148 136 / 0.08);--cc-accent-ring:rgb(13 148 136 / 0.32);--cc-glow:rgb(20 184 166 / 0.07);--cc-text:#17171a;--cc-text-2:#46464e;--cc-text-3:#6b6b74;--cc-surface:#ffffff;--cc-surface-2:#f1f0ed;--cc-code-bg:#f3f2ef;--cc-border:rgb(23 23 26 / 0.10);--cc-border-strong:rgb(23 23 26 / 0.18);--cc-shadow:0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.10);--cc-radius:0.75rem;--cc-radius-sm:0.5rem;--cc-mono:\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}html.dark{--cc-accent:#2dd4bf;--cc-accent-strong:#5eead4;--cc-accent-soft:rgb(45 212 191 / 0.12);--cc-accent-ring:rgb(45 212 191 / 0.40);--cc-glow:rgb(45 212 191 / 0.08);--cc-text:#ededed;--cc-text-2:#bcbcc4;--cc-text-3:#8e8e96;--cc-surface:#161719;--cc-surface-2:#1c1d20;--cc-code-bg:#121314;--cc-border:rgb(154 154 162 / 0.16);--cc-border-strong:rgb(154 154 162 / 0.28);--cc-shadow:0 1px 2px rgb(0 0 0 / 0.25), 0 12px 32px -16px rgb(0 0 0 / 0.6);--cc-live:#4ade80;--cc-live-soft:rgb(74 222 128 / 0.12)}::selection{background:var(--cc-accent-ring)}body::before{content:\"\";position:fixed;inset:0 0 auto auto;width:60vw;height:32rem;pointer-events:none;z-index:0;background:radial-gradient(ellipse at 75% 0%,var(--cc-glow),transparent 65%)}#navbar{backdrop-filter:saturate(140%) blur(12px)}#navbar #search-bar-entry{border-color:var(--cc-border);background:var(--cc-surface);box-shadow:none}#sidebar-title,#topbar-cta-button a{font-weight:500}#sidebar-title{font-size:.75rem;letter-spacing:.01em;color:var(--cc-text-3)}#navbar #search-bar-entry,#sidebar #navigation-items a,#topbar-cta-button a{border-radius:var(--cc-radius-sm)}#sidebar #navigation-items a.text-primary,#sidebar #navigation-items a[class*=bg-primary]{background:var(--cc-accent-soft);color:var(--cc-accent);text-shadow:none;font-weight:500}.nav-tag-pill-text{font-family:var(--cc-mono);font-weight:500!important;letter-spacing:.02em}#header .eyebrow{color:var(--cc-accent);font-size:.8125rem;font-weight:500}#page-title{font-size:clamp(2rem,3.2vw,2.5rem);font-weight:600;letter-spacing:-.025em;line-height:1.15}#header .prose{color:var(--cc-text-2)}#page-context-menu button,#page-context-menu-button{border-radius:var(--cc-radius-sm)}#content{font-size:.975rem}#content h2,#content h3{letter-spacing:-.02em;font-weight:600}#content h3{letter-spacing:-.01em}#content a:not(.card):not([class*=cc-]){text-decoration-color:var(--cc-accent-ring);text-underline-offset:3px}#content a:not(.card):not([class*=cc-]):hover{text-decoration-color:var(--cc-accent)}.font-mono,code,kbd,pre{font-family:var(--cc-mono)!important}#content :not(pre)>code{font-size:.85em;padding:.1em .38em;border-radius:.375rem;border:1px solid var(--cc-border);background:var(--cc-surface-2)}.code-block,[data-component-part=code-block-root]{border-radius:var(--cc-radius)!important;border-color:var(--cc-border)!important}.callout,.code-block-background{border-radius:var(--cc-radius)!important}html.dark .code-block-background{background:var(--cc-code-bg)!important}#content table{font-size:.9rem}#content table thead th{font-size:.8125rem;font-weight:600;color:var(--cc-text-2);border-bottom:1px solid var(--cc-border-strong)}#content table td{border-color:var(--cc-border)}.callout{border:1px solid var(--cc-border)!important;background:var(--cc-surface)!important;box-shadow:var(--cc-shadow)}.callout>div:last-child,.callout>div:last-child *{color:var(--cc-text-2)}.callout>div:last-child code,.callout>div:last-child strong{color:var(--cc-text)!important}.callout[data-callout-type=warning]{border-left:3px solid #f59e0b!important}.callout[data-callout-type=danger]{border-left:3px solid #ef4444!important}.card{border-radius:var(--cc-radius)!important;border-color:var(--cc-border)!important;background:var(--cc-surface)!important;transition:border-color 160ms ease,transform 160ms ease}a.card:hover{border-color:var(--cc-accent-ring)!important}.card [data-component-part=card-icon]{display:grid;place-items:center;width:2.25rem;height:2.25rem;margin-bottom:.25rem;border-radius:var(--cc-radius-sm);border:1px solid var(--cc-border);background:var(--cc-surface-2)}.card [data-component-part=card-icon] svg{width:1rem!important;height:1rem!important;background-color:var(--cc-accent)!important}.steps [data-component-part=step-number]>div{background:var(--cc-surface)!important;box-shadow:0 0 0 1px var(--cc-accent-ring);color:var(--cc-accent)!important;font-family:var(--cc-mono)}[role=tablist] [data-state=active],[role=tablist] button[aria-selected=true]{color:var(--cc-accent)!important;border-color:var(--cc-accent)!important}#content-area:has([data-chatcli-banner]) #header,#content-area:has([data-chatcli-banner]) #header .eyebrow,#content-area:has([data-chatcli-banner]) #header .prose,#content-area:has([data-chatcli-banner]) #page-title{display:none}#content-area:has([data-chatcli-banner]) #content{margin-top:0}.chatcli-banner{margin:3rem 0 .75rem}.chatcli-banner-art{--cb-a:#0d9488;--cb-b:#0891b2;--cb-c:#2563eb;--cb-edge:rgb(23 23 26 / 0.28);--cb-glow:rgb(13 148 136 / 0.18);display:block;width:min(100%,30rem);height:auto;overflow:visible}html.dark .chatcli-banner-art{--cb-a:#2dd4bf;--cb-b:#22d3ee;--cb-c:#60a5fa;--cb-edge:rgb(237 237 237 / 0.22);--cb-glow:rgb(45 212 191 / 0.34)}.chatcli-banner .cb-fills rect{shape-rendering:crispEdges}.chatcli-banner .cb-fills{filter:drop-shadow(0 0 14px var(--cb-glow))}.chatcli-banner .cb-edges path{fill:none;stroke:var(--cb-edge);stroke-width:.55;stroke-linecap:square}.cb-prompt{margin:0 0 1.25rem;font-family:var(--cc-mono);font-size:.95rem;color:var(--cc-text-2)}.cb-prompt-sign{color:var(--cc-accent)}.cb-cursor{display:inline-block;width:.55em;height:1.1em;margin-left:.3em;vertical-align:-.18em;background:var(--cc-accent);animation:cb-blink 1.1s steps(1) infinite}@media (prefers-reduced-motion:reduce){.cb-cursor{animation:none}}.chatcli-banner-tagline{font-size:1.125rem;line-height:1.6;margin:0 0 2rem;max-width:44rem;color:var(--cc-text-2)}.chatcli-banner-tagline strong{color:var(--cc-text);font-weight:500}.cc-entry>div,a.cc-release{border:1px solid var(--cc-border);border-radius:var(--cc-radius);background:var(--cc-surface)}a.cc-release{display:flex;align-items:center;gap:.75rem;padding:.85rem 1.1rem;margin:0 0 1.25rem;color:var(--cc-text-2);font-size:.875rem;text-decoration:none!important;border-bottom-width:1px;transition:border-color 160ms ease}a.cc-release:hover{border-color:var(--cc-accent-ring)}.cc-release-label{color:var(--cc-text-3);white-space:nowrap}.cc-release-version{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;color:var(--cc-text);white-space:nowrap}.cc-release-version::before{content:\"\";width:.4rem;height:.4rem;border-radius:999px;background:var(--cc-live);box-shadow:0 0 0 3px var(--cc-live-soft)}.cc-release-summary{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cc-release-cta{font-weight:500;color:var(--cc-text);white-space:nowrap}.cc-entry{margin:0 0 3rem}.cc-entry>div{gap:0!important;overflow:hidden}.cc-entry .card{margin:0!important;border:0!important;border-radius:0!important;background:0 0!important;height:100%}.cc-entry .card:hover{background:var(--cc-accent-soft)!important}@media (min-width:1024px){.cc-entry .card{border-left:1px solid var(--cc-border)!important}.cc-entry>div>.card:first-child,.cc-entry>div>:first-child .card{border-left:0!important}}@media (max-width:1023px){.cc-entry .card{border-top:1px solid var(--cc-border)!important}.cc-entry>div>.card:first-child,.cc-entry>div>:first-child .card{border-top:0!important}a.cc-release{flex-wrap:wrap}.cc-release-summary{flex-basis:100%;white-space:normal}}.cc-release-meta{display:flex;flex-wrap:wrap;gap:.5rem 1.25rem;margin:0 0 1.5rem;font-size:.875rem;color:var(--cc-text-3)}.cc-release-meta a{color:var(--cc-text-2)!important}.cc-scope{display:inline-block;margin-right:.35rem;padding:.05rem .4rem;border-radius:.375rem;border:1px solid var(--cc-border);background:var(--cc-surface-2);font-family:var(--cc-mono);font-size:.78em;color:var(--cc-text-2);vertical-align:.08em}a.cc-scope{text-decoration:none!important;color:var(--cc-accent)!important}.cc-refs{font-size:.85em;color:var(--cc-text-3);white-space:nowrap}.cc-refs a{color:var(--cc-text-3)!important}html{--cc-live:#15803d;--cc-live-soft:rgb(21 128 61 / 0.10)}.nav-tag-pill-text[data-nav-tag=\"Mais recente\"],.nav-tag-pill-text[data-nav-tag=Latest],.nav-tag-pill-text[data-nav-tag^=v]{display:inline-flex;align-items:center;gap:.3rem;color:var(--cc-live)!important;background:var(--cc-live-soft)!important}.nav-tag-pill-text[data-nav-tag=\"Mais recente\"]::before,.nav-tag-pill-text[data-nav-tag=Latest]::before,.nav-tag-pill-text[data-nav-tag^=v]::before{content:\"\";width:.35rem;height:.35rem;border-radius:999px;background:currentColor}.cc-nav-back{display:flex;align-items:center;gap:.6rem;width:100%;margin:0 0 1rem;padding:.6rem .85rem;border:1px solid var(--cc-border);border-radius:var(--cc-radius-sm);background:var(--cc-surface);color:var(--cc-text);font-weight:600;text-align:left;cursor:pointer;transition:border-color 160ms ease,background 160ms ease}#navigation-items[data-cc-focus] [data-cc-focused]>button,.cc-nav-back[hidden]{display:none}.cc-nav-back:hover,a.cc-channel:hover{border-color:var(--cc-accent-ring)}.cc-nav-back svg{flex:none;color:var(--cc-text-3)}#navigation-items[data-cc-focus] ul.sidebar-group>li:not([data-cc-focused]),#navigation-items[data-cc-focus]>div:not(:has([data-cc-focused])){display:none}#navigation-items[data-cc-focus]>div:has([data-cc-focused]){margin-top:0}#navigation-items[data-cc-focus]>div:has([data-cc-focused])>:not(ul){display:none}#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>a,#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>button{padding-left:1rem!important}#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>ul a,#navigation-items[data-cc-focus] [data-cc-focused]>ul>li>ul button{padding-left:1.75rem!important}#navigation-items.cc-nav-in{animation:cc-nav-in 220ms cubic-bezier(.23,1,.32,1)}#navigation-items.cc-nav-out{animation:cc-nav-out 220ms cubic-bezier(.23,1,.32,1)}@media (prefers-reduced-motion:reduce){#navigation-items.cc-nav-in,#navigation-items.cc-nav-out{animation:none}}.cc-channels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem;margin:1.25rem 0 2rem}@media (max-width:900px){.cc-channels{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:520px){.cc-channels{grid-template-columns:1fr}}a.cc-channel{display:flex;align-items:center;gap:.85rem;padding:1rem 1.1rem;border:1px solid var(--cc-border);border-radius:var(--cc-radius);background:var(--cc-surface);color:var(--cc-text)!important;font-weight:500;font-size:.95rem;text-decoration:none!important;transition:border-color 160ms ease,transform 160ms ease}.cc-channel-icon{display:grid;place-items:center;flex:none;width:1.6rem;height:1.6rem}.cc-channel-icon svg{width:1.45rem;height:1.45rem}.cc-channel-name{flex:1;min-width:0}.cc-channel-arrow{flex:none;width:1rem;height:1rem;color:var(--cc-text-3);transition:transform 160ms ease,color 160ms ease}a.cc-channel:hover .cc-channel-arrow{color:var(--cc-text);transform:translateX(2px)}.cc-ch-telegram{color:#26a5e4}.cc-ch-slack{color:#e01e5a}.cc-ch-discord{color:#5865f2}.cc-ch-whatsapp{color:#25d366}.cc-ch-webhook{color:var(--cc-accent)}.cc-ch-all{color:var(--cc-text-3)}html.dark .cc-ch-discord{color:#8991ff}#sidebar #navigation-items a,#sidebar #navigation-items button{font-size:.8125rem!important;line-height:1.35rem;padding-top:.3rem!important;padding-bottom:.3rem!important}#sidebar #navigation-items svg{width:.95rem;height:.95rem}.cc-nav-back{font-size:.8125rem}#table-of-contents,#table-of-contents a,#table-of-contents li{font-size:.8125rem!important;line-height:1.3rem}#table-of-contents a{padding-top:.2rem;padding-bottom:.2rem}#content-container:has([data-chatcli-banner]){max-width:min(100%,1440px)!important}#content-container:has([data-chatcli-banner]) #content-area{max-width:none!important}#navigation-items li[data-title]:not([id])>button>div:not(:has(svg)){flex:1 1 auto;min-width:0;text-align:left}body::after{content:\"\";position:absolute;top:0;right:0;z-index:0;width:min(78vw,1100px);height:440px;pointer-events:none;background:linear-gradient(225deg,#2dd4bf 0,#22d3ee 40%,#60a5fa 75%,transparent 100%);-webkit-mask:url(/images/hero-halftone.svg) right top/100% 100% no-repeat;mask:url(/images/hero-halftone.svg) right top/100% 100% no-repeat;opacity:.6}html:not(.dark) body::after{background:linear-gradient(225deg,#0d9488 0,#0891b2 40%,#2563eb 75%,transparent 100%);opacity:.38}@media (max-width:760px){body::after{width:100vw;height:280px;opacity:.4}html:not(.dark) body::after{opacity:.26}}#navigation-items li[data-title]:not([id])>button{position:relative}#navigation-items li[data-title]:not([id])>button>:last-child svg,#navigation-items li[data-title]:not([id])>button>svg:last-child{visibility:hidden}#navigation-items li[data-title]:not([id])>button::after{content:\"\";position:absolute;top:50%;right:.7rem;width:12px;height:12px;margin-top:-6px;background:currentColor;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m6 3.5 4.5 4.5L6 12.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center/contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m6 3.5 4.5 4.5L6 12.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\") center/contain no-repeat;opacity:.42;pointer-events:none;transition:rotate 200ms cubic-bezier(.23,1,.32,1),opacity 160ms ease}#navigation-items li[data-title]:not([id])>button[aria-expanded=true]::after{rotate:90deg}#navigation-items li[data-title]:not([id])>button:hover::after{opacity:.75}@media (prefers-reduced-motion:reduce){#navigation-items li[data-title]:not([id])>button::after{transition:none}}"}],"page":{"pagePath":"context/bootstrap-memory","slug":"/context/bootstrap-memory","pageMetadata":{"title":"Bootstrap and Persistent Memory","sidebarTitle":"Bootstrap and Memory","description":"Customize the agent's identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.","icon":"memory","href":"/context/bootstrap-memory"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Customize the agent’s identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,Heading,Info,Note,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`ChatCLI offers two complementary systems for customizing and contextualizing the agent: `,_jsx(_components.strong,{children:`bootstrap files`}),` to define personality and rules, and `,_jsx(_components.strong,{children:`persistent memory`}),` to maintain context across sessions.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The bootstrap and memory system is `,_jsx(_components.strong,{children:`fully connected`}),` to the system prompt flow. Files are automatically loaded and injected into all interactions — in chat mode as well as in `,_jsx(_components.code,{children:`/agent`}),` and `,_jsx(_components.code,{children:`/coder`}),` modes.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`How well this memory works is measured on a public benchmark: `,_jsx(_components.a,{href:`/context/longmemeval`,children:`chatcli on LongMemEval`}),`, 90.8% over 500 questions about past conversations.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`bootstrap-files`,children:`Bootstrap Files`}),`\n`,_jsx(_components.p,{children:`Bootstrap files are Markdown documents automatically loaded into the agent’s system prompt. They define who the assistant is, how it behaves, and which rules it should follow.`}),`\n`,_jsx(Heading,{level:`3`,id:`supported-files`,children:`Supported Files`}),`\n`,_jsxs(_components.p,{children:[`ChatCLI loads `,_jsx(_components.strong,{children:`exactly 5 bootstrap files`}),`, in this order. All are optional — if they don’t exist, they are simply skipped:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`File`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Purpose`}),_jsx(_components.th,{style:{textAlign:`left`},children:`When to use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`AGENTS.md`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Sub-agent definitions and their roles`}),_jsx(_components.td,{style:{textAlign:`left`},children:`When you want to instruct the orchestrator about available agents and how to use them`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`SOUL.md`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Assistant personality, tone and style`}),_jsx(_components.td,{style:{textAlign:`left`},children:`To define “who” the assistant is — how it speaks, thinks and behaves`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`USER.md`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`User preferences and project context`}),_jsx(_components.td,{style:{textAlign:`left`},children:`To inform the stack, conventions, preferred tools and project context`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`IDENTITY.md`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Agent identity and capabilities`}),_jsx(_components.td,{style:{textAlign:`left`},children:`To define “what” the assistant is — name, capabilities, limitations`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`RULES.md`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`Explicit rules and restrictions`}),_jsx(_components.td,{style:{textAlign:`left`},children:`For strict guardrails — what it MUST and MUST NOT do`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`File names are `,_jsx(_components.strong,{children:`exact and case-sensitive`}),`. ChatCLI looks for `,_jsx(_components.code,{children:`AGENTS.md`}),`, `,_jsx(_components.code,{children:`SOUL.md`}),`, `,_jsx(_components.code,{children:`USER.md`}),`, `,_jsx(_components.code,{children:`IDENTITY.md`}),` and `,_jsx(_components.code,{children:`RULES.md`}),`. A directory without `,_jsx(_components.code,{children:`AGENTS.md`}),` may carry `,_jsx(_components.code,{children:`CHATCLI.md`}),` or `,_jsx(_components.code,{children:`CLAUDE.md`}),` in its place (that order); any other name (`,_jsx(_components.code,{children:`README.md`}),`, …) is `,_jsx(_components.strong,{children:`not loaded`}),` by the bootstrap system.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`instruction-hierarchy-and-imports`,children:`Instruction hierarchy and imports`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AGENTS.md`}),` is not a single file: ChatCLI reads one from `,_jsx(_components.strong,{children:`every directory between the project root and the working directory`}),`, root first, so a package-level file refines the repository-level one (the same layout Codex and Claude Code use). Nested files are prefixed with a `,_jsx(_components.code,{children:`\u003c!-- path -->`}),` comment so the model knows where each block came from; the assembled text is capped at `,_jsx(_components.strong,{children:`32 KiB`}),` (truncated at a line boundary with a visible note). The global `,_jsx(_components.code,{children:`~/.chatcli/AGENTS.md`}),` is `,_jsx(_components.strong,{children:`always merged first`}),` (Claude Code semantics; it used to be a fallback only). `,_jsx(_components.code,{children:`AGENTS.local.md`}),` / `,_jsx(_components.code,{children:`CLAUDE.local.md`}),` / `,_jsx(_components.code,{children:`CHATCLI.local.md`}),` append per-machine, gitignored additions after their shared file; `,_jsx(_components.code,{children:`AGENTS.override.md`}),` replaces a directory’s `,_jsx(_components.code,{children:`AGENTS.md`}),` outright (the Codex convention); `,_jsx(_components.code,{children:`.claude/rules`}),` is read below `,_jsx(_components.code,{children:`.chatcli/rules`}),` (a same-name rule in `,_jsx(_components.code,{children:`.chatcli/rules`}),` wins). `,_jsx(_components.code,{children:`@import`}),` targets are symlink-resolved and must live under the workspace or the global instruction directory — an out-of-tree import is logged and left as text — and each imported file is capped at 32 KiB on its own before the hierarchy cap, so a cloned repository’s instruction file cannot pull arbitrary files from your disk into the prompt. A watched context watches at most 2,000 directories, skips directory names matched by the root’s `,_jsx(_components.code,{children:`.gitignore`}),`, and warns when the watch is partial.`]}),`\n`,_jsx(_components.p,{children:`Any bootstrap file can pull another in with an import line of its own:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@docs/conventions.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@import ../shared/security-rules.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@~/.chatcli/snippets/review-checklist.md`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Paths resolve relative to the importing file (absolute and `,_jsx(_components.code,{children:`~`}),` paths work too), up to `,_jsx(_components.strong,{children:`4 hops`}),` deep and never the same file twice; a missing target leaves the line as written, and lines inside code fences are ignored. Imported files take part in cache invalidation like the bootstrap files themselves.`]}),`\n`,_jsx(Heading,{level:`3`,id:`loading-priority`,children:`Loading Priority`}),`\n`,_jsx(_components.p,{children:`Files are searched at two levels, with the workspace taking priority:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Workspace (project root)`,children:_jsxs(_components.p,{children:[`Project-specific configurations. Takes `,_jsx(_components.strong,{children:`priority`}),` over global. The project root is detected automatically (see below).`]})}),_jsx(Step,{title:`Global (~/.chatcli/)`,children:_jsxs(_components.p,{children:[`User default configurations. Serves as a `,_jsx(_components.strong,{children:`fallback`}),` when the file does not exist in the workspace.`]})})]}),`\n`,_jsx(_components.p,{children:`If the same file exists at both levels, the workspace version prevails. Global files serve as fallback.`}),`\n`,_jsx(Heading,{level:`4`,id:`automatic-workspace-detection`,children:`Automatic Workspace Detection`}),`\n`,_jsxs(_components.p,{children:[`ChatCLI uses `,_jsx(_components.code,{children:`detectProjectDir()`}),` to find the real project root. Instead of simply using the current directory (CWD), it `,_jsx(_components.strong,{children:`walks up the directory tree`}),` looking for project markers:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Checks if the current directory contains `,_jsx(_components.code,{children:`.git/`}),` or `,_jsx(_components.code,{children:`.agent/`})]}),`\n`,_jsx(_components.li,{children:`If not found, moves to the parent directory and repeats`}),`\n`,_jsx(_components.li,{children:`Continues until a marker is found or it reaches the filesystem root`}),`\n`,_jsx(_components.li,{children:`If no marker is found, falls back to the CWD`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`This means you can run ChatCLI from `,_jsx(_components.strong,{children:`any subdirectory`}),` of your project and bootstrap files at the root will be found normally.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Recognized markers: `,_jsx(_components.code,{children:`.git`}),` (Git repository) and `,_jsx(_components.code,{children:`.agent`}),` (explicit ChatCLI marker). Only one needs to exist to define the workspace root.`]})}),`\n`,_jsx(Heading,{level:`4`,id:`example-scenarios`,children:`Example Scenarios`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`CWD at startup`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Marker found`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Detected workspace`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Files loaded`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/.git`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`~/project/SOUL.md`}),`, etc.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/src/pkg/`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/.git`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`~/project/SOUL.md`}),` (walks up 2 levels)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/src/pkg/`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`none`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/project/src/pkg/`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Global only (`,_jsx(_components.code,{children:`~/.chatcli/`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/monorepo/services/api/`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/monorepo/.git`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/monorepo/`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.code,{children:`~/monorepo/SOUL.md`}),`, etc.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/tmp/`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`none`}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`~/tmp/`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[`Global only (`,_jsx(_components.code,{children:`~/.chatcli/`}),`)`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`detailed-examples`,children:`Detailed Examples`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`SOUL.md`,id:`soul-md`,children:[_jsxs(_components.p,{children:[`Defines `,_jsx(_components.strong,{children:`personality and tone`}),`. Place at `,_jsx(_components.code,{children:`~/.chatcli/SOUL.md`}),` (global) or `,_jsx(_components.code,{children:`./SOUL.md`}),` (project):`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Personality`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`You are a technical assistant specialized in software engineering.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Be concise and direct. Prefer practical examples over theoretical explanations.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`When suggesting code, use best practices and tests.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Tone`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Professional but approachable`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Prefer short and objective responses`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Use bullet points for lists`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Default language: English`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`USER.md`,id:`user-md`,children:[_jsxs(_components.p,{children:[`Defines `,_jsx(_components.strong,{children:`user and project context`}),`. Ideal for `,_jsx(_components.code,{children:`./USER.md`}),` in the project directory:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Project Context`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Stack: Go 1.25, gRPC, Kubernetes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Database: PostgreSQL 16`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` CI/CD: GitHub Actions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Style: conventional commits, trunk-based development`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Preferences`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Always use tables for comparisons`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Prefer simple solutions without over-engineering`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Tests with idiomatic Go table-driven tests`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`IDENTITY.md`,id:`identity-md`,children:[_jsxs(_components.p,{children:[`Defines `,_jsx(_components.strong,{children:`what the assistant is`}),`. Usually global at `,_jsx(_components.code,{children:`~/.chatcli/IDENTITY.md`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Identity`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`You are ChatCLI, an intelligent terminal assistant.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Capabilities`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Code reading and editing via @coder plugin`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Shell command execution with user approval`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Log analysis and error diagnosis`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Git operations (status, diff, log, commit)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## Limitations`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` You do NOT have internet access`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` You CANNOT install packages without approval`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Your patches may fail if context has changed`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`RULES.md`,id:`rules-md`,children:[_jsxs(_components.p,{children:[`Defines `,_jsx(_components.strong,{children:`strict rules and guardrails`}),`. Can be global or per-project:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Mandatory Rules`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`1.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NEVER execute `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:\"`rm -rf`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` without explicit confirmation`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`2.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NEVER commit directly to the main branch`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`3.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ALWAYS run tests after modifying code`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`4.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ALWAYS use conventional commits (feat:, fix:, chore:)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Security Restrictions`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Do not expose secrets, tokens or API keys in logs`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Do not modify files outside the project directory`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#6796E6`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Do not execute commands with sudo`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`AGENTS.md`,id:`agents-md`,children:[_jsxs(_components.p,{children:[`Defines `,_jsx(_components.strong,{children:`sub-agents and their roles`}),` for the orchestrator:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`# Custom Agents`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## @devops`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Infrastructure specialist for Docker, Kubernetes and CI/CD.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use for deployment, monitoring and pipeline configuration tasks.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## @dba`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`PostgreSQL database specialist.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use for queries, optimization, migrations and performance analysis.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#569CD6`,\"--shiki-dark-font-weight\":`bold`},children:`## @security`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Security auditor focused on OWASP Top 10.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Use for code review with focus on vulnerabilities.`})}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`where-to-place-files`,children:`Where to Place Files`}),`\n`,_jsxs(_components.p,{children:[`“Project root” means the directory containing `,_jsx(_components.code,{children:`.git/`}),` or `,_jsx(_components.code,{children:`.agent/`}),` — automatically detected by `,_jsx(_components.code,{children:`detectProjectDir()`}),`, not necessarily the CWD.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# GLOBAL configuration (applies to all projects)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`~/.chatcli/SOUL.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`~/.chatcli/IDENTITY.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`~/.chatcli/RULES.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`~/.chatcli/USER.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`~/.chatcli/AGENTS.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Per-PROJECT configuration (overrides global)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# \"Project root\" = directory with .git/ or .agent/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/SOUL.md # In project root`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/USER.md # In project root`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/RULES.md # In project root (project rules)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/IDENTITY.md # In project root (rare)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/AGENTS.md # In project root (project agents)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/services/AGENTS.md # Nested: read when the cwd is under services/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003cproject-root>/services/CLAUDE.md # Fallback name for the same role (CHATCLI.md first)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`CHATCLI_BOOTSTRAP_DIR`}),` only overrides the `,_jsx(_components.strong,{children:`global`}),` directory (`,_jsx(_components.code,{children:`~/.chatcli/`}),`), not the workspace detection. Project-level files (detected via `,_jsx(_components.code,{children:`.git`}),` or `,_jsx(_components.code,{children:`.agent`}),`) still take priority over global ones, regardless of `,_jsx(_components.code,{children:`CHATCLI_BOOTSTRAP_DIR`}),`.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Recommended strategy: `,_jsx(_components.code,{children:`SOUL.md`}),` and `,_jsx(_components.code,{children:`IDENTITY.md`}),` global (they’re about the assistant), `,_jsx(_components.code,{children:`USER.md`}),` and `,_jsx(_components.code,{children:`RULES.md`}),` per-project (they’re about the work context).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`smart-cache`,children:`Smart Cache`}),`\n`,_jsx(_components.p,{children:`Bootstrap files use mtime-based (modification time) caching:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`On the first read, the content is cached in memory`}),`\n`,_jsx(_components.li,{children:`Subsequent reads check if the mtime has changed`}),`\n`,_jsx(_components.li,{children:`If the file was modified, the cache is automatically invalidated`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`IsStale()`}),` checks if any file has changed since the last load`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`persistent-memory`,children:`Persistent Memory`}),`\n`,_jsxs(_components.p,{children:[`The memory system maintains context across ChatCLI sessions using `,_jsx(_components.strong,{children:`structured storage`}),` with multiple components that learn about you and your work over time.`]}),`\n`,_jsx(Heading,{level:`3`,id:`system-architecture`,children:`System Architecture`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Conversation -> memoryWorker (3min) -> LLM extraction -> ProcessExtraction()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` |`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` +───────────+───────────+─────────────────+────────────+`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` v v v v v`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` FactIndex Profile TopicTracker ProjectTracker DailyNote`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` (scored) (JSON) (JSON) (JSON) (.md)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` |`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` v`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` Compactor (6h check, 24h cycle)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` |-- Level 1: Score-based pruning + archive`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` +-- Level 2: LLM consolidation`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` |`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` v`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` MEMORY.md (regenerated, never source of truth)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`resilient-extraction-—-nothing-is-lost-silently`,children:`Resilient extraction — nothing is lost silently`}),`\n`,_jsxs(_components.p,{children:[`Extraction depends on a background LLM call — and a provider outage `,_jsx(_components.strong,{children:`must not cost the conversation its memory`}),`. Three layered defenses:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fallback chain`}),`: extraction tries the session’s active client and, on failure, walks `,_jsx(_components.code,{children:`CHATCLI_MEMORY_FALLBACK_PROVIDERS`}),` (or `,_jsx(_components.code,{children:`CHATCLI_FALLBACK_PROVIDERS`}),`), with a per-attempt timeout.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Durable on-disk queue`}),`: a segment that fails on `,_jsx(_components.strong,{children:`every`}),` provider is written to `,_jsx(_components.code,{children:`~/.chatcli/memory/pending/`}),` (atomic writes) and retried on later runs, oldest first — it `,_jsx(_components.strong,{children:`survives restarts`}),`. The worker drains the backlog `,_jsx(_components.strong,{children:`at boot and on every extraction tick`}),` (a `,_jsx(_components.code,{children:`-p`}),`-only user no longer fills the queue until the oldest segments are dropped), a segment that fails repeatedly is dropped after two attempts, the queue is capped (100 segments) and corrupt files are dropped without wedging the rest. On exit the unextracted tail of the session is queued for the next one, and shutdown waits up to 5 s for an in-flight extraction to finish its write (a hung provider call never holds the exit).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A visible notice`}),`: two consecutive failures print a one-liner in the terminal (`,_jsx(_components.code,{children:`memory: extraction failing…`}),`) — days of silent fact loss can no longer happen.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The gateway consults this memory too: the daemon’s persona calls `,_jsx(_components.code,{children:`@memory recall`}),` before answering “I don’t know” to personal questions. See `,_jsx(_components.a,{href:`/gateway/chat-gateway`,children:`Chat Gateway`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`storage-structure`,children:`Storage Structure`}),`\n`,_jsxs(_components.p,{children:[`All memory lives in `,_jsx(_components.code,{children:`~/.chatcli/memory/`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`20`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`~/.chatcli/memory/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- MEMORY.md # Human-readable summary (regenerated from FactIndex)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- memory_index.json # Facts with relevance scores`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- user_profile.json # User profile (name, role, expertise)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- topics.json # Recurring topics with frequency`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- projects.json # Active projects with context`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- episodes.json # Episodic timeline (dated work entries)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- graph.json # Persisted knowledge-graph cache (see below)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- usage_stats.json # Usage patterns and statistics`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- memory_archive.json # Archived facts (low score)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- weekly/ # Weekly digests (consolidated from daily notes)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`| +-- 2026-W27.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- monthly/ # Monthly digests (kept forever)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`| +-- 2026-06.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`|-- 202603/ # Daily notes for March 2026`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`| |-- 20260301.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`| +-- 20260306.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`+-- 202602/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` +-- 20260228.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`components`,children:`Components`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`FactIndex -- Long-Term Memory`,icon:`database`,id:`factindex-long-term-memory`,children:[_jsx(_components.p,{children:`Replaces the old append-only MEMORY.md. Each fact has:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unique ID`}),` via SHA-256 content hash (automatic deduplication)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Category`}),`: architecture, pattern, preference, gotcha, project, personal`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Temporal score`}),`: `,_jsx(_components.code,{children:`(1 + log(accessCount)) * exp(-days * ln2 / halfLife)`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Tags`}),` for keyword search`]}),`\n`]}),_jsx(_components.p,{children:`Frequently accessed and recent facts get higher scores. Old, never-accessed facts naturally decay.`})]}),_jsxs(Accordion,{title:`UserProfile -- User Profile`,icon:`user`,id:`userprofile-user-profile`,children:[_jsx(_components.p,{children:`Automatically detected by the AI during extraction and editable by you/the model in any mode:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Name, role, expertise level, company, location`}),`\n`,_jsx(_components.li,{children:`Preferred language and communication style`}),`\n`,_jsxs(_components.li,{children:[`Lists with lifecycle: `,_jsx(_components.strong,{children:`certifications, skills, goals, interests and directives`}),` (restating an item `,_jsx(_components.strong,{children:`supersedes`}),` the old one instead of duplicating; `,_jsx(_components.code,{children:`_replace`}),`/`,_jsx(_components.code,{children:`_done`}),`/`,_jsx(_components.code,{children:`_remove`}),` suffixes rewrite)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Directives`}),` with severity (hard rules vs preferences) and `,_jsx(_components.strong,{children:`per-project scope`}),` (`,_jsx(_components.code,{children:`[scope:\u003cproject>] rule`}),` is only injected when that workspace is active)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Stances`}),` — technical positions recorded `,_jsx(_components.strong,{children:`with the why`}),` (`,_jsx(_components.code,{children:`\"position :: reason\"`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Milestones`}),` — dated timeline of what happened`]}),`\n`,_jsxs(_components.li,{children:[`Structured `,_jsx(_components.strong,{children:`Environment`}),` (`,_jsx(_components.code,{children:`env_os`}),`, `,_jsx(_components.code,{children:`env_shell`}),`, …) — auto-migrated from legacy preferences`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Per-field provenance and freshness`}),`: each attribute knows whether it came from you or from extraction and when it was last confirmed; fields unconfirmed for 120+ days are flagged as possibly stale in the prompt`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Privacy tier`}),`: finance/health/family/document keys are auto-tagged `,_jsx(_components.code,{children:`[sensitive]`}),` — they personalize answers but never enter code, examples or generated artifacts (`,_jsx(_components.code,{children:`sensitive_mark`}),`/`,_jsx(_components.code,{children:`sensitive_unmark`}),` for manual control)`]}),`\n`,_jsx(_components.li,{children:`Most used commands (top 10) and general preferences`}),`\n`]}),_jsxs(_components.p,{children:[`View your profile with `,_jsx(_components.code,{children:`/memory profile`}),`. Old profiles polluted by append-only versions `,_jsx(_components.strong,{children:`self-heal on the next load`}),` (fragments, progress duplicates and completed goals leave on their own).`]})]}),_jsxs(Accordion,{title:`TopicTracker -- Recurring Topics`,icon:`tags`,id:`topictracker-recurring-topics`,children:[_jsx(_components.p,{children:`Tracks technical topics discussed:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Mention frequency`}),`\n`,_jsx(_components.li,{children:`Recency (recent topics weigh more)`}),`\n`,_jsx(_components.li,{children:`Links to related facts`}),`\n`]}),_jsxs(_components.p,{children:[`View with `,_jsx(_components.code,{children:`/memory topics`}),`.`]})]}),_jsxs(Accordion,{title:`ProjectTracker -- Projects`,icon:`folder-open`,id:`projecttracker-projects`,children:[_jsx(_components.p,{children:`Tracks projects you work on:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Name, path, description`}),`\n`,_jsx(_components.li,{children:`Technologies used`}),`\n`,_jsx(_components.li,{children:`Status (active, paused, completed)`}),`\n`,_jsx(_components.li,{children:`Last activity`}),`\n`]}),_jsxs(_components.p,{children:[`View with `,_jsx(_components.code,{children:`/memory projects`}),`.`]})]}),_jsxs(Accordion,{title:`PatternDetector -- Usage Patterns`,icon:`chart-line`,id:`patterndetector-usage-patterns`,children:[_jsx(_components.p,{children:`Analyzes how you use ChatCLI:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Total sessions and average duration`}),`\n`,_jsx(_components.li,{children:`Peak activity hours`}),`\n`,_jsx(_components.li,{children:`Preferred features (chat, agent, coder)`}),`\n`,_jsx(_components.li,{children:`Common errors and resolutions`}),`\n`]}),_jsxs(_components.p,{children:[`View with `,_jsx(_components.code,{children:`/memory stats`}),`.`]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`smart-retrieval`,children:`Smart Retrieval`}),`\n`,_jsxs(_components.p,{children:[`Instead of dumping all memory into the system prompt, ChatCLI uses `,_jsx(_components.strong,{children:`intelligent retrieval`}),`:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Extracts keywords from the last few conversation messages`}),`\n`,_jsx(_components.li,{children:`Searches relevant facts in FactIndex by keyword match + temporal score`}),`\n`,_jsx(_components.li,{children:`Respects a configurable budget (default: 4000 characters)`}),`\n`,_jsxs(_components.li,{children:[`Prioritizes: Profile > Projects > Topics > Relevant facts > Recent notes > Episodes > `,_jsx(_components.strong,{children:`Related (graph)`}),` > Trajectory (digests) > Usage patterns`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`## Related (graph)`})}),` section is the knowledge graph participating in recall: the top-ranked facts are expanded one hop through the graph, surfacing structurally adjacent memories (a neighboring fact, the episode from the day it was learned, a connected topic or session) that keyword and vector ranking missed. It is purely additive — it never displaces a ranked fact, only spends leftover budget — and it appears both in `,_jsx(_components.code,{children:`full`}),`-mode injection and in every `,_jsx(_components.code,{children:`@memory recall`}),` pull.`]}),`\n`,_jsx(Info,{children:_jsx(_components.p,{children:`Facts accessed by the retriever automatically get their scores bumped, creating a virtuous cycle: the more useful a fact is, the more it appears.`})}),`\n`,_jsx(Heading,{level:`3`,id:`injection-mode-push-vs-pull`,children:`Injection mode: push vs pull`}),`\n`,_jsxs(_components.p,{children:[`How memory reaches the model — in `,_jsx(_components.strong,{children:`every mode`}),`: chat, `,_jsx(_components.code,{children:`/agent`}),` and `,_jsx(_components.code,{children:`/coder`}),` — is controlled by `,_jsx(_components.code,{children:`CHATCLI_MEMORY_MODE`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`index`}),` (`,_jsx(_components.strong,{children:`default`}),`)`]}),_jsxs(_components.td,{children:[`Injects only a `,_jsx(_components.strong,{children:`compact, stable index`}),` (profile summary + top topic/project names + fact tally by category + episode count) and lets the model pull detail on demand via the memory recall tool. Bounded, cacheable per-turn cost.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`full`})}),_jsx(_components.td,{children:`Injects the full Smart Retrieval (above) every turn — the classic “push” behavior.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`off`})}),_jsx(_components.td,{children:`Injects no memory; bootstrap files still apply.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Persistent-memory bootstrap card`}),` — every surface’s system prompt opens with a `,_jsx(_components.code,{children:`[PERSISTENT MEMORY — REAL, CROSS-SESSION]`}),` card: a session-start snapshot of live counts (long-term facts, dated episodes, saved conversations with the latest one named, in-flight work-board cards) plus an explicit anti-amnesia directive — `,_jsx(_components.em,{children:`never claim you have no memory of past sessions; pull first`}),` (`,_jsx(_components.code,{children:`@memory recall`}),`, `,_jsx(_components.code,{children:`@session search`}),`, `,_jsx(_components.code,{children:`@board list`}),`; in chat, the card points the user at `,_jsx(_components.code,{children:`/session attach`}),` instead of tools chat does not have). In agent and coder modes it also teaches dates: compute “how long ago” from the save date and age each `,_jsx(_components.code,{children:`@session search`}),` hit shows, narrow with `,_jsx(_components.code,{children:`from`}),`/`,_jsx(_components.code,{children:`to`}),` or move the counting date for one call with `,_jsx(_components.code,{children:`as_of`}),` (`,_jsx(_components.a,{href:`/context/session-search#dates-from-to-and-as_of`,children:`Dates`}),`), and answer a current value, count or state from the `,_jsx(_components.strong,{children:`most recent`}),` dated mention rather than the first session found. The card is frozen per session so it lives in the `,_jsx(_components.strong,{children:`cached`}),` prefix. Proactive recall also fires from the `,_jsx(_components.strong,{children:`very first turn`}),` of a fresh session: the current message feeds the ranking hints, purely referential questions (“what did we talk about earlier?”) list the most `,_jsx(_components.strong,{children:`recent`}),` sessions instead of lexically strong old ones, and the ambient recall window covers the 60 most recently saved sessions.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Proactive auto-recall`}),` closes the pull model’s gap: models sometimes skip the recall call even when a stored gotcha is exactly what they need. In `,_jsx(_components.code,{children:`index`}),` mode, each turn also ranks the fact index against keywords from the recent messages and rides the `,_jsx(_components.strong,{children:`top 3 matches`}),` into the prompt as a tiny `,_jsx(_components.code,{children:`[MEMORY AUTO-RECALL]`}),` block (700-byte cap; labeled as data, not instructions, each fact on one line — an external provider’s answer rides under its own `,_jsx(_components.code,{children:`[EXTERNAL MEMORY]`}),` fence), followed by a one-line `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`Related (graph):`})}),` pointer naming what sits next to those facts in the `,_jsx(_components.a,{href:`#knowledge-graph-memory-neighbors--map`,children:`knowledge graph`}),` — so the model knows there is more to pull before it claims ignorance. The block lives in the `,_jsx(_components.em,{children:`uncached`}),` trailing region next to the wall-clock context, so the stable digest stays byte-identical and prompt caching is unaffected. Gated by `,_jsx(_components.code,{children:`CHATCLI_MEMORY_AUTORECALL`}),` (`,_jsx(_components.strong,{children:`on`}),` by default).`]}),`\n`,_jsxs(_components.p,{children:[`Two quality rules govern what the block may carry. `,_jsx(_components.strong,{children:`Relevance floor:`}),` a fact found by keywords alone must match roughly a third of the turn’s hints (`,_jsx(_components.code,{children:`computeRelevance ≥ 0.34`}),`), and a fact found by the vector index must clear the cosine floor (`,_jsx(_components.code,{children:`min_cosine_score`}),`, 0.25) — one incidental token can no longer inject an unrelated fact into every turn. `,_jsx(_components.strong,{children:`Vectors when available:`}),` with an embedding provider configured (`,_jsx(_components.code,{children:`CHATCLI_EMBED_PROVIDER`}),`), the block ranks with the same blended semantic + lexical + temporal ranker the recall tool uses, embedding the turn’s message once (skipped for messages under 8 characters), so a paraphrase with zero keyword overlap can surface; keyless setups keep the lexical ranker. `,_jsx(_components.strong,{children:`No reinforcement on push:`}),` facts injected proactively are no longer marked accessed — reinforcing a fact merely for being pushed was self-entrenching (a spuriously surfaced fact climbed its own ranking). Access is reinforced when the model actually pulls detail through the memory tool.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Reinforcement waits for evidence.`}),` The facts a turn injected are remembered, and after the reply only those the answer evidently drew on — enough of the fact’s own significant terms appear in the reply (two, or a third of them for long facts) — get their access counter bumped. A fact the model ignored keeps its score; nothing is demoted. `,_jsx(_components.strong,{children:`Episodes ride along:`}),` when the turn’s message is long enough, up to two timeline episodes ranked by BM25 over the episodic store (summary, outcome, project, refs) are appended as dated bullets, so “what did we do about the invoice migration” surfaces the work unit, not just the facts around it. The same BM25 ranking now powers `,_jsx(_components.code,{children:`@memory timeline`}),` queries inside a date window.`]}),`\n`,_jsxs(_components.p,{children:[`The pull mode (`,_jsx(_components.code,{children:`index`}),`) shrinks the per-turn memory block by ~88% on a 500-fact store without losing access to detail — see `,_jsx(_components.a,{href:`/context/token-efficiency`,children:`Token Efficiency › Pull-first memory`}),` for the full measurement. `,_jsxs(_components.strong,{children:[`Chat honors `,_jsx(_components.code,{children:`index`}),` too`]}),`: the sanctioned chat memory tool exception (`,_jsx(_components.code,{children:`CHATCLI_CHAT_MEMORY`}),`, on by default) gives chat the same pull path, so it receives the compact digest plus a recall hint instead of the full retrieval. Only when that exception is disabled does chat fall back to `,_jsx(_components.code,{children:`full`}),` — chat without a pull path must never be starved of memory. Chat also receives the proactive `,_jsx(_components.code,{children:`[MEMORY AUTO-RECALL]`}),` and `,_jsx(_components.code,{children:`[SESSION RECALL]`}),` blocks and the knowledge-graph card, previously agent/coder-only (the session-recall wording in chat suggests `,_jsx(_components.code,{children:`/session attach`}),`, since chat has no session tool). The recall tool uses HyDE + vector search, so pulled detail matches push quality. Check the active mode with `,_jsx(_components.code,{children:`/config memory`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`memory-configuration`,children:`Memory Configuration`}),`\n`,_jsx(_components.p,{children:`The memory system has tunable parameters via environment variables:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_MODE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`index`})}),_jsxs(_components.td,{children:[`Injection mode in every mode (chat, agent, coder): `,_jsx(_components.code,{children:`index`}),` (pull), `,_jsx(_components.code,{children:`full`}),` (push) or `,_jsx(_components.code,{children:`off`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_AUTORECALL`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsxs(_components.td,{children:[`Proactive top-3 fact injection + `,_jsx(_components.code,{children:`Related (graph):`}),` line in `,_jsx(_components.code,{children:`index`}),` mode (see above)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_GRAPH`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsxs(_components.td,{children:[`Persisted knowledge-graph cache (`,_jsx(_components.code,{children:`graph.json`}),`) + recall neighborhood expansion; `,_jsx(_components.code,{children:`off`}),` restores derive-per-call with no expansion`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_GRAPH_INDEX`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsxs(_components.td,{children:[`Per-turn injection of the graph map-of-content card (`,_jsx(_components.code,{children:`@memory map`}),`/`,_jsx(_components.code,{children:`neighbors`}),` pull is always available regardless)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_CHAT_MEMORY`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsxs(_components.td,{children:[`Chat memory tool exception — the pull path that lets chat honor `,_jsx(_components.code,{children:`index`}),` mode`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_MAX_SIZE`})}),_jsxs(_components.td,{\"data-numeric\":`true`,children:[_jsx(_components.code,{children:`32768`}),` (32KB)`]}),_jsx(_components.td,{children:`Max size of rendered MEMORY.md`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_RETENTION_DAYS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`30`})}),_jsx(_components.td,{children:`Daily note retention before cleanup`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_MAX_FACTS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:`Max facts in the FactIndex`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_RETRIEVAL_BUDGET`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4000`})}),_jsxs(_components.td,{children:[`Max chars of memory injected in system prompt (`,_jsx(_components.code,{children:`full`}),` mode)`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`In addition to environment variables, the internal `,_jsx(_components.code,{children:`Config`}),` struct defines additional defaults:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default Value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CompactionInterval`})}),_jsx(_components.td,{children:`24 hours`}),_jsx(_components.td,{children:`Minimum interval between full compactions`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DecayHalfLifeDays`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`30.0`}),_jsx(_components.td,{children:`Temporal decay half-life for fact scores`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Check interval`}),_jsx(_components.td,{children:`6 hours`}),_jsx(_components.td,{children:`How often the system checks if compaction is needed`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`how-memories-are-created`,children:`How Memories Are Created`}),`\n`,_jsxs(_components.p,{children:[`The background worker now extracts `,_jsx(_components.strong,{children:`6 types of information`}),` (previously only 2):`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`DAILY`}),` — What was done (files, commands, errors, tasks)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`LONGTERM`}),` — New facts to remember permanently`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PROFILE_UPDATE`}),` — Information about the user (name, role, expertise)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TOPICS`}),` — Technical topics discussed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PROJECTS`}),` — Projects worked on`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`EPISODES`}),` — Dated, durable units of completed work (see `,_jsx(_components.a,{href:`#episodic-memory-the-work-timeline`,children:`Episodic memory`}),`)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The worker fires after 4+ new messages with a 2-minute cooldown, and also every 3 minutes during long sessions.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What a call costs, and what it is worth.`}),` The extraction request is shaped for the prompt cache: the instructions are one cached system block, the workspace line and the existing long-term memory another, and only the new conversation segment travels as the user message. On a provider with a prefix cache the three-minute cadence reads the first two back from a warm entry and pays the write for the segment alone; nothing is sent twice. The worker runs on the session model unless `,_jsx(_components.code,{children:`CHATCLI_COMPACT_MODEL`}),` names a cheaper one, which serves the worker as well as compaction — a fast model there is the single largest lever on background spend. `,_jsx(_components.code,{children:`/cost`}),` shows the balance under the worker’s line: facts and episodes written, cost per item, and how many proactive recalls put stored facts back in front of the model. A worker that writes memory the session never reads is what that line exposes.`]}),`\n`,_jsx(Heading,{level:`4`,id:`extraction-process`,children:`Extraction Process`}),`\n`,_jsx(_components.p,{children:`The Memory Worker follows this internal flow:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`EnhancedExtractionPrompt`}),`: Sends the recent conversation history to the LLM with a structured prompt requesting information extraction`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Expected output`}),`: The LLM returns text with well-defined section headers:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`## DAILY`}),` — Summary of what was done in the session`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`## LONGTERM`}),` — New facts for long-term memory`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`## PROFILE_UPDATE`}),` — User profile updates`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`## TOPICS`}),` — Technical topics identified`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`## PROJECTS`}),` — Projects mentioned or worked on`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ParseEnhancedResponse()`}),`: Parses the response and extracts each section individually`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Deduplication`}),`: Each fact receives a unique ID via SHA-256 content hash. Facts with a hash matching an existing one are automatically discarded`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Profile merging with lifecycle`}),`: `,_jsx(_components.code,{children:`PROFILE_UPDATE`}),` changes are merged with the existing profile. List fields `,_jsx(_components.strong,{children:`upsert`}),` (restating an item supersedes the old one instead of duplicating), and extraction may emit rewrite operations: `,_jsx(_components.code,{children:`goals_done=`}),`/`,_jsx(_components.code,{children:`goals_remove=`}),` remove finished goals (moving them to `,_jsx(_components.code,{children:`milestone=`}),`/`,_jsx(_components.code,{children:`certifications=`}),`), `,_jsx(_components.code,{children:`goals_replace=`}),` replaces the whole list — the same suffixes work for certifications, skills, interests and directives. Your instructions about the profile (“remove X from my goals”) are `,_jsx(_components.strong,{children:`applied`}),`, never recorded as if they were facts`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`automatic-compaction`,children:`Automatic Compaction`}),`\n`,_jsx(_components.p,{children:`The system runs periodic compaction to prevent uncontrolled growth:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Check (every 6 hours)`,children:_jsx(_components.p,{children:`Checks if the fact count exceeds 80% of the limit or if 24h have passed since the last compaction.`})}),_jsx(Step,{title:`LLM Compaction (preferred)`,children:_jsx(_components.p,{children:`Sends all facts to the AI with instructions to: merge duplicates, remove obsolete, consolidate related. Preserves original metadata.`})}),_jsx(Step,{title:`Score-based Fallback`,children:_jsxs(_components.p,{children:[`If the LLM call fails, archives facts with scores below 0.1 to `,_jsx(_components.code,{children:`memory_archive.json`}),`.`]})}),_jsx(Step,{title:`Daily Note Cleanup`,children:_jsx(_components.p,{children:`Removes notes older than the retention period (default: 30 days). Empty directories are cleaned up.`})}),_jsx(Step,{title:`MEMORY.md Regeneration`,children:_jsx(_components.p,{children:`Rewrites MEMORY.md from the FactIndex — always up-to-date, never the source of truth.`})})]}),`\n`,_jsx(Heading,{level:`3`,id:`weekly-and-monthly-digests-trajectory`,children:`Weekly and Monthly Digests (Trajectory)`}),`\n`,_jsxs(_components.p,{children:[`Daily notes expire after ~30 days — `,_jsx(_components.strong,{children:`rollups`}),` preserve the long-range narrative before that:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`When an ISO week ends, that week’s daily notes consolidate into `,_jsx(_components.code,{children:`weekly/2026-W27.md`}),` (LLM summary with a deterministic fallback — never depends on the provider being up).`]}),`\n`,_jsxs(_components.li,{children:[`When a month ends, its weekly digests consolidate into `,_jsx(_components.code,{children:`monthly/2026-06.md`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Retention: weeklies keep ~26 weeks; `,_jsx(_components.strong,{children:`monthlies are kept forever`}),` (minimal cost).`]}),`\n`,_jsxs(_components.li,{children:[`A bounded `,_jsx(_components.strong,{children:`Trajectory`}),` section enters the memory context with the latest monthly + recent weeklies — that is how “what you have been doing these past months” survives daily-note cleanup.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The process is idempotent and runs on its own in the memory worker (startup check plus every 12h).`}),`\n`,_jsx(Heading,{level:`3`,id:`automatic-migration`,children:`Automatic Migration`}),`\n`,_jsxs(_components.p,{children:[`When starting for the first time with the new system, ChatCLI detects if a legacy `,_jsx(_components.code,{children:`MEMORY.md`}),` exists (without `,_jsx(_components.code,{children:`memory_index.json`}),`) and migrates automatically:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Each line/bullet is converted to an individual fact`}),`\n`,_jsx(_components.li,{children:`Categories are detected from markdown headers`}),`\n`,_jsx(_components.li,{children:`Tags are extracted by technical keywords`}),`\n`,_jsxs(_components.li,{children:[`The original file is saved as `,_jsx(_components.code,{children:`MEMORY.md.bak`})]}),`\n`]}),`\n`,_jsxs(Heading,{level:`3`,id:`/memory-command`,children:[_jsx(_components.code,{children:`/memory`}),` Command`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Subcommand`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`/memory`}),` or `,_jsx(_components.code,{children:`/memory today`})]}),_jsx(_components.td,{children:`Show today’s notes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory yesterday`})}),_jsx(_components.td,{children:`Show yesterday’s notes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory 2026-03-04`})}),_jsx(_components.td,{children:`Show notes from a specific date`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory week`})}),_jsx(_components.td,{children:`Show notes from the last 7 days`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory longterm`})}),_jsx(_components.td,{children:`Show MEMORY.md content`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory list`})}),_jsx(_components.td,{children:`List all memory files (includes structured JSONs)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory load \u003cdate>`})}),_jsx(_components.td,{children:`Load a day’s notes into conversation context`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory profile`})}),_jsx(_components.td,{children:`Show detected user profile`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory profile set \u003cfield>=\u003cvalue>`})}),_jsx(_components.td,{children:`Set/update a profile field manually`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory remember \u003cfact>`})}),_jsxs(_components.td,{children:[`Explicitly add a long-term fact (accepts a `,_jsx(_components.code,{children:`[category]`}),` prefix)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory forget \u003csubstring>`})}),_jsx(_components.td,{children:`Remove long-term facts containing the substring`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory topics`})}),_jsx(_components.td,{children:`Show tracked topics with frequency`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory projects`})}),_jsx(_components.td,{children:`Show tracked projects with status`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory stats`})}),_jsx(_components.td,{children:`Full statistics (sessions, peak hours, errors, features)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory facts [category]`})}),_jsx(_components.td,{children:`List facts with scores (filter by category)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory timeline [q]`})}),_jsxs(_components.td,{children:[`Dated episode history; `,_jsx(_components.code,{children:`q`}),` filters by time (“3 meses atrás”, “abril”, “2026-04”) and/or content`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory compact`})}),_jsx(_components.td,{children:`Force immediate compaction (LLM + note cleanup)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory export [path]`})}),_jsxs(_components.td,{children:[`Write facts, episodes, topics, projects and profile as JSONL (default `,_jsx(_components.code,{children:`~/.chatcli/exports/memory-\u003cts>.jsonl`}),`, mode 0600; sealed line by line only with a key from `,_jsx(_components.code,{children:`CHATCLI_ENCRYPTION_KEY`}),`, so it can be imported elsewhere; with the default keychain key it is plaintext and the command says so)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory import \u003cpath>`})}),_jsx(_components.td,{children:`Merge an export into this machine’s memory: every fact is sanitized (one line, bounded, secrets masked) and its id re-derived from the content (known content keeps the stronger metadata; a chosen id cannot smuggle a duplicate), confidence is clamped, tags capped and categories validated; episodes dedup, topics/projects/profile merge field by field; a file whose header declares a newer schema is refused; nothing is deleted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory recall \u003cquery>`})}),_jsxs(_components.td,{children:[`Dry-run of auto-recall: the facts the query would inject, each with its score and `,_jsx(_components.strong,{children:`why`}),` (keyword/semantic/recency signals, use count, provenance, source project)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`/memory why`})}),_jsx(_components.td,{children:`The last turn’s auto-recall with the same reasons`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Every store also reconciles with its file before rewriting it — facts and episodes already did; the `,_jsx(_components.strong,{children:`profile, topics and projects`}),` now merge too (fresher field wins, lists union), so a REPL, a gateway daemon and an MCP server writing the same memory never erase each other’s learning. Daily notes are appended through an atomic rename, so a crash mid-write cannot tear a note. A fact learned in another project is labeled `,_jsx(_components.code,{children:`(from: ~/path)`}),` in the recalled block, a git root and its packages counting as one project.`]}),`\n`,_jsx(Heading,{level:`4`,id:`manual-editing-and-extended-profile`,children:`Manual editing and extended profile`}),`\n`,_jsxs(_components.p,{children:[`Automatic detection doesn’t always catch everything, so you can `,_jsx(_components.strong,{children:`edit memory explicitly`}),`. Beyond name/role/expertise/company/location, the profile covers `,_jsx(_components.strong,{children:`certifications, skills, goals, interests, directives, stances, milestones and environment (env_*)`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`List fields have a `,_jsx(_components.strong,{children:`lifecycle`}),`, they are not append-only: new items enter, a restated item (same text apart from status/parenthetical) `,_jsx(_components.strong,{children:`supersedes`}),` the old one in place, and operation suffixes rewrite — `,_jsx(_components.code,{children:`_replace`}),` overwrites the whole list (empty value clears it), `,_jsx(_components.code,{children:`_done`}),`/`,_jsx(_components.code,{children:`_remove`}),` delete matching items. Commas inside parentheses are safe (`,_jsx(_components.code,{children:`\"Quiz X (Provider, 60 questões)\"`}),` stays whole).`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set company=ACME Corp`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set certifications=CKA, AWS SAA # upsert, deduplicated`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set goals_done=earn the CKA # finished goal leaves the list`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set milestone=Earned the CKA # ...and becomes a dated milestone`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set goals_replace=launch product Y # replaces ALL goals`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set stance=prefer keyless backends :: less setup friction`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set directives=[scope:my-repo] always run the linter before pushing`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set env_shell=zsh`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory profile set sensitive_mark=monthly_income # marks as private`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory remember [preference] Prefers Go over Python for CLIs`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`> /memory forget Python # removes FACTS containing \"Python\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`forget`}),` only acts on `,_jsx(_components.strong,{children:`facts`}),`; to remove profile items use the suffixes (`,_jsx(_components.code,{children:`goals_remove=...`}),`). Directives with `,_jsx(_components.code,{children:`[scope:\u003cproject>]`}),` are only injected when that workspace is active; without the tag they apply globally.`]})}),`\n`,_jsxs(Heading,{level:`4`,id:`@memory-tool-agent-coder-and-chat`,children:[_jsx(_components.code,{children:`@memory`}),` tool (agent, coder and chat)`]}),`\n`,_jsxs(_components.p,{children:[`Inside `,_jsx(_components.code,{children:`/agent`}),` and `,_jsx(_components.code,{children:`/coder`}),`, the model can persist and explore memory on its own via the `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`@memory`})}),` tool (cmds `,_jsx(_components.code,{children:`remember`}),`, `,_jsx(_components.code,{children:`profile`}),`, `,_jsx(_components.code,{children:`forget`}),`, `,_jsx(_components.code,{children:`recall`}),`, `,_jsx(_components.code,{children:`timeline`}),`, `,_jsx(_components.code,{children:`neighbors`}),`, `,_jsx(_components.code,{children:`map`}),`):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003ctool_call name=\"@memory\" args='{\"cmd\":\"remember\",\"args\":{\"content\":\"User earned the AWS Solutions Architect certification\",\"category\":\"personal\"}}' />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`So when you tell the agent something new (e.g. a fresh certification), it records it into your profile/long-term facts without you running `,_jsx(_components.code,{children:`/memory`}),` manually. The `,_jsx(_components.code,{children:`profile`}),` subcommand accepts every lifecycle operation (`,_jsx(_components.code,{children:`goals_done`}),`, `,_jsx(_components.code,{children:`goals_replace`}),`, `,_jsx(_components.code,{children:`stance`}),`, `,_jsx(_components.code,{children:`milestone`}),`, `,_jsx(_components.code,{children:`env_*`}),`, `,_jsx(_components.code,{children:`sensitive_mark`}),`, …).`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`In chat too`}),`: memory/profile updates are the `,_jsx(_components.strong,{children:`fourth sanctioned exception`}),` of tool-less chat (alongside `,_jsx(_components.code,{children:`ask_user`}),`, read-only knowledge and `,_jsx(_components.code,{children:`@graphview`}),`). When you reveal or correct a durable fact about yourself, the model persists it `,_jsx(_components.strong,{children:`in the same turn`}),` — no more “I’ll keep that in mind” without writing anything. The exception also carries the `,_jsx(_components.strong,{children:`read side`}),`: it is the pull path that lets chat honor `,_jsx(_components.code,{children:`index`}),` memory mode (compact digest + on-demand recall) and receive the proactive auto-recall, session-recall and graph-card blocks. Gated by `,_jsx(_components.code,{children:`CHATCLI_CHAT_MEMORY`}),` (`,_jsx(_components.strong,{children:`on by default`}),`), flippable with `,_jsx(_components.code,{children:`/config chat memory on|off`}),` — disabling it reverts chat to the full-push memory model.`]}),`\n`,_jsx(Heading,{level:`3`,id:`episodic-memory-the-work-timeline`,children:`Episodic memory: the work timeline`}),`\n`,_jsxs(_components.p,{children:[`Facts capture what is `,_jsx(_components.strong,{children:`true`}),`; episodes capture what `,_jsx(_components.strong,{children:`happened`}),`. An episode is a dated, durable unit of completed work — summary, outcome and refs (files, PRs, commands) — extracted automatically by the background worker (`,_jsx(_components.code,{children:`## EPISODES`}),` section) and stored forever in `,_jsx(_components.code,{children:`~/.chatcli/memory/episodes.json`}),`. Unlike daily notes (30-day retention) and their digests, episodes never expire, so “what did we do three months ago?” finally has a structured answer.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Storage`}),` follows the fact-index disciplines: atomic writes, quarantine on corruption, and reconciling multi-process rewrites under a cross-process file lock (`,_jsx(_components.code,{children:`\u003cstore>.lock`}),` next to each store, taken for the merge-and-write critical section, so the REPL, the gateway daemon and the MCP server never erase each other — the same lock guards the context store and the vector index). The same work item re-extracted on the same day `,_jsx(_components.strong,{children:`dedups and enriches`}),` outcome/refs instead of duplicating. Capped at 2000 episodes (oldest dropped first).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`@memory timeline`})}),` is the model-facing chronological view: `,_jsx(_components.code,{children:`{project?, from?, to?, query?, limit?, as_of?}`}),` (`,_jsx(_components.code,{children:`as_of`}),`, also accepted by `,_jsx(_components.code,{children:`recall`}),`, counts relative expressions from another date for that one call). `,_jsx(_components.code,{children:`from`}),`/`,_jsx(_components.code,{children:`to`}),` accept ISO dates (`,_jsx(_components.code,{children:`2026-04`}),`, `,_jsx(_components.code,{children:`2026-04-12`}),`) `,_jsx(_components.strong,{children:`or natural expressions in English and Portuguese`}),` (“3 months ago”, “há 3 meses”, “abril”, “last week”) — a time expression inside `,_jsx(_components.code,{children:`query`}),` works too.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Temporal recall`}),`: a `,_jsx(_components.code,{children:`@memory recall`}),` query carrying a time expression (“o que fizemos em abril?”) automatically prepends the matching timeline slice to the result — relevance ranking alone cannot answer “when”. When the window came from natural language and the leftover words match nothing, the window wins and returns unfiltered (the date was the real signal).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`/memory timeline [q]`})}),` is the human view — same temporal parsing, rendered in the terminal.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rollups are grounded in episodes`}),`: weekly/monthly digests now lead with the period’s episodes and use daily notes as color, so the long-range narrative stops decaying — and a week whose notes already expired still gets its digest from episodes alone.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003ctool_call name=\"@memory\" args='{\"cmd\":\"timeline\",\"args\":{\"query\":\"3 months ago\"}}' />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003ctool_call name=\"@memory\" args='{\"cmd\":\"timeline\",\"args\":{\"project\":\"chatcli\",\"from\":\"2026-04\",\"to\":\"2026-06\"}}' />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003ctool_call name=\"@memory\" args='{\"cmd\":\"timeline\",\"args\":{\"from\":\"2 weeks ago\",\"as_of\":\"2023-05-30\"}}' />`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Heading,{level:`4`,id:`knowledge-graph-@memory-neighbors-/-map`,children:[`Knowledge graph (`,_jsx(_components.code,{children:`@memory neighbors`}),` / `,_jsx(_components.code,{children:`map`}),`)`]}),`\n`,_jsxs(_components.p,{children:[`What ChatCLI knows about you is not a flat list: facts, topics, projects, skills, tags — and, since the persisted graph landed, `,_jsx(_components.strong,{children:`episodes, saved sessions and knowledge bases`}),` — form a graph (Obsidian-style, in the core) derived from the relationships the stores already record (topic↔fact, fact→project, episode↔project, episode↔same-day facts, session↔project, session↔episode, KB↔tags, skill triggers) plus `,_jsx(_components.code,{children:`[[wikilinks]]`}),` in note text. Access is through `,_jsx(_components.code,{children:`@memory`}),` itself:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`recall`}),` → search by `,_jsx(_components.strong,{children:`content`}),` (“which facts match these words?”) — the output now ends with a `,_jsx(_components.code,{children:`## Related (graph)`}),` section of one-hop neighbors.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`neighbors \u003csubject>`}),` → `,_jsx(_components.strong,{children:`local graph`}),`: backlinks + related notes for a subject (“what connects to this?”).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`map`}),` → overview (counts by kind + hubs).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`The graph is a persisted cache`}),`, not a per-call derivation: it lives at `,_jsx(_components.code,{children:`~/.chatcli/memory/graph.json`}),` and rebuilds only when a source actually changes (a fact is learned or forgotten, a session is saved, a skill is installed, a context is created — whether by you or by the model through its tools). On the next boot the cache is adopted instantly, so `,_jsx(_components.code,{children:`@memory map`}),` and the per-turn card cost nothing. The file is self-healing: a corrupt or stale copy is simply discarded and re-derived. Gate: `,_jsx(_components.code,{children:`CHATCLI_MEMORY_GRAPH`}),` (`,_jsx(_components.strong,{children:`on`}),` by default; `,_jsx(_components.code,{children:`off`}),` restores the old derive-per-call behavior with no recall expansion). Node/edge counts are visible in `,_jsx(_components.code,{children:`/config memory`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Context discipline: only a tiny, deterministic index card rides each turn (cache-friendly); depth is pulled on demand. To visualize, use `,_jsx(_components.code,{children:`/graph`}),` (renders the graph to an image via embedded go-graphviz).`]}),`\n`,_jsx(Heading,{level:`4`,id:`fact-quality-confidence-provenance-reconciliation`,children:`Fact quality (confidence, provenance, reconciliation)`}),`\n`,_jsxs(_components.p,{children:[`Each fact carries `,_jsx(_components.strong,{children:`confidence`}),` and `,_jsx(_components.strong,{children:`provenance`}),`: what you state directly outranks a background-extraction guess, and a re-observed fact climbs — confidence scales the score (ranking and survival against decay/pruning). On write, ChatCLI `,_jsx(_components.strong,{children:`reconciles`}),`: a rephrasing reinforces the existing fact instead of duplicating, and a same-subject update of equal-or-higher confidence `,_jsx(_components.strong,{children:`supersedes`}),` the stale one (conservatively — a weak guess never wipes a strong fact). Topics gain a `,_jsx(_components.strong,{children:`rolling summary`}),` of what was discussed, becoming real knowledge nodes. Legacy memory indexes are enriched once on startup, without losing anything.`]}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`What goes in each component?`,icon:`layer-group`,id:`what-goes-in-each-component`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`FactIndex`}),`: Stable, long-lasting facts — decisions, patterns, gotchas, preferences`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`UserProfile`}),`: Who you are — name, role, expertise, language`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TopicTracker`}),`: What you talk about — Go, Docker, K8s, etc.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ProjectTracker`}),`: What you work on — chatcli, my-app, etc.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PatternDetector`}),`: How you work — schedules, features, common errors`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Daily notes`}),`: What happened today — temporal and specific`]}),`\n`]})}),_jsxs(Accordion,{title:`Can I edit memories manually?`,icon:`file-pen`,id:`can-i-edit-memories-manually`,children:[_jsx(_components.p,{children:`Yes! All files are plain JSON or Markdown:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# View profile`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.chatcli/memory/user_profile.json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# View facts with scores`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cat`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.chatcli/memory/memory_index.json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` jq`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '.[0:5]'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Edit today's note`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`vim`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ~/.chatcli/memory/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`date`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%Y%m`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`date`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +%Y%m%d`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`.md`})]}),`\n`]})})}),_jsx(_components.p,{children:`JSON changes are loaded on next startup. MEMORY.md is regenerated and should not be edited directly.`})]}),_jsxs(Accordion,{title:`How does fact scoring work?`,icon:`chart-simple`,id:`how-does-fact-scoring-work`,children:[_jsx(_components.p,{children:`Each fact has a score calculated by:`}),_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`score = (1 + log(1 + accessCount)) * exp(-daysSinceAccess * ln(2) / halfLifeDays)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`accessCount`}),`: How many times the fact was used by the retriever`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`daysSinceAccess`}),`: Days since last access`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`halfLifeDays`}),`: Decay half-life (default: 30 days)`]}),`\n`]}),_jsx(_components.p,{children:`Frequently and recently accessed facts get high scores. Never-accessed facts decay to ~0 after 3-4 half-lives.`})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`what-gets-injected-into-the-prompt`,children:`What Gets Injected into the Prompt`}),`\n`,_jsx(_components.p,{children:`The ContextBuilder assembles the following block and injects it as a system prompt prefix:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`50`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`50`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## AGENTS.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of AGENTS.md]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## SOUL.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of SOUL.md]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## USER.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of USER.md]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## IDENTITY.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of IDENTITY.md]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## RULES.md`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of RULES.md]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`---`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Memory`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Long-term Memory`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of MEMORY.md]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`## Recent Daily Notes`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`### 2026-03-04`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of March 4th note]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`### 2026-03-05`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of March 5th note]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`### 2026-03-06`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[content of today's note]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Empty sections (missing files) are `,_jsx(_components.strong,{children:`automatically omitted`}),` — only what exists is injected.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`dynamic-context-cwd-+-disambiguation`,children:`Dynamic Context (CWD + Disambiguation)`}),`\n`,_jsx(_components.p,{children:`ChatCLI automatically injects into the system prompt:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The current `,_jsx(_components.strong,{children:`date and time`})]}),`\n`,_jsxs(_components.li,{children:[`The current `,_jsx(_components.strong,{children:`working directory`}),` (the process CWD)`]}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.strong,{children:`disambiguation instruction`}),`: the model is told to ALWAYS resolve “here”, “this project” and relative paths against the current CWD — never against paths found in long-term memory`]}),`\n`]}),`\n`,_jsxs(Info,{children:[`This solves the common problem where long-term memory holds paths of earlier projects and the model mistakes “the current project” for one that was in memory. Facts from other projects are annotated with `,_jsx(_components.code,{children:`(from: /other/project)`}),` so their origin is clear.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`path-specific-rules`,children:`Path-Specific Rules`}),`\n`,_jsxs(_components.p,{children:[`Besides the global `,_jsx(_components.code,{children:`RULES.md`}),`, you can create `,_jsx(_components.strong,{children:`conditional rules per path`}),` in `,_jsx(_components.code,{children:`.chatcli/rules/`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`.chatcli/rules/`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── go-style.md # Rules for Go files`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── api-conventions.md # Rules for APIs`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└── testing.md # Rules for tests`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Each file can carry a `,_jsx(_components.code,{children:`paths:`}),` frontmatter that sets which files the rule applies to:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`markdown`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`markdown`,children:_jsxs(_components.code,{language:`markdown`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`---`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`paths`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"*.go\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"src/**\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`---`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Always wrap errors with fmt.Errorf(\"%w\", err) in Go.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Never ignore returned errors.`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Rules `,_jsx(_components.strong,{children:`without`}),` a `,_jsx(_components.code,{children:`paths:`}),` frontmatter apply globally. Workspace rules (`,_jsx(_components.code,{children:`.chatcli/rules/`}),`) take `,_jsx(_components.strong,{children:`priority`}),` over global rules (`,_jsx(_components.code,{children:`~/.chatcli/rules/`}),`) with the same name.`]}),`\n`,_jsxs(Tip,{children:[`See `,_jsx(_components.a,{href:`/context/path-rules`,children:`Path-Specific Rules`}),` for the full documentation.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Environment Variables`,id:`environment-variables`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`CHATCLI_BOOTSTRAP_ENABLED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`CHATCLI_BOOTSTRAP_DIR`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/path/to/bootstrap/files`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`CHATCLI_MEMORY_ENABLED`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`true`})]}),`\n`]})})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_BOOTSTRAP_ENABLED`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsx(_components.td,{children:`Enable/disable bootstrap file loading`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_BOOTSTRAP_DIR`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`~/.chatcli/`})}),_jsxs(_components.td,{children:[`Alternative directory for `,_jsx(_components.strong,{children:`global`}),` bootstrap files. Use this when you want to keep your files (SOUL.md, RULES.md, etc.) in another location, such as a versioned repository or a directory shared across machines`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`CHATCLI_MEMORY_ENABLED`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsx(_components.td,{children:`Enable/disable the persistent memory system`})]})]})]}),_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`CHATCLI_BOOTSTRAP_DIR`}),` only overrides the `,_jsx(_components.strong,{children:`global`}),` directory (`,_jsx(_components.code,{children:`~/.chatcli/`}),`). Project-level files (detected via `,_jsx(_components.code,{children:`.git`}),` or `,_jsx(_components.code,{children:`.agent`}),` markers) still take priority over global ones.`]})})]}),_jsxs(Tab,{title:`Via Helm Chart`,id:`via-helm-chart`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# values.yaml`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`bootstrap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` enabled`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` definitions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` SOUL.md`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` You are a DevOps assistant...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` USER.md`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` The user prefers Go...`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`memory`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` enabled`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` subPath`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`memory`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # default: memory's own directory of the sessions PVC`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The Helm chart creates ConfigMaps for bootstrap files and mounts them at `,_jsx(_components.code,{children:`/home/chatcli/.chatcli/bootstrap/`}),`; a change to `,_jsx(_components.code,{children:`bootstrap.definitions`}),` rolls the pods on `,_jsx(_components.code,{children:`helm upgrade`}),`, while an edited `,_jsx(_components.code,{children:`bootstrap.existingConfigMap`}),` needs `,_jsx(_components.code,{children:`kubectl rollout restart`}),`. `,_jsx(_components.code,{children:`bootstrap.enabled`}),` with neither `,_jsx(_components.code,{children:`definitions`}),` nor `,_jsx(_components.code,{children:`existingConfigMap`}),` mounts nothing.`]}),_jsxs(_components.p,{children:[`With persistence on, memory lives in its own directory of the sessions PVC (`,_jsx(_components.code,{children:`memory.subPath`}),`, default `,_jsx(_components.code,{children:`memory`}),`, mounted at `,_jsx(_components.code,{children:`~/.chatcli/memory`}),`) while the sessions stay at the PVC root; without persistence it is a 200Mi emptyDir. Earlier charts (up to 1.211.x) kept memory at the PVC root, among the session files: on the first start after the upgrade the server copies memory’s own files from there into the memory directory, once and without moving or overwriting anything (the chart sets `,_jsx(_components.code,{children:`CHATCLI_MEMORY_LEGACY_DIR`}),` for this). `,_jsx(_components.code,{children:`memory.subPath: \"\"`}),` keeps the old shared layout. Details in `,_jsx(_components.a,{href:`/start/docker-deployment#memory-on-the-sessions-pvc`,children:`Kubernetes deployment`}),`.`]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`context-injection-optimization-prompt-caching`,children:`Context Injection Optimization (Prompt Caching)`}),`\n`,_jsx(_components.p,{children:`ChatCLI optimizes token costs when contexts are attached using three complementary strategies:`}),`\n`,_jsx(Heading,{level:`3`,id:`unified-system-prompt-with-cache-hints`,children:`Unified System Prompt with Cache Hints`}),`\n`,_jsxs(_components.p,{children:[`Contexts attached via `,_jsx(_components.code,{children:`/context attach`}),` are injected as `,_jsx(_components.strong,{children:`system prompt`}),`, not as user messages. This enables provider-level prompt caching:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Provider`}),_jsx(_components.th,{children:`Mechanism`}),_jsx(_components.th,{children:`Discount`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Anthropic`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`cache_control: ephemeral`})}),_jsx(_components.td,{children:`~90%`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`OpenAI`}),_jsx(_components.td,{children:`Automatic prompt caching`}),_jsx(_components.td,{children:`~50%`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Google`}),_jsx(_components.td,{children:`Context caching API`}),_jsx(_components.td,{children:`Variable`})]})]})]}),`\n`,_jsx(_components.p,{children:`The system prompt block contains:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Bootstrap (SOUL.md, USER.md, etc.)`}),`\n`,_jsx(_components.li,{children:`Memory (MEMORY.md + daily notes)`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Attached Contexts`}),` (new — previously injected as user messages)`]}),`\n`,_jsx(_components.li,{children:`K8s Watcher (if active)`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Since the system prompt is identical across turns, the provider caches it and charges tokens at a discount.`}),`\n`,_jsx(Heading,{level:`3`,id:`smart-compaction`,children:`Smart Compaction`}),`\n`,_jsxs(_components.p,{children:[`Injected context messages (`,_jsx(_components.code,{children:`/memory load`}),`, summarized contexts) are `,_jsx(_components.strong,{children:`automatically truncated`}),` during compaction (Level 1 — trimming). This prevents old reference context from consuming valuable token budget.`]}),`\n`,_jsx(Heading,{level:`3`,id:`token-visibility`,children:`Token Visibility`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`/context attached`}),` command now shows:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Estimated tokens per context`}),`\n`,_jsx(_components.li,{children:`Total tokens per turn`}),`\n`,_jsx(_components.li,{children:`Cache hints per provider`}),`\n`,_jsx(_components.li,{children:`Warnings for oversized contexts`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`When running `,_jsx(_components.code,{children:`/context attach`}),`, the feedback includes the estimated cost per turn.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Global SOUL.md, per-project USER.md`,icon:`layer-group`,children:_jsx(_components.p,{children:`Keep your preferred personality globally and technical context per project.`})}),_jsx(Card,{title:`Keep MEMORY.md concise`,icon:`compress`,children:_jsx(_components.p,{children:`Keep only stable and confirmed facts — not session-specific ones.`})}),_jsx(Card,{title:`Daily notes for journaling`,icon:`calendar-day`,children:_jsx(_components.p,{children:`Use them to record decisions, solved problems, and temporal context.`})}),_jsx(Card,{title:`Don't duplicate CLAUDE.md`,icon:`copy`,children:_jsx(_components.p,{children:`If you already use CLAUDE.md or project instructions, avoid duplicating them in bootstrap.`})})]}),`\n`,_jsx(Tip,{children:`Periodically review your memories and remove outdated ones to keep the context relevant.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Conversation Control`,icon:`clock-rotate-left`,href:`/usage/conversation-control`,children:_jsx(_components.p,{children:`Use /compact and /rewind to manage conversation size and state.`})}),_jsx(Card,{title:`Sessions`,icon:`floppy-disk`,href:`/context/session-management`,children:_jsx(_components.p,{children:`Save and reuse conversations across projects.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`external-memory-provider-mcp`,children:`External memory provider (MCP)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`CHATCLI_MEMORY_PROVIDER=mcp-only:\u003cserver>`}),` uses the external provider alone (no embedded recall block). The embedded memory stays the default. An organization that already runs a memory service plugs it in through MCP with no ChatCLI code: `,_jsx(_components.code,{children:`CHATCLI_MEMORY_PROVIDER=mcp:\u003cserver>`}),` where `,_jsx(_components.code,{children:`\u003cserver>`}),` is a configured MCP server exposing two tools:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tool`}),_jsx(_components.th,{children:`Arguments`}),_jsx(_components.th,{children:`Role`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`memory_recall`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`query`}),`, `,_jsx(_components.code,{children:`hints[]`}),`, `,_jsx(_components.code,{children:`budget_chars`})]}),_jsx(_components.td,{children:`returns text appended to the auto-recall block of every turn (chat and agent/coder), bounded to 900 chars, 5 s`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`memory_store`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`messages[{role, content}]`}),`, `,_jsx(_components.code,{children:`session`})]}),_jsx(_components.td,{children:`receives every turn’s new messages (system messages excluded), forwarded asynchronously and best-effort, 10 s`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The embedded facts, episodes and graph keep working alongside; the provider’s answer rides after them. Any failure or timeout adds nothing and never blocks a turn. Shown in `,_jsx(_components.code,{children:`/config memory`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Bootstrap and Persistent Memory","sidebarTitle":"Bootstrap and Memory","description":"Customize the agent's identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.","icon":"memory","href":"/context/bootstrap-memory"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Bootstrap Files","slug":"bootstrap-files","depth":2,"children":[{"title":"Supported Files","slug":"supported-files","depth":3,"children":[]},{"title":"Instruction hierarchy and imports","slug":"instruction-hierarchy-and-imports","depth":3,"children":[]},{"title":"Loading Priority","slug":"loading-priority","depth":3,"children":[]},{"title":"Automatic Workspace Detection","slug":"automatic-workspace-detection","depth":4,"children":[]},{"title":"Example Scenarios","slug":"example-scenarios","depth":4,"children":[]},{"title":"Detailed Examples","slug":"detailed-examples","depth":3,"children":[]},{"title":"Where to Place Files","slug":"where-to-place-files","depth":3,"children":[]},{"title":"Smart Cache","slug":"smart-cache","depth":3,"children":[]}]},{"title":"Persistent Memory","slug":"persistent-memory","depth":2,"children":[{"title":"System Architecture","slug":"system-architecture","depth":3,"children":[]},{"title":"Resilient extraction — nothing is lost silently","slug":"resilient-extraction-—-nothing-is-lost-silently","depth":3,"children":[]},{"title":"Storage Structure","slug":"storage-structure","depth":3,"children":[]},{"title":"Components","slug":"components","depth":3,"children":[]},{"title":"Smart Retrieval","slug":"smart-retrieval","depth":3,"children":[]},{"title":"Injection mode: push vs pull","slug":"injection-mode-push-vs-pull","depth":3,"children":[]},{"title":"Memory Configuration","slug":"memory-configuration","depth":3,"children":[]},{"title":"How Memories Are Created","slug":"how-memories-are-created","depth":3,"children":[]},{"title":"Extraction Process","slug":"extraction-process","depth":4,"children":[]},{"title":"Automatic Compaction","slug":"automatic-compaction","depth":3,"children":[]},{"title":"Weekly and Monthly Digests (Trajectory)","slug":"weekly-and-monthly-digests-trajectory","depth":3,"children":[]},{"title":"Automatic Migration","slug":"automatic-migration","depth":3,"children":[]},{"title":"/memory Command","slug":"/memory-command","depth":3,"children":[]},{"title":"Manual editing and extended profile","slug":"manual-editing-and-extended-profile","depth":4,"children":[]},{"title":"@memory tool (agent, coder and chat)","slug":"@memory-tool-agent-coder-and-chat","depth":4,"children":[]},{"title":"Episodic memory: the work timeline","slug":"episodic-memory-the-work-timeline","depth":3,"children":[]},{"title":"Knowledge graph (@memory neighbors / map)","slug":"knowledge-graph-@memory-neighbors-/-map","depth":4,"children":[]},{"title":"Fact quality (confidence, provenance, reconciliation)","slug":"fact-quality-confidence-provenance-reconciliation","depth":4,"children":[]},{"title":"What Gets Injected into the Prompt","slug":"what-gets-injected-into-the-prompt","depth":3,"children":[]}]},{"title":"Dynamic Context (CWD + Disambiguation)","slug":"dynamic-context-cwd-+-disambiguation","depth":2,"children":[]},{"title":"Path-Specific Rules","slug":"path-specific-rules","depth":2,"children":[]},{"title":"Configuration","slug":"configuration","depth":2,"children":[]},{"title":"Context Injection Optimization (Prompt Caching)","slug":"context-injection-optimization-prompt-caching","depth":2,"children":[{"title":"Unified System Prompt with Cache Hints","slug":"unified-system-prompt-with-cache-hints","depth":3,"children":[]},{"title":"Smart Compaction","slug":"smart-compaction","depth":3,"children":[]},{"title":"Token Visibility","slug":"token-visibility","depth":3,"children":[]}]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]},{"title":"External memory provider (MCP)","slug":"external-memory-provider-mcp","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/encom/03414b2589eb02b8/flags.js","/_mintlify/custom/encom/f19b212850d023b6/sidebar-focus.js"],"dynamicCss":".\\[scope\\:\\\u003cproject\\>\\] {\n scope: \u003cproject>\n}\n.\\[scope\\:my-repo\\] {\n scope: my-repo\n}","subdomain":"encom","siteName":"ChatCLI","title":"Bootstrap and Persistent Memory - ChatCLI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/context/bootstrap-memory","matchLevel":0},"pt-BR":{"href":"/pt/context/bootstrap-memory","matchLevel":1}}},"lastModified":"2026-10-20T17:17:03.859Z","originalFileLocation":"context/bootstrap-memory.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Customize the agent\u0026#x27;s identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ChatCLI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Bootstrap and Persistent Memory - ChatCLI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Customize the agent\u0026#x27;s identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ChatCLI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Bootstrap and Persistent Memory - ChatCLI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Customize the agent\u0026#x27;s identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/encom/ilreks3OQttPbvib/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ChatCLI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0F766E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/context/bootstrap-memory.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://chatcli.edilsonfreitas.com/pt/context/bootstrap-memory\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://chatcli.edilsonfreitas.com/#organization\",\"name\":\"ChatCLI\",\"url\":\"https://chatcli.edilsonfreitas.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/encom/Rcdb5Pr5hpjwN46r/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Rcdb5Pr5hpjwN46r\u0026q=85\u0026s=965a0feb9bd2f65a11b3c486e2488101\"}},{\"@type\":\"WebSite\",\"@id\":\"https://chatcli.edilsonfreitas.com#website\",\"name\":\"ChatCLI\",\"url\":\"https://chatcli.edilsonfreitas.com\",\"publisher\":{\"@id\":\"https://chatcli.edilsonfreitas.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory#webpage\",\"url\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\",\"name\":\"Bootstrap and Persistent Memory\",\"description\":\"Customize the agent's identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.\",\"dateModified\":\"2026-10-20T17:17:03.859Z\",\"isPartOf\":{\"@id\":\"https://chatcli.edilsonfreitas.com#website\"},\"breadcrumb\":{\"@id\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Documentation\",\"item\":\"https://chatcli.edilsonfreitas.com/usage/basic-usage\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Context \u0026 memory\",\"item\":\"https://chatcli.edilsonfreitas.com/context/longmemeval\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Bootstrap and Persistent Memory\",\"item\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory#article\",\"headline\":\"Bootstrap and Persistent Memory\",\"name\":\"Bootstrap and Persistent Memory\",\"description\":\"Customize the agent's identity with bootstrap files and maintain context across sessions with long-term memory and daily notes.\",\"url\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory\",\"mainEntityOfPage\":{\"@id\":\"https://chatcli.edilsonfreitas.com/context/bootstrap-memory#webpage\"},\"dateModified\":\"2026-10-20T17:17:03.859Z\",\"publisher\":{\"@id\":\"https://chatcli.edilsonfreitas.com/#organization\"},\"isPartOf\":{\"@id\":\"https://chatcli.edilsonfreitas.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ChatCLI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ChatCLI","nav":{"global":null,"languages":[{"language":"en","default":true,"groups":[{"group":"Get started","pages":[{"title":"ChatCLI","sidebarTitle":"Overview","icon":"house","mode":"wide","href":""},{"title":"Quickstart","icon":"rocket","href":"/start/quickstart"},{"title":"Installation and Configuration","sidebarTitle":"Installation","icon":"download","href":"/start/installation"},{"title":"Deploy with Docker and Kubernetes","sidebarTitle":"Docker \u0026 Kubernetes","icon":"docker","href":"/start/docker-deployment"},{"title":"Auto-Update","sidebarTitle":"Auto-Update","icon":"arrows-rotate","href":"/start/auto-update"},{"title":"Configuration Migration","sidebarTitle":"Config Migration","icon":"arrows-rotate","href":"/start/config-migration"}]},{"group":"Documentation","pages":[{"group":"Using ChatCLI","icon":"terminal","pages":[{"title":"Basic Usage and Main Commands","sidebarTitle":"Basic Usage","icon":"terminal","href":"/usage/basic-usage"},{"title":"Adding Context (@ Commands)","sidebarTitle":"Context Commands","icon":"at","href":"/usage/context-commands"},{"title":"Agent Mode: Task Execution","sidebarTitle":"Agent Mode (/agent)","icon":"robot","href":"/usage/agent-mode"},{"title":"Coder Mode (/coder)","sidebarTitle":"Coder Mode (/coder)","icon":"code","href":"/usage/coder-mode"},{"title":"Non-Interactive Mode (One-Shot)","sidebarTitle":"One-Shot Mode","icon":"terminal","href":"/usage/non-interactive-mode"},{"title":"Conversation Control","sidebarTitle":"Conversation Control","icon":"clock-rotate-left","href":"/usage/conversation-control"},{"title":"Multiline Input","sidebarTitle":"Multiline Input","icon":"bars-staggered","href":"/usage/multiline-input"},{"title":"Real-Time Streaming","sidebarTitle":"Streaming","icon":"bolt","href":"/usage/streaming"},{"title":"Image Input (Vision)","sidebarTitle":"Image Input (Vision)","icon":"eye","href":"/usage/vision-input"},{"title":"PDF Input","sidebarTitle":"PDF Input","icon":"file-pdf","href":"/usage/pdf-input"},{"title":"Web UI","sidebarTitle":"Web UI","icon":"browser","href":"/usage/web-ui"},{"title":"Live Dashboard","sidebarTitle":"Live Dashboard","icon":"chart-network","href":"/usage/live-dashboard"},{"title":"Compact UI Mode","sidebarTitle":"Compact UI","icon":"minimize","href":"/usage/compact-ui"},{"title":"Theme System (Colors)","sidebarTitle":"Theme System","icon":"palette","href":"/usage/ui-theme"},{"title":"Internationalization (i18n)","sidebarTitle":"Internationalization","icon":"language","href":"/usage/i18n"}]},{"group":"Coder","icon":"code","pages":[{"title":"Plugin @coder","sidebarTitle":"Plugin @coder","icon":"hammer","href":"/coder/coder-plugin"},{"title":"Atomic Tools (@read, @search, @tree, @todo)","sidebarTitle":"Atomic Tools","icon":"wand-magic-sparkles","href":"/coder/atomic-tools"},{"title":"Coder Mode Security (Governance)","sidebarTitle":"Coder Mode Security (Governance)","icon":"shield-halved","href":"/coder/coder-security"},{"title":"Enhanced Permissions System","sidebarTitle":"Permissions","icon":"shield-halved","href":"/coder/enhanced-permissions"},{"title":"Git Worktrees","sidebarTitle":"Git Worktrees","icon":"code-branch","href":"/coder/worktrees"},{"title":"File Staleness Detection","sidebarTitle":"File Staleness","icon":"eye","href":"/coder/file-staleness"},{"title":"JSON Recovery","sidebarTitle":"JSON Recovery","icon":"screwdriver-wrench","href":"/coder/json-recovery"},{"title":"LSP Diagnostics","sidebarTitle":"LSP Diagnostics","icon":"stethoscope","href":"/coder/lsp-diagnostics"},{"title":"Interactive Questions (ask_user)","sidebarTitle":"Interactive Questions","icon":"list-check","href":"/coder/interactive-ask"},{"title":"Live Agent Progress","sidebarTitle":"Live Progress","icon":"chart-bar","href":"/coder/agent-progress-ui"}]},{"group":"Agents","icon":"robot","pages":[{"title":"Native Tool Use (Structured API)","sidebarTitle":"Native Tool Use","icon":"wrench","href":"/agents/native-tool-use"},{"title":"Agentic AI and Plugin System","sidebarTitle":"Agentic AI \u0026 Plugins","icon":"puzzle-piece","href":"/agents/agentic-plugins"},{"title":"Customizable Agents (Personas)","sidebarTitle":"Customizable Agents","icon":"user-gear","href":"/agents/customizable-agents"},{"title":"Multi-Agent Orchestration","sidebarTitle":"Multi-Agent","icon":"users","href":"/agents/multi-agent-orchestration"},{"title":"Agent Squad","sidebarTitle":"Agent Squad","icon":"people-group","href":"/agents/agent-squad"},{"title":"Task Graph","sidebarTitle":"Task Graph","icon":"diagram-project","href":"/agents/task-graph"},{"title":"Subagent Delegation","sidebarTitle":"Subagent Delegate","icon":"diagram-project","href":"/agents/subagent-delegation"},{"title":"Mixture-of-Agents (MoA)","sidebarTitle":"Mixture-of-Agents","icon":"layer-group","href":"/agents/mixture-of-agents"},{"title":"Model Routing (@model)","sidebarTitle":"Model Routing","icon":"shuffle","href":"/agents/model-routing"},{"title":"Agent Park \u0026 Resume — Non-blocking suspension","sidebarTitle":"Park \u0026 Resume","icon":"circle-pause","href":"/agents/agent-park"},{"group":"Harness (7 patterns + evals)","icon":"wand-magic-sparkles","pages":[{"title":"Agent Harness/Quality Pipeline","sidebarTitle":"Overview","icon":"sparkles","href":"/agents/harness/overview"},{"title":"#1 ReAct — Reason + Act","sidebarTitle":"ReAct","icon":"rotate","href":"/agents/harness/react"},{"title":"#2 Plan-and-Solve / ReWOO","sidebarTitle":"Plan-and-Solve","icon":"list-check","href":"/agents/harness/plan-and-solve"},{"title":"#3 Reflexion — Learn from Failures","sidebarTitle":"Reflexion","icon":"lightbulb","href":"/agents/harness/reflexion"},{"title":"#4 RAG + HyDE — Semantic Retrieval","sidebarTitle":"RAG + HyDE","icon":"database","href":"/agents/harness/rag-hyde"},{"title":"#5 Self-Refine — Critique and Rewrite","sidebarTitle":"Self-Refine","icon":"wand-magic-sparkles","href":"/agents/harness/self-refine"},{"title":"#6 Chain-of-Verification (CoVe)","sidebarTitle":"CoVe","icon":"check-double","href":"/agents/harness/cove"},{"title":"#7 Cross-Provider Reasoning Backbone","sidebarTitle":"Reasoning Backbone","icon":"brain-circuit","href":"/agents/harness/reasoning-backbone"},{"title":"Configuration — Env, Slashes and /config","sidebarTitle":"Configuration","icon":"sliders","href":"/agents/harness/configuration"},{"title":"Evals: measuring ChatCLI","sidebarTitle":"Evals","icon":"flask","href":"/agents/harness/evals"}]}]},{"group":"Context \u0026 memory","icon":"layer-group","pages":[{"title":"LongMemEval: how well chatcli remembers","sidebarTitle":"LongMemEval results","icon":"chart-simple","href":"/context/longmemeval"},{"title":"Persistent Context Management","sidebarTitle":"Contexts (/context)","icon":"database","href":"/context/persistent-context"},{"title":"Knowledge Base (keyless RAG)","sidebarTitle":"Knowledge Base","description":"Turn documentation corpora or code/infra repositories (Terraform, Kubernetes/Argo) into a knowledge base: a ~900-token index card in the prompt, hybrid BM25 + embeddings retrieval per turn, and the @knowledge tool for the agent to investigate — all without an API key.","icon":"book-open","href":"/context/knowledge-base"},{"title":"Bootstrap and Persistent Memory","sidebarTitle":"Bootstrap and Memory","icon":"memory","href":"/context/bootstrap-memory"},{"title":"Path-Specific Rules","sidebarTitle":"Path Rules","description":"Conditional rules by path that apply automatically based on the files being discussed","icon":"folder-tree","href":"/context/path-rules"},{"title":"Filtering with .chatignore","sidebarTitle":".chatignore","icon":"filter","href":"/context/chatignore"},{"group":"Sessions","icon":"clock-rotate-left","pages":[{"title":"Session Management","sidebarTitle":"Sessions","icon":"clock-rotate-left","href":"/context/session-management"},{"title":"Conversation Search (@session)","sidebarTitle":"Conversation Search","icon":"magnifying-glass","href":"/context/session-search"},{"title":"Session Workspace (Scratch Dir)","sidebarTitle":"Session Workspace","icon":"folder-tree","href":"/context/session-workspace"},{"title":"Trajectory Export (ShareGPT)","sidebarTitle":"Export Trajectory","icon":"file-export","href":"/context/trajectory-export"}]},{"group":"Token efficiency","icon":"gauge-high","pages":[{"title":"Token Efficiency","sidebarTitle":"Token Efficiency","icon":"gauge-high","href":"/context/token-efficiency"},{"title":"Context Compression (CCR)","sidebarTitle":"Context Compression","icon":"file-zipper","href":"/context/context-compression"},{"title":"Chat Prefix Curation","sidebarTitle":"Prefix Curation","icon":"scissors","href":"/context/prefix-curation"},{"title":"Tool Result Management","sidebarTitle":"Tool Results","icon":"database","href":"/context/tool-result-management"},{"title":"Context Recovery","sidebarTitle":"Context Recovery","icon":"life-ring","href":"/context/context-recovery"}]}]},{"group":"Models \u0026 providers","icon":"shuffle","pages":[{"title":"Supported AI Models","sidebarTitle":"Supported Models","icon":"microchip","href":"/providers/supported-models"},{"title":"OAuth Authentication","sidebarTitle":"OAuth Authentication","icon":"key","href":"/providers/oauth-authentication"},{"title":"AWS Bedrock","sidebarTitle":"AWS Bedrock","icon":"aws","href":"/providers/bedrock"},{"title":"Devin Provider — the local Devin CLI as an LLM transport","sidebarTitle":"Devin Provider","icon":"robot","href":"/providers/devin-provider"},{"title":"Provider Fallback","sidebarTitle":"Provider Fallback","icon":"rotate","href":"/providers/provider-fallback"},{"title":"Rate Limits — provider limit visibility","sidebarTitle":"Rate Limits","icon":"gauge-high","href":"/providers/rate-limits"},{"title":"Cost Tracking","sidebarTitle":"Cost Tracking","icon":"money-bill-trend-up","href":"/providers/cost-tracking"}]},{"group":"Tools","icon":"toolbox","pages":[{"title":"WebFetch \u0026 WebSearch","sidebarTitle":"Web Tools","icon":"globe","href":"/tools/web-tools"},{"title":"Browser Automation (@browser)","sidebarTitle":"Browser Automation","icon":"chrome","href":"/tools/browser-automation"},{"title":"API Explorer (@api-explorer)","sidebarTitle":"API Explorer","icon":"compass","href":"/tools/api-explorer"},{"title":"Git Forge (@forge)","sidebarTitle":"Git Forge","icon":"code-pull-request","href":"/tools/git-forge"},{"title":"Image Generation \u0026 Editing (@image)","sidebarTitle":"Image Generation \u0026 Editing","icon":"image","href":"/tools/image-generation"},{"title":"Diagrams (@diagram)","sidebarTitle":"Diagrams","icon":"diagram-project","href":"/tools/diagram"},{"title":"Interactive graph (@graphview)","sidebarTitle":"Interactive graph","icon":"circle-nodes","href":"/tools/graphview"},{"title":"Image Tags (@registry-tags)","sidebarTitle":"Registry Tags","icon":"tags","href":"/tools/registry-tags"},{"title":"Builtin Skills","sidebarTitle":"Builtin Skills","icon":"boxes-stacked","href":"/tools/builtin-skills"},{"title":"Scheduler (Chronos) — Durable scheduling","sidebarTitle":"Scheduler","icon":"clock","href":"/tools/scheduler"}]},{"group":"Extensions","icon":"plug","pages":[{"title":"Plugin System","sidebarTitle":"Plugin System","icon":"plug","href":"/extensions/plugin-system"},{"title":"Provider Plugins","sidebarTitle":"Provider Plugins","icon":"plug-circle-bolt","href":"/extensions/provider-plugins"},{"title":"MCP (Model Context Protocol)","sidebarTitle":"Connect MCP Servers","icon":"link","href":"/extensions/mcp-integration"},{"title":"Skill Registry","sidebarTitle":"Skill Registry","icon":"store","tag":"NEW","href":"/extensions/skill-registry"},{"title":"Skill Authoring (@skill)","sidebarTitle":"Skill Authoring","icon":"wand-magic-sparkles","href":"/extensions/skill-authoring"},{"title":"Slash Commands","sidebarTitle":"Slash Commands","icon":"terminal","tag":"NEW","href":"/extensions/slash-commands"},{"title":"Hooks System","sidebarTitle":"Hooks","icon":"webhook","href":"/extensions/hooks-system"}]},{"group":"Channels \u0026 gateway","icon":"comments","pages":[{"title":"Chat gateway","sidebarTitle":"Chat gateway","icon":"messages","href":"/gateway/chat-gateway"},{"title":"Telegram","icon":"telegram","href":"/gateway/telegram"},{"title":"Slack","icon":"slack","href":"/gateway/slack"},{"title":"Discord","icon":"discord","href":"/gateway/discord"},{"title":"WhatsApp","icon":"whatsapp","href":"/gateway/whatsapp"},{"title":"Webhook","icon":"webhook","href":"/gateway/webhook"},{"title":"Conversation Hub — conversation continuity across channels","sidebarTitle":"Conversation Hub","icon":"share-nodes","href":"/gateway/conversation-hub"},{"title":"MCP Channels","sidebarTitle":"MCP Channels","icon":"tower-broadcast","href":"/gateway/mcp-channels"},{"title":"Proactive Messaging (@send)","sidebarTitle":"Proactive Messaging","icon":"paper-plane","href":"/gateway/proactive-messaging"},{"title":"Text-to-Speech \u0026 Gateway Voice","sidebarTitle":"Text-to-Speech","icon":"volume-high","href":"/gateway/text-to-speech"},{"title":"Gateway Voice Replies","sidebarTitle":"Voice Replies","icon":"microphone","href":"/gateway/voice-replies"}]},{"group":"Server \u0026 IDE","icon":"server","pages":[{"title":"Server Mode (chatcli server)","sidebarTitle":"Server Mode","icon":"server","href":"/server/server-mode"},{"title":"Remote Connection (chatcli connect)","sidebarTitle":"Remote Connection","icon":"plug","href":"/server/remote-connect"},{"title":"MCP Server — ChatCLI as a server (and ACP)","sidebarTitle":"ChatCLI MCP Server","icon":"server","href":"/server/mcp-server"},{"title":"ACP — ChatCLI inside your IDE","sidebarTitle":"ACP (IDE Agent)","icon":"plug-circle-bolt","href":"/server/acp"}]},{"group":"Kubernetes \u0026 AIOps","icon":"dharmachakra","pages":[{"title":"Kubernetes Monitoring (K8s Watcher)","sidebarTitle":"K8s Watcher","icon":"binoculars","href":"/kubernetes/k8s-watcher"},{"title":"Kubernetes Operator (AIOps)","sidebarTitle":"K8s Operator","icon":"dharmachakra","href":"/kubernetes/k8s-operator"},{"title":"AIOps Platform (Deep-Dive)","sidebarTitle":"AIOps Platform","icon":"brain","href":"/kubernetes/aiops-platform"},{"title":"ArtifactHub","sidebarTitle":"ArtifactHub","icon":"cube","href":"/kubernetes/artifacthub"},{"group":"AIOps platform","icon":"siren-on","pages":[{"title":"Incident Lifecycle","sidebarTitle":"Lifecycle","icon":"arrows-spin","href":"/kubernetes/aiops/incident-lifecycle"},{"title":"Notifications and Escalation","sidebarTitle":"Notifications","icon":"bell","href":"/kubernetes/aiops/notifications"},{"title":"SLOs and SLAs","sidebarTitle":"SLOs and SLAs","icon":"gauge-high","href":"/kubernetes/aiops/slo-sla"},{"title":"Approval Workflow","sidebarTitle":"Approvals","icon":"shield-check","href":"/kubernetes/aiops/approval-workflow"},{"title":"AI-Powered Decision Engine","sidebarTitle":"Decision Engine","icon":"brain-circuit","href":"/kubernetes/aiops/decision-engine"},{"title":"Multi-Cluster Federation","sidebarTitle":"Multi-Cluster Federation","icon":"network-wired","href":"/kubernetes/aiops/federation"},{"title":"Chaos Engineering","sidebarTitle":"Chaos Engineering","icon":"explosion","href":"/kubernetes/aiops/chaos-engineering"},{"title":"Audit and Compliance","sidebarTitle":"Audit and Compliance","icon":"clipboard-check","href":"/kubernetes/aiops/audit-compliance"},{"title":"Capacity Planning and Cost Attribution","sidebarTitle":"Capacity \u0026 Costs","icon":"chart-line","href":"/kubernetes/aiops/capacity-cost"},{"title":"Web Dashboard and Grafana","sidebarTitle":"Dashboard \u0026 Grafana","icon":"chart-mixed","href":"/kubernetes/aiops/web-dashboard"}]}]},{"group":"Security","icon":"shield-halved","pages":[{"title":"Enterprise Security","sidebarTitle":"Security","icon":"shield-halved","href":"/security/overview"},{"title":"Encryption at Rest","sidebarTitle":"Encryption at Rest","icon":"lock","href":"/security/encryption-at-rest"},{"title":"Security Hardening Upgrade Guide","sidebarTitle":"Hardening upgrade","icon":"shield-exclamation","href":"/security/hardening-upgrade"},{"title":"Vulnerability Scan (@osv)","sidebarTitle":"Dependency Scan","icon":"shield-halved","href":"/security/dependency-scan"}]},{"group":"Cookbook","icon":"kitchen-set","pages":[{"title":"Recipe: Safe Refactoring with Agent Mode","sidebarTitle":"Refactoring with Agent","icon":"screwdriver-wrench","href":"/cookbook/agent-refactoring"},{"title":"Fix tests with /coder","sidebarTitle":"Fix tests with /coder","icon":"vial","href":"/cookbook/coder-fix-tests"},{"title":"Recipe: Catching a Regression with Evals","sidebarTitle":"Catching a Regression with Evals","icon":"flask","href":"/cookbook/eval-regression"},{"title":"Recipe: Debugging Error Logs with Pipes","sidebarTitle":"Debug Error Logs","icon":"bug","href":"/cookbook/debugging-logs-with-pipes"},{"title":"One-Shot, Pipes, and Automation","sidebarTitle":"One-Shot and Pipes","icon":"wand-magic-sparkles","href":"/cookbook/oneshot-pipelines"},{"title":"Recipe: K8s Monitoring with AI","sidebarTitle":"K8s Monitoring","icon":"chart-line","href":"/cookbook/k8s-monitoring"},{"title":"Recipe: Managing Multiple Projects with Contexts and Sessions","sidebarTitle":"Multi-Project Workflow","icon":"folder-tree","href":"/cookbook/multi-project-workflow"},{"title":"Recipe: Understanding a Code Project","sidebarTitle":"Understand a New Project","icon":"rocket","href":"/cookbook/onboarding-new-project"},{"title":"Recipe: Generating Release Notes with @git","sidebarTitle":"Generate Release Notes","icon":"scroll","href":"/cookbook/release-notes-automation"},{"title":"Recipe: Remote Server for Teams","sidebarTitle":"Team Server","icon":"network-wired","href":"/cookbook/remote-server-setup"},{"title":"AIOps: Complete Production Setup","sidebarTitle":"AIOps Production Setup","icon":"rocket","href":"/cookbook/aiops-production-setup"},{"title":"Recipe: Scaling Instances","sidebarTitle":"Scaling Instances","icon":"arrows-left-right","href":"/cookbook/scaling-instances"},{"title":"AIOps: Incident Response Guide","sidebarTitle":"Incident Response","icon":"siren-on","href":"/cookbook/aiops-incident-response"},{"title":"Production Security Hardening","sidebarTitle":"Security Hardening","icon":"lock","href":"/cookbook/security-hardening-production"},{"title":"Scheduler automation recipes","sidebarTitle":"Scheduler: automations","icon":"book-open","href":"/cookbook/scheduler-automations"},{"title":"Recipe: Cross-Layer Debugging with 3 Knowledge Bases","sidebarTitle":"Cross-Layer Debugging","icon":"diagram-project","href":"/cookbook/cross-layer-knowledge-debug"}]},{"group":"Reference","icon":"rectangle-list","pages":[{"title":"Complete Command Reference","sidebarTitle":"Command Reference","icon":"rectangle-list","href":"/reference/command-reference"},{"title":"Environment Variables","sidebarTitle":"Environment Variables","icon":"sliders","href":"/reference/environment-variables"},{"title":"Configuration Reference (.env)","sidebarTitle":"Configuration (.env)","icon":"gear","href":"/reference/configuration"},{"title":"MCP Configuration (mcp_servers.json)","sidebarTitle":"MCP Config","icon":"gear","href":"/reference/mcp-config"},{"title":"Architecture and Code Structure","sidebarTitle":"Architecture","icon":"sitemap","href":"/reference/architecture"},{"group":"REST API","icon":"code","pages":[{"group":"Introduction","icon":"compass","pages":[{"title":"API Overview","sidebarTitle":"Overview","icon":"compass","href":"/reference/api/overview"}]},{"group":"Incidents","icon":"siren-on","pages":[{"title":"List Incidents","openapi":"GET /incidents","icon":"list","href":"/reference/api/list-incidents"},{"title":"Get Incident","openapi":"GET /incidents/{name}","icon":"magnifying-glass","href":"/reference/api/get-incident"},{"title":"Acknowledge Incident","openapi":"POST /incidents/{name}/acknowledge","icon":"check","href":"/reference/api/acknowledge-incident"},{"title":"Resolve Incident","openapi":"POST /incidents/{name}/resolve","icon":"circle-check","href":"/reference/api/resolve-incident"},{"title":"Snooze Incident","openapi":"POST /incidents/{name}/snooze","icon":"clock","href":"/reference/api/snooze-incident"},{"title":"Get Incident Timeline","openapi":"GET /incidents/{name}/timeline","icon":"timeline","href":"/reference/api/get-timeline"},{"title":"Get Incident Remediation","openapi":"GET /incidents/{name}/remediation","icon":"wrench","href":"/reference/api/get-remediation"}]},{"group":"AI Insights","icon":"lightbulb","pages":[{"title":"List AI Insights","openapi":"GET /aiinsights","icon":"list","href":"/reference/api/list-aiinsights"},{"title":"Get AI Insight","openapi":"GET /aiinsights/{name}","icon":"lightbulb","href":"/reference/api/get-aiinsight"}]},{"group":"Remediations","icon":"wrench","pages":[{"title":"List Remediations","openapi":"GET /remediations","icon":"list","href":"/reference/api/list-remediations"},{"title":"Get Remediation Plan","openapi":"GET /remediations/{name}","icon":"wrench","href":"/reference/api/get-remediation-detail"}]},{"group":"Runbooks","icon":"book-open","pages":[{"title":"List Runbooks","openapi":"GET /runbooks","icon":"list","href":"/reference/api/list-runbooks"},{"title":"Get Runbook","openapi":"GET /runbooks/{name}","icon":"book-open","href":"/reference/api/get-runbook"},{"title":"Create Runbook","openapi":"POST /runbooks","icon":"plus","href":"/reference/api/create-runbook"},{"title":"Update Runbook","openapi":"PUT /runbooks/{name}","icon":"pen-to-square","href":"/reference/api/update-runbook"},{"title":"Delete Runbook","openapi":"DELETE /runbooks/{name}","icon":"trash","href":"/reference/api/delete-runbook"}]},{"group":"Approvals","icon":"circle-check","pages":[{"title":"List Approvals","openapi":"GET /approvals","icon":"list","href":"/reference/api/list-approvals"},{"title":"Get Approval","openapi":"GET /approvals/{name}","icon":"magnifying-glass","href":"/reference/api/get-approval"},{"title":"Approve Request","openapi":"POST /approvals/{name}/approve","icon":"circle-check","href":"/reference/api/approve"},{"title":"Reject Request","openapi":"POST /approvals/{name}/reject","icon":"circle-xmark","href":"/reference/api/reject"}]},{"group":"SLOs","icon":"gauge","pages":[{"title":"List SLOs","openapi":"GET /slos","icon":"list","href":"/reference/api/list-slos"},{"title":"Get SLO","openapi":"GET /slos/{name}","icon":"gauge","href":"/reference/api/get-slo"},{"title":"Get SLO Error Budget","openapi":"GET /slos/{name}/budget","icon":"coins","href":"/reference/api/get-slo-budget"}]},{"group":"PostMortems","icon":"magnifying-glass-chart","pages":[{"title":"List PostMortems","openapi":"GET /postmortems","icon":"list","href":"/reference/api/list-postmortems"},{"title":"Get PostMortem","openapi":"GET /postmortems/{name}","icon":"magnifying-glass","href":"/reference/api/get-postmortem"},{"title":"Review PostMortem","openapi":"POST /postmortems/{name}/review","icon":"user-pen","href":"/reference/api/review-postmortem"},{"title":"Developer Feedback","openapi":"POST /postmortems/{name}/feedback","icon":"comment","href":"/reference/api/feedback-postmortem"},{"title":"Acknowledge Human Action","openapi":"POST /postmortems/{name}/ack-human-action","icon":"user-check","href":"/reference/api/ack-human-action-postmortem"},{"title":"Close PostMortem","openapi":"POST /postmortems/{name}/close","icon":"lock","href":"/reference/api/close-postmortem"}]},{"group":"Analytics","icon":"chart-line","pages":[{"title":"Analytics Summary","openapi":"GET /analytics/summary","icon":"chart-line","href":"/reference/api/analytics-summary"},{"title":"Analytics MTTR","openapi":"GET /analytics/mttr","icon":"stopwatch","href":"/reference/api/analytics-mttr"},{"title":"Analytics MTTD","openapi":"GET /analytics/mttd","icon":"stopwatch","href":"/reference/api/analytics-mttd"},{"title":"Analytics Trends","openapi":"GET /analytics/trends","icon":"arrow-trend-up","href":"/reference/api/analytics-trends"},{"title":"Analytics Top Resources","openapi":"GET /analytics/top-resources","icon":"ranking-star","href":"/reference/api/analytics-top-resources"},{"title":"Analytics Remediation Stats","openapi":"GET /analytics/remediation-stats","icon":"chart-pie","href":"/reference/api/analytics-remediation-stats"},{"title":"Analytics Compliance","openapi":"GET /analytics/compliance","icon":"clipboard-check","href":"/reference/api/analytics-compliance"},{"title":"Analytics Capacity","openapi":"GET /analytics/capacity","icon":"server","href":"/reference/api/analytics-capacity"},{"title":"Analytics Cost","openapi":"GET /analytics/cost","icon":"coins","href":"/reference/api/analytics-cost"}]},{"group":"Clusters","icon":"diagram-project","pages":[{"title":"List Clusters","openapi":"GET /clusters","icon":"list","href":"/reference/api/list-clusters"},{"title":"Get Cluster","openapi":"GET /clusters/{name}","icon":"diagram-project","href":"/reference/api/get-cluster"},{"title":"List Policies","openapi":"GET /policies/{kind}","icon":"list-check","href":"/reference/api/list-policies"},{"title":"Get Policy","openapi":"GET /policies/{kind}/{name}","icon":"file-lines","href":"/reference/api/get-policy"},{"title":"Global Cluster Status","openapi":"GET /clusters/global-status","icon":"globe","href":"/reference/api/global-status"}]},{"group":"Federation","icon":"network-wired","pages":[{"title":"Federation Status","openapi":"GET /federation/status","icon":"network-wired","href":"/reference/api/federation-status"},{"title":"Federation Clusters","openapi":"GET /federation/clusters","icon":"list","href":"/reference/api/federation-clusters"},{"title":"Federation Correlations","openapi":"GET /federation/correlations","icon":"diagram-project","href":"/reference/api/federation-correlations"}]},{"group":"Audit","icon":"clipboard-check","pages":[{"title":"List Audit Events","openapi":"GET /audit","icon":"list","href":"/reference/api/list-audit"},{"title":"Export Audit","openapi":"GET /audit/export","icon":"file-export","href":"/reference/api/export-audit"}]},{"group":"Health","icon":"heart-pulse","pages":[{"title":"Health Endpoints","openapi":"GET /healthz","icon":"heart-pulse","href":"/reference/api/health-endpoints"}]}]}]},{"group":"Releases","icon":"rocket","tag":"v1.223.0","pages":[{"title":"Release notes","icon":"tag","href":"/releases"},{"title":"v1.223.0","tag":"Latest","href":"/releases/1.223.0"},{"title":"v1.222.0","href":"/releases/1.222.0"},{"title":"v1.221.3","href":"/releases/1.221.3"},{"title":"v1.221.2","href":"/releases/1.221.2"},{"title":"v1.221.1","href":"/releases/1.221.1"},{"title":"v1.221.0","href":"/releases/1.221.0"},{"title":"v1.220.0","href":"/releases/1.220.0"},{"title":"v1.219.0","href":"/releases/1.219.0"},{"title":"v1.218.0","href":"/releases/1.218.0"},{"title":"v1.217.0","href":"/releases/1.217.0"}]},{"group":"Help","icon":"life-ring","pages":[{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","icon":"life-ring","href":"/help/troubleshooting"},{"title":"Contributing to ChatCLI","sidebarTitle":"Contributing","icon":"code-pull-request","href":"/help/contributing"}]}]}]},{"language":"pt-BR","footer":{"socials":{"github":"https://github.com/diillson/chatcli","x":"https://x.com/diillson"},"links":[{"header":"Recursos","items":[{"label":"Documentação","href":"/pt"},{"label":"Cookbook","href":"/pt/cookbook/agent-refactoring"},{"label":"API Reference","href":"/pt/reference/api/overview"}]},{"header":"Comunidade","items":[{"label":"GitHub","href":"https://github.com/diillson/chatcli"},{"label":"Issues","href":"https://github.com/diillson/chatcli/issues"},{"label":"Discussions","href":"https://github.com/diillson/chatcli/discussions"},{"label":"Releases","href":"https://github.com/diillson/chatcli/releases"}]},{"header":"Distribuição","items":[{"label":"ArtifactHub","href":"https://artifacthub.io/packages/search?ts_query_web=chatcli"},{"label":"Helm Charts","href":"https://artifacthub.io/packages/helm/chatcli/chatcli"},{"label":"Container Registry","href":"https://github.com/diillson/chatcli/pkgs/container/chatcli"}]}]},"navbar":{"links":[{"href":"/pt/cookbook/agent-refactoring","label":"Cookbook"},{"href":"/pt/releases","label":"Releases"},{"href":"https://github.com/diillson/chatcli","type":"github"}],"primary":{"type":"button","label":"Instalar","href":"/pt/start/installation"}},"pages":[{"title":"pt-BR","href":"/pt/context/bootstrap-memory"}]}]},"title":"Bootstrap and Persistent Memory - ChatCLI","buildId":"dpl_CUnGQP1HgFUzoxatVC37y4zP83Vx","deploymentId":"dpl_CUnGQP1HgFUzoxatVC37y4zP83Vx","dynamics":[],"chunks":[]}