branched-openspec AGENTS.md

Repository instructions for a project whose YAML files are the source for generated prompts and command files used by several coding tools. They also document its build, watch, lint, and test conventions.

In plain words
What is it for?
Use them when changing source prompts, rebuilding Codex, OpenCode, or Gemini files, watching edits, checking TOML commands, and validating Markdown.
Why use it?
They reduce mistakes caused by editing generated files directly or using the wrong build and validation commands.

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

Made for: Codex, OpenCode.

Per session 968 This file is loaded in full into every session.
When invoked 968 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.00968 $0.00968
Opus 5 $0.00484 $0.00484
Sonnet 5 $0.00194 $0.00194
Haiku 4.5 $0.00097 $0.00097

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

Security

Grade A, and why

branched-openspec 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 · 60 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

  • src/ contains the source YAML files (single source of truth for prompts).
  • prompts/ holds generated Codex/OpenCode prompt markdown files.
  • commands/ contains generated Gemini extension TOML files.
  • scripts/build.js is the Node.js build script that generates distribution files from source.
  • Makefile provides build and install/uninstall helpers for Codex, OpenCode, and Gemini CLIs.
  • gemini-extension.json is the Gemini extension manifest.
  • package.json manages Node.js dependencies and npm scripts.
  • .markdownlint.json configures the markdown linter for CI validation.

Build, Test, and Development Commands

  • pnpm install or npm install installs Node.js dependencies (js-yaml, chokidar-cli, etc.).
  • npm run build or make build or ./scripts/build.js generates prompts/.md and commands/.toml from src/*.yaml.
  • npm run watch runs in watch mode, automatically rebuilding when src/*.yaml files change.
  • npm run watch:src rebuilds when src/**/*.yaml changes.
  • npm run watch:toml validates commands/**/*.toml on change.
  • npm run watch:md lints prompts/*.md on change.
  • npm run lint runs all lint checks (TOML parse validation + Markdown linting).
  • npm run lint:toml validates TOML in commands/*.toml via scripts/validate-toml.js.
  • npm run lint:md lints prompts/*.md with markdownlint.
  • make help shows available Makefile targets with descriptions.
  • make codex symlinks prompt files into ~/.codex/prompts (requires codex CLI).
  • make opencode symlinks prompt files into ~/.config/opencode/commands/ (requires opencode CLI).
  • make gemini installs the Gemini extension (requires gemini CLI).
  • make install runs both codex and gemini installers.
  • make uninstall removes Codex/OpenCode symlinks and uninstalls the Gemini extension.
  • act -W .github/workflows/ci.yml runs the CI workflow locally (requires act and Docker).

Coding Style & Naming Conventions

  • Edit source files in src/*.yaml only; never edit generated files in prompts/ or commands/ directly.
  • Use YAML formatting in src/, Markdown in generated prompts/, and TOML in generated commands/.
  • Keep filenames descriptive and aligned with the prompt name (branched-openspec).
  • Prefer concise, imperative wording in prompt instructions.
  • Follow JSDoc conventions in scripts/build.js for function documentation.

Read the full file on GitHub · 60 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 · 60 lines · 968 tokens per session scan A 4cd2c6002617

Subscribe to this mod's changes

branched-openspec AGENTS.md is an instructions file published in the GitHub repository tomkyle/branched-openspec (3 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 968 tokens to every session, about $0.0048 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.