docguard AGENTS.md

Repository instructions for DocGuard, a JavaScript project that checks whether code changes follow documentation treated as the project’s source of truth.

In plain words
What is it for?
Use them when changing DocGuard, reading its canonical documents, recording intentional differences, or running its diagnosis and verification commands.
Why use it?
They establish a review process that reduces undocumented deviations and requires diagnostic and guard checks before changes are accepted.

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

Made for: Codex, OpenCode.

Per session 1,893 This file is loaded in full into every session.
When invoked 1,893 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01893 $0.01893
Opus 5 $0.00946 $0.00946
Sonnet 5 $0.00379 $0.00379
Haiku 4.5 $0.00189 $0.00189

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

Security

Grade A, and why

docguard AGENTS.md scanned grade A with 1 finding 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Do not re-open resolved work.** See `.jules/sentinel.md` (execSync/command
AGENTS.md · 157 lines

How it starts

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

AI Agent Instructions — DocGuard

This project follows Canonical-Driven Development (CDD). Documentation is the source of truth. Read before coding. DocGuard is an official GitHub Spec Kit community extension.

Workflow

  1. Read docs-canonical/ before suggesting changes
  2. Check existing patterns in the codebase
  3. Run docguard diagnose to see what needs fixing
  4. Confirm your approach before writing code
  5. Implement matching existing code style
  6. Log any deviations in DRIFT-LOG.md with // DRIFT: reason
  7. Verify with docguard guard — all checks must pass

Project Stack

  • Language: JavaScript (ES modules)
  • Runtime: Node.js 18+
  • Dependencies: One — @babel/parser (exact-pinned, optional-load); Node.js built-ins otherwise
  • Testing: node:test (built-in)
  • Distribution: npm + PyPI
  • Version: see package.json (single source of truth — do not hardcode here)

Key Files

File Purpose
docs-canonical/ARCHITECTURE.md System design
docs-canonical/DATA-MODEL.md Database schemas
docs-canonical/SECURITY.md Auth & secrets
docs-canonical/TEST-SPEC.md Test requirements
docs-canonical/ENVIRONMENT.md Environment setup
docs-canonical/REQUIREMENTS.md Spec-kit aligned requirements
CHANGELOG.md Change tracking
DRIFT-LOG.md Documented deviations

Commands

docguard --help is the authoritative list (counts intentionally not hardcoded here — they drift). The surface, grouped as --help shows it:

The Daily 5init (bootstrap + scan), guard (CI gate, all validators), diff (doc↔code gaps; --since <ref> for changed-file impact), sync (refresh code-truth sections), score (CDD maturity 0-100).

Toolsdemo (zero-install tour), diagnose (guard → AI fix prompts), fix (AI fix instructions; --doc <name>), generate (reverse-engineer docs; --plan), explain (explain a validator/warning), memory (what DocGuard remembers), trace (requirements traceability; --reverse), upgrade (migrate config/CLI), watch (live re-guard).

Read the full file on GitHub · 157 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 · 157 lines · 1,893 tokens per session scan A 52fe13e78c3e

Subscribe to this mod's changes

docguard AGENTS.md is an instructions file published in the GitHub repository raccioly/docguard (27 stars, last pushed 4d ago), licensed MIT. It adds 1,893 tokens to every session, about $0.0095 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). 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

Skill_Seekers CLAUDE.md

Instructions for yusufkaraaslan/Skill_Seekers, covering claude.md, project overview, essential commands, required before running tests or cli (src/ layout) and run all tests (never skip - all must pass before commits).

yusufkaraaslan/Skill_Seekers · 5,387 tokens

docs-to-pdf CLAUDE.md

Instructions for jean-humann/docs-to-pdf, covering claude development guide for docs-to-pdf, project overview, development environment setup, using mise (recommended) and install mise (if not already installed).

jean-humann/docs-to-pdf · 4,714 tokens

core copilot-instructions.md

Instructions for asdecided/core: These decisions are already accepted. Do not re-open or contradict them; ask the AsDecided MCP tools (getartifact, searchartifacts) for the full text before proposing a change that touches one.

asdecided/core · 3,534 tokens

backend.ai AGENTS.md

AGENTS.md instructions for lablup/backend.ai, covering ai coding agent guidelines, document structure (agents.md / knowledge.md), writing style, document index and absolute rules (global).

lablup/backend.ai · 1,864 tokens

alcove AGENTS.md

Instructions for epicsagas/alcove, covering claude.md, repository purpose, actual location, structure and karpathy 3-layer architecture.

epicsagas/alcove · 1,840 tokens

slideops CLAUDE.md

Instructions for glukicov/slideops, covering claude.md, what this repository is, commands, the demo deck's citations must still match this repo and the citation mechanism (the core idea).

glukicov/slideops · 1,321 tokens