codeflow AGENTS.md

codeflow AGENTS.md is an instructions file for Codex, OpenCode from xiaojiou176-open/codeflow. It costs 6,303 tokens per session, scanned D, original, MIT.

A development guide for Codeflow, a project that uses a contract-first approach to keep code, documentation, tests, and repository checks aligned. It lists the required reading order and verification commands.

In plain words
What is it for?
Bootstrapping the project, running CI and tests, checking workflows and Docker usage, scanning for secrets, auditing files, and maintaining documentation.
Why use it?
It helps an AI assistant make small, reviewable changes and catch security, workflow, documentation, and repository-hygiene problems before claiming success.

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

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 codeflow AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xiaojiou176-open/codeflow/agents-md.svg)](https://agentmods.dev/instructions/xiaojiou176-open/codeflow/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xiaojiou176-open/codeflow/agents-md"><img src="https://agentmods.dev/badge/instructions/xiaojiou176-open/codeflow/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,303 This file is loaded in full into every session.
When invoked 6,303 The same file — it is already loaded in full.
Security scan D 2 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.06303 $0.06303
Opus 5 $0.03152 $0.03152
Sonnet 5 $0.01261 $0.01261
Haiku 4.5 $0.00630 $0.00630

Measured 5d ago against content hash 9423310cd698, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

codeflow AGENTS.md scanned grade D with 2 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 5d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

live-provider rule that resolves process env first and `~/.codex/config.toml`

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

before the clean-room `rm -rf` sweep, plus quarantining stubborn dashboard
AGENTS.md · 442 lines

How it starts

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

AGENTS Guide

Mission

Work in Codeflow as a contract-first engineering agent:

  • keep diffs small and auditable
  • keep code and docs in sync
  • verify behavior with real commands before claiming success
  • never commit runtime caches, local secrets, logs, or generated noise

Canonical Read Order

  1. README.md
  2. docs/index.html
  3. configs/repo_positioning.json
  4. configs/docs_nav_registry.json
  5. nearest local wrapper under apps/*/AGENTS.md or apps/*/CLAUDE.md

Key Commands

  • bootstrap: npm run bootstrap
  • local fast CI: npm run ci
  • local strict CI: npm run ci:strict
  • fast verification: npm run test:quick
  • main local gate: npm run test
  • host safety scan: npm run scan:host-process-risks
  • space audit: npm run space:audit
  • docker runtime audit: npm run docker:runtime:audit
  • hygiene: bash scripts/check_repo_hygiene.sh
  • workflow security: npm run scan:workflow-security
  • Trivy repo scan: npm run scan:trivy
  • closeout secret scan: npm run security:scan:closeout
  • truth split: npm run truth:triage
  • full pre-commit: pre-commit run --all-files
  • repo-owned scripts/*.py entrypoints must remain runnable through direct python3 scripts/<name>.py execution or bash scripts/run_governance_py.sh without relying on a pre-seeded repo-root PYTHONPATH
  • host-compatible pre-commit hooks that execute repo-owned scripts/*.py entrypoints must use the same wrapper path (or an equivalent python3 -B contract) so clean hook runs do not leave repo-local __pycache__ residue

Generated Governance Context

  • active CI layers: pre-commit, pre-push, hosted, nightly, manual
  • do not reintroduce a sixth CI/profile/workflow layer; move scheduled heavy checks to nightly and explicit high-cost verification to manual
  • trust flow: ci-trust-boundary -> quick-feedback -> hosted policy/core slices -> pr-release-critical-gates -> pr-ci-gate
  • hosted policy/core slices: policy-and-security, core-tests
  • untrusted PR path: quick-feedback -> untrusted-pr-basic-gates -> pr-ci-gate
  • protected sensitive lanes: workflow_dispatch -> owner-approved-sensitive -> ui-truth / resilience-and-e2e / release-evidence
  • canonical machine SSOT: configs/ci_governance_policy.json

Read the full file on GitHub · 442 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. 5d ago First seen · 442 lines · 6,303 tokens per session scan D 9423310cd698

Subscribe to this mod's changes

codeflow AGENTS.md is an instructions file published in the GitHub repository xiaojiou176-open/codeflow (207 stars, last pushed 1mo ago), licensed MIT. It adds 6,303 tokens to every session, about $0.0315 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.