Copy this file to your project and adapt it. It teaches any AI tool how to work with RUNE specifications.
RUNE is a specification pattern for defining function behavior before implementation. A RUNE spec is a contract: it defines a function’s signature, behavior rules, edge cases, and tests. Any AI tool generates code with consistent behavior from the same contract.
Specs can be written as YAML .rune files or as Markdown sections in this file.
Runestone provides 7 skills. Each is a SKILL.md file inside its own directory, following the Anthropic Skills format. Load only the ones you need.
| Skill | File | When to use |
|---|---|---|
| Writer | skills/rune-writer/SKILL.md |
Create specs from requirements. Implement code from specs. |
| Validator | skills/rune-validator/SKILL.md |
Check if a spec is complete and well-formed. |
| Skill | File | When to use |
|---|---|---|
| Refiner | skills/rune-refiner/SKILL.md |
Improve a valid spec: find missing tests, uncovered edge cases, ambiguous rules. |
| Test Generator | skills/rune-test-generator/SKILL.md |
Generate runnable test files (any framework) from a spec’s TESTS section. |
| Skill | File | When to use |
|---|---|---|
| Diff | skills/rune-diff/SKILL.md |
Compare a spec against its implementation to detect drift. |
| From Code | skills/rune-from-code/SKILL.md |
Reverse-engineer a spec from an existing function. |
| Multi-Lang | skills/rune-multi-lang/SKILL.md |
Generate implementations in multiple languages from one spec. |
┌─────────────┐
│ Requirements │
└──────┬──────┘
▼
┌─────────────┐
│ Writer │ Create spec from requirements
└──────┬──────┘
▼
┌─────────────┐
│ Validator │ Check structure and rules
└──────┬──────┘
▼
┌─────────────┐
│ Refiner │ Suggest improvements
└──────┬──────┘
▼
┌────────────┴────────────┐
▼ ▼
┌─────────┐ ┌──────────────┐
│ Writer │ │Test Generator │
│(implement)│ │(test files) │
└────┬─────┘ └──────┬───────┘
└────────┬──────────────┘
▼
┌─────────────┐
│ Diff │ Audit spec vs code over time
└─────────────┘
Adopting RUNE on existing code:
Existing function → From Code → spec → Validator → Refiner → done
Multi-language projects:
Spec (language: any) → Multi-Lang → implementations + tests in N languages
Every RUNE spec must have:
CONSTRAINTS, EDGE_CASES, DEPENDENCIES, EXAMPLES, COMPLEXITY.
.rune files)---
meta:
name: function_name
language: python
version: 1.0
---
RUNE: function_name
SIGNATURE: |
def function_name(param: type) -> return_type
INTENT: |
What it does. 1-3 sentences.
BEHAVIOR:
- WHEN condition THEN action
- OTHERWISE default_action
TESTS:
- "function_name(input) == expected"
- "function_name(boundary) == expected"
- "function_name(invalid) raises error"
.md)### function_name
**SIGNATURE:** `def function_name(param: type) -> return_type`
**INTENT:** What it does. 1-3 sentences.
**BEHAVIOR:**
- WHEN condition THEN action
- OTHERWISE default_action
**TESTS:**
- `function_name(input) == expected`
- `function_name(boundary) == expected`
- `function_name(invalid) raises error`
Adapt this section to your project:
specs/ directory or embedded in this fileAdd your RUNE specs below as Markdown sections, or reference .rune files: