Skip to content

fix: getPersonalSquadRoot() returns correct personal-squad path (#590)#620

Merged
bradygaster merged 9 commits intodevfrom
squad/590-fix-personal-squad-root
Mar 26, 2026
Merged

fix: getPersonalSquadRoot() returns correct personal-squad path (#590)#620
bradygaster merged 9 commits intodevfrom
squad/590-fix-personal-squad-root

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Summary

Fixes #590 — \getPersonalSquadRoot()\ was hardcoding .squad\ subdirectory instead of \personal-squad, causing personal squad features to look in the wrong directory.

Changes

  • *\packages/squad-sdk/src/cli/commands/consult.ts* — Fixed \getPersonalSquadRoot()\ to use \personal-squad\ subdirectory
  • *\packages/squad-cli/src/cli/shell/index.ts* — Fixed same bug at line 151
  • 3 test cases added covering the fix

Review History

  1. EECOM implemented initial fix in consult.ts + 2 tests
  2. FIDO reviewed → REJECTED (found same bug in shell/index.ts:151)
  3. EECOM locked out per Reviewer Rejection Protocol
  4. CONTROL picked up revision → fixed shell/index.ts + added 3rd test + full codebase sweep
  5. FIDO re-reviewed → APPROVED (62/62 tests pass, zero remaining bad instances)

Closes #590

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI added 9 commits March 23, 2026 17:23
Merged 12 decision inbox entries into decisions.md. Logged mega-session
covering release recovery, docs fix, 10 PR merges, discussion triage,
and release hardening. Updated agent histories with session learnings.

Deleted inbox files after merge:
- booster-ci-audit.md, booster-ci-cleanup.md
- copilot-directive-2026-03-23T09-56.md, copilot-directive-2026-03-23T10-08.md
- copilot-directive-no-npx.md
- eecom-version-cmd.md
- pao-discussion-triage-2026-03-23.md, pao-npx-purge.md, pao-readme-slim.md
- pao-v090-blog.md
- surgeon-v090-changelog.md, surgeon-v091-retrospective.md

Updated files:
- .squad/decisions.md (12 decision entries merged)
- .squad/identity/now.md (current state updated)
- .squad/log/2026-03-23T22-00-00Z-mega-session-wrapup.md (new)
- .squad/agents/flight/history.md (issue filing patterns, governance directives)
- .squad/agents/eecom/history.md (CLI version subcommand pattern)
- .squad/agents/booster/history.md (CI audit and preflight patterns)
- .squad/agents/surgeon/history.md (release governance rules, retrospective)
- .squad/agents/pao/history.md (discussion triage patterns, Teams MCP urgency)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- v0.9.1 (Current Release): Bug fixes and hardening
  - Shell agent name extraction with multi-pattern fallback
  - Init scaffolding for typed casting files
  - Personal squad global mode support
  - Release CI/docs hardening
  - Doctor command improvements

- v0.9.0 (Major Feature): 6 major features + stability fixes
  - Personal Squad Governance Layer (isolated developer workspaces)
  - Worktree Spawning & Distributed Work (parallel agent orchestration)
  - Machine Capability Discovery (auto-detect tools/models/hardware)
  - Cooperative Rate Limiting (predictive circuit breaker + economy mode)
  - Telemetry & Infrastructure (auto-wire, KEDA, session recovery)
  - Docs, Stability & Distribution (Astro enhancements, npm-only)

- v0.8.2: Renamed from 'Current Release' to historic entry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Flight triaged 14 untriaged GitHub issues, created prioritized work plan
- FIDO reviewed 10 open PRs, identified 3 duplicate/overlap pairs
- Merged 2 decisions from inbox to decisions.md
- Updated Flight and FIDO agent history with team updates
- Orchestration logs: 2026-03-25T15-23-flight.md, 2026-03-25T15-23-fido.md
- Session log: 2026-03-25T15-23-triage-session.md

Work session priority established:
- #610 → PAO (broken link, 5 min fix, unblocks #611)
- #590 → EECOM (getPersonalSquadRoot bug, P0)
- #592, #611 → Flight review
- #588 → Procedures (model list update)

PR deduplication: 10 PRs consolidate to 7
- Merge: #607, #603, #606
- Close as duplicates: #605, #604, #602

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
)

Update all model references in squad.agent.md to match the current
Copilot platform catalog:

- Remove stale models: claude-opus-4.6-fast, gpt-5 (standalone)
- Add new models: claude-sonnet-4.6, claude-opus-4.6-1m, gpt-5.4,
  gpt-5.3-codex, gpt-5.4-mini
- Bump code-writing defaults from claude-sonnet-4.5 to claude-sonnet-4.6
- Bump code specialist from gpt-5.2-codex to gpt-5.3-codex
- Update fallback chains with new models in sensible positions
- Propagate via sync-templates to all 4 derived copies

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
getPersonalSquadRoot() was hardcoded to append '.squad' to the global
squad directory, causing it to resolve to a nonexistent path. All users
running squad consult entered Init Mode and lost their personal agents.

Changed the subdirectory from '.squad' to 'personal-squad' to match
the actual layout used by resolvePersonalSquadDir() and
ensurePersonalSquadDir().

Added two tests verifying the correct resolution path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The shell's runShell() first-run check was looking for '.squad' inside the
global squad directory instead of 'personal-squad', mirroring the bug EECOM
already fixed in consult.ts. Also updated the matching test assertions in
cli-global.test.ts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster
Copy link
Copy Markdown
Owner Author

🔍 Squad Team Review

Reviewed by: Flight (Lead) — Pass 3 of consensus ceremony
Merge Order Position: #1 of 3 (Phase 1)
Team Consensus: 5/5 AGREE

Review Summary

This PR fixes getPersonalSquadRoot() to correctly resolve the personal squad root directory path, resolving a core utility function bug. This is a standalone bug fix with no dependencies on other changes.

Dependencies

None — independent

Merge Plan

This PR is part of the team-agreed merge sequence:

  1. fix: getPersonalSquadRoot() returns correct personal-squad path (#590) #620 — getPersonalSquadRoot() fix ← YOU ARE HERE
  2. fix: add count-based fallback to archiveDecisions() (#626) #627 — archiveDecisions() fallback
  3. fix: rename template copies to prevent CLI instruction merging (#613) #624 — rename templates (infra)

Verdict: APPROVED for merge in sequence

@bradygaster bradygaster merged commit 207adaa into dev Mar 26, 2026
3 checks passed
@bradygaster bradygaster deleted the squad/590-fix-personal-squad-root branch March 26, 2026 06:32
bradygaster pushed a commit that referenced this pull request Mar 26, 2026
Orchestration logs:
- CONTROL: Template rename (3 copies squad.agent.md → .agent.md.template)
- FIDO: QA approval of template rename work
- Coordinator: 3 PRs opened (#624, #620, #619)

Session log: Spawn manifest execution summary
- Template duplication risk eliminated
- Zero stale references found
- Build + test: zero new failures
- All work ready for merge coordination

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster added a commit that referenced this pull request Mar 26, 2026
…#624)

* chore(.squad): session wrap-up — inbox merge, logs, history updates

Merged 12 decision inbox entries into decisions.md. Logged mega-session
covering release recovery, docs fix, 10 PR merges, discussion triage,
and release hardening. Updated agent histories with session learnings.

Deleted inbox files after merge:
- booster-ci-audit.md, booster-ci-cleanup.md
- copilot-directive-2026-03-23T09-56.md, copilot-directive-2026-03-23T10-08.md
- copilot-directive-no-npx.md
- eecom-version-cmd.md
- pao-discussion-triage-2026-03-23.md, pao-npx-purge.md, pao-readme-slim.md
- pao-v090-blog.md
- surgeon-v090-changelog.md, surgeon-v091-retrospective.md

Updated files:
- .squad/decisions.md (12 decision entries merged)
- .squad/identity/now.md (current state updated)
- .squad/log/2026-03-23T22-00-00Z-mega-session-wrapup.md (new)
- .squad/agents/flight/history.md (issue filing patterns, governance directives)
- .squad/agents/eecom/history.md (CLI version subcommand pattern)
- .squad/agents/booster/history.md (CI audit and preflight patterns)
- .squad/agents/surgeon/history.md (release governance rules, retrospective)
- .squad/agents/pao/history.md (discussion triage patterns, Teams MCP urgency)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: add v0.9.0 and v0.9.1 releases to What's New

- v0.9.1 (Current Release): Bug fixes and hardening
  - Shell agent name extraction with multi-pattern fallback
  - Init scaffolding for typed casting files
  - Personal squad global mode support
  - Release CI/docs hardening
  - Doctor command improvements

- v0.9.0 (Major Feature): 6 major features + stability fixes
  - Personal Squad Governance Layer (isolated developer workspaces)
  - Worktree Spawning & Distributed Work (parallel agent orchestration)
  - Machine Capability Discovery (auto-detect tools/models/hardware)
  - Cooperative Rate Limiting (predictive circuit breaker + economy mode)
  - Telemetry & Infrastructure (auto-wire, KEDA, session recovery)
  - Docs, Stability & Distribution (Astro enhancements, npm-only)

- v0.8.2: Renamed from 'Current Release' to historic entry

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): triage session — 14 issues triaged, 10 PRs reviewed

- Flight triaged 14 untriaged GitHub issues, created prioritized work plan
- FIDO reviewed 10 open PRs, identified 3 duplicate/overlap pairs
- Merged 2 decisions from inbox to decisions.md
- Updated Flight and FIDO agent history with team updates
- Orchestration logs: 2026-03-25T15-23-flight.md, 2026-03-25T15-23-fido.md
- Session log: 2026-03-25T15-23-triage-session.md

Work session priority established:
- #610 → PAO (broken link, 5 min fix, unblocks #611)
- #590 → EECOM (getPersonalSquadRoot bug, P0)
- #592, #611 → Flight review
- #588 → Procedures (model list update)

PR deduplication: 10 PRs consolidate to 7
- Merge: #607, #603, #606
- Close as duplicates: #605, #604, #602

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(squad): log work session — triage, fixes, research

Round 1 outcomes:
- PAO: #610 docs link already resolved
- EECOM: #590 personal squad path fix (getPersonalSquadRoot)
- Procedures: #588 model catalog updated to current platform
- Flight: #612 community issue filed on routing regression
- CAPCOM: CLI platform research — identified 8 releases (1.0.4→1.0.11) with 3 high-impact changes
- GNC: Squad codebase research — routing regression caused by v0.9.0 prompt saturation + missing name param

Round 2: Code review & quality gate
- FIDO: Found same bug in shell/index.ts, enforced revision
- CONTROL: Full sweep of #590 fix, awaiting FIDO re-review

Merged decisions:
1. Personal squad path canonicalization (personal-squad/)
2. Model catalog refresh (claude-sonnet-4.6, gpt-5.3-codex defaults)
3. CLI platform analysis (monorepo discovery, idle hiding, hook injection)
4. Squad regression analysis (prompt saturation, workstream replacement, missing name param)

Logs created:
- 6 orchestration logs (one per agent)
- 1 session synthesis log with research synthesis
- 4 agent history updates (team update annotations)

All inbox decision files merged and deleted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Merge: VS Code routing enforcement fix proposal (#613)

- Merged procedures-vscode-routing-fix.md from inbox to decisions.md
- Cleared decision inbox after merge
- Logged session finalization work

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: rename template copies to prevent CLI instruction merging (#613)

Copilot CLI 1.0.11 discovers all *.agent.md files from cwd to git root
and merges them into the coordinator prompt. Squad had 3 template copies
that were being discovered and merged, causing 4x instruction duplication.

Renamed template copies to .agent.md.template so only the active copy
at .github/agents/squad.agent.md is discovered by the CLI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* scribe: Record spawn manifest session — template rename completion

Orchestration logs:
- CONTROL: Template rename (3 copies squad.agent.md → .agent.md.template)
- FIDO: QA approval of template rename work
- Coordinator: 3 PRs opened (#624, #620, #619)

Session log: Spawn manifest execution summary
- Template duplication risk eliminated
- Zero stale references found
- Build + test: zero new failures
- All work ready for merge coordination

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

bug: getPersonalSquadRoot() resolves to wrong directory, causing squad consult to skip personal agents

2 participants