The CAS platform ensures AI agents and developers always work from the right context.
A developer drops an updated rule into .cas/. Within seconds, every active agent has that change injected into their context. A CAS score is shown at session end.
- Docker + Docker Compose
- An LLM API key (OpenAI, Anthropic, or Ollama for local)
git clone https://github.com/sambhal-labs/cas.git
cd cas
cp .env.example .env
# Edit .env — add your LLM API key
cp litellm-config.yaml.example litellm-config.yaml
# Edit litellm-config.yaml — configure your LLM providerdocker-compose up -dServices started:
- FalkorDB — graph memory store (
localhost:6379, browser UIlocalhost:3000) - Temporal — SDLC workflow orchestration (
localhost:7233) - Temporal UI — workflow visibility (
localhost:8080) - LiteLLM — unified LLM proxy (
localhost:4000) - cas-guide — MCP context injection server (
localhost:8765) - cas-watcher — folder watcher + episode creator (internal)
Add cas-guide as an MCP server in Claude Code:
cp examples/mcp-config/claude-code-mcp.json ~/.claude/mcp.jsonOr add to your existing MCP config:
{
"mcpServers": {
"cas-guide": {
"type": "http",
"url": "http://localhost:8765/mcp"
}
}
}In any agent session, call cas_start_task before starting work:
cas_start_task(
story_id="story-001",
agent_role="developer",
tenant_id="my-org",
project_id="my-project"
)
The agent receives: story context, architecture constraints, active ADRs, hard/soft gates, and relevant historical episodes.
Edit .cas/gates/hard-gates.yaml — add or update a gate. Within 10 seconds, the next cas_start_task call returns the updated context.
.cas/ policy folder
│
▼ (5s poll)
cas-watcher (Temporal Activity)
│ detect-secrets scrubbing
▼
Graphiti + FalkorDB (agile memory)
│ episodes created
▼
Temporal signals → ProjectWorkflow → StoryWorkflows
│
▼
cas-guide MCP server → agent context injection
See docs/adr/ for all architectural decisions.
V0 computes Context Injection Rate only: was the right context injected before the agent started the task?
Call cas_get_score(session_id=<id>) at the end of a session to see the score.
Full multi-dimensional scoring (Policy Alignment, Architectural Drift, MCP Compliance, Temporal Alignment) ships in V1. See ADR-003.
cas/
├── src/cas-guide/ # MCP Server — context injection (FastMCP)
├── src/cas-watcher/ # Temporal worker — folder watching + episode creation
├── docs/adr/ # Architecture Decision Records (ADR-001 to ADR-007)
├── .cas/ # Example policy folder — watched by cas-watcher
└── examples/ # BMAD project example + MCP client configs
cas-guardian(gate checking MCP server) — V1- Pathway streaming — V1 (V0 uses Temporal polling)
- Dashboard UI — V1
- Multi-tenant enterprise provisioning — V1
- Presidio PII detection — V1 (V0 uses detect-secrets)