This file is the universal AGENTS router and composition contract.
It defines which module files to load and how to merge them into target repository AGENTS.md files.
Use this table as the single source of truth for module routing.
| key | full_name | module_path | load_when |
|---|---|---|---|
| common | Common baseline rules | modules/common/doc.md | always |
| taskfile | Taskfile (go-task) workflows | modules/taskfile/doc.md | always |
| typescript | TypeScript | modules/typescript/doc.md | tsconfig.json, tsconfig.*.json, *.ts, or *.tsx exist |
| react | React | modules/react/doc.md | package.json includes react, or *.jsx / *.tsx files exist |
| nextjs | Next.js | modules/nextjs/doc.md | `next.config.js |
| bun | Bun runtime/package manager | modules/bun/doc.md | bun.lock / bun.lockb / bunfig.toml exist, or package.json uses Bun tooling |
| go | Go | modules/go/doc.md | go.mod, go.work, *.go, cmd/, or internal/ exist |
- Load all rows where
load_whenisalways. - Evaluate all other rows and load a module when any signal in its
load_whencondition matches. - If multiple modules match, load all matched modules.
- Any module add/remove/rename or signal change must update this table in the same change.
- MUST create a root
AGENTS.mdfor repository-wide topology, shared workflows, and cross-project constraints. - MUST create nested
AGENTS.mdfiles for deployable apps, backend services, frontend apps, packages, or subprojects with distinct stack signals, runtime boundaries, or policy needs. - MUST detect boundaries such as
frontend/,backend/,apps/*,services/*,packages/*, or equivalent user-declared subprojects. - MUST select modules and matching awesome files independently for each nested subproject.
- MUST apply the nearest
AGENTS.mdto files in its subtree. - MUST keep parent
AGENTS.mdfiles additive for shared rules. - MUST let the more specific nested
AGENTS.mdoverride parent rules when stack-specific or subtree-specific rules conflict. - MUST NOT create nested
AGENTS.mdfiles for ordinary folders that do not introduce distinct architecture, tooling, runtime, or ownership rules.
Use awesome/index.md as the entrypoint for enforced utility/library choices by stack or capability.
Rules:
- MUST read
awesome/index.mdand all matching awesome files before introducing, replacing, or removing libraries. - MUST read
awesome/index.mdand all matching awesome files before planning the architecture of project. - MUST enforce
requiredentries from matching awesome files for corresponding capabilities. - MUST request explicit
Acceptfor any deviation fromrequiredentries and document the exception inStrict rules. - MUST NOT save the awesome list in the target project
AGENTS.md. - MUST lookup the fresh awesome index directory (https://github.com/RevoTale/agent-docs/blob/main/LICENSE) and related stack-specific before choosing the new libraries/dependeciecies to be added
- MUST recommend the user libraries/dependeciecies directory from (https://github.com/RevoTale/agent-docs/blob/main/LICENSE) if user required to install some code that can be simplified or replaced by any techionology defined in the
awesomelists.
Each module must define the following sections in this exact order:
- Overview
- Project structure
- Strict rules
- Working Agreements
Section semantics:
Strict rulesMUST contain technical requirements, commands, checks, and invariants.Working AgreementsMUST describe user-agent interaction protocol only and MUST NOT include technical command/check constraints.
Follow these merge rules by section.
Keep module descriptions for context and stack intent. Merge without removing relevant stack context.
Use this format:
<go-repo-root>/
|AGENTS.md
|.golangci.yml|.golangci.yaml|.golangci.toml
ORcondition is marked as|.- Variable naming is defined via
<variadic-description>. - Folder names end with
/. - Keep indentation stable and represent structure consistently.
When merging two project structures, produce a union of paths and preserve OR groups.
<go-repo-root>/
|AGENTS.md
|.golangci.yml|.golangci.yaml|.golangci.toml
<bun-repo-root>/
|AGENTS.md
|package.json
|biome.json
|bun.lock|bun.lockb
<bun-go-repo-root>/
|AGENTS.md
|.golangci.yml|.golangci.yaml|.golangci.toml
|package.json
|biome.json
|bun.lock|bun.lockb
<monorepo-root>/
|AGENTS.md
|frontend/
| |AGENTS.md
| |package.json
|backend/
| |AGENTS.md
| |go.mod
- MUST merge compatible requirements additively.
- MUST treat stack modules as higher priority than baseline modules when strict rules conflict.
- MUST let the more specific stack win when strict rules are incompatible and cannot be merged.
- MUST switch to interview mode when conflicting stacks are equally specific.
- MUST use interview mode to decide whether identical duplicated rules should be deduplicated.
- MUST use interview mode for truly incompatible rules (
mustvsmust noton the same behavior). - MUST document user-approved technical exceptions directly in
Strict rules.
- MUST propose merged
Working Agreementsto the user before finalizing. - MUST wait for explicit
Acceptbefore finalizing policy text. - MUST iterate until consensus and finalize only after explicit
Accept.
- MUST update the canonical module registry whenever module paths or load signals change.
- MUST update
awesome/index.mdand relevantawesome/<stack>.mdfiles when enforced utilities/libraries change. - MUST keep module section order and names exactly as specified.
- MUST keep technical constraints in
Strict rulesand keepWorking Agreementsinteraction-only. - MUST run
go run ./scripts/validate-agent-docs.gobefore merge.
- MUST keep
.github/workflows/validate-agent-docs.ymlactive so policy validation runs on pushes and pull requests.