All Concepts
Governed Agentic Development

Shift left.
Shift right.

CDA catches violations at the PR. MCP prevents them before the first line is written. Same governance record. Both ends.

7-phase session protocol8 MCP toolsClosed loop — pre and post
Shift Right

Shift Right — CDA

Catches violations after code is written, at PR time.

When

PR opened → diff fetched → entity mapped → Lens evaluation → PASS or BLOCKED

What it enforces

CHI scope, Lens criteria, architectural boundaries

Output

GitHub check result (binding, non-optional), session result in Agent Shepherd

What is CDA? →
Shift Left

Shift Left — MCP

Loads design context before the agent writes a line of code.

When

Session start → context assembly → code generation with validate_diff feedback

What it provides

Architecture Ledger state, applicable Lenses, Steering context, CHI scope

Output

Agent generates code that already satisfies Lens criteria; BLOCKER findings halt generation immediately

View MCPCAR metric →

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 7-Phase Protocol

Every governed agent session.
Every time.

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.

Authentication

Gate

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_session

Skill Discovery

The 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_skills

Precondition Resolution

Gate

Conditional 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_chi

CHI Gate

Gate

No 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_scope

Context Assembly

Three 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_context

Governed Code Generation

Agent 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_diff

CDA Evaluation and Session Close

PR 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 open
No code before approved CHIBLOCKER must resolve before PRCDA is binding — not advisory
Connecting Agents to rkito

Two agent contexts.
One governance record.

Bootstrap 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.

Interactive

IDE Agents

Claude Code, Cursor, Copilot Chat, Cline

A1

MCP Prompts

Preferred

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.

Zero friction — when IDE host supports MCP prompts
A2

CLAUDE.md / AGENTS.md snippet

Universal fallback

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.
Works today with all MCP-compatible agents
A4

Session Hooks — Claude Code PreToolUse

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" }]
    }]
  }
}
Claude Code only — hardest enforcement
Machine

Autonomous Agents

CI pipelines, Devin, orchestrated agents, GitHub Actions

B1

Orchestrator env vars + system prompt

Primary

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/v1
Works with any agent that accepts a system prompt
B3

rkito SDK

Planned — Enterprise

For 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'
})
Planned — Enterprise tier
Skills Registry

Not documentation.
Governed instruction payloads.

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.

skill::auth-service::oauth-flow v2Conformance Bundle
Instructions

How to interact with Auth Service — permitted patterns, interface contracts, boundary rules

Lens bundle

Lens[A12] Service Authentication Posture · Lens[A15] External Service Data Access

Steering refs

Pillar: Security · Policy: API Gateway Routing · ADR-0041: Auth Service Isolation

Bound entity

Auth Service @ Ledger state v7 · approved via CHI-0089

Org-private

Authored and consumed within one org. The default. Governance record stays internal.

Published

Discoverable by other orgs in the rkito network. Version-controlled. Forking tracked.

Forked

Locally owned derivative. CHI-governed. Provenance link to origin skill preserved.

An agent operating under a skill cannot be instructed to violate a Lens — because the Lens criteria are co-delivered with the instructions.

Get started

Govern your agents.

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.