Skip to content

feat: Per-directory squad context and area-scoped agent dispatch for monorepos #457

Closed as not planned

Description

@tamirdresher

Background

During the AI Squads demo meeting (March 18, 2026), Michael Scott raised an important question about monorepo support:

"If I have a mono-repo, I want to keep each team-specific artifact under that team's specific directory. Is there a way to do this with subagents? It seems like everything is persisted under /squad."

"In the ideal world, the sub squads and team members would be defined under /src//.squads"

This is a real-world enterprise need ΓÇö large repos with multiple teams need area-specific squad configuration.

Proposed Features

Feature 1: Per-area .squad-context.md files (Easy ΓÇö works today as convention)

Add support for optional .squad-context.md files in subdirectories. When an agent works in a subdirectory, it auto-loads the nearest context file for area-specific routing hints, key files, and team context.

/src/area-a/.squad-context.md   ← area-specific context
/src/area-b/.squad-context.md

Ralph/Picard auto-discovers these during triage and loads them as additional context.

Feature 2: Per-area .squads/ inheritance (Medium ΓÇö enterprise-grade)

Allow per-area squad definitions that inherit from the root .squad/:

/.squad/              ← HQ (root squad)
/src/area-a/.squads/  ← area-specific team + routing overrides
  team.md             ← subset of root squad members
  routing.md          ← area-specific routing rules
/src/area-b/.squads/

Area squads inherit decisions, ceremonies, and skills from root but override team composition and routing.

Feature 3: Directory-aware agent dispatch (Full vision ΓÇö roadmap)

Full per-directory .squads/ config that auto-activates when agents enter that directory. Would require changes to squad's agent dispatch logic to detect and scope based on working directory.

Use Cases

  • Enterprise monorepos with 5+ teams sharing one repository
  • Platform teams wanting isolated squad config per service
  • Cross-functional squads where frontend/backend/infra each have domain-specific routing

Origin

Feedback from Michael Scott during AI Squads meeting ΓÇö captured in tamirdresher_microsoft/tamresearch1#1012

Activity

  1. michsco commented on Mar 19, 2026

    @michsco

    @tamirdresher -- this seems reasonable. Is this something you'd be open to us contributing on?

  2. tamirdresher commented on Mar 19, 2026

    @tamirdresher
    CollaboratorAuthor

    @michsco absolutely!

  3. github-actions commented on Mar 20, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #457 — feat: Per-directory squad context and area-scoped agent dispatch for monorepos
    Assigned to: DSKY (TUI Engineer)
    Reason: Issue relates to frontend/UI work

    @copilot evaluation: No strong capability match — routed to squad member.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  4. github-actions commented on Mar 20, 2026

    @github-actions
    Contributor

    📋 Assigned to Flight (Lead)

    Issue: #457 — feat: Per-directory squad context and area-scoped agent dispatch for monorepos

    Flight will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    Flight, work on issue #457

  5. github-actions commented on Mar 20, 2026

    @github-actions
    Contributor

    📋 Assigned to Procedures (Prompt Engineer)

    Issue: #457 — feat: Per-directory squad context and area-scoped agent dispatch for monorepos

    Procedures will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    Procedures, work on issue #457

  6. chrisnielsen-MS commented on Mar 20, 2026

    @chrisnielsen-MS

    "Area squads inherit decisions, ceremonies, and skills from root but override team composition and routing."

    @tamirdresher -- Does this imply that there will not be area-specific decisions? It seems to me that teams working within the same monorepo may not necessarily make all the same decisions. If there is only a single decisions.md, this seems like it could be problematic. Teams should not necessarily inherit all the decisions of their sibling teams in the repo.

  7. tamirdresher commented on Mar 20, 2026

    @tamirdresher
    CollaboratorAuthor

    Hi @chrisnielsen-MS
    Actually I imagined this to be just like upstream inherittence so the area squad will have decisions as well

  8. 10 remaining items

  9. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: Matched routing keyword(s): scope
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  10. github-actions commented on Sep 10, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: Matched routing keyword(s): scope
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  11. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: Matched routing keyword(s): scope
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  12. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: Matched routing keyword(s): scope
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  13. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: Matched routing keyword(s): scope
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  14. github-actions commented on Sep 11, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: Flight
    Reason: Matched routing keyword(s): scope
    Source: routing-rule

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  15. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    🔄 Ralph — Auto-Triage

    Assigned to: architect
    Reason: No module, routing, or role keyword match — routed to Lead/Architect
    Source: lead-fallback

    Ralph auto-triaged this issue using routing rules.
    To reassign, swap the squad:* label.

  16. bradygaster commented on Nov 5, 2026

    @bradygaster
    Collaborator

    Closing as superseded by epic #974 (full monorepo subfolder story) during 2.0 board triage (owner decision). Per-directory context and area-scoped dispatch should be tracked there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    go:needs-researchNeeds investigationpriority:p2Next sprintsquadSquad triage inbox — Lead will assign to a membersquad:architectAssigned to architect (Lead Architect)triagedIssue has been triagedtype:featureNew capabilitywave:3-laterWave 3 — backlog, future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions