|
| 1 | +--- |
| 2 | +apply: always |
| 3 | +--- |
| 4 | + |
| 5 | +# AIDA Development Workflow |
| 6 | + |
| 7 | +This file contains only: |
| 8 | +- the mandatory workflow, and |
| 9 | +- which MCP tools to use in each phase. |
| 10 | + |
| 11 | +Do not duplicate detailed “how to” guidance here. Always rely on MCP tool descriptions and `get_rules(...)`. |
| 12 | + |
| 13 | +## Editing this file (template-driven) |
| 14 | + |
| 15 | +This file is generated by `aida-mcp init` from templates shipped in the `aida-mcp` package. |
| 16 | + |
| 17 | +- **Do not hand-edit** `.cursor/rules/aida.mdc` or `.claude/CLAUDE.md` in a repo. |
| 18 | +- To change the content, **update the templates in the `aida-mcp` package** and then rerun `aida-mcp init` in the repo. |
| 19 | + |
| 20 | +## Post-init check |
| 21 | + |
| 22 | +- After `aida-mcp init`, if MCP tools like `get_rules` or `validate` are missing, run `aida-mcp doctor`. |
| 23 | + |
| 24 | +## Workflow (mandatory) |
| 25 | + |
| 26 | +### 1) Get rules |
| 27 | + |
| 28 | +- At the start of every task (and again on scope change), call `get_rules(query="...")`. |
| 29 | +- Follow the rules returned by `get_rules` for the task. |
| 30 | + |
| 31 | +### 2) Implement |
| 32 | + |
| 33 | +- Make the requested change(s) following repository rules returned by `get_rules`. |
| 34 | + |
| 35 | +### 3) Validate (blocking) |
| 36 | + |
| 37 | +- If you changed code, you must validate before responding about code changes. |
| 38 | +- Prefer the narrowest validation that is still correct (use `test_filter` when appropriate). |
| 39 | +- Use the MCP validation tool `validate` (prefer this over raw `./gradlew` / `make`). |
| 40 | +- If you changed `.proto` files, do not run proto regeneration manually; `validate` will run it when needed. |
| 41 | +- If unsure what validation to run, call `get_rules(query="validation workflow")` and follow the returned guidance. |
| 42 | + |
| 43 | +### 4) Commit / PR (if asked) |
| 44 | + |
| 45 | +- Ask for the JIRA ticket if unknown. |
| 46 | +- Before committing or creating a PR, call `get_rules(query="git")` and follow the returned guidance. |
| 47 | +- For commit creation, use `aida-mcp commit` (do not use raw `git commit`). |
| 48 | + |
| 49 | +## When to create/update rules |
| 50 | + |
| 51 | +If any of these happen, propose updates to repo rules/config by following `get_rules(query="rules authoring")`: |
| 52 | +- repeated friction (“how do I … in this repo?” keeps coming up) |
| 53 | +- user dissatisfaction (“wrong”, “not what I meant”, “stop doing that”) |
| 54 | +- recurring validation failures of the same kind |
| 55 | +- large/risky cross-cutting changes |
| 56 | + |
| 57 | +Before creating/updating files under `.aida/` (including `.aida/rules/**` and `.aida/*.yaml`), ask the user for explicit permission and proceed only after approval. |
0 commit comments