AethelOS: Instructions file for Claude Code

CLAUDE.md

AethelOS CLAUDE.md is an instructions file for Claude Code from dollspace-gay/AethelOS. It costs 5,217 tokens per session, scanned B, original, Apache-2.0.

Development instructions for AethelOS, an operating-system project. They document how to build its Rust kernel and ISO image and state that a human must run the result in QEMU, a virtual computer.

In plain words
What is it for?
Use them when building the AethelOS kernel or ISO, following its development conventions, and preparing a QEMU test for a human to run.
Why use it?
They give an agent the project's build commands and boundaries, including when to stop and ask a person to test the built operating system.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is dollspace-gay/AethelOS's own configuration. It tells Claude Code how to work on AethelOS itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AethelOS configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dollspace-gay/AethelOS. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dollspace-gay/AethelOS/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/dollspace-gay/AethelOS

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for AethelOS CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dollspace-gay/aethelos/claude-md/github.svg)](https://agentmods.dev/instructions/dollspace-gay/aethelos/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/dollspace-gay/aethelos/claude-md"><img src="https://agentmods.dev/badge/instructions/dollspace-gay/aethelos/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for AethelOS CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dollspace-gay/aethelos/claude-md"><img src="https://agentmods.dev/badge/instructions/dollspace-gay/aethelos/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,217 This file is loaded in full into every session.
When invoked 5,217 The same file — it is already loaded in full.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.05217 $0.05217
Opus 5 $0.02609 $0.02609
Sonnet 5 $0.01043 $0.01043
Haiku 4.5 $0.00522 $0.00522

Measured 10d ago against content hash 0aa297b3017e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

AethelOS CLAUDE.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- [ ] Code compiles without warnings: `cargo build --target x86_64-aethelos.json`
CLAUDE.md · 628 lines

How it starts

The opening of the file, as written. The whole thing — 628 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md - AI Assistant Guide to AethelOS Development

Quick Reference: This document is designed for AI assistants (Claude, GPT, etc.) working on AethelOS. It provides build commands, design philosophy, coding standards, and pointers to architectural documentation.


Table of Contents

  1. Quick Start
  2. Design Philosophy
  3. Architecture Overview
  4. Coding Standards & Quality Controls
  5. Documentation Index
  6. Current Status & Roadmap
  7. Common Tasks

Build Commands

From project root:

# 1. Build the kernel and ISO

cd /f/OS/user_programs/hello && cargo build --release --target x86_64-unknown-none 2>&1 | grep -E "(Compiling|Finished|error)"
cd /f/OS && cargo build 2>&1 | grep -E "(Compiling heartwood|Finished|error)" && wsl bash -c "cp target/x86_64-aethelos/debug/heartwood isodir/boot/aethelos/heartwood.bin && grub-mkrescue -o aethelos.iso isodir 2>&1 | grep -E '(success|Writing)'"


# 2. Run in QEMU
Do not attempt to run in QEMU yourself. Pass the turn to the human after a build and alert them to run it for you and inform you of the results.



### Prerequisites

- **Rust:** Nightly toolchain (configured in `rust-toolchain.toml`)
  - Components: `rust-src`, `llvm-tools-preview`
- **GRUB:** `grub-mkrescue` (via WSL on Windows, native on Linux)
- **QEMU:** `qemu-system-x86_64` for testing

---

## Design Philosophy

### Core Principle: Symbiotic Computing

> *"The code does not command the silicon. The silicon does not serve the code. They dance together, and in that dance, life emerges."*

AethelOS is **not** a clone of Unix, Linux, or Windows. It is a ground-up rethinking of operating system design based on these principles:

### 1. **Harmony Over Force**

- **NOT:** Preemptive scheduling that interrupts processes arbitrarily
- **BUT:** Cooperative negotiation where processes yield willingly
- **METAPHOR:** The Loom of Fate weaves threads together harmoniously

**Implementation:**
- Threads have harmony scores based on CPU usage, yield frequency, and cooperation
- "Parasitic" threads are throttled (slowed), not killed
- System-wide harmony metrics guide scheduling decisions

### 2. **Memory Over Forgetting**

- **NOT:** Files that are overwritten and lost
- **BUT:** Git-like versioning built into the filesystem
- **METAPHOR:** The World-Tree remembers all versions like tree rings

**Implementation:**
- Content-addressable storage (SHA-256)
- Global commit graph tracking all changes
- Query-based file discovery: `seek scrolls where essence is "Scroll" and creator is "Elara"`
- Intelligent pruning prevents unbounded growth

### 3. **Beauty as Necessity**

- **NOT:** Aesthetics as afterthought
- **BUT:** Visual design reveals system state intuitively
- **METAPHOR:** The system's appearance is its truth

**Implementation:**
- Poetic naming (Loom of Fate, Mana Pool, World-Tree)
- Unicode symbols (◈ for emphasis, tree metaphors)
- VGA graphics mode planned for vector-based GUI
- Color-coded thread states, visual harmony indicators

### 4. **Security Through Nature**

- **NOT:** Access control lists and permissions bits
- **BUT:** Unforgeable capability tokens
- **METAPHOR:** Natural boundaries, not artificial walls

**Implementation:**
- Capability-based security (no raw pointers in userspace)
- Capabilities grant specific rights (read, write, execute, delegate)
- Capabilities can be attenuated (reduced permissions) but never amplified
- Hardware MMU enforces capability boundaries
- Borrowing ideas from known good kernel hardening efforts, grsec/PaX etc.
---

## Architecture Overview

### High-Level Structure

┌─────────────────────────────────────────────────────────┐ │ User Space │ │ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │ │ │ Eldarin │ │ User Apps │ │ System Utils │ │ │ │ Shell │ │ (Future) │ │ │ │ │ └─────────────┘ └──────────────┘ └───────────────┘ │ └─────────────────────────────────────────────────────────┘ ↕ (Capability-based syscalls) ┌─────────────────────────────────────────────────────────┐ │ Groves (Services) │ │ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │ │ │ World-Tree │ │ The Weave │ │ Network Sprite │ │ │ │ (Filesystem) │ │ (Compositor) │ │ (Networking) │ │ │ └──────────────┘ └──────────────┘ └────────────────┘ │ └─────────────────────────────────────────────────────────┘ ↕ (IPC via Nexus) ┌─────────────────────────────────────────────────────────┐ │ Heartwood (Kernel) │ │ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │ │ │ Loom of Fate │ │ Mana Pool │ │ Attunement │ │ │ │ (Scheduler) │ │ (Memory) │ │ (Hardware) │ │ │ └──────────────┘ └──────────────┘ └────────────────┘ │ │ ┌──────────────┐ ┌──────────────┐ │ │ │ Nexus │ │ VGA Buffer │ │ │ │ (IPC) │ │ (Display) │ │ │ └──────────────┘ └──────────────┘ │ └─────────────────────────────────────────────────────────┘ ↕ ┌─────────────────────────────────────────────────────────┐ │ Hardware │ │ CPU (x86-64) | Memory | VGA | Keyboard | Timer | etc. │ └─────────────────────────────────────────────────────────┘


### Heartwood (Kernel) Components

| Module | Purpose | Status | Location |
|--------|---------|--------|----------|
| **Loom of Fate** | Cooperative thread scheduler with harmony metrics | ✅ Complete | `heartwood/src/loom_of_fate/` |
| **Mana Pool** | Memory allocator (currently buddy allocator) | ✅ Complete | `heartwood/src/mana_pool/` |
| **Attunement** | Hardware abstraction (IDT, PIC, keyboard, timer) | ✅ Complete | `heartwood/src/attunement/` |
| **VGA Buffer** | Text mode display driver | ✅ Complete | `heartwood/src/vga_buffer.rs` |
| **Eldarin** | Interactive shell | ✅ Complete | `heartwood/src/eldarin.rs` |
| **Nexus** | Inter-process communication | ⚪ Planned | Not started |

### Groves (Service Layer)

| Service | Purpose | Status | Location |
|---------|---------|--------|----------|
| **World-Tree** | Query-based filesystem with versioning | 🟡 Designed | `groves/world-tree_grove/` |
| **The Weave** | Vector scene graph compositor | 🟡 Designed | `groves/the-weave_grove/` |
| **Lanthir** | Window manager | 🟡 Designed | `groves/lanthir_grove/` |
| **Network Sprite** | Network stack | 🟡 Designed | `groves/network_sprite/` |

### Ancient Runes (Standard Library)

| Library | Purpose | Status | Location |
|---------|---------|--------|----------|
| **Corelib** | Collections, math, error types | 🟡 Skeletal | `ancient-runes/corelib/` |
| **Weaving** | Widget toolkit (buttons, labels, containers) | 🟡 Skeletal | `ancient-runes/weaving/` |
| **Script** | Shell scripting API for Glimmer-Weave | 🟡 Skeletal | `ancient-runes/script/` |

**Status Legend:**
- ✅ **Complete:** Working and integrated
- 🟡 **Designed:** Architecture documented, skeleton code exists
- ⚪ **Planned:** Design phase

---

## Coding Standards & Quality Controls

### 🔴 CRITICAL RULES - MUST FOLLOW

#### 1. **No Unsafe Without Justification**

```rust
// ❌ WRONG - Unjustified unsafe
unsafe {
    core::ptr::write_volatile(addr, value);
}

Read the full file on GitHub · 628 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 628 lines · 5,217 tokens per session scan B 0aa297b3017e

Subscribe to this mod's changes

AethelOS CLAUDE.md is an instructions file published in the GitHub repository dollspace-gay/AethelOS (23 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 5,217 tokens to every session, about $0.0261 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens