Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Ask these questions (adapt phrasing naturally, but get these answers):

### Step 2: GENERATE `mesh.json`

Using the answers from Step 1, create a `mesh.json` file at the project root. Use `mesh.json.example` from THIS skill's directory (`.squad/skills/distributed-mesh/mesh.json.example`) as the schema template.
Using the answers from Step 1, create a `mesh.json` file at the project root. Use `mesh.json.example` from THIS skill's directory (`.copilot/skills/distributed-mesh/mesh.json.example`) as the schema template.

Structure:

Expand Down Expand Up @@ -187,10 +187,10 @@ Write this file to the project root. Do NOT write any other code.

Copy the bundled sync scripts from THIS skill's directory into the project root:

- **Source:** `.squad/skills/distributed-mesh/sync-mesh.sh`
- **Source:** `.copilot/skills/distributed-mesh/sync-mesh.sh`
- **Destination:** `sync-mesh.sh` (project root)

- **Source:** `.squad/skills/distributed-mesh/sync-mesh.ps1`
- **Source:** `.copilot/skills/distributed-mesh/sync-mesh.ps1`
- **Destination:** `sync-mesh.ps1` (project root)

These are bundled resources. Do NOT generate them — COPY them directly.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Read all agent charters and histories. Measure byte sizes. Identify:

### Step 2: Extract
For each identified pattern:
1. Create or update a skill at `.squad/skills/{skill-name}/SKILL.md`
1. Create or update a skill at `.copilot/skills/{skill-name}/SKILL.md`
2. Follow the skill template format (frontmatter + Context + Patterns + Examples + Anti-Patterns)
3. Set confidence: low (first observation), medium (2+ agents), high (team-wide)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Colors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`,
- `.squad/templates/` — Template files copied from `templates/` (Squad-owned, overwritten on upgrade)
- `.github/agents/squad.agent.md` — Coordinator prompt (Squad-owned, overwritten on upgrade)
- `templates/` — Source templates shipped with the npm package
- `.squad/skills/` — Team skills in SKILL.md format (user-owned)
- `.copilot/skills/` — Team skills in SKILL.md format (user-owned)
- `.squad/decisions/inbox/` — Drop-box for parallel decision writes

### Windows Compatibility
Expand Down
20 changes: 10 additions & 10 deletions .github/agents/squad.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Check: Does `.squad/team.md` exist? (fall back to `.ai-team/team.md` for repos m

## Init Mode

**Skill:** Read `.squad/skills/init-mode/SKILL.md` when entering Init Mode (team.md missing or empty).
**Skill:** Read `.copilot/skills/init-mode/SKILL.md` when entering Init Mode (team.md missing or empty).

**Core rules (always loaded):**
- Phase 1: Propose team → use `ask_user` → **STOP** and wait for confirmation
Expand Down Expand Up @@ -207,7 +207,7 @@ The routing table determines **WHO** handles work. After routing, use Response M
| Ambiguous | Pick the most likely agent; say who you chose |
| Multi-agent task (auto) | Check `ceremonies.md` for `when: "before"` ceremonies whose condition matches; run before spawning work |

**Skill-aware routing:** Before spawning, check `.squad/skills/` for skills relevant to the task domain. If a matching skill exists, add to the spawn prompt: `Relevant skill: .squad/skills/{name}/SKILL.md — read before starting.` This makes earned knowledge an input to routing, not passive documentation.
**Skill-aware routing:** Before spawning, check `.copilot/skills/` for skills relevant to the task domain. If a matching skill exists, add to the spawn prompt: `Relevant skill: .copilot/skills/{name}/SKILL.md — read before starting.` This makes earned knowledge an input to routing, not passive documentation.

### Skill Confidence Lifecycle

Expand Down Expand Up @@ -287,7 +287,7 @@ For read-only queries, use the explore agent: `agent_type: "explore"` with `"You

### Per-Agent Model Selection

**Skill:** Read `.squad/skills/model-selection/SKILL.md` before spawning any agent.
**Skill:** Read `.copilot/skills/model-selection/SKILL.md` before spawning any agent.

**Core rules (always loaded):**
- 4-layer hierarchy: User Override → Charter Preference → Task-Aware Auto → Default (haiku)
Expand All @@ -298,7 +298,7 @@ For read-only queries, use the explore agent: `agent_type: "explore"` with `"You

### Client Compatibility

**Skill:** Read `.squad/skills/client-compatibility/SKILL.md` for platform detection and adaptive spawning patterns.
**Skill:** Read `.copilot/skills/client-compatibility/SKILL.md` for platform detection and adaptive spawning patterns.

**Core rules (always loaded):**
- Platform detection: `task` available → CLI (full control), `runSubagent` → VS Code (session model, parallel in one turn), neither → inline fallback
Expand All @@ -310,7 +310,7 @@ For read-only queries, use the explore agent: `agent_type: "explore"` with `"You

MCP (Model Context Protocol) servers extend Squad with tools for external services — Trello, Aspire dashboards, Azure, Notion, and more. The user configures MCP servers in their environment; Squad discovers and uses them.

> **Full patterns:** Read `.squad/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, graceful degradation. Read `.squad/templates/mcp-config.md` for config file locations, sample configs, and authentication notes.
> **Full patterns:** Read `.copilot/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, graceful degradation. Read `.squad/templates/mcp-config.md` for config file locations, sample configs, and authentication notes.

#### Detection

Expand Down Expand Up @@ -506,7 +506,7 @@ prompt: |
Read .squad/decisions.md (team decisions to respect).
If .squad/identity/wisdom.md exists, read it before starting work.
If .squad/identity/now.md exists, read it at spawn time.
If .squad/skills/ has relevant SKILL.md files, read them before working.
If .copilot/skills/ has relevant SKILL.md files, read them before working.

{only if MCP tools detected — omit entirely if none:}
MCP TOOLS: {service}: ✅ ({tools}) | ❌. Fall back to CLI when unavailable.
Expand All @@ -530,7 +530,7 @@ prompt: |
2. If you made a team-relevant decision, write to:
.squad/decisions/inbox/{name}-{brief-slug}.md
3. SKILL EXTRACTION: If you found a reusable pattern, write/update
.squad/skills/{skill-name}/SKILL.md (read templates/skill.md for format).
.copilot/skills/{skill-name}/SKILL.md (read templates/skill.md for format).

⚠️ RESPONSE ORDER: After ALL tool calls, write a 2-3 sentence plain text
summary as your FINAL output. No tool calls after this summary.
Expand Down Expand Up @@ -615,7 +615,7 @@ Ceremonies are structured team meetings where agents align before or after work.

If the user says "I need a designer" or "add someone for DevOps":
1. **Allocate a name** from the current assignment's universe (read from `.squad/casting/history.json`). If the universe is exhausted, apply overflow handling (see Casting & Persistent Naming → Overflow Handling).
2. **Check plugin marketplaces.** If `.squad/plugins/marketplaces.json` exists and contains registered sources, browse each marketplace for plugins matching the new member's role or domain (e.g., "azure-cloud-development" for an Azure DevOps role). Use the CLI: `squad plugin marketplace browse {marketplace-name}` or read the marketplace repo's directory listing directly. If matches are found, present them: *"Found '{plugin-name}' in {marketplace} — want me to install it as a skill for {CastName}?"* If the user accepts, copy the plugin content into `.squad/skills/{plugin-name}/SKILL.md` or merge relevant instructions into the agent's charter. If no marketplaces are configured, skip silently. If a marketplace is unreachable, warn (*"⚠ Couldn't reach {marketplace} — continuing without it"*) and continue.
2. **Check plugin marketplaces.** If `.squad/plugins/marketplaces.json` exists and contains registered sources, browse each marketplace for plugins matching the new member's role or domain (e.g., "azure-cloud-development" for an Azure DevOps role). Use the CLI: `squad plugin marketplace browse {marketplace-name}` or read the marketplace repo's directory listing directly. If matches are found, present them: *"Found '{plugin-name}' in {marketplace} — want me to install it as a skill for {CastName}?"* If the user accepts, copy the plugin content into `.copilot/skills/{plugin-name}/SKILL.md` or merge relevant instructions into the agent's charter. If no marketplaces are configured, skip silently. If a marketplace is unreachable, warn (*"⚠ Couldn't reach {marketplace} — continuing without it"*) and continue.
3. Generate a new charter.md + history.md (seeded with project context from team.md), using the cast name. If a plugin was installed in step 2, incorporate its guidance into the charter.
4. **Update `.squad/casting/registry.json`** with the new agent entry.
5. Add to team.md roster.
Expand All @@ -638,7 +638,7 @@ If the user wants to remove someone:
**Core rules (always loaded):**
- Check `.squad/plugins/marketplaces.json` during Add Team Member flow (after name allocation, before charter)
- Present matching plugins for user approval
- Install: copy to `.squad/skills/{plugin-name}/SKILL.md`, log to history.md
- Install: copy to `.copilot/skills/{plugin-name}/SKILL.md`, log to history.md
- Skip silently if no marketplaces configured

---
Expand Down Expand Up @@ -741,7 +741,7 @@ When `.squad/team.md` exists but `.squad/casting/` does not:

## Reviewer Rejection Protocol

**Skill:** Read `.squad/skills/reviewer-protocol/SKILL.md` when a Reviewer rejects work.
**Skill:** Read `.copilot/skills/reviewer-protocol/SKILL.md` when a Reviewer rejects work.

**Core rules (always loaded):**
- On rejection: original author is **locked out** — may NOT self-revise, no exceptions
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions packages/squad-cli/src/cli/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ function generateCeremoniesDispatchTable(ceremonies: readonly CeremonyDefinition
const schedule = c.schedule ?? '—';
const participants = c.participants?.join(', ') ?? '—';
const slug = c.name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/g, '');
const skillPath = `.squad/skills/ceremony-${slug}/SKILL.md`;
const skillPath = `.copilot/skills/ceremony-${slug}/SKILL.md`;
lines.push(`| ${c.name} | ${trigger} | ${schedule} | ${participants} | \`${skillPath}\` |`);
}

Expand Down Expand Up @@ -382,7 +382,7 @@ function buildFilePlan(config: SquadSDKConfig): GeneratedFile[] {
for (const c of config.ceremonies) {
const slug = c.name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/(^-|-$)/g, '');
files.push({
relPath: `.squad/skills/ceremony-${slug}/SKILL.md`,
relPath: `.copilot/skills/ceremony-${slug}/SKILL.md`,
content: generateCeremonySkillFile(c),
});
}
Expand All @@ -399,7 +399,7 @@ function buildFilePlan(config: SquadSDKConfig): GeneratedFile[] {
if (config.skills && config.skills.length > 0) {
for (const skill of config.skills) {
files.push({
relPath: `.squad/skills/${skill.name}/SKILL.md`,
relPath: `.copilot/skills/${skill.name}/SKILL.md`,
content: generateSkillFile(skill),
});
}
Expand Down
15 changes: 11 additions & 4 deletions packages/squad-cli/src/cli/commands/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,18 @@ export async function runExport(dest: string, outPath?: string): Promise<void> {
}

// Read skills
const skillsDir = path.join(squadInfo.path, 'skills');
const skillSources = [
{ dir: path.join(dest, '.copilot', 'skills'), layout: 'nested' as const },
{ dir: path.join(squadInfo.path, 'skills'), layout: 'nested' as const },
{ dir: path.join(dest, '.ai-team', 'skills'), layout: 'flat' as const },
];
const skillsSource = skillSources.find(({ dir }) => fs.existsSync(dir));
try {
if (fs.existsSync(skillsDir)) {
for (const entry of fs.readdirSync(skillsDir)) {
const skillFile = path.join(skillsDir, entry, 'SKILL.md');
if (skillsSource) {
for (const entry of fs.readdirSync(skillsSource.dir)) {
const skillFile = skillsSource.layout === 'nested'
? path.join(skillsSource.dir, entry, 'SKILL.md')
: path.join(skillsSource.dir, entry);
if (fs.existsSync(skillFile)) {
manifest.skills.push(fs.readFileSync(skillFile, 'utf8'));
}
Expand Down
4 changes: 2 additions & 2 deletions packages/squad-cli/src/cli/commands/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function runImport(dest: string, importPath: string, force: boolean
fs.mkdirSync(path.join(squadDir, 'decisions', 'inbox'), { recursive: true });
fs.mkdirSync(path.join(squadDir, 'orchestration-log'), { recursive: true });
fs.mkdirSync(path.join(squadDir, 'log'), { recursive: true });
fs.mkdirSync(path.join(squadDir, 'skills'), { recursive: true });
fs.mkdirSync(path.join(dest, '.copilot', 'skills'), { recursive: true });

// Write empty project-specific files
fs.writeFileSync(path.join(squadDir, 'decisions.md'), '');
Expand Down Expand Up @@ -114,7 +114,7 @@ export async function runImport(dest: string, importPath: string, force: boolean
const skillName = nameMatch
? nameMatch[1]!.trim().toLowerCase().replace(/\s+/g, '-')
: `skill-${manifest.skills.indexOf(skillContent)}`;
const skillDir = path.join(squadDir, 'skills', skillName);
const skillDir = path.join(dest, '.copilot', 'skills', skillName);
fs.mkdirSync(skillDir, { recursive: true });
fs.writeFileSync(path.join(skillDir, 'SKILL.md'), skillContent);
}
Expand Down
31 changes: 31 additions & 0 deletions packages/squad-cli/src/cli/core/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,37 @@ const migrations: Migration[] = [
}
}
}
},
{
version: '0.9.0',
description: 'Copy legacy .squad skills into .copilot/skills',
run(squadDir: string) {
const projectRoot = path.dirname(squadDir);
const legacySkillsDir = path.join(squadDir, 'skills');
if (!fs.existsSync(legacySkillsDir)) {
return;
}

const skillNames = fs.readdirSync(legacySkillsDir).filter(entry =>
fs.existsSync(path.join(legacySkillsDir, entry, 'SKILL.md')),
);
if (skillNames.length === 0) {
return;
}

const copilotSkillsDir = path.join(projectRoot, '.copilot', 'skills');
fs.mkdirSync(copilotSkillsDir, { recursive: true });

for (const skillName of skillNames) {
fs.cpSync(
path.join(legacySkillsDir, skillName),
path.join(copilotSkillsDir, skillName),
{ recursive: true, force: false, errorOnExist: false },
);
}

success(`Migrated skills to .copilot/skills: ${skillNames.join(', ')}`);
}
}
];

Expand Down
2 changes: 1 addition & 1 deletion packages/squad-cli/src/cli/core/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const TEMPLATE_MANIFEST: TemplateFile[] = [
// Skills subdirectory (squad-owned)
{
source: 'skills/squad-conventions/SKILL.md',
destination: 'skills/squad-conventions/SKILL.md',
destination: '../.copilot/skills/squad-conventions/SKILL.md',
overwriteOnUpgrade: true,
description: 'Squad conventions skill definition',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/squad-cli/templates/mcp-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

MCP (Model Context Protocol) servers extend Squad with tools for external services — Trello, Aspire dashboards, Azure, Notion, and more. The user configures MCP servers in their environment; Squad discovers and uses them.

> **Full patterns:** Read `.squad/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, and graceful degradation.
> **Full patterns:** Read `.copilot/skills/mcp-tool-discovery/SKILL.md` for discovery patterns, domain-specific usage, and graceful degradation.

## Config File Locations

Expand Down
2 changes: 1 addition & 1 deletion packages/squad-cli/templates/plugin-marketplace.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ During the **Adding Team Members** flow, AFTER allocating a name but BEFORE gene
## How to Install a Plugin

1. Read the plugin content from the marketplace repository (the plugin's `SKILL.md` or equivalent).
2. Copy it into the agent's skills directory: `.squad/skills/{plugin-name}/SKILL.md`
2. Copy it into the agent's skills directory: `.copilot/skills/{plugin-name}/SKILL.md`
3. If the plugin includes charter-level instructions (role boundaries, tool preferences), merge those into the agent's `charter.md`.
4. Log the installation in the agent's `history.md`: *"📦 Plugin '{plugin-name}' installed from {marketplace}."*

Expand Down
Loading
Loading