|
| 1 | +# Copilot Instructions — aw-author Plugin |
| 2 | + |
| 3 | +## Project Identity |
| 4 | + |
| 5 | +This is the **aw-author** Claude Code plugin (v1.3.0) for authoring, validating, and maintaining GitHub Agentic Workflow (gh-aw) markdown files. The repository lives at `zircote/github-agentic-workflows`. |
| 6 | + |
| 7 | +gh-aw workflows are markdown files with YAML frontmatter in `.github/workflows/`, compiled to `.lock.yml` via `gh aw compile`. This plugin provides the reference materials, skills, and automated pipelines that keep those workflows correct and current. |
| 8 | + |
| 9 | +## Repository Structure |
| 10 | + |
| 11 | +``` |
| 12 | +commands/ Slash command entry points (/aw-author, /aw-daily, /aw-merge, /aw-report, /aw-status, /aw-upgrade) |
| 13 | +skills/ |
| 14 | + aw-author/ Authoring skill + 9 reference files (the canonical gh-aw spec subset) |
| 15 | + aw-daily/ Autonomous daily pipeline skill + gap analysis references |
| 16 | + gh-aw-report/ Intelligence reporting skill + knowledge base + search queries |
| 17 | +agents/ |
| 18 | + aw-analyst.md Deep analysis agent for workflow review |
| 19 | +.github/workflows/ |
| 20 | + daily-intelligence.md Daily autonomous pipeline (gh-aw, fuzzy schedule) |
| 21 | + daily-intelligence.lock.yml Compiled workflow (DO NOT EDIT) |
| 22 | + weekly-develop-merge.md Weekly develop→main merge (gh-aw, fuzzy schedule) |
| 23 | + weekly-develop-merge.lock.yml Compiled workflow (DO NOT EDIT) |
| 24 | +outputs/gh-aw-reports/ Dated intelligence reports |
| 25 | +``` |
| 26 | + |
| 27 | +## Branching Strategy |
| 28 | + |
| 29 | +- **`main`** — stable, production branch |
| 30 | +- **`develop`** — daily automated updates land here via PR |
| 31 | +- **`daily-intelligence-YYYY-MM-DD`** — ephemeral feature branches created by `/aw-daily`, deleted after merge to `develop` |
| 32 | +- Weekly: `develop` merges to `main` via `/aw-merge` (squash merge, then develop resets to main) |
| 33 | + |
| 34 | +## Daily Pipeline (`.github/workflows/daily-intelligence.md`) |
| 35 | + |
| 36 | +This workflow runs daily around 07:00 (fuzzy schedule) and executes: |
| 37 | + |
| 38 | +1. **Research** — web fetch + GitHub API queries on 5 tracked repos (`github/gh-aw`, `github/github-mcp-server`, `github/copilot-cli`, `githubnext/agentics`, `zircote/github-agentic-workflows`) |
| 39 | +2. **Knowledge base update** — append stable facts to `skills/gh-aw-report/knowledge-base.md` |
| 40 | +3. **Discussion posting** — post report to Discussions in the "Project News" category |
| 41 | +4. **Gap analysis** — compare findings against 11 reference files in `skills/aw-author/references/` and `skills/gh-aw-report/references/` |
| 42 | +5. **Issue creation** — file issues for identified gaps (max 5 per run, dedup by `[aw-daily]` prefix) |
| 43 | +6. **Implementation** — edit reference files on a branch from `develop` |
| 44 | +7. **PR creation** — PR to `develop` with `Closes #NNN` links |
| 45 | +8. **Summary** — report what changed |
| 46 | + |
| 47 | +### Idempotency |
| 48 | + |
| 49 | +The pipeline checks before running: |
| 50 | +- Discussion titled `"gh-aw Intelligence Report — {today}"` already exists → skip research |
| 51 | +- PR with branch `daily-intelligence-{today}` exists → skip entirely |
| 52 | +- Issue with `[aw-daily]` prefix matching a gap → skip that issue |
| 53 | + |
| 54 | +### Safe-Output Constraints |
| 55 | + |
| 56 | +All write operations go through safe-outputs: |
| 57 | +- `create-discussion`: title-prefix `"gh-aw Intelligence Report — "`, category `"project news"`, max 1 |
| 58 | +- `create-issue`: title-prefix `"[aw-daily] "`, labels `[automated, reference-update]`, max 5 |
| 59 | +- `create-pull-request`: title-prefix `"docs(references): "`, base-branch `develop`, max 1 |
| 60 | +- `push-to-pull-request-branch`: target `"*"`, title-prefix `"docs(references): "`, labels `[automated]`, max 10 |
| 61 | +- `add-comment`: `discussions: false`, max 3 |
| 62 | +- `add-labels`: allowed `[automated, reference-update, intelligence]`, max 5 |
| 63 | + |
| 64 | +## Weekly Merge (`.github/workflows/weekly-develop-merge.md`) |
| 65 | + |
| 66 | +Runs weekly on Monday around 09:00. Checks if `develop` is ahead of `main`, creates a PR if so. Does NOT auto-merge — merge follows repository policy. |
| 67 | + |
| 68 | +## Reference Files — The Source of Truth |
| 69 | + |
| 70 | +The 9 files in `skills/aw-author/references/` are the canonical gh-aw specification subset for this plugin. They are the primary target of the daily pipeline's gap analysis and updates: |
| 71 | + |
| 72 | +| File | Content | |
| 73 | +|------|---------| |
| 74 | +| `frontmatter-schema.md` | Complete YAML frontmatter field reference (~2100 lines) | |
| 75 | +| `safe-outputs.md` | All safe-output types, parameters, constraints (~850 lines) | |
| 76 | +| `tools-reference.md` | Tool types and configuration (~470 lines) | |
| 77 | +| `production-gotchas.md` | Runtime gotchas verified through production debugging (~380 lines) | |
| 78 | +| `orchestration.md` | 7 orchestration patterns + engine model selection (~325 lines) | |
| 79 | +| `examples.md` | 5 annotated example workflows + minimal template (~430 lines) | |
| 80 | +| `validation.md` | Validation checklist, anti-patterns, debugging (~230 lines) | |
| 81 | +| `markdown-body.md` | Prose body writing guide + instruction files (~320 lines) | |
| 82 | +| `llms-resources.md` | Fetchable spec URLs (~87 lines) | |
| 83 | + |
| 84 | +## Critical Rules |
| 85 | + |
| 86 | +1. **Never edit `.lock.yml` files** — they are generated by `gh aw compile` |
| 87 | +2. **`add-comment` safe-outputs must include `discussions: false`** — omitting this causes HTTP 422 when the App lacks Discussions permission |
| 88 | +3. **`plugins:` frontmatter field is DEPRECATED** — use `dependencies:` and run `gh aw fix --write` |
| 89 | +4. **Write permissions are NOT allowed in `permissions:` block** — the compiler rejects them; all writes go through safe-outputs |
| 90 | +5. **Trigger field is `issues` (plural), not `issue`** |
| 91 | +6. **Event-triggered workflows need `reaction: eyes`** in the `on:` block |
| 92 | +7. **`${{ }}` expressions in fenced code blocks are NOT interpolated** — use env vars instead |
| 93 | +8. **Knowledge base is append-only** — mark superseded entries with `[SUPERSEDED by YYYY-MM-DD]`, never delete |
| 94 | +9. **Section headers are anchors, not line numbers** — the daily pipeline uses headers to locate edit targets because line numbers shift between runs |
| 95 | + |
| 96 | +## GitHub Discussion Category |
| 97 | + |
| 98 | +Reports post to the **Project News** category: |
| 99 | +- Category ID: `DIC_kwDORSXBr84C61Lr` |
| 100 | +- Repository: `zircote/github-agentic-workflows` |
| 101 | + |
| 102 | +## Tracked Repositories for Activity Queries |
| 103 | + |
| 104 | +| Repository | What to Extract | |
| 105 | +|-----------|-----------------| |
| 106 | +| `github/gh-aw` | New features, breaking changes, bug reports, version bumps | |
| 107 | +| `github/github-mcp-server` | Version changes, new tools, breaking changes | |
| 108 | +| `github/copilot-cli` | CLI updates, new agent modes | |
| 109 | +| `githubnext/agentics` | New sample workflows, pattern changes | |
| 110 | +| `zircote/github-agentic-workflows` | Self-referential activity | |
0 commit comments