Waymark Engine¶
Sub-millisecond AST structural & lexical BM25 code intelligence for AI coding agents.
Executive Summary¶
Waymark Engine is a high-performance code intelligence platform built specifically for AI coding agents. It provides instant, deterministic code navigation without vector databases, embeddings, or blind context-window token dumping.
When an AI agent needs to locate an implementation or trace a dependency, reading thousands of lines of raw source code wastes valuable context tokens and induces hallucinations. Waymark Engine answers questions with exact file paths, symbol names, line spans, and multi-hop call graphs in milliseconds.
AI Coding Agent
│
┌──────────────┴──────────────┐
│ │
waymark_ask waymark_memory
(Read & Discover) (Write & Consensus)
│ │
┌───────────────┼───────────────┐ │
▼ ▼ ▼ ▼
Tier 1 Tier 2 Tier 3 Tier 4
AST Call Graph Path Router Fuzzy Matcher Lexical BM25
(@paragon/codedb) (PrefixTrie) (algo.go fzf) (.capn hook)
│ │ │ │
└───────────────┼───────────────┘ │
▼ ▼
Discovery Junction Consensus SQLite
(deterministic miss) (5-facet memory)
Why Waymark Engine?¶
| Dimension | Standard Agent Workflow | With Waymark Engine |
|---|---|---|
| Context Window Cost | 10,000–50,000 tokens per search | 16–38 tokens (--plain output) |
| Tool Definition Overhead | 3,000+ tokens (11 flat tools) | <450 tokens (Two-Verb MCP interface) |
| Query Latency | 2,000–15,000 ms (embedding search) | <10 ms (Warm resident daemon) |
| Accuracy & Faithfulness | Hallucinated line numbers | 100% deterministic (AST-verified spans) |
| Memory Across Sessions | Amnesia after session reset | 5-Facet Consensus Ledger in SQLite |
Core Tenets¶
- Deterministic by Construction: Every query path is zero-randomness. Semantic recall utilizes pure lexical BM25 (
@paragon-ux/capn-hook) and hard-refuses embedding stores (CAPN_NON_DETERMINISTIC_MODE). - Fail-Closed on Ambiguity: When a symbol or caller cannot be verified with certainty, the engine emits a structured miss or a machine-readable Discovery Junction continuation. It never guesses.
- Two-Verb Lean Interface: MCP surface is distilled into
waymark_ask(read) andwaymark_memory(write), minimizing tool catalog sprawl in LLM contexts. - Live Observability: Built-in interactive REPL and fixed-viewport SSE Web Viewer (
localhost:4141) for real-time telemetry, cache hit tracking, and test battery execution.
Quick Navigation¶
- 🚀 Getting Started: Installation, CLI quickstart, resident daemon, and the Live REPL Observer.
- 🏗️ 4-Tier Architecture: Deep dive into the 4 discovery tiers, Discovery Junction, and fail-closed guards.
- 🔌 Model Context Protocol (MCP): Agent configuration (Antigravity, Claude, Cursor) and Two-Verb usage.
- 💻 CLI & Command Registry: Complete CLI flags, query options,
waymark memorycatalog, and error codes. - 📊 Empirical Benchmarks: Aider Repo Map parity benchmark (
gpt-oss-120b) and metrics schema. - 📦 Library API & Integrity: TypeScript SDK,
verifyHop, andanchorForRangetamper-evidence primitives.