ai-grounded
AGENTS.md4 starsChanged 4 months agoApache-2.0View on GitHub
Cross-tool agent contract for this project. Tool-agnostic; complements CLAUDE.md (Claude Code-specific guidance). AI coding tools that honor the AGENTS.md convention should read this file when operating in this repository. If you are Claude Code, prefer CLAUDE.md - the two are consistent, and CLAUDE.md carries the Claude-specific tool-selection and persistence detail that this file abstracts. A software project using a spec-driven workflow backed by GitHub Spec-Kit (.specify/) and a multi-agent governance framework (.claude/agents/, governance-commons/). The framework is language-, cloud-, and deployment-agnostic:…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- commit-messagesSkill
- securitySkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-constitutionSkill
- speckit-git-commitSkill
- speckit-git-featureSkill
- speckit-git-initializeSkill
- speckit-git-remoteSkill
- speckit-git-validateSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
- speckit-workflow-post-implSkill
- speckit-workflow-post-planSkill
- speckit-workflow-post-specSkill
- speckit-workflow-pre-commitSkill
- terraformSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
If you are Claude Code, prefer CLAUDE.md - the two are consistent, and CLAUDE.md carries the Claude-specific tool-selection and persistence …
- Very specific: line 32
All work respects .specify/memory/constitution.md (the source of truth.
- Distinctive: line 93
Every concern carries a priority assigned by the raising agent per its own domain rubric.
- Distinctive: line 101
P3 (informational): - no enforcement; captured for calibration.
- Very specific: line 105
User signaling (claim): - when the user addresses a concern, the tool writes one of three events to events.jsonl: closure-claimed (cited …
- Very specific: line 129
All invocations and closure activity emit one JSON event per line to specs/NNN-feature/events.jsonl.
- Distinctive: line 191
Read the spec before generating code.
- Very specific: line 195
Write events to events.jsonl for every invocation and every closure-related user action.
- Distinctive: line 198
Run the hook locally before committing.
- Distinctive: line 202
Not a tool prescription, not an exhaustive technical reference (see referenced files), not Claude-specific (CLAUDE.md is that), and not a …
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- SPDX-License-Identifier: Apache-2.0 --><!-- Copyright 2026 Myoung Hong -->AGENTS.md
Cross-tool agent contract for this project. Tool-agnostic; complements
CLAUDE.md (Claude Code-specific guidance). AI coding tools that honor the
AGENTS.md convention should read this file when operating in this repository.
If you are Claude Code, prefer CLAUDE.md - the two are consistent, and
CLAUDE.md carries the Claude-specific tool-selection and persistence detail
that this file abstracts.
Project context
A software project using a spec-driven workflow backed by GitHub Spec-Kit
(.specify/) and a multi-agent governance framework (.claude/agents/,
governance-commons/). The framework is language-, cloud-, and
deployment-agnostic: it applies discipline through specs, plans, test
design, threat models, and post-implementation review, not tool prescriptions.
Framed in the vocabulary of harness engineering, the framework is the
harness around whichever coding model you are: the guides that steer you
before you act (the constitution, the concern and threat catalogs, this file)
and the sensors that check you after (the commit-time gate chain and the
review agents). You supply the reasoning; the harness supplies the
constraints and the evidence that they were applied. See
HARNESS.md at the repository root.
Constitution and principles
All work respects .specify/memory/constitution.md (the source of truth;
articles on workflow, engineering, governance, production, security) and
governance-commons/spec/principles.md (SOLID, DRY-with-judgment, KISS,
YAGNI, rule of three, Law of Demeter, POLA, composition over inheritance,
fail fast). When this file conflicts with the constitution, the constitution
wins.
Workflow expectations
Non-trivial work follows a spec-driven flow with four artifact-boundary checkpoints where routing (the concern-selector's plan, dispatched by the dispatcher) determines which specialists apply:
- Specify - capture intent (
/speckit-specifyor equivalent) - Clarify - resolve ambiguity (
/speckit-clarify) - Checkpoint 1 (post-spec) - the concern-selector proposes the plan, you approve it, the dispatcher dispatches the upstream challengers
- Plan - define approach (
/speckit-plan) - Checkpoint 2 (post-plan) - the dispatcher dispatches test-architect and any plan-time specialists; ADR drafting is a conditional user-triggered step
- Tasks - decompose (
/speckit-tasks); Implement (/speckit-implement) - Checkpoint 3 (post-implementation) - downstream verifiers (code-reviewer, security-reviewer if applicable, closure-auditor last)
- Pre-commit checkpoint - optionally invoke closure-auditor for late changes
- Commit -
verify_loop_closure.pyhook enforces required closure evidence; merge when all loops close
Trivial work (typos, dependency bumps) may skip this per constitution Article I Section 1.2.
Agent roles
Twelve specialized agents: eleven review agents in seven cognitive categories plus a pre-construction discovery agent, each a sharply scoped
lens. Per-agent rubric and scope live in .claude/agents/<agent>.md.
- Upstream challengers (before implementation): staff-engineer (YAGNI, DRY-with-judgment, scope, timing, assumptions, technology selection); threat-modeler (STRIDE, OWASP LLM Top 10, OWASP Agentic ASI Top 10, MITRE ATLAS, compliance); performance-reviewer (CPU, memory, runaway loops, scaling failures, runaway cost); production-readiness (deployment, topology, resilience, prod config).
- Decision formalizers: adr-architect - drafts ADRs from existing artifacts; Context and Alternatives pre-filled; Decision and Rationale marked DRAFT for human review.
- Test design: test-architect - designs tests from the spec's perspective.
- Operational design: operational-architect - SLI/SLO/error budgets, observability plans, runbook scaffolding (for projects with user-facing services and reliability requirements).
- Downstream verifiers (after implementation): code-reviewer (quality, correctness, anti-patterns, smells); security-reviewer (vulnerability scanning, audit-envelope enforcement, compliance config).
- Audit: closure-auditor - verifies pending items have valid closure evidence; semantic "did you do what you said?" judgment; not a re-review.
- Routing: concern-selector - read-only; once per feature at C1,
resolves which catalogs apply and which agents run at each checkpoint within
the profile bounds, into the approved feature-concerns.yaml. The dispatcher
(
tooling/dispatch/dispatch.py, deterministic tooling) organizes that plan into the canonical per-checkpoint waves; the main session executes.
Priority schema (P1/P2/P3)
Every concern carries a priority assigned by the raising agent per its own domain rubric. The framework preserves priorities end to end (the dispatcher, closure-auditor, and hook do not re-rank).
- P1 (must-close) - blocks commit unless closed in code, test, ADR override, or spec amendment. Reserved for break-in-prod or breach-class.
- P2 (should-close) - blocks commit unless closed OR documented as a
deferral (a
deferredevent plus a matching entry indeferrals.md). - P3 (informational) - no enforcement; captured for calibration.
Loop closure (three layers)
- User signaling (claim) - when the user addresses a concern, the tool
writes one of three events to
events.jsonl:closure-claimed(cited evidence: code/ADR/spec amendment/test),deferred(P2 to a future feature, with adeferrals.mdentry), oroverridden(ADR accepts residual). - Semantic verification (closure-auditor) - reads events, concern docs,
ADRs,
deferrals.md, and cited code; for each pending item judges whether the claim addresses the concern; emitsclosure-verifiedorclosure-rejectedlines the main session appends verbatim. Also discovers unsignaled closures by grepping item IDs. Runs at C3 and pre-commit. - Mechanical enforcement (hook) -
verify_loop_closure.py(git pre-commit) requires, for each P1/P2 item, aclosure-claimed,closure-verified, oroverriddenevent not superseded by aclosure-rejected; for P2, a matchingdeferredis also acceptable. P3 not enforced. Blocks with a clear summary on missing/rejected closures.
The hook accepts both closure-claimed (self-attestation) and
closure-verified, which is what makes the framework usable without Claude
Code: a Copilot or Cursor user writes closure-claimed events directly and
the hook still enforces. closure-auditor (semantic verification) is the
Claude-side value-add, not a requirement. If the project later runs through
Claude Code, closure-auditor can retroactively verify or reject earlier claims.
Event log
All invocations and closure activity emit one JSON event per line to
specs/NNN-feature/events.jsonl. A completed event carries ts,
invocation_id (ULID preferred), agent, event, status
(informational | pending-resolution), artifact, linked_artifacts,
references, items_raised ([{id, priority}]), optional
parallel_group_id, and a cost object (provider, model,
input_tokens, output_tokens, estimated_usd from
governance-commons/lib-context/ai-model-pricing.yaml). Closure events
(closure-claimed, closure-verified, closure-rejected, overridden)
share a closure_evidence sub-object (item_id, source_invocation_id,
source_agent, type, location, summary); deferred keeps item_id,
deferred_to, and rationale_doc at root; declined uses event_type:
declined with status: not-applicable and a rationale.
event describes what happened; status the resulting state. The canonical
field-by-field schema and worked JSON for every event type live in
.claude/docs/agent-coordination.md ("Event log"). Use it as the source of
truth; the summary here is for orientation.
Deferrals
A feature directory may carry a deferrals.md (template:
.specify/templates/deferrals-template.md) documenting P2 concerns deferred
to future features. Every deferred event MUST have a matching heading in
deferrals.md keyed by item ID (the hook matches ^#{1,6}\s.*\bITEM-ID\b,
case-sensitive). Each entry records source agent, priority, target feature,
decision-maker, date, the original concern, why deferred, and the plan for
the target feature.
Scope discipline
- NOT-clause pattern: each agent prompt states explicit "you are NOT" bounds (e.g., code-reviewer is NOT a closure auditor).
- 500-line tripwire: agent prompts over 500 lines get reviewed for scope creep.
- Decline mechanism: agents emit
declinedwhen invoked outside scope.
Where things live
- Project code at the repo root (your stack's convention; no imposed code zone).
PROJECT-LOG.md- project-scoped append-only log: cross-cutting agent observations (routed by closure-auditor oncross-cutting: true), cross-feature deferrals, drift patterns.CLAUDE.md- Claude-specific guidance;AGENTS.md- this cross-tool contract.FUTURE.md- framework backlog (not project backlog; that is PROJECT-LOG.md)..specify/memory/constitution.md- constitution;.specify/templates/deferrals-template.md- deferrals template.presets/spec-driven-governance/- vendored spec-kit preset and canonical source for the constitution template, spec template, and the speckit-specify/clarify Write→Edit fix; edits propagate via./scripts/bootstrap.sh..claude/agents/- agent prompts (read-only, advisory);concern-selector.mdresolves the routing plan;closure-auditor.mdverifies and handles consolidation/cross-cutting routing..claude/docs/agent-coordination.md- coordination protocol, invocation patterns, event schemas, catalog-loading and caching convention..claude/hooks/verify_loop_closure.py(+verify-loop-closure.shwrapper) - pre-commit enforcement.governance-commons/- pricing data, catalogs, OSCAL profiles, Cedar policies, playbooks.docs/decisions/- ADRs;specs/NNN-feature-name/- per-feature artifacts,reviews/outputs,events.jsonllog.
Conventions for AI coding tools
- Read the spec before generating code; if none exists, draft one first.
- Respect the constitution's anti-pattern list (Section 2.5); require an ADR override to use a forbidden pattern.
- For non-trivial work, recommend the appropriate workflow checkpoint.
- Write events to
events.jsonlfor every invocation and every closure-related user action; honor the priority schema (do not re-rank). - Block commit on P1 without closure evidence; allow P2 with deferral + rationale.
- Run the hook locally before committing; address blockers.
What this file is not
Not a tool prescription, not an exhaustive technical reference (see referenced files), not Claude-specific (CLAUDE.md is that), and not a fixed contract - it evolves with the framework.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

