| name | aw-daily |
| description | Fully autonomous daily pipeline for the aw-author plugin. Executes intelligence
research (web search + GitHub activity queries), posts to Discussions, performs
gap analysis against reference files, creates issues, implements changes on
develop branch, creates PR, requests review, and auto-merges. Designed for
unattended execution with zero human intervention. Triggers on: "aw-daily",
"daily pipeline", "daily cycle", "autonomous update".
|
Autonomous Daily Intelligence Pipeline
You are an autonomous operations agent. Execute all phases below in order. If any phase fails, follow the error mode specified. Do not prompt the user for input at any point. This pipeline is designed for fully unattended execution.
Parse the argument string for optional flags:
--dry-run -- Research + gap analysis only, show diff, do not commit or PR
--skip-research -- Start at Phase 4 using the latest report in outputs/gh-aw-reports/
--skip-implementation -- Research + gap analysis + issues only, do not edit files or PR
--no-merge -- Create PR but do not auto-merge to develop
Phase 0: Pre-flight & Idempotency
- Determine today's date:
date +%Y-%m-%d -> store as TODAY
- Verify
gh CLI: gh auth status
- Verify clean working tree:
git status --porcelain must be empty
- If dirty: ABORT -- "Working tree is dirty. Commit or stash before running /aw-daily."
- Capture current branch:
git branch --show-current -> store as ORIGINAL_BRANCH
Ensure develop branch exists:
if ! git ls-remote --exit-code origin develop >/dev/null 2>&1; then
git checkout main
git checkout -b develop
git push -u origin develop
git checkout "$ORIGINAL_BRANCH"
fi
git fetch origin develop
Idempotency checks:
- Check if today's Discussion already exists:
EXISTING_DISCUSSION=$(gh api graphql -f query='{ repository(owner:"zircote", name:"github-agentic-workflows") { discussions(categoryId:"DIC_kwDORSXBr84C61Lr", first:5, orderBy:{field:CREATED_AT, direction:DESC}) { nodes { title url } } } }' -q ".data.repository.discussions.nodes[] | select(.title | contains(\"$TODAY\")) | .url")
If found and --skip-research not set: set RESEARCH_DONE=true, store URL as DISCUSSION_URL
- Check if today's PR already exists:
EXISTING_PR=$(gh pr list --repo zircote/github-agentic-workflows --base develop --search "daily-intelligence-$TODAY" --state all --json number,url -q '.[0].url')
If found: report "Today's pipeline already completed. PR: $EXISTING_PR" and exit successfully.
Phase 1: Research (Intelligence Sweep)
Skip if RESEARCH_DONE=true or --skip-research flag.
1a. Load context
- Read
.claude/skills/gh-aw-report/knowledge-base.md -- note the most recent entry date as LAST_DATE
- Read
.claude/skills/gh-aw-report/references/gh-aw-architecture.md for current known state
- Read
.claude/skills/gh-aw-report/references/search-queries.md for query library
- Read
.claude/skills/aw-daily/references/tracked-repos.md for GitHub activity query patterns
1b. Web searches
Execute the 8 primary sweep queries from the search query library:
- gh-aw core: releases, updates, breaking changes
- GitHub Actions AI features
- GitHub Copilot Workspace updates
- GitHub Copilot Agent Mode / CLI updates
- GitHub Models API changes
- GitHub MCP Server releases
- Claude Code x GitHub integrations
- Agentic CI/CD community patterns
For each query, extract: version numbers, release dates, feature descriptions, deprecation notices, breaking changes, source URLs.
1c. GitHub activity queries
Query tracked repositories for activity since LAST_DATE:
gh search issues --repo github/gh-aw --created ">=$LAST_DATE" --sort created --json title,url,labels,createdAt --limit 20
gh search prs --repo github/gh-aw --created ">=$LAST_DATE" --sort created --json title,url,labels,state,createdAt --limit 20
gh release list --repo github/github-mcp-server --limit 5 --json tagName,publishedAt,name
gh api graphql -f query='{ repository(owner:"github", name:"gh-aw") {
discussions(first:10, orderBy:{field:CREATED_AT, direction:DESC}) {
nodes { title url createdAt category { name } }
}
}}'
gh search issues --repo zircote/github-agentic-workflows --created ">=$LAST_DATE" --sort created --json title,url,labels,createdAt --limit 10
Prioritize items labeled breaking-change, deprecation, safe-output, engine, mcp.
1d. Synthesize report
Combine web search findings and GitHub activity into the standard report structure:
# gh-aw Ecosystem Intelligence Report -- {TODAY}
## Executive Summary
## 1. gh-aw Core
## 2. GitHub Actions AI
## 3. Copilot Workspace
## 4. Copilot Agent Mode
## 5. GitHub Models API
## 6. GitHub MCP Server
## 7. Claude Code x GitHub
## 8. Agentic CI/CD Community
## GitHub Activity Since {LAST_DATE}
## Deprecation Watch
## Recommended Actions
## Sources
Save to outputs/gh-aw-reports/{TODAY}.md. If file exists, append counter: {TODAY}-2.md.
Error mode: If zero results across all 8 web searches AND all GitHub queries return empty, ABORT -- "No intelligence data available. Check network and API access."
Phase 2: Knowledge Base Update
- Review findings for stable, persistent facts (version releases, deprecations, breaking changes, architecture changes)
- Check existing entries in
.claude/skills/gh-aw-report/knowledge-base.md for duplicates
- Append new entries using the format:
### YYYY-MM-DD -- category -- Title
Content
- Mark superseded entries with
[SUPERSEDED by YYYY-MM-DD]
Categories: version, deprecation, breaking-change, architecture, ecosystem, security, feature
Error mode: If write fails, log warning and continue. KB update is not blocking.
Phase 3: Discussion Posting
Skip if RESEARCH_DONE=true.
Post the report to GitHub Discussions:
REPO_ID=$(gh api graphql -f query='{ repository(owner:"zircote", name:"github-agentic-workflows") { id } }' -q '.data.repository.id')
DISCUSSION_URL=$(gh api graphql -f query='
mutation($repoId: ID!, $catId: ID!, $title: String!, $body: String!) {
createDiscussion(input: {repositoryId: $repoId, categoryId: $catId, title: $title, body: $body}) {
discussion { url }
}
}' \
-f repoId="$REPO_ID" \
-f catId="DIC_kwDORSXBr84C61Lr" \
-f title="gh-aw Intelligence Report -- $TODAY" \
-f body="$(cat outputs/gh-aw-reports/$TODAY.md)" \
-q '.data.createDiscussion.discussion.url')
Store DISCUSSION_URL for the final summary.
Error mode: If GraphQL fails, log warning and continue. Discussion posting is historical, not blocking.
Phase 4: Gap Analysis
Read .claude/skills/aw-daily/references/gap-analysis-targets.md to load the reference file inventory.
For each reference file in the inventory:
- Read the file
- Compare against today's research findings:
- Version numbers: Check tracked version locations against release data
- Deprecated features: Check if deprecated items are documented with warnings
- New features: Check if new safe-outputs, tools, fields, patterns are covered
- Corrections: Check if any findings contradict current content
- Produce a structured gap entry for each discrepancy:
GAP-{NNN}: {type} | {file} | {section} | {description} | {source}
Where type is: incorrect (priority 1), outdated (priority 2), missing (priority 3).
Sort gaps by priority. Limit to top 5 gaps per run to keep changes reviewable.
If no gaps found: report "No actionable gaps identified. Reference files are current." and skip to Phase 9.
If --dry-run: report the gap list and stop (skip Phases 5-8).
Phase 5: Issue Creation
For each gap (up to 5):
- Check for existing open issue with matching title:
EXISTING=$(gh search issues "[aw-daily]" --repo zircote/github-agentic-workflows --state open --json title -q ".[].title" | grep -c "GAP-{NNN}")
- If no existing issue, create one:
gh issue create \
--repo zircote/github-agentic-workflows \
--title "[aw-daily] GAP-{NNN}: {short description}" \
--body "## Gap Details
**Type:** {incorrect|outdated|missing}
**File:** \`{path}\`
**Section:** {section heading}
## Current Content
{excerpt of current content}
## Expected Content
{what should change based on research}
## Source
{URL or GitHub activity reference}
## Intelligence Report
{link to today's Discussion}
---
_Automated by /aw-daily on {TODAY}_" \
--label "automated,reference-update"
Store issue numbers for PR linking.
If --skip-implementation: report issue list and stop (skip Phases 6-8).
Error mode: If issue creation fails for one gap, log warning and continue with remaining gaps.
Phase 6: Implementation
- Switch to develop and create feature branch:
git checkout develop
git pull origin develop
git checkout -b daily-intelligence-{TODAY}
-
For each gap, ordered by priority:
- Read the target file
- Locate the section using header text as anchor (NOT line numbers)
- Apply the edit:
- Version updates: Find exact old string, replace with new
- New sections: Insert after the appropriate parent section
- Deprecation notices: Insert after the feature heading
- New table rows: Append to the table body
- Corrections: Replace incorrect content
- If an edit fails, revert that file:
git checkout -- {file} and continue
-
Check if .claude/ mirror exists for any edited file. If so, apply the same change there.
-
Verify changes make sense: git diff --stat should show only the expected files.
-
Stage and commit:
git add skills/ .claude/skills/
git commit -m "docs(references): daily intelligence update {TODAY}
{bullet per gap addressed}
Closes {#issue1}, {#issue2}, ...
Automated by /aw-daily"
- Push:
git push -u origin daily-intelligence-{TODAY}
If --dry-run: show the diff but do not commit or push.
Error mode: If commit fails, leave branch for manual inspection. Switch back to ORIGINAL_BRANCH.
Phase 7: PR Creation
gh pr create \
--draft \
--repo zircote/github-agentic-workflows \
--base develop \
--head daily-intelligence-{TODAY} \
--title "docs(references): daily intelligence update {TODAY}" \
--body "## Summary
Automated reference file updates from daily intelligence sweep.
## Gaps Addressed
{list with issue links using 'Closes #NNN' syntax}
## Intelligence Report
{DISCUSSION_URL}
## Changes
{git diff --stat output}
---
_Automated by /aw-daily_"
Store the PR URL and number.
When running as a gh-aw workflow, post-steps handles marking the draft PR ready for review automatically. When running locally via /aw-daily, mark it ready:
gh pr ready {PR_NUMBER}
The pipeline does NOT auto-merge. Merging is a separate review decision.
Error mode: If PR creation fails, report error. Leave branch for manual inspection. Switch back to ORIGINAL_BRANCH.
Phase 9: Final Summary
+--------------------------------------------------+
| /aw-daily complete |
+--------------------------------------------------+
| Date: {TODAY} |
| Searches: N web + M GitHub activity queries |
| Findings: N items across M domains |
| KB Updates: N new entries |
| Discussion: {DISCUSSION_URL} |
| Gaps Found: N (P incorrect, Q outdated, R new)|
| Issues: N created, M skipped (existing) |
| Files Changed: N |
| PR: {PR_URL} (ready for review) |
+--------------------------------------------------+
Error Recovery
If any phase fails mid-execution:
- Report the phase number, what failed, and why
- If on a feature branch, switch back to
ORIGINAL_BRANCH
- Do NOT delete the feature branch on failure -- leave for inspection
- Report what succeeded and what needs manual attention
Re-run guidance:
- If Phases 1-3 succeeded but 4+ failed: re-run with
--skip-research
- If Phases 1-5 succeeded but 6+ failed: re-run with
--skip-research (idempotency prevents duplicate issues)
- Same-day re-runs are safe -- idempotency checks prevent all duplicate work