Anchor Engine

June 13, 2026 ยท View on GitHub

Version: 5.3.0 | Updated: June 13, 2026 | Status: โœ… Production Ready


๐Ÿ“š Quick Navigation

Getting Started

Core Documentation (docs/)

FilePurpose
whitepaper.mdSTAR Algorithm whitepaper โ€” theoretical foundation
paper.mdAcademic paper (JOSS/TechArxiv submission)
settings-configs.mdUnified configuration reference
code-patterns.mdCode patterns used throughout the codebase
design-patterns.mdDesign patterns and architectural decisions
star-algebra-reference.mdSTAR algebra reference and search algorithm details

User Workflows (docs/workflows/)

FilePurpose
in-use.mdCurrent manual workflow guide
ideas.mdFuture workflow automation ideas

Integration Guides (docs/integrations/)

FilePurpose
CODE_OF_CONDUCT.mdContributor Covenant Code of Conduct
CONTRIBUTING.mdContribution guidelines

Architecture & Standards (specs/)

FilePurpose
specs/spec.mdSystem specification with architecture diagrams
specs/plan.mdDevelopment roadmap and phased implementation
specs/tasks.mdCurrent implementation tasks and priorities
specs/doc_policy.mdDocumentation policy โ€” single source of truth for file locations
specs/DATA-MODEL.mdData model: Compound โ†’ Molecule โ†’ Atom โ†’ Tag hierarchy

Standards: 38 active architecture standards in specs/current-standards/ (flat directory, ordered foundational โ†’ assistive).

Source Code (engine/)


๐ŸŽฏ Documentation by Use Case

"I want to install and run Anchor Engine"

โ†’ Start with README.md โ€” Quick Start section

"I need API documentation"

โ†’ The API surface is documented in specs/spec.md and the route files in engine/src/routes/v1/

"Something's not working"

โ†’ Check specs/plan.md for known risks and mitigations. Runtime logs live in $HOME/.anchor/logs/.

"I need to understand the system architecture"

โ†’ Study specs/spec.md (includes architecture diagrams, web dashboard, engine core modules)

"I'm researching the theory behind Anchor Engine"

โ†’ Read whitepaper.md and paper.md

"I want to understand the search algorithm (STAR)"

โ†’ See specs/spec.md and search standards in specs/current-standards/

"How does distillation work?"

โ†’ Read specs/current-standards/010-radial-distillation-v2.md

"I want to contribute code"

โ†’ Start with specs/doc_policy.md for conventions, then engine/src/README.md for source structure

"I want to explore standards"

โ†’ Browse specs/current-standards/ โ€” 38 active standards with full implementation details


๐Ÿ“Š Key Metrics (v5.3.0)

MetricValueStatus
Context Retrieval618k charsโœ… +18% vs whitepaper
Memory Peak510MB (idle)โœ… -70% vs whitepaper
Search Latency<200ms (p95, standard queries)โœ… Optimized
Ingestion Throughput1,200 mol/secโœ… Verified
Deduplication Rate40โ€“50%โœ… With SimHash
Active Standards38โœ… Flattened, numerically ordered
WASM Module Size~1.4 MB (4 packages)โœ… 90% smaller than C++ DLLs

๐Ÿ—‚๏ธ Document Structure

anchor-engine-node/
โ”œโ”€โ”€ README.md                          # Start here โ€” quick start & usage
โ”œโ”€โ”€ CHANGELOG.md                       # Version history (v5.3.0)
โ”œโ”€โ”€ LICENSE                            # AGPL-3.0
โ”œโ”€โ”€ user_settings.json.template        # Configuration template โ†’ $HOME/.anchor/
โ”‚
โ”œโ”€โ”€ docs/                              # User-facing documentation
โ”‚   โ”œโ”€โ”€ INDEX.md                       # This file
โ”‚   โ”œโ”€โ”€ whitepaper.md                  # STAR algorithm whitepaper
โ”‚   โ”œโ”€โ”€ paper.md                       # Academic paper
โ”‚   โ”œโ”€โ”€ settings-configs.md            # Consolidated configuration reference
โ”‚   โ”œโ”€โ”€ code-patterns.md               # Code patterns guide
โ”‚   โ”œโ”€โ”€ design-patterns.md             # Design patterns
โ”‚   โ”œโ”€โ”€ star-algebra-reference.md      # STAR algebra reference
โ”‚   โ”œโ”€โ”€ workflows/                     # User workflow guides
โ”‚   โ”‚   โ”œโ”€โ”€ in-use.md
โ”‚   โ”‚   โ””โ”€โ”€ ideas.md
โ”‚   โ””โ”€โ”€ integrations/                  # Integration guides
โ”‚       โ”œโ”€โ”€ CODE_OF_CONDUCT.md
โ”‚       โ””โ”€โ”€ CONTRIBUTING.md
โ”‚
โ”œโ”€โ”€ specs/                             # Technical specifications
โ”‚   โ”œโ”€โ”€ spec.md                        # System specification (incl. architecture)
โ”‚   โ”œโ”€โ”€ plan.md                        # Development roadmap
โ”‚   โ”œโ”€โ”€ tasks.md                       # Current tasks
โ”‚   โ”œโ”€โ”€ doc_policy.md                  # Documentation policy
โ”‚   โ”œโ”€โ”€ DATA-MODEL.md                  # Data model
โ”‚   โ”œโ”€โ”€ current-standards/             # 38 active standards (flat, numeric)
โ”‚   โ””โ”€โ”€ INTEGRATIONS/                  # Integration specs
โ”‚
โ”œโ”€โ”€ engine/                            # Anchor Engine implementation
โ”‚   โ”œโ”€โ”€ package.json                   # WASM dependencies (@rbalchii/*-wasm)
โ”‚   โ”œโ”€โ”€ src/                           # TypeScript source
โ”‚   โ”‚   โ””โ”€โ”€ README.md                  # Source code overview
โ”‚   โ””โ”€โ”€ tests/                         # Test suites
โ”‚       โ”œโ”€โ”€ integration/               # Integration tests
โ”‚       โ”œโ”€โ”€ live-fire/                 # Live-fire test scripts
โ”‚       โ””โ”€โ”€ unit/                      # Unit tests
โ”‚
โ”œโ”€โ”€ scripts/                           # Build and operational scripts
โ”‚   โ”œโ”€โ”€ build.ts                       # TypeScript compilation
โ”‚   โ”œโ”€โ”€ start-engine-bg.mjs            # Background engine startup
โ”‚   โ””โ”€โ”€ stop-engine-bg.mjs             # Background engine shutdown
โ”‚
โ””โ”€โ”€ test-wasm/                         # WASM tree-sitter test harness
    โ””โ”€โ”€ README.md

๐Ÿ”ฌ Recent Updates (v5.3.0)

Documentation Drift Repair (June 2026)

  • Renumbered standards: All 38 standards now uniquely numbered 001-038 (was 001-032 with duplicates)
  • Removed dead code: Deleted orphaned core/ and services/ at root (6,597 lines duplicated from engine/src/)
  • Deprecated packages/ removed: References cleaned from pnpm-workspace.yaml and spec
  • Synced versions: All files now consistently say 5.3.0

Documentation Consolidation (June 2026)

  • Flattened standards: All 38 active standards now live in specs/current-standards/ as a flat directory
  • Merged ARCHITECTURE.md into specs/spec.md โ€” architecture now lives in the system specification
  • Restored docs: Recovered code-patterns.md, design-patterns.md, star-algebra-reference.md from git history
  • Deleted clutter: Removed 19 one-off fix scripts, PM2 configs, and stale runtime data from project root
  • Fixed .gitignore: Removed embedded code, resolved contradictions with tracked files

WASM-Native Architecture (v4.3.0+)

  • All performance-critical operations use Rust-compiled WebAssembly (@rbalchii/*-wasm packages)
  • Zero native compilation required โ€” runs on Windows ARM64, macOS, Linux without C++ toolchains
  • Old C++ N-API modules (engine/src/native/) fully removed

Security Hardening

  • Path Traversal Prevention (Standard 029)
  • Auth Bypass Prevention (Standard 027)
  • API Key Strength Validation (Standard 028)
  • Zero-Copy Deduplication (Standard 030)

๐Ÿ”— External Resources


Last Updated: June 13, 2026 Version: 5.3.0 Status: โœ… Production Ready