xeo-forge AGENTS.md

xeo-forge AGENTS.md is an instructions file for Codex, OpenCode from lahkiri/xeo-forge. It costs 6,360 tokens per session, scanned A, original, MIT.

A set of agent and architecture rules for Xeo Forge, a system that separates casual conversation from planned and approved AI work.

In plain words
What is it for?
It is for building or changing Xeo Forge's chat, planning, execution, profiles, memories, skills, and governed work flows.
Why use it?
It keeps the agent within the product's rules for planning, execution, approvals, context, and tool access.

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

Made for: Codex, OpenCode.

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 xeo-forge AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lahkiri/xeo-forge/agents-md.svg)](https://agentmods.dev/instructions/lahkiri/xeo-forge/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lahkiri/xeo-forge/agents-md"><img src="https://agentmods.dev/badge/instructions/lahkiri/xeo-forge/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,360 This file is loaded in full into every session.
When invoked 6,360 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.06360 $0.06360
Opus 5 $0.03180 $0.03180
Sonnet 5 $0.01272 $0.01272
Haiku 4.5 $0.00636 $0.00636

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

Security

Grade A, and why

xeo-forge 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 3d 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 · 504 lines

How it starts

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

Xeo Forge V3 — Agent & Architecture Rules

Product contract: The Control Plane for Agentic Work. Chat is conversation; Work is governed agency.

This file is the contract for working in this repo. Keep it short, keep it enforced. If a change violates a rule here, the change is wrong — not the rule.

1. What this product is

One governed AI agent with reusable execution context:

  1. Chat surface — conversational answers and exploration; it never creates a plan or executes write tools.
  2. Work surface — intent-aware agent work. Normal messages stay conversational; explicit planning starts Planning, and direct execution requests pause for an auditable user choice.
  3. Planning mode — read-only inspection, produces a structured plan for approval.
  4. Build mode — executes an immutable approved plan or an immutable, explicitly accepted execution brief.
  5. Context layers — Prompt Studio instructions, approved memories, Agent Profiles, and Agent Skills are compiled into the run context.

The agent:

  1. receives a conversation or Work request from a user and classifies intent before selecting planning or execution,
  2. loads policy, profile, skill, task context, and approved memories,
  3. inspects and analyzes (planning) or executes (build),
  4. returns a final result and bounded memory candidates,
  5. persists full history and audit events,
  6. consumes credits per run.

Plus auth, per-user credits, admin controls, ONE global model configuration, reusable profiles and skills, context management, and an inspectable audit trail.

New capabilities must preserve the approval gate, task-scoped authorization, single source of truth, and end-to-end UI-to-persistence behavior.

2. Hard architecture rules (non-negotiable)

  1. Single source of truth. One canonical schema per entity. One writer per resource. No dual persistence. No second copy of the same logical data that can drift.
  2. One delivery path for events. Task events are persisted with a monotonic per-task seq. SSE replays from the DB only, tracks maxSeq, then forwards live events with seq > maxSeq. No in-memory replay buffer racing the DB. (This is the V1 duplication bug. Do not reintroduce it.)
  3. No silent failures. No catch {} without logging. Every caught error is logged with context. Persistence failures must be visible, never swallowed.
  4. End-to-end or not at all. No UI control that points at a route that does not exist. No route that only half-works. Build the full path: input → agent → tools → persistence → UI.
  5. One global model. All users share one model config. No per-user model selection. Source of truth: model_settings row id=1, seeded from env. API keys are NEVER returned to any client — always masked.
  6. Credits are atomic. Debit via conditional UPDATE ... WHERE balance >= ?. Every balance change writes a credit_ledger row with balance_after. No read-then-write race.
  7. Authz on every task-scoped route. Owner-or-admin check, always.
  8. No ungoverned feature creep. Do not add subagents, teams, connectors, schedules, marketplaces, plugins, analytics, or permission frameworks without a written V3 design, explicit authorization boundaries, and an end-to-end path.
  9. No dead code. Don't scaffold for "future features". Delete what isn't used.
  10. Typecheck stays clean. tsc --noEmit has zero errors. Never hide errors behind ignoreBuildErrors.

Read the full file on GitHub · 504 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. 3d ago First seen · 504 lines · 6,360 tokens per session scan A adf2ab834b64

Subscribe to this mod's changes

xeo-forge AGENTS.md is an instructions file published in the GitHub repository lahkiri/xeo-forge (11 stars, last pushed 4d ago), licensed MIT. It adds 6,360 tokens to every session, about $0.0318 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.