Skip to content

Commit 64cf7c0

Browse files
bradygasterCopilot
andcommitted
fix: propagate template path fix .squad-templates/ → .squad/templates/ (#190)
Closes #190 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents 9134ce3 + 39b52f0 commit 64cf7c0

25 files changed

Lines changed: 121 additions & 48 deletions

File tree

‎.github/workflows/squad-heartbeat.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Squad Heartbeat (Ralph)
22
# ⚠️ SYNC: This workflow is maintained in 4 locations. Changes must be applied to all:
33
# - templates/workflows/squad-heartbeat.yml (source template)
44
# - packages/squad-cli/templates/workflows/squad-heartbeat.yml (CLI package)
5-
# - .squad-templates/workflows/squad-heartbeat.yml (installed template)
5+
# - .squad/templates/workflows/squad-heartbeat.yml (installed template)
66
# - .github/workflows/squad-heartbeat.yml (active workflow)
77
# Run 'squad upgrade' to sync installed copies from source templates.
88

@@ -35,7 +35,7 @@ jobs:
3535
- name: Check triage script
3636
id: check-script
3737
run: |
38-
if [ -f ".squad-templates/ralph-triage.js" ]; then
38+
if [ -f ".squad/templates/ralph-triage.js" ]; then
3939
echo "has_script=true" >> $GITHUB_OUTPUT
4040
else
4141
echo "has_script=false" >> $GITHUB_OUTPUT
@@ -47,7 +47,7 @@ jobs:
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949
run: |
50-
node .squad-templates/ralph-triage.js \
50+
node .squad/templates/ralph-triage.js \
5151
--squad-dir .squad \
5252
--output triage-results.json
5353

‎.github/workflows/squad-promote.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
echo "=== dev HEAD ===" && git log origin/dev -1 --oneline
3737
echo "=== preview HEAD ===" && git log origin/preview -1 --oneline
3838
echo "=== Files that would be stripped ==="
39-
git diff origin/preview..origin/dev --name-only | grep -E "^(\.(ai-team|squad|ai-team-templates|squad-templates)|team-docs/|docs/proposals/)" || echo "(none)"
39+
git diff origin/preview..origin/dev --name-only | grep -E "^(\.(ai-team|squad|ai-team-templates)|team-docs/|docs/proposals/)" || echo "(none)"
4040
4141
- name: Merge dev → preview (strip forbidden paths)
4242
if: ${{ inputs.dry_run == 'false' }}
@@ -49,7 +49,6 @@ jobs:
4949
.ai-team/ \
5050
.squad/ \
5151
.ai-team-templates/ \
52-
.squad-templates/ \
5352
team-docs/ \
5453
"docs/proposals/" || true
5554
@@ -101,7 +100,7 @@ jobs:
101100
echo "✅ Version $VERSION has CHANGELOG entry"
102101
103102
# Verify no forbidden files on preview
104-
FORBIDDEN=$(git ls-files | grep -E "^(\.(ai-team|squad|ai-team-templates|squad-templates)/|team-docs/|docs/proposals/)" || true)
103+
FORBIDDEN=$(git ls-files | grep -E "^(\.(ai-team|squad|ai-team-templates)/|team-docs/|docs/proposals/)" || true)
105104
if [ -n "$FORBIDDEN" ]; then
106105
echo "::error::Forbidden files found on preview: $FORBIDDEN"
107106
exit 1

‎.squad-templates/ralph-triage.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function parseArgs(argv) {
4848
}
4949

5050
function printUsage() {
51-
console.log('Usage: node .squad-templates/ralph-triage.js --squad-dir .squad --output triage-results.json');
51+
console.log('Usage: node .squad/templates/ralph-triage.js --squad-dir .squad --output triage-results.json');
5252
}
5353

5454
function normalizeEol(content) {

‎.squad-templates/workflows/squad-heartbeat.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Squad Heartbeat (Ralph)
22
# ⚠️ SYNC: This workflow is maintained in 4 locations. Changes must be applied to all:
33
# - templates/workflows/squad-heartbeat.yml (source template)
44
# - packages/squad-cli/templates/workflows/squad-heartbeat.yml (CLI package)
5-
# - .squad-templates/workflows/squad-heartbeat.yml (installed template)
5+
# - .squad/templates/workflows/squad-heartbeat.yml (installed template)
66
# - .github/workflows/squad-heartbeat.yml (active workflow)
77
# Run 'squad upgrade' to sync installed copies from source templates.
88

@@ -35,7 +35,7 @@ jobs:
3535
- name: Check triage script
3636
id: check-script
3737
run: |
38-
if [ -f ".squad-templates/ralph-triage.js" ]; then
38+
if [ -f ".squad/templates/ralph-triage.js" ]; then
3939
echo "has_script=true" >> $GITHUB_OUTPUT
4040
else
4141
echo "has_script=false" >> $GITHUB_OUTPUT
@@ -47,7 +47,7 @@ jobs:
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949
run: |
50-
node .squad-templates/ralph-triage.js \
50+
node .squad/templates/ralph-triage.js \
5151
--squad-dir .squad \
5252
--output triage-results.json
5353

‎.squad-templates/workflows/squad-promote.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
echo "=== dev HEAD ===" && git log origin/dev -1 --oneline
3737
echo "=== preview HEAD ===" && git log origin/preview -1 --oneline
3838
echo "=== Files that would be stripped ==="
39-
git diff origin/preview..origin/dev --name-only | grep -E "^(\.(ai-team|squad|ai-team-templates|squad-templates)|team-docs/|docs/proposals/)" || echo "(none)"
39+
git diff origin/preview..origin/dev --name-only | grep -E "^(\.(ai-team|squad|ai-team-templates)|team-docs/|docs/proposals/)" || echo "(none)"
4040
4141
- name: Merge dev → preview (strip forbidden paths)
4242
if: ${{ inputs.dry_run == 'false' }}
@@ -49,7 +49,6 @@ jobs:
4949
.ai-team/ \
5050
.squad/ \
5151
.ai-team-templates/ \
52-
.squad-templates/ \
5352
team-docs/ \
5453
"docs/proposals/" || true
5554
@@ -101,7 +100,7 @@ jobs:
101100
echo "✅ Version $VERSION has CHANGELOG entry"
102101
103102
# Verify no forbidden files on preview
104-
FORBIDDEN=$(git ls-files | grep -E "^(\.(ai-team|squad|ai-team-templates|squad-templates)/|team-docs/|docs/proposals/)" || true)
103+
FORBIDDEN=$(git ls-files | grep -E "^(\.(ai-team|squad|ai-team-templates)/|team-docs/|docs/proposals/)" || true)
105104
if [ -n "$FORBIDDEN" ]; then
106105
echo "::error::Forbidden files found on preview: $FORBIDDEN"
107106
exit 1

‎.squad/agents/fenster/history.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@
274274
- `process.env.npm_execpath` is set when running via npm/npx but absent for direct `node` invocation — good signal for conditional deprecation notices
275275
- **2026-03-03:** Wired `squad nap` command into CLI entry point (cli-entry.ts lines 245-254). Full implementation existed in nap.ts (runNap, runNapSync, formatNapReport) and REPL already had `/nap` working. CLI was missing the routing — added flag parsing (--deep, --dry-run), squadRoot resolution via resolveSquad(), async runNap() call, formatNapReport() output. Help text and docs/reference/cli.md updated. TypeScript build verified clean.
276276

277+
- **2026-03-07 (Issue #190):** Fixed all `.squad-templates/` → `.squad/templates/` path references across source code (init.ts, migrate-directory.ts, cli-entry.ts), workflow templates (squad-heartbeat.yml, squad-promote.yml), and ralph-triage.js. Updated all 4 copies of each synced file (templates/, packages/squad-cli/templates/, .squad-templates/, .github/workflows/). Promote workflows: removed `.squad-templates/` from forbidden-path patterns since templates now nest under `.squad/` which is already stripped. TypeScript compiles clean.
278+
277279
### 2026-03-03: History Audit & Correction Pattern
278280

279281
**Context:** Brady requested correction of Kobayashi's history.md due to factual errors about version targets (v0.6.0 vs v0.8.17) and missing documentation of PR #582 GitHub merge failure.

‎.squad/agents/hockney/history.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,3 +789,10 @@ All labeled squad:hockney for routing. Each issue includes: what's missing, why
789789
**Result:** 5 corrections made via [CORRECTED] annotations. No conflicting or stale decisions found. History is now clean and ready for future spawns to read cold.
790790

791791
**Overall status:** ✅ CLEAN (with corrections documented inline)
792+
793+
### Template path test fix — Issue #190 (2026-03-04)
794+
**Status:** Complete — test updated in `test/cli/init.test.ts`.
795+
- **What:** Updated test description and path from `.squad-templates/` to `.squad/templates/` to match the corrected install path in `init.ts`.
796+
- **Key finding:** The SDK dist was stale (still had old `.squad-templates` path). Source was already updated but `npm run build` hadn't been run. Rebuilt SDK to verify test passes.
797+
- **Pre-existing failure:** Line 94 gitattributes content mismatch (unrelated, not introduced by this change).
798+
- **Lesson:** On Windows, use `join(root, '.squad', 'templates')` not `join(root, '.squad/templates')` — forward-slash segments in `join` args work on Node but it's better practice to use separate args.

‎.squad/agents/keaton/history.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828

2929
## Learnings
3030

31+
### 2026-03-05T[NOW]: Read-Only PR Assessment — 4 Open PRs (#182, #185, #178, #131)
32+
- **Task:** Brady requested read-only assessment of 4 open PRs (all except #189 which Tamir is still working on). Scope: Summary, Quality, Compatibility with recent main, Recommended action.
33+
- **Context:** Recent main (HEAD: 1dc3bb6) shows major TS replatform: migration from `index.js` (deprecated) to `packages/squad-cli/dist/cli-entry.ts` (new architecture). doctor command already wired, nap command restored, migration docs clarified. This creates compatibility assessment challenge: PRs based on old JS architecture may conflict.
34+
- **Findings:**
35+
- **PR #182 (doctor command, Kaleb Cole, feat/doctor-command → main):** ✅ Code quality solid, but ⚠️ **REDUNDANT IMPLEMENTATION.** Modifies deprecated `index.js`. Recent main commit (15f4120, "fix: wire squad doctor command into CLI entry point") already implemented doctor in new TS architecture (`cli-entry.ts`). Both implementations would coexist, doubling maintenance burden. Recommendation: **MERGE WITH CAUTION** — Brady should verify if legacy `index.js` is still active or if this PR should be ported to TS codebase.
36+
- **PR #185 (template path fix, William Hallatt, squad/fix-template-install-path → dev):** ✅ **MERGE TO DEV.** Solid backport. Fixes 2-year-old path mismatch (templates installed to `.squad-templates/` but referenced as `.squad/templates/`). Targets dev branch (separate from main), doesn't conflict with TS replatform. All 95 tests pass. Low risk, high UX value.
37+
- **PR #178 (GitLab Issues docs, Carlos Sardo, dev → dev):** ✅ **MERGE TO DEV.** Well-written documentation. Mirrors GitHub Issues guide structure. Marks feature as experimental appropriately. No code impact. Commands verified against official glab docs. Only verification: confirm glab CLI docs haven't shifted since PR creation.
38+
- **PR #131 (remote squad mode, Shayne Boyer, feat/remote-squad-mode → main):** 🔴 **REQUEST CHANGES or CLOSE AS SUPERSEDED.** Mature architecture (9 days old, last updated 2026-02-22 before TS replatform). Proposes elegant dual-root resolver (`resolveSquadPaths()`) with 3 modes: remote, repo, hub. File ownership split clearly documented. 102 tests (86 existing + 16 new). BUT: Based on old JS architecture, conflicts with current main (TS replatform). Either (1) Port to `packages/squad-cli/src/` TS codebase (non-trivial but design is sound), or (2) Verify if TS codebase already includes remote mode (may be superseded). Recommendation: Brady asks Shayne, "Does current main already have remote mode in TS CLI, or should we port this PR?"
39+
- **Pattern learned:** Architectural transitions create PR assessment complexity. When a replatform is in-flight, older PRs need "architecture alignment" review before quality review. Check: Is this PR based on the old or new architecture? If old, how deep is the porting work? Does the design survive translation?
40+
- **Verdict:** 1 ready (merge), 2 safe (merge to dev), 1 requires clarification (redirect to Shayne for superseded-status). No blockers for immediate action.
41+
- **Output:** Assessment table + compatibility cascade summary provided to Brady.
42+
3143
### 2026-03-05T[NOW]: Migration Docs Gap Analysis — Issue #188 File Migration Guidance
3244
- **Task:** Brady requested review of migration docs for gaps exposed by issue #188. Users KevinUK and jeremythake hit "Unknown command: doctor" after upgrade (separate CLI bug), but KevinUK also asked critical migration question: "which files/folders exactly are safe to copy to the new .squad?" Verify the docs answer this question; if not, identify what's missing.
3345
- **Approach:** Read migration docs, verify against codebase behavior (init/upgrade logic, TEMPLATE_MANIFEST, migrations), trace user question to docs coverage.

‎.squad/agents/kobayashi/history.md‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,38 @@
77

88
## Learnings
99

10+
### 2026-03-07: Release v0.8.19 — Nap & Doctor Commands, Template Path Fix (COMPLETE)
11+
**Status:** RELEASED. v0.8.19 published to npm registry, GitHub release created, post-release bump committed.
12+
13+
#### Release Summary
14+
- **Version:** 0.8.19 (from 0.8.19-preview.1)
15+
- **Release Date:** 2026-03-07
16+
- **Packages Published:** @bradygaster/squad-sdk@0.8.19, @bradygaster/squad-cli@0.8.19
17+
18+
#### Changes Included
19+
1. **squad nap** command restored — Context hygiene engine wired back into CLI with `--deep` and `--dry-run` flags
20+
2. **squad doctor** command wired — Was implemented but never routed in cli-entry.ts; now accessible as `squad doctor` (fixes #188)
21+
3. **PR #185 merged** — Template install path fix (`.squad-templates/` → `.squad/templates/`) by @williamhallatt
22+
4. **PR #178 merged** — GitLab Issues walkthrough and feature reference docs by @CarlosSardo
23+
5. **Docs improvements** — Features section added to docs nav, broken link fixes, migration guide updated with file-safety table, 19 feature docs synced to main
24+
25+
#### Release Process
26+
1. ✅ Pre-flight: Verified current versions (all at 0.8.19-preview.1)
27+
2. ✅ Version bump: Updated package.json (root, squad-sdk, squad-cli) from 0.8.19-preview.1 → 0.8.19
28+
3. ✅ Build: `npm run build --ignore-scripts` succeeded (verified no 4-part version auto-increment)
29+
4. ✅ Publish SDK: `npm publish --access public --ignore-scripts` from packages/squad-sdk — succeeded
30+
5. ✅ Publish CLI: `npm publish --access public --ignore-scripts` from packages/squad-cli — succeeded (published as @bradygaster/squad-cli@0.8.19, 247.3 kB tarball)
31+
6. ✅ Tag: `git tag v0.8.19` and `git push origin v0.8.19` — succeeded
32+
7. ✅ GitHub Release: Created via `gh release create` with full release notes documenting new commands, bug fixes, and community contributions
33+
8. ✅ Post-release: Bumped versions from 0.8.19 → 0.8.20-preview.1, committed with co-author trailer, pushed to origin/main
34+
9. ✅ Verification: Tag confirmed in git history, release visible at https://github.com/bradygaster/squad/releases/tag/v0.8.19
35+
36+
#### Key Process Notes
37+
- Used `--ignore-scripts` on both npm publish commands to prevent prebuild script auto-incrementing versions to 4-part format (per Semver fix in issue #692)
38+
- npm publish required browser authentication on SDK publish; waited through full auth flow
39+
- CLI publish completed successfully with all 302 files and 1.1 MB unpacked size
40+
- Post-release commit maintained full co-author trailer as per git commit protocol
41+
1042
### 2026-03-06: Docs Sync — Migration Branch to Main (COMPLETE)
1143
**Status:** EXECUTED. Synced 19 unpublished docs from `migration` branch to `main` for GitHub Pages publication.
1244

‎.squad/agents/mcmanus/history.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,30 @@ Documentation quality is solid in structure but suffers from:
342342
Squad's documentation is strong — clear, well-organized, tone-disciplined, and practically useful. The team has invested in real scenarios and honest limitations. Ready for public release **after addressing the 3 critical items above** (LICENSE file, status clarification, broken link). The 🟡 rating reflects completeness (96%+) with a few last-mile polish items that must be done before announcement.
343343

344344

345+
### 2026-03-07: Path references `.squad-templates/` → `.squad/templates/` — docs update (issue #190)
346+
347+
**Status:** Complete. All 9 references across 4 documentation files updated.
348+
349+
**Files edited:**
350+
1. **docs/scenarios/ci-cd-integration.md** (5 references):
351+
- Lines 166–168: Updated 3 workflow template references from `.squad-templates/squad-heartbeat.yml` → `.squad/templates/workflows/squad-heartbeat.yml`, and same for copilot-auto-assign.yml and pr-review-reminder.yml
352+
- Line 173: Updated `cp .squad-templates/*.yml` → `cp .squad/templates/workflows/*.yml`
353+
- Line 218: Updated "Customize `.squad-templates/`" → "Customize `.squad/templates/`"
354+
355+
2. **docs/scenarios/existing-repo.md** (2 references):
356+
- Line 27: Updated `✅ .squad-templates/` → `✅ .squad/templates/`
357+
- Line 165: Updated git add statement from `git add .squad/ .squad-templates/ .github/ .gitattributes` → `git add .squad/ .github/ .gitattributes` (templates now nested inside .squad/)
358+
359+
3. **docs/get-started/first-session.md** (1 reference):
360+
- Line 36: Updated `.squad-templates/ — 11 template files` → `.squad/templates/ — 11 template files`
361+
362+
4. **docs/features/vscode.md** (1 reference):
363+
- Line 30: Updated "Creates `.github/agents/squad.agent.md` and `.squad-templates/`" → "Creates `.github/agents/squad.agent.md` and `.squad/templates/`"
364+
365+
**Rationale:** The template directory was reorganized from `.squad-templates/` (parallel to .squad/) to `.squad/templates/` (nested inside .squad/) to improve organization and simplify git tracking. Workflow templates now live at `.squad/templates/workflows/`. All user-facing documentation needed updating to reflect the new canonical path.
366+
367+
**QA:** Verified all 9 occurrences of `.squad-templates` found and replaced with correct nested path. Docs are now aligned with current project structure.
368+
345369
### 2026-02-23: Personal Squad tutorial — docs/guide/personal-squad.md
346370
**Status:** Complete.
347371
**Changes made:**

0 commit comments

Comments
 (0)