QualifiedCProgramming AGENTS.md

Repository instructions for verifying C programs through annotations, symbolic execution, manual verification conditions, and Rocq proofs. Rocq is a system for formally checking mathematical and program-correctness proofs.

In plain words
What is it for?
Use them when coordinating annotation, symbolic-execution, verification-condition, and Rocq-proof checks through the repository's controller.
Why use it?
They define the project's verification workflow, file responsibilities, stored evidence, and controller rules, reducing inconsistent or incomplete proof runs.

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/qinxiangcao/qualifiedcprogramming/agents-md
Clone the repo
git clone --depth 1 https://github.com/QinxiangCao/QualifiedCProgramming

Made for: Codex, OpenCode.

Per session 4,998 This file is loaded in full into every session.
When invoked 4,998 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.04998 $0.04998
Opus 5 $0.02499 $0.02499
Sonnet 5 $0.01000 $0.01000
Haiku 4.5 $0.00500 $0.00500

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

Security

Grade A, and why

QualifiedCProgramming 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 · 254 lines

How it starts

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

仓库定位

本仓库验证 C 程序:补充 annotation、运行 symbolic execution、检查 manual VC、证明 Rocq obligations,并完成最终一致性检查。

系统由 controller、main agent、每个 run 唯一且持续复用的 annotation-subagent、按轮创建的 vc-checking-subagent、controller-owned vc-proving-preparing、group-worker、机械 merge 和 final-check 组成。正式 C、generated files 与 Rocq formal files 始终以仓库根目录为当前状态;phase 不创建 Git 隔离目录。

外界只调用 .agents/skills/verification-orchestrator/scripts/controller.py。agent 不直接执行 controller 内部模块;controller handoff 提供完整的 symexeccoq-checkcoq-debug 命令。

简化文件原则

  • 给 agent 阅读的交接使用 Markdown;JSON 只保存 controller 必须解析的状态、terminal result、plan、manifest 与 merge result。
  • 同一事实只记录一次。可由 controller state、固定目录或文件内容推导的信息,不复制进 report/manifest。
  • JSON 不保存整份规则、parent transcript、完整 manifest 副本、预填 evidence、命令 argv/cwd/flags 副本或 state snapshot。
  • 成功 evidence 只保存 status、版本与必要摘要;失败时保留首个 diagnostic 或 blocker。完整检查可通过同一 controller 命令重跑。
  • final-check cleanup 只记录删除数量;失败只记录错误数、残留数以及首个错误或残留路径,不保存整份副产物路径列表。
  • controller_state.json 是 current authority;agent report 只属于 owner,controller acceptance 写入 state/log,不反写 report。
  • run_logs.json 是 append-only JSONL,只含事件,不重复整个 state。
  • 所有机器读取的 JSON 都含 schema_version。Markdown 不使用伪 schema。
  • agent_output.md / group_worker_output.md 用于简短的人类分析与 retry 参考,不是 acceptance evidence;没有固定套话模板。每次 annotation attempt 的 input/report/output 从创建起就位于独立 report directory,不覆盖前次文件;formal before/after 另存 run root history。

Skill routing

  • verification-orchestrator:main agent 使用;控制单个 run、唯一 annotation 会话、round、group、merge、stale 与 final-check。
  • annotation-filling:run 内唯一的 annotation-subagent 使用;首次读取相关示例并修改 main root target C annotation 与 formal_case_lib spec,后续接收 append feedback 继续修正。
  • annotation-checking:唯一 annotation owner 的当前 turn 内使用;判断 candidate 是否可交 main-owned check。
  • vc-checkingvc-checking-subagent 使用;只读 current formal files,输出 group plan。
  • group-worker-proving:group-worker 使用;只证明 assigned witnesses,只改 group copies。
  • final-check:main agent 使用;accepted merge 写回后检查 freshness、Coq、结构、三级 lib 与 cleanup。

Read the full file on GitHub · 254 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 First seen · 254 lines · 4,998 tokens per session scan A 1ef4dfe5344d

Subscribe to this mod's changes

QualifiedCProgramming AGENTS.md is an instructions file published in the GitHub repository QinxiangCao/QualifiedCProgramming (43 stars, last pushed 12d ago), licensed MIT. It adds 4,998 tokens to every session, about $0.0250 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.