CDA catches violations at the PR. MCP prevents them before the first line is written. Same governance record. Both ends.
Catches violations after code is written, at PR time.
PR opened → diff fetched → entity mapped → Lens evaluation → PASS or BLOCKED
CHI scope, Lens criteria, architectural boundaries
GitHub check result (binding, non-optional), session result in Agent Shepherd
Loads design context before the agent writes a line of code.
Session start → context assembly → code generation with validate_diff feedback
Architecture Ledger state, applicable Lenses, Steering context, CHI scope
Agent generates code that already satisfies Lens criteria; BLOCKER findings halt generation immediately
An agent with only CDA is governed after the fact. An agent with MCP is governed from the start. rkito is the only platform that operationalises both.
The session protocol runs identically whether the agent is a developer in an IDE or an autonomous pipeline in CI. Same record. Same gates. Same provenance.
Session token issued and agent registered in Agent Shepherd. OAuth PKCE for human developers. Service account API key for autonomous agents. No session token — no protocol.
register_sessionThe agent calls get_skills(entityIds[]) and receives a conformance bundle: entity binding, applicable Lenses, Steering refs, CHI requirements. The agent's instruction space is bounded before any code is considered.
get_skillsConditional gate. If the target entity is not present in the Architecture Ledger, the agent must draft a CHI for entity introduction and wait for architect approval before proceeding.
draft_chiNo code before an approved Change Intention exists for the structural change scope. Agent calls get_approved_chi and waits in "CHI pending" state if needed. This is the IFR-driving phase — intent before implementation.
get_approved_chi, check_chi_scopeThree parallel MCP calls load the full governed context: Architecture Ledger state for target entities, all applicable Lenses, Steering context (Manifesto, Pillars, Policies, ADRs). The agent's working context is now bounded by the same record the CDA will evaluate against.
get_ledger_state, get_applicable_lenses, get_steering_contextAgent generates code within the approved CHI scope. validate_diff is called at each write step. BLOCKER findings halt generation immediately — agent must self-correct before continuing. ADVISORY findings are logged to the session record.
validate_diffPR opened triggers CDA automatically. Lens evaluation runs. GitHub check is produced. Session result — PASS or BLOCKED — is recorded immutably in Agent Shepherd. Full governance provenance chain is complete.
automatic on PR openBootstrap paths depend on context. IDE agents can use MCP prompts, instruction files, or session hooks. Autonomous agents receive context via orchestrator injection or SDK. Every path leads to the same governed protocol.
Claude Code, Cursor, Copilot Chat, Cline
rkito publishes rkito_session_protocol as a named MCP prompt. When the IDE initialises a session with rkito registered as an MCP server, the protocol is injected into agent context automatically — before the agent takes its first action. Zero developer friction.
rkito's onboarding UI generates a one-time snippet for CLAUDE.md, AGENTS.md, .cursor/rules, or .github/copilot-instructions.md. The developer adds it once; all team members who clone the repo get governed sessions automatically.
At the start of every session, before reading any files,
call get_rkito_protocol() to load the governed interaction
protocol. Then call register_session with your workContextId,
agentInstanceId, and branchRef before proceeding.Claude Code supports hooks that fire before any tool use. rkito provides rkito-mcp-check: a CLI check that verifies session registration before the first tool call fires.
{
"hooks": {
"PreToolUse": [{
"matcher": "*",
"hooks": [{ "type": "command", "command": "rkito-mcp-check --session-registered" }]
}]
}
}CI pipelines, Devin, orchestrated agents, GitHub Actions
The orchestrator owns bootstrap. It injects RKITO_API_KEY, RKITO_MCP_URL, and a system prompt instruction before the agent starts. Any LLM-based agent that accepts a system prompt. No agent-side feature required.
env:
RKITO_API_KEY: ${{ secrets.RKITO_API_KEY }}
RKITO_MCP_URL: https://mcp.rkito.io/v1For organisations building custom orchestration pipelines, the rkito Agent SDK wraps session startup, authentication, protocol loading, and context assembly into a single call.
const session = await RkitoSession.start({
apiKey: process.env.RKITO_API_KEY,
workContextId: 'payment-service-update',
branchRef: 'feature/payment-refactor'
})A Skill is a versioned, CHI-gated instruction set bound to an Architecture Ledger entity. When an agent retrieves a skill, it receives a conformance bundle — the skill instructions plus the complete set of Lenses applicable to the bound entities. The agent's instruction space is bounded by the same binary criteria that CDA evaluates at PR time.
How to interact with Auth Service — permitted patterns, interface contracts, boundary rules
Lens[A12] Service Authentication Posture · Lens[A15] External Service Data Access
Pillar: Security · Policy: API Gateway Routing · ADR-0041: Auth Service Isolation
Auth Service @ Ledger state v7 · approved via CHI-0089
An agent operating under a skill cannot be instructed to violate a Lens — because the Lens criteria are co-delivered with the instructions.
Six signals instrument the full governed agent loop — from context access to drift rate to bypass detection. All derived from the same governance record.
Register rkito as an MCP server. Configure your bootstrap method. Every agent session governed from the first call. Every PR evaluated at merge. One governance record. Both ends.
The CDA pipeline that evaluates every PR against active Lenses. The Shift Right gate in the governed loop.
The full catalog of Design Continuity metrics — including all six agentic governance signals.
How to set up governed agent sessions in your IDE and CI pipelines step by step.