Skip to content

Add squad-game-planner daily agentic workflow - #50055

Merged
pelikhan merged 9 commits into
mainfrom
copilot/add-daily-agentic-workflow
Aug 3, 2026
Merged

Add squad-game-planner daily agentic workflow#50055
pelikhan merged 9 commits into
mainfrom
copilot/add-daily-agentic-workflow

Conversation

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Adds a daily agentic workflow that uses Squad multi-agent planning to design a new game concept and file the plan as tracked, expiring GitHub issues.

Workflow

  • .github/workflows/squad-game-planner.md (+ compiled .lock.yml), triggered on schedule: daily and workflow_dispatch
  • Engine: copilot with agent: squad and copilot-sdk: true — Squad orchestrates its own sub-agents heavily, so the Copilot SDK sidecar is enabled
  • Permissions kept read-only (contents: read, issues: read) plus copilot-requests: write for Copilot to authenticate with ${{ github.token }}

Squad bootstrap

  • .github/scripts/setup-squad.sh installs a pinned release (@bradygaster/squad-cli@0.11.0) via npm and runs squad init --preset default (idempotent) to scaffold .squad/ and .github/agents/squad.agent.md
  • Wired in as a pre-agent steps: block (Node.js setup + this script) so the repo is fully initialized before Copilot launches with --agent squad

Issue lifecycle

  • safe-outputs.create-issue labels every issue squad:plan, uses group: true to file a parent issue with linked sub-issues per workstream
  • expires: 1 auto-closes issues after one day
  • close-older-issues: true closes issues from the previous run so the tracker only reflects the latest plan
safe-outputs:
  create-issue:
    title-prefix: "[squad:plan] "
    labels: [squad:plan]
    group: true
    expires: 1
    close-older-issues: true
    close-older-key: squad-game-planner

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan

pelikhan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot

  • move all the squad specific frontmatter/prompt into a shared agentic workflow shared/squad.md to be imported
  • the squad init command should be run in the activation job so that it gets packaged with the rest of the prompt/skills/... and copied to the agent job. Squad should NOT be installed in the agent job.
  • the shared agentic workflows should support inputs for custom squad github token or custom github app information so that the squad cli running the "init" command can access other orgs/private repos.

…on job

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

  • move all the squad specific frontmatter/prompt into a shared agentic workflow shared/squad.md to be imported
    ...

Done in 4e3b2b0 (commit hash may differ after push):

  • Squad-specific config now lives in .github/workflows/shared/squad.md, imported via imports: [shared/squad.md] from squad-game-planner.md (only engine:, permissions:, safe-outputs: and the game-planning prompt remain in the main workflow, since engine: isn't a mergeable import field).
  • squad init now runs entirely in jobs.activation.pre-steps of the shared component (checkout, npm install of the pinned @bradygaster/squad-cli, squad init --preset default), then uploads .squad/ and .github/agents/squad.agent.md as a squad-state artifact. The agent job only downloads/restores that artifact after its real checkout — Squad CLI is never installed in the agent job.
  • Added optional squad-github-token, squad-github-app-id, squad-github-app-private-key, squad-github-app-owner import inputs; if the App id is set, a GitHub App installation token is minted for squad init, falling back to the custom token, then the default token.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR Triage: #50055

  • Category: feature
  • Risk: low
  • Score: 28/100 (Impact 15 + Urgency 5 + Quality 8)
  • Recommended action: defer
  • Batch: pr-batch:new-workflows

Draft PR adding a new daily agentic workflow (1905 lines added, no deletions). Non-critical, low urgency.

Generated by 🔧 PR Triage Agent · auto · 51.1 AIC · ⌖ 4.08 AIC · ⊞ 8K ·

@pelikhan

pelikhan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot the squad shared agentic workflow should be self contained with all scripts inlined. No separate file

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot the squad shared agentic workflow should be self contained with all scripts inlined. No separate file

Done — removed shared/squad.md and inlined the entire Squad bootstrap (checkout, Node setup, App token minting, CLI install, squad init, artifact upload/restore) directly into squad-game-planner.md. No separate file.

@pelikhan

pelikhan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot refactor the agentic worfklow in the "game" part and the "squad" configuration part (to be imported). Split in 2 .md file

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

@copilot refactor the agentic worfklow in the "game" part and the "squad" configuration part (to be imported). Split in 2 .md file

Done — split into squad-game-planner.md (engine, permissions, safe-outputs, game prompt) and shared/squad.md (network, activation bootstrap, tools, restore step), imported via imports: [shared/squad.md]. Scripts stay inlined in shared/squad.md, no separate script file.

Comment thread .github/workflows/shared/squad.md Outdated
- name: Install Squad CLI
run: |
set -euo pipefail
npm install -g "@bradygaster/squad-cli@0.11.0"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot allow override version through environment variable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7c2c9b8 — added SQUAD_CLI_VERSION env var override (defaults to 0.11.0 if unset).

Comment thread .github/workflows/shared/squad.md Outdated
Comment on lines +35 to +36
- name: Checkout repository for Squad bootstrap
uses: actions/checkout@v7.0.1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot checkout already happens in activation job

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7c2c9b8 — removed the redundant checkout step from shared/squad.md.

Comment thread .github/workflows/shared/squad.md Outdated
Comment on lines +78 to +79
tools:
bash: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot move tools to squad-game .md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7c2c9b8tools: now lives in squad-game-planner.md.

Comment thread .github/workflows/squad-game-planner.md Outdated
Comment on lines +13 to +16
engine:
id: copilot
agent: squad
copilot-sdk: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot move to shared/squad.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7c2c9b8engine: now lives in shared/squad.md.

Comment thread .github/workflows/shared/squad.md Outdated
Comment on lines +28 to +30
network:
allowed:
- node

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove next section in this file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 7c2c9b8 — removed the network: allowed: [node] section from shared/squad.md.

…ze engine/tools/network

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan August 3, 2026 20:27
@pelikhan

pelikhan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot keep working

Comment thread .github/workflows/shared/squad.md Outdated
Comment on lines +23 to +26
engine:
id: copilot
agent: squad
copilot-sdk: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In copilot, you can remove these frontmatter entries since gh-aw doesn’t need any CLI when it’s running as part of copilot. It only needs to be installed in the activation-job.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed copilot-sdk: true from the engine config in commit 4f9... (see latest push). --agent squad runs through the standard Copilot CLI harness without the SDK sidecar; Squad CLI install/init stays confined to the activation job.

@pelikhan

pelikhan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@copilot Apply pull-request review comments from Pelican.

…quad

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan August 3, 2026 21:11
@pelikhan
pelikhan marked this pull request as ready for review August 3, 2026 21:32
Copilot AI review requested due to automatic review settings August 3, 2026 21:32
@pelikhan
pelikhan merged commit 57d128a into main Aug 3, 2026
5 checks passed
@pelikhan
pelikhan deleted the copilot/add-daily-agentic-workflow branch August 3, 2026 21:32
Copilot stopped reviewing on behalf of pelikhan due to an error August 3, 2026 21:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.

Adds a new Agentic Workflows “Squad Game Planner” scheduled workflow that boots a Squad team during activation, then uses the restored team state to generate and file a daily game concept plan as tracked issues.

Changes:

  • Add squad-game-planner workflow source (.md) and compiled lock workflow (.lock.yml).
  • Introduce a shared shared/squad.md component to bootstrap Squad in activation and restore state in the agent job.
  • Update action pin data to include actions/create-github-app-token@v2.
Show a summary per file
File Description
pkg/workflow/data/action_pins.json Adds a pin entry for actions/create-github-app-token@v2.
pkg/actionpins/data/action_pins.json Mirrors the new actions/create-github-app-token@v2 pin entry.
.github/workflows/squad-game-planner.md Defines the new scheduled Squad planning workflow behavior, permissions, tools, and safe outputs.
.github/workflows/squad-game-planner.lock.yml Compiled workflow used by GitHub Actions / gh-aw execution.
.github/workflows/shared/squad.md Shared component to initialize Squad during activation and restore state for the agent job.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/5 changed files
  • Comments generated: 4
  • Review effort level: Lite

Comment on lines +9 to +13
permissions:
contents: read
issues: read
pull-requests: read
copilot-requests: write
Comment on lines +140 to +148
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
if-no-files-found: ignore
include-hidden-files: true
name: squad-state
path: |
.squad
.github/agents/squad.agent.md
retention-days: 1.0
Comment on lines +1454 to +1457
_GH_AW_CHROOT_JSON=$(jq -c --arg src "${RUNNER_TEMP}/gh-aw" --arg user "$(id -un)" --argjson uid "$(id -u)" --argjson gid "$(id -g)" --arg home "${RUNNER_TEMP}/gh-aw/home" '.chroot={"binariesSourcePath":$src,"identity":{"user":$user,"uid":$uid,"gid":$gid,"home":$home}}' "${RUNNER_TEMP}/gh-aw/awf-config.json") || { echo "chroot config patch failed" >&2; exit 1; }
printf '%s\n' "$_GH_AW_CHROOT_JSON" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
printf '%s\n' "$_GH_AW_CHROOT_JSON" > "${RUNNER_TEMP}/gh-aw/awf-config.json"
fi
Comment on lines +46 to +50
"actions/create-github-app-token@v2": {
"repo": "actions/create-github-app-token",
"version": "v2",
"sha": "fee1f7d63c2ff003460e3d139729b119787bc349"
},
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants