loop-engineering AGENTS.md

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

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

Made for: Codex, OpenCode.

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. 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.00457 $0.00457
Opus 5 $0.00229 $0.00229
Sonnet 5 $0.00091 $0.00091
Haiku 4.5 $0.00046 $0.00046

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

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. yesterday 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 (10,738 stars, last pushed 2d ago), licensed MIT. It adds 457 tokens to every session, about $0.0023 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.