MCP server providing coding standards, skills, and workflows for AI agents
Rust
0
157 commits
updated Sep 21, 2026

Agent Guidance is a native, high-performance MCP (Model Context Protocol) Server & Autonomous Orchestrator written in Rust. It supervises AI Coding Agents (Antigravity, Claude Code, Cursor, Windsurf, Devin, OpenCode) to enforce enterprise architecture patterns, isolate multi-IDE session states, prevent context window blowups via token compression, and deliver sub-millisecond Smart Skills Calls via local ML vector search.
Run the one-liner setup script for your operating system to download the latest release binary, pre-cache local ML models, and auto-register agent-guidance across all detected IDE clients:
Windows (PowerShell / CMD):
powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/JunMystery/Agent-Guidance-Rust/main/scripts/install.ps1 | iex"
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/JunMystery/Agent-Guidance-Rust/main/scripts/install.sh | bash
git clone https://github.com/JunMystery/Agent-Guidance-Rust.git
cd Agent-Guidance-Rust
cargo build --release
./target/release/agent-guidance --setup
Agent Guidance exposes 6 high-efficiency MCP tools designed to minimize agent round-trips and token waste:
| Tool Name | Role / Action | Mandatory Arguments | Key Capabilities |
|---|---|---|---|
task_pipeline | Entrypoint Orchestrator | task, project_path, phase | CALL FIRST. Scans project, unlocks priority gate, proposes skills, synthesizes Dynamic Split Blueprints (detects $\ge 200$ LOC files) and Skill Recipes, and injects Memorized Learnings. |
select_skills | Semantic Skill Loader | skills | Loads skill instructions into context with Semantic Slicing (Top-3 sections via Multilingual-E5 saving ~70% tokens), records analytics, and injects language safety micro-guidance. |
workflow_gate | Stage & Impact Guard | action | Manages stage transitions (check, status, set_stage, advance, authorize_edit, rollback, sync_file). Features Zero-Turn Advance, Code Graph Impact Risk Gating, Evolutionary Co-Change Forgotten File Alerts, Targeted Write-Through Invalidation (<10ms), and Pre-edit Snapshot Rollback. |
project_context | Code Graph, GraphRAG & Multi-File Bundling | operation (graph_rag / search / subgraph_bundle / data_flow / navigate / read / symbols / references / callers / callees / blast_radius / definition / type_definition / architecture / tree / learn_alias / reindex / enrich_graph / semantic_query) | Hierarchical Leiden GraphRAG (global, local, drift, basic), Multi-File Subgraph Bundling (subgraph_bundle packing target + 1-hop callers/callees under 250 LOC budget), Intra-procedural Data Flow (data_flow), Deep Graph Federation (Cargo & npm monorepo workspaces, cross-repo callers/callees), Architecture Healing Sentinel (Cycle & Orphan detection in architecture), Search Precision (Dynamic IDF + Intent Gating), 6-phase cascade search (<100ms), RAG code chunk vectors, AST symbol extraction, and AST Structural Skeletonization (view_mode="skeleton"). |
guidance | Skills & Rule Engine | operation (search / docs / workflow / precode / verify / analytics) | 2-stage vector search over 279 embedded skills, Cross-Session Skill Analytics (analytics operation with historical boost), language-specific precode safety rules, and empirical verification contracts. |
session_continuity | Memory, Snapshots & Handoff | operation (save / load / clear / learn / handoff / diff / list / switch) | Persists active task states, records Pairwise Co-Changes into evolutionary graph, saves Categorized Project Learnings in .agent-context/learnings.md (30-item FIFO cap with vector deduplication), and generates Cross-Agent Handoff summaries in .agent-context/handoff.md. |
task_pipeline. The MCP server inspects the workspace, unlocks priority gates, selects skills, and dynamically directs next steps..agent-context/architecture.json.<project_root>/.agent-context/code_graph.db:
notify) with a 5s debounce to incrementally update AST symbols, DAG edges, and RAG chunks before the agent even issues a query.~/.agent-guidance/usage.db).session_{PID}_{ClientName}) to eliminate state collisions across concurrent IDEs (VS Code, Cursor, Antigravity) or CLI tools in the same codebase.
#graph-symbol-list-container).0.10) for focused architecture inspection.en) and Vietnamese (vi) with instant dynamic switching and persistent preferences.[workspace] members), npm/pnpm/yarn workspaces, and Go work roots to seamlessly bind virtual monorepos into a single unified knowledge graph.project_context(operation="callers" | "callees")), tagged with clear repository namespaces ([repo:lib-name]).co_change_edges on session persistence (session_continuity(operation="save")).workflow_gate(action="authorize_edit")), warning agents when tightly coupled code files or test suites are accidentally overlooked.project_context(operation="architecture")..agpack) with SQLite WAL checkpointing, streaming SHA256 checksums, and pre-installation PRAGMA quick_check validation.
Context $\longrightarrow$ Plan $\longrightarrow$ Ask_Revise $\longrightarrow$ Build $\longrightarrow$ Test_Recheck $\longrightarrow$ Fix $\longrightarrow$ Proposal
workflow_gate action="advance"): Performs stage check, transition, and architecture pattern authorization in a single composite MCP call.workflow_gate action="authorize_edit"): Code modification is BLOCKED until plan_approved = true and a valid architecture_pattern is verified.Fix, the MCP server automatically trips, resets stage to Ask_Revise, and requests human intervention.The built-in ML catalog engine leverages local Rust bindings for Hugging Face candle to perform sub-millisecond semantic skill discovery:
ms-marco-MiniLM-L-6-v2) reranks top candidates with language profile boosting.select_skills(skills=[...]) only when confirmed.You can easily add your own custom skills without rebuilding or reconfiguring the MCP server:
~/.agent-guidance/skills/ (or ~/.agents/skills/)<project_root>/.agents/skills/<project_root>/.opencode/skills/<project_root>/.claude/skills/All .md files in these directories are automatically scanned, parsed for YAML frontmatter (name: ...), and indexed into the local search catalog on the fly.
project_context(operation="read", target_symbol="...") saving up to 85% of tokens.~/.agent-guidance/usage.db.When running multiple AI agents across different IDEs or terminals simultaneously in the same repository, Agent Guidance maintains total isolation:
.agent-context/
├── architecture.json (Persistent Architecture Memory)
├── sessions/
│ ├── session_14820_antigravity.json (Build Stage - Plan Approved)
│ ├── session_29401_cursor.json (Plan Stage - Awaiting Approval)
│ └── session_8812_cli.json (Context Stage)
└── session.json (Legacy Atomic Pointer)
agent-guidance provides built-in CLI commands for managing IDE clients, updates, and metrics:
agent-guidance [OPTIONS]
Options:
--setup Install and configure MCP server across all IDE clients
--verify-setup Verify MCP configuration paths in all IDE clients
--upgrade Download and install latest release package, update IDE configs
--self-update Alias for --upgrade
--daemon, -d Force start in background singleton daemon mode
--proxy Force connect as client proxy to daemon; exit if no daemon
--dashboard Start real-time web usage dashboard at http://127.0.0.1:11997
--port, -p <PORT> Custom dashboard port (default: 11997, alias: --dashboard-port)
--project <PATH> Filter dashboard to a specific project path or name
--prune-missing Prune non-existent projects from usage tracking registry
--cleanup Auto-clean expired logs, prune dead projects, and vacuum SQLite DB
--retention-days <N> Retention window in days for detail logs (default: 7)
--reindex-skills Precompute and build rich semantic vector index for all skills
--uninstall Remove MCP server configurations from all IDE clients
--help, -h Print help message
Agent-Guidance-Rust/
├── src/
│ ├── main.rs # CLI entrypoint, argument parsing, stdio MCP dispatcher
│ ├── catalog/ # Built-in and custom skills scanner, indexer, YAML parser
│ ├── context/ # Codebase indexing, AST parsing, GraphRAG, 5-phase cascade search
│ │ ├── graph_rag/ # Hierarchical Leiden community clustering, DRIFT/Local/Global search
│ │ ├── indexer/ # Tree-sitter AST symbol and reference extraction
│ │ ├── scanner/ # File walker, gitignore resolution, change detection
│ │ └── watcher/ # Real-time background filesystem watcher
│ ├── daemon/ # Zero-friction singleton daemon, IPC named pipe/socket, client lifecycle
│ ├── dashboard/ # Embedded tiny_http web server, REST endpoints, SQLite telemetry queries
│ ├── dashboard_src/ # Frontend SPA (Vanilla JS + CSS, zero runtime npm dependencies)
│ │ ├── index.html # Dashboard layout and accessible view containers
│ │ ├── js/i18n/ # Modular bilingual dictionaries (EN/VI: core, telemetry, graph)
│ │ └── js/render/ # Canvas graph visualizer, ForceAtlas2 layout engine, symbol inspector
│ ├── mcp/ # Model Context Protocol implementation & tool execution handlers
│ │ ├── tools/ # task_pipeline, select_skills, workflow_gate, project_context, guidance
│ │ ├── state/ # Multi-session state machine, priority gate, checkpointing
│ │ └── db/ # SQLite database operations, automatic cleanup, and vacuuming
│ ├── ml/ # Candle BERT neural embeddings, vector similarity, ONNX inference
│ └── optimizer/ # Universal token compression engine, AST code skeletonizer
├── skills/ # Pre-packaged domain skills catalog (279 embedded skills, 440 vectors)
├── docs/ # Architectural diagrams, specifications, setup guides
│ └── images/ # Dashboard screenshots, hero banners, and flowcharts
└── scripts/ # Automated installation and maintenance scripts (PowerShell, Bash)
Comprehensive guides, architecture deep-dives, and client setup instructions are available in the docs/ directory:
| Section | Topic | Documentation Link |
|---|---|---|
| Architecture | System Design & Lifecycles | docs/ARCHITECTURE.md |
| Getting Started | Quickstart & Overview | docs/getting-started.md |
| Web Dashboard | Real-Time Telemetry & Visual GraphRAG | docs/dashboard.md |
| Installation | Platform Setup & Upgrades | docs/installation.md |
| Usage Guide | Orchestrator & Workflow Usage | docs/usage.md |
| Development | Contributing & Testing | docs/development.md |
| IDE Setup | Antigravity, Cursor, VS Code, Windsurf | docs/setup/ |
| Skills Guide | Skill Anatomy & Catalog Policy | docs/skills/SKILLS_OVERVIEW.md |
| Reference | MCP Surface & Protocol Spec | docs/reference/mcp-surface.md |
This project references and acknowledges the following third-party security resources:
| Resource | Description | Repository |
|---|---|---|
| ECC | Elliptic Curve Cryptography reference implementation | affaan-m/ECC |
| OWASP CheatSheetSeries | Collection of high-value security cheat sheets for application security | OWASP/CheatSheetSeries |
Distributed under the MIT License. See LICENSE for details.
157 commits
Rust
60.4%
JavaScript
15.7%
Python
11.6%
Shell
6.3%
CSS
3.0%
HTML
1.3%
MCP server providing coding standards, skills, and workflows for AI agents
Rust
0
157 commits
updated Sep 21, 2026

Agent Guidance is a native, high-performance MCP (Model Context Protocol) Server & Autonomous Orchestrator written in Rust. It supervises AI Coding Agents (Antigravity, Claude Code, Cursor, Windsurf, Devin, OpenCode) to enforce enterprise architecture patterns, isolate multi-IDE session states, prevent context window blowups via token compression, and deliver sub-millisecond Smart Skills Calls via local ML vector search.
Run the one-liner setup script for your operating system to download the latest release binary, pre-cache local ML models, and auto-register agent-guidance across all detected IDE clients:
Windows (PowerShell / CMD):
powershell -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/JunMystery/Agent-Guidance-Rust/main/scripts/install.ps1 | iex"
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/JunMystery/Agent-Guidance-Rust/main/scripts/install.sh | bash
git clone https://github.com/JunMystery/Agent-Guidance-Rust.git
cd Agent-Guidance-Rust
cargo build --release
./target/release/agent-guidance --setup
Agent Guidance exposes 6 high-efficiency MCP tools designed to minimize agent round-trips and token waste:
| Tool Name | Role / Action | Mandatory Arguments | Key Capabilities |
|---|---|---|---|
task_pipeline | Entrypoint Orchestrator | task, project_path, phase | CALL FIRST. Scans project, unlocks priority gate, proposes skills, synthesizes Dynamic Split Blueprints (detects $\ge 200$ LOC files) and Skill Recipes, and injects Memorized Learnings. |
select_skills | Semantic Skill Loader | skills | Loads skill instructions into context with Semantic Slicing (Top-3 sections via Multilingual-E5 saving ~70% tokens), records analytics, and injects language safety micro-guidance. |
workflow_gate | Stage & Impact Guard | action | Manages stage transitions (check, status, set_stage, advance, authorize_edit, rollback, sync_file). Features Zero-Turn Advance, Code Graph Impact Risk Gating, Evolutionary Co-Change Forgotten File Alerts, Targeted Write-Through Invalidation (<10ms), and Pre-edit Snapshot Rollback. |
project_context | Code Graph, GraphRAG & Multi-File Bundling | operation (graph_rag / search / subgraph_bundle / data_flow / navigate / read / symbols / references / callers / callees / blast_radius / definition / type_definition / architecture / tree / learn_alias / reindex / enrich_graph / semantic_query) | Hierarchical Leiden GraphRAG (global, local, drift, basic), Multi-File Subgraph Bundling (subgraph_bundle packing target + 1-hop callers/callees under 250 LOC budget), Intra-procedural Data Flow (data_flow), Deep Graph Federation (Cargo & npm monorepo workspaces, cross-repo callers/callees), Architecture Healing Sentinel (Cycle & Orphan detection in architecture), Search Precision (Dynamic IDF + Intent Gating), 6-phase cascade search (<100ms), RAG code chunk vectors, AST symbol extraction, and AST Structural Skeletonization (view_mode="skeleton"). |
guidance | Skills & Rule Engine | operation (search / docs / workflow / precode / verify / analytics) | 2-stage vector search over 279 embedded skills, Cross-Session Skill Analytics (analytics operation with historical boost), language-specific precode safety rules, and empirical verification contracts. |
session_continuity | Memory, Snapshots & Handoff | operation (save / load / clear / learn / handoff / diff / list / switch) | Persists active task states, records Pairwise Co-Changes into evolutionary graph, saves Categorized Project Learnings in .agent-context/learnings.md (30-item FIFO cap with vector deduplication), and generates Cross-Agent Handoff summaries in .agent-context/handoff.md. |
task_pipeline. The MCP server inspects the workspace, unlocks priority gates, selects skills, and dynamically directs next steps..agent-context/architecture.json.<project_root>/.agent-context/code_graph.db:
notify) with a 5s debounce to incrementally update AST symbols, DAG edges, and RAG chunks before the agent even issues a query.~/.agent-guidance/usage.db).session_{PID}_{ClientName}) to eliminate state collisions across concurrent IDEs (VS Code, Cursor, Antigravity) or CLI tools in the same codebase.
#graph-symbol-list-container).0.10) for focused architecture inspection.en) and Vietnamese (vi) with instant dynamic switching and persistent preferences.[workspace] members), npm/pnpm/yarn workspaces, and Go work roots to seamlessly bind virtual monorepos into a single unified knowledge graph.project_context(operation="callers" | "callees")), tagged with clear repository namespaces ([repo:lib-name]).co_change_edges on session persistence (session_continuity(operation="save")).workflow_gate(action="authorize_edit")), warning agents when tightly coupled code files or test suites are accidentally overlooked.project_context(operation="architecture")..agpack) with SQLite WAL checkpointing, streaming SHA256 checksums, and pre-installation PRAGMA quick_check validation.
Context $\longrightarrow$ Plan $\longrightarrow$ Ask_Revise $\longrightarrow$ Build $\longrightarrow$ Test_Recheck $\longrightarrow$ Fix $\longrightarrow$ Proposal
workflow_gate action="advance"): Performs stage check, transition, and architecture pattern authorization in a single composite MCP call.workflow_gate action="authorize_edit"): Code modification is BLOCKED until plan_approved = true and a valid architecture_pattern is verified.Fix, the MCP server automatically trips, resets stage to Ask_Revise, and requests human intervention.The built-in ML catalog engine leverages local Rust bindings for Hugging Face candle to perform sub-millisecond semantic skill discovery:
ms-marco-MiniLM-L-6-v2) reranks top candidates with language profile boosting.select_skills(skills=[...]) only when confirmed.You can easily add your own custom skills without rebuilding or reconfiguring the MCP server:
~/.agent-guidance/skills/ (or ~/.agents/skills/)<project_root>/.agents/skills/<project_root>/.opencode/skills/<project_root>/.claude/skills/All .md files in these directories are automatically scanned, parsed for YAML frontmatter (name: ...), and indexed into the local search catalog on the fly.
project_context(operation="read", target_symbol="...") saving up to 85% of tokens.~/.agent-guidance/usage.db.When running multiple AI agents across different IDEs or terminals simultaneously in the same repository, Agent Guidance maintains total isolation:
.agent-context/
├── architecture.json (Persistent Architecture Memory)
├── sessions/
│ ├── session_14820_antigravity.json (Build Stage - Plan Approved)
│ ├── session_29401_cursor.json (Plan Stage - Awaiting Approval)
│ └── session_8812_cli.json (Context Stage)
└── session.json (Legacy Atomic Pointer)
agent-guidance provides built-in CLI commands for managing IDE clients, updates, and metrics:
agent-guidance [OPTIONS]
Options:
--setup Install and configure MCP server across all IDE clients
--verify-setup Verify MCP configuration paths in all IDE clients
--upgrade Download and install latest release package, update IDE configs
--self-update Alias for --upgrade
--daemon, -d Force start in background singleton daemon mode
--proxy Force connect as client proxy to daemon; exit if no daemon
--dashboard Start real-time web usage dashboard at http://127.0.0.1:11997
--port, -p <PORT> Custom dashboard port (default: 11997, alias: --dashboard-port)
--project <PATH> Filter dashboard to a specific project path or name
--prune-missing Prune non-existent projects from usage tracking registry
--cleanup Auto-clean expired logs, prune dead projects, and vacuum SQLite DB
--retention-days <N> Retention window in days for detail logs (default: 7)
--reindex-skills Precompute and build rich semantic vector index for all skills
--uninstall Remove MCP server configurations from all IDE clients
--help, -h Print help message
Agent-Guidance-Rust/
├── src/
│ ├── main.rs # CLI entrypoint, argument parsing, stdio MCP dispatcher
│ ├── catalog/ # Built-in and custom skills scanner, indexer, YAML parser
│ ├── context/ # Codebase indexing, AST parsing, GraphRAG, 5-phase cascade search
│ │ ├── graph_rag/ # Hierarchical Leiden community clustering, DRIFT/Local/Global search
│ │ ├── indexer/ # Tree-sitter AST symbol and reference extraction
│ │ ├── scanner/ # File walker, gitignore resolution, change detection
│ │ └── watcher/ # Real-time background filesystem watcher
│ ├── daemon/ # Zero-friction singleton daemon, IPC named pipe/socket, client lifecycle
│ ├── dashboard/ # Embedded tiny_http web server, REST endpoints, SQLite telemetry queries
│ ├── dashboard_src/ # Frontend SPA (Vanilla JS + CSS, zero runtime npm dependencies)
│ │ ├── index.html # Dashboard layout and accessible view containers
│ │ ├── js/i18n/ # Modular bilingual dictionaries (EN/VI: core, telemetry, graph)
│ │ └── js/render/ # Canvas graph visualizer, ForceAtlas2 layout engine, symbol inspector
│ ├── mcp/ # Model Context Protocol implementation & tool execution handlers
│ │ ├── tools/ # task_pipeline, select_skills, workflow_gate, project_context, guidance
│ │ ├── state/ # Multi-session state machine, priority gate, checkpointing
│ │ └── db/ # SQLite database operations, automatic cleanup, and vacuuming
│ ├── ml/ # Candle BERT neural embeddings, vector similarity, ONNX inference
│ └── optimizer/ # Universal token compression engine, AST code skeletonizer
├── skills/ # Pre-packaged domain skills catalog (279 embedded skills, 440 vectors)
├── docs/ # Architectural diagrams, specifications, setup guides
│ └── images/ # Dashboard screenshots, hero banners, and flowcharts
└── scripts/ # Automated installation and maintenance scripts (PowerShell, Bash)
Comprehensive guides, architecture deep-dives, and client setup instructions are available in the docs/ directory:
| Section | Topic | Documentation Link |
|---|---|---|
| Architecture | System Design & Lifecycles | docs/ARCHITECTURE.md |
| Getting Started | Quickstart & Overview | docs/getting-started.md |
| Web Dashboard | Real-Time Telemetry & Visual GraphRAG | docs/dashboard.md |
| Installation | Platform Setup & Upgrades | docs/installation.md |
| Usage Guide | Orchestrator & Workflow Usage | docs/usage.md |
| Development | Contributing & Testing | docs/development.md |
| IDE Setup | Antigravity, Cursor, VS Code, Windsurf | docs/setup/ |
| Skills Guide | Skill Anatomy & Catalog Policy | docs/skills/SKILLS_OVERVIEW.md |
| Reference | MCP Surface & Protocol Spec | docs/reference/mcp-surface.md |
This project references and acknowledges the following third-party security resources:
| Resource | Description | Repository |
|---|---|---|
| ECC | Elliptic Curve Cryptography reference implementation | affaan-m/ECC |
| OWASP CheatSheetSeries | Collection of high-value security cheat sheets for application security | OWASP/CheatSheetSeries |
Distributed under the MIT License. See LICENSE for details.
157 commits
Rust
60.4%
JavaScript
15.7%
Python
11.6%
Shell
6.3%
CSS
3.0%
HTML
1.3%