Team routing

From WellApp-ai/Well · View interactive version

Team routing is an AI agent skill from the GitHub repository WellApp-ai/Well. Detect domain from context and find appropriate team member

How to use this skill

Skill file

Team Routing Skill

Automatically detect domain from branch names or file paths and find the appropriate reviewer.

When to Use

Phases

Phase 1: Extract Keywords

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:

Phase 2: Query Notion Domains Database

API-query-database: [Domains-DB-ID]
Filter: Keywords contains [extracted-keyword]
        OR Codebase_Paths contains [file-pattern]

Expected result:

Phase 3: Query Team Capabilities

API-query-database: Team Capabilities
Filter: Primary_Domain matches [domain-name]
        AND Availability = "Available"
Sort: Open_PR_Count ASC

Expected result:

Phase 4: Check Availability

For each candidate:

  1. Query current open PRs:

```bash

gh pr list --state open --author [github_handle] --json number | jq length

```

  1. Compare against Max_Open_PRs threshold
  2. Skip if at or over capacity

Phase 5: Fallback Logic

If no available primary owner:

  1. Backup Owners: Query Skills table for overlapping skills
  2. Skills Match: Match changed file extensions to skill file patterns
  3. No Match: Return warning: "No available reviewer found for domain [X]"

Output

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]

Integration

This skill is invoked by:

Notion Databases Required:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.