Agents System Fixes Summary

Date: 2025-12-16 Status: Complete

Problem

The /agents system had overlapping owned_paths and unowned gaps that made routing ambiguous.

Overlaps Found

AreaAgents ClaimingSeverity
apps/worker-tracker/**6 agentsHigh
packages/db/**5 agentsHigh
apps/web/**4 agentsMedium
packages/shared/**3 agentsMedium
packages/queue/**2 agentsLow

Gaps Found

  • apps/admin/** — no owner
  • apps/storybook/** — no owner
  • packages/config/** — no owner

Solution

Applied 7 fixes to disambiguate ownership using file-level globs instead of directory-level claims.

Fix 1: apps/worker-tracker/** → Subsystem Partitioning

AgentNew owned_paths
tracker-engineerapps/worker-tracker/src/**, tests/**
diff-analystapps/worker-tracker/src/diff/**, src/meaningful-change/**
cron-schedulerapps/worker-tracker/src/cron/**, src/scheduler/**
subscription-managerapps/worker-tracker/src/subscription/**
summarization-safetyapps/worker-tracker/src/summarize/**
queue-sreapps/worker-tracker/src/queue/**

Fix 2: packages/db/** → Schema vs Queries

AgentNew owned_paths
db-migration-operatorpackages/db/src/schema/**, migrations/**, client.ts, types.ts
render-engineerpackages/db/src/queries/render-*.ts
tracker-engineerpackages/db/src/queries/tracker-*.ts, url-*.ts
subscription-managerpackages/db/src/queries/subscription-*.ts
security-reviewerpackages/db/src/rls/**, policies/**

Fix 3: apps/web/** → Feature Partitioning

AgentNew owned_paths
ux-page-card-designerapps/web/src/components/**, app/(dashboard)/**
subscription-managerapps/web/src/app/api/subscriptions/**, lib/subscriptions/**
security-reviewerapps/web/src/app/api/**, middleware.ts, lib/auth/**
use-case-note-writerapps/web/src/content/**, copy/**

Fix 4: Gap Coverage

GapNew Owner
apps/admin/**architect-steward
apps/storybook/**ci-quality-gatekeeper
packages/config/**architect-steward

Fix 5: observability-analyst Scope Alignment

Added paths to match stated mission:

  • apps/**/src/logging/**
  • apps/**/src/metrics/**

Added non_goal:

  • "Modifying business logic to add logging (hand off to domain owner)"

Fix 6: "How to Choose an Agent" Table

Added 18-row lookup table to README.md mapping file patterns to primary agents.

Fix 7: Escalation Protocol

Added 4-step multi-agent handoff process:

  1. Identify primary owner
  2. Sequence secondary agents by dependency
  3. Explicit handoff protocol
  4. Final verification with architect-steward

Files Modified

  • 14 agent files (updated owned_paths)
  • .claude/agents/README.md (added routing guide + escalation protocol)

Verification

All overlaps resolved. Each repo area now has exactly one primary owner. The routing tests from the original assessment (scenarios A–H) can all be cleanly routed.