daiv AGENTS.md

Repository instructions for daiv, including verified commands, test patterns, translation steps, and a map of its less obvious Python directories.

In plain words
What is it for?
Use them when developing daiv, running a specific or complete test suite, checking types, updating translations, or locating its agent tools, skills, deferred tools, and middleware.
Why use it?
They provide the project’s approved ways to test, lint, manage dependencies, and update translations, reducing errors from using the wrong commands or editing files incorrectly.

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

Made for: Codex, OpenCode.

Per session 1,359 This file is loaded in full into every session.
When invoked 1,359 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.01359 $0.01359
Opus 5 $0.00679 $0.00679
Sonnet 5 $0.00272 $0.00272
Haiku 4.5 $0.00136 $0.00136

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

Security

Grade A, and why

daiv 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 yesterday.

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 · 65 lines

How it starts

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

AGENTS.md

This file provides guidance to agents when working with code in this repository.

Commands (verified)

make test          # unit tests + coverage; CI gate
make lint-fix       # check + fix lint/format in one step — prefer this over make lint
make lint           # check only (no fixes); CI gate
make lint-typing    # ty, daiv/ only

# Single test / pattern
uv run pytest tests/unit_tests/accounts/test_views.py
uv run pytest tests/unit_tests/ -k "test_notes"

# Integration tests (real LLM calls; need docker/local/app/config.secrets.env: LLM key + GitLab creds)
make integration-tests

# Translations
make makemessages && make compilemessages
  • asyncio_mode = "auto" — no @pytest.mark.asyncio needed.
  • Python 3.14 only (requires-python = ">=3.14,<3.15").
  • Never edit pyproject.toml by hand — use uv add <pkg>==<version> / uv remove <pkg> (deps are ==-pinned; parable is git-pinned, not on PyPI).

Repo map (only what's non-obvious)

  • daiv/automation/ — LangGraph/deepagents agent: tools (agent/tools/), skills (agent/skills/), deferred tools (agent/deferred/), middleware (agent/middlewares/)
  • daiv/codebase/ — GitLab/GitHub clients (clients/), webhooks, .daiv.yml repo config
  • daiv/mcp_server/ + daiv/jobs/ — MCP sub-app (submit_job/get_job_status) + run_job_task (MCP + webhooks)
  • daiv/core/ — sandbox client, Redis, shared constants
  • daiv/daiv/settings/components/ — split settings; common.py has INSTALLED_APPS
  • evals/ — eval suite, not run by make test
  • UI rules live in DESIGN.md (icon system, layout tokens, floating surfaces) and docs/ (mkdocs) — consult before touching templates/CSS.

Invariants / footguns

  • Test importspythonpath = ["daiv", "."]; in tests import from automation.agent.graph import ... (no daiv. prefix).
  • Tools can't mutate runtime.state — return a Command(update={...}, messages=[ToolMessage(...)]); in tests unpack isinstance(result, Command).
  • Auth — email signup disabled (AccountAdapter.is_open_for_signupFalse); AdminRequiredMixin needs user.is_admin; APIKey.objects.create_key(...) is async.
  • run_job_task requires a non-empty UUID thread_id — the Activity row and checkpointer share it; missing breaks chat resume.
  • Bot labels (daiv / daiv-max / daiv-auto) live in daiv/core/constants.py — don't hardcode.
  • Per-repo agent config — agent reads .agents/AGENTS.md, skills from .agents/skills/, subagents from .agents/subagents/; a custom skill shadows a same-named built-in.
  • Repository memoryMemoryEntry rows are append-only truth; RepositoryMemory.content is a render cache from memory/render.py, never model-generated; enforce memory_max_* via prune_to_budget, not by slicing.
  • Sandbox wire schemasdaiv/core/sandbox/schemas.dump.json is canonical; tests/unit_tests/core/sandbox/test_schema_consistency.py fails on drift. Regenerate from the daiv-sandbox repo after changing daiv_sandbox/schemas.py.
  • Skill asset paths resolve to <location>/<skill>/..., not the bash CWD — invoke skill scripts by absolute path.
  • PEP 758except E1, E2: is valid; ruff canonicalises it unparenthesised — don't "fix" it back to parens (pure churn).
  • Django — test settings module is daiv.settings.test; NINJA_SKIP_REGISTRY=true is auto-set in tests.
  • Views by content type — HTML = CBVs in daiv/<app>/views.py; JSON = a django-ninja Router in daiv/<app>/api/views.py (or api/router.py), registered in daiv/daiv/api.py. Filtered lists use django_filters.FilterSet + FilterView(strict=False), not hand-rolled request.GET/Paginator.
  • Dependency upgrade blockers (re-verify first): redis 8.x blocked by redisvl (via langgraph-checkpoint-redis); mcp 2.0 blocked by langchain-mcp-adapters (removes v1 import paths used in mcp_server/ + automation/agent/mcp/). Deps are ==-pinned, so uv lock --upgrade --dry-run shows only transitive updates — check the PyPI JSON API per direct dep.
  • Detailed behaviour lives in module docstrings, not here — e.g. automation/agent/chat_models.py, core/ui_events.py, chat/api/relay.py. Read the relevant docstring before changing that area.

Read the full file on GitHub · 65 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. yesterday First seen · 65 lines · 1,359 tokens per session scan A a5d04e991821

Subscribe to this mod's changes

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