intelligence-add-rulelisted
Install: claude install-skill ainova-systems/intelligence
# Add Rule
## Steps
1. **Determine rule name from domain** (the scope is required):
- **Reuse the existing domain when one fits**: list `<content-dir>/rules/`. If a rule file covers the target area (e.g., `backend.md`, `frontend.md`), extend it. Introduce a new domain only when the scope is materially different from all existing rules.
- **When no existing rule fits**, derive the filename from repo structure:
- Single / root project → use the project codename from `<manifest>` → `project.name` (e.g., `<codename>.md`)
- Backend service / API component → `backend.md`
- Frontend / web / UI component → `frontend.md`
- Infrastructure, IaC, CI/CD, deployment → `devops.md`
- Shared library / common / cross-cutting code → `core.md`
- Test suites (e2e, integration) → `tests.md`
- Always-loaded global context → `context.md`
- If the repo is a monorepo with named components (e.g., `apps/billing`, `services/auth`), prefer the component name as the rule name (`billing.md`, `auth.md`).
- **Rule filenames match the domain used by skills/agents.** If the scope is unclear, ask the user before proceeding.
2. **Check existing rules**: Read `<content-dir>/rules/` to detect overlapping scope — favor extending an existing rule over creating a new one.
3. **Determine scope**:
- If paths glob provided — scoped rule with `paths:` frontmatter
- If no paths — always-loaded rule (no `paths:` in frontmatter)
4. **Analyze codebase**: Read source fi