Instructions for AI coding agents working on this project.
This file follows the AGENTS.md open standard and works with Claude Code, Cursor, Copilot, Codex, Jules, Windsurf, and other AI coding tools.
One paragraph describing what this project does, who it's for, and its primary purpose.
# Clone and enter project
git clone <repository-url>
cd <project-name>
# Install dependencies
# [Add your command: npm install, pip install -r requirements.txt, etc.]
# Start development server
# [Add your command: npm run dev, python manage.py runserver, etc.]
# Run tests
# [Add your command: npm test, pytest, go test ./..., etc.]This project uses a documentation-driven workflow with Unified Process phase management.
ALL work must be done within a phase context. No exceptions.
AI agents MUST follow this sequence:
-
Check phase plans exist - Look for
docs/plans/{phase}/roadmap.mdfiles- If NO phase plans exist: STOP and request human initialize Inception phase
- Cannot proceed without phase context
-
Identify current phase - Find which phase has status "In Progress"
- Projects start with Inception → Elaboration → Construction → Transition
- Cannot skip phases
-
Check current iteration - Find iteration with status "In Progress" in current phase roadmap
- All work happens within an iteration
- Cannot work outside iteration context
-
Verify task exists - Confirm task is listed in iteration's "Planned Work" table
- If task missing: Request human add it to roadmap first
- Cannot implement unplanned tasks
-
Only then proceed with reading documentation and implementing
Once phase context is confirmed, read in this order:
docs/how-to-work/phase-planning.md- MANDATORY phase workflow- Current phase
docs/plans/{phase}/roadmap.md- Current iteration tasks - Current phase
docs/plans/{phase}/outputs.md- Required deliverables docs/product/use-cases/README.md- How features are defined- Use case(s) referenced in your task - Feature requirements
docs/how-to-work/agent.md- Collaboration guidelinesdocs/how-to-work/stack.md- Technology choicesdocs/how-to-work/architecture.md- System designdocs/how-to-work/conventions.md- Coding standardsdocs/how-to-work/tdd.md- Test-driven development practicedocs/how-to-work/roadmap.md- High-level project roadmap
Critical Rules:
- Use cases are the source of truth for what features should do
- Phase roadmaps define WHEN work happens
- Phase outputs define WHAT artifacts are required
- All three must align for any implementation work
- Small PRs: Each PR solves exactly one issue
- Atomic commits: Each commit does one thing and passes all tests
- Test-Driven Development: Write tests first (RED), make them pass (GREEN), then refactor
- Refactor first: Preparation commits before feature commits
- Working software: Every commit is deployable
- Simplicity: YAGNI—don't over-engineer
After completing a task, iteration, or sprint:
-
Always ask permission first - Never update roadmaps without explicit human approval
-
Request roadmap update - Ask the human if you should update roadmap files
-
What to update (if permission granted):
For phase roadmaps (
docs/plans/{phase}/roadmap.md):- Update "Actual Progress" section in iteration
- Mark completed tasks in "Planned Work" table
- Document lessons learned
- Update iteration status
For project roadmap (
docs/how-to-work/roadmap.md):- Move completed tasks from "In Progress" or "Up Next" to "Completed"
- Include task ID, description, PR number, and completion date
- For sprints, summarize what was completed
For phase outputs (
docs/plans/{phase}/outputs.md):- Update artifact status (In Progress → Completed)
- Check off acceptance criteria
- Update progress percentages
Roadmap and planning documents are state documents that must stay current, but updates require human oversight.
# Install dependencies
# [Add your command]
# Start development server
# [Add your command]
# Build for production
# [Add your command]# Run all tests
# [Add your command]
# Run tests in watch mode
# [Add your command]
# Run tests with coverage
# [Add your command]
# Run a specific test
# [Add your command]# Lint code
# [Add your command]
# Format code
# [Add your command]
# Type check (if applicable)
# [Add your command]# Run migrations
# [Add your command]
# Rollback migrations
# [Add your command]
# Seed database
# [Add your command]- Prefer clarity over cleverness
- Keep functions small and focused
- Write self-documenting code
- Comment why, not what
Define your conventions. Examples:
- Variables:
camelCase/snake_case - Functions:
camelCase/snake_case - Classes/Types:
PascalCase - Constants:
SCREAMING_SNAKE_CASE
Define import ordering:
- Standard library
- External dependencies
- Internal modules
- Relative imports
feature/issue-{number}-{short-description}
fix/issue-{number}-{short-description}
refactor/{description}
docs/{description}
type(scope): description
Types: feat, fix, refactor, test, docs, chore
When implementing a feature using TDD, follow this order:
refactor: Prepare codebase for changes (all tests GREEN)test: Add failing test for next requirement (RED)feat/fix: Implement code to pass test (GREEN)refactor: Clean up code (still GREEN)- Repeat steps 2-4 for each requirement
docs: Update documentation
Each GREEN commit must pass all tests. RED commits may have failing tests (the new ones only).
- Title:
[TYPE] Brief description (#issue) - Link to the issue being solved
- Include brief description of approach
- Keep PRs small and focused (<400 lines changed)
This project uses Test-Driven Development (TDD) for building features. See docs/how-to-work/tdd.md for detailed guidance.
RED → GREEN → REFACTOR
- RED: Write a failing test
- GREEN: Write simplest code to pass
- REFACTOR: Clean up while keeping tests green
- Business logic and data transformations
- Edge cases and error handling
- Public APIs and interfaces
- Integration points
Use descriptive names:
Good: test_returns_empty_list_when_no_items_match_filter
Bad: test_filter_works
Brief overview of system structure. See docs/how-to-work/architecture.md for details.
src/ # Source code
tests/ # Test files
docs/ # Documentation
how-to-work/ # Workflow docs (read these first)
plans/ # Phase-based iteration planning
inception/ # Inception phase roadmap and outputs
elaboration/ # Elaboration phase roadmap and outputs
construction/ # Construction phase roadmap and outputs
transition/ # Transition phase roadmap and outputs
product/ # Product documentation (use cases, features)
List key patterns used in this codebase.
- Never commit secrets or credentials
- Use environment variables for configuration
- Validate all user input
- Follow principle of least privilege
- Check the relevant use case(s) in
docs/product/use-cases/for feature requirements - Check
docs/how-to-work/decisions.mdfor past architectural decisions - Check
docs/how-to-work/glossary.mdfor domain terminology - Ask for clarification rather than assuming
- Surface trade-offs and propose alternatives
- Workflow Guide - How to work with humans and other agents
- Phase Planning - Unified Process phase and iteration management
- Test-Driven Development - TDD practice and examples
- Project Roadmap - High-level project plan
- Phase Roadmaps - Detailed iteration plans by phase
- Use Cases - Source of truth for product features
- Architecture - System design and patterns
- Tech Stack - Technology choices
- Conventions - Coding standards