loopx AGENTS.md

A contribution guide for Loopx that explains how to make repository changes through Git branches, separate workspaces, commits, and pull requests. A worktree is a separate working copy of a Git repository.

In plain words
What is it for?
Use it when preparing a non-trivial change, creating a branch or worktree, checking the pull-request base, signing off commits, or recording contributor credit.
Why use it?
It prevents unrelated changes from being mixed together and sets checks for clean, reviewable contributions before they reach the main branch.

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

Made for: Codex, OpenCode.

Per session 4,899 This file is loaded in full into every session.
When invoked 4,899 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.04899 $0.04899
Opus 5 $0.02449 $0.02449
Sonnet 5 $0.00980 $0.00980
Haiku 4.5 $0.00490 $0.00490

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

Security

Grade A, and why

loopx 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 · 435 lines

How it starts

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

Agent Instructions

Commit And PR Hygiene

Worktree And PR Gate

For any tracked repository change beyond a trivial typo fix, create or use a dedicated clean git worktree on a codex/ branch. Use latest origin/main unless the user explicitly names an integration or release branch; in that case, fetch that branch and use its latest remote head as both the worktree baseline and pull-request base. Before pushing, verify the merge base and PR base so unrelated main history cannot leak into a stacked integration PR. Do not implement changes directly in a dirty primary worktree, even when the task starts by inspecting that dirty tree.

When a dirty worktree contains potentially valuable changes, first classify it read-only, then copy or reapply the valuable subset into the dedicated clean worktree and open a PR from that branch. Reset or clean the original dirty worktree only after the valuable subset has been merged or explicitly judged obsolete. Leave unrelated untracked local artifacts alone.

Every tracked repository change must be pushed on a branch and reviewed through a pull request before it reaches main. Do not push broad mixed commits or direct commits to main.

DCO Sign-Off

Every commit in a pull-request branch must include a Signed-off-by: Your Name <[email protected]> trailer, or the DCO check will reject the PR. Always commit with git commit -s. If a commit is already missing the trailer, amend it with git commit --amend -s (or an interactive rebase for multiple commits) before pushing. See CONTRIBUTING.md for the full DCO policy.

Only skip this worktree/PR gate when the user explicitly says the change is local-only and must not be proposed for the repository.

For non-trivial repository changes, especially anything that touches benchmark adapters, smoke tests, public docs, or commit/push workflows, use the git-split-commit-pr workflow before staging:

  1. Establish ground truth with git status --short --branch, git diff --stat, git diff --name-only, and git ls-files --others --exclude-standard.
  2. Classify every changed path before staging:
    • core product code;
    • core documentation;
    • durable validation smoke;
    • local/private state;
    • low-value or obsolete artifact.
  3. Scan candidate paths for credentials, private state, local absolute paths, raw benchmark logs, trajectories, verifier output, and internal links.
  4. Stage by explicit pathspecs only. Do not use git add ..
  5. Split commits by reviewer logic:
    • runtime/API behavior;
    • public docs and protocol notes;
    • focused validation or cleanup.
  6. Push a branch and open a PR for reviewable batches.

Read the full file on GitHub · 435 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 · +3 lines · +45 tokens per session bf466114cf5d
  2. 2d ago First seen · 432 lines · 4,854 tokens per session scan A 5728ac419b7e

Subscribe to this mod's changes

loopx AGENTS.md is an instructions file published in the GitHub repository huangruiteng/loopx (5,394 stars, last pushed today), licensed Apache-2.0. It adds 4,899 tokens to every session, about $0.0245 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.