statespace AGENTS.md

Project-specific instructions for Statespace, an open-source AI runtime written in Rust. They document build, test, lint, formatting, hooks, macOS setup, and the layout of its monorepo, a repository containing multiple related packages.

In plain words
What is it for?
Use them when building, testing, linting, formatting, or navigating the Statespace Rust workspace.
Why use it?
They put the repository's commands and development requirements in one place, reducing setup mistakes and inconsistent checks.

Instructions file for CodexOpenCode

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/statespace-tech/statespace/agents-md
Clone the repo
git clone --depth 1 https://github.com/statespace-tech/statespace

Made for: Codex, OpenCode.

Per session 2,486 This file is loaded in full into every session.
When invoked 2,486 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.02486 $0.02486
Opus 5 $0.01243 $0.01243
Sonnet 5 $0.00497 $0.00497
Haiku 4.5 $0.00249 $0.00249

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

Security

Grade A, and why

statespace AGENTS.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.

AGENTS.md · 240 lines

How it starts

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

AGENTS.md - Statespace

Overview

Statespace is an open-source AI runtime/framework. This monorepo contains the Rust implementation.

Build/Test Commands

  • Build: cargo build
  • Test: cargo test
  • Lint: cargo clippy --all-targets -- -D warnings
  • Format: cargo fmt --all
  • Check: cargo check

Pre-commit Hooks

Pre-commit hooks run cargo fmt --check and cargo clippy. To enable:

git config core.hooksPath .githooks

Note: On macOS, the linker needs to find libiconv (pulled in by reqwest/rustls). The .envrc handles this automatically with direnv. Without direnv, set:

export LIBRARY_PATH="$(xcrun --show-sdk-path)/usr/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"

Project Structure

statespace/
├── Cargo.toml                      # Workspace manifest
├── binaries/
│   └── statespace-cli/             # CLI binary
│       └── src/
│           ├── main.rs
│           ├── args.rs
│           ├── config.rs
│           ├── error.rs
│           ├── commands/
│           └── gateway/
├── crates/
│   ├── statespace-tool-runtime/    # Core runtime library (no HTTP, no CLI)
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── error.rs
│   │       ├── executor.rs
│   │       ├── frontmatter.rs
│   │       ├── protocol.rs
│   │       ├── security.rs
│   │       ├── spec.rs
│   │       ├── tools.rs
│   │       └── validation.rs
│   ├── statespace-server/          # HTTP server library
│   │   └── src/
│   │       ├── lib.rs
│   │       ├── content.rs
│   │       ├── error.rs
│   │       ├── semantics.rs
│   │       └── server.rs
│   └── statespace-templates/       # Embedded init templates and starters
│       ├── build.rs
│       └── src/
│           ├── lib.rs
│           ├── AGENTS.md           # Written to new projects — guides coding agents building/iterating on the app
│           ├── llms.txt            # Written to new projects — served at GET / of deployed apps; describes the HTTP API contract to consuming agents
│           ├── .gitignore
│           └── starters/           # Per-database starter projects
└── docs/
    └── design/                     # RFDs

Read the full file on GitHub · 240 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 · 240 lines · 2,486 tokens per session scan A df1dcc6df276

Subscribe to this mod's changes

statespace AGENTS.md is an instructions file published in the GitHub repository statespace-tech/statespace (871 stars, last pushed 27d ago), licensed MIT. It adds 2,486 tokens to every session, about $0.0124 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-30.