-
-
Notifications
You must be signed in to change notification settings - Fork 0
Repository Format
.git/stores history..rune/stores understanding.
Rune introduces a new directory:
.rune/
This directory contains the repository's semantic understanding.
Everything inside .rune/ is:
- human-readable
- versionable
- deterministic
- local-first
Preferred formats are:
- Markdown
- JSON
A typical repository looks like:
repo/
├── src/
├── tests/
├── README.md
├── .git/
└── .rune/
├── spec.md
├── architecture.md
├── conventions.md
├── graph.json
├── files/
├── features/
├── ownership/
├── sessions/
└── cache/
The repository identity.
Location:
.rune/spec.md
Purpose:
- vision
- principles
- supported technologies
- non-goals
- architecture overview
Example:
# Project
Backend:
FastAPI
Frontend:
Next.js
Database:
PostgreSQLHigh-level technical architecture.
Location:
.rune/architecture.md
Example:
Backend:
FastAPI
Frontend:
Next.js
Database:
PostgreSQL
Message Queue:
RedisPurpose:
Allow humans and AI agents to quickly understand the stack.
Coding rules.
Location:
.rune/conventions.md
Example:
Rules:
- Use repository pattern.
- Never use raw SQL.
- APIs return Pydantic models.Agents should respect these conventions.
Dependency relationships.
Location:
.rune/graph.json
Example:
{
"auth.py": [
"user.py",
"jwt.py"
]
}Purpose:
Allow selective loading instead of loading the whole repository.
Per-file summaries.
Location:
.rune/files/
Example:
.rune/files/auth.md
Contents:
# auth.py
Purpose:
Authentication service
Exports:
- login()
- logout()
Dependencies:
- user.py
- jwt.py
Related features:
- login
- signupFile summaries should remain:
50–200 tokens
Avoid copying source code.
Summaries explain meaning, not implementation.
Feature maps.
Location:
.rune/features/
Example:
.rune/features/login.md
Contents:
# login
Flow:
frontend/login.tsx
↓
api/auth.py
↓
user.py
↓
jwt.py
Tests:
tests/test_login.pyPurpose:
Describe behavior rather than file structure.
Ownership metadata.
Location:
.rune/ownership/
Example:
.rune/ownership/frontend.md
Contents:
Owns:
components/*
pages/*
styles/*Possible owners:
- frontend
- backend
- database
- infrastructure
Useful for multi-agent workflows.
Temporary context.
Location:
.rune/sessions/
Example:
{
"files": [
"auth.py",
"user.py"
]
}Purpose:
Track recently modified files.
Sessions are disposable.
Internal caches.
Location:
.rune/cache/
May contain:
- hashes
- timestamps
- intermediate indexes
Cache contents are implementation details.
Users should not depend on them.
Everything important should be editable with:
- vim
- VSCode
- nano
- Notepad
No binary formats.
No databases.
No hidden metadata.
The .rune/ directory is intended to be committed to Git.
Example:
.git/
.rune/
src/
tests/
Benefits:
- AI understanding becomes versioned.
- Teams share the same context.
- Pull requests can review semantic changes.
Running:
rune indextwice on the same repository should produce identical outputs.
Avoid:
- randomness
- timestamps
- machine-specific paths
Deterministic outputs improve reproducibility.
myapp/
├── src/
├── tests/
├── .git/
└── .rune/
├── spec.md
├── architecture.md
├── conventions.md
├── graph.json
├── files/
│ ├── auth.md
│ ├── user.md
│ └── billing.md
├── features/
│ ├── login.md
│ └── subscription.md
├── ownership/
│ ├── backend.md
│ └── frontend.md
├── sessions/
└── cache/
Repository understanding should be:
- explicit
- versioned
- shareable
- deterministic
- language-agnostic
Source code explains how.
.rune/ explains why.
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.