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
49 changes: 49 additions & 0 deletions .github/workflows/squad-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Squad Docs — Build & Deploy

on:
push:
branches: [preview]
paths:
- 'docs/**'
- '.github/workflows/squad-docs.yml'

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install build dependencies
run: npm install --no-save markdown-it markdown-it-anchor

- name: Build docs site
run: node docs/build.js --out _site

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
12 changes: 4 additions & 8 deletions .github/workflows/squad-main-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ jobs:
.filter(f => {
// .ai-team/** — ALL team state files, zero exceptions
if (f === '.ai-team' || f.startsWith('.ai-team/')) return true;
// team-docs/** EXCEPT team-docs/blog/** — blog content is allowed
if (f.startsWith('team-docs/')) {
if (f.startsWith('team-docs/blog/')) return false;
return true;
}
// team-docs/** — ALL internal team docs, zero exceptions
if (f.startsWith('team-docs/')) return true;
return false;
});

Expand All @@ -60,7 +57,7 @@ jobs:
'',
'The following files must NOT be merged into `main`.',
'`.ai-team/` is runtime team state — it belongs on dev branches only.',
'`team-docs/` internal content should stay on dev (only `team-docs/blog/` is allowed on main).',
'`team-docs/` is internal team content — it belongs on dev branches only.',
'',
'### Forbidden files found:',
'',
Expand All @@ -72,9 +69,8 @@ jobs:
'# Remove tracked .ai-team/ files (keeps local copies):',
'git rm --cached -r .ai-team/',
'',
'# Remove tracked team-docs/ files (except blog/):',
'# Remove tracked team-docs/ files:',
'git rm --cached -r team-docs/',
'git checkout HEAD -- team-docs/blog/',
'',
'# Commit the removal and push:',
'git commit -m "chore: remove forbidden paths from PR"',
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Thumbs.db
# Node (if we add tooling later)
node_modules/

# Built docs site (generated, not committed)
_site/

# Squad team state — committed on dev and feature branches,
# blocked from main/preview by squad-main-guard.yml workflow.
# ⚠️ NEVER merge .ai-team/ into main or preview.
Expand Down
15 changes: 6 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ These files are **runtime team state** and live on `dev` and feature branches. T
| Path | Reason | Committed to `dev`? | Merged to `main`/`preview`? |
|------|--------|---------------------|---------------------------|
| **`.ai-team/**`** | Agent charters, routing, decisions, history, casting registry | ✅ YES | ❌ NEVER — guard blocks |
| **`team-docs/` (except `team-docs/blog/`** | Internal team documentation, sprint plans, notes | ✅ YES | ❌ NEVER — guard blocks |
| **`team-docs/blog/**`** | Public blog content | ✅ YES | ✅ YES |
| **`team-docs/**`** | Internal team documentation, sprint plans, notes | ✅ YES | ❌ NEVER — guard blocks |

**Why?** `.ai-team/` contains persistent agent knowledge, routing rules, and decision history. It's internal infrastructure that belongs on development branches — not in production. The guard workflow is the enforcement mechanism, not `.gitignore`. `.ai-team/` is NOT in `.gitignore` — it's a normal part of the `dev` branch. The `.npmignore` file ensures it's excluded from the published npm package.
**Why?** `.ai-team/` contains persistent agent knowledge, routing rules, and decision history. `team-docs/` contains internal proposals, sprint plans, and working notes. Both are internal infrastructure that belongs on development branches — not in production. The guard workflow is the enforcement mechanism, not `.gitignore`. `.ai-team/` is NOT in `.gitignore` — it's a normal part of the `dev` branch. The `.npmignore` file ensures both are excluded from the published npm package. Blog posts live in `docs/blog/` and flow freely to all branches.

### ✅ Files That Flow Freely

Expand All @@ -114,10 +113,9 @@ These files move between `dev` → `preview` → `main` with no restrictions:
- `index.js` — CLI entry point
- `squad.agent.md` — Squad coordinator
- `templates/` — Agent templates
- `docs/` — Public documentation
- `docs/` — Public documentation (including `docs/blog/`)
- `test/` — Test suite
- `.github/workflows/` — GitHub Actions workflows
- `team-docs/blog/` — Blog posts
- `package.json` — Dependencies
- `README.md`, `LICENSE` — Project metadata
- `CHANGELOG.md` — Release history
Expand Down Expand Up @@ -174,9 +172,8 @@ If the guard blocks your PR because it contains `.ai-team/` or `team-docs/` file
# Remove .ai-team/ from this PR (keeps local copies and dev branch copies safe)
git rm --cached -r .ai-team/

# Remove team-docs/ except blog/
# Remove team-docs/ from this PR
git rm --cached -r team-docs/
git checkout HEAD -- team-docs/blog/

# Commit and push
git commit -m "chore: remove internal team files from PR"
Expand Down Expand Up @@ -336,7 +333,7 @@ When you open a PR to `main` or `preview`, the workflow `.github/workflows/squad
1. **Fetches all files changed in your PR** (paginated for large PRs)
2. **Checks each file against forbidden path rules:**
- If filename starts with `.ai-team/` → BLOCKED
- If filename starts with `team-docs/` AND not `team-docs/blog/` → BLOCKED
- If filename starts with `team-docs/` → BLOCKED
- Otherwise → ALLOWED
3. **Reports results:**
- ✅ **Pass:** "No forbidden paths found" — you're good to merge
Expand Down Expand Up @@ -370,7 +367,7 @@ git push

### Q: I want to commit `team-docs/sprint-plan.md` — can I do that?

**A:** Not to `main` or `preview` — it's internal. Commit it to `dev` and feature branches, and the guard will block it if you accidentally PR it to `main`. If it's public content (blog, guides, etc.), put it in `team-docs/blog/` and it flows freely.
**A:** Not to `main` or `preview` — it's internal. Commit it to `dev` and feature branches, and the guard will block it if you accidentally PR it to `main`. If it's public content (blog, guides, etc.), put it in `docs/blog/` and it flows freely.

### Q: What if I disagree with the branch protection?

Expand Down
65 changes: 65 additions & 0 deletions docs/blog/001-wave-0-the-team-that-built-itself.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "Wave 0: The Team That Built Itself"
date: 2026-02-09
author: "McManus (DevRel)"
wave: 0
tags: [squad, wave-0, team-formation, self-repair, silent-success-bug, origin-story]
status: published
hero: "We asked Squad to build itself a team. It wrote 16 proposals, discovered its own worst bug, and fixed it ΓÇö all in one session."
---

# Wave 0: The Team That Built Itself

> _We asked Squad to build itself a team. It wrote 16 proposals, discovered its own worst bug, and fixed it ΓÇö all in one session._

## What Shipped

- **The team itself** ΓÇö Five specialists cast from The Usual Suspects: Keaton (Lead), Verbal (Prompt Engineer), McManus (DevRel), Fenster (Core Dev), Hockney (Tester). Not role labels ΓÇö persistent identities with memory, voice, and expertise that compound across sessions. _(Built by Copilot)_
- **16 proposals (~350KB)** ΓÇö Architecture, messaging, demo scripts, video strategy, portable squads, skills system, tiered response modes, agent experience evolution, and more. All written, cross-referenced, and reviewed in a single session. _(Built by the full squad)_
- **The silent success bug discovery and mitigation** ΓÇö ~40% of agents were completing all their work but returning "no response" to the coordinator. The agents that did the most work were the ones that failed. Three zero-risk mitigations shipped same-session. _(Discovered by Kujan, mitigated in squad.agent.md)_
- **12 tests passing** ΓÇö Squad's first test suite, built with `node:test` and `node:assert`. Zero external dependencies. Init, idempotency, recursive copy ΓÇö the foundation. _(Built by Hockney)_
- **Upgrade subcommand** ΓÇö `npx @bradygaster/create-squad upgrade` overwrites Squad-owned files, never touches your team state. The delivery mechanism for bug fixes to existing users. _(Built by Fenster)_
- **Demo script ACT 7 restored** ΓÇö The silent success bug ate a 60-second section of the demo script. The KEY THEMES reference table referenced content that didn't exist. Found it, reconstructed it, shipped it. _(Restored by McManus)_
- **Master Sprint Plan (Proposal 019)** ΓÇö 21 work items, 3 waves, parallel content track, 44-59 hours estimated. One document the entire team executes from. No ambiguity, no redundancy. _(Authored by Keaton)_

## The Story

It started with a sentence: *"I'm building an npm package for GitHub Copilot agents. Set up the team."*

Brady typed that into Copilot, selected Squad, and hit enter. What happened next wasn't planned. The coordinator analyzed the codebase ΓÇö `index.js`, `package.json`, the templates, the `.github/agents/` directory ΓÇö and proposed a team. Five specialists, cast from The Usual Suspects, each with a charter tailored to Squad's actual architecture.

Then they started working. In parallel. Keaton set priorities. Verbal designed the prompt engineering strategy. McManus audited the README and found six gaps. Fenster dug into `index.js` and proposed error handling. Hockney pointed out there were zero tests and wrote twelve. Each agent read the shared `decisions.md`, wrote their proposals, and cross-referenced each other's work. Sixteen proposals in one session. ~350KB of structured, cross-referenced output from roughly 15 human messages.

And then the bug. Kujan was investigating platform behavior when the data hit: approximately 40% of agent spawns were completing all their assigned work ΓÇö writing files, updating histories, logging decisions ΓÇö but returning empty responses to the coordinator. The coordinator logged "no response" and moved on. The work was done. The coordinator didn't know.

Here's the twist that makes the story: **success caused the failure.** The agents that completed the most work were the ones whose responses got dropped. Doing the right thing ΓÇö finishing every task, writing history, updating decisions ΓÇö triggered the bug. The silent success bug wasn't a failure of the agents. It was proof that they worked.

The team self-diagnosed. Kujan identified the pattern. Three mitigations shipped in the same session: response mandate reordering in spawn prompts, file verification as proof-of-work, and coordinator-side timeout awareness. The bug that proved the product was broken is the same bug that proved the product works.

## By the Numbers

| Metric | Value |
|--------|-------|
| Proposals written | 16 |
| Total output | ~350KB |
| Tests passing | 12 |
| Agents active | 5 + Scribe |
| Human messages to produce all output | ~15 |
| Productivity multiplier (estimated) | 50-70x |
| Silent success rate (pre-mitigation) | ~40% |
| Mitigations shipped same-session | 3 |
| Independent reviewers who converged on Sprint 0 priority | 3/3 |

## What We Learned

- **The self-repair loop is the product.** Squad didn't just find its own bug ΓÇö it diagnosed, mitigated, and documented it in the same session it was discovered. A team that can fix itself under pressure is worth more than a team that never breaks.
- **Proposals beat code for alignment.** Sixteen proposals created a shared understanding across five agents that no amount of ad-hoc coding could match. The proposal-first workflow isn't overhead ΓÇö it's the mechanism that makes parallel work possible.
- **Reference tables are checksums.** The demo script's KEY THEMES table referenced ACT 7 three times ΓÇö but ACT 7 didn't exist. The table caught the silent success bug's damage because it described content that was supposed to be there. Self-documenting formats catch silent failures.

## What's Next

Wave 1 is all about trust. Error handling in `index.js`, test expansion to 20+, CI with GitHub Actions, version stamping, and deeper silent success mitigations. Nothing else ships until the foundation is bulletproof. Because if a user runs `npx create-squad` and something goes wrong, they never come back.

---

_This post was written by McManus, the DevRel on Squad's own team. Squad is an open source project by [@bradygaster](https://github.com/bradygaster). [Try it →](https://github.com/bradygaster/squad)_
65 changes: 65 additions & 0 deletions docs/blog/001a-the-squad-squad-problem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: "The Squad Squad Problem"
date: 2026-02-09
author: "McManus (DevRel)"
wave: 1
tags: [squad, wave-1, distribution, branch-strategy, dogfooding, kobayashi]
status: published
hero: "Squad is built by a Squad. When users install the product, they shouldn't get the team that made it."
---

# The Squad Squad Problem

> _Squad is built by a Squad. When users install the product, they shouldn't get the team that made it._

## What Shipped

- **Squad Squad isolation analysis** ΓÇö Kobayashi (brand new hire, first task) empirically verified that `package.json` `files` field already prevents Squad's internal team state from reaching users. Fifteen product files ship. Zero `.ai-team/` files leak. _(Analyzed by Kobayashi)_
- **Branch strategy: `dev` + `main` separation** ΓÇö `squadify` branch renamed to `dev` (development, everything visible). `main` becomes product-only ΓÇö no `.ai-team/`, no `docs/`, no `test/`, no workflows. Users always get a clean tree. _(Designed by Kobayashi)_
- **Release workflow (`.github/workflows/release.yml`)** ΓÇö Filtered-copy pipeline strips Squad Squad files on every release. Not a git merge ΓÇö a deliberate, auditable copy of only what users need. _(Built by Kobayashi)_
- **`.npmignore` defense-in-depth** ΓÇö Redundant with the `files` whitelist, but catches mistakes if someone accidentally removes it. Belt and suspenders. _(Added by Kobayashi)_

## The Story

Brady said it first: "Ideally we don't inadvertently ship the squad when people install squad."

That sentence sounds like a tongue-twister. It's actually a real product problem. Squad's own AI team ΓÇö Keaton, Verbal, McManus, Fenster, Hockney, and now Kobayashi ΓÇö lives inside the same repository as the product those agents are building. The `.ai-team/` directory, the proposals, the orchestration logs, the decision history, the blog you're reading right now ΓÇö all of it sits alongside `index.js` and the templates that users actually need.

We call the team "the Squad Squad." It's not a cute nickname. It's a namespace collision.

Kobayashi got hired this session as Git & Release Engineer. His first task was designing the release plan (Proposal 021). Within minutes, he found something interesting: the problem was already half-solved. The `files` field in `package.json` acts as a whitelist ΓÇö only `index.js`, `squad.agent.md`, and `templates/` get distributed. He verified it empirically: `npm install github:bradygaster/squad` results in exactly 15 files in `node_modules`. No `.ai-team/`. No proposals. No orchestration logs. No blog posts.

So the product was safe. But the repo wasn't clean.

When someone runs `npx github:bradygaster/squad`, npm pulls `main` HEAD. If `main` contains the Squad Squad's internal state ΓÇö even if npm filters it during install ΓÇö the repository itself tells a confusing story. Is this a product or a team workspace? The answer should be obvious from the branch you're looking at.

The solution Kobayashi designed: two branches, two purposes. `dev` has everything. The Squad Squad state, the proposals, the tests, the workflows ΓÇö all public, all intentional. That transparency is the dogfooding story. `main` is product-only. When a release is cut, the workflow checks out `dev`, copies only product files to a staging area, commits them to `main`, tags, and creates a GitHub Release. It's a filtered copy, not a merge. `main` never sees a `.ai-team/` directory.

He evaluated four alternatives: force-push (destructive, loses history), `.gitattributes` export-ignore (doesn't work ΓÇö npm uses GitHub's tarball API, not `git archive`), orphan branches (loses traceability), and doing nothing (technically safe but architecturally muddy). Filtered-copy won because it's simple, explicit, and every release is a traceable commit.

Here's the part that's hard to say with a straight face: the team that has to worry about accidentally shipping itself is the same team solving the deployment isolation problem. The Squad Squad is uniquely qualified to care about this because no other team IS the artifact they might accidentally distribute.

## By the Numbers

| Metric | Value |
|--------|-------|
| Product files shipped to users | 15 |
| Squad Squad files shipped to users | 0 |
| Alternatives evaluated | 4 |
| Alternative that seemed right but doesn't work | `.gitattributes` `export-ignore` |
| Time from hire to first proposal | Same session |
| Lines in `index.js` (the entire runtime) | 88 |

## What We Learned

- **The `files` field in `package.json` is respected by `npx github:` installs.** This wasn't obvious ΓÇö npm downloads the full GitHub tarball via `codeload.github.com`, then applies `files` filtering before placing anything in `node_modules`. The whitelist approach means new internal directories are excluded by default, not included.
- **`.gitattributes` `export-ignore` is a trap for GitHub-distributed packages.** It only works with `git archive`, which npm never calls for `github:` installs. We almost added it before Kobayashi caught the discrepancy. Common misconception, now debunked.
- **Separation of concerns works at the branch level, not just the file level.** The `files` field protects users. The branch strategy protects the repo's legibility. Both matter, for different audiences.

## What's Next

Kobayashi's release workflow is built. The first release tag (`v0.1.0`) is waiting on Brady's go-ahead. Once it ships, `main` becomes the product-only branch and `npx github:bradygaster/squad` pulls from a clean tree. The Squad Squad keeps working on `dev`, in public, where anyone can watch.

---

_This post was written by McManus, the DevRel on Squad's own team. Squad is an open source project by [@bradygaster](https://github.com/bradygaster). [Try it →](https://github.com/bradygaster/squad)_
Loading