Repository navigation
Closed
Labels
gh-awGitHub Agentic Workflows integrationGitHub Agentic Workflows integrationsquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membertype:epicParent issue that decomposes into sub-issuesParent issue that decomposes into sub-issuestype:featureNew capabilityNew capability
Description
Problem
Starting Squad from a fresh repo requires tribal knowledge:
- Users must know to create a separate Cast issue before a work-intent issue, then switch issues to run
/squad cast, wait for a PR, merge, and finally return to the original issue. - Partial activations and missing artifacts produce no recovery guidance — the user is left to guess what happened and what to run next.
Neither of these is discoverable from a first-time-evaluator perspective.
Desired Journey
User posts any normal work command (/squad research, /squad plan, etc.) on one issue. No separate Cast issue. No /squad cast command in normal flow.
1. User posts /squad research (or any work command) on their issue.
2. Squad detects .squad/ is absent.
3. Same run auto-pivots to Cast mode.
4. Squad posts two markers in sequence:
<!-- squad-pending-intent-v1 --> ← immutable; records original command
<!-- squad-cast-opened-v1 --> ← immutable; links PR when available
5. Cast PR body references: original issue number + original command.
6. User merges the Cast PR.
7. User reruns their original command on the same issue.
8. Squad detects .squad/ present + pending-intent marker → resumes.
First-run safe-output constraint: a same-run comment cannot embed the Cast PR number because the PR mutation is deferred and the number is not yet known. The first-run comment instructs the user to check the repository's Pull Requests tab. On rerun (before merge), Squad can query for the open Cast PR and post the direct link.
Universal Response Invariants
Every Squad comment must satisfy all four:
| # | Element | Rule |
|---|---|---|
| 1 | Current state | What stage/condition was detected |
| 2 | Result | What happened this run |
| 3 | Next action | Exactly one primary action |
| 4 | Recovery | Present on |
Additional rules:
- No success without verification. A stage is ✅ only after its artifact is confirmed present. If absent →
⚠️ with exact recovery instruction. - Additive idempotent retries. Re-running any non-acceptance step is safe and additive. Activation resumes from the last confirmed item.
- Exact N/M counts. Partial runs always report
N of M {items} created so faragainst the plan's declared total, not a system cap. - Squad owns product failures. Infrastructure failures are distinguished from Squad logic failures. User input is never blamed unless provably the sole cause.
- Marker names are implementation details. Never shown in user-facing copy on success paths.
Scope
In scope
| Slice | Description |
|---|---|
| Auto-Cast pivot + dedup | Detect absent .squad/; auto-run Cast in the same workflow run; deduplicate if Cast PR already open (no second PR on rerun) |
| Immutable marker protocol | squad-pending-intent-v1 (records original issue + command, written once, never overwritten) and squad-cast-opened-v1 (written once; first run omits PR number, rerun fills it) |
| Cast PR origin reference | Cast PR body must cite the originating issue number and the exact original command |
| Partial activation copy hardening | N of M issues created; rerun to continue — counts relative to plan total; current caps (75 create-issue / 20 add-comment per run) never surfaced |
| Structural tests | Unit tests covering: prerequisite detection logic, pending-intent marker write-once semantics, Cast PR dedup, resume detection |
| E2E test | Full one-issue journey: empty repo → work command → Cast PR → merge → rerun → research complete |
Explicit non-goals
- No install redesign.
gh aw add bradygaster/squad/workflows/squad.md@devis the approved install path. No changes. - No automatic post-merge execution. Squad does not self-trigger after a Cast PR merges. The user reruns the original command.
- No new relay workflow or cross-workflow triggers.
- No dashboard or status UI.
- No blanket delegation of Cast to a sub-agent.
Acceptance Criteria
| # | Criterion | Observable outcome |
|---|---|---|
| AC-1 | One-issue E2E | User posts /squad research on a fresh repo; Squad auto-Casts; PR opens; user merges + reruns; research artifact is present |
| AC-2 | Unmerged rerun dedup | User reruns before merging; no second Cast PR is opened; existing PR link is posted |
| AC-3 | Merge + rerun → research | After Cast PR merge, rerunning the original work command executes research successfully |
| AC-4 | Interrupted Cast recovery | If Cast PR was opened by a previous run (PR exists, .squad/ absent), running any work command reruns dedup check and re-posts the PR link — no duplicate PR |
| AC-5 | Missing artifact guidance | If a stage completes but its artifact cannot be confirmed, response is |
| AC-6 | Partial activation N/M | Plan with > 75 tasks: first activation run posts N of M issues created; rerun to continue; second run resumes correctly |
| AC-7 | No duplicate PRs or issues | No test run produces duplicate Cast PRs or duplicate activation issues |
| AC-8 | Current caps honoured | create-issue cap 75 per run; add-comment cap 20 per run; no run exceeds these |
Evidence / Release Gate
Before this issue can be marked done:
- Fresh-repo E2E walkthrough — screencast or step-by-step log showing AC-1 through AC-4 with exact comment text.
- Structural test suite passes — all tests in AC-5 through AC-8 green.
- No regression on existing Cast + plan + activate flows in repos that already have
.squad/.
Metadata
Metadata
Assignees
Labels
gh-awGitHub Agentic Workflows integrationGitHub Agentic Workflows integrationsquadSquad triage inbox — Lead will assign to a memberSquad triage inbox — Lead will assign to a membertype:epicParent issue that decomposes into sub-issuesParent issue that decomposes into sub-issuestype:featureNew capabilityNew capability
Activity
github-actions commentedon Aug 12, 2026
📋 Assigned to INCO (CLI UX & Visual Design)
Issue: #1689 — feat(gh-aw): auto-cast and guide resumable work from a single issue
INCO will pick this up in the next Copilot session.
fix(workflow): Team Guard reads committed HEAD state via git show (#1689
fix(workflows): persist planning state with safe output data
feat(gh-aw): auto-cast and guide resumable work from one issue (githu…