rnix copilot-instructions.md

Project instructions for Rnix, a Go-based operating system for AI agents. They describe its background service, virtual filesystem, process management, communication sockets, and build checks.

In plain words
What is it for?
Use them when working on Rnix, including its kernel, inter-process communication, command-line tool, agent orchestration, or debugging features.
Why use it?
They give coding and testing rules for a project with several system-level components and require the full validation command after changes.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rnixai/rnix/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/rnixai/rnix

Made for: GitHub Copilot.

Per session 1,564 This file is loaded in full into every session.
When invoked 1,564 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01564 $0.01564
Opus 5 $0.00782 $0.00782
Sonnet 5 $0.00313 $0.00313
Haiku 4.5 $0.00156 $0.00156

Measured 2d ago against content hash f53efdc3658a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rnix copilot-instructions.md scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/copilot-instructions.md · 156 lines

How it starts

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

Copilot Instructions for Rnix

Project Overview

Rnix is an operating system for AI agents, inspired by Unix design philosophy. Written in Go 1.26 (github.com/rnixai/rnix). It provides process management, a virtual filesystem (VFS), IPC via Unix domain sockets, multi-agent orchestration, intent decomposition, and debugging tools.

语言

  • 回复语言使用简体中文
  • 代码注释使用英文

Build & Test Commands

make build          # Build binary → ./rnix
make test           # Run all tests with race detection
make lint           # golangci-lint
make vet            # go vet
make all            # lint + vet + modernize-check + test + build

# Single test
go test -race -run TestFunctionName ./package/...

# Package tests
go test -race ./kernel/...
go test -race ./ipc/...

Run make all after finishing any coding work to catch errors.

Architecture

Daemon Model

Rnix runs as a background daemon holding the kernel and process table. CLI commands communicate over a Unix domain socket ($XDG_RUNTIME_DIR/rnix/rnix.sock or /tmp/rnix-$UID/rnix.sock). The CLI auto-starts the daemon via EnsureDaemon().

Core Data Flow

CLI (cmd/rnix) → IPC Client → Unix Socket → IPC Server → Kernel
                                                            ↓
                                              Process ReasonStep Loop
                                                  ↓           ↑
                                             VFS Devices    Context
                                            (LLM, FS, Shell, MCP)

Package Hierarchy

cmd/rnix           ← Entry point, Cobra CLI
├── ipc            ← Client/Server, NDJSON protocol over Unix socket
├── kernel         ← Microkernel: process table, spawn, kill, wait, reaper
│   ├── vfs        ← VFS file abstraction, device registry, FD table
│   ├── context    ← Per-process conversation history (CtxAlloc/Write/BuildPrompt)
│   └── debug      ← Strace, recording, distributed tracing, GDB
├── drivers/       ← VFS device implementations
│   ├── llm        ← /dev/llm/* (Claude CLI, Cursor CLI, HTTP API providers)
│   ├── fs         ← /dev/fs - sandboxed host filesystem
│   ├── shell      ← /dev/shell - subprocess execution
│   └── mcp        ← /dev/mcp/* - MCP server stdio transport
├── intent         ← Declarative intent decomposition
├── compose        ← DAG-based multi-agent orchestration from YAML
├── shell          ← AgentShell scripting language
├── agents         ← Agent loader (lib/agents/{name}/agent.yaml + instructions.md)
├── skills         ← Skill loader (lib/skills/{name}/SKILL.md with YAML frontmatter)
├── skillpkg       ← Skill package management (install/search/update from registry)
└── internal/      ← Shared utilities
    ├── types      ← PID, FD, CtxID, Signal, ProcessState, ErrCode
    ├── xsync      ← Thread-safe SyncMap, Registry, Future
    └── ui         ← Terminal rendering, progress reporting

Read the full file on GitHub · 156 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. 2d ago First seen · 156 lines · 1,564 tokens per session scan A f53efdc3658a

Subscribe to this mod's changes

rnix copilot-instructions.md is an instructions file published in the GitHub repository rnixai/rnix (5 stars, last pushed 24d ago), licensed MIT. It adds 1,564 tokens to every session, about $0.0078 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.