feat: APM integration — squad skill publish/install + apm.yml in init#876
Conversation
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 8 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ❌ | Branch up to date | insider is 69 commit(s) ahead — rebase recommended |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | |
| ❌ | No merge conflicts | Merge conflicts detected — resolve before review |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ✅ | CI passing | All checks passing |
| ✅ | Issue linked | Issue reference found |
| ✅ | Protected files | No protected bootstrap files changed |
Files Changed (12 files, +1328 −1)
| File | +/− |
|---|---|
.changeset/apm-integration.md |
+7 −0 |
.squad-templates/squad.agent.md |
+2 −1 |
.squad-templates/workflow-wiring-appendix-a-code-reviewer.md |
+131 −0 |
.squad-templates/workflow-wiring-appendix-b-documenter.md |
+140 −0 |
.squad-templates/workflow-wiring-guide.md |
+276 −0 |
.squad/skills/fact-checking/SKILL.md |
+61 −0 |
.squad/templates/agents/challenger.md |
+72 −0 |
CHANGELOG.md |
+4 −0 |
packages/squad-cli/src/cli-entry.ts |
+10 −0 |
packages/squad-cli/src/cli/commands/skill.ts |
+568 −0 |
packages/squad-cli/src/cli/core/init.ts |
+55 −0 |
packages/squad-cli/src/cli/index.ts |
+2 −0 |
Total: +1328 −1
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
a1f9a83 to
e781d20
Compare
| skills.push({ | ||
| name: fm['name'] ?? entry, | ||
| description: fm['description'], | ||
| path: `.squad/skills/${entry}/skill.md`, |
There was a problem hiding this comment.
Good question. collectSkills itself is read-only — it scans .squad/skills/*/skill.md, parses front-matter, and returns an in-memory array. No writes happen here.
Skills are persisted in two other places in this file:
-
publish()— callscollectSkills, then serializes the result intoapm.ymlviawriteFile(apmPath, ...)(around line 155). For single-skill publish, it also writes a per-skillapm.ymlinside the skill directory (line 127). -
install()— writes the fetchedskill.mdto.squad/skills/<name>/skill.mdand adds an.apm-source.jsonmetadata file for provenance tracking (e.g. lines 259–265 ininstallFromGitHub).
So the flow is: install saves skills to disk → collectSkills reads them back → publish exports them to apm.yml. The .squad/ directory remains the source of truth as noted in the PR description.
There was a problem hiding this comment.
I meant skills are now regular skills. #430
There was a problem hiding this comment.
You're right — #430 moved skills to .copilot/skills/ as the standard path. This APM code still hardcodes .squad/skills/. I'll update skill.ts to use .copilot/skills/ as primary (with .squad/skills/ fallback for backward compat, same pattern as LocalSkillSource).
There was a problem hiding this comment.
they closed my enhancement request to get those paths normalized and added to default settings :(
|
after more research, it looks like .copilot/* is not a supported folder in the repo for the github Copilot CLI: |
|
I added an enhancement request for copilot: They closed my enhancement request. |
…bradygaster#592) Fixes bradygaster#591 - Added step 7 (Wire enforcement) to Adding Team Members in squad.agent.md - Added workflow-wiring-guide.md with configuration surface area, wiring instructions, common mistakes, and verification checklist - Added appendix walkthroughs for code reviewer (gate pattern) and documenter (follow-up trigger pattern) Co-authored-by: Jonathan Ben Ami <jbenami@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-checking skill (bradygaster#603) * feat(skills): add fact-checking skill\n\nAdds challenger/fact-checking review pattern.\nVerified against 200+ issues in production squads.\nCloses bradygaster#598 * feat(agents): add challenger agent charter template\n\nGeneric Devil's Advocate / Challenger template.\nProvides auto-spawn integration pattern for coordinators.\nCloses bradygaster#598
Closes bradygaster#824 ## Changes ### New command: squad skill - squad skill publish [<name>] — exports skill(s) to APM format, generating/updating apm.yml - squad skill install <source> — installs a skill from APM registry - Supports owner/repo, owner/repo/skill-name, and direct URLs - Uses GitHub CLI to fetch from repos that have apm.yml or .squad/skills/ - Writes .apm-source.json metadata to track skill origin - squad skill list — lists installed skills with source provenance ### Updated: squad init - Now generates �pm.yml at project root alongside .squad/ - Follows skipExisting semantics (safe to re-run) - apm.yml includes skills, instructions, and prompts sections ### Updated: squad help - Added skill command to help text with usage examples ## APM format apm.yml is the Agent Package Manager manifest — package.json for AI agent context. See: https://github.com/microsoft/apm The manifest declares skills, instructions, and prompts in a portable format that �pm install can deploy to .github/, .claude/, .cursor/ etc.
The skills unification in bradygaster#430 migrated skills from .squad/skills/ to .copilot/skills/. This updates the APM skill command to: - Check .copilot/skills/ first, fall back to .squad/skills/ (backward compat) - Use resolveSkillsDir() helper matching LocalSkillSource pattern - Update all user-facing messages and apm.yml template paths - Fix installSkillsFromSquadDir candidate order Addresses review feedback from @Meir017. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e033083 to
f2f4201
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
⚛️ Post-Merge Review — River (TypeScript Architect)Verdict: 🟡 Conditional Approval — Architecture is sound, type safety needs follow-ups. What's Good
Type Safety Findings
Architecture Risks
Recommended Follow-Ups (Priority Order)
Review by Squad AI team (River — TypeScript Architect) · requested by Dina Berry |
…#900, bradygaster#875) - Add YAML value escaping helper for skill metadata - Replace catch(err: any) with catch(err: unknown) + narrowing - Add type guards to replace unsafe type assertions - Standardize deprecation messages on `gh copilot` - Fix unsafe exports type cast in cross-package test Closes bradygaster#924, bradygaster#925, bradygaster#926 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add YAML value escaping helper for skill metadata - Replace catch(err: any) with catch(err: unknown) + narrowing - Add type guards to replace unsafe type assertions - Standardize deprecation messages on `gh copilot` - Fix unsafe exports type cast in cross-package test Closes #924, #925, #926 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: address post-merge review findings (#876, #900, #875) - Add YAML value escaping helper for skill metadata - Replace catch(err: any) with catch(err: unknown) + narrowing - Add type guards to replace unsafe type assertions - Standardize deprecation messages on `gh copilot` - Fix unsafe exports type cast in cross-package test Closes #924, #925, #926 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add changeset for review findings fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: trigger CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(.squad): EECOM history — PR #942 rebase learnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: update changeset to accurately reflect PR changes (drop YAML escaping reference) Agent-Logs-Url: https://github.com/bradygaster/squad/sessions/54f41407-61bf-4977-85b7-572341c47b62 Co-authored-by: bradygaster <41929050+bradygaster@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…#876) * Add enforcement wiring step to hiring process + workflow wiring guide (#592) Fixes #591 - Added step 7 (Wire enforcement) to Adding Team Members in squad.agent.md - Added workflow-wiring-guide.md with configuration surface area, wiring instructions, common mistakes, and verification checklist - Added appendix walkthroughs for code reviewer (gate pattern) and documenter (follow-up trigger pattern) Co-authored-by: Jonathan Ben Ami <jbenami@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat(agents): add Challenger / Devil's Advocate agent template + fact-checking skill (#603) * feat(skills): add fact-checking skill\n\nAdds challenger/fact-checking review pattern.\nVerified against 200+ issues in production squads.\nCloses #598 * feat(agents): add challenger agent charter template\n\nGeneric Devil's Advocate / Challenger template.\nProvides auto-spawn integration pattern for coordinators.\nCloses #598 * feat: add APM integration for skill publishing and installation Closes #824 ## Changes ### New command: squad skill - squad skill publish [<name>] — exports skill(s) to APM format, generating/updating apm.yml - squad skill install <source> — installs a skill from APM registry - Supports owner/repo, owner/repo/skill-name, and direct URLs - Uses GitHub CLI to fetch from repos that have apm.yml or .squad/skills/ - Writes .apm-source.json metadata to track skill origin - squad skill list — lists installed skills with source provenance ### Updated: squad init - Now generates �pm.yml at project root alongside .squad/ - Follows skipExisting semantics (safe to re-run) - apm.yml includes skills, instructions, and prompts sections ### Updated: squad help - Added skill command to help text with usage examples ## APM format apm.yml is the Agent Package Manager manifest — package.json for AI agent context. See: https://github.com/microsoft/apm The manifest declares skills, instructions, and prompts in a portable format that �pm install can deploy to .github/, .claude/, .cursor/ etc. * chore: add changeset for APM integration * docs: update CHANGELOG.md with APM integration entry * fix(skill): use .copilot/skills/ as primary path per #430 The skills unification in #430 migrated skills from .squad/skills/ to .copilot/skills/. This updates the APM skill command to: - Check .copilot/skills/ first, fall back to .squad/skills/ (backward compat) - Use resolveSkillsDir() helper matching LocalSkillSource pattern - Update all user-facing messages and apm.yml template paths - Fix installSkillsFromSquadDir candidate order Addresses review feedback from @Meir017. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: align CHANGELOG.md with dev branch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add missing fs import in init.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: joniba <joniba@users.noreply.github.com> Co-authored-by: Jonathan Ben Ami <jbenami@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <Copilot@users.noreply.github.com> Co-authored-by: Copilot <copilot@github.com>
* fix: address post-merge review findings (#876, #900, #875) - Add YAML value escaping helper for skill metadata - Replace catch(err: any) with catch(err: unknown) + narrowing - Add type guards to replace unsafe type assertions - Standardize deprecation messages on `gh copilot` - Fix unsafe exports type cast in cross-package test Closes #924, #925, #926 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: add changeset for review findings fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: trigger CI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(.squad): EECOM history — PR #942 rebase learnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: update changeset to accurately reflect PR changes (drop YAML escaping reference) Agent-Logs-Url: https://github.com/bradygaster/squad/sessions/54f41407-61bf-4977-85b7-572341c47b62 Co-authored-by: bradygaster <41929050+bradygaster@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
The skill.ts command file existed but was never imported in cli-entry.ts, causing the cli-command-wiring test to fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Summary
Implements #824 — APM (Agent Package Manager) integration into Squad CLI.
What is APM?
APM is \package.json\ for AI agent context. You declare skills, instructions, and prompts in \apm.yml\ and \apm install\ deploys them to .github/, .claude/, .cursor/\ etc.
See: https://github.com/microsoft/apm
Changes
New command: \squad skill\
\ Install from APM registry
squad skill publish [] Export skill(s) to APM format (updates apm.yml)
squad skill install
squad skill list List installed skills
\\
Install sources:
Implementation details:
Updated: \squad init\
Now generates \apm.yml\ at the project root alongside .squad/.
Follows \skipExisting\ semantics — re-running \squad init\ won't overwrite.
Updated: \squad help\
Added \skill\ command to help output.
Design notes
Closes #824