loop-engineering: Instructions file for Codex

AGENTS.md

loop-engineering AGENTS.md is an instructions file for Codex, OpenCode from cobusgreyling/loop-engineering. It costs 457 tokens per session, scanned A, original, MIT.

Repository instructions for loop-engineering, a project for assessing and improving how ready a codebase is for repeatable agent-driven work.

In plain words
What is it for?
Use them to build and test the tools, run readiness audits, inspect status, review patterns, and follow the project's documentation and change controls.
Why use it?
They provide the approved entry points, audit commands, review rules, and safeguards needed to maintain the project consistently.

Instructions file for CodexOpenCode

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

This is cobusgreyling/loop-engineering's own configuration. It tells Codex and OpenCode how to work on loop-engineering 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 loop-engineering configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is node dist/cli.js doctor ../...

About the project

Loop Engineering is a collection of patterns, starter projects, and command-line tools for designing recurring workflows around AI coding agents. It is for developers who want agents to discover work, make changes, verify results, and preserve project state across tasks. The catalogue entries provide the project's reusable skills, agents, plugin, and instruction.

cobusgreyling/loop-engineering · 11,857 stars · on GitHub · cobusgreyling.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to cobusgreyling/loop-engineering. 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/cobusgreyling/loop-engineering/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/cobusgreyling/loop-engineering

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 loop-engineering AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cobusgreyling/loop-engineering/agents-md/github.svg)](https://agentmods.dev/instructions/cobusgreyling/loop-engineering/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/cobusgreyling/loop-engineering/agents-md"><img src="https://agentmods.dev/badge/instructions/cobusgreyling/loop-engineering/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 loop-engineering AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/cobusgreyling/loop-engineering/agents-md"><img src="https://agentmods.dev/badge/instructions/cobusgreyling/loop-engineering/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 457 This file is loaded in full into every session.
When invoked 457 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.00457 $0.00457
Opus 5.5 $0.00183 $0.00183
Sonnet 5.5 $0.00091 $0.00091
Haiku 4.5 $0.00046 $0.00046

Measured 3mo ago against content hash cd2046ce80b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loop-engineering 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 3mo 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 · 47 lines

What it actually says

AGENTS.md — loop-engineering reference

Conventions for humans and loops maintaining this repository.

Build & verify

# Unified front door (prefer for new workflows)
cd tools/loop && npm ci && npm test
node dist/cli.js doctor ../..
node dist/cli.js status ../..

# Loop readiness audit CLI (still canonical scorer)
cd tools/loop-audit && npm ci && npm run build
node dist/cli.js ../..              # audit repo root
node dist/cli.js ../.. --suggest    # show copy commands for gaps

# Before/after demo (scores an empty dir → starter → L2)
bash scripts/before-after-demo.sh

Front door map: docs/cli-front-door.md. Agent install skill: skills/install-loop/SKILL.md.

CI runs validate-patterns and audit on every push/PR (see .github/workflows/).

Review norms

  • Patterns and starters must stay tool-agnostic in intent; tool-specific paths live under examples/ and per-tool starters.
  • Never auto-merge changes to docs/primitives*.md, tools/loop-audit/src/, or showcase assets without human review.
  • Failure stories in stories/ should include token cost, root cause, and remediation — not just wins.
  • New patterns require an entry in patterns/registry.yaml.

Loop operation (this repo)

  • Daily triage: loop-triage skill → STATE.md (report-only, L1).
  • Fixes: only via PR with human review; minimal-fix + loop-verifier for assisted changes (L2).
  • Isolation: use git worktrees for any unattended code-change experiments (see LOOP.md).

Test commands

This repo has no application test suite. Quality gates:

cd tools/loop && npm test && node dist/cli.js doctor ../..
cd tools/loop-audit && npm run build && node dist/cli.js ../../
bash scripts/before-after-demo.sh
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. 3mo ago First seen · 47 lines · 457 tokens per session scan A cd2046ce80b0

Subscribe to this mod's changes

loop-engineering AGENTS.md is an instructions file published in the GitHub repository cobusgreyling/loop-engineering (11,857 stars, last pushed yesterday), licensed MIT. It adds 457 tokens to every session, about $0.0018 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-30.

Related

loop-engineering AGENTS.md compared with instructions from other repositories

loop-engineering AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loop-engineering AGENTS.mdcobusgreyling/loop-engineeringInstructions file12kyesterdayMITA457Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,303GitHub Copilot
deno copilot-instructions.mddenoland/denoInstructions file109ktodayMITA3,077GitHub Copilot