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
8 changes: 8 additions & 0 deletions .changeset/automatic-squad-bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@bradygaster/squad-cli": minor
"@bradygaster/squad-sdk": minor
---

Install a dedicated seventh Agentic Workflow that automatically creates one
validated draft Cast pull request and one linked research-proposals issue after
the workflow installation lands on the repository's default branch.
11 changes: 7 additions & 4 deletions .github/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ gh aw add \
bradygaster/squad/workflows/squad-review.md@dev \
bradygaster/squad/workflows/squad-deps-worker.md@dev \
bradygaster/squad/workflows/squad-retro.md@dev \
bradygaster/squad/workflows/squad-improvement-worker.md@dev
bradygaster/squad/workflows/squad-improvement-worker.md@dev \
bradygaster/squad/workflows/squad-bootstrap.md@dev
```

This command:
Expand All @@ -49,10 +50,12 @@ This command:

### Verify installation

After running the command, confirm all six source/lock pairs exist and strict
After running the command, confirm all seven source/lock pairs exist and strict
compilation succeeds: Squad, Implement Worker, Review, Deps Worker, Retro and
Improvement Worker. The improvement worker is standard but dormant until an
exact human approval is relayed through the dispatcher.
Improvement Worker, plus the dedicated Bootstrap workflow. The improvement
worker is standard but dormant until an exact human approval is relayed through
the dispatcher. Bootstrap wakes after the installation lands on the default
branch and creates the linked draft Cast PR and research-proposals issue.

Retrospectives remain report/proposal-only by default. Ordinary auto-fixes need
`"squadRetroAutoImplement": "allow"` in `.squad/config.json`. A proposal restricted
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/squad-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,9 @@ jobs:
fi

# ── gh-aw strict compile gate ────────────────────────────────────────────
# Compiles all six Squad-authored workflow sources with --strict against a
# Compiles all seven Squad-authored workflow sources with --strict against a
# pinned compiler so the delivered stack is always proven compilable. All
# six workflows, including squad-improvement-worker, are distributed by the
# seven workflows, including squad-improvement-worker and squad-bootstrap, are distributed by the
# gh-aw-enlistment bootstrap skill/docs as part of the standard install --
# squad-improvement-worker stays dormant (approval-gated) until a maintainer
# authorizes a governance-scoped retrospective proposal, but it is not a
Expand Down Expand Up @@ -761,7 +761,7 @@ jobs:
cp -r workflows/. "$COMPILE_DIR/.github/workflows/"
git -C "$COMPILE_DIR" init --quiet

- name: Compile all six workflows (--strict) and verify lock files
- name: Compile all seven workflows (--strict) and verify lock files
# Failures accumulate rather than short-circuit so every result is
# visible in one run. A compiler that exits 0 without emitting a lock
# file is treated as failure — silent-success is a gate gap.
Expand All @@ -780,6 +780,15 @@ jobs:
FAILED=$((FAILED + 1))
fi
done
printf -- '--- Compiling squad-bootstrap ---\n'
if (cd "$COMPILE_DIR" && gh aw compile squad-bootstrap --strict --approve --no-check-update 2>&1); then
printf ' => OK\n'
echo "✅ \`squad-bootstrap\`" >> "$GITHUB_STEP_SUMMARY"
else
echo "::error::gh aw compile squad-bootstrap --strict failed"
echo "❌ \`squad-bootstrap\` compile failed" >> "$GITHUB_STEP_SUMMARY"
FAILED=$((FAILED + 1))
fi
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "### Lock files" >> "$GITHUB_STEP_SUMMARY"
for LOCK in squad.lock.yml squad-implement-worker.lock.yml squad-review.lock.yml squad-deps-worker.lock.yml squad-retro.lock.yml squad-improvement-worker.lock.yml; do
Expand All @@ -791,11 +800,18 @@ jobs:
echo "✅ \`$LOCK\`" >> "$GITHUB_STEP_SUMMARY"
fi
done
if [ ! -f "$COMPILE_DIR/.github/workflows/squad-bootstrap.lock.yml" ]; then
echo "::error::squad-bootstrap.lock.yml not emitted — compiler exited 0 without writing output"
echo "❌ missing: \`squad-bootstrap.lock.yml\`" >> "$GITHUB_STEP_SUMMARY"
FAILED=$((FAILED + 1))
else
echo "✅ \`squad-bootstrap.lock.yml\`" >> "$GITHUB_STEP_SUMMARY"
fi
if [ "$FAILED" -gt 0 ]; then
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "**❌ $FAILED failure(s) — gate fails closed**" >> "$GITHUB_STEP_SUMMARY"
echo "::error::$FAILED failure(s) — gate fails closed"
exit 1
fi
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "**✅ All six workflows compiled, all six lock files emitted**" >> "$GITHUB_STEP_SUMMARY"
echo "**✅ All seven workflows compiled, all seven lock files emitted**" >> "$GITHUB_STEP_SUMMARY"
49 changes: 28 additions & 21 deletions .squad-templates/skills/gh-aw-enlistment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tools:
when: "Every step: preflight identity/auth, enabling Actions-created PRs, opening and watching the bootstrap PR."
- name: "gh aw"
description: "GitHub Agentic Workflows extension (github/gh-aw) — installs and strictly compiles the Squad workflow set."
when: "Installing the six @dev workflows and compiling them into deterministic .lock.yml files."
when: "Installing the seven @dev workflows and compiling them into deterministic .lock.yml files."
---

## Context
Expand Down Expand Up @@ -99,7 +99,7 @@ git switch -c chore/squad-gh-aw-bootstrap
not part of the Squad set. `gh aw add` is additive; if you see it about to
replace an unrelated workflow, **STOP**.

### 3. Install the six supported workflows — in order, dispatcher first
### 3. Install the seven supported workflows — in order, dispatcher first

```bash
gh aw add \
Expand All @@ -108,24 +108,28 @@ gh aw add \
bradygaster/squad/workflows/squad-review.md@dev \
bradygaster/squad/workflows/squad-deps-worker.md@dev \
bradygaster/squad/workflows/squad-retro.md@dev \
bradygaster/squad/workflows/squad-improvement-worker.md@dev
bradygaster/squad/workflows/squad-improvement-worker.md@dev \
bradygaster/squad/workflows/squad-bootstrap.md@dev
```

Keep `squad.md` first: `gh aw add` discovers its worker/reviewer dependencies
while compiling it, and the explicit entries confirm the full surface without
creating duplicates. The installed top-level set is exactly:
creating duplicates. Keep `squad-bootstrap.md` last because it is the dedicated
post-install workflow rather than a dispatcher dependency. The installed
top-level set is exactly:

- `squad.md` + `squad.lock.yml`
- `squad-implement-worker.md` + `squad-implement-worker.lock.yml`
- `squad-review.md` + `squad-review.lock.yml`
- `squad-deps-worker.md` + `squad-deps-worker.lock.yml`
- `squad-retro.md` + `squad-retro.lock.yml`
- `squad-improvement-worker.md` + `squad-improvement-worker.lock.yml`
- `squad-bootstrap.md` + `squad-bootstrap.lock.yml`

`squad-improvement-worker` is part of the standard, coherent install above —
not a separate opt-in add-on. It stays dormant until a maintainer approves a
governance-scoped retrospective proposal (see the gh-aw guide's retrospective
auto-implementation section); installing it alongside the other five keeps the
auto-implementation section); installing it alongside the other six keeps the
full stack consistent and avoids a second bootstrap pass later.

Report/proposal-only is the default. Ordinary fixes require the explicit
Expand Down Expand Up @@ -179,22 +183,22 @@ gh aw compile --strict
This must run after any first-install approval and before committing. Success
criteria:

- All six workflows compile successfully.
- All seven workflows compile successfully.
- The **only** permitted warning is the known `squad.md` bot-trigger warning: it
configures both slash-command and `github-actions[bot]` triggers, and the bot
trigger is required for controlled worker-continuation dispatches.
- **STOP** on any error, or on **any additional warning** beyond that single
documented one.

### 6. Require all six source/lock pairs to exist
### 6. Require all seven source/lock pairs to exist

```bash
for workflow in squad squad-implement-worker squad-review squad-deps-worker squad-retro squad-improvement-worker; do
for workflow in squad squad-implement-worker squad-review squad-deps-worker squad-retro squad-improvement-worker squad-bootstrap; do
test -f ".github/workflows/${workflow}.md" || { echo "MISSING ${workflow}.md"; exit 1; }
test -f ".github/workflows/${workflow}.lock.yml" || { echo "MISSING ${workflow}.lock.yml"; exit 1; }
done

for runtime_module in squad-cast-validator squad-improvement-gate squad-retro-evidence squad-retro-provenance; do
for runtime_module in squad-cast-validator squad-bootstrap-validator squad-improvement-gate squad-retro-evidence squad-retro-provenance; do
test -f ".github/workflows/shared/${runtime_module}.mjs" || {
echo "MISSING shared/${runtime_module}.mjs"
exit 1
Expand All @@ -210,7 +214,7 @@ fi
```

- **STOP** and rerun `gh aw compile --strict` if any `.lock.yml` is missing. Do not
open or merge the bootstrap PR until all **twelve** files exist and strict
open or merge the bootstrap PR until all **fourteen** files exist and strict
compilation passes.
- **STOP** if any required `shared/*.mjs` runtime module is missing. The
dispatcher must install the complete transitive resource set; compile success
Expand All @@ -221,7 +225,7 @@ fi

> On Windows PowerShell, the `for`/`test -f` loop above is POSIX. Use an
> equivalent guard (e.g. `Test-Path`) or run it under Git Bash; the *logic* — all
> twelve files must exist — is what matters.
> fourteen files must exist — is what matters.

### 7. Inspect generated files, then stage only the documented surfaces

Expand Down Expand Up @@ -275,12 +279,13 @@ gh pr checks --watch

- **Never** merge the bootstrap PR yourself. Merge happens **only** after human
approval.
- Make the two-PR flow explicit to the user: `/squad cast` runs **only after the
bootstrap PR merges**. Casting analyzes the codebase and opens a **separate,
human-reviewed Cast PR** containing the team, routing, charters, the Copilot
agent, and `meet-the-squad.md`. If a work command (`/squad implement`,
`/squad review`) is run before a team exists, it auto-opens that Cast PR first —
merge it and rerun the original command; do not start a second cast.
- Make the two-PR flow explicit to the user: after the workflow-installation PR
reaches the default branch, `squad-bootstrap` automatically creates one
**draft, human-reviewed Cast PR** and one linked
`[Research Proposals] Agent-discovered repo opportunities` issue from the same
validated repository analysis. The user reviews and merges the Cast PR, then
follows the issue's `/squad research`, `/squad triage`, `/squad plan`, and
`/squad activate` instructions until assignable implementation issues exist.

## Examples

Expand All @@ -300,7 +305,8 @@ gh aw add \
bradygaster/squad/workflows/squad-review.md@dev \
bradygaster/squad/workflows/squad-deps-worker.md@dev \
bradygaster/squad/workflows/squad-retro.md@dev \
bradygaster/squad/workflows/squad-improvement-worker.md@dev
bradygaster/squad/workflows/squad-improvement-worker.md@dev \
bradygaster/squad/workflows/squad-bootstrap.md@dev

# Safe-update report shows ONLY the two documented secrets + squad-init → approve once
gh aw compile --strict --approve
Expand Down Expand Up @@ -361,6 +367,7 @@ gh pr merge --squash # auto-merge before human review. NEVER.
- ❌ **Clobbering existing workflows.** The install is additive; preserve unrelated
`.github/workflows/` files.
- ❌ **Widening the default token.** Keep `default_workflow_permissions=read`.
- ❌ **Auto-merging.** The bootstrap PR and the later Cast PR are both
human-reviewed. `/squad cast` runs only after the bootstrap PR merges.
- ❌ **Opening the PR before all twelve files exist and strict compile passes.**
- ❌ **Auto-merging.** The workflow-installation PR and automatic Cast PR are
both human-reviewed. The dedicated bootstrap wakes only after installation
lands on the default branch.
- ❌ **Opening the PR before all fourteen files exist and strict compile passes.**
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ gh aw add \
bradygaster/squad/workflows/squad-review.md@dev \
bradygaster/squad/workflows/squad-deps-worker.md@dev \
bradygaster/squad/workflows/squad-retro.md@dev \
bradygaster/squad/workflows/squad-improvement-worker.md@dev
bradygaster/squad/workflows/squad-improvement-worker.md@dev \
bradygaster/squad/workflows/squad-bootstrap.md@dev
git add -- \
.github/aw/ \
.github/skills/ \
Expand Down Expand Up @@ -597,7 +598,7 @@ Review the complete generated diff before you commit:

#### Retrospective auto-implementation (opt-in behavior)

`squad-improvement-worker` installs as part of the standard six-workflow
`squad-improvement-worker` installs as part of the standard seven-workflow
`gh aw add` command above — it is not a separate add-on. The two activation
policies are separate: `squad-retro` can auto-dispatch `squad-implement-worker` on its
own ordinary (non-proposal) action issues once you set
Expand Down
Loading
Loading