darc AGENTS.md

A project guide for darc, a grep-like tool that searches coding-agent sessions and shares them through Git. It covers Rust design and checking practices.

In plain words
What is it for?
Use it when modifying, refactoring, formatting, or checking darc and its Rust crates.
Why use it?
It keeps changes consistent with the project's structure, dependency preferences, documentation rules, and required Rust checks.

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

Made for: Codex, OpenCode.

Per session 704 This file is loaded in full into every session.
When invoked 704 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.00704 $0.00704
Opus 5 $0.00352 $0.00352
Sonnet 5 $0.00141 $0.00141
Haiku 4.5 $0.00070 $0.00070

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

Security

Grade A, and why

darc 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 · 38 lines

What it actually says

Darc

  1. Follow idiomatic Rust and standard library-first design.
  2. Prefer less code when behavior stays equally clear and correct.
  3. Avoid new dependencies unless clearly justified. When adding one, enable only the required Cargo features and disable default features unless they are necessary.
  4. DRY: Reuse existing abstractions before adding new ones.
  5. Keep code DRY and cohesive. If the same logic or data shape appears in more than one place, refactor it into a shared function, helper type, or module unless duplication is clearly simpler. Avoid redundant struct fields and duplicated derived state; store canonical data once and compute the rest from it, unless duplication is clearly justified by readability, performance, or API boundaries.
  6. Add a one-line doc comment to every major struct and function.
  7. Run Cargo fmt and clippy after every patch or refactor that touches Rust code.
    • fmt: cargo +nightly fmt
    • clippy: cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all
    • Linux clippy: run scripts/check-linux-clippy.sh when a Rust change touches cfg(...), platform-specific code, or service/background-process code.
  8. Split crates by cohesive capability and clear dependency direction, not by file count or verb names alone.
  9. Prefer leaf capability crates under a thin orchestration/facade crate. Lower-level crates must not depend on higher-level workflow crates.
  10. Only create or keep a crate boundary when it gives one dominant reason to change, a small API surface, and reduced change-coupling.
  11. Extract shared models and helpers downward into lower-level crates instead of duplicating them or making parser/storage code depend on orchestration code.
  12. Do not use real or local data for test fixtures or examples; use synthetic placeholders instead (for example, never copy UUIDs from local session history).
  13. Use conventional commits.
  • Format: <type>(<scope>): <imperative summary>
  • Rules:
    • Use lowercase for type and scope.
    • type must be one of: feat, fix, refactor, perf, docs, test, chore, build, ci.
    • scope must name the primary area affected, such as a crate, module, package, or feature. e.g., cli, parser, storage, api (optional).
    • summary must be a short imperative phrase describing the change itself, not the intention behind it.
    • Do not end the summary with a period.
    • Keep the subject line concise, ideally under 72 characters.
    • One commit should represent one logical change. The message should describe that single change.
  1. When preparing a PR or commit with user-visible behavior, CLI output, install/release behavior, docs users rely on, or compatibility impact, update CHANGELOG.md under Unreleased.
    • Use one concise user-facing bullet.
    • Do not add changelog entries for pure refactors, tests, formatting, or internal-only cleanup.
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 · 38 lines · 704 tokens per session scan A 071a26fbe06b

Subscribe to this mod's changes

darc AGENTS.md is an instructions file published in the GitHub repository 0xjunha/darc (11 stars, last pushed 2mo ago), licensed MIT. It adds 704 tokens to every session, about $0.0035 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.