mergetrain: Instructions file for Codex

AGENTS.md

mergetrain AGENTS.md is an instructions file for Codex, OpenCode from yongjip/mergetrain. It costs 1,251 tokens per session, scanned A, original, MIT.

A set of project instructions for Mergetrain, a local tool that moves code changes through testing and deployment.

In plain words
What is it for?
Use it when developing, testing, queuing, deploying, or troubleshooting changes in the Mergetrain repository.
Why use it?
It gives coding agents rules for branches, worktrees, commits, deployment safety, and recovery evidence.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex.

This is yongjip/mergetrain's own configuration. It tells Codex and OpenCode how to work on mergetrain itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mergetrain configures →

Reuse

Borrowing it

Nothing to install: this file belongs to yongjip/mergetrain. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yongjip/mergetrain/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/yongjip/mergetrain

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 mergetrain AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/yongjip/mergetrain/agents-md/github.svg)](https://agentmods.dev/instructions/yongjip/mergetrain/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/yongjip/mergetrain/agents-md"><img src="https://agentmods.dev/badge/instructions/yongjip/mergetrain/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mergetrain AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/yongjip/mergetrain/agents-md"><img src="https://agentmods.dev/badge/instructions/yongjip/mergetrain/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,251 This file is loaded in full into every session.
When invoked 1,251 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01251 $0.01251
Opus 5.5 $0.00500 $0.00500
Sonnet 5.5 $0.00250 $0.00250
Haiku 4.5 $0.00125 $0.00125

Measured 9d ago against content hash 0f1412fa63c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mergetrain 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 9d 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 · 104 lines

How it starts

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

AGENTS.md

This repository contains mergetrain, a local deploy train for coding-agent worktrees.

Agent operating rules

  1. Work on a task-specific branch and worktree.
  2. Commit all changes before enqueueing.
  3. Do not push deploy refs directly. For ordinary handoff, enqueue every named finished branch in the requested order with mergetrain enqueue --task <task> --branch <branch> and let mergetrain capture the exact SHAs. Stop after the last enqueue; asking to queue for validation does not authorize running validation.
  4. Read mergetrain status --json first. Task agents submit finished branches and stop; an authorized runner follows next_action for validation, deployment, and recovery. A runner's wait action does not block submission. Use status --diagnose only for configuration, Git, runtime, or lock detail, and inspect <job-id> only for job evidence.
  5. Use --auto only after explicit unattended-deploy approval. A bounded instruction to QA, deploy, verify, and finish end-to-end grants that approval for the named task and destination; do not ask for each opaque train ID. Auto jobs are bound to that Git destination and the approved gate, reuse, and verify policy; they must block if either identity changes.
  6. Let one runner or daemon own merge and test. The default daemon may push and verify only --auto jobs; daemon --validate-only handles manual jobs but stops at a validated train and never deploys.
  7. Fix blocked or failed work in the owning branch, commit a clean result, then run mergetrain retry <job-id> to replace that outcome with a freshly pinned job. Do not enqueue the same active branch again. Retry is for blocked/failed jobs only and does not itself authorize validation or deployment.
  8. Do not delete or rewrite remote refs/mergetrain/deploys/*; they are permanent recovery evidence.
  9. Treat public product surface as an owner-evidence budget. Before adding a CLI command or flag, config field, UI or network listener, daemon/Hub behavior, MCP tool, recovery action, notification path, or reuse control, apply the admission test in docs/product-scope.md, prefer consolidation, and record the measured cost, repeated workflow, or incorrect state.
  10. Do not bump the version in feature or fix changes; add the changelog entry under ## Unreleased. Only a requested release-preparation change bumps the version, after applying the cadence rules in docs/release.md#when-to-cut-a-release; if the pending changes do not meet them, recommend waiting. When your change meets that section's patch-release criteria, say so at handoff and recommend a prompt patch release.
  11. For requested upgrades or mixed-version failures, read docs/upgrading.md. Keep the target release, check the live daemon as well as CLI/MCP, and adapt affected consumers using the release migration. Do not silently downgrade to satisfy an old contract assertion or stale process; preserve queued work and the existing approval scope.

Read the full file on GitHub · 104 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. 9d ago Changed · +2 lines · +29 tokens per session 0f1412fa63c4
  2. 23d ago Changed · +5 lines · +73 tokens per session 56e0b7e740ea
  3. 26d ago Changed · +8 lines · +103 tokens per session d5fa3de50c1f
  4. 1mo ago Changed · +2 lines · +45 tokens per session 976f60c11a51
  5. 1mo ago Changed · +2 lines · +28 tokens per session 2f00d78a084e
  6. 1mo ago Changed · +10 lines · +177 tokens per session 2883ec60e094
  7. 1mo ago First seen · 75 lines · 796 tokens per session scan A 048ece328961

Subscribe to this mod's changes

mergetrain AGENTS.md is an instructions file published in the GitHub repository yongjip/mergetrain (7 stars, last pushed today), licensed MIT. It adds 1,251 tokens to every session, about $0.0050 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,581 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens