AGENTS.md · diff
git:20260914.81debc9 to git:20261112.cb0111b
54 added, 71 removed. Audit A to A.
What this update changes in the checks
No check changed: every fixed check gives the same answer before and after this update.
A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.
# zkcrypto-audit
- `zkcrypto-audit` is a plugin collection for staged, evidence-driven audits of
- zero-knowledge systems and cryptographic protocols.
+ A collection of agent skills for staged, evidence-driven audits of
+ zero-knowledge systems and cryptographic protocols. The skills follow the open
+ Agent Skills format and are packaged as plugins for Claude Code and Codex.
## Project Layout
- - `plugins/` contains 7 category plugins housing 43 audit skills.
- - `.claude-plugin/marketplace.json` is the root marketplace manifest.
- - `.agents/plugins/marketplace.json` is the Codex marketplace catalog.
- - `.agents/plugins/marketplace.schema.json` validates Codex marketplace structure.
- - `plugins/*/.codex-plugin/plugin.json` contains Codex plugin manifests.
- - `plugins/_meta/codex-skill-registry.yaml` is the routing policy source of truth.
- - `plugins/_meta/router-matrix.yaml` is the machine-readable route matrix.
- - `.codex/skills/` contains hand-maintained Codex compatibility stubs.
- - `plugins/evidence-and-tooling/` carries the zkbugs data plane at its **plugin
- root** (not inside `skills/`): a pre-built `index/`, plus `scripts/`,
- `config/`, and `data/`.
- - `zk-findings/sessions/` stores local engagement session-state handoff files.
-
- There is no root-level `scripts/` or `tests/` directory — the maintainer-only
- scaffolding and regression suite were removed in `987d0e7`.
+ - `plugins/<category>/skills/<skill>/` holds the skills. `SKILL.md` is the
+ source of truth for a skill's behaviour; `references/`, `workflows/`, and
+ `templates/` hold what it reads on demand.
+ - `plugins/core-audit-flow/skills/crypto-audit-router/` holds the staged flow
+ (`workflows/full-audit-flow.md`), the routing policy
+ (`references/routing-matrix.md`), the state machine, and the session-state
+ schema and template.
+ - `plugins/evidence-and-tooling/skills/zkbugs-index/` carries the zkbugs data
+ plane inside the skill: the pre-built `index/`, plus `scripts/` and
+ `config/`.
+ - `.claude-plugin/marketplace.json` is the Claude Code marketplace and the
+ source of truth for plugin names, descriptions, and the version.
+ - `scripts/sync.py` regenerates derived packaging and validates the repository.
+ - `examples/engagements/` holds sample engagement directories.
- ## Default Audit Flow
+ Generated by `scripts/sync.py`; never edit by hand:
- 1. `crypto-audit-router`
- 2. `crypto-audit-context`
- 3. `spec-delta-checker`
- 4. Domain auditor(s)
- 5. `crypto-fp-check`
- 6. `crypto-report-writer`
- 7. `zkbugs-index`
+ - `plugins/*/.claude-plugin/plugin.json` and `plugins/*/.codex-plugin/plugin.json`
+ - `.agents/plugins/marketplace.json` (Codex marketplace)
+ - `plugins/*/skills/*/agents/openai.yaml` (Codex skill metadata)
+ - the skill count in the `README.md` badge
- ## Codex Audit Completion Contract
+ ## Changing Skills
- When a user asks Codex to run `crypto-audit-router`, Codex must execute the
- complete staged flow. Finding one valid issue is not a stop condition.
+ 1. Edit the canonical files under `plugins/<category>/skills/<skill>/`.
+ 2. Keep each skill self-contained: files a skill tells an agent to read must
+ live inside that skill's directory and be referenced by a path relative to
+ it. Refer to other skills by name, never by path.
+ 3. Use only Agent Skills spec frontmatter (`name`, `description`, `license`,
+ `compatibility`, `metadata`, `allowed-tools`), with `allowed-tools` as a
+ space-separated string. Keep wording agent-neutral.
+ 4. A new or renamed skill needs a row in the routing matrix.
+ 5. Run `python3 scripts/sync.py`, then `python3 scripts/sync.py --check`
+ (needs `pip install -r scripts/requirements.txt`). CI runs the check.
- Codex must:
+ To change the version, edit `metadata.version` in
+ `.claude-plugin/marketplace.json`, add the `CHANGELOG.md` entry, and run the
+ sync.
- 1. Start with `crypto-audit-context`.
- 2. Create or update `zk-findings/sessions/<engagement-id>.json`.
- 3. Record target scope, trust boundaries, critical paths, and unresolved
- assumptions in session state before domain review.
- 4. Select every applicable domain auditor from
- `plugins/_meta/router-matrix.yaml` or the router matrix reference.
- 5. Preserve each selected domain auditor's output contract separately instead
- of flattening everything into prose.
- 6. Maintain a finding candidate matrix with every candidate classified as one
- of:
- - verified finding
- - false positive
- - unverified or needs more evidence
- - informational observation
- - residual risk
- 7. Append domain handoffs, open findings, observations, and unresolved
- assumptions to the session state after each domain pass.
- 8. Send every surviving suspected finding to `crypto-fp-check`.
- 9. Enforce the Critical/High proof gate: no Critical or High severity may be
- reported without a compilable PoC or equivalently strong executable proof.
- 10. Downgrade, hold as unverified, or reject candidates that fail
- `crypto-fp-check` gates.
- 11. Send verified findings to `crypto-report-writer`.
- 12. Produce an auditor-readable report under `zk-findings/reports/`.
- 13. Store PoCs, reproduction tests, or proof artifacts under
- `zk-findings/pocs/` when applicable.
- 14. Use `zkbugs-index` only for verified, index-worthy findings or explicit
- prior-art lookup.
- 15. Record report paths, PoC paths, verification verdicts, index references,
- and next steps in the session state.
- 16. Close out only after confirming that session state, verified findings,
- report text, PoC artifacts, and index metadata all describe the same claim
- set.
+ ## Running an Audit
- For every selected route, Codex must leave an explicit disposition:
+ Start every audit with the `crypto-audit-router` skill and read its
+ `workflows/full-audit-flow.md` completely before selecting any auditor. That
+ file defines phase order, workspace layout, session state, skip rules, and the
+ completion contract.
- - `verified`
- - `false_positive`
- - `unverified`
- - `observation`
- - `residual_risk`
+ Order:
- If a route is skipped, Codex must state why it is not applicable to the target.
+ 1. `crypto-audit-router`
+ 2. `crypto-audit-context`
+ 3. `spec-delta-checker`, unless no specification or documentation governs the
+ code
+ 4. Every domain auditor the routing matrix matches
+ 5. `crypto-fp-check` on every candidate
+ 6. `crypto-report-writer`
+ 7. Closeout
- Codex must not claim audit completion until all selected routes have a
- disposition and the report-writing phase is complete.
+ If a step or a matched route is skipped, say so and give the reason.
+ Audit working state goes in `.zkcrypto-audit/<engagement-id>/` (`session.json`,
+ `reports/`, `pocs/`) in the directory the audit is run from. It is ignored by
+ git in this repository.