cavil-loop: Instructions file for Codex

AGENTS.md

cavil-loop AGENTS.md is an instructions file for Codex, OpenCode from GigleAI/cavil-loop. It costs 9,697 tokens per session, scanned A, original, MIT.

A project guide for cavil-loop, an agent skill that lets a local AI coding tool work from GitHub issue and pull-request comments.

In plain words
What is it for?
Use it to understand or modify the background poller, its setup script, its agent skill, and the workflow that labels, updates, and pushes issue or pull-request work.
Why use it?
It explains the project’s purpose, file layout, conventions, and setup so agents and maintainers can work on the automation safely.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/gigleai/cavil-loop/agents-md"><img src="https://agentmods.dev/badge/instructions/gigleai/cavil-loop/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9,697 This file is loaded in full into every session.
When invoked 9,697 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.09697 $0.09697
Opus 5.5 $0.03879 $0.03879
Sonnet 5.5 $0.01939 $0.01939
Haiku 4.5 $0.00970 $0.00970

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

Security

Grade A, and why

cavil-loop 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 2d 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 · 365 lines

How it starts

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

AGENTS.md

English · 中文

Quick context for agents (Claude Code et al.) and maintainers working in this repo. New people / agents read this first, then README.md for the external intro.

What this project is

GigleAI/cavil-loop is an Agent Skill — a feature package loaded by AI coding tools like Claude Code. It makes GitHub issue / PR comments the I/O of a local AI: a 60-second background poller on your machine finds whatever issue / PR is labeled pending/agent, spins up Claude Code locally, lets it work, push, reply, flip the label. Background in README.md.

Meta nature: this project develops itself (dogfooding). The issues / PRs of this repo run through its own workflow. On managed Linux installations, merged main revisions are published as immutable releases and activated by an atomic symlink switch on a later poll; a local checkout edit is used only after explicitly entering development mode.

Directory layout

.
├── README.md / README.zh.md       ← External intro (what it is, how to use)
├── AGENTS.md  / AGENTS.zh.md      ← This file
├── CONTRIBUTING.md / .zh.md       ← External contributor PR guide
├── SKILL.md / SKILL.zh.md         ← Claude Code skill metadata (frontmatter + entry)
├── LICENSE                        ← MIT
├── setup.sh                       ← Bootstraps the daemon into a host project
├── cavil-loop.config.example    ← Config template (every field commented)
├── scripts/
│   ├── _lib.sh                    ← Common library: config load, log, has_claude_session, run_gh
│   ├── _names.sh                  ← New vs pre-rename names: the one place that decides which path to use
│   ├── agent-poll.sh              ← Main poller (called by systemd timer on Linux / launchd LaunchAgent on macOS)
│   ├── dispatch-new-issue.sh      ← Dispatch a fresh issue
│   ├── dispatch-issue-comment.sh  ← Dispatch on new issue comment
│   ├── dispatch-pr-comment.sh     ← Dispatch on new PR comment
│   ├── seed-state.sh              ← Initial seed of state.json
│   ├── create-worktree.sh         ← Build worktree (injects worker identity)
│   ├── cleanup-issue.sh           ← Post-merge cleanup (worktree / tmux / project hook)
│   ├── migrate-legacy.sh          ← Move a pre-rename install to cavil-loop names (run by poll-entry.sh / setup.sh)
│   ├── _preview_adopt.sh          ← Move a pre-rename preview onto the new units (shared by migrate-legacy.sh / preview-serve.sh)
│   ├── preview-resolve-conflict.sh ← Resolve a port registered in both old and new directories by different owners (by hand)
│   ├── session-log.sh             ← View tmux pane history
│   ├── weekly-report/             ← Monday auto weekly report (collect / render / PDF / publish)
│   └── doc-diagrams/              ← Generator + checker for the animated SVGs in docs/images/
├── prompts/
│   ├── new-issue.template.md      ← Prompt for new-issue dispatch
│   ├── issue-comment.template.md  ← Prompt for new issue comment (also § A-split: split into sub-issues)
│   ├── sub-issue.template.md      ← Appended for a split-out sub-issue: skip design, go straight to development
│   └── pr-comment.template.md     ← Prompt for new PR comment
├── systemd/                      ← Linux scheduler
│   ├── [email protected] ← User-scoped template service
│   ├── [email protected]
│   └── coding-agent-*         ← Pre-rename units, kept byte for byte for old installs (see docs/operations.md)
├── launchd/                      ← macOS scheduler
│   └── dev.luosky.cavil-loop.plist.template  ← Generated per project by setup.sh
└── docs/
    ├── architecture.md / .zh.md   ← Five-state label machine + session model + design FAQ
    ├── collaboration.md / .zh.md  ← Multi-human + multi-agent workflows via label suffixes
    ├── persistence.md / .zh.md    ← Where every artifact lives + retention + resume SOPs
    ├── security.md / .zh.md       ← Security model + label discipline
    └── operations.md / .zh.md     ← Config / file layout / schedulers / troubleshooting / uninstall

Read the full file on GitHub · 365 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. 2d ago Changed · +1 lines · +132 tokens per session fb854398ce7c
  2. 3d ago Changed · +2 lines · +211 tokens per session d839e808ea72
  3. 4d ago Changed · +1 lines · +96 tokens per session 0fbce2e6835b
  4. 5d ago Changed · +4 lines · +290 tokens per session f82348d47eaf
  5. 6d ago Changed · +2 lines · +235 tokens per session bd3544c10171
  6. 8d ago Changed · +4 lines · +256 tokens per session a0d05a00627a
  7. 10d ago Changed · +2 lines · +284 tokens per session 8d90735576b2
  8. 17d ago Changed · +1 lines · +311 tokens per session 6998a44e87f8
  9. 20d ago Changed · +98 lines · +1,627 tokens per session c4ef47995722
  10. 21d ago First seen · 250 lines · 6,255 tokens per session scan A 6774a6b07f59

Subscribe to this mod's changes

cavil-loop AGENTS.md is an instructions file published in the GitHub repository GigleAI/cavil-loop (11 stars, last pushed yesterday), licensed MIT. It adds 9,697 tokens to every session, about $0.0388 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,461 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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens