Skip to content

Commit 4cc2f90

Browse files
docs: update docs for 2026-04-03 merged features (#24377)
- Fix add-wizard incorrectly listed as supporting --create-pull-request in the GHES paragraph (closes #24312) - Document compile --json labels field and create_labels maintenance operation (from #24341) - Document logs --train flag and audit report Agent Event Pattern Analysis section (from #24328) - Document agent_usage.json token artifact in compilation-process reference (from #24315) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bf6e774 commit 4cc2f90

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

docs/src/content/docs/guides/ephemerals.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,18 @@ See [Safe Outputs Reference](/gh-aw/reference/safe-outputs/) for complete docume
8989

9090
### Manual Maintenance Operations
9191

92-
The generated `agentics-maintenance.yml` workflow also supports manual bulk operations via `workflow_dispatch`. Admin or maintainer users can trigger it from the GitHub Actions UI or the CLI to disable or enable all agentic workflows in the repository at once. The operation is restricted to admin and maintainer roles and is not available on forks.
92+
The generated `agentics-maintenance.yml` workflow also supports manual bulk operations via `workflow_dispatch`. Admin or maintainer users can trigger it from the GitHub Actions UI or the CLI. The operation is restricted to admin and maintainer roles and is not available on forks.
93+
94+
Available operations:
95+
96+
| Operation | Description |
97+
|-----------|-------------|
98+
| `safe_outputs` | Auto-close expired issues, discussions, and pull requests |
99+
| `disable` | Disable all agentic workflows in the repository |
100+
| `enable` | Re-enable all agentic workflows in the repository |
101+
| `create_labels` | Create any repository labels referenced in safe-outputs that do not yet exist. Runs `gh aw compile --json --no-emit`, collects all unique label names across workflows, and creates missing ones with deterministic pastel colors. |
102+
103+
The `create_labels` operation requires `issues: write` permission and runs in a dedicated job. It is useful when adding new workflows that reference labels that have not yet been created in the repository.
93104

94105
### Close Older Issues
95106

docs/src/content/docs/reference/compilation-process.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ Workflows generate several artifacts during execution:
250250
| Artifact | Location | Purpose | Lifecycle |
251251
|----------|----------|---------|-----------|
252252
| **agent_output.json** | `/tmp/gh-aw/safeoutputs/` | AI agent output with structured safe output data (create_issue, add_comment, etc.) | Uploaded by agent job, downloaded by safe output jobs, auto-deleted after 90 days |
253+
| **agent_usage.json** | `/tmp/gh-aw/` | Aggregated token counts: `{"input_tokens":…,"output_tokens":…,"cache_read_tokens":…,"cache_write_tokens":…}` | Bundled in the unified agent artifact when the firewall is enabled; accessible to third-party tools without parsing step summaries |
253254
| **prompt.txt** | `/tmp/gh-aw/aw-prompts/` | Generated prompt sent to AI agent (includes markdown instructions, imports, context variables) | Retained for debugging and reproduction |
254255
| **firewall-logs/** | `/tmp/gh-aw/firewall-logs/` | Network access logs in Squid format (when `network.firewall:` enabled) | Analyzed by `gh aw logs` command |
255256
| **cache-memory/** | `/tmp/gh-aw/cache-memory/` | Persistent agent memory across runs (when `tools.cache-memory:` configured) | Restored at start, saved at end via GitHub Actions cache |

docs/src/content/docs/setup/cli.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ gh aw logs workflow --repo github.enterprise.com/owner/repo # Use with comm
7777

7878
For GHE Cloud with data residency (`*.ghe.com`), see the dedicated [Debugging GHE Cloud guide](/gh-aw/troubleshooting/debug-ghe/) for setup and troubleshooting steps.
7979

80-
Commands that support `--create-pull-request` (such as `gh aw add`, `gh aw add-wizard`, `gh aw init`, `gh aw update`, and `gh aw upgrade`) automatically detect the enterprise host from the git remote and route PR creation to the correct GHES instance. No extra flags are needed.
80+
Commands that support `--create-pull-request` (such as `gh aw add`, `gh aw init`, `gh aw update`, and `gh aw upgrade`) automatically detect the enterprise host from the git remote and route PR creation to the correct GHES instance. No extra flags are needed.
8181

8282
`gh aw audit` and `gh aw add-wizard` also auto-detect the GHES host from the git remote, so running them inside a GHES repository works without setting `GH_HOST` manually.
8383

@@ -254,10 +254,12 @@ gh aw compile --dependabot # Generate dependency manifests
254254
gh aw compile --purge # Remove orphaned .lock.yml files
255255
```
256256

257-
**Options:** `--validate`, `--strict`, `--fix`, `--zizmor`, `--dependabot`, `--json`, `--watch`, `--purge`, `--stats`
257+
**Options:** `--validate`, `--strict`, `--fix`, `--zizmor`, `--dependabot`, `--json`, `--no-emit`, `--watch`, `--purge`, `--stats`
258258

259259
**Error Reporting:** Displays detailed error messages with file paths, line numbers, column positions, and contextual code snippets.
260260

261+
**JSON Output (`--json`):** Emits an array of `ValidationResult` objects. Each result includes a `labels` field listing all repository labels referenced in safe-outputs (`create-issue.labels`, `create-discussion.labels`, `create-pull-request.labels`, `add-labels.allowed`). Use `--json --no-emit` to collect label references without writing compiled files.
262+
261263
**Dependabot Integration (`--dependabot`):** Generates dependency manifests and `.github/dependabot.yml` by analyzing runtime tools across all workflows. See [Dependabot Support reference](/gh-aw/reference/dependabot/).
262264

263265
**Strict Mode (`--strict`):** Enforces security best practices: no write permissions (use [safe-outputs](/gh-aw/reference/safe-outputs/)), explicit `network` config, no wildcard domains, pinned Actions, no deprecated fields. See [Strict Mode reference](/gh-aw/reference/frontmatter/#strict-mode-strict).
@@ -380,7 +382,14 @@ gh aw logs "CI Failure Doctor" # Display name
380382
gh aw logs "ci failure doctor" # Case-insensitive display name
381383
```
382384

383-
**Options:** `-c`, `--count`, `-e`, `--engine`, `--start-date`, `--end-date`, `--ref`, `--parse`, `--json`, `--repo`, `--firewall`, `--no-firewall`, `--safe-output`, `--filtered-integrity`, `--after-run-id`, `--before-run-id`, `--no-staged`, `--tool-graph`, `--timeout`
385+
**`--train` flag:** Trains log template weights from the downloaded runs and writes `drain3_weights.json` to the logs output directory. The trained weights improve anomaly detection accuracy in subsequent `gh aw audit` and `gh aw logs` runs. To embed weights into the binary as defaults, copy the file to `pkg/agentdrain/data/default_weights.json` and rebuild.
386+
387+
```bash wrap
388+
gh aw logs --train # Train on last 10 runs
389+
gh aw logs my-workflow --train -c 50 # Train on up to 50 runs of a specific workflow
390+
```
391+
392+
**Options:** `-c`, `--count`, `-e`, `--engine`, `--start-date`, `--end-date`, `--ref`, `--parse`, `--json`, `--train`, `--repo`, `--firewall`, `--no-firewall`, `--safe-output`, `--filtered-integrity`, `--after-run-id`, `--before-run-id`, `--no-staged`, `--tool-graph`, `--timeout`
384393

385394
#### `audit`
386395

@@ -450,6 +459,8 @@ gh aw audit report --repo owner/repo --last 10 # Report on a specif
450459

451460
Output is Markdown by default (suitable for security reviews, piping to files, or `$GITHUB_STEP_SUMMARY`).
452461

462+
The report includes an **Agent Event Pattern Analysis** section that mines log templates across runs using an online clustering algorithm. It surfaces distinct event patterns, stage sequences, and anomalies (new templates, low-similarity events, rare clusters) with severity indicators.
463+
453464
**Options:** `--workflow/-w` (filter by workflow name or filename), `--last` (number of recent runs to analyze; default: 20, max: 50), `--format` (markdown, pretty; default: markdown), `--json`, `--repo/-r`
454465

455466
#### `health`

0 commit comments

Comments
 (0)