Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 15 additions & 27 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ The compiler expects markdown files with YAML front matter similar to gh-aw:
name: "name for this agent"
description: "One line description for this agent"
target: standalone # Optional: "standalone" (default) or "1es". See Target Platforms section below.
engine: claude-opus-4.5 # AI engine to use. Defaults to claude-opus-4.5. Other options include claude-sonnet-4.5, gpt-5.2-codex, gemini-3-pro-preview, etc.
engine: copilot # Engine identifier. Defaults to copilot. Currently only 'copilot' (GitHub Copilot CLI) is supported.
# engine: # Alternative object format (with additional options)
# id: copilot
# model: claude-opus-4.5
# timeout-minutes: 30
schedule: daily around 14:00 # Fuzzy schedule syntax - see Schedule Syntax section below
Expand Down Expand Up @@ -314,14 +315,15 @@ schedule:

### Engine Configuration

The `engine` field specifies which AI model to use and optional execution parameters. It accepts both a simple string format (model name only) and an object format with additional options.
The `engine` field specifies which engine to use for the agentic task. The string form is an engine identifier (currently only `copilot` is supported). The object form uses `id` for the engine identifier plus additional options like model selection and timeout.

```yaml
# Simple string format (just a model name)
engine: claude-opus-4.5
# Simple string format (engine identifier, defaults to copilot)
engine: copilot

# Object format with additional options
engine:
id: copilot
model: claude-opus-4.5
timeout-minutes: 30
```
Expand All @@ -330,11 +332,20 @@ engine:

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `id` | string | `copilot` | Engine identifier. Currently only `copilot` (GitHub Copilot CLI) is supported. |
| `model` | string | `claude-opus-4.5` | AI model to use. Options include `claude-sonnet-4.5`, `gpt-5.2-codex`, `gemini-3-pro-preview`, etc. |
| `timeout-minutes` | integer | *(none)* | Maximum time in minutes the agent job is allowed to run. Sets `timeoutInMinutes` on the `Agent` job in the generated pipeline. |
| `version` | string | *(none)* | Engine CLI version to install (e.g., `"0.0.422"`, `"latest"`). **Not yet wired** — parsed but ignored with a warning. |
| `agent` | string | *(none)* | Custom agent file identifier (Copilot only). **Not yet wired** — parsed but ignored with a warning. |
| `api-target` | string | *(none)* | Custom API endpoint hostname for GHES/GHEC (e.g., `"api.acme.ghe.com"`). **Not yet wired** — parsed but ignored with a warning. |
| `args` | list | `[]` | Custom CLI arguments injected before the prompt. **Not yet wired** — parsed but ignored with a warning. |
| `env` | map | *(none)* | Engine-specific environment variables. **Not yet wired** — parsed but ignored with a warning. |
| `command` | string | *(none)* | Custom engine executable path (skips default installation). **Not yet wired** — parsed but ignored with a warning. |

> **Deprecated:** `max-turns` is still accepted in front matter for backwards compatibility but is ignored at compile time (a warning is emitted). It was specific to Claude Code and is not supported by Copilot CLI.

> **Note:** Fields marked "not yet wired" are accepted in the schema for forward compatibility with gh-aw but produce a compile-time warning. Pipeline wiring for these fields is incremental.

#### `timeout-minutes`

The `timeout-minutes` field sets a wall-clock limit (in minutes) for the entire agent job. It maps to the Azure DevOps `timeoutInMinutes` job property on `Agent`. This is useful for:
Expand Down Expand Up @@ -838,29 +849,6 @@ Tool names are validated at compile time:
- Names must contain only ASCII alphanumerics and hyphens (shell injection prevention)
- Unrecognized names (not in `ALL_KNOWN_SAFE_OUTPUTS`) emit a warning to catch typos

## {{ cancel_previous_builds }}

When `triggers.pipeline` is configured, this generates a bash step that cancels any previously queued or in-progress builds of the same pipeline definition. This prevents multiple builds from accumulating when the upstream pipeline triggers rapidly (e.g., multiple PRs merged in quick succession).

The step:
- Uses the Azure DevOps REST API to query builds for the current pipeline definition
- Filters to only `notStarted` and `inProgress` builds
- Excludes the current build from cancellation
- Cancels each older build via PATCH request

Example output:
```yaml
- bash: |
CURRENT_BUILD_ID=$(Build.BuildId)
BUILDS=$(curl -s -u ":$SYSTEM_ACCESSTOKEN" \
"$(System.CollectionUri)$(System.TeamProject)/_apis/build/builds?definitions=$(System.DefinitionId)&statusFilter=notStarted,inProgress&api-version=7.1" \
| jq -r --arg current "$CURRENT_BUILD_ID" '.value[] | select(.id != ($current | tonumber)) | .id')
# ... cancels each build
displayName: "Cancel previous queued builds"
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
```

## {{ threat_analysis_prompt }}

Should be replaced with the embedded threat detection analysis prompt from `src/data/threat-analysis.md`. This prompt template includes markers for `{{ source_path }}`, `{{ agent_name }}`, `{{ agent_description }}`, and `{{ working_directory }}` which are replaced during compilation.
Expand Down
1 change: 0 additions & 1 deletion examples/azure-devops-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: "ADO Work Item Triage"
description: "Triages work items using the Azure DevOps MCP"
schedule: daily around 9:00
engine: claude-sonnet-4.5
tools:
azure-devops:
toolsets: [core, work, work-items]
Expand Down
1 change: 0 additions & 1 deletion examples/lean-verifier.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
name: "Lean Formal Verifier"
description: "Analyzes code and builds formal Lean 4 proofs of critical invariants"
engine: claude-opus-4.5
schedule: weekly on friday around 17:00
tools:
cache-memory: true
Expand Down
15 changes: 10 additions & 5 deletions prompts/create-ado-agentic-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,23 @@ name: "Weekly Dependency Updater"
description: "Checks for outdated dependencies and opens PRs to update them"
```

### Step 2 — AI Model (engine)
### Step 2 — Engine

Default is `claude-opus-4.5`. Only include `engine:` if the user requests a different model.
Default engine is `copilot` (GitHub Copilot CLI). The `engine:` field is an engine identifier, not a model name. Only include `engine:` if you need to set a non-default model or timeout.

| Value | Use when |
The default model is `claude-opus-4.5`. To use a different model, use the object form:

| Model | Use when |
|---|---|
| `claude-opus-4.5` | Default. Best reasoning, complex tasks. |
| `claude-sonnet-4.5` | Faster, cheaper, simpler tasks. |
| `gpt-5.2-codex` | Code-heavy tasks. |
| `gemini-3-pro-preview` | Google ecosystem tasks. |

Object form with extra options:
Object form with model selection and extra options:
```yaml
engine:
id: copilot
model: claude-sonnet-4.5
timeout-minutes: 30
```
Expand Down Expand Up @@ -427,7 +430,9 @@ Use `noop` with a brief summary of what was reviewed.
---
name: "Dependency Updater"
description: "Checks for outdated npm dependencies and opens PRs to update them"
engine: claude-sonnet-4.5
engine:
id: copilot
model: claude-sonnet-4.5
schedule: weekly on monday around 9:00
tools:
azure-devops: true
Expand Down
12 changes: 11 additions & 1 deletion prompts/debug-ado-agentic-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,20 @@ network:

**Common causes**:

- **Invalid model name**: Check the `engine:` field matches a supported model (`claude-opus-4.5`, `claude-sonnet-4.5`, `gpt-5.2-codex`, `gemini-3-pro-preview`, etc.)
- **Invalid engine or model**: The `engine:` field is an engine identifier (e.g., `copilot`), not a model name. To specify a model, use the object form. Check that the engine identifier is valid and the model name is correct:
```yaml
# Wrong — model name as engine identifier
engine: claude-opus-4.5

# Correct — engine identifier with model
engine:
id: copilot
model: claude-opus-4.5
```
- **Timeout**: Agent hits the Azure DevOps job timeout (default 60 minutes). Set an explicit timeout:
```yaml
engine:
id: copilot
model: claude-opus-4.5
timeout-minutes: 120
```
Expand Down
Loading
Loading