aw-daily
Skill2 starsChanged 8 months agoMITView on GitHub
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".
- Commits and pushes
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- gh-aw-reportSkill
- aw-authorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
39 rules. About 0 are common, 19 are distinctive, and 20 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Verify gh CLI: gh auth status
- Distinctive: line 28
Verify clean working tree: git status --porcelain must be empty
- Distinctive: line 29
If dirty: ABORT -- "Working tree is dirty.
- Distinctive: line 45
Check if today's Discussion already exists:
- Very specific: line 49
If found and --skip-research not set: set RESEARCH_DONE=true, store URL as DISCUSSION_URL
- Distinctive: line 51
Check if today's PR already exists:
- Very specific: line 55
If found: report "Today's pipeline already completed.
- Very specific: line 65
Read .claude/skills/gh-aw-report/knowledge-base.md -- note the most recent entry date as LAST_DATE
- Very specific: line 66
Read .claude/skills/gh-aw-report/references/gh-aw-architecture.md for current known state
- Very specific: line 67
Read .claude/skills/gh-aw-report/references/search-queries.md for query library
- Very specific: line 68
Read .claude/skills/aw-daily/references/tracked-repos.md for GitHub activity query patterns
- Distinctive: line 133
Error mode: If zero results across all 8 web searches AND all GitHub queries return empty, ABORT -- "No intelligence data available.
- Very specific: line 140
Check existing entries in .claude/skills/gh-aw-report/knowledge-base.md for duplicates
- Distinctive: line 150
Error mode: If write fails, log warning and continue.
- Distinctive: line 178
Error mode: If GraphQL fails, log warning and continue.
- Very specific: line 184
Read .claude/skills/aw-daily/references/gap-analysis-targets.md to load the reference file inventory.
- Distinctive: line 190
Version numbers: Check tracked version locations against release data
- Distinctive: line 191
Deprecated features: Check if deprecated items are documented with warnings
- Distinctive: line 192
New features: Check if new safe-outputs, tools, fields, patterns are covered
- Distinctive: line 193
Corrections: Check if any findings contradict current content
- Distinctive: line 204
If no gaps found: report "No actionable gaps identified.
- Very specific: line 206
If --dry-run: report the gap list and stop (skip Phases 5-8).
- Distinctive: line 214
Check for existing open issue with matching title:
- Distinctive: line 218
If no existing issue, create one:
- Very specific: line 248
If --skip-implementation: report issue list and stop (skip Phases 6-8).
- Distinctive: line 250
Error mode: If issue creation fails for one gap, log warning and continue with remaining gaps.
- Distinctive: line 264
Read the target file
- Very specific: line 272
If an edit fails, revert that file: git checkout -- {file} and continue
- Very specific: line 274
Check if .claude/ mirror exists for any edited file.
- Distinctive: line 276
Verify changes make sense: git diff --stat should show only the expected files.
- Very specific: line 295
If --dry-run: show the diff but do not commit or push.
- Very specific: line 297
Error mode: If commit fails, leave branch for manual inspection.
- Very specific: line 332
When running as a gh-aw workflow, post-steps handles marking the draft PR ready for review automatically.
- Very specific: line 339
Error mode: If PR creation fails, report error.
- Distinctive: line 365
If any phase fails mid-execution:
- Very specific: line 367
If on a feature branch, switch back to ORIGINAL_BRANCH
- Distinctive: line 368
Do NOT delete the feature branch on failure -- leave for inspection
- Very specific: line 372
If Phases 1-3 succeeded but 4+ failed: re-run with --skip-research
- Very specific: line 373
If Phases 1-5 succeeded but 6+ failed: re-run with --skip-research (idempotency prevents duplicate issues)
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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 inoutputs/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 todevelop
Phase 0: Pre-flight & Idempotency
- Determine today's date:
date +%Y-%m-%d-> store asTODAY - Verify
ghCLI:gh auth status - Verify clean working tree:
git status --porcelainmust be empty- If dirty: ABORT -- "Working tree is dirty. Commit or stash before running /aw-daily."
- Capture current branch:
git branch --show-current-> store asORIGINAL_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 developIdempotency 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 asLAST_DATE - Read
.claude/skills/gh-aw-report/references/gh-aw-architecture.mdfor current known state - Read
.claude/skills/gh-aw-report/references/search-queries.mdfor query library - Read
.claude/skills/aw-daily/references/tracked-repos.mdfor 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:
# github/gh-aw -- issues, PRs, discussions
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
# github/github-mcp-server -- releases
gh release list --repo github/github-mcp-server --limit 5 --json tagName,publishedAt,name
# github/gh-aw -- discussions
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 } }
}
}}'
# zircote/github-agentic-workflows -- own activity
gh search issues --repo zircote/github-agentic-workflows --created ">=$LAST_DATE" --sort created --json title,url,labels,createdAt --limit 10Prioritize 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
## SourcesSave 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.mdfor 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 --statshould 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

