Detect domain from context and find appropriate team member
Automatically detect domain from branch names or file paths and find the appropriate reviewer.
Extract domain keywords from context:
From branch name:
feature/tables-filter → keywords: ["tables"]
fix/auth-token-expired → keywords: ["auth"]
chore/settings-refactor → keywords: ["settings"]
From changed files:
git diff --name-only origin/develop | head -20
Match file paths against known patterns:
apps/web/features/tables/ → "tables"apps/api/routes/auth/ → "auth"apps/web/features/settings/ → "settings"API-query-database: [Domains-DB-ID]
Filter: Keywords contains [extracted-keyword]
OR Codebase_Paths contains [file-pattern]
Expected result:
API-query-database: Team Capabilities
Filter: Primary_Domain matches [domain-name]
AND Availability = "Available"
Sort: Open_PR_Count ASC
Expected result:
For each candidate:
gh pr list --state open --author [github_handle] --json number | jq length
If no available primary owner:
Present findings as:
## Domain Detection
**Branch:** [branch-name]
**Detected Domain:** [domain-name]
**Topology:** [stream-aligned | platform | enabling | complicated-subsystem]
### Reviewer Assignment
**Primary Owner:** @[github_handle] ([person_name])
**Availability:** [Available | At capacity (X/Y PRs)]
**Assignment:** [Assigned | Fallback to @backup | No available reviewer]
This skill is invoked by:
push-pr.mdc - Phase 1.2 (Find Reviewer)init.mdc - Domain context displayNotion Databases Required: