Repository navigation
kb knowledge base
Status: Implemented
Last Updated: 2026-11-14
Audience: Developers and coding agents
Last verified: 2026-11-14 against 86e5f8c37
Code: .github/mcp.json, scripts/kb/check_kb.py, scripts/kb/test_check_kb.py
The knowledge base (KB) is the Markdown documentation in docs/.
It describes the current code. The top-level map gives the
main areas. The decision map names the rule owners.
The glossary gives the names to use.
Use the local repo-kb MCP server to find a topic. Call kb_search,
then open its cited sections with kb_read_section. Read the page's
**Code:** line to find the source. Read only the source that the task needs.
Use an exact-name search when the page names a symbol but not its file.
If a page is missing or wrong, inspect the relevant code and correct the page in the same pull request. Search results are a route to evidence, not proof that a claim is true.
.github/mcp.json starts the existing tool with npx. It needs Node.js 20
or later and Git. It does not need a repository package install.
The first run downloads the tool and the local embedding model.
The index stays outside the checkout. The tool selects the index from
the repository's Git remote. Searches combine keywords with local embeddings
when the embeddings are ready. All indexing and search run on this computer.
The default file selection includes docs/**/*.md, the root agent and
contributor guides, and the checked-in assistant instructions. Martlet uses
these paths, so it does not need a .repo-kb.json override.
scripts/MartletDev.ps1 supplies developer helper functions; it is not an
installer and has no install option.
Each authored KB page starts with an H1 title and these fields:
# Page title
**Status:** Implemented
**Last Updated:** YYYY-MM-DD
**Audience:** Developers and coding agents
**Last verified:** YYYY-MM-DD against <short sha>
**Code:** `src/Area/Owner.cs`, `scripts/Some-Command.ps1`Use repository-relative paths in Code. Name the main files or source
folders that implement the page. A folder covers its descendants.
Do not use wildcards, absolute paths, symbols, or missing paths.
Use forward slashes in Markdown paths so links work on all platforms.
Use Windows paths in PowerShell commands.
| Status | Meaning |
|---|---|
| Implemented | The described behavior exists in the named code. |
| Partial | Some described behavior exists. Put unbuilt work in a Planned section. |
| Planned | The page describes unbuilt work, not current behavior. |
| Superseded | Another linked page replaces this page. |
Put intended behavior only under a heading that contains Planned.
Put past evidence and provenance under clearly named history sections.
Do not describe a past test or a fixture as current product qualification.
Last Updated is the date of a content change. Last verified records the
code revision inspected for the page's claims. Do not update verification
fields without checking the code. A source-map check alone does not verify
behavior. Documentation-only indexes name the revision used to check their links.
Pages that describe built code must have a Code line.
Each documentation folder has a README.md index. List each immediate page
and each immediate subfolder. Give one line that states the question each
page answers. Keep the root map's code areas and folder links current.
Do not require a page to list itself.
Scripts regenerate generated pages. Do not edit their output by hand.
Each generated page names its generator. Generated image folders and wiki
navigation fragments are not authored KB pages.
The current wiki's Markdown source lives in docs/wiki/.
scripts/Publish-Wiki.ps1 publishes that source; the browser copy is not
another source of truth.
A change to code, configuration, scripts, commands, or behavior also updates
the matching page, its Code and verification fields, and its folder index.
A new feature gets a page or a section. Remove a deleted feature's page
or mark it Superseded and link its replacement.
If no page needs a change, write KB: no change needed in the pull request
body and give the reason.
Run python scripts\kb\check_kb.py --diff origin/main before merging a change.
The command checks committed branch changes, not uncommitted edits.
It returns a failing exit code for a missing Code path, a missing folder
index, or an index that does not list a page or subfolder.
It ignores fenced examples, image folders, build output, and wiki navigation
fragments. Extensionless links in the wiki source are valid.
The diff check warns about changed non-document files without Code coverage.
A named folder covers its descendants, but not a folder with a similar name.
Deletion or rename of a named path produces a warning and a missing-path
error if the page still names it. Warnings do not cause a failing exit code.
Fix every error. Review warnings and update the matching page when needed.
Run the disposable checker fixtures with
python -m unittest discover -s scripts\kb -p test_check_kb.py.
The script uses only the Python standard library and Git.
There is no checked-in local hook setup. Do not install a hook in another
developer's checkout.
These checks do not prove that a behavioral claim is correct.
The evaluation file contains 30 real repository questions
and their expected documentation paths. Run
npx -y github:throndir2/repo-kb eval docs\kb\repo-kb-eval.json --json.
Keep the questions fixed when comparing documentation changes.
The local hybrid evaluation on 2026-11-14 against 86e5f8c37 produced:
| Measure | Result |
|---|---|
| Expected page first (hit@1) | 25/30, 83.3% |
| Expected page in the first three (hit@3) | 30/30, 100% |
| Expected page in the first five (hit@5) | 30/30, 100% |
| Mean reciprocal rank | 0.911 |
| Median search time | 20 ms |
These results measure retrieval, not the truth of each page's claims. The root and MCP audits retain explicit limits for untraced prose and hardware-dependent claims. Do not treat their metadata as full qualification.
Five past tasks were replayed with documentation from before each task. Documentation added by those tasks and the current audit was excluded. Recorded discovery contained 148 file reads and 111 repository searches. The replay kept all 113 source reads and replaced documentation reads with five KB searches and ten section reads.
Keeping every original repository search gives an estimate of 239 calls, against 259 recorded calls: 7.7% fewer calls and 9.1% fewer output tokens. Replacing all repository searches gives an optimistic estimate of 128 calls: 50.6% fewer calls and 30.1% fewer output tokens.
Token estimates use four output characters per token. They are not measured model input or billing totals. Shell reads, later implementation, tests, reasoning, repeated context, and cached input are excluded. The optimistic result assumes that no exact-symbol searches remain. The conservative skill-browser replay costs slightly more than its baseline. Do not promise the same savings for every task.
Martlet: download · repository · changelog · issues
These pages come from docs/wiki in the repository. To suggest a change, open an issue or a pull request there.
- Home
- Accounts and households
- Accounts and Household
- Android phones and tablets: what it takes, and the plan
- Martlet's API for other apps and scripts
- App Guides
- App Settings and Updates
- App guides: game and app knowledge from the web
- Architecture
- Bounded PCM playback
- Audio dependency inventory and notices
- Avatar guide: Live2D, VRM and speech animation
- V01a explicit microphone capture
- Chatterbox voice engines
- Cleaning up disk space
- One Martlet on all your computers
- Companion controls and behavior requirements
- Components, jobs and placement (design)
- Live conversation
- Creations
- Decision map: which file owns each decision
- Deep research: web search and long research jobs
- The desktop app: updates, notification area, exiting and appearance
- Linux and macOS desktop companion: research, decision and plan
- Developer Guide
- Dia voice engine
- Diagnostics
- Discord
- Architecture and provider contracts
- Discord
- Memory (P03a/P03b/P03c)
- Singing
- Desktop troubleshooting and local support
- Recognizing people by voice, and Parakeet
- Echo cancellation
- ElevenLabs voice: your cloned voice with tones
- F5 worker and reference-voice foundation
- FAQ
- First Steps
- Game state plan: implementation history
- Glossary: one name for each concept
- GPT-SoVITS voice
- Hosted Thinking: cloud models when Thinking can't run on this PC
- Installation and support
- Installing Martlet
- iOS and iPadOS: what it takes, and the plan
- Repository instructions for coding agents
- Repository knowledge base
- Knowledge base maintenance
- GitHub Wiki mirror
- Linux and Mac
- Listening and Voice ID
- Local model apps
- Lorebooks
- macOS: what it takes, and the plan
- Martlet MCP Server
- MCP in Martlet
- MCP: The app's window
- MCP: Apps, home and memory
- MCP: Characters
- MCP: Diagnostics and logs
- MCP: Computers, network and accounts
- MCP: Other
- MCP: Tool permissions
- MCP pages
- MCP: Server and protocol internals
- MCP: Settings
- MCP: Start here
- MCP: Thinking and models
- MCP: Voice and listening
- Memory
- Messaging apps
- Model catalog: sources, conflicts and design
- Motion host role
- Multiple Computers
- Your Martlet network
- OCR host role
- Share your language models: the OpenAI-compatible endpoint
- Packaging
- Perception worker contracts
- Personality and Characters
- Picture making
- Pictures and Creations
- Picture making host role
- Platforms: what each device can do
- Prerequisites: what Martlet bundles, installs for you, or needs from you
- Privacy and Safety
- Reading the text on your screen
- Wiki source
- Recommendation design: ask three questions, plan for three situations
- Recommended setups: one machine to unlimited budget
- Releasing
- Repository Layout
- Research and provenance ledger
- Resource footprints
- Roadmap
- Watch my screen: screen-aware commentary
- Search engine
- Image and audio models: who sees, who hears, who answers
- Setting Up a Host
- Setup, Windows credentials and local audio
- Sharing with Friends
- Singing
- Smart Home
- Smart home and cameras
- Source Projects
- Talking to Martlet
- Telegram and WhatsApp
- The Character
- Thinking
- Tools and MCP
- Troubleshooting
- Martlet desktop UI design
- User stories and target flows
- Voice activity detection
- Validating changes
- Validation and Testing
- Vision
- Voice latency: from you stopping talking to Martlet's voice
- Voice recognition host role
- Multi-engine voice setup and comparison
- Voices
- The welcome wizard
- XTTS-v2 voice engine