Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8456717
feat: Phase 0 — install and initialize gh-aw in .github-private (clos…
May 18, 2026
788f6cd
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 18, 2026
8d5ac05
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 18, 2026
2136990
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 18, 2026
0472e86
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 19, 2026
6d3902c
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 19, 2026
b0707af
chore: apply manual instructions [skip ci-relay]
donpetry-bot May 19, 2026
f3c344c
chore: apply manual instructions [skip ci-relay]
donpetry-bot May 19, 2026
7af2259
fix(ci): auto-fix for SonarCloud Code Analysis [skip ci-relay]
donpetry-bot May 19, 2026
af09072
fix(ci): auto-fix for SonarCloud Code Analysis [skip ci-relay]
donpetry-bot May 19, 2026
c3d3eaa
chore: apply manual instructions [skip ci-relay]
donpetry-bot May 19, 2026
4d5637c
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 19, 2026
c8080c0
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 19, 2026
59b0e8f
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 19, 2026
9d2f609
fix(reviews): address review comments [skip ci-relay]
donpetry-bot May 19, 2026
9edb44f
fix(reviews): address review comments [skip ci-relay]
donpetry-bot May 19, 2026
8c12622
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
3db690c
fix(reviews): address review comments [skip ci-relay]
donpetry-bot May 20, 2026
ace0631
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
04ee301
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
21cc4c4
fix(reviews): address review comments [skip ci-relay]
donpetry-bot May 20, 2026
13479f7
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
23556eb
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
e16e7ca
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
ff2fc97
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
cba0449
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
a7bb213
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
5e2b544
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
8bf73b4
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
a900c25
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
bf14278
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
2d51e10
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
a74527e
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
760d1f9
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
e5fd179
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
3c94ddb
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
6c5d13a
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
72b5dd2
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
08568df
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
210931e
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
2ba36c7
Merge branch 'main' into dev-lead/issue-230-20260518-1642
don-petry May 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/agents/agentic-workflows.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
Comment thread
don-petry marked this conversation as resolved.
Resolved
Comment thread
don-petry marked this conversation as resolved.
Resolved
name: agentic-workflows
Comment thread
don-petry marked this conversation as resolved.
Resolved
description: >
Dispatcher for gh-aw agentic workflows in petry-projects/.github-private.
Routes GitHub events to the appropriate workflow definition and executes
them using Claude as the engine.
engine: claude
tools: ["read", "search", "execute"]
Comment thread
don-petry marked this conversation as resolved.
Resolved
Comment thread
don-petry marked this conversation as resolved.
Resolved
Comment thread
don-petry marked this conversation as resolved.
Resolved
---

You are the agentic workflow dispatcher for `petry-projects/.github-private`.

## Engine

This dispatcher uses Claude via `CLAUDE_CODE_OAUTH_TOKEN` as the execution engine.
Comment thread
don-petry marked this conversation as resolved.
Resolved

## Workflows

Dispatch to the appropriate workflow based on the GitHub event context:
Comment thread
don-petry marked this conversation as resolved.
Resolved

- `issue-triage` — triages newly opened issues, applies labels, and routes to the right team
- `ci-failure-analyst` — analyzes CI failures on PRs and posts a root-cause summary

## Dispatch rules

1. Read the incoming event payload from context
2. Match against available workflow definitions in `.github/workflows/*.md`
3. Execute the matched workflow with the event payload
4. Post results back to the triggering issue, PR, or workflow run

## Constraints

- Never modify `.github/workflows/agent-shield.yml`
- Follow org standards in `AGENTS.md` and `petry-projects/.github/AGENTS.md`
- Use `GITHUB_TOKEN` for GitHub API calls; use `CLAUDE_CODE_OAUTH_TOKEN` for Claude invocations
- Do not store or log secrets
17 changes: 17 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,20 @@

- name: Run tests
run: bats tests/fleet_report.bats

gh-aw-compile:
runs-on: ubuntu-latest
timeout-minutes: 5
Comment thread
don-petry marked this conversation as resolved.
Resolved
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install gh-aw
run: curl -sL https://raw.githubusercontent.com/github/gh-aw/main/install-gh-aw.sh | bash

Check failure on line 45 in .github/workflows/lint.yml

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Avoid executing downloaded artifacts directly without verification.

See more on https://sonarcloud.io/project/issues?id=petry-projects_.github-private&issues=AZ47-tOk9uEar6Ax7lDi&open=AZ47-tOk9uEar6Ax7lDi&pullRequest=276
Comment thread
don-petry marked this conversation as resolved.
Resolved
Comment thread
don-petry marked this conversation as resolved.
Resolved

- name: Compile agentic workflows
run: |
if ls .github/workflows/*.md > /dev/null 2>&1; then
Comment thread
don-petry marked this conversation as resolved.
Resolved
gh aw compile
Comment thread
don-petry marked this conversation as resolved.
Resolved
Comment thread
don-petry marked this conversation as resolved.
Resolved
else
echo "No .github/workflows/*.md files found — skipping compile."
fi
70 changes: 70 additions & 0 deletions tests/aw/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Agentic Workflow Tests

This directory contains scenario specs and smoke tests for `gh-aw` agentic workflows.

## Test methodology

Tests follow a three-level approach:

1. **Compile validation (CI gate)** — `gh aw compile` runs on every PR that touches `.github/workflows/*.md`. A compile failure blocks merge. No runtime required.

2. **Staged smoke tests (pre-merge)** — Run a workflow against a fixture payload without posting real GitHub API side-effects. Use `--staged` to dry-run:
```
gh aw run <workflow-name> --staged --payload tests/aw/<workflow-name>/fixtures/<fixture>.json
Comment thread
don-petry marked this conversation as resolved.
Resolved
```
Smoke tests assert that the workflow reaches the expected terminal state and produces the expected output structure.
Comment thread
don-petry marked this conversation as resolved.
Resolved

3. **Integration tests (manual / scheduled)** — Execute against a real GitHub event in a sandbox repo. Reserved for release-gate validation; not required on every PR.

## Scenario spec format

Write scenario specs **before** the workflow markdown. Each spec lives in `tests/aw/<workflow-name>/` as a plain markdown file:

```
tests/aw/<workflow-name>/
README.md ← scenario specs (this pattern)
fixtures/ ← JSON payloads matching GitHub webhook schemas
smoke.sh ← staged smoke test runner (optional)
```

A scenario spec block:

```markdown
### Scenario: <name>

**Given** <precondition>
**When** <event / trigger>
**Then** <expected outcome>

**Fixture:** `fixtures/<name>.json`
```

## Running compile validation locally

```bash
curl -sL https://raw.githubusercontent.com/github/gh-aw/main/install-gh-aw.sh | bash
Comment thread
don-petry marked this conversation as resolved.
Resolved
gh aw compile
```

The compile step validates all `*.md` files in `.github/workflows/` against the gh-aw schema. It does not invoke Claude or make API calls.
Comment thread
don-petry marked this conversation as resolved.
Resolved

## Running staged smoke tests

```bash
# Run a single workflow against a fixture payload
gh aw run issue-triage --staged --payload tests/aw/issue-triage/fixtures/new-bug.json

# Run all smoke tests for a workflow
bash tests/aw/issue-triage/smoke.sh
```

## Definition of Done checklist

A workflow is ready to merge when:

- [ ] Scenario specs written in `tests/aw/<name>/README.md` before implementation starts
- [ ] `gh aw compile` passes with no errors
- [ ] At least one fixture payload exists under `tests/aw/<name>/fixtures/`
- [ ] Staged smoke test passes: `gh aw run <name> --staged` exits 0
- [ ] CI lint job (`gh-aw-compile`) is green on the PR
- [ ] Workflow markdown reviewed by a second author or the pr-reviewer agent
Empty file.
Empty file.
Loading