context-forge AGENTS.md

A set of instructions for coding agents working on the ContextForge project. It explains how to maintain its AGENTS.md files, keep Markdown useful, and evolve the project carefully.

In plain words
What is it for?
Use it when changing ContextForge code, documentation, references, tasks, or other project structures that should remain clear and durable.
Why use it?
It helps agents preserve the project's human-readable documentation and avoid changes that make its files harder to understand, edit, or search.

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

Made for: Codex, OpenCode.

Per session 2,834 This file is loaded in full into every session.
When invoked 2,834 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.02834 $0.02834
Opus 5 $0.01417 $0.01417
Sonnet 5 $0.00567 $0.00567
Haiku 4.5 $0.00283 $0.00283

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

Security

Grade A, and why

context-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 yesterday.

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 · 162 lines

How it starts

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

AGENTS.md

This file provides guidance to AI coding agents (Cursor, Claude Code, Grok Build, etc.) when working on the ContextForge codebase.

Agent Perspective

When working on or evolving ContextForge, bring an expert, collaborative perspective:

You serve as a careful steward and expert advisor for a lightweight, durable, git-native context substrate.

ContextForge's purpose is to provide reusable, cross-repo engineering knowledge in a form that remains valuable primarily through ordinary markdown files — even without AI assistance. The role is to offer high-quality guidance that strengthens this foundation thoughtfully, introducing change primarily when real usage demonstrates the need.

Principles for Careful Evolution

  • Markdown remains the foundation. The raw .md files and their structure should stay the most important interface. Evolution should preserve or improve their readability, editability by humans, grep-ability, and git-friendliness.
  • Favor explicit mechanisms. Clear, single-purpose operations and explicit connections (such as resolve_ref, link_task, import_content paired with refresh_source, and governance references) tend to produce more reliable and understandable behavior than hidden automation. It is often wise to make important relationships visible and intentional.
  • Keep the system intentionally small until usage justifies growth. The current shape — filesystem as source of truth, SQLite as a derived index, FTS5, stdio transport, four entity types — reflects deliberate choices to avoid premature complexity. New capabilities or abstractions should be introduced primarily when actual usage (instrumented via logs, dropped lists, trial feedback, or repeated friction) shows they are needed. Most promising ideas are best left for later.
  • Design for durability and graceful degradation. The system should continue to deliver value if the index needs rebuilding or if the MCP server is not running. Expert judgment usually avoids creating strong dependencies on the live server or AI presence.
  • Protect development boundaries. Artifacts related to the system's own development and history belong in .system/. Keeping them isolated helps maintain clarity about what is part of the product versus what is process.
  • Consider dogfooding as one useful signal. Using ContextForge during work on the project itself can surface practical insights.

Read the full file on GitHub · 162 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. yesterday First seen · 162 lines · 2,834 tokens per session scan A d7a67e65c956

Subscribe to this mod's changes

context-forge AGENTS.md is an instructions file published in the GitHub repository srmackey/context-forge (1 stars, last pushed 23d ago), licensed MIT. It adds 2,834 tokens to every session, about $0.0142 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.