Skip to content

feat(prompt): slim squad.agent.md by extracting 3 sections to satellite skills (#1308 phase 1)#1311

Open
tamirdresher wants to merge 5 commits into
bradygaster:devfrom
tamirdresher:feat/1308-slim-squad-agent-md
Open

feat(prompt): slim squad.agent.md by extracting 3 sections to satellite skills (#1308 phase 1)#1311
tamirdresher wants to merge 5 commits into
bradygaster:devfrom
tamirdresher:feat/1308-slim-squad-agent-md

Conversation

@tamirdresher

Copy link
Copy Markdown
Collaborator

Phase 1 of #1308 — first batch of extractions

squad.agent.md is loaded as the agent prompt at every Copilot session start. v0.10.0-insider.1 ships it at 81 KB / 1,137 lines and was steadily growing — the v0.10 stabilisation pass alone added +10.6 KB. Every byte is paid at every session.

This PR extracts three low-cross-reference, high-byte sections to satellite skills the coordinator loads on demand via the skill tool. Same pattern that worked for cross-squad-communication (#1295).

Extracted to satellite skill Bytes saved in main file
coordinator-init-mode (Init Mode Phase 1 + Phase 2) 5.4 KB
coordinator-source-of-truth (Source of Truth Hierarchy table) 4.4 KB
coordinator-response-mode (Response Mode Selection + Lightweight Spawn Template) 3.9 KB

Result

  • squad.agent.md: 81 KB → 70 KB (-13.9 %, -140 lines)
  • 19 skills installed at .github/skills/ (was 16, +3 new coordinator-*)
  • Behaviour unchanged — each removed section is replaced with a stub naming the trigger condition and instructing the coordinator to skill(coordinator-X) before acting

Sections that stay in squad.agent.md (intentional)

These are loaded on every prompt and/or are load-bearing for first-touch behaviour:

Wired changes

  • New: .squad/skills/coordinator-{source-of-truth,response-mode,init-mode}/SKILL.md (canonical sources)
  • Mirrored to packages/squad-cli/templates/skills/ and packages/squad-sdk/templates/skills/
  • MANIFEST_SKILL_NAMES grows by 3 entries (16 → 19)
  • TEMPLATE_MANIFEST grows by 3 entries with ../.github/skills/ destinations (matching the post-fix(skills): install bundled skills to .github/skills/ (closes #1126) #1304 install location)
  • .squad-templates/squad.agent.md replaces each extracted section with a stub
  • 4 mirrored squad.agent.md copies re-synced via scripts/sync-templates.mjs --sync

Tests

  • 287/287 tests pass.
  • The existing regression test should install every manifest-curated skill (regression: bradygaster/squad#1289, #1264) already imports MANIFEST_SKILL_NAMES and iterates it, so it automatically asserts the 3 new skills install — no manual edits needed.
  • Smoke test on built CLI: fresh squad init produces 19 skills at .github/skills/ and squad.agent.md is 70 KB.

Composability

Disjoint from all other open PRs (#1225 W6 preset install URL). Pure file moves + a few line replacements + 3 manifest entries.

Follow-ups (separate PRs)

The remaining high-bloat sections in squad.agent.md are stickier and need careful design:

  • Routing (9.2 KB) — needed on every prompt; not lazy-loadable. Slim by extracting action-cell verbiage to satellite skills (the trigger table stays, the action prose moves).
  • Team Mode (5.5 KB) — contains the state-backend handshake which MUST stay. Extract the worktree-awareness / casting-migration sub-sections.
  • How to Spawn an Agent (3.2 KB) — extract the role-emoji catalog.

Target after 2-3 follow-ups: ~45 KB coordinator file (45 % total reduction from today's 81 KB).

Closes #1308 (phase 1).

Copilot AI review requested due to automatic review settings June 13, 2026 18:40
@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 28188c0

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 3 item(s) to address before review

Status Check Details
Single commit 5 commits — consider squashing before review
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present Changeset file found
Scope clean ⚠️ PR includes 3 .squad/ file(s) — ensure these are intentional
No merge conflicts No merge conflicts
Copilot threads resolved 0 active Copilot thread(s) resolved (1 outdated skipped)
CI passing 7 check(s) still running

Files Changed (22 files, +1053 −841)

File +/−
.changeset/slim-squad-agent-md-phase1.md +90 −0
.github/agents/squad.agent.md +53 −162
.squad-templates/squad.agent.md +20 −160
.squad/skills/coordinator-init-mode/SKILL.md +83 −0
.squad/skills/coordinator-response-mode/SKILL.md +97 −0
.squad/skills/coordinator-source-of-truth/SKILL.md +45 −0
docs/src/content/docs/features/skill-security-scanner.md +2 −2
index.cjs +2 −1
packages/squad-cli/src/cli/core/templates.ts +18 −0
packages/squad-cli/templates/skills/coordinator-init-mode/SKILL.md +83 −0
packages/squad-cli/templates/skills/coordinator-response-mode/SKILL.md +97 −0
packages/squad-cli/templates/skills/coordinator-source-of-truth/SKILL.md +45 −0
packages/squad-cli/templates/squad.agent.md.template +20 −160
packages/squad-sdk/src/config/init.ts +3 −0
packages/squad-sdk/templates/skills/coordinator-init-mode/SKILL.md +83 −0
packages/squad-sdk/templates/skills/coordinator-response-mode/SKILL.md +97 −0
packages/squad-sdk/templates/skills/coordinator-source-of-truth/SKILL.md +45 −0
packages/squad-sdk/templates/squad.agent.md.template +20 −160
templates/squad.agent.md.template +20 −160
test/init-flow.test.cjs +57 −13
test/squad-agent-roster.test.ts +65 −15
test/version-stamping.test.cjs +8 −8

Total: +1053 −841


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #1311

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 22
Files added 10
Files modified 12
Files deleted 0
Modules touched 8

🎯 Risk Factors

  • 22 files changed (21-50 → HIGH)
  • 8 modules touched (5-8 → HIGH)

📦 Modules Affected

ci-workflows (1 file)
  • .github/agents/squad.agent.md
docs (1 file)
  • docs/src/content/docs/features/skill-security-scanner.md
root (3 files)
  • .changeset/slim-squad-agent-md-phase1.md
  • index.cjs
  • templates/squad.agent.md.template
squad-cli (5 files)
  • packages/squad-cli/src/cli/core/templates.ts
  • packages/squad-cli/templates/skills/coordinator-init-mode/SKILL.md
  • packages/squad-cli/templates/skills/coordinator-response-mode/SKILL.md
  • packages/squad-cli/templates/skills/coordinator-source-of-truth/SKILL.md
  • packages/squad-cli/templates/squad.agent.md.template
squad-sdk (5 files)
  • packages/squad-sdk/src/config/init.ts
  • packages/squad-sdk/templates/skills/coordinator-init-mode/SKILL.md
  • packages/squad-sdk/templates/skills/coordinator-response-mode/SKILL.md
  • packages/squad-sdk/templates/skills/coordinator-source-of-truth/SKILL.md
  • packages/squad-sdk/templates/squad.agent.md.template
squad-state (3 files)
  • .squad/skills/coordinator-init-mode/SKILL.md
  • .squad/skills/coordinator-response-mode/SKILL.md
  • .squad/skills/coordinator-source-of-truth/SKILL.md
templates (1 file)
  • .squad-templates/squad.agent.md
tests (3 files)
  • test/init-flow.test.cjs
  • test/squad-agent-roster.test.ts
  • test/version-stamping.test.cjs

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

⚠️ Architectural review: 2 warning(s).

Severity Category Finding Files
🟡 warning bootstrap-area 1 file(s) in the bootstrap area (packages/squad-cli/src/cli/core/) were modified. These files must maintain zero external dependencies. Review carefully. packages/squad-cli/src/cli/core/templates.ts
🟡 warning sweeping-refactor This PR touches 22 files (22 modified/added, 0 deleted). Large PRs are harder to review — consider splitting if possible.

Automated architectural review — informational only.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces the always-loaded coordinator prompt size by extracting three large, low-cross-reference sections from squad.agent.md into on-demand “satellite” skills, leaving short trigger stubs behind so coordinator behavior stays the same while cutting cold-start prompt bytes.

Changes:

  • Replaced the full Init Mode, Response Mode Selection, and Source of Truth Hierarchy sections in squad.agent.md with short stubs that instruct the coordinator to skill(coordinator-*) before acting.
  • Added three new bundled skills (coordinator-init-mode, coordinator-response-mode, coordinator-source-of-truth) to the CLI/SDK templates and wired them into the install manifests.
  • Updated MANIFEST_SKILL_NAMES and TEMPLATE_MANIFEST so squad init/upgrade installs the three new skills into .github/skills/.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
templates/squad.agent.md.template Replaces the three extracted sections with stubs that instruct loading the new coordinator-* skills.
packages/squad-cli/templates/squad.agent.md.template Mirrors the stub replacements for the CLI template copy.
packages/squad-sdk/templates/squad.agent.md.template Mirrors the stub replacements for the SDK template copy.
.squad-templates/squad.agent.md Canonical template updated with stubs; drives sync to other prompt mirrors.
.github/agents/squad.agent.md Synced agent prompt copy updated with the same stubs (and remains aligned with the template).
packages/squad-cli/templates/skills/coordinator-init-mode/SKILL.md New skill containing the full two-phase Init Mode protocol.
packages/squad-cli/templates/skills/coordinator-response-mode/SKILL.md New skill containing the full response-mode decision table + lightweight spawn template.
packages/squad-cli/templates/skills/coordinator-source-of-truth/SKILL.md New skill containing the full file-by-file “source of truth” table and rules.
packages/squad-sdk/templates/skills/coordinator-init-mode/SKILL.md SDK mirror of the coordinator-init-mode skill.
packages/squad-sdk/templates/skills/coordinator-response-mode/SKILL.md SDK mirror of the coordinator-response-mode skill.
packages/squad-sdk/templates/skills/coordinator-source-of-truth/SKILL.md SDK mirror of the coordinator-source-of-truth skill.
packages/squad-sdk/src/config/init.ts Adds the three new skills to MANIFEST_SKILL_NAMES.
packages/squad-cli/src/cli/core/templates.ts Adds three new entries to TEMPLATE_MANIFEST to install the skills to .github/skills/....
.changeset/slim-squad-agent-md-phase1.md Changeset documenting the prompt slimming and wiring changes.

Comment on lines +66 to +67
- New: `.squad/skills/coordinator-{source-of-truth,response-mode,init-mode}/SKILL.md` (canonical sources)
- Mirrored to `packages/squad-cli/templates/skills/` and `packages/squad-sdk/templates/skills/`

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — addressed in commit 3a1ca20f.

The 3 canonical source dirs existed in my worktree but had never been git add-ed because .squad/ is gitignored in this repo (specific subpaths under it are exception-tracked, same as every other .squad/skills/* entry). The template mirrors at packages/squad-{cli,sdk}/templates/skills/coordinator-*/ shipped fine, but the canonical sources at .squad/skills/coordinator-*/SKILL.md weren't in the tree — which would have:

  1. Made the changeset claim untrue on dev.
  2. Broken scripts/sync-skill-templates.mjs on a fresh checkout — sync would silently drop the 3 new skills on next prebuild.

Force-added the 3 dirs (git add -f because of the .squad/ ignore rule). Verified node scripts/sync-skill-templates.mjs now lists coordinator-* among the 26 discovered skills and re-produces both template mirrors byte-identical.

tamirdresher added a commit to tamirdresher/squad that referenced this pull request Jun 13, 2026
…-init-mode skill

CI failure on bradygaster#1311: test/squad-agent-roster.test.ts asserted the
'Determine team size' line is in squad.agent.md.template, but after
bradygaster#1308 phase 1 that line moved into the coordinator-init-mode skill.

Restructured the test into two describe blocks:

  1. squad.agent.md.template — must still keep an Init Mode STUB that
     names the coordinator-init-mode satellite skill AND preserves the
     load-bearing eager-execution exception callout. This makes sure
     future edits can't accidentally drop the satellite reference.

  2. coordinator-init-mode/SKILL.md (3 mirrors) — must contain the
     'Determine team size' line naming all four built-ins, AND must
     mark each of Scribe/Ralph/Rai/Fact Checker as 'exempt from
     casting'. The regression coverage from bradygaster#1299 follows the content.

22/22 tests pass.

Also addressed the changeset review comment: clarified that
.squad/skills/coordinator-*/SKILL.md are the canonical source files
in the squad repo (where every other bundled skill source lives),
and they're copied to .github/skills/ on install/upgrade per bradygaster#1304.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher added a commit to tamirdresher/squad that referenced this pull request Jun 14, 2026
…review on bradygaster#1311)

Reviewer caught a real bug: the new coordinator-* skill source dirs
existed in my worktree but had never been `git add`-ed because
`.squad/` is gitignored on this repo (specific subpaths under it are
exception-tracked). The template mirrors at
packages/squad-{cli,sdk}/templates/skills/coordinator-*/ shipped fine,
but the canonical sources at .squad/skills/coordinator-*/SKILL.md
weren't in the tree — so:

  - The changeset claim that .squad/skills/coordinator-*/ is the
    canonical source was untrue on dev.
  - scripts/sync-skill-templates.mjs would not see the new skills
    when run from a fresh checkout, breaking the contributor workflow
    (canonical → mirrors). Sync would silently drop the 3 new skills
    on the next prebuild.

Force-added the 3 dirs (`git add -f` because of the .squad/ ignore
rule, same as every other tracked skill under .squad/skills/).

Verified: `node scripts/sync-skill-templates.mjs` now lists
coordinator-* among the 26 discovered skills and re-produces the
2 template mirrors byte-identical to the canonical sources.

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

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

⚠️ Squad File Leakage Detected

The following .squad/ files were modified in this PR:

  • .squad/skills/coordinator-init-mode/SKILL.md
  • .squad/skills/coordinator-response-mode/SKILL.md
  • .squad/skills/coordinator-source-of-truth/SKILL.md

These files affect team routing, agent charters, and decisions.
If intentional, ensure approval from the team lead.

tamirdresher added a commit to tamirdresher/squad that referenced this pull request Jun 14, 2026
…es pre-release tail

Two narrow fixes uncovered while smoke-testing the slim squad.agent.md PR
(bradygaster#1311) and the 0.10.0-insider.1 release pipeline:

1. test/init-flow.test.cjs — after the Init Mode prose moved from
   squad.agent.md to the coordinator-init-mode satellite skill (bradygaster#1308 /
   PR bradygaster#1311), the structural assertions in 'Init Mode prompt structure
   (bradygaster#66)' had nothing to read in the parent file. They now follow the
   pointer via the new readSatelliteSkill() helper (which prefers the
   installed copy at .github/skills/<name>/SKILL.md and falls back to
   the source repo template at packages/squad-sdk/templates/skills/),
   so the same gates (STOP/WAIT, 'Look right?', numbered confirm-before-
   create flow, Phase 2 trigger) keep being enforced — just against the
   prompt the coordinator actually loads at runtime.

2. test/version-stamping.test.cjs + index.cjs — the version regex
   [0-9.]+(?:-[a-z]+)? truncated pre-release versions with a numeric
   tail (e.g. 0.10.0-insider.1 → 0.10.0-insider, 0.10.0-build.3 →
   0.10.0-build). That made the test 'upgrade detects same version'
   fail locally on any contributor who built the package (pkg.version
   gets stamped 0.10.0-build.N during build). More importantly it made
   the legacy index.cjs upgrade re-run the full upgrade flow for npm-
   installed insider users (who have 0.10.0-insider.1 on disk) instead
   of printing 'Already up to date'. Widened to
   [0-9.]+(?:-[a-z]+(?:\.[0-9]+)?)? — matches everything we already
   accepted plus the .N tail used by npm pre-release dist-tags and the
   build-time stamping script.

All 133 .cjs tests now pass (was 123 pass / 10 fail before).

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

Copy link
Copy Markdown
Collaborator Author

Follow-up on smoke-testing this PR end-to-end: found a latent issue caused by the slim — the .cjs structural assertions in test/init-flow.test.cjs > Init Mode prompt structure (#66) were scanning squad.agent.md for STOP/WAIT gates, "Look right?", and the numbered confirm-before-create flow. After the Init Mode prose moved to coordinator-init-mode/SKILL.md, the parent file just has a pointer — so those 5 assertions had nothing to read and failed.

These tests don't run in the standard CI suite (vitest) — they run in squad-release.yml (node --test test/*.test.cjs). So this PR is currently green on CI but would block the next stable release.

Pushed df3ddfaa which:

  • Adds readSatelliteSkill() (prefers installed .github/skills/<name>/SKILL.md, falls back to source template at packages/squad-sdk/templates/skills/) and extends extractInitMode() to follow the pointer when the parent section references coordinator-init-mode. Same gates now enforced — just against the prompt the coordinator actually loads at runtime.
  • Bonus pre-existing fix: widens the version regex [0-9.]+(?:-[a-z]+)?[0-9.]+(?:-[a-z]+(?:\.[0-9]+)?)? in index.cjs (readInstalledVersion) and in test/version-stamping.test.cjs. The narrow form truncated 0.10.0-insider.10.10.0-insider, which made squad upgrade re-run the full upgrade flow on npm-installed insider users instead of printing "Already up to date". Also made compareSemver pre-release handling test pass for anyone building locally (build script stamps 0.10.0-build.N).

All 133 .cjs tests pass (was 123 pass / 10 fail before).

tamirdresher added a commit to tamirdresher/squad that referenced this pull request Jun 14, 2026
…es pre-release tail

Two narrow fixes uncovered while smoke-testing the slim squad.agent.md PR
(bradygaster#1311) and the 0.10.0-insider.1 release pipeline:

1. test/init-flow.test.cjs — after the Init Mode prose moved from
   squad.agent.md to the coordinator-init-mode satellite skill (bradygaster#1308 /
   PR bradygaster#1311), the structural assertions in 'Init Mode prompt structure
   (bradygaster#66)' had nothing to read in the parent file. They now follow the
   pointer via the new readSatelliteSkill() helper (which prefers the
   installed copy at .github/skills/<name>/SKILL.md and falls back to
   the source repo template at packages/squad-sdk/templates/skills/),
   so the same gates (STOP/WAIT, 'Look right?', numbered confirm-before-
   create flow, Phase 2 trigger) keep being enforced — just against the
   prompt the coordinator actually loads at runtime.

2. test/version-stamping.test.cjs + index.cjs — the version regex
   [0-9.]+(?:-[a-z]+)? truncated pre-release versions with a numeric
   tail (e.g. 0.10.0-insider.1 → 0.10.0-insider, 0.10.0-build.3 →
   0.10.0-build). That made the test 'upgrade detects same version'
   fail locally on any contributor who built the package (pkg.version
   gets stamped 0.10.0-build.N during build). More importantly it made
   the legacy index.cjs upgrade re-run the full upgrade flow for npm-
   installed insider users (who have 0.10.0-insider.1 on disk) instead
   of printing 'Already up to date'. Widened to
   [0-9.]+(?:-[a-z]+(?:\.[0-9]+)?)? — matches everything we already
   accepted plus the .N tail used by npm pre-release dist-tags and the
   build-time stamping script.

All 133 .cjs tests now pass (was 123 pass / 10 fail before).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher and others added 5 commits June 14, 2026 10:21
…te skills (bradygaster#1308 phase 1)

squad.agent.md is loaded as the agent prompt at every Copilot session
start. v0.10.0-insider.1 ships it at 81 KB / 1137 lines and the v0.10
stabilisation pass alone added +10.6 KB / +114 lines. Every byte is
paid at every session.

Phase 1 fix: extract three low-cross-reference, high-byte sections to
satellite skills the coordinator loads on demand via the skill tool —
same pattern that worked for cross-squad-communication (bradygaster#1295).

  - coordinator-init-mode        — Init Mode Phase 1 + Phase 2 (5.4 KB)
  - coordinator-source-of-truth  — Source of Truth Hierarchy   (4.4 KB)
  - coordinator-response-mode    — Response Mode Selection +
                                    Lightweight Spawn Template  (3.9 KB)

Result: squad.agent.md 81 KB → 70 KB (-13.9 %, -140 lines). 19 skills
installed at .github/skills/ (was 16). Behaviour unchanged — each
removed section is replaced with a stub naming the trigger condition
and instructing the coordinator to skill(coordinator-X) before acting.

Sections that stay in squad.agent.md (intentional):
  - Team Mode + state-backend handshake + HARD RULE — handshake must
    fire before any state write
  - Routing table — hit on every user prompt
  - Hard trigger keyword-to-skill match paragraph (bradygaster#1307) — load-bearing
  - How to Spawn an Agent — referenced from every routing action
  - Coordinator Identity / Personal Squad / Memory Governance Tools —
    frequently re-read inline

Wired changes:
  - New canonical sources at .squad/skills/coordinator-{x}/SKILL.md
    plus 2 template-dir mirrors
  - MANIFEST_SKILL_NAMES grows by 3 entries (16 → 19)
  - TEMPLATE_MANIFEST grows by 3 entries with ../.github/skills/
    destinations (post-bradygaster#1304 install location)
  - .squad-templates/squad.agent.md replaces each section with a stub
  - 4 mirrored squad.agent.md copies re-synced via
    scripts/sync-templates.mjs --sync

Tests: 287/287 pass. The existing 'should install every
manifest-curated skill (regression: bradygaster#1289, bradygaster#1264)'
already iterates MANIFEST_SKILL_NAMES, so it automatically asserts the
3 new skills install.

Smoke test: fresh squad init produces 19 skills at .github/skills/
and squad.agent.md is 70 KB.

Follow-ups (separate PRs) for the still-large sections:
  - Routing (9.2 KB) — extract action-cell verbiage, keep trigger table
  - Team Mode (5.5 KB) — extract worktree-awareness sub-sections
  - How to Spawn (3.2 KB) — extract role-emoji catalog

Target after 2-3 follow-ups: ~45 KB coordinator file.

Closes bradygaster#1308 (phase 1).

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

CI failure on bradygaster#1311: test/squad-agent-roster.test.ts asserted the
'Determine team size' line is in squad.agent.md.template, but after
bradygaster#1308 phase 1 that line moved into the coordinator-init-mode skill.

Restructured the test into two describe blocks:

  1. squad.agent.md.template — must still keep an Init Mode STUB that
     names the coordinator-init-mode satellite skill AND preserves the
     load-bearing eager-execution exception callout. This makes sure
     future edits can't accidentally drop the satellite reference.

  2. coordinator-init-mode/SKILL.md (3 mirrors) — must contain the
     'Determine team size' line naming all four built-ins, AND must
     mark each of Scribe/Ralph/Rai/Fact Checker as 'exempt from
     casting'. The regression coverage from bradygaster#1299 follows the content.

22/22 tests pass.

Also addressed the changeset review comment: clarified that
.squad/skills/coordinator-*/SKILL.md are the canonical source files
in the squad repo (where every other bundled skill source lives),
and they're copied to .github/skills/ on install/upgrade per bradygaster#1304.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…review on bradygaster#1311)

Reviewer caught a real bug: the new coordinator-* skill source dirs
existed in my worktree but had never been `git add`-ed because
`.squad/` is gitignored on this repo (specific subpaths under it are
exception-tracked). The template mirrors at
packages/squad-{cli,sdk}/templates/skills/coordinator-*/ shipped fine,
but the canonical sources at .squad/skills/coordinator-*/SKILL.md
weren't in the tree — so:

  - The changeset claim that .squad/skills/coordinator-*/ is the
    canonical source was untrue on dev.
  - scripts/sync-skill-templates.mjs would not see the new skills
    when run from a fresh checkout, breaking the contributor workflow
    (canonical → mirrors). Sync would silently drop the 3 new skills
    on the next prebuild.

Force-added the 3 dirs (`git add -f` because of the .squad/ ignore
rule, same as every other tracked skill under .squad/skills/).

Verified: `node scripts/sync-skill-templates.mjs` now lists
coordinator-* among the 26 discovered skills and re-produces the
2 template mirrors byte-identical to the canonical sources.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…es pre-release tail

Two narrow fixes uncovered while smoke-testing the slim squad.agent.md PR
(bradygaster#1311) and the 0.10.0-insider.1 release pipeline:

1. test/init-flow.test.cjs — after the Init Mode prose moved from
   squad.agent.md to the coordinator-init-mode satellite skill (bradygaster#1308 /
   PR bradygaster#1311), the structural assertions in 'Init Mode prompt structure
   (bradygaster#66)' had nothing to read in the parent file. They now follow the
   pointer via the new readSatelliteSkill() helper (which prefers the
   installed copy at .github/skills/<name>/SKILL.md and falls back to
   the source repo template at packages/squad-sdk/templates/skills/),
   so the same gates (STOP/WAIT, 'Look right?', numbered confirm-before-
   create flow, Phase 2 trigger) keep being enforced — just against the
   prompt the coordinator actually loads at runtime.

2. test/version-stamping.test.cjs + index.cjs — the version regex
   [0-9.]+(?:-[a-z]+)? truncated pre-release versions with a numeric
   tail (e.g. 0.10.0-insider.1 → 0.10.0-insider, 0.10.0-build.3 →
   0.10.0-build). That made the test 'upgrade detects same version'
   fail locally on any contributor who built the package (pkg.version
   gets stamped 0.10.0-build.N during build). More importantly it made
   the legacy index.cjs upgrade re-run the full upgrade flow for npm-
   installed insider users (who have 0.10.0-insider.1 on disk) instead
   of printing 'Already up to date'. Widened to
   [0-9.]+(?:-[a-z]+(?:\.[0-9]+)?)? — matches everything we already
   accepted plus the .N tail used by npm pre-release dist-tags and the
   build-time stamping script.

All 133 .cjs tests now pass (was 123 pass / 10 fail before).

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

CI failure on dev tip (567f447, Squad CI run 27488323855):
  test/docs-build.test.ts > 'all code blocks are properly fenced (even
  count of backticks)' → expected 1 to be 0
  test/docs-build.test.ts > 'code blocks contain language specification
  or valid content' → expected 1 to be greater than 1

Root cause: a 4-backtick table cell intended to display a literal
triple-backtick:

  | Inside a fenced code block (\\\\ \\\ \\\\) | Suppressed |

made the regex /\\\/g see 5 triple-backtick occurrences across the
file (instead of the 2 from the real bash example), tripping both the
even-fence check and the line-count > 1 check.

Rephrased the table to say 'three backticks' / 'single backtick' in
prose — no embedded delimiters, no need to defend against the markdown
fence escape mechanism. Reads cleaner anyway.

Verified locally: 22/22 docs-build tests pass; npm run build in docs/
completes (171 files emitted; pagefind indexes 168 pages, 6911 words).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tamirdresher tamirdresher force-pushed the feat/1308-slim-squad-agent-md branch from df3ddfa to 28188c0 Compare June 14, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants