Skip to content

LastEld/AMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

503 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AMS Icon

AMS: Audit Memory System

Durable control plane for multi-agent orchestration.


Audit-first agent memory and orchestration layer for MCP clients.

AMS gives AI assistants durable project scope, task control, proof-oriented execution trails, long-term memory, and orchestration primitives. Every action is auditable. Every decision is traceable. Every completion is provable.

CI GitHub Pages Version License Docker

Coverage Tests TypeScript ESLint

Stars Forks Issues Contributors

Node.js SQLite React MCP

Obsidian Docs API

Docs lasteld.github.io/AMS
Tool Reference docs/api/tool-reference.md
Architecture docs/architecture/overview.md
Getting Started docs/tutorials/getting-started.md
Obsidian Plugin integrations/obsidian-plugin/README.md
Release Notes RELEASE_NOTES.md

Control Plane v1.1.0

The AMS Control Plane provides a unified dashboard for system oversight and management:

Screen Feature Description
Dashboard System Overview Real-time vitals, task stats, roadmap progress, and health indicators
Tools Tool Surface Manager Browse, search, and inspect all 484 MCP tools with filtering by tier, domain, and capability
Audit Cryptographic Audit Log Tamper-evident action logs with Merkle tree verification and chain integrity checks
Agents Agent Roster Real-time view of active agents, their status, health, and current assignments
Workflows Pipeline Overview Visual GSD workflow execution with phase status, dependencies, and progress tracking
Memory Memory Inspector Search, browse, and manage memory frames with semantic search and cross-session bridging

Access via Obsidian plugin or programmatically through the AMS MCP tool surface.

Project Status

Metric Value
Total Tasks 300
Completed 248 (82.7%)
In Progress 0
Backlog 52
Available Tools 484
Test Suite 121 passing
Roadmaps 8
Wave 1 (Runtime) Complete
Wave 2 (Domains) Complete
Wave 3-4 (Claude, Tests, Docs) Backlog

Install

git clone https://github.com/LastEld/AMS.git
cd AMS
npm install
npm test
node src/server.js

MCP Client Configuration

{
  "mcpServers": {
    "ams": {
      "command": "node",
      "args": ["$AMS_ROOT/src/server.js"],
      "env": {
        "AMS_ROOT": "$AMS_ROOT",
        "AMS_WATCH_MODE": "none",
        "DOTENV_CONFIG_QUIET": "true"
      }
    }
  }
}

Replace $AMS_ROOT with your AMS installation path (e.g., /path/to/AMS on Unix or C:/path/to/AMS on Windows).

Optional: add ANTHROPIC_API_KEY to env to enable the Claude API tool surface (290 tools).

Verify with:

unified_init
unified_vitals
unified_help

Local Skills (Tier 1)

AMS includes 16 shared skills in .agents/skills/ (for Claude, Kimi, Codex) plus 2 Claude-specific skills in .claude/skills/.

PM and Orchestration

Skill Purpose
ams-project-manager PM and handoff controller
ams-tier1-chains Meta-prompting tool chains for sub-agent spawning
ams-autonomous Autonomous planning and apply flows

Task and Roadmap

Skill Purpose
ams-task-management Task CRUD with dependencies
ams-roadmaps-tasks Roadmaps, tasks, and project sync
ams-roadmap-progress Register roadmaps and update progress

GSD and Execution

Skill Purpose
ams-gsd GSD planning and orchestration
ams-gsd-execution Workflow execution and agent spawning

Audit, Memory, and Proof

Skill Purpose
ams-audit-memory Audit, memory, and proof flows
ams-audit-proof Audit sessions and verifiable proof artifacts
ams-memory-context Memory packing and immutable context snapshots

Infrastructure and Integrations

Skill Purpose
ams-mcp-server MCP server operation and troubleshooting
ams-observability Health, metrics, logs, and alerts
ams-obsidian-integration Obsidian plugin operation
ams-growth-strategy Growth strategy execution
repo-facing-polish GitHub-facing cleanup and releases

See AGENTS.md for full skill documentation and coordination rules.

Tool Surface — 484 Tools

AMS exposes 484 MCP tools organized into two tiers. Every tool listed below is a real, callable MCP tool registered in src/controllers/index.js. No placeholders, no stubs.

Tier 1: Core AMS (194 tools)

The operational control plane. These tools manage projects, tasks, execution, proof, and memory.

Domain Count Tools Purpose
Unified 12 unified_init, unified_vitals, unified_help, unified_stats, unified_set_project, unified_sync, unified_backup, unified_restore, unified_export, unified_import, unified_metrics, unified_architecture System bootstrap, health, diagnostics
Tasks 10 task_create, task_update, task_delete, task_list, task_deps, task_next_actions, task_eisenhower, task_report, task_create_batch, task_link_roadmap, task_sync_to_gsd Task CRUD, prioritization, dependencies
Roadmaps 16 roadmap_list, roadmap_get, roadmap_nodes, roadmap_node_get, roadmap_register, roadmap_validate, roadmap_validate_all, roadmap_repair, roadmap_repair_all, roadmap_search, roadmap_analyze, roadmap_export_to_gsd, roadmap_progress_get, roadmap_progress_update, roadmap_progress_update_batch, roadmap_next_topic, roadmap_prerequisites_check Learning roadmaps, progress tracking
Context 7 context_create, context_get, context_latest, context_diff, context_history, context_verify, context_ensure Immutable execution snapshots
Audit 8 audit_session_start, audit_session_end, audit_session_status, audit_session_stats, audit_session_set_context, audit_get_actions, audit_get_chain_info, audit_verify_chain, audit_analytics Action logs, chain verification
Thought 6 thought_record, thought_plan, thought_tree, thought_verify, thought_decide, thought_for_action, thought_reasoning_trail Plans, decisions, reasoning trails
Merkle 6 merkle_finalize, merkle_root, merkle_verify, merkle_proof, merkle_audit, merkle_attest Cryptographic proof trees
Memory 13 memory_smart_store, memory_get, memory_forget, memory_stats, memory_verify, memory_embed, memory_semantic_search, memory_bundle, memory_pack, memory_map, memory_gc, memory_summarize, memory_cross_session, memory_prioritize, memory_retention, memory_tier_migrate, memory_context_compress Persistent memory, semantic search
Analysis 10 analysis_search, analysis_similar, analysis_compare, analysis_recommend, analysis_keywords, analysis_cache, analysis_rag_index, analysis_rag_search, analysis_rag_stats TF-IDF search, RAG, recommendations
GSD 22 gsd_plan, gsd_validate, gsd_state, gsd_dash, gsd_discuss, gsd_evolve, gsd_lease, gsd_skill, gsd_vitals, gsd_verify_comprehensive, gsd_report_generate, gsd_agent, gsd_agent_spawn, gsd_agent_status, gsd_agent_terminate, gsd_agent_pool_create, gsd_agent_pool_scale, gsd_parallel_map, gsd_phase_plan, gsd_phase_execute, gsd_phase_status, gsd_workflow_create, gsd_workflow_run, gsd_workflow_status, gsd_workflow_list, gsd_workflow_cancel Orchestration, agents, workflows
Intelligent 18 intelligent_route, intelligent_learn, intelligent_predict, intelligent_classify, intelligent_match, intelligent_rank, intelligent_suggest, intelligent_optimize, intelligent_anomaly, intelligent_scale, intelligent_retry, intelligent_fallback, intelligent_detect_anomaly, intelligent_recommend, intelligent_analyze, intelligent_stats, intelligent_feedback, intelligent_router_analyze, intelligent_cache_stats, intelligent_cache_warm, intelligent_tune, intelligent_report ML routing, anomaly detection
Observe 14 observe_health_check, observe_system_metrics, observe_latency_dashboard, observe_throughput_metrics, observe_error_rates, observe_log_analyze, observe_trace_flow, observe_alert_create, observe_alert_list, observe_alert_acknowledge, observe_audit_realtime, observe_claude_usage, observe_claude_cost, observe_token_tracking, observe_metrics_export, observe_report_generate Metrics, tracing, alerting
Other Core 52 acl_* (4), alert_* (7), ams_autonomous_* (2), ams_session_* (3), analytics_* (14), notify (1), parallel_execute (1), performance_* (3), rag_* (3), watcher_* (3), webhook_* (3), workflow_run (1) ACL, alerts, automation, analytics

Tier 2: Claude API Surface (290 tools)

Direct Anthropic API integration. Requires ANTHROPIC_API_KEY in env.

Domain Count Purpose
Core API 10 claude_chat, claude_complete, claude_embed, claude_stream, claude_models, claude_model_capabilities, claude_configure, claude_health_check, claude_health_check_detailed, claude_health_metrics
Vision 19 Image analysis, OCR, object detection, scene classification, face analysis, color extraction, chart reading
Batch Processing 14 Batch job creation, monitoring, results, webhooks for bulk API operations
Streaming 9 SSE and WebSocket streaming, multiplexing, flow control
Files & Documents 16 File upload/download, PDF extraction, document Q&A, entity extraction
Conversations 14 Multi-turn conversation management, search, analytics, archiving
Messages 9 Message storage, search, indexing, export
Workspaces 16 Workspace CRUD, members, sharing, comments, activity tracking
Organizations & Projects 10 Org management, project CRUD, templates
Budget & Billing 11 Budget tracking, alerts, forecasting, invoices
Usage & Analytics 20 Token usage, cost analysis, trends, forecasting, anomaly detection
Tool Chains 13 Tool composition, chaining, discovery, autocomplete
Citations 13 Source management, citation formatting, validation
Computer Use 15 Screen interaction, keyboard/mouse control, screenshot capture
Tokens 5 Token counting, analysis, optimization, validation
Context Management 8 Context compression, optimization, prioritization, statistics
Threads 4 Thread forking, merging, import/export
Extended Thinking 5 Thinking budget, content access, optimization, statistics
Prompt Cache 3 Cache creation, metrics, status
Resilience 8 Circuit breakers, bulkheads, fallbacks, rate limiting, deduplication
API Keys 4 Key creation, listing, revocation, usage tracking
Webhooks 10 Webhook registration, management, testing, logs
Templates 2 Template listing and application
Fine-tuning 1 Model fine-tuning
Cost Estimation 3 Cost estimation, projection, budget-vs-actual

Full tool reference with every parameter: docs/api/tool-reference.md

Architecture

MCP Client (Claude Code / Obsidian / Codex / Kimi)
    |
    v  stdio JSON-RPC
src/server.js ── MCP Server
    |
    v  middleware (auth, ACL, audit, rate-limit)
src/controllers/ ── Tool Router (484 tools)
    |
    +── src/domains/     (tasks, roadmaps, gsd, context, audit, memory, merkle, thought, architecture, retention, integrations)
    +── src/tools/       (claude-api, claude-advanced, claude-workspace, claude-vision)
    +── src/claude/      (Claude SDK wrappers: core, models, batch, streaming, resilience)
    |
    v
src/db/ ── SQLite (WAL mode, serialized writes)
    |
    v
data/ams.db ── Durable state (tasks, contexts, audit actions, thoughts, memory, merkle trees)

Client Matrix

Client Config Location Server Name
Claude Code (VSCode) .vscode/mcp-settings.json or .mcp.json ams-v5
Claude Desktop %APPDATA%/Claude/claude_desktop_config.json ams-v5
Codex ~/.codex/config.toml ams
Kimi Code ~/.kimi/mcp.json ams-v5
Obsidian Plugin settings (spawns own server) N/A

All clients point to the same node src/server.js entrypoint and same data/ams.db.

Obsidian Plugin (v1.0.0)

The Obsidian plugin provides a full-featured AMS Control Center with real-time visual task management, GSD workflow control, agent pool management, and live dashboards.

Key Features

Feature Description
Graph View Interactive visualization for tasks, projects, and sessions with expandable hierarchy
Bidirectional Sync Real-time sync between Obsidian and AMS with conflict resolution
Task Tree Visualization Hierarchical task view with status badges, progress bars, and context menus
Session Tracking Audit-backed session notes with Merkle proof trails
Memory Frame Integration Access and manage AMS memory frames directly from Obsidian
GSD Workflow Control Start, pause, resume workflows and view phase status
Agent Pool Management Monitor agent health, spawn/terminate agents, view utilization
Reporting Dashboard Live SVG charts for task completion, agent metrics, and workflow timeline

Installation

Via BRAT (Recommended):

  1. Install the BRAT plugin in Obsidian
  2. Add LastEld/AMS with subpath integrations/obsidian-plugin
  3. Enable the AMS plugin in Community Plugins

Manual Installation:

  1. Download the latest release from GitHub Releases
  2. Extract to <vault>/.obsidian/plugins/ams-obsidian/
  3. Enable the plugin in Community Plugins

Configuration

Configure via Settings → AMS Obsidian:

Setting Description Example
amsRoot Path to AMS installation $AMS_ROOT or /path/to/AMS
defaultProject Auto-connect to this project ams-core
nodePath Path to Node.js binary node
autoStartServer Connect on plugin load true
syncInterval Auto-sync interval (minutes) 5

See integrations/obsidian-plugin/README.md for full documentation.

Repository Layout

src/
  server.js              MCP server entrypoint (production)
  controllers/           Tool definitions and routing (40+ files)
  domains/               Business logic (tasks, gsd, context, audit, memory, merkle, etc.)
  tools/                 Claude API tool handlers
  claude/                Claude SDK wrappers (core, models, batch, streaming, resilience)
  db/                    SQLite schema, repositories, migrations
  middleware/            Auth, ACL, rate limiting, runtime locks
  config/                Runtime configuration (server, claude, security)
  watchers/              File system watchers
  metrics/               Observability and metrics collection
  security/              Security scanning and validation
  validation/            Zod schemas for input validation
  runtime/               Process coordination and daemon management
  websocket/             WebSocket server for streaming
integrations/
  obsidian-plugin/       Full Obsidian plugin v1.0.0 (MCP stdio, rate-limited sync, offline queue, graph view)
tests/
  unit/                  Unit tests
  integration/           Integration tests (121 total, all passing)
docs/                    GitHub Pages documentation
data/                    Runtime database and state
config/                  Configuration files

Proof Model

AMS implements a proof-grade execution trail:

  1. audit_session_start — begin a tracked session
  2. thought_plan — record the execution plan
  3. context_ensure — snapshot the execution context
  4. Execute work (task updates, code changes)
  5. thought_record — record decisions and evidence
  6. audit_verify_chain — verify the action chain integrity
  7. merkle_finalize — generate cryptographic proof tree
  8. merkle_root — retrieve the Merkle root hash

Every step is immutable once written. The Merkle tree provides tamper-evident proof that the recorded execution trail was not modified after the fact.

Operating Constraints

  • SQLite is the durable store. All writes are serialized.
  • MCP clients must share the same AMS_ROOT.
  • Desktop clients: set AMS_WATCH_MODE=none (watchers are for dedicated runtimes).
  • Proof-grade handoff requires audit + thought + merkle flows, not chat text.
  • The server uses console.log = console.error to keep stdout clean for MCP JSON-RPC.
  • Set DOTENV_CONFIG_QUIET=true in env to prevent dependency stdout pollution.

Models (Claude API)

Model ID Name Context Max Tokens
claude-opus-4-6 Claude Opus 4.6 200K 16,384
claude-sonnet-4-6 Claude Sonnet 4.6 200K 16,384
claude-haiku-4-5-20251001 Claude Haiku 4.5 200K 8,192
claude-3-5-sonnet-20241022 Claude 3.5 Sonnet 200K 8,192
claude-3-5-haiku-20241022 Claude 3.5 Haiku 200K 8,192
claude-3-opus-20240229 Claude 3 Opus 200K 4,096
claude-3-sonnet-20240229 Claude 3 Sonnet 200K 4,096
claude-3-haiku-20240307 Claude 3 Haiku 200K 4,096

Default: claude-sonnet-4-6

License

Apache-2.0 WITH Commons-Clause