Skip to content

feat: split github-agentic-workflows.md into focused sub-files and update instructions-janitor#30351

Merged
pelikhan merged 1 commit intomainfrom
copilot/update-instruction-janitor-agentic-workflow
May 5, 2026
Merged

feat: split github-agentic-workflows.md into focused sub-files and update instructions-janitor#30351
pelikhan merged 1 commit intomainfrom
copilot/update-instruction-janitor-agentic-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

Summary

Splits the monolithic github-agentic-workflows.md (2959 lines, ~150KB) into focused sub-files optimized for agentic consumption, and updates the instructions-janitor workflow to maintain all of them.

Changes

New files

File Lines Content
.github/aw/syntax.md 932 Complete frontmatter schema — all fields, engine config, network, tools, imports, permission patterns
.github/aw/safe-outputs.md 1058 All safe-output types and global configuration
.github/aw/triggers.md 165 Trigger patterns — events, fuzzy scheduling, fork security, slash/label commands
.github/aw/context.md 200 Allowed GitHub context expressions + {{#if}} template conditionals

Updated files

.github/aw/github-agentic-workflows.md (2959 → 193 lines)

  • Ultra-compact overview with file format example, compilation commands, reference table linking all sub-files, key principles, and common pattern examples
  • The applyTo directive remains so it auto-loads for all workflow files

.github/workflows/instructions-janitor.md

  • Expanded scope: now maintains all .github/aw/*.md files, not just github-agentic-workflows.md
  • New step 3: File size audit (wc -l .github/aw/*.md) with documented target sizes and split decision criteria
  • Routes content updates to the correct sub-file (schema changes → syntax.md, safe-outputs → safe-outputs.md, etc.)
  • Updated bash allowlist: cat .github/aw/*.md, wc -l .github/aw/*.md, ls .github/aw/
  • Added file size limits: main file < 250 lines hard limit, sub-files < 1000 lines hard limit
  • Updated PR description template to include file size table
  • Timeout increased 15 → 20 minutes for expanded scope

Design Principles

  • No content lost: All content from the original 2959-line file is preserved in sub-files
  • No duplication: Each concept lives in exactly one file; cross-references link between them
  • Auto-loading preserved: The main file still has applyTo for workflow editing contexts; sub-files are loaded on demand
  • Consistent with existing structure: Follows the same pattern as network.md, memory.md, experiments.md

…date instructions-janitor

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0db7ba68-4bcb-4b40-8d2a-71bed9eda8ff

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan May 5, 2026 12:48
@pelikhan pelikhan marked this pull request as ready for review May 5, 2026 12:55
Copilot AI review requested due to automatic review settings May 5, 2026 12:55
@pelikhan pelikhan merged commit 178adc3 into main May 5, 2026
@pelikhan pelikhan deleted the copilot/update-instruction-janitor-agentic-workflow branch May 5, 2026 12:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Splits the large GitHub Agentic Workflows reference into smaller topic-focused docs and updates the instructions-janitor workflow to maintain the expanded .github/aw/ set.

Changes:

  • Added focused reference docs for syntax, safe outputs, triggers, and context/template expressions.
  • Reduced github-agentic-workflows.md to a compact entrypoint with examples, principles, and cross-links.
  • Expanded instructions-janitor to audit multiple instruction files, track file sizes, and route updates to the appropriate sub-file.
Show a summary per file
File Description
.github/workflows/instructions-janitor.md Broadens the janitor workflow’s scope, file-size policy, and maintenance instructions.
.github/workflows/instructions-janitor.lock.yml Regenerated compiled workflow reflecting the janitor workflow changes.
.github/aw/triggers.md New trigger reference covering events, fuzzy schedules, fork handling, and command-style triggers.
.github/aw/syntax.md New frontmatter/schema reference extracted from the monolithic guide.
.github/aw/safe-outputs.md New safe-outputs reference documenting handler types and global configuration.
.github/aw/github-agentic-workflows.md Shrinks the main guide into a concise overview and index to sub-files.
.github/aw/context.md New context-expression and template-conditional reference.

Copilot's findings

Tip

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

  • Files reviewed: 6/7 changed files
  • Comments generated: 6


**File size limits for agentic consumption:**
- **Main file** (`github-agentic-workflows.md`): Hard limit 250 lines. This is auto-loaded for all workflow files — keep it compact.
- **Sub-files**: Soft limit 500 lines, hard limit 1000 lines. Files approaching the hard limit should be reviewed for split opportunities.
Comment thread .github/aw/syntax.md
Comment on lines +176 to +183
- **`ignored-roles:`** - Roles exempt from rate limiting (array, default: `[admin, maintain, write]`). Set to `[]` to apply to all users.
- Example:

```yaml
rate-limit:
max: 5
window: 60
ignored-roles: [admin, maintain]
Comment thread .github/aw/syntax.md
- Example: `bots: [dependabot[bot], renovate[bot], github-actions[bot]]`
- Bot must be active (installed) on repository to trigger workflow
- **`strict:`** - Enable enhanced validation for production workflows (boolean, defaults to `true`)
- Must be `true`
```

### Output Processing Pattern (Recommended)
Always run `gh aw compile` after modifying frontmatter. Markdown body changes take effect immediately.
Comment on lines +64 to +66
- `upgrade` — Upgrade gh-aw version and dependencies (opens a PR)
- `safe_outputs` — Replay safe outputs from a previous run
- `create_labels` — Create any labels referenced in `safe-outputs`

**CI Triggering**: By default, PRs created with `GITHUB_TOKEN` do not trigger CI workflow runs. To trigger CI, set `github-token-for-extra-empty-commit` to a PAT with `Contents: Read & Write` permission, or to `"app"` to use the configured GitHub App. Alternatively, set the magic secret `GH_AW_CI_TRIGGER_TOKEN` to a suitable PAT — this is automatically used without requiring explicit configuration in the workflow.

When using `output.create-pull-request`, the main job does **not** need `contents: write` or `pull-requests: write` permissions since PR creation is handled by a separate job with appropriate permissions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants