ai-dev-kit
AGENTS.md13 starsChanged 8 months agoMITView on GitHub
This is a production-ready AI dev kit for Python, TypeScript, web, AI/ML, and infrastructure workflows. Version: 1.1.0 CRITICAL: AI tools, agents, or language models must NEVER be listed as contributors, co-authors, or credited in any form for this repository.
- Reads credentials
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 33,398 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 repositoryOne other file it gives its agents.
- examples/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
44 rules. About 1 is common, 31 are distinctive, and 12 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈31
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 24
Only human developers should appear in git commit authorship, Co-authored-by trailers, or contributor lists
- Distinctive: line 25
Do not add AI tool names (Qwen Code, Claude Code, GitHub Copilot, Cursor, or any other AI assistant) to commit messages, AUTHORS files, …
- Distinctive: line 26
When assisting with code changes, remain anonymous — do not request or expect attribution
- Distinctive: line 84
Run agents in parallel when work is independent:
- Distinctive: line 89
Never parallelize when there are dependencies:
- Distinctive: line 90
Don't implement before the planner has approved the plan
- Distinctive: line 91
Don't merge before code-review and security-review pass
- Common: line 107
Use environment variables for API keys and tokens
- Very specific: line 109
Never commit .env files
- Very specific: line 110
Use ${CLAUDE_PLUGIN_ROOT} or ${CLAUDE_PLUGIN_DATA} in hooks configs
- Distinctive: line 116
Do not merge until the security concern is resolved
- Distinctive: line 117
Document the decision in an ADR if it involves architectural change
- Distinctive: line 125
Prefer immutable data structures where possible
- Distinctive: line 126
Avoid mutable global state — pass context explicitly
- Very specific: line 127
Use const/readonly by default, let/var only when mutation is needed
- Distinctive: line 134
Keep files under 300 lines — extract when larger
- Distinctive: line 138
All error paths must be handled — no silent failures
- Very specific: line 140
Use language-specific patterns: try/except with specific exceptions (Python), try/catch with typed errors (TypeScript)
- Distinctive: line 146
Use Pydantic models (Python) or Zod schemas (TypeScript)
- Distinctive: line 170
Test edge cases: null/empty inputs, boundary values, error paths
- Distinctive: line 171
No test order dependencies — tests must be independently runnable
- Very specific: line 194
Use planner for complex work — break into phases with acceptance criteria
- Distinctive: line 200
Write failing tests that define expected behavior
- Distinctive: line 201
Verify tests fail before implementation
- Distinctive: line 205
Use parallel agents for independent surfaces
- Distinctive: line 206
Keep commits small and focused
- Very specific: line 209
Run code-reviewer for quality check
- Very specific: line 210
Run security-reviewer for security check
- Distinctive: line 215
Update relevant docs (README, AGENTS, skill docs)
- Very specific: line 216
Run npm test and node scripts/validate-surface.js
- Distinctive: line 217
Commit with conventional commit message
- Distinctive: line 226
Keep markdown prompts short, direct, and explicit — no fluff or conversational filler.
- Distinctive: line 227
Prefer the maintained skill files over duplicated command logic.
- Distinctive: line 228
When a skill and command overlap, the skill is the source of truth.
- Distinctive: line 259
Create feature branch from main
- Very specific: line 261
Run npm test — must pass
- Distinctive: line 263
Create PR with description of what and why
- Distinctive: line 317
Keep skill files concise — under 500 lines each
- Very specific: line 318
Use context-prune skill for large context windows
- Very specific: line 320
Use ${CLAUDE_PLUGIN_ROOT} variable for dynamic path resolution
- Distinctive: line 324
Use stronger models (opus) for planning and complex reasoning
- Distinctive: line 325
Use standard models (sonnet) for routine code review and implementation
- Distinctive: line 326
Use lighter models (haiku) for simple lookups and formatting
- Distinctive: line 327
All agents specify their preferred model with fallback
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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
AI Dev Kit — Agent Instructions
This is a production-ready AI dev kit for Python, TypeScript, web, AI/ML, and infrastructure workflows.
Version: 1.1.0
Core Principles
- Agent-first — delegate domain work to the right specialist. Don't generalize when a specialist exists.
- Test-driven — write tests before implementation when behavior changes. RED → GREEN → REFACTOR.
- Security-first — validate inputs, avoid unsafe defaults, never hardcode secrets. Stop and review if a change touches auth, secrets, or external input.
- Plan-before-execute — break complex work into phases. Use the
planneragent before touching code for multi-file changes. - Model fallback — if a requested model is unavailable, use the workspace default model and continue. Never block progress on model unavailability.
Contributor Policy
CRITICAL: AI tools, agents, or language models must NEVER be listed as contributors, co-authors, or credited in any form for this repository.
- Only human developers should appear in git commit authorship,
Co-authored-bytrailers, or contributor lists - Do not add AI tool names (Qwen Code, Claude Code, GitHub Copilot, Cursor, or any other AI assistant) to commit messages, AUTHORS files, contributor sections, or acknowledgments
- When assisting with code changes, remain anonymous — do not request or expect attribution
- This policy is permanent and applies to all current and future AI assistants working on this codebase
Available Agents
| # | Agent | Purpose | When to Use |
| 1 | planner | Implementation planning for complex features | Breaking down feature requests into phased, mergeable plans with ADRs |
| 2 | architect | System design, tradeoffs, component boundaries | New service design, API contracts, data store selection |
| 3 | tdd-guide | Test-driven development specialist | Writing tests first for new features or bug fixes |
| 4 | code-reviewer | Code quality and regression prevention | Reviewing PR diffs for correctness, maintainability, performance |
| 5 | security-reviewer | Security audit and threat modeling | Changes touching auth, input validation, secrets, external APIs |
| 6 | ai-judge | Rubric-based validation | Validating plans, implementations against quality criteria |
| 7 | build-error-resolver | Build and type error diagnosis | Fixing TypeScript, Python, lint, and build pipeline errors |
| 8 | e2e-runner | End-to-end testing | Writing and running E2E tests for critical user flows |
| 9 | refactor-cleaner | Cleanup and modernization | Tech debt paydown, dead code removal, dependency updates |
| 10 | doc-updater | Documentation sync | Updating docs to match code changes |
| 11 | docs-lookup | Documentation reference | Finding and citing official docs for frameworks and APIs |
| 12 | python-reviewer | Python-specific code review | FastAPI, Pandas, SQLAlchemy, Pydantic pattern review |
| 13 | database-reviewer | Database and migration review | Schema design, migration safety, query optimization |
| 14 | git-agent-coordinator | Git orchestration | Branch creation, PR management, merge coordination |
| 15 | ml-engineer | ML/LLMOps specialist | RAG pipelines, model training, evals, deployment |
| 16 | chrome-ext-developer | WXT and Chrome extension work | Extension scaffolding, manifest config, permissions |
| 17 | data-engineer | ETL and data quality | Pipeline design, data validation, quality gates |
| 18 | infra-as-code-specialist | IaC and delivery pipelines | Terraform, CI/CD, deployment automation |
| 19 | observability-telemetry | Logs, metrics, traces, dashboards | Setting up monitoring, alerting, and observability |
| 20 | multi-agent-project-manager | Multi-workflow orchestration | Managing concurrent workflows, backlog, priority queue, never stops |
| 21 | workflow-auditor | Health checks and anomaly detection | Stuck workflow detection, quality gate trending, resource leaks |
| 22 | reddit-researcher | Reddit sentiment and experience mining | Real-world user experiences, production war stories, community consensus |
| 23 | codebase-analyzer | Codebase structure and complexity analysis | Understanding codebase architecture, dependency mapping |
| 24 | codebase-learner | Codebase learning specialist | Rapid onboarding to unfamiliar codebases |
| 25 | code-quality-analyzer | Static analysis and quality metrics | Code quality enforcement, standards checking |
| 26 | test-debt-analyzer | Test coverage and debt tracking | Identifying testing gaps, test debt prioritization |
| 27 | security-debt-analyzer | Security vulnerability tracking | Security debt identification, remediation planning |
| 28 | performance-debt-analyzer | Performance bottleneck analysis | Performance debt tracking, optimization opportunities |
| 29 | dependency-debt-analyzer | Dependency health monitoring | Outdated dependencies, upgrade path planning |
| 30 | architecture-debt-analyzer | Architectural debt detection | Design flaws, architectural drift detection |
| 31 | process-debt-analyzer | Workflow inefficiency detection | Process bottlenecks, workflow optimization |
| 32 | documentation-debt-analyzer | Documentation gap detection | Stale docs, missing documentation identification |
| 33 | technical-debt-analyzer | Overall technical debt assessment | Comprehensive debt aggregation and prioritization |
Agent Orchestration
When to Delegate
- Single-file, single-language change → handle directly, use the relevant language reviewer
- Multi-file or multi-language change → escalate to
plannerfirst - Anything touching auth, secrets, or external input → route through
security-reviewer - New architecture or service → start with
architect, thenplanner - Test writing for new behavior → delegate to
tdd-guide - PR review before merge → run
code-reviewerthensecurity-reviewer
Parallel Execution
Run agents in parallel when work is independent:
- Multiple skill reviews on the same codebase
- Independent feature branches with no shared dependencies
- Documentation updates alongside code changes
Never parallelize when there are dependencies:
- Don't implement before the planner has approved the plan
- Don't merge before code-review and security-review pass
Security Guidelines
Pre-Commit Checklist
- No hardcoded secrets, API keys, or credentials
- User inputs validated at all boundaries
- No shell interpolation from untrusted strings
- Dependencies audited for known CVEs
- No PII in logs or error messages
Secret Management
- Use environment variables for API keys and tokens
- Reference
.env.examplefor required variables - Never commit
.envfiles - Use
${CLAUDE_PLUGIN_ROOT}or${CLAUDE_PLUGIN_DATA}in hooks configs
Escalation Procedure
- Flag the concern in the review comment with BLOCKER label
- Route to
security-reviewerfor detailed analysis - Do not merge until the security concern is resolved
- Document the decision in an ADR if it involves architectural change
Coding Style
Immutability
- Prefer immutable data structures where possible
- Avoid mutable global state — pass context explicitly
- Use
const/readonlyby default,let/varonly when mutation is needed
File Organization
- One concern per file — avoid god files
- Group related functions together
- Consistent import ordering (stdlib → third-party → local)
- Keep files under 300 lines — extract when larger
Error Handling
- All error paths must be handled — no silent failures
- Meaningful error messages with context
- Use language-specific patterns:
try/exceptwith specific exceptions (Python),try/catchwith typed errors (TypeScript) - HTTP endpoints return proper status codes
Input Validation
- Validate at boundaries — API endpoints, CLI arguments, file reads
- Use Pydantic models (Python) or Zod schemas (TypeScript)
- Reject early — fail fast with clear error messages
Testing Requirements
Coverage Thresholds
- Line coverage: ≥80%
- Branch coverage: ≥70%
- Measured by
pytest --cov(Python) orvitest --coverage(TypeScript)
TDD Workflow
- RED — write a failing test that defines the expected behavior
- GREEN — implement the minimum code to pass the test
- REFACTOR — clean up the implementation while keeping tests green
Test Quality
- Semantic assertions over snapshot-only
- Meaningful test names that describe the scenario
- Arrange-Act-Assert structure
- Test edge cases: null/empty inputs, boundary values, error paths
- No test order dependencies — tests must be independently runnable
Failure Troubleshooting
# Run full test suite
npm test
# Run with coverage
pytest --cov=skills --cov=scripts --cov-report=term-missing
# Run specific test file
pytest tests/test_specific.py -v
# TypeScript type check
npx tsc --noEmitDevelopment Workflow
Phase 1: Plan
- Use
plannerfor complex work — break into phases with acceptance criteria - Identify affected surfaces: agents, skills, commands, hooks, rules, application code
- Emit ADR IDs for architectural decisions
Phase 2: Test-First
- Delegate to
tdd-guidefor new behavior - Write failing tests that define expected behavior
- Verify tests fail before implementation
Phase 3: Implement
- Make the smallest change that makes tests pass
- Use parallel agents for independent surfaces
- Keep commits small and focused
Phase 4: Review
- Run
code-reviewerfor quality check - Run
security-reviewerfor security check - Address BLOCKERs before merge
- Suggestions can be addressed in follow-up PRs
Phase 5: Knowledge Capture
- Update relevant docs (README, AGENTS, skill docs)
- Run
npm testandnode scripts/validate-surface.js - Commit with conventional commit message
- Merge with clean PR
Workflow Surface Policy
skills/is the canonical workflow surface. This is where primary workflow definitions live.commands/is a compatibility and migration surface. It provides slash-command shims for harnesses that still expect them.- Keep markdown prompts short, direct, and explicit — no fluff or conversational filler.
- Prefer the maintained skill files over duplicated command logic.
- When a skill and command overlap, the skill is the source of truth.
Git Workflow
Branch Naming
<type>/<short-description>
# Examples:
feature/tdd-workflow-skill
fix/agent-parsing-error
docs/update-readme-installCommit Messages
Use Conventional Commits:
type(scope): brief description
- Detail what changed and why
- Reference related issuesTypes: feat, fix, docs, refactor, test, chore, ci
PR Process
- Create feature branch from
main - Make focused changes
- Run
npm test— must pass - Run
node scripts/validate-surface.js— must pass - Create PR with description of what and why
- Request review from
code-revieweragent - Address feedback
- Squash merge to
main
Architecture Patterns
Plugin Architecture
The kit uses a multi-harness plugin model. Each platform (Claude Code, Codex, OpenCode, Gemini, Copilot CLI, Qwen Code) has its own manifest, all pointing to the same source content:
.claude-plugin/ → Claude Code manifest + marketplace
.codex-plugin/ → Codex manifest
.agents/ → Codex marketplace catalog
.gemini/ → Gemini extension
.opencode/ → OpenCode config + TypeScript plugin
.github-copilot/ → Copilot CLI manifest + marketplace
qwen-extension.json → Qwen Code extension manifest
.qwen/ → Qwen Code marketplace
skills/ → Shared skill definitions (single source of truth)
agents/ → Shared agent definitions
commands/ → Shared command definitionsMCP servers are not bundled — add your own .mcp.json at the project root if needed.
Copilot CLI Agent Naming
Copilot CLI requires agents to use .agent.md extension. The kit maintains symlinks:
planner.agent.md -> planner.md — so both conventions work from the same source.
Skills-First Design
Skills are the primary workflow surface. Each skill is a SKILL.md file with:
- YAML frontmatter:
description, optionaldisable-model-invocation - Body: instructions for the AI agent
- Located in
skills/<name>/SKILL.md
Hooks
Hooks are lifecycle automations triggered by events:
- Defined in
hooks/hooks.json - Auto-loaded by convention in Claude Code v2.1+
- Events:
PostToolUse,SessionStart,PreCommit, etc.
Performance
Context Management
- Keep skill files concise — under 500 lines each
- Use
context-pruneskill for large context windows - Reference files by path rather than embedding full content
- Use
${CLAUDE_PLUGIN_ROOT}variable for dynamic path resolution
Model Selection
- Use stronger models (opus) for planning and complex reasoning
- Use standard models (sonnet) for routine code review and implementation
- Use lighter models (haiku) for simple lookups and formatting
- All agents specify their preferred model with fallback
Project Structure
ai-dev-kit/
├── agents/ 33 agent definitions (.md files)
├── skills/ 59 skill playbooks (<name>/SKILL.md)
├── commands/ 41 command definitions (.md files)
├── hooks/ lifecycle automation hooks
├── rules/ language-specific guidance
│ ├── common.md Universal coding standards
│ ├── python.md Python-specific standards
│ ├── typescript.md TypeScript-specific standards
│ └── web.md Web/frontend standards
├── manifests/ install manifests
├── schemas/ JSON schemas for validation
├── mcp-configs/ MCP server configurations
├── docs/ architecture, design, operations
├── examples/ reusable templates
├── scripts/ install, validate, sync helpers
├── tests/ smoke tests
├── .claude-plugin/ Claude Code plugin + marketplace
├── .codex-plugin/ Codex plugin manifest
├── .agents/ Codex marketplace
├── .gemini/ Gemini extension
└── .opencode/ OpenCode config + pluginSuccess Metrics
| Metric | Target | How to Measure |
| Test coverage | ≥80% line, ≥70% branch | pytest --cov, vitest --coverage |
| Plan quality | Judge PASS rate ≥80% | ai-judge rubric validation |
| Review quality | BLOCKER rate <20% of reviews | code-reviewer output analysis |
| Skill completeness | All skills have SKILL.md | node scripts/validate-surface.js |
| Manifest validity | All JSON valid | npm test |
Execution Guidelines
- Use parallel agents for independent work — e.g., reviewing multiple files simultaneously
- Escalate to
plannerfor multi-file or risky changes — don't start coding without a plan - Use
security-reviewerfor auth, secrets, shell usage, or data handling — mandatory for security-sensitive changes - Use
e2e-runnerfor critical user flows — test the full pipeline before shipping - Use
ai-judgebefore declaring work done — validate against the quality rubric
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.

