All notable changes to Anchor Engine will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
HTTP Endpoints for Path Management (
Standard 039)POST /v1/system/path-add— Add watched path via watchdog integrationPOST /v1/system/path-remove— Remove watched path + trigger hot-slotting purge
-
MCP Tools with Direct DB Operations
anchor_set_path(path)— Adds path to watch list (direct DB insert + HTTP fallback)anchor_remove_path(path)— Full cleanup: atoms, molecules, edges, tags, sources + mirrored files
-
Hot-Slotting Purge Enhancement
- Complete database purge when removing watched paths (was only removing path entry)
- Removes all associated data: atoms, molecules, edges, tags, sources from PGlite
- Cleans mirrored brain files and metadata notebooks
-
MCP Tool Architecture
- Tools now use direct database operations as primary method with HTTP fallback
- More reliable than pure HTTP approach (doesn't require running server)
- Endpoint Registration — Previously
/v1/system/path-addreturned 404; now properly registered viasetupSystemRoutes()in system.ts - Data Accumulation Bug — Watched path removal no longer leaves orphaned database entries and mirrored files
- Updated
doc_policy.mdto match reality: 38 standards, flat directory, current docs/ structure - Removed stale
archive-legacy/references anddecisions/directory (merged into relevant standards)
Standards Flattened:
- Flattened
specs/current-standards/from 14 category subdirectories into single flat directory - 38 active standards numbered 001–032, ordered foundational → assistive
- Duplicate-numbered standards (014, 018, 019, 027, 028, 029) preserved with distinct names
Architecture Consolidated:
- Merged
ARCHITECTURE.mdintospec.md— architecture diagrams, web dashboard, engine core modules now in system spec - Removed
ux-ui-recursion-workflow.md(no longer needed)
Docs Restored from Git History:
- Restored:
code-patterns.md,design-patterns.md,star-algebra-reference.md - Restored:
integrations/CODE_OF_CONDUCT.md,integrations/CONTRIBUTING.md - Renamed:
-settings-configs.md→settings-configs.md
Root Cleanup:
- Deleted 19 one-off fix scripts cluttering project root
- Removed PM2 configs,
.babelrc,config/directory - Dropped
package-lock.json(pnpm only) - Cleaned
.gitignore: removed embedded JavaScript code, fixed contradictions with tracked files - Restored missing root
package.json+pnpm-workspace.yaml - Re-added
CITATION.cffto tracking
API Routes:
- Added
POST /v1/distillsroute to trigger distillation - Removed
compounds.tsroute (always returned 404, table removed per Standard 051) - Fixed
/v1/files/readto allow.md/.txt/.ymlextensions (was blocking distill output reads) stats.ts: replaced hardcoded placeholder with real implementation (uptime, memory, DB row counts, search counter)
MCP Tools:
- Fixed
anchor_distill: was calling non-existentPOST /v1/distills→ now callsPOST /v1/memory/distill - Fixed
anchor_distillbody format: maps{source_url, source_text}→ properRadialDistillRequest - Added
anchor_list_distillsandanchor_get_distilltools callAnchorAPI()now supports GET requests
Distill Manager:
- Rewritten to query PGlite
distillstable instead of in-memory-only store recordDistill()writes metadata pointers to DB on completion- In-memory cache retained for fast UI polling
UI:
- Fixed
output_formatfrom unsupported'source-grouped'to'decision-records' - Added decision-records format handler (
parsedContent.records)
- Consolidated
docs/testing/LIVE-FIRE-TEST-SUITE.md(571 lines) intospecs/current-standards/search-retrieval/014-search-algorithm-testing.md - Added P5 edge cases section with 10+ test examples
- Added P6 performance benchmarks section with latency validation tests
- Added CI/CD integration examples for GitHub Actions workflow
- Added troubleshooting guide covering common issues and fixes
- Added best practices section with 7 key recommendations
- Standard 014 expanded from 301 to 541 lines (80% increase)
- Deleted 15 deprecated testing patterns from
tests/legacy/directory:- comprehensive-test.js, full-sequence-test.js, config-test.js, db-close-test.js
- db-test.js, distillation-test.js, fixed-startup-test.js, individual-import-test.js
- minimal-db-test.js, minimal-test.js, route-setup-test.js, test-tool-executor.js
- test-fixed-engine.js, test-native-module.js, test-server.js, accurate-test.js
- Consolidated
docs/testing/API-SURFACE.mdreferences into standard specs - Deleted
docs/testing/LIVE-FIRE-TEST-SUITE.md(merged into Standard 014) - Removed now-empty
docs/testing/directory
Implemented agent-friendly background startup/shutdown scripts:
-
scripts/start-engine-bg.mjs- Node.js background startup with:- Build verification (
engine/dist/index.js) - Port conflict detection (auto-finds available port)
- File logging to
.anchor/logs/start-{timestamp}.log - Immediate exit after health check (non-blocking for agents)
- Health check retries before success confirmation
- Build verification (
-
scripts/stop-engine-bg.mjs- Node.js background shutdown with:- Port-based PID detection (cross-platform, Windows 11 compatible)
- Graceful SIGTERM shutdown first
- Force kill if graceful shutdown fails
- File logging to
.anchor/logs/stop-{timestamp}.log
Benefits:
- No blocking console output during startup/shutdown
- Automatic port conflict resolution
- Persistent logging for debugging
- Cross-platform compatibility (Windows 11, Linux, macOS)
New P5 Edge Cases Tests:
- Empty query handling
- Very long query validation
- Special characters:
&,|,",' - HTML entity/XSS prevention
- Unicode character support
- Single character queries
- Malformed input handling
New P6 Performance Benchmarks:
- Semantic search latency (<3s target)
- Tag-based search latency (<1s target)
- Byte offset search latency (<500ms target)
- FTS search latency (<200ms target)
- Empty query latency (<100ms target)
- Performance validation with 50% margin tolerance
CI/CD Integration Examples:
- GitHub Actions workflow for automated testing
- Watch mode for development iterations
- Phase-specific execution (P0-P4 for CI, P5-P6 for full suites)
Troubleshooting Guide:
- Tests failing immediately (engine not running)
- Logs not being created (permissions/PROJECT_ROOT issues)
- Performance tests exceeding targets (insufficient corpus)
- Pain point detection not working (Standard 027 configuration)
- Updated
docs/INDEX.mdwith recent cleanup notes - Added version bump: Standard 014 v1.0.0 → v2.0.0
- Updated CHANGELOG.md with testing cleanup history
-
Testing Infrastructure
- Playwright-based e2e UI verification tests (
test_suite/anchor_engine_ux_test_suite.py) - Comprehensive API documentation with OpenAPI specs and curl examples
- System metrics endpoint
/v1/stats(uptime, memory, request counters) - Reliable engine startup/shutdown scripts
- Playwright-based e2e UI verification tests (
-
QwenPaw Environment Integration
- PowerShell environment fix script (
Fix-QwenPawEnv.ps1) for PATH ordering and UTF-8 support - Git Bash
.bashrcwith Windows→Linux compatibility aliases - PowerShell 7 profile auto-loader (
.powershell_profile.ps1)
- PowerShell environment fix script (
-
Project Structure
- Moved to
coding_projects/anchor-engine-nodeworkspace - New infrastructure:
agents/,specs/decisions/,specs/INTEGRATIONS/ - Database initialization scripts (
create-db.js,init-db.js)
- Moved to
-
Major Cleanup (v5.1.0 preparation)
- Removed orphaned route:
engine/src/routes/v1/ingest-updated.ts - Removed orphaned service:
engine/src/services/ingest/ingest-atomic-updated.ts - Deprecated bright-nodes reference in documentation
- Cleaned all test artifacts, JSON build outputs, and temporary files (20+ files)
- Consolidated inbox: old inbox → internal-inbox
- Removed orphaned route:
-
Documentation
- Added Testing section to README.md with e2e test instructions
- Created API surface documentation covering all 15 route files + 4 additional endpoints
- Updated UX/UI recursion workflow docs (require live engine for testing)
- Search route implementation restored from previous working commit
- Removed circular imports and missing dependencies in route architecture
- Cleaned stale TODO/FIXME comments from codebase
-
Distillation Endpoint Optimization
- Added
max_moleculesparameter to limit corpus-mode queries and prevent timeouts - Restored
timeout_secondssupport with user-configurable timeout (default: 60s) instead of hardcoded 120s - Fixed streaming mode to respect
max_moleculesand use proper default values
- Added
-
Build Infrastructure
- Restored build script (
scripts/build.ts) that compiles TypeScript → JavaScript for production deployment - Added missing devDependencies:
@types/node,rimraf,typescript
- Restored build script (
-
GitHub Ingestion Service
- Fixed import extensions from
.tsto.js(NodeNext module resolution requirement) - Corrected corrupted method calls:
.tson()→.json(),.tsON.parse()→JSON.parse() - Removed duplicate entries in file extension mapping
- Fixed import extensions from
- New radial distillation v2 with semantic aggregation across sources
- Memory typing system for better context management
- Temporal cascade for improved search relevance
- New output formats for distillation summaries
- Updated path configuration to
.anchorstructure - Simplified version loading mechanism
- Worker-based GitHub sync for better concurrency
- OOM hardening with better memory management
- Critical bug fixes in search pipeline
- Performance improvements in tag discovery
- Added API key strength validation (Standard 132)
- Fixed auth bypass vulnerability in
/v1/test/*endpoints (Standard 131) - SQL injection fix via parameterized LIMIT clauses (Standard 130)
- Path traversal prevention (Standard 129)
- Streaming distillation with real-time output
- UI improvements for search results
- Watchdog process for memory management