Skip to content

feat(repos): human-assigned repo roles to disambiguate Jira routing - #43

Merged
nambok merged 1 commit into
mainfrom
feat-repo-roles
Jul 25, 2026
Merged

nambok merged 1 commit into
mainfrom
feat-repo-roles

Conversation

@nambok

@nambok nambok commented Jul 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

TICKET-7881 (a Tailwind tracking-tighter change) mis-routed to fitness-club-daily-schedule instead of web-app because both are Tailwind repos — code evidence tied, and the LLM broke the tie on stale auto-generated descriptions (web-app's omits Tailwind, though it has tailwind.config.ts). Descriptions are unreliable; a human-set signal is the fix (you rejected a per-ticket hard mapping — this is the smart, reusable version).

What this adds

Teams assign each repo a role — web, backend, mobile, cms, infra, data — and the Jira selector treats it as authoritative: classify the ticket's domain → pick the repo whose role matches, overriding descriptions and incidental code matches. Unset repos fall back to the existing code-evidence + LLM path.

  • worker: plan::fetch_team_repo_roles; select_repo injects a "Repo roles (AUTHORITATIVE)" section and reorders its reasoning to prefer role-match.
  • gateway: GET /api/repos now returns role; new POST /api/repos/:owner/:name/role sets/clears it (admin+, validated against the 6 roles, attribute_exists guard so it can't mint a stub).

Verification

  • cargo clippy --workspace --all-targets -D warnings — clean
  • cargo fmt --check — clean
  • Dashboard UI (role dropdown) ships in the coderhelm site repo; CP's roles (web-app=web, backend=backend, …) set on deploy; then I re-run TICKET-7881 to confirm it routes to web-app.

Part of the routing-quality work (follows the code-evidence PR #42).

CPM-7881 (a Tailwind token change) mis-routed because two repos both use
Tailwind — code evidence tied, and the LLM broke the tie on stale
auto-generated descriptions (speedboat's omitted Tailwind though it has a
tailwind.config). Descriptions are unreliable; a human-set signal isn't.

Teams can now assign each repo a ROLE — web, backend, mobile, cms, infra,
data — and the Jira repo-selector treats it as AUTHORITATIVE: it classifies
the ticket's domain and picks the repo whose role matches, overriding
descriptions and incidental code matches. Unset repos fall back to the
code-evidence + LLM path unchanged.

- worker: plan::fetch_team_repo_roles + select_repo feeds roles into the
  prompt as the dominant, override-descriptions signal.
- gateway: GET /api/repos returns `role`; POST /api/repos/:owner/:name/role
  sets/clears it (admin+, validated against the 6 roles, must be a real repo).
@nambok
nambok merged commit eb67de8 into main Jul 25, 2026
2 checks passed
@nambok
nambok deleted the feat-repo-roles branch July 25, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant