Engineering OS
Give your AI coding tools a proper memory. Engineering OS sits on your machine, learns how your project works, and feeds that knowledge to Claude Code, Cursor, Codex, or any MCP-compatible AI code editor. They stop asking the same questions every session.
You know the drill: every new session, your AI re-explores files, re-debates decisions you already made, and has no idea your frontend talks to three backend services. engineering-os fixes that. One eos init and your AI knows everything. Permanently.
Persistent Context
Architecture, conventions, and decisions survive across sessions. AI never starts from zero.
Cross-Repo Intelligence
Federated search across all your services. AI sees your FE → BFF → backend → ML pipeline topology.
Skill Retention
AI learns gotchas, patterns, and connections from every session. Knowledge compounds over time.
100% Local
SQLite on your machine. No cloud. No telemetry. No API keys. Works offline. Your code never leaves.
Security Built-In
OWASP scanning, CVE detection across 7 ecosystems, STRIDE threat modeling, compliance checks.
Any AI Tool
Works with Claude Code, Cursor, Codex, and any AI code editor that speaks MCP protocol.
The Problem
| Without EOS | With EOS |
|---|---|
| AI forgets between sessions | Knowledge persists across all sessions |
| AI explores files for 30s before working | AI gets full context in one eos_context call |
| AI re-debates settled architecture decisions | Decisions are recalled instantly |
| AI sees one repo at a time | Full cross-repo service graph available |
| Same gotcha rediscovered every session | Skills accumulate and auto-inject |
| No convention enforcement | Coding standards enforced automatically |
| Security review is manual | Continuous OWASP + CVE scanning |
Quick Start
1. Install
npm install -g engineering-os
2. Initialize in your project
cd your-project
eos init --claude --cursor
# Output:
# ✓ Repository indexed (847 files, 4201 chunks)
# ✓ Architecture discovered (12 services, 3 patterns)
# ✓ Graph built (156 calls, 4 contracts)
# ✓ CLAUDE.md generated
# ✓ .cursor/rules/ generated (5 files)
# ✨ Engineering OS initialized!
3. That's it — start coding
Open Claude Code or Cursor. Your AI now has full project knowledge. It will:
- Call
eos_contextbefore starting any task (gets routes, architecture, conventions) - Use
eos_searchinstead of grep/find (pre-indexed, instant results) - Recall past decisions with
eos_recall_decision(never re-debates) - Learn from the session with
eos_learn(gotchas persist forever)
CLAUDE.md steers your AI to call EOS tools automatically. The .mcp.json tells Claude Code where the server is. Just code.4. Cross-repo (optional)
# Link sibling services for full architecture awareness
eos link backend-api ../backend-api
eos link mobile-app ../mobile-app
# Or declare in eos.workspace.yaml (team-shared, checked into git)
eos workspace add-repo backend-api ../backend-api --role bff
5. Keep fresh
# Auto-refresh after code changes (add to git post-commit hook)
eos refresh --incremental
# Or continuous watch mode
eos index --watch
require('engineering-os') gives you the full knowledge engine, graph store, and MCP server as a programmatic API.Workspace Setup
Create eos.workspace.yaml in your project root. This file is checked into git — your entire team shares the same conventions and decisions.
# Team-shared project configuration — checked into git
name: acme-mobile
type: react-native-monorepo
org: acme-corp
# Linked repositories in your ecosystem
repos:
- name: acme-gateway
path: ../gateway # API gateway configuration
role: api-gateway
- name: acme-api
path: ../backend # Main backend service (Spring Boot / Express)
role: backend-service
- name: acme-ml
path: ../ml-pipeline # Data science / ML inference
role: ml-pipeline
# Coding conventions (enforced across all AI sessions)
conventions:
- name: error-handling
rule: "Use Result<T> pattern in services. Only controllers throw HTTP exceptions."
- name: state-management
rule: "Zustand stores only. No Redux. One store per domain."
- name: api-calls
rule: "All network calls go through the shared HTTP client. Never use raw fetch/axios."
- name: file-naming
rule: "kebab-case for files, PascalCase for components, camelCase for hooks"
# Settled decisions (AI will not re-debate these)
decisions:
- title: "Redis for session store"
decision: "Use Redis Cluster for all session management"
rationale: "Sub-ms read latency, built-in expiry, horizontal scaling proven at load"
- title: "API Gateway pattern"
decision: "All client traffic routes through the gateway service"
rationale: "Centralizes rate limiting, auth validation, and request transformation"
# Which AI tool context files to generate
ai:
tools: [claude, cursor]
mcp: true
Or build incrementally with the CLI:
# Create the workspace file with auto-detected project info
eos workspace init
# Add conventions one by one
eos workspace add-convention "testing" "Co-locate test files with source. Use vitest."
eos workspace add-convention "imports" "Use absolute imports via path aliases, not relative ../../"
# Record architectural decisions
eos workspace add-decision "Message Queue" "Kafka for event streaming" --rationale "Ordered delivery, replay capability, team expertise"
# Link sibling repositories
eos workspace add-repo gateway ../gateway --role api-gateway
eos workspace add-repo backend ../backend --role backend-service
Cross-Repo Linking
Declare linked repos in your workspace yaml. On eos init, they're automatically linked. When the AI calls eos_context, it returns data from all linked services.
Step 1: Declare linked services in workspace yaml
# In eos.workspace.yaml — declares the services your project talks to
repos:
- name: order-service
path: ../order-service # relative path to sibling repo
role: backend-service # role helps EOS understand the relationship
- name: payment-gateway
path: ../payments
role: payment-service
- name: infra
path: ../infrastructure
role: devops
Step 2: Initialize (auto-links everything)
eos init --claude
# Output:
# ✓ Linked 3 repo(s) from workspace config
# ✓ Graph built (42 calls, 2 contracts)
# ✓ 5 connection(s) auto-linked
Step 3: Verify — AI now sees cross-repo context
When Claude calls eos_context, the response includes all linked services — their routes, file structure, GraphQL subgraphs, and infrastructure topology. Your AI knows the full architecture without exploring any files.
eos serve --global starts the MCP server from any directory on your machine. It auto-detects which registered repo you're in and serves the right context. Other registered repos remain available for cross-repo search.Skill Retention
EOS learns from every session. When the AI discovers something, it persists via eos_learn. Future sessions recall relevant skills automatically.
Recording a skill
When your AI discovers something during a session — a bug pattern, a non-obvious requirement, or a hidden dependency — it records it for all future sessions:
// AI discovered that file uploads must be ordered (not obvious from code)
eos_learn({
type: "gotcha",
name: "Chunked upload ordering",
content: "File chunks must be uploaded sequentially — out-of-order chunks cause silent data corruption in the stitching service",
context: "file upload feature, S3 multipart uploads",
tags: ["upload", "s3", "multipart", "ordering"]
})
// AI learned a multi-step workflow pattern
eos_learn({
type: "pattern",
name: "Adding a new screen",
content: "1. Create folder in src/screens/{Name}/ 2. Add index.tsx with screen component 3. Add route to src/navigation/types.ts 4. Register in RootNavigator.tsx 5. Create local Zustand store if needed",
context: "creating new screens in the mobile app",
tags: ["screen", "navigation", "mobile"]
})
// AI discovered a cross-service connection not visible in code
eos_learn({
type: "connection",
name: "Order completion triggers analytics",
content: "When order-service publishes 'order.completed' to Kafka, the analytics-pipeline consumes it and updates BigQuery within ~30s",
context: "order lifecycle, analytics pipeline",
tags: ["kafka", "analytics", "order", "bigquery"]
})
Skill types
| Type | Purpose | Example |
|---|---|---|
gotcha | Avoid mistakes | "Never useMemo FlatList items" |
pattern | How to do X | "To add a screen: create folder, add to nav..." |
connection | Service topology | "order-service → Kafka → analytics-pipeline" |
convention | Team rules | "Error handling uses Result<T>" |
shortcut | File locations | "Auth middleware: src/middleware/auth.ts" |
Skills auto-inject into tool responses when context matches. Confidence escalates with usage (medium → high after 5 applications).
AI Tool Integrations
Claude Code
Claude Code connects via MCP. Two files are generated:
// .mcp.json — tells Claude Code where the EOS server is
// (auto-created by eos init, no manual setup needed)
{
"mcpServers": {
"engineering-os": {
"command": "eos",
"args": ["serve"]
}
}
}
// CLAUDE.md — enforcement rules that instruct Claude:
// • ALWAYS call eos_context before starting work
// • NEVER use grep/find — use eos_search instead
// • ALWAYS call eos_learn when discovering something
// • NEVER make architecture decisions without eos_recall_decision
Cursor
Cursor loads per-topic rule files from .cursor/rules/. EOS generates 5 files, each serving a specific purpose:
eos init --cursor
# Generated files (all prefixed eos- to avoid conflicts with your rules):
# .cursor/rules/eos-system.md → "Use EOS tools, don't explore"
# .cursor/rules/eos-conventions.md → Project coding standards
# .cursor/rules/eos-architecture.md → Service map and key directories
# .cursor/rules/eos-decisions.md → Settled decisions (don't re-debate)
# .cursor/rules/eos-service-map.md → Cross-repo dependency graph
Windsurf
Single rules file with EOS tool instructions:
eos init --windsurf
# Creates: .windsurfrules (same steering approach as CLAUDE.md)
Any MCP Client
{ "command": "eos", "args": ["serve"], "transport": "stdio" }CLI Reference
| Command | Description |
|---|---|
eos init | Initialize EOS — index, discover architecture, generate AI files |
eos serve | Start the MCP server |
eos refresh | Update knowledge after code changes |
eos workspace | Manage team-shared workspace config |
eos link | Link a repository for cross-repo features |
eos unlink | Remove a linked repository |
eos index | Re-index the repository |
eos status | Show knowledge stats and drift |
eos enable | Re-enable EOS |
eos disable | Suspend EOS (non-destructive) |
eos marketplace | Browse workflow templates |
eos init
Initialize Engineering OS in the current repository.
eos init [options]| Option | Description |
|---|---|
--claude | Generate CLAUDE.md steering file |
--cursor | Generate .cursor/rules/eos-*.md files |
--copilot | Generate .github/copilot-instructions.md |
--windsurf | Generate .windsurfrules |
--all | All AI tool files |
-f, --force | Force re-initialization |
eos serve
Start the MCP server. Works from any directory.
eos serve [options]| Option | Description |
|---|---|
--global | Serve all registered repos. Auto-detects primary from CWD. |
-p, --path | Specific project root |
eos refresh
Update EOS knowledge after code changes.
eos refresh [options]| Option | Description |
|---|---|
--incremental | Only files changed since last refresh |
--since <ref> | Files changed since git ref (e.g., HEAD~1) |
--full | Re-scan everything |
eos refresh --since=HEAD~1 to your git post-commit hook for automatic freshness.eos workspace
eos workspace init
eos workspace show
eos workspace add-convention <name> <rule>
eos workspace add-decision <title> <decision> [--rationale <why>]
eos workspace add-repo <name> <path> [--role <role>]
eos link / unlink
eos link <name> <path> eos unlink <name>eos index
| Usage | Description |
|---|---|
eos index | Incremental — only changed files |
eos index --force | Full re-index from scratch |
eos index --watch | Continuous watch mode |
eos index --paths src/auth | Index specific paths only |
API Reference — Knowledge Tools
| Parameter | Type | Description | |
|---|---|---|---|
task | string | Required | What you're about to work on (used for relevance matching) |
maxTokens | number | Optional | Token budget for response (default: 8000) |
Response includes:
- Project identity — name, type, tech stack, org
- API routes — all detected endpoints with file:line locations
- Linked services — routes, GraphQL subgraphs, file structure of cross-repo dependencies
- Conventions — team coding standards from workspace yaml
- Decisions — settled architecture choices with rationale
- Task-relevant code — FTS5-matched files and function signatures
- File content excerpts — first 30 lines of top-matched files
- Recent git history — last 5 commits for change awareness
- Test patterns — example test file structure for consistency
- Learned skills — relevant gotchas and patterns from past sessions
// Example: AI calls this at session start
eos_context({ task: "add retry logic to file upload" })
// Returns ~1200 tokens of focused context:
// - Project overview (type, stack, packages)
// - Routes showing upload endpoints
// - Linked services (backend handling uploads)
// - Convention: "All network calls through shared HTTP client"
// - Skill: "⚠️ Chunks must be uploaded in order"
// - Relevant files: src/services/upload.ts, src/hooks/useUpload.ts
| Parameter | Type | Description | |
|---|---|---|---|
query | string | Required | Search query |
scope | string | Optional | code | docs | decisions | all |
limit | number | Optional | Max results (default: 10) |
| Parameter | Type | Description | |
|---|---|---|---|
target | string | Required | Service or module name |
API Reference — Architecture Tools
| Parameter | Type | Description | |
|---|---|---|---|
action | string | Required | list-services | list-connections | find-path | diagram | stats |
repo | string | Optional | Filter by repository |
from | string | Optional | Source service (find-path) |
to | string | Optional | Target service (find-path) |
protocol | string | Optional | rest | grpc | graphql | event | import | database |
| Parameter | Type | Description | |
|---|---|---|---|
type | string | Required | file | service | endpoint |
target | string | Required | File path, service ID, or endpoint path |
repo | string | Optional | Repository name |
method | string | Optional | HTTP method (for endpoint) |
| Parameter | Type | Description | |
|---|---|---|---|
repo | string | Optional | Filter by repository |
type | string | Optional | openapi | grpc | graphql | event-schema |
id | string | Optional | Specific contract ID |
API Reference — Learning Tools
.eos/knowledge/skills/.| Parameter | Type | Description | |
|---|---|---|---|
type | string | Required | gotcha | pattern | convention | connection | shortcut |
content | string | Required | What was learned |
name | string | Optional | Short name |
context | string | Optional | When this applies |
tags | string[] | Optional | Tags for searchability |
| Parameter | Type | Description | |
|---|---|---|---|
query | string | Required | What you're working on |
type | string | Optional | Filter by skill type |
API Reference — Workflow Tools
| Parameter | Type | Description | |
|---|---|---|---|
requirement | string | Required | What to build — plain English requirement |
mode | string | Optional | plan-only (default) — just the plan. implement — plan + specialist prompts. full — plan + implement + test + review. |
repos | string[] | Optional | Limit scope to specific repos |
Output structure:
- Product Spec — user stories, acceptance criteria, rollout strategy, risks
- Tech Spec — affected services, reuse opportunities, new work items, constraints
- Execution Plan — ordered steps, each assigned to a specialist (FE-Engineer, BE-Engineer, DevOps-Engineer, etc.), with risk assessment and parallelization groups
// Example
eos_build({
requirement: "Add real-time order status notifications with WebSocket",
mode: "plan-only"
})
// Returns structured plan:
// Product Spec: user stories, acceptance criteria
// Tech Spec: affects order-service (Kafka producer), notification-service (WebSocket),
// mobile-app (UI component). Reuse: existing WebSocket infra from chat.
// Execution Plan:
// Step 1 [BE-Engineer]: Add Kafka event to order-service
// Step 2 [BE-Engineer]: WebSocket subscription in notification-service
// Step 3 [FE-Engineer]: Status badge component in mobile app
// Step 4 [DevOps-Engineer]: Scale WebSocket pods for load
| Parameter | Type | Description | |
|---|---|---|---|
title | string | Required | Decision title |
decision | string | Required | What was decided |
rationale | string | Required | Why |
alternatives | array | Optional | Options considered |
API Reference — Security Tools
| Parameter | Type | Description | |
|---|---|---|---|
paths | string[] | Optional | Specific paths to scan |
categories | string[] | Optional | secrets | injection | xss | config |
severity | string | Optional | Minimum: critical | high | medium | low |
All Security & Compliance Tools
| Tool | Purpose |
|---|---|
eos_security_scan | Scan for secrets, injection, XSS, path traversal, insecure configs |
eos_security_audit | Full OWASP Top 10 audit with CWE mapping |
eos_threat_model | STRIDE-based threat modeling with data flow analysis |
eos_dependency_check | CVE scanning across all package managers (npm, pip, Go, Maven, Gradle, Cargo, Gem) |
eos_compliance_check | Framework compliance (SOC2, HIPAA, PCI-DSS) |
eos_posture_score | Security posture scoring (0-100) with trend tracking |
eos_security_conventions | View/manage security coding standards |
Complete Tool Reference (47 Tools)
Every MCP tool available when connected to the Engineering OS server.
Knowledge & Search
| Tool | Purpose |
|---|---|
eos_context | Full project context for a task (primary entry point) |
eos_search | Full-text search across code, docs, decisions |
eos_search_all | Federated search across all linked repositories |
eos_explain | Explain a service/module at system level |
eos_index | Trigger re-indexing of files |
eos_health | Knowledge quality metrics (coverage, staleness, drift) |
eos_status | Workflow state, progress, and budget usage |
eos_export | Export knowledge as portable JSON archive |
Architecture & Dependencies
| Tool | Purpose |
|---|---|
eos_architecture | View discovered architecture (services, layers, patterns) |
eos_graph | Query the service dependency graph |
eos_impact | Analyze blast radius of a change |
eos_contracts | List API contracts between services |
eos_discover_contracts | Auto-discover API contracts from code |
eos_dependencies | Show what depends on a file/module |
eos_cross_context | Get context from linked repos |
eos_owners | Find code owners for files/modules |
Conventions & Decisions
| Tool | Purpose |
|---|---|
eos_conventions | View project coding conventions |
eos_patterns | Find coding patterns to follow |
eos_decide | Record an engineering decision |
eos_recall_decision | Check if a decision was already made |
eos_alternatives | Explore alternative approaches with tradeoffs |
Learning & Skills
| Tool | Purpose |
|---|---|
eos_learn | Record a discovery for future sessions |
eos_recall_skills | Recall relevant learned skills |
Workflow & Planning
| Tool | Purpose |
|---|---|
eos_build | Autonomous feature planning pipeline |
eos_refine | Refine a requirement into structured spec |
eos_plan | Generate execution plan with parallel task groups |
eos_review | Architecture-aware code review |
eos_validate | Validate code against project standards |
eos_marketplace | Browse and install workflow templates |
Multi-Repo & Team
| Tool | Purpose |
|---|---|
eos_link_repo | Link a repository for federated features |
eos_unlink_repo | Remove a linked repository |
eos_team_sync | Manage team conventions and policies |
eos_analytics | Usage analytics and tool stats |
eos_audit_log | Query the audit trail of all tool calls |
eos_audit_report | Generate exportable audit report |
Language & Framework Support
Code Indexing
EOS extracts functions, classes, interfaces, imports, and exports from these languages:
| Language | Extensions | Extracts |
|---|---|---|
| TypeScript | .ts, .tsx | Functions, classes, interfaces, types, exports |
| JavaScript | .js, .jsx, .mjs | Functions, classes, exports |
| Python | .py | Functions, classes, decorators |
| Go | .go | Functions, structs, interfaces, methods |
| Rust | .rs | Functions, structs, traits, impls |
| Java | .java | Classes, methods, interfaces, annotations |
| Ruby | .rb | Classes, modules, methods |
| Kotlin New | .kt, .kts | Classes, functions, data classes, sealed classes, Composables, extensions |
Route Scanning
| Framework | Language | Patterns Detected |
|---|---|---|
| Express | TypeScript/JS | app.get(), router.get(), router.route() |
| NestJS | TypeScript | @Controller() + @Get()/@Post() decorators |
| Fastify | TypeScript/JS | fastify.get(), fastify.route() |
| Next.js | TypeScript/JS | app/api/*/route.ts file conventions |
| Vert.x | Java | router.get(), @Route annotations |
| Ktor New | Kotlin | routing { get("/path") { } } |
| Spring Boot New | Java/Kotlin | @GetMapping, @PostMapping, @RequestMapping |
| Android Nav New | Kotlin | NavHost composable() routes |
Dependency Auditing (CVE Scanning)
| Ecosystem | Manifest Files | Known CVEs |
|---|---|---|
| npm | package.json | 20 (lodash, axios, express, jsonwebtoken...) |
| Python | requirements.txt, pyproject.toml | 12 (requests, django, flask, cryptography...) |
| Go | go.mod | 6 (golang.org/x/crypto, x/net...) |
| Java/Maven | pom.xml | 10 (log4j, jackson, spring-core...) |
| Gradle New | build.gradle, build.gradle.kts, libs.versions.toml | 18 (log4j, okhttp, spring, commons-text...) |
| Rust | Cargo.toml | 5 (hyper, openssl-src...) |
| Ruby | Gemfile | 6 (rails, nokogiri, rack...) |
Configuration Reference
eos.workspace.yaml
| Field | Type | Description |
|---|---|---|
name | string | Project name |
type | string | Project type (monorepo, react-native, spring-boot, etc.) |
org | string | Organization name |
repos | array | Linked repositories (name, path, role) |
conventions | array | Team conventions (name, rule) |
decisions | array | Engineering decisions (title, decision, rationale) |
ai.tools | string[] | AI tools to generate files for ([claude, cursor]) |
ai.mcp | boolean | Whether to configure MCP auto-connect |
Storage Layout
├── index/metadata.db — SQLite FTS5 search index
├── graph/services.db — Service dependency graph
├── knowledge/
│ ├── decisions/ — Engineering decisions (YAML)
│ ├── architecture/ — Services, patterns, conventions
│ └── skills/ — Learned skills (YAML)
├── graph/service-map.json — JSON export for Cursor adapter
└── .last-refresh — Timestamp for incremental refresh
eos.workspace.yaml — Team-shared (in git)
CLAUDE.md — Generated steering file (in git)
.cursor/rules/eos-*.md — Generated Cursor rules (in git)
~/.eos/repos.yaml — Global registry of onboarded repos
Troubleshooting
MCP Connection Error: -32000
If you see Failed to reconnect to engineering-os: -32000 when running /mcp in Claude Code, this almost always means a Node.js version mismatch.
EOS uses better-sqlite3, a native C++ module compiled for a specific Node.js ABI version. If you installed EOS with one Node version (e.g., Node 24) but your shell defaults to another (e.g., Node 22), the native binary cannot load.
How to fix
# Check which Node version your shell defaults to
node --version
# Rebuild the native module for that version
npm rebuild better-sqlite3
# Or reinstall EOS globally with the current Node
npm install -g engineering-os
Why this happens
If you use nvm, your .zshrc or .bashrc may force a specific Node version (e.g., nvm use 22). Claude Code inherits this shell environment when spawning the MCP server. If you originally ran npm install with a different Node version, the compiled native module won't match.
Permanent fix
# Option A: Always install with the same Node your shell uses
nvm use 22 # or whatever your default is
npm install -g engineering-os
# Option B: Add a .nvmrc to avoid confusion
echo "22" > ~/.nvmrc
# Option C: Set nvm default to match your active version
nvm alias default 22
Rule of thumb: The Node version that runs npm install must match the Node version that runs eos serve.
MCP Server Not Found
If Claude Code can't find the eos command:
# Verify eos is installed and in PATH
which eos
# If not found, install globally
npm install -g engineering-os
# Verify it works
eos --version
No .eos/ Directory Found
The MCP server requires an initialized project. Run:
cd your-project
eos init --claude
If you're working from a directory that isn't a project root, use the --global flag or ensure the global registry has repos registered:
# Check registered repos
cat ~/.eos/repos.yaml
# Start server in global mode
eos serve --global
Database Locked Errors
If you see SQLite "database is locked" errors, it means two EOS processes are competing for the same database. This can happen if you have multiple Claude Code sessions open on the same project. Each session spawns its own eos serve process — this is safe (EOS uses WAL mode with busy timeout), but if you encounter issues:
# Find and kill stale eos processes
ps aux | grep "eos serve" | grep -v grep
kill
# Then reconnect in Claude Code
/mcp
Slow Indexing
Initial indexing scans all source files. For very large repos (100K+ files), you can:
# Use incremental refresh after the initial index
eos refresh --incremental
# Or use git-based refresh for just recent changes
eos refresh --since=HEAD~5
Node.js Version Requirements
| Requirement | Version | Notes |
|---|---|---|
| Minimum | Node.js 18.0.0 | MCP SDK requires ≥18 |
| Recommended | Node.js 20 LTS or 22 LTS | Best compatibility and performance |
| Also supported | Node.js 24 | Latest current release |