mergetrain AGENTS.md

mergetrain AGENTS.md is an instructions file for Codex, OpenCode from yongjip/mergetrain. It costs 1,001 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

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/yongjip/mergetrain/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,001 This file is loaded in full into every session.
When invoked 1,001 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.01001 $0.01001
Opus 5 $0.00500 $0.00500
Sonnet 5 $0.00200 $0.00200
Haiku 4.5 $0.00100 $0.00100

Measured today against content hash 2f00d78a084e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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

How it starts

The opening of the file, as written. The whole thing — 87 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 and follow its structured next_action. 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 enqueue a new job.
  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, dashboard control, 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.

Useful commands

python -m pytest -q -n auto --cov=mergetrain --cov-report=term-missing --cov-report=json:.coverage.json
python scripts/check_critical_coverage.py .coverage.json
PYTHONPATH=src python -m unittest discover -s tests
PYTHONPATH=src python -m mergetrain status --diagnose --json
PYTHONPATH=src python -m mergetrain init --project demo
python scripts/check_architecture.py

Read the full file on GitHub · 87 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. today Changed · +2 lines · +28 tokens per session 2f00d78a084e
  2. yesterday Changed · +10 lines · +177 tokens per session 2883ec60e094
  3. 5d 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 (3 stars, last pushed today), licensed MIT. It adds 1,001 tokens to every session, about $0.0050 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.

Related

Other instructions, from other repositories

git-worktree-runner copilot-instructions.md

Instructions for coderabbitai/git-worktree-runner, covering copilot instructions, architecture & flow, key concepts, adapter contract and manual testing (essential subset).

coderabbitai/git-worktree-runner · 1,250 tokens

git-worktree-runner completions.instructions.md

Instructions for coderabbitai/git-worktree-runner, covering completions instructions, when to update completions, file responsibilities, implementation pattern and testing completions.

coderabbitai/git-worktree-runner · 1,366 tokens

git-worktree-runner testing.instructions.md

Instructions for coderabbitai/git-worktree-runner, covering testing instructions, basic create/remove, branch sanitization, remote branch (if exists) and local existing branch.

coderabbitai/git-worktree-runner · 766 tokens

git-worktree-runner ai.instructions.md

Instructions for coderabbitai/git-worktree-runner, covering ai adapter instructions, when to use a file vs registry, adding a standard ai tool (registry), adding a custom ai tool (file override) and toolname adapter.

coderabbitai/git-worktree-runner · 491 tokens

git-worktree-runner editor.instructions.md

Instructions for coderabbitai/git-worktree-runner, covering editor adapter instructions, when to use a file vs registry, adding a standard editor (registry), adding a custom editor (file override) and editorname adapter.

coderabbitai/git-worktree-runner · 533 tokens

mulmoterminal CLAUDE.md

Claude Code instructions for receptron/mulmoterminal, covering claude.md — mulmoterminal, stack & package manager, run after changes, import a component at module scope, never inside a test and no emojis.

receptron/mulmoterminal · 5,467 tokens