-
-
Notifications
You must be signed in to change notification settings - Fork 0
Specification
Version 0.1 Draft
This document defines the Rune Context Protocol (RCP).
The purpose of RCP is to standardize repository understanding in a portable, deterministic, and human-readable format.
Current Version:
RCP 0.1 (Draft)
Stability:
Experimental
Future versions may change incompatible formats.
Version 1.0 aims to provide long-term compatibility guarantees.
RCP aims to:
- provide persistent repository understanding
- reduce unnecessary token consumption
- support any programming language
- remain human-readable
- remain versionable
- remain deterministic
RCP does not define:
- code generation
- LLM behavior
- editing strategies
- vector databases
- cloud APIs
- model interfaces
RCP provides context.
Agents provide intelligence.
Repositories implementing RCP contain:
.rune/
Example:
repo/
├── src/
├── tests/
├── .git/
└── .rune/
.rune/
├── spec.md
├── architecture.md
├── conventions.md
├── graph.json
├── files/
├── features/
├── ownership/
├── sessions/
└── cache/
Implementations MUST provide:
spec.md
graph.json
Implementations SHOULD provide:
architecture.md
conventions.md
Implementations MAY provide:
ownership/
sessions/
cache/
Purpose:
Repository identity.
Example:
# Project
Backend:
FastAPI
Frontend:
Next.js
Database:
PostgreSQLRequirements:
- UTF-8 encoding
- Markdown format
Purpose:
Technology stack and architectural overview.
Requirements:
- Markdown
- UTF-8
Purpose:
Coding conventions.
Example:
Rules:
- Use repository pattern.
- Never use raw SQL.Purpose:
Dependency relationships.
Example:
{
"auth.py": [
"user.py",
"jwt.py"
]
}Requirements:
- UTF-8
- JSON object
- deterministic ordering
Purpose:
Per-file summaries.
Example:
.rune/files/auth.md
Contents:
# auth.py
Purpose:
Authentication service
Exports:
- login()
- logout()
Dependencies:
- user.py
- jwt.pyPurpose:
Feature summaries.
Example:
.rune/features/login.md
Contents:
# login
Flow:
login.tsx
↓
auth.py
↓
jwt.pyPurpose:
Ownership metadata.
Example:
frontend/*
backend/*Optional.
Purpose:
Temporary context.
Example:
{
"files": [
"auth.py",
"user.py"
]
}Optional.
Purpose:
Implementation-specific cache.
Optional.
Cache contents are not part of the protocol.
All files MUST use:
UTF-8
Preferred formats:
- Markdown
- JSON
Avoid:
- binary formats
- databases
Given identical repositories:
rune indexMUST produce identical outputs.
Implementations SHOULD avoid:
- timestamps
- random identifiers
- machine-specific paths
Important information MUST remain inspectable by humans.
Users SHOULD be able to view .rune/ with:
- vim
- VSCode
- nano
- Notepad
Source code remains authoritative.
RCP stores:
- summaries
- relationships
- metadata
RCP never replaces source code.
Implementations MAY expose:
rune context "<task>"Example:
rune context "Add Google OAuth"Output:
{
"related_files": [
"auth.py",
"user.py",
"settings.py"
]
}Output format is implementation-defined.
Language support SHOULD be external.
Examples:
rune-python
rune-go
rune-typescript
Core implementations SHOULD remain language-agnostic.
Required:
spec.md
graph.json
Adds:
architecture.md
conventions.md
files/
features/
Adds:
ownership/
sessions/
Future versions:
RCP 0.1
RCP 0.2
RCP 0.3
RCP 1.0
Major versions may introduce incompatible changes.
Version 1.0 aims to guarantee long-term stability.
Implementations SHOULD prioritize:
- simplicity
- portability
- determinism
- local-first operation
Implementations SHOULD avoid:
- network dependencies
- databases
- hidden state
History explains what changed.
Understanding explains what it means.
Git stores history.
Rune stores understanding.
.git/ explains what changed.
.rune/ explains what the codebase means.
Rune Context — Git for repository understanding.
Git for repository understanding.
- RCP-001 — Repository Format
- RCP-002 — Plugin Protocol
- RCP-003 — Graph Format
- RCP-004 — File Summary Format
- RCP-005 — Feature Map Format
- RCP-006 — Ownership Metadata
- RCP-007 — Session Memory
- RCP-008 — Context Retrieval API
- RCP-009 — Incremental Indexing
- RCP-010 — Multi-Agent Coordination
Git stores history.
Rune stores understanding.