divi AGENTS.md

Repository-specific instructions for QoroQuantum/divi covering its development setup, code style, tests, and documentation. An AGENTS.md file tells coding agents how to work in a repository.

In plain words
What is it for?
Use it to choose the Python environment, install dependencies with uv, format Python files, follow license-header rules, and run appropriate tests.
Why use it?
It gives an agent the project's required rules before it edits or tests code.

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/qoroquantum/divi/agents-md
Clone the repo
git clone --depth 1 https://github.com/QoroQuantum/divi

Made for: Codex, OpenCode.

Per session 1,471 This file is loaded in full into every session.
When invoked 1,471 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.01471 $0.01471
Opus 5 $0.00736 $0.00736
Sonnet 5 $0.00294 $0.00294
Haiku 4.5 $0.00147 $0.00147

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

Security

Grade A, and why

divi 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 · 73 lines

How it starts

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

AGENTS.md

Dev environment

  • Python version is defined in pyproject.toml (requires-python).
  • Always use the virtual environment in .venv/ or venv/ when running commands.
  • If neither exists, do not run any Python code until the human specifies which Python executable to use.
  • uv is the primary workflow:
    • Install: uv sync --all-extras (always sync with extras to include ai dependencies)

Code style and formatting

  • Use black and isort for formatting; isort must use the Black profile; autoflake is used to remove unused imports.
  • Do NOT run pre-commit run -a — it modifies unrelated files. Let pre-commit fire on commit.
  • New/updated .py files (outside docs/) should include the license header from LICENSES/.license-header (pre-commit enforces this).
  • Hook configuration lives in /.pre-commit-config.yaml; keep any new files compatible with these hooks.
  • If the human is asking an inquisitive or brainstorm-style question, do not change code; respond with analysis or ideas only.

Testing

  • Write spec-driven tests first (behavior-focused) before adding critical low-level mocking.
  • Use pytest ecosystem tools (e.g., pytest-mock) only; avoid unittest unless no alternative exists and the human agrees.
  • Markers are registered in pytest.ini. Do not run requires_api_key tests as an agent unless explicitly asked, and avoid e2e during development.
  • API tests require a Qoro API key:
    • QORO_API_KEY=... uv run pytest -n auto --run-api-tests
    • or uv run pytest -n auto --run-api-tests --api-key your-key-here
  • Never inline imports nor classes in test functions. If you are facing errors due to circular imports, ask for approval before inlining imports to fix it.
  • Do not leave meta comments in source or tests that explain where other code moved (e.g. "tests live in …", "keep one smoke here"). Relocations should be obvious from module layout and test names; use docstrings only when they document behaviour under test.
  • Use simulator fixtures from tests/conftest.py: dummy_simulator when a real backend is not needed (returns fake counts), default_test_simulator for actual circuit execution (QASM→shots), dummy_expval_backend for expval-mode tests. Never instantiate a simulator backend directly in a unit test — always use a fixture. A test that genuinely needs its own instance (e.g. it exercises constructor arguments or a backend configuration no fixture covers) is a special case: say so and get the human's agreement first.
  • Test layout mirrors divi/ — one test_<module>.py per source module (see docs/source/development/testing.rst).
  • Shared test infrastructure (do not mix roles):
    • conftest.py — pytest fixtures and hooks only (@pytest.fixture, pytest_addoption). Auto-discovered; never import from conftest in test code.
    • _helpers.pyexplicit-import builders, assertion helpers, constants, and shared test doubles (e.g. DummySpecStage, backend spies). Use from tests.<pkg>._helpers import ….
    • _contracts.py — shared verify_* behavioural checks imported across multiple test_*.py files in the same package. Use a descriptive name such as _circuit_runner_contracts.py when the scope is narrower than the whole package.
    • Fixtures used by a single test file may stay in that file; promote to conftest.py when reused within the package or subtree.

Read the full file on GitHub · 73 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 · 73 lines · 1,471 tokens per session scan A c0be9a32035e

Subscribe to this mod's changes

divi AGENTS.md is an instructions file published in the GitHub repository QoroQuantum/divi (23 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,471 tokens to every session, about $0.0074 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.

Related

Other instructions, from other repositories

qubitrefill AGENTS.md

Instructions for QuipNetwork/qubitrefill, covering agents.md, skills, bitrefill, qupick and registration digest.

QuipNetwork/qubitrefill · 1,501 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

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 · 6,785 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,345 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens