Skip to content

{{subproject-name}}

AI Agent Instructions - Subproject context. Copy to the subproject root (e.g., packages/{{name}}/AGENTS.md) and commit to version control.

Overview

{{One sentence describing what this package/service does}}

Type: {{package | service | lambda | worker | library | app}}

Stack

Tech Version
Language {{e.g., TypeScript 5.3, Python 3.12, Go 1.22}}
Framework {{e.g., Express 4.x, FastAPI 0.100, none}}
Runtime {{e.g., Node.js 20, Python 3.12}}
{{other relevant tech}} {{version}}

Discovery -> Activation -> Execution

Use this flow for context loading:

  1. Discovery (always loaded)
  2. This file: local stack, structure, dependencies, boundaries
  3. Activation (load only if task needs it)
  4. Local @docs/ references and relevant shared docs
  5. Execution (load before running commands)
  6. Command catalog in local docs (for example @docs/scripts.md) if this subproject maintains one

Commands

  • Package manager: {{package-manager}}
{{package-manager}} dev       # Start dev server
{{package-manager}} test      # Run tests
{{package-manager}} build     # Build
{{package-manager}} lint      # Lint
  • If this subproject maintains a detailed command catalog, reference it here (for example local @docs/scripts.md)
  • Workspace-level command docs may also exist in root docs
  • Do not invent commands not present in project config/docs

Task Mode Routing

Task Mode Load by Default Command Docs
Research / Design / Plan This file + relevant domain docs Skip unless user asks
Implement / Fix This file + relevant domain docs Load local command docs first (if they exist)
Verify / Release This file + test/build/release docs Load local command docs (if they exist)

Structure

{{subproject-name}}/
├── {{source-dir}}/
│   ├── {{area-1}}/    # {{description}}
│   ├── {{area-2}}/    # {{description}}
│   └── {{area-3}}/    # {{description}}
├── {{test-dir}}/      # Test files
└── {{config-file}}    # {{e.g., package.json, pyproject.toml, Cargo.toml}}

Key Areas:

Area Path Contains
{{area-name}} {{path}} {{what this area contains}}
{{area-name}} {{path}} {{what this area contains}}
{{area-name}} {{path}} {{what this area contains}}

Dependencies

Internal (from this monorepo)

  • {{scope/package-1}} - {{what it provides}}
  • {{scope/package-2}} - {{what it provides}}

Key External

  • {{dependency-1}} - {{what it's used for}}
  • {{dependency-2}} - {{what it's used for}}

Context Loading

Task Read
{{task description}} @docs/{{doc-name}}.md
{{task description}} @docs/{{doc-name}}.md
Subproject commands / verification scripts @docs/scripts.md (if this doc exists)

Integration Points

Connects To How
{{other subproject or service}} {{REST API / gRPC / events / shared types}}
{{external dependency}} {{client library / direct connection}}

Boundaries

Always

  • If command docs exist, use verified commands from those docs when executing tasks
  • Use shared types from {{scope/types-package}}
  • Follow patterns in existing code

Ask First

  • Adding external dependencies
  • Changing API contracts
  • {{project-specific ask-first rule}}
  • Running destructive commands (reset/drop/force operations)

Never

  • Import from other subprojects without declaring dependency
  • Hardcode environment values (use config)
  • Modify shared packages without checking dependents

Deployment

Environment: {{e.g., container, serverless, static, library (not deployed)}} Trigger: {{e.g., HTTP, queue, cron, event, npm publish}} Command Source: {{@docs/scripts.md if this doc exists}}