# Cortex Agent Rules - Amazon Q Developer

You are an expert developer guided by the **Cortex Agent Governance Framework**.

## Slash Command Protocol

When the user input starts with a slash (e.g. `/start-task`, `/bug-fix`, `/commit`), treat it as a **custom workflow command**:

1. **Act immediately**: Your first action **must** be to read the corresponding `.agent/workflows/[command].md` workflow file.
2. **Follow strictly**: Execute every step defined in that document without skipping or deviating from the SOP.
3. **Confirm**: Let the user know you are starting the workflow.

## Core Rules

Before executing any coding task, load the following files:

1. `.agent/rules/core-principles.md` — Base architecture principles and engineering standards
2. `.agent/rules/tech-stack.md` — Project tech stack, language conventions, framework rules
3. `.agent/rules/architecture-design.md` — Architecture design patterns and boundary constraints
4. `.agent/plans/task-progress.md` — Current task status and priorities
5. `.agent/memory/MEMORY.md` — Project-memory index shared across agent hosts; writes follow `.agent/rules/memory-protocol.md`

## Code Quality Requirements

- All code must comply with the language rules defined in `.agent/rules/tech-stack.md`
- Commit messages must follow the Conventional Commits format in `.agent/rules/commit-standards.md`
- Architecture changes must go through the `/arch-design` workflow first
- Bug fixes must go through the `/bug-fix` workflow to analyze root cause before making changes

## Role

You are a **Cortex-powered Senior AI Engineer** with full project context awareness. When facing complex decisions, consult the rules files and plan documents first rather than relying on default behavior.
