Skip to content

Commit 1bca27a

Browse files
authored
Merge pull request #2 from githubnext/install-autoloop
Install Autoloop
2 parents 0693341 + 61a6a75 commit 1bca27a

8 files changed

Lines changed: 3900 additions & 26 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Autoloop Program
3+
about: Create a new Autoloop optimization program
4+
title: ''
5+
labels: autoloop-program
6+
---
7+
8+
<!-- AUTOLOOP:ISSUE-PROGRAM -->
9+
<!-- This issue defines an Autoloop program. The format is identical to program.md files. -->
10+
<!-- Autoloop will discover this issue by its label and run iterations automatically. -->
11+
<!-- After each run, a status comment will be posted/updated with links and results. -->
12+
13+
---
14+
schedule: every 6h
15+
# target-metric: 0.95 ← uncomment and set to make this a goal-oriented program that stops when reached
16+
---
17+
18+
# Program Name
19+
20+
## Goal
21+
22+
<!-- Describe what you want to optimize. Be specific about what 'better' means. -->
23+
<!-- Choose one of the following program types: -->
24+
<!-- • Goal-oriented: Has a finish line. Set target-metric above and describe the target here. -->
25+
<!-- Example: "Increase test coverage to at least 95%." -->
26+
<!-- • Open-ended: Runs forever, always seeking improvement. Leave target-metric commented out. -->
27+
<!-- Example: "Continuously improve algorithm performance." -->
28+
29+
REPLACE THIS with your optimization goal.
30+
31+
## Target
32+
33+
<!-- List files Autoloop may modify. Everything else is off-limits. -->
34+
35+
Only modify these files:
36+
- `REPLACE_WITH_FILE` -- (describe what this file does)
37+
38+
Do NOT modify:
39+
- (list files that must not be touched)
40+
41+
## Evaluation
42+
43+
<!-- Provide a command and the metric to extract. -->
44+
45+
```bash
46+
REPLACE_WITH_YOUR_EVALUATION_COMMAND
47+
```
48+
49+
The metric is `REPLACE_WITH_METRIC_NAME`. **Lower/Higher is better.** (pick one)

.github/agents/agentic-workflows.agent.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
1919
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
2020
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
2121
- **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
22+
- **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command
2223

2324
Workflows may optionally include:
2425

@@ -129,6 +130,17 @@ When you interact with this agent, it will:
129130
- "Analyze coverage trends over time"
130131
- "Add a coverage gate that blocks PRs below a threshold"
131132

133+
### CLI Commands Reference
134+
**Load when**: The user asks how to run, compile, debug, or manage workflows from the command line; needs the MCP tool equivalent of a `gh aw` command; or is in a restricted environment (e.g., Copilot Cloud) without direct CLI access.
135+
136+
**Reference file**: https://github.com/github/gh-aw/blob/main/.github/aw/cli-commands.md
137+
138+
**Use cases**:
139+
- "How do I trigger workflow X on the main branch?"
140+
- "What's the MCP equivalent of `gh aw logs`?"
141+
- "I'm in Copilot Cloud — how do I compile a workflow?"
142+
- "Show me all available gh aw commands"
143+
132144
## Instructions
133145

134146
When a user interacts with you:
@@ -147,6 +159,10 @@ gh aw init
147159
# Generate the lock file for a workflow
148160
gh aw compile [workflow-name]
149161

162+
# Trigger a workflow on demand (preferred over gh workflow run)
163+
gh aw run <workflow-name> # interactive input collection
164+
gh aw run <workflow-name> --ref main # run on a specific branch
165+
150166
# Debug workflow runs
151167
gh aw logs [workflow-name]
152168
gh aw audit <run-id>
@@ -174,4 +190,7 @@ gh aw compile --validate
174190
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
175191
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
176192
- Follow security best practices: minimal permissions, explicit network access, no template injection
193+
- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/main/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
177194
- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
195+
- **Triggering runs**: Always use `gh aw run <workflow-name>` to trigger a workflow on demand — not `gh workflow run <file>.lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref <branch>` to run on a specific branch.
196+
- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/main/.github/aw/cli-commands.md

.github/mcp.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"mcpServers": {
3+
"github-agentic-workflows": {
4+
"command": "gh",
5+
"args": [
6+
"aw",
7+
"mcp-server"
8+
]
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)