agentleFS
noah-sheldonnoah-sheldon/ai-dev-kit/AGENTS.md

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

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
  1. Very specific:

    Only human developers should appear in git commit authorship, Co-authored-by trailers, or contributor lists

    line 24
  2. Distinctive:

    Do not add AI tool names (Qwen Code, Claude Code, GitHub Copilot, Cursor, or any other AI assistant) to commit messages, AUTHORS files, …

    line 25
  3. Distinctive:

    When assisting with code changes, remain anonymous — do not request or expect attribution

    line 26
  4. Distinctive:

    Run agents in parallel when work is independent:

    line 84
  5. Distinctive:

    Never parallelize when there are dependencies:

    line 89
  6. Distinctive:

    Don't implement before the planner has approved the plan

    line 90
  7. Distinctive:

    Don't merge before code-review and security-review pass

    line 91
  8. Common:

    Use environment variables for API keys and tokens

    line 107
  9. Very specific:

    Never commit .env files

    line 109
  10. Very specific:

    Use ${CLAUDE_PLUGIN_ROOT} or ${CLAUDE_PLUGIN_DATA} in hooks configs

    line 110
  11. Distinctive:

    Do not merge until the security concern is resolved

    line 116
  12. Distinctive:

    Document the decision in an ADR if it involves architectural change

    line 117
  13. Distinctive:

    Prefer immutable data structures where possible

    line 125
  14. Distinctive:

    Avoid mutable global state — pass context explicitly

    line 126
  15. Very specific:

    Use const/readonly by default, let/var only when mutation is needed

    line 127
  16. Distinctive:

    Keep files under 300 lines — extract when larger

    line 134
  17. Distinctive:

    All error paths must be handled — no silent failures

    line 138
  18. Very specific:

    Use language-specific patterns: try/except with specific exceptions (Python), try/catch with typed errors (TypeScript)

    line 140
  19. Distinctive:

    Use Pydantic models (Python) or Zod schemas (TypeScript)

    line 146
  20. Distinctive:

    Test edge cases: null/empty inputs, boundary values, error paths

    line 170
  21. Distinctive:

    No test order dependencies — tests must be independently runnable

    line 171
  22. Very specific:

    Use planner for complex work — break into phases with acceptance criteria

    line 194
  23. Distinctive:

    Write failing tests that define expected behavior

    line 200
  24. Distinctive:

    Verify tests fail before implementation

    line 201
  25. Distinctive:

    Use parallel agents for independent surfaces

    line 205
  26. Distinctive:

    Keep commits small and focused

    line 206
  27. Very specific:

    Run code-reviewer for quality check

    line 209
  28. Very specific:

    Run security-reviewer for security check

    line 210
  29. Distinctive:

    Update relevant docs (README, AGENTS, skill docs)

    line 215
  30. Very specific:

    Run npm test and node scripts/validate-surface.js

    line 216
  31. Distinctive:

    Commit with conventional commit message

    line 217
  32. Distinctive:

    Keep markdown prompts short, direct, and explicit — no fluff or conversational filler.

    line 226
  33. Distinctive:

    Prefer the maintained skill files over duplicated command logic.

    line 227
  34. Distinctive:

    When a skill and command overlap, the skill is the source of truth.

    line 228
  35. Distinctive:

    Create feature branch from main

    line 259
  36. Very specific:

    Run npm test — must pass

    line 261
  37. Distinctive:

    Create PR with description of what and why

    line 263
  38. Distinctive:

    Keep skill files concise — under 500 lines each

    line 317
  39. Very specific:

    Use context-prune skill for large context windows

    line 318
  40. Very specific:

    Use ${CLAUDE_PLUGIN_ROOT} variable for dynamic path resolution

    line 320
  41. Distinctive:

    Use stronger models (opus) for planning and complex reasoning

    line 324
  42. Distinctive:

    Use standard models (sonnet) for routine code review and implementation

    line 325
  43. Distinctive:

    Use lighter models (haiku) for simple lookups and formatting

    line 326
  44. Distinctive:

    All agents specify their preferred model with fallback

    line 327

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

  1. Agent-first — delegate domain work to the right specialist. Don't generalize when a specialist exists.
  2. Test-driven — write tests before implementation when behavior changes. RED → GREEN → REFACTOR.
  3. Security-first — validate inputs, avoid unsafe defaults, never hardcode secrets. Stop and review if a change touches auth, secrets, or external input.
  4. Plan-before-execute — break complex work into phases. Use the planner agent before touching code for multi-file changes.
  5. 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-by trailers, 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

#AgentPurposeWhen to Use
1plannerImplementation planning for complex featuresBreaking down feature requests into phased, mergeable plans with ADRs
2architectSystem design, tradeoffs, component boundariesNew service design, API contracts, data store selection
3tdd-guideTest-driven development specialistWriting tests first for new features or bug fixes
4code-reviewerCode quality and regression preventionReviewing PR diffs for correctness, maintainability, performance
5security-reviewerSecurity audit and threat modelingChanges touching auth, input validation, secrets, external APIs
6ai-judgeRubric-based validationValidating plans, implementations against quality criteria
7build-error-resolverBuild and type error diagnosisFixing TypeScript, Python, lint, and build pipeline errors
8e2e-runnerEnd-to-end testingWriting and running E2E tests for critical user flows
9refactor-cleanerCleanup and modernizationTech debt paydown, dead code removal, dependency updates
10doc-updaterDocumentation syncUpdating docs to match code changes
11docs-lookupDocumentation referenceFinding and citing official docs for frameworks and APIs
12python-reviewerPython-specific code reviewFastAPI, Pandas, SQLAlchemy, Pydantic pattern review
13database-reviewerDatabase and migration reviewSchema design, migration safety, query optimization
14git-agent-coordinatorGit orchestrationBranch creation, PR management, merge coordination
15ml-engineerML/LLMOps specialistRAG pipelines, model training, evals, deployment
16chrome-ext-developerWXT and Chrome extension workExtension scaffolding, manifest config, permissions
17data-engineerETL and data qualityPipeline design, data validation, quality gates
18infra-as-code-specialistIaC and delivery pipelinesTerraform, CI/CD, deployment automation
19observability-telemetryLogs, metrics, traces, dashboardsSetting up monitoring, alerting, and observability
20multi-agent-project-managerMulti-workflow orchestrationManaging concurrent workflows, backlog, priority queue, never stops
21workflow-auditorHealth checks and anomaly detectionStuck workflow detection, quality gate trending, resource leaks
22reddit-researcherReddit sentiment and experience miningReal-world user experiences, production war stories, community consensus
23codebase-analyzerCodebase structure and complexity analysisUnderstanding codebase architecture, dependency mapping
24codebase-learnerCodebase learning specialistRapid onboarding to unfamiliar codebases
25code-quality-analyzerStatic analysis and quality metricsCode quality enforcement, standards checking
26test-debt-analyzerTest coverage and debt trackingIdentifying testing gaps, test debt prioritization
27security-debt-analyzerSecurity vulnerability trackingSecurity debt identification, remediation planning
28performance-debt-analyzerPerformance bottleneck analysisPerformance debt tracking, optimization opportunities
29dependency-debt-analyzerDependency health monitoringOutdated dependencies, upgrade path planning
30architecture-debt-analyzerArchitectural debt detectionDesign flaws, architectural drift detection
31process-debt-analyzerWorkflow inefficiency detectionProcess bottlenecks, workflow optimization
32documentation-debt-analyzerDocumentation gap detectionStale docs, missing documentation identification
33technical-debt-analyzerOverall technical debt assessmentComprehensive 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 planner first
  • Anything touching auth, secrets, or external input → route through security-reviewer
  • New architecture or service → start with architect, then planner
  • Test writing for new behavior → delegate to tdd-guide
  • PR review before merge → run code-reviewer then security-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.example for required variables
  • Never commit .env files
  • Use ${CLAUDE_PLUGIN_ROOT} or ${CLAUDE_PLUGIN_DATA} in hooks configs

Escalation Procedure

  1. Flag the concern in the review comment with BLOCKER label
  2. Route to security-reviewer for detailed analysis
  3. Do not merge until the security concern is resolved
  4. 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/readonly by default, let/var only 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/except with specific exceptions (Python), try/catch with 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) or vitest --coverage (TypeScript)

TDD Workflow

  1. RED — write a failing test that defines the expected behavior
  2. GREEN — implement the minimum code to pass the test
  3. 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 --noEmit

Development Workflow

Phase 1: Plan

  • Use planner for 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-guide for 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-reviewer for quality check
  • Run security-reviewer for 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 test and node 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-install

Commit Messages

Use Conventional Commits:

type(scope): brief description

- Detail what changed and why
- Reference related issues

Types: feat, fix, docs, refactor, test, chore, ci

PR Process

  1. Create feature branch from main
  2. Make focused changes
  3. Run npm test — must pass
  4. Run node scripts/validate-surface.js — must pass
  5. Create PR with description of what and why
  6. Request review from code-reviewer agent
  7. Address feedback
  8. 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 definitions

MCP 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, optional disable-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-prune skill 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 + plugin

Success Metrics

MetricTargetHow to Measure
Test coverage≥80% line, ≥70% branchpytest --cov, vitest --coverage
Plan qualityJudge PASS rate ≥80%ai-judge rubric validation
Review qualityBLOCKER rate <20% of reviewscode-reviewer output analysis
Skill completenessAll skills have SKILL.mdnode scripts/validate-surface.js
Manifest validityAll JSON validnpm test

Execution Guidelines

  • Use parallel agents for independent work — e.g., reviewing multiple files simultaneously
  • Escalate to planner for multi-file or risky changes — don't start coding without a plan
  • Use security-reviewer for auth, secrets, shell usage, or data handling — mandatory for security-sensitive changes
  • Use e2e-runner for critical user flows — test the full pipeline before shipping
  • Use ai-judge before declaring work done — validate against the quality rubric

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.