# Project Context
<!-- ma-agents-template-version: 1.0 -->
<!-- Generated by ma-agents at install time — this is a living document -->
<!--
  EXPAND THIS FILE over time:
  - After architecture phase: run /bmad-generate-project-context
  - After each sprint:        run /project-context-expansion (post-retrospective companion)
  - Manually:                 add conventions you notice agents getting wrong
-->

## AI Agent Mandatory Rules

### Pre-Task (EVERY task, no exceptions)

1. Read the MANIFEST.yaml for your platform:
<!-- ma-agents:manifest-paths-start -->
  - `.claude/skills/MANIFEST.yaml`
<!-- ma-agents:manifest-paths-end -->
2. Load ALL skills marked `always_load: true` completely before doing anything
3. Select additional skills relevant to the specific task type

### Git Workflow (ALL file-changing tasks)

1. Create a fresh worktree: `git worktree add ../<project>-<branch> -b <branch>`
2. ALL work happens inside that worktree — never in the main working tree
3. Use conventional commits: `feat/fix/chore/docs/refactor`
4. Open a PR to main — never commit directly to main, never auto-merge
5. After human approval and merge: `git worktree remove ../<project>-<branch>`

### Agent Mission Lifecycle

1. **Pre-flight:** Read MANIFEST.yaml, load always_load skills, select task skills
2. **Worktree:** `git worktree add` creates fresh, isolated working surface
3. **Implementation:** Execute task within the worktree
4. **Self-review:** Run `code-review` skill on own output before opening PR
5. **PR:** Conventional commit + PR opened — clear title and description
6. **Human review gate:** Await approval — do NOT auto-merge under any circumstance
7. **Merge + cleanup:** After approval: merge, `git worktree remove`, delete branch
8. **Post-mission:** Update story status to done, append session to AiAudit.md

## Technology Stack
<!-- TODO: Populated after architecture phase via /bmad-generate-project-context -->
<!-- Run: /bmad-generate-project-context to auto-detect your stack -->

## Project-Specific Rules
<!-- TODO: Grows through retrospectives and manual additions -->
<!-- Run: /bmad-retrospective after each sprint to surface new conventions -->
