github-template-ai-agents
AGENTS.md2 starsChanged 9 days agoMITView on GitHub
This repository uses Full (template maintainer) policy. Downstream product repositories should choose Minimal or Standard and rewrite this file for their stack. Light: understand → change → verify → report. Commit/PR steps apply only when requested. Architectural changes still need a proportionate plan and decision record; they do not require adopting the entire Full telemetry/automation stack. See agents-docs/ADOPTION_PROFILES.md for downstream cleanup and optional packs. Act autonomously within the requested scope, but do not commit, push, open/close PRs or issues, or…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 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 repository63 other files it gives its agents.
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- api-design-firstSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- docs-hookSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- do-web-doc-resolverSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- memory-contextSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- secure-invite-and-accessSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
Check branch/upstream state before work.
- Very specific: line 58
Do not close consumed metadata updates as “no impact.” Details: agents-docs/BEHAVIORAL_DEFAULTS.md.
- Distinctive: line 63
Investigate before editing: Read the affected code, its tests, and the nearest conventions.
- Distinctive: line 70
Verify, then report: Run the narrowest check that would catch the mistake, then the project gate.
- Distinctive: line 73
Stop at irreversible or out-of-scope decisions: Ask before destructive operations, publishing, or changes that cross the task's stated …
- Very specific: line 98
Use static-analysis to triage findings.
- Distinctive: line 120
No hardcoded values: Use relative paths, runtime derivation, env vars, or named constants.
- Very specific: line 122
YAML workflows: Put # yamllint disable-line rule:truthy on the on: line.
- Very specific: line 137
Commit Header: type(scope): subject (max ${MAX_COMMIT_SUBJECT_LENGTH} chars total, lowercase)
- Very specific: line 150
Before an authorized PR, check for existing overlapping work (gh pr list + gh pr diff --name-only).
- Very specific: line 152
Use git-github-workflow for a requested end-to-end shipping task, not an automatic commit/push/merge loop.
- Distinctive: line 163
Inventory: Keep the curated table below aligned with canonical skills when pruning.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
AGENTS.md
<!-- Agent-specific guidance: CLAUDE.md, GEMINI.md, QWEN.md -->Named Constants
# File size limits (lines)
readonly MAX_LINES_PER_SOURCE_FILE=500
readonly MAX_LINES_PER_SKILL_MD=250
readonly MAX_LINES_AGENTS_MD=200
# Retry and polling configuration
readonly DEFAULT_MAX_RETRIES=3
readonly DEFAULT_RETRY_DELAY_SECONDS=5
readonly DEFAULT_POLL_INTERVAL_SECONDS=5
readonly DEFAULT_MAX_POLL_ATTEMPTS=12
readonly DEFAULT_TIMEOUT_SECONDS=1800
# Git/PR configuration
readonly MAX_COMMIT_SUBJECT_LENGTH=150
readonly MAX_PR_TITLE_LENGTH=150
readonly MAX_PR_BODY_LENGTH=1000Process modes
This repository uses Full (template maintainer) policy. Downstream product repositories should choose Minimal or Standard and rewrite this file for their stack.
| Profile | Default mode | Scope |
| Minimal (adopter) | Light | Product instructions, relevant checks, basic CI |
| Standard (adopter) | Light | Minimal + selected skills and agent workflows |
| Full (current repository) | Full | Template orchestration, generators, metrics/DORA, CI-status maintenance |
Light: understand → change → verify → report. Commit/PR steps apply only when
requested. Architectural changes still need a proportionate plan and decision
record; they do not require adopting the entire Full telemetry/automation stack.
See agents-docs/ADOPTION_PROFILES.md for downstream cleanup and optional packs.
Planning & Delegation
- Route: retrieval (
delegate) → planning (goap-agentwhen complex) → implementation (implementer) → verification (test-runner/code-review-assistant). Parallelize independent work, not dependent stages. - Small fixes/docs: use a short plan and relevant checks; no new ADR or tests just for ceremony.
- Architecture, new subsystems, or broad refactors: use
triz-solver, record the decision in aplans/ADR, obtain approval, then decompose with GOAP before implementation. - Full: keep
plans/GOAP_STATE.mdcurrent and capture reusable discoveries withlearn. - Check branch/upstream state before work; do not pull over local changes. Full CI-status is an advisory signal, not a merge gate:
passing/failing/unknown; a required job that did not run is not proof of success. Confirm the actual run. Contract:agents-docs/CI_STATUS.md. - Team/worktree patterns:
agents-docs/AGENT_TEAMS_GUIDE.md.
Behavioral Defaults
Act autonomously within the requested scope, but do not commit, push, open/close
PRs or issues, or merge without user intent. Fix introduced regressions; Full's
pre-existing-issue remediation policy is not a downstream Light default.
For requested GitHub triage, judge impact by adopter value, including consumed
metadata, catalogs, safety, and automation—not just product source changes.
Do not close consumed metadata updates as “no impact.” Details:
agents-docs/BEHAVIORAL_DEFAULTS.md.
Working Agreement
- Investigate before editing. Read the affected code, its tests, and the nearest conventions; confirm the failure or gap with evidence, not assumption.
- Smallest complete change. Fix the requested behavior; do not refactor, rename, or reformat unrelated code in the same change.
- Never weaken a check to get green. Fix the cause of a failing test, lint, or gate; if it is genuinely out of scope, report it instead of deleting or skipping the check.
- Verify, then report. Run the narrowest check that would catch the mistake, then the project gate. State what ran, what was skipped, and what remains unverified; static checks are not behavioral proof.
- Stop at irreversible or out-of-scope decisions. Ask before destructive operations, publishing, or changes that cross the task's stated boundary.
Setup
./scripts/bootstrap.sh # One-command setup: skills + hook + validate + quality gate
./scripts/doctor.sh # Run anytime to diagnose environment issues
./bin/agent-toolkit # Unified CLI: setup, doctor, quality, validate, analyze, fix, eval, docsThese are template commands, not inferred product install/test commands.
Bootstrap configures local git hooks; run it deliberately. Adopters replace CI
and local checks for their language and package manager. Session context uses
./hooks/session-start.sh, configured by docflow.json and tool settings.
Version Management
Here VERSION=0.0.0 is the consumer placeholder; template releases are recorded
in .template/CHANGELOG-TEMPLATE.md. Downstream VERSION is the product's
source of truth. The bump script does not reset it. See
agents-docs/template-versioning/version-flow.md before using release tooling.
Quality Gate (Required Before Commit)
Use static-analysis to triage findings. Full maintainers run:
./scripts/quality_gate.sh # Required before an authorized commit
./scripts/update-all-docs.sh # Full-only generated documentation maintenanceLight adopters retain a product-relevant quality gate, not mandatory template
generators, metrics, or ADR-registration checks. Match verification to risk:
low-impact docs need inventory/link/Markdown checks, not new behavioral tests.
Static validation ≠ behavioral proof. Skill structure/schema/fixture checks
and ./scripts/run-evals.py smoke runs do not invoke a model or prove skill
behavior. Report skipped checks and use representative behavioral evals when
claiming effectiveness. Full maintenance references: agents-docs/SCRIPTS.md.
Guard rails: Temporary files in /tmp only; no debug/report files in the
repository root. Gitleaks runs in CI. Respect task ownership and write boundaries.
Code Style
- Max
${MAX_LINES_PER_SOURCE_FILE}/file;${MAX_LINES_PER_SKILL_MD}/SKILL.md;${MAX_LINES_AGENTS_MD}/AGENTS.md SKILL.mdmust start with frontmatter and include Rationalizations and Red Flags sections.- No hardcoded values: Use relative paths, runtime derivation, env vars, or named constants.
- Shell:
shellcheck(severity=error); Markdown:markdownlint; Diagrams:mermaid - YAML workflows: Put
# yamllint disable-line rule:truthyon theon:line. CI yamllint: line-length 120, indentation 2 spaces.
Repository Structure
agents-docs/: Detailed reference;.agents/skills/: Canonical skillsllms.txt&llms-full.txt: Machine-readable project context for LLMsscripts/: Setup/validation;analysis/&reports/: Generated outputs.claude/: Agent-specific symlinks (seescripts/setup-skills.sh)plans/: ADRs define decisions; progress updates track implementation status.
PR & Commit Instructions
- Apply only to requested shipping work; never treat implementation as permission to publish.
- MANDATORY (ADR-008): PR titles and commit headers follow
type(scope): subject. - PR Title:
type(scope): description(max${MAX_PR_TITLE_LENGTH}chars) - Commit Header:
type(scope): subject(max${MAX_COMMIT_SUBJECT_LENGTH}chars total, lowercase) - PR body: max
${MAX_PR_BODY_LENGTH}chars; squash merges concatenate title/body. Wrap at 100 chars per line. - Branch per feature; One concern per PR; Never commit to
main. - Inspect status/diff/history; stage only owned changes. Do not change git config, bypass hooks, rewrite history, or force-push without explicit authorization.
Commit Type Mapping
| Intent | Type | Scope suggestion |
| Security patch / hardening | fix | security |
| New security feature/control | feat | security |
| Security-related CI/tooling | ci | security |
Before an authorized PR, check for existing overlapping work (gh pr list +
gh pr diff --name-only); prefer extending it over duplicates (ADR-035).
Use git-github-workflow for a requested end-to-end shipping task, not an
automatic commit/push/merge loop. Details: agents-docs/WORKFLOW.md.
Skill Guidance
Authoring or updating a skill? Load
skill-creatorfor authoring andskill-evaluatorfor validation. Verdict must bePASSbefore merging. SeeCONTRIBUTING.md → Creating or Updating Skills. Use.agents/skills/SKILL_TEMPLATE.md.
- Rules: Review
## Rationalizationsand## Red Flagsin skills before use. - Selection: Load relevant skills progressively; optional packs are product choices, not all default-unlinked skills. See
agents-docs/ADOPTION_PROFILES.md. - Inventory: Keep the curated table below aligned with canonical skills when pruning; run all affected generators, not just symlink setup.
Metrics & Post-Task Protocol
Full only: log tasks with ./scripts/log-metric.sh '<json>' to
.agents/metrics/metrics-{agent}.jsonl (not legacy .agents/metrics.jsonl).
Respect scoped ownership; the coordinating agent handles shared post-task
bookkeeping. Schema/DORA: agents-docs/METRICS.md.
Minimal/Standard Light: metrics, DORA, and always-fix maintenance are optional;
do not inherit them or copied telemetry as product policy.
Recovery & Advanced Topics
- Local CI rehearsal with
act:agents-docs/ACT.md+./scripts/run_act_local.sh(never blocks the quality gate; opt-in). - Harness architecture:
agents-docs/HARNESS.md - Context engineering:
agents-docs/CONTEXT.md
Skills
| Category | Skills |
| Agent | agentic-abstention, delegate, implementer, intent-classifier, jules-delegator |
| Analysis | triz-solver (solve + audit modes, TRIZ contradiction analysis) |
| Code Quality | codacy, code-review-assistant, css-render-performance, debugger, iterative-refinement, migration-refactoring, shell-script-quality, static-analysis |
| Compliance | eu-ai-act-compliance |
| Database | database-devops, turso-db |
| DevOps | dependency-upgrades, dora-report |
| Documentation | agents-md, architecture-diagram, readme-best-practices |
| Knowledge | memory-context |
| Knowledge Management | learn |
| Platform | api-design-first, codeberg-api, durable-objects |
| Quality | avoid-ai-writing, dogfood, lifecycle-management, skill-creator, skill-evaluator, voice-profiles |
| Security | local-context-sanitization, privacy-first, secrets-management, security-code-auditor |
| Testing | nested-build-isolation, test-runner, testing-strategy |
| Tool | agent-browser, dist-channel-selection, do-web-doc-resolver, web-search-researcher |
| UI/UX | accessibility-auditor, ui-ux-optimize |
| Workflow | cicd-pipeline, cloudflare-worker-api, docs-hook, document-rendering-and-locators, git-github-workflow, goap-agent, progressive-delivery, pwa-offline-sync, reader-ui-ux, secure-invite-and-access |
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.

