# nano-brain - Doramagic AI Context Pack

> Positioning: a pre-install experience and judgment asset. It helps the host AI get off to a good start, but it does not mean the project has already been installed, run, or validated.

## Sufficiency Principle

- **Sufficiency over compression**: The AI Context Pack should be sufficient for the host AI to understand the project's value, capability boundaries, entrypoints, risks, and evidence sources before starting work; it may be layered, but it does not aim for the shortest possible summary.
- **Compression policy**: Compress only noise and duplication, never context that affects judgment or the quality of the work.

## How the Host AI Should Use This

You are reading the AI Context Pack that Doramagic compiled for nano-brain. Treat it as pre-work context: help the user understand who it fits, what it can do, how to start, what must be verified after install, and where the risks are. Do not claim that you have already installed, run, or executed the target project.

## Claim Consumption Rules

- **Fact source**: Repo Evidence + Claim/Evidence Graph; the Human Wiki only supplies salience, terminology, and narrative structure.
- **Minimum status for a fact**: `supported`
- `supported`: May be used as a project fact, but the answer must cite the claim_id and evidence path.
- `weak`: Usable only as a low-confidence lead; the user must be asked to keep verifying.
- `inferred`: Usable only for risk notes or open questions; must not be packaged as a project fact.
- `unverified`: Must not be used as fact; state clearly that evidence is insufficient.
- `contradicted`: Must show the conflicting sources and must not force a single version on the user's behalf.

## Who It Fits Best

- **Users who want to bring professional workflows into a host AI**: The repo contains Skill documents. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al. Claim: `clm_0003` supported 0.86

## What It Can Do

- **AI Skill / Agent Instruction Asset Library** (Previewable before install): The project contains Skill or Agent instruction files that a host AI can read, useful for bringing professional workflows into hosts like Claude, Codex, or Cursor. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow** (Verify after install): The project documentation contains runnable commands; real use requires running them in a local or host environment. Evidence: `.opencode/skills/harness-init/SKILL.md`, `.opencode/skills/nano-brain/references/http-api.md`, `.planning/phases/08-session-harvest-unification-ticket-linking/08-03-PLAN.md`, `.planning/phases/13-interactive-init-wizard-one-command-interactive-setup-detect/13-08-PLAN.md` Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86

## How to Start

- `npm install -g @openspec/cli` Evidence: `.opencode/skills/harness-init/SKILL.md` Claim: `clm_0004` supported 0.86
- `curl -sf "$BASE/health" >/dev/null && echo "ready"` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0005` unverified 0.25
- `curl -s "$BASE/api/status" | jq` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0006` unverified 0.25
- `curl -s -X POST "$BASE/api/v1/search" \` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0007` unverified 0.25
- `curl -s -X POST "$BASE/api/v1/vsearch" \` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0008` unverified 0.25
- `curl -s -X POST "$BASE/api/v1/query" \` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0009` unverified 0.25
- `curl -s -X POST "$BASE/api/v1/write" \` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0010` unverified 0.25
- `curl -s -X POST "$BASE/api/harvest" | jq` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0011` unverified 0.25
- `curl -s -X POST "$BASE/api/v1/reindex" \` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0012` unverified 0.25
- `curl -s -X POST "$BASE/api/reload-config" | jq` Evidence: `.opencode/skills/nano-brain/references/http-api.md` Claim: `clm_0013` unverified 0.25

## Continue-or-Stop Decision Card

- **Current recommendation**: Sandbox trial only
- **Why**: The project has signals of install commands, host configuration, or local writes; do not go straight into your primary environment—trial it in isolation first.

### 30-Second Read

- **What to do now**: Sandbox trial only
- **Minimum safe next step**: Run Prompt Preview first; if you still want to install, trial only in an isolated environment
- **Do not trust yet**: Real output quality cannot be trusted before install.
- **Continuing will touch**: Command execution, Host AI configuration, Local environment or project files

### What You Can Trust Now

- **Target-audience signal: Users who want to bring professional workflows into a host AI** (supported): Backed by a supported claim or project evidence, but that still is not the same as real install results. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al. Claim: `clm_0003` supported 0.86
- **Capability exists: AI Skill / Agent Instruction Asset Library** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **Capability exists: Command-Line Startup or Install Flow** (supported): You can trust that the project contains signals of this capability; whether it fits your specific task still needs trial or after-install verification. Evidence: `.opencode/skills/harness-init/SKILL.md`, `.opencode/skills/nano-brain/references/http-api.md`, `.planning/phases/08-session-harvest-unification-ticket-linking/08-03-PLAN.md`, `.planning/phases/13-interactive-init-wizard-one-command-interactive-setup-detect/13-08-PLAN.md` Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **There are Quick Start / install-command signals** (supported): You can trust that the docs mention a startup or install entrypoint; do not run it directly in your primary environment because of that. Evidence: `.opencode/skills/harness-init/SKILL.md` Claim: `clm_0004` supported 0.86

### What You Cannot Trust Yet

- **Real output quality cannot be trusted before install.** (unverified): Prompt Preview can only show how it guides you; it cannot prove result quality in the real project.
- **Host AI version compatibility cannot be trusted before install.** (unverified): Host loading rules and version differences across Claude, Cursor, Codex, Gemini, and others must be verified in a real environment.
- **That it will not pollute your existing host AI's behavior cannot be trusted directly.** (inferred): Skill, plugin, and AGENTS/CLAUDE/GEMINI instructions may change the host AI's default behavior. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al.
- **Safe rollback cannot be assumed by default.** (unverified): Unless the project clearly provides uninstall and recovery instructions, verify in an isolated environment first.
- **After a real install, is it compatible with the user's current host AI version?** (unverified): Compatibility can only be verified in the actual host environment.
- **Does the project's output quality meet the user's specific task?** (unverified): The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **Do the install commands require network access, permissions, or global writes?** (unverified): This affects install risk in both enterprise and personal environments. Evidence: `.opencode/skills/harness-init/SKILL.md`

### What Continuing Will Touch

- **Command execution**: Package managers, network downloads, the local plugin directory, project config, or the user's home directory. Why: Running the very first command can already change your environment; decide whether it is worth running first. Evidence: `.opencode/skills/harness-init/SKILL.md`, `.opencode/skills/nano-brain/references/http-api.md`, `.planning/phases/08-session-harvest-unification-ticket-linking/08-03-PLAN.md`, `.planning/phases/13-interactive-init-wizard-one-command-interactive-setup-detect/13-08-PLAN.md`
- **Host AI configuration**: The plugin, Skill, or rule-loading config of hosts like Claude/Codex/Cursor/Gemini/OpenCode. Why: Host configuration changes how the AI works afterward and may conflict with the user's existing rules. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al.
- **Local environment or project files**: Install results, plugin caches, project config, or local dependency directories. Why: The write scope and rollback path cannot be proven before install and need isolated verification. Evidence: `.opencode/skills/harness-init/SKILL.md`, `.opencode/skills/nano-brain/references/http-api.md`, `.planning/phases/08-session-harvest-unification-ticket-linking/08-03-PLAN.md`, `.planning/phases/13-interactive-init-wizard-one-command-interactive-setup-detect/13-08-PLAN.md`
- **Host AI context**: The AI Context Pack, Prompt Preview, Skill routing, risk rules, and project facts. Why: Importing context affects the host AI's later judgment, so avoid packaging unverified items as facts.

### Minimum Safe Next Steps

- **Run Prompt Preview first**: Use a pre-install interactive trial to judge whether the way of working fits; it needs no authorization or environment change. (applies when: Applies to any project, especially when output quality is unknown.)
- **Trial-install only in an isolated directory or a test account**: Avoid letting install commands pollute your primary host AI, real projects, or home directory. (applies when: When there are signals of command execution, plugin config, or local writes.)
- **Back up your host AI configuration first**: Skill, plugin, and rule files may change the default behavior of Claude/Cursor/Codex. (applies when: When there is a plugin manifest, a Skill, or a host rule entrypoint.)
- **After install, verify just one minimal task**: Verify loading, compatibility, output quality, and rollback first, then decide whether to use it deeply. (applies when: When moving from a trial into a real workflow.)

### Exit Plan

- **Preserve the pre-install state**: Record the original host config and project state so you can later judge whether it is recoverable.
- **Be ready to remove the host plugin / Skill / rule entrypoint**: If behavior is off after the trial install, you can restore the host AI to its pre-trial state.
- **Record the install commands and written paths**: Without clear uninstall instructions, you at least need to know which directories or configs to clean up manually.
- **If there is no rollback path, do not enter your primary environment**: No rollback is a blocker before continuing; do not proceed on trust or luck.

## What Can Only Be Previewed

- Explain who the project fits and what it can do
- Demonstrate a typical conversation flow based on project docs
- Help the user decide whether it is worth installing or researching further

## What Must Be Verified After Install

- Actually installing the Skill, plugin, or CLI
- Running scripts, modifying local files, or accessing external services
- Verifying real output quality, performance, and compatibility

## Boundary & Risk Decision Card

- **Mistaking the pre-install preview for a real run**: The user may overestimate how much configuration, permission, and compatibility verification the project has already done. Mitigation: Clearly separate prompt_preview_can_do from runtime_required. Claim: `clm_0028` inferred 0.45
- **Command execution will modify the local environment**: Install commands may write to the user's home directory, the host plugin directory, or project configuration. Mitigation: Run in an isolated environment or a test account first. Evidence: `.opencode/skills/harness-init/SKILL.md`, `.opencode/skills/nano-brain/references/http-api.md`, `.planning/phases/08-session-harvest-unification-ticket-linking/08-03-PLAN.md`, `.planning/phases/13-interactive-init-wizard-one-command-interactive-setup-detect/13-08-PLAN.md` Claim: `clm_0029` supported 0.86
- **To confirm**: After a real install, is it compatible with the user's current host AI version?. Why: Compatibility can only be verified in the actual host environment.
- **To confirm**: Does the project's output quality meet the user's specific task?. Why: The pre-install preview can only show flow and boundaries; it cannot replace real evaluation.
- **To confirm**: Do the install commands require network access, permissions, or global writes?. Why: This affects install risk in both enterprise and personal environments.

## Pre-Work Working Context

### Loading Order

- First read how_to_use.host_ai_instruction to establish the boundaries of this pre-install judgment asset.
- Read claim_graph_summary to confirm facts come from the Claim/Evidence Graph, not the Human Wiki narrative.
- Then read intended_users, capabilities, and quick_start_candidates to judge whether the user is a match.
- When you need to carry out a concrete task, check role_skill_index first, then evidence_index.
- For real install, file modification, network access, performance, or compatibility questions, turn to risk_card and boundaries.runtime_required.

### Task Routes

- **AI Skill / Agent Instruction Asset Library**: Use role_skill_index / evidence_index to help the user pick a usable role, Skill, or workflow first. Boundary: Can be experienced via a pre-install Prompt. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`, `.claude/skills/openspec-archive-change/SKILL.md`, `.claude/skills/openspec-explore/SKILL.md`, `.claude/skills/openspec-propose/SKILL.md` et al. Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86
- **Command-Line Startup or Install Flow**: State that this is an after-install capability first, then give a pre-install checklist. Boundary: Must be verified after a real install or run. Evidence: `.opencode/skills/harness-init/SKILL.md`, `.opencode/skills/nano-brain/references/http-api.md`, `.planning/phases/08-session-harvest-unification-ticket-linking/08-03-PLAN.md`, `.planning/phases/13-interactive-init-wizard-one-command-interactive-setup-detect/13-08-PLAN.md` Claim: `clm_0001` supported 0.86, `clm_0002` supported 0.86

### Context Scale

- Total files: 1587
- Important-file coverage: 40/1587
- Evidence index entries: 80
- Role / Skill entries: 14

### Handling Insufficient Evidence

- **missing_evidence**: State that evidence is insufficient and ask the user for the target file, a README section, or after-install verification records; do not fill in facts.
- **out_of_scope_request**: State that the task is beyond the current AI Context Pack's evidence scope and suggest the user check the Human Manual or verify after a real install.
- **runtime_request**: Provide a pre-install checklist and command sources, but do not run commands for the user or claim they have been run.
- **source_conflict**: Show the conflicting sources side by side, mark them as unverified, and do not force a single version.

## Prompt Recipes

### Fit assessment

- Goal: Judge whether this project fits the user's current task.
- Expected output: A fit conclusion, key reasons, evidence citations, what can be previewed before install, what must be verified after install, and a next-step recommendation.

```text
Based on the AI Context Pack for nano-brain, ask me 3 necessary questions first, then judge whether it fits my task. The answer must cover: who it fits, what it can do, what it cannot do, whether it is worth installing, and where the evidence comes from. Every project fact must cite evidence_refs, source_paths, or a claim_id.
```

### Pre-install experience

- Goal: Let the user feel the core workflow before installing, while avoiding packaging the preview as real capability or a marketing promise.
- Expected output: An experience script with boundary labels, an after-install verification checklist, and a cautious recommendation; with no real-run promises or strong marketing language.

```text
Treat nano-brain as a pre-install experience asset, not an already-installed tool or a real runtime environment.

Output exactly four parts:
1. Ask me 3 necessary questions first.
2. Give an "experience script": use the three labels [Previewable before install], [Must verify after install], and [Insufficient evidence] to show how it might guide the workflow.
3. Give an after-install verification checklist: list which capabilities can only be confirmed after a real install, real host loading, and a real project run.
4. Give a cautious recommendation: only "worth researching/trialing further", "add information before deciding", or "not recommended to continue"; do not endorse the project.

Hard boundaries:
- Do not claim you have installed, run, executed tests, modified files, or produced real results.
- Do not write promise-like phrasing such as "auto-adapts", "guarantees passing", "perfect fit", or "strongly recommend installing".
- If you describe how it works after install, you must use a conditional such as "if installed successfully and the host loads the Skill correctly, it might...".
- The experience script may only be written as "example lines / hypothetical flow": use "might ask / might suggest / might show", not "has written, has generated, has passed, is running, is generating".
- Prompt Preview does not hand out install commands; if the user is ready to trial, only prompt them to read Quick Start and the Risk Card first and to verify in an isolated environment.
- Every project fact must come from a supported claim, evidence_refs, or source_paths; inferred/unverified items can only be risks or open questions.

```

### Role / Skill selection

- Goal: Pick the best-matching asset from the project's roles or Skills.
- Expected output: A list of candidate roles or Skills, each with an applicable scenario, evidence paths, risk boundary, and whether after-install verification is needed.

```text
Read role_skill_index and recommend 3-5 of the most relevant roles or Skills for my target task. For each recommendation, state the applicable scenario, likely output, risk boundary, and evidence_refs.
```

### Risk pre-check

- Goal: Identify environment, permission, rule-conflict, and quality risks before installing or adopting.
- Expected output: A checklist of environment, permission, dependency, license, host-conflict, quality risk, and unknown items.

```text
Based on risk_card, boundaries, and quick_start_candidates, give me a pre-install risk pre-check list. Do not run commands for me; only explain what I should check, why, and what impact a failure would have.
```

### Host AI kickoff instruction

- Goal: Turn the project context into a host AI instruction for the start of a conversation.
- Expected output: A pre-work instruction with clear boundaries and clear evidence citations, suitable to copy to a host AI.

```text
Based on the AI Context Pack for nano-brain, generate a pre-work instruction I can paste to my host AI. This instruction must obey not_runtime=true and must not claim the project has been installed, run, or produced real results.
```

## Role / Skill Index

- Indexed 14 role / Skill / project-doc entries.

- **openspec-apply-change** (skill): Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-apply-change”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`
- **openspec-archive-change** (skill): Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-archive-change”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/openspec-archive-change/SKILL.md`
- **openspec-explore** (skill): Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-explore”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/openspec-explore/SKILL.md`
- **openspec-propose** (skill): Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-propose”, use it for a pre-install experience first, then decide whether to install. Evidence: `.claude/skills/openspec-propose/SKILL.md`
- **Debugging Skill** (skill): Use mode=debugging on memory search or memory query to search code, sessions, and config in a single call. Activation hint: When the user's task is highly relevant to the workflow described by “Debugging Skill”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/debugging/SKILL.md`
- **deep-design** (skill): MANDATORY for any non-trivial feature planning. Multi-agent pipeline: Metis scope/risk + Oracle architecture in parallel → cross-critique → confidence-scored synthesis → early Momus sanity check → OpenSpec proposal → full Momus review. MUST USE when: user describes a feature that touches multiple services or modules, user wants to plan/design/architect before coding, user says 'plan this', 'design this', 'think this… Activation hint: When the user's task is highly relevant to the workflow described by “deep-design”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/deep-design/SKILL.md`
- **harness-init** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “harness-init”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/harness-init/SKILL.md`
- **nano-brain** (skill): Persistent memory + code intelligence for AI coding agents. Hybrid search BM25 + vector + RRF , cross-session recall, symbol graph analysis, impact checks, OpenCode/Claude Code session harvesting. Use when you need to recall prior decisions, search across sessions/codebase, trace symbol callers/callees, or persist long-term context. Activation hint: When the user's task is highly relevant to the workflow described by “nano-brain”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/nano-brain/SKILL.md`
- **openspec-apply-change** (skill): Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-apply-change”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/openspec-apply-change/SKILL.md`
- **openspec-archive-change** (skill): Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-archive-change”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/openspec-archive-change/SKILL.md`
- **openspec-explore** (skill): Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-explore”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/openspec-explore/SKILL.md`
- **openspec-propose** (skill): Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation. Activation hint: When the user's task is highly relevant to the workflow described by “openspec-propose”, use it for a pre-install experience first, then decide whether to install. Evidence: `.opencode/skills/openspec-propose/SKILL.md`
- **SKILL** (skill):  Activation hint: When the user's task is highly relevant to the workflow described by “SKILL”, use it for a pre-install experience first, then decide whether to install. Evidence: `docs/SKILL.md`
- **nano-brain** (skill): Persistent memory + code intelligence for AI coding agents. Hybrid search BM25 + vector + RRF + recency , cross-session recall, symbol analysis, impact checks, knowledge graph, OpenCode/Claude Code session harvesting. Use this skill when you need to recall prior decisions across sessions, search across multiple codebases, trace symbol callers/callees, analyze code impact what breaks if X changes , persist long-term… Activation hint: When the user's task is highly relevant to the workflow described by “nano-brain”, use it for a pre-install experience first, then decide whether to install. Evidence: `skills/nano-brain/SKILL.md`

## Evidence Index

- Indexed 80 evidence entries.

- **Architecture Decision Records ADRs** (documentation): Durable records of architectural and design decisions. Each ADR captures why a decision was made, what alternatives were considered, and the tradeoffs accepted. Evidence: `docs/decisions/README.md`
- **Evidence** (documentation): Screenshots, recordings, and test artifacts for high-risk changes. Evidence: `docs/evidence/README.md`
- **Evidence: fix-summary-workspace-registration-leaks 238** (documentation): Evidence: fix-summary-workspace-registration-leaks 238 Evidence: `docs/evidence/fix-summary-workspace-registration-leaks/README.md`
- **Vue SFC Code Intelligence Support — Design Pipeline** (documentation): Vue SFC Code Intelligence Support — Design Pipeline Evidence: `docs/evidence/vue-sfc-design/README.md`
- **Harness Gate Instructions** (documentation): This directory contains per-gate protocol documents for the harness loop plugin. Evidence: `docs/harness/gates/README.md`
- **Agent Skills** (documentation): This directory contains skills https://docs.claude.com/en/docs/claude-code/skills that teach AI coding agents Claude Code, OpenCode, MCP-aware tools how to use nano-brain effectively. Evidence: `skills/README.md`
- **Rails Extraction Benchmarks** (documentation): End-to-end benchmarks measuring nano-brain's Ruby/Rails extraction quality and performance: route parsing, control-flow graphs CFGs , and flow builder end-to-end. Evidence: `benchmarks/rails/README.md`
- **Rails Capability Benchmark** (documentation): Static end-to-end benchmark that measures how well the live nano-brain server helps understand a Rails photo-print pipeline codebase. Each task is a hand-curated developer/support question with ground-truth symbols/files that a correct answer must surface. Evidence: `benchmarks/rails/capability/README.md`
- **TypeScript Capability Benchmark** (documentation): Agent-oriented benchmark profile for a TypeScript/JavaScript CS2 item-trading workspace. The committed dataset uses privacy-safe placeholders; local runs provide the real workspace hash through NANO BRAIN WORKSPACE . Evidence: `benchmarks/typescript/capability/README.md`
- **Vue Capability Benchmark** (documentation): Static end-to-end benchmark that measures how well the live nano-brain server helps understand a Vue.js codebase. Each task is a hand-curated developer question with ground-truth symbols/files that a correct answer must surface. Evidence: `benchmarks/vue/capability/README.md`
- **Package** (package_manifest): { "name": "@nano-step/nano-brain", "version": "0.0.0-dev", "description": "Persistent memory and code intelligence for AI coding agents", "bin": { "nano-brain": "npm/run.js" }, "scripts": { "postinstall": "node npm/postinstall.js" }, "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git+https://github.com/nano-step/nano-brain.git" }, "keywords": "ai", "memory", "mcp", "coding-agent", "search", "pgvector" , "author": "nano-step", "license": "MIT", "files": "npm/", "README.md", "LICENSE" , "dependencies": { "@nano-step/oh-my-harness": "^1.1.3" } } Evidence: `package.json`
- **SKILL** (skill_instruction): SKILL Evidence: `docs/SKILL.md`
- **Package** (package_manifest): {"dependencies":{"nuxt":"^3.0.0"}} Evidence: `internal/graph/testdata/nuxt-fixture/package.json`
- **CLAUDE.md** (documentation): This file provides guidance to Claude Code claude.ai/code when working with code in this repository. Evidence: `CLAUDE.md`
- **nano-brain Setup Guide for AI Agents** (documentation): nano-brain Setup Guide for AI Agents Evidence: `docs/SETUP_AGENT.md`
- **cmd/nano-brain — CLI Dispatcher + Server Entry Point** (documentation): cmd/nano-brain — CLI Dispatcher + Server Entry Point Evidence: `cmd/nano-brain/AGENTS.md`
- **internal/embed — Embedding Queue** (documentation): Purpose: Embedding queue — async worker that generates vector embeddings via Ollama or Voyage AI. Evidence: `internal/embed/AGENTS.md`
- **internal/graph — AGENTS.md** (documentation): Code-intelligence graph layer: framework route extraction, outbound integration edges, and per-function control-flow graphs CFGs . Built on the vendored gotreesitter library Go bindings over tree-sitter grammars . Evidence: `internal/graph/AGENTS.md`
- **harvest package** (documentation): Session harvesting — ingests OpenCode and Claude Code AI sessions into nano-brain storage. Evidence: `internal/harvest/AGENTS.md`
- **internal/mcp — MCP Protocol Server** (documentation): MCP Model Context Protocol server — 16 tools for AI agent memory and code intelligence access. Evidence: `internal/mcp/AGENTS.md`
- **internal/search** (documentation): Hybrid search pipeline: BM25 + vector + RRF fusion + recency decay + reranking. Evidence: `internal/search/AGENTS.md`
- **handlers** (documentation): HTTP handler functions for all REST API endpoints. One file per endpoint group. Evidence: `internal/server/handlers/AGENTS.md`
- **storage — AGENTS.md** (documentation): PostgreSQL storage layer — pool management, sqlc-generated queries, goose migrations. Evidence: `internal/storage/AGENTS.md`
- **nano-brain** (skill_instruction): Persistent memory for AI coding agents. Hybrid search BM25 + semantic + LLM reranking across past sessions, codebase, notes, and daily logs. Evidence: `SKILL.md`
- **Implementing: schema:** (skill_instruction): Implement tasks from an OpenSpec change. Evidence: `.claude/skills/openspec-apply-change/SKILL.md`
- **Archive Complete** (skill_instruction): Archive a completed change in the experimental workflow. Evidence: `.claude/skills/openspec-archive-change/SKILL.md`
- **The Stance** (skill_instruction): Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes. Evidence: `.claude/skills/openspec-explore/SKILL.md`
- **Skill** (skill_instruction): Propose a new change - create the change and generate all artifacts in one step. Evidence: `.claude/skills/openspec-propose/SKILL.md`
- **Debugging Skill** (skill_instruction): Use mode=debugging on memory search or memory query to search code, sessions, and config in a single call. Evidence: `.opencode/skills/debugging/SKILL.md`
- **Deep Design Pipeline** (skill_instruction): A 7-phase orchestration pipeline that turns a user's feature idea into a reviewed, implementation-ready OpenSpec proposal. Inspired by the LLM Council pattern: agents analyze independently, then cross-critique each other's outputs, conflicts are resolved using confidence scoring not hard rules , and a sanity-check gate catches design flaws before expensive spec-writing begins. Evidence: `.opencode/skills/deep-design/SKILL.md`
- **Harness Init** (skill_instruction): Generate a production-ready engineering harness in the current project. Evidence: `.opencode/skills/harness-init/SKILL.md`
- **nano-brain** (skill_instruction): Persistent memory + code-intel daemon. Agents talk to it via MCP — streamable HTTP at /mcp on the daemon. HTTP is available as a fallback for scripts and integration tests. Evidence: `.opencode/skills/nano-brain/SKILL.md`
- **Implementing: schema:** (skill_instruction): Implement tasks from an OpenSpec change. Evidence: `.opencode/skills/openspec-apply-change/SKILL.md`
- **Archive Complete** (skill_instruction): Archive a completed change in the experimental workflow. Evidence: `.opencode/skills/openspec-archive-change/SKILL.md`
- **The Stance** (skill_instruction): Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes. Evidence: `.opencode/skills/openspec-explore/SKILL.md`
- **Skill** (skill_instruction): Propose a new change - create the change and generate all artifacts in one step. Evidence: `.opencode/skills/openspec-propose/SKILL.md`
- **nano-brain — Persistent Memory + Code Intelligence** (skill_instruction): nano-brain — Persistent Memory + Code Intelligence Evidence: `skills/nano-brain/SKILL.md`
- **.opencode/harness.config.json Reference** (documentation): .opencode/harness.config.json Reference Evidence: `.opencode/harness.config.README.md`
- **AGENTS SNIPPET** (documentation): AGENTS SNIPPET Evidence: `docs/AGENTS_SNIPPET.md`
- **Context Retrieval Rules** (documentation): Agents working in this harness MUST read only the files listed below for each phase × lane combination. Reading more is token waste . Reading less risks missing required rules. Evidence: `docs/CONTEXT_RULES.md`
- **Action plan — dashboard split executable backlog** (documentation): Action plan — dashboard split executable backlog Evidence: `docs/DASHBOARD_SPLIT_ACTION_PLAN.md`
- **Plan — Split the dashboard into its own repo; nano-brain becomes API-only** (documentation): Plan — Split the dashboard into its own repo; nano-brain becomes API-only Evidence: `docs/DASHBOARD_SPLIT_PLAN.md`
- **Feature Showcase** (documentation): Visual examples of nano-brain's capabilities. Evidence: `docs/FEATURES.md`
- **Feature Intake** (documentation): Every implementation prompt enters the intake gate before code changes. The human does not need to classify risk. The harness does. Evidence: `docs/FEATURE_INTAKE.md`
- **Migration Plan — Unify graph visualization on AntV G6** (documentation): Migration Plan — Unify graph visualization on AntV G6 Evidence: `docs/G6_MIGRATION_PLAN.md`
- **Glossary** (documentation): Closed-set vocabulary for the nano-brain harness. When a term appears in any harness doc HARNESS.md , HARNESS GATES.md , FEATURE INTAKE.md , ADRs, story templates it carries the meaning defined here — no other meaning is permitted. Evidence: `docs/GLOSSARY.md`
- **Harness Backlog** (documentation): Use this file when an agent discovers a missing harness capability but should not change the operating model immediately. Evidence: `docs/HARNESS_BACKLOG.md`
- **Harness Gates — nano-brain v2** (documentation): Gate specification for the nano-brain v2 Go project. Each gate defines the checks required before proceeding to the next phase of development. Evidence: `docs/HARNESS_GATES.md`
- **Harness Runner Contract** (documentation): Status: legacy interface. The autonomous gate-loop plugin that consumed this contract was OpenCode-only .opencode/plugin/harness-loop/ , /harness-on and is no longer the driver. On Claude Code, gates are driven by the /harness-gsd command autonomous pipeline or the harness-check skill manual runs — see docs/HARNESS.md § Entry points. This document remains the authoritative spec for scripts/harness-check.sh --json output, which any driver hook, CI, future plugin can consume. "Plugin" below refers to the legacy OpenCode consumer. Evidence: `docs/HARNESS_RUNNER_CONTRACT.md`
- **nano-brain Roadmap** (documentation): nano-brain is a persistent memory and code intelligence layer for AI coding agents. Goal: agents know the project context, decision history, and can anticipate what's needed next — across sessions, machines, and team members. Evidence: `docs/ROADMAP.md`
- **Trace Specification** (documentation): A trace is a structured record of what an agent did during a task. Traces feed Retro Gate ⑥ metric collection and serve as institutional memory for future agents. Evidence: `docs/TRACE_SPEC.md`
- **nano-brain v2 — System Architecture Diagram** (documentation): nano-brain v2 — System Architecture Diagram Evidence: `docs/architecture-diagram.md`
- **Architecture Decision Document** (documentation): This document builds collaboratively through step-by-step discovery. Sections are appended as we work through each architectural decision together. Evidence: `docs/architecture.md`
- **nano-brain-greenfield - Epic Breakdown** (documentation): nano-brain-greenfield - Epic Breakdown Evidence: `docs/epics.md`
- **Harness Philosophy** (documentation): The app is what users touch. The harness is what agents touch. Evidence: `.opencode/skills/harness-init/docs/PHILOSOPHY.md`
- **Decision Log — nano-brain v2 brief** (documentation): 2026-05-22T05:30:00Z — Run started - Branch: b-main commit e561fac - Facilitator: Sisyphus orchestrator - User: BMad - Communication language: Vietnamese - Document output language: English - Reference inputs available: docs/reference-prd.md, docs/reference-readme.md - Source materials beyond references: none Evidence: `docs/briefs/brief-nano-brain-greenfield-2026-05-22/.decision-log.md`
- **Product Brief: nano-brain v2** (documentation): Status: Discovery complete. Brief ready for review. North Star locked 2026-05-22 : Reliability / correctness. Other dimensions are secondary. Recreation thesis locked 2026-05-22 : Full rewrite of nano-brain — same feature set, new architecture, no refactor. Evidence: `docs/briefs/brief-nano-brain-greenfield-2026-05-22/brief.md`
- **Issue 234 Fix Verification** (documentation): Issue : CLI HTTP client ignores --config / NANO BRAIN CONFIG for server host/port — only reads NANO BRAIN HOST / NANO BRAIN PORT env vars Evidence: `docs/evidence/234/fix-verification.md`
- **Issue 234 Fix Verification** (documentation): Issue : CLI HTTP client ignores --config / NANO BRAIN CONFIG for server host/port — only reads NANO BRAIN HOST / NANO BRAIN PORT env vars Evidence: `docs/evidence/234/self-review-234.md`
- **Issue 235 Fix Verification** (documentation): Issue : CLI --json output mixes zerolog INFO lines with response on stdout, breaking jq pipelines Evidence: `docs/evidence/235/fix-verification.md`
- The remaining 20 evidence entries are in `AI_CONTEXT_PACK.json` or `EVIDENCE_INDEX.json`.

## Rules the Host AI Must Follow

- **Treat this asset as pre-work context, not a runtime environment.**: The AI Context Pack contains only an evidence-backed understanding of the project, not the project's executable state. Evidence: `docs/decisions/README.md`, `docs/evidence/README.md`, `docs/evidence/fix-summary-workspace-registration-leaks/README.md`
- **When answering the user, distinguish what can be previewed from what can only be verified after install.**: The consumer value of the pre-install experience comes from reducing bad installs and misjudgments, not from pretending to be a real run. Evidence: `docs/decisions/README.md`, `docs/evidence/README.md`, `docs/evidence/fix-summary-workspace-registration-leaks/README.md`

## Questions the User Should Answer First

- Which host AI or local environment do you plan to use it in?
- Do you just want to experience the workflow first, or are you ready to actually install?
- What matters most to you: install cost, output quality, or conflicts with your existing rules?

## Acceptance Checks

- Every capability claim can be traced back to a file path in evidence_refs.
- AI_CONTEXT_PACK.md does not package previews as a real run.
- The user can understand who it fits, what it can do, how to start, and the risk boundaries within 3 minutes.

---

## Doramagic Context Augmentation

The following sections strengthen the repository context for a host AI. Human Manual data is a reading route, and pitfall notes become operating constraints.

## Human Manual Outline

Usage rule: this is only a reading route and salience signal, not factual authority. Concrete claims must still return to repo evidence or Claim Graph.

Host AI hard rules:
- Do not treat page titles, section order, summaries, or importance values as factual project evidence.
- When explaining the Human Manual outline, state that it is only a reading route or salience signal.
- Capability, installation, compatibility, runtime state, and risk claims must cite repo evidence, source paths, or Claim Graph.

- **Overview, Installation & Quick Start**: importance `high`
  - source_paths: README.md, install.sh, package.json, cmd/nano-brain/init.go, cmd/nano-brain/main.go
- **MCP Tools, Workspaces & Agent Wiring**: importance `high`
  - source_paths: internal/mcp/server.go, internal/mcp/tools.go, internal/mcp/streamable.go, internal/mcp/sse.go, cmd/nano-brain/mcp_client_config.go
- **Code Intelligence: Symbols, Graph & Impact Analysis**: importance `high`
  - source_paths: internal/graph/registry.go, internal/graph/edge.go, internal/graph/go_extractor.go, internal/graph/typescript_extractor.go, internal/graph/python_extractor.go
- **Architecture, Storage, Search & Operations**: importance `high`
  - source_paths: internal/storage/storage.go, internal/storage/pool.go, internal/storage/migrate.go, internal/storage/sqlc/db.go, internal/storage/queries/search.sql

## Repo Inspection Evidence

- repo_clone_verified: true
- repo_inspection_verified: true
- repo_commit: `9764ba6bb17b35b5c53026342291bc4dde5e40b0`
- inspected_files: `Dockerfile`, `README.md`, `docker-compose.yml`, `package.json`, `docs/AGENTS_SNIPPET.md`, `docs/CONFIGURATION.md`, `docs/CONTEXT_RULES.md`, `docs/DASHBOARD_SPLIT_ACTION_PLAN.md`, `docs/DASHBOARD_SPLIT_JUNIOR_GUIDE.md`, `docs/DASHBOARD_SPLIT_PLAN.md`, `docs/FEATURES.md`, `docs/FEATURE_INTAKE.md`, `docs/G6_MIGRATION_PLAN.md`, `docs/GLOSSARY.md`, `docs/HARNESS.md`, `docs/HARNESS_BACKLOG.md`, `docs/HARNESS_GATES.md`, `docs/HARNESS_RUNNER_CONTRACT.md`, `docs/ROADMAP.md`, `docs/SETUP_AGENT.md`

Host AI hard rules:
- Without repo_clone_verified=true, do not claim that the source code has been read.
- Without repo_inspection_verified=true, do not write README, docs, or package-file conclusions as facts.
- Without quick_start_verified=true, do not claim that the Quick Start path has run successfully.

## Doramagic Pitfall Constraints

These rules come from Doramagic discovery, validation, or compilation findings. The host AI must treat them as operating constraints, not background notes.

### Constraint 1: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: Interactive MCP client auto-configuration after workspace registration
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Interactive MCP client auto-configuration after workspace registration. Context: Observed during installation or first-run setup.
- Why it matters: Developers may fail before the first successful local run: Interactive MCP client auto-configuration after workspace registration
- Evidence: failure_mode_cluster:github_issue | https://github.com/nano-step/nano-brain/issues/525
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 2: Installation risk requires verification

- Trigger: Developers should check this installation risk before relying on the project: v2026.7.0303
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: v2026.7.0303. Context: Observed when using node
- Why it matters: Upgrade or migration may change expected behavior: v2026.7.0303
- Evidence: failure_mode_cluster:github_release | https://github.com/nano-step/nano-brain/releases/tag/v2026.7.0303
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 3: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: Add OpenAPI 3.0 spec for the REST API, so non-MCP clients can discover all endpoints
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: Add OpenAPI 3.0 spec for the REST API, so non-MCP clients can discover all endpoints. Context: Observed during installation or first-run setup.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: Add OpenAPI 3.0 spec for the REST API, so non-MCP clients can discover all endpoints
- Evidence: failure_mode_cluster:github_issue | https://github.com/nano-step/nano-brain/issues/530
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 4: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: CLI --help is misleading: -h/--help shows nothing useful, no-args starts a real server, help list is stale
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: CLI --help is misleading: -h/--help shows nothing useful, no-args starts a real server, help list is stale. Context: Source discussion did not expose a precise runtime context.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: CLI --help is misleading: -h/--help shows nothing useful, no-args starts a real server, help list is stale
- Evidence: failure_mode_cluster:github_issue | https://github.com/nano-step/nano-brain/issues/527
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.

### Constraint 5: Configuration risk requires verification

- Trigger: Developers should check this configuration risk before relying on the project: MCP: bind default workspace via URL query param, skip agent-side discovery
- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: MCP: bind default workspace via URL query param, skip agent-side discovery. Context: Observed during installation or first-run setup.
- Why it matters: Developers may misconfigure credentials, environment, or host setup: MCP: bind default workspace via URL query param, skip agent-side discovery
- Evidence: failure_mode_cluster:github_issue | https://github.com/nano-step/nano-brain/issues/523, failure_mode_cluster:github_issue | https://github.com/nano-step/nano-brain/issues/522
- Hard boundary: Do not present this pitfall as solved, verified, or ignorable unless later evidence explicitly closes it.
