Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
080bf10
feat(ir): introduce typed pipeline IR (types only, no callers)
jamesadevine Jun 10, 2026
f2b7645
feat(ir): lower Pipeline to YAML via serde_yaml
jamesadevine Jun 10, 2026
cd3af4d
feat(ir): derive job and stage dependsOn from OutputRef graph
jamesadevine Jun 10, 2026
ec50b1f
feat(ir): lower OutputRefs to per-location ADO reference syntax
jamesadevine Jun 10, 2026
87759d2
feat(ir): condition codegen with Custom-injection check
jamesadevine Jun 10, 2026
39bedc6
feat(extensions): Declarations bundle + Step::RawYaml migration bridge
jamesadevine Jun 10, 2026
d568a49
feat(extensions): port AdoAwMarkerExtension to typed Declarations
jamesadevine Jun 10, 2026
5ec6c25
feat(extensions): port GitHubExtension to typed Declarations
jamesadevine Jun 10, 2026
6216bd4
feat(extensions): port SafeOutputsExtension to typed Declarations
jamesadevine Jun 10, 2026
8181b45
feat(extensions): port AzureCliExtension to typed Declarations
jamesadevine Jun 10, 2026
bb4429e
feat(runtimes): port Lean/Python/Node/Dotnet to typed Declarations
jamesadevine Jun 11, 2026
5cbaa0a
feat(tools): port AzureDevOps/CacheMemory to typed Declarations
jamesadevine Jun 11, 2026
6c0ac3d
feat(extensions): port AdoScriptExtension to typed Declarations
jamesadevine Jun 11, 2026
996377e
feat(extensions): port ExecContextExtension to typed Declarations
jamesadevine Jun 11, 2026
1253187
feat(ir): lower parameters / resources / triggers / variables at top …
jamesadevine Jun 11, 2026
dfba833
feat(compile): standalone target builds Pipeline IR; delete base.yml
jamesadevine Jun 11, 2026
4cd0d71
chore: merge main into native-ado-compiler (resolve conflicts)
Copilot Jun 11, 2026
468359f
refactor(compile): extract canonical-jobs builder + extend IR for tem…
jamesadevine Jun 12, 2026
9f40073
feat(compile): stage target builds Pipeline IR; delete stage-base.yml
jamesadevine Jun 12, 2026
63b489e
feat(compile): job target builds Pipeline IR; delete job-base.yml
jamesadevine Jun 12, 2026
fd8be4d
fix(compile): port agent_job_variables hoist to IR; align IR with PR …
jamesadevine Jun 12, 2026
770e99d
feat(compile): 1es target builds Pipeline IR; delete 1es-base.yml
jamesadevine Jun 12, 2026
7c41c6a
refactor(compile): retire legacy YAML-string compile path
jamesadevine Jun 12, 2026
63f3af1
chore(compile): rebaseline ado-aw lock files at v0.35.3
jamesadevine Jun 12, 2026
5199c42
refactor(extensions): delete legacy prepare_steps/setup_steps trait m…
jamesadevine Jun 12, 2026
385cba7
refactor(extensions): fold per-signal accessors into declarations()
jamesadevine Jun 12, 2026
5796a72
docs: replace template-markers.md with ir.md; update extending.md and…
jamesadevine Jun 12, 2026
a0bf9c9
test(compile): drop template-marker docs-coverage test
jamesadevine Jun 12, 2026
7442465
chore: remove IR_PLAN.md / IR_DONE.md session-scratch files
jamesadevine Jun 12, 2026
29830c5
docs: clean up stale Step::RawYaml migration-bridge comments
jamesadevine Jun 12, 2026
953dd85
fix(ir): address code-review nits on output decls, coalesce, and synt…
jamesadevine Jun 12, 2026
4cad186
fix(ir): replace latent panics with typed errors; tighten Declaration…
jamesadevine Jun 13, 2026
3eaedda
security(compile): SHA-derived heredoc sentinels to prevent shell inj…
jamesadevine Jun 13, 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
14 changes: 10 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours

# Install scripts must always be LF (executed on Linux/macOS via curl|sh).
scripts/install/*.sh text eol=lf
scripts/install/*.ps1 text eol=lf
# BEGIN ado-aw managed (do not edit)
tests/fixtures/job-agent.lock.yml linguist-generated=true merge=ours text eol=lf
tests/fixtures/runtime_imports_author_marker_job.lock.yml linguist-generated=true merge=ours text eol=lf
tests/fixtures/runtime_imports_author_marker_stage.lock.yml linguist-generated=true merge=ours text eol=lf
tests/fixtures/runtime_imports_job.lock.yml linguist-generated=true merge=ours text eol=lf
tests/fixtures/runtime_imports_stage.lock.yml linguist-generated=true merge=ours text eol=lf
tests/fixtures/stage-agent.lock.yml linguist-generated=true merge=ours text eol=lf
tests/safe-outputs/add-build-tag.lock.yml linguist-generated=true merge=ours text eol=lf
tests/safe-outputs/add-pr-comment.lock.yml linguist-generated=true merge=ours text eol=lf
tests/safe-outputs/azure-cli.lock.yml linguist-generated=true merge=ours text eol=lf
Expand Down Expand Up @@ -28,7 +38,3 @@ tests/safe-outputs/upload-build-attachment.lock.yml linguist-generated=true merg
tests/safe-outputs/upload-pipeline-artifact.lock.yml linguist-generated=true merge=ours text eol=lf
tests/safe-outputs/upload-workitem-attachment.lock.yml linguist-generated=true merge=ours text eol=lf
# END ado-aw managed

# Install scripts must always be LF (executed on Linux/macOS via curl|sh).
scripts/install/*.sh text eol=lf
scripts/install/*.ps1 text eol=lf
9 changes: 2 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ Every compiled pipeline runs as three sequential jobs:
│ │ ├── mod.rs # Config types, install/auth helpers
│ │ └── extension.rs # CompilerExtension impl
│ ├── data/
│ │ ├── base.yml # Base pipeline template for standalone
│ │ ├── 1es-base.yml # Base pipeline template for 1ES target
│ │ ├── job-base.yml # Job-level ADO template for target: job
│ │ ├── stage-base.yml # Stage-level ADO template for target: stage
│ │ ├── ecosystem_domains.json # Network allowlists per ecosystem
│ │ ├── init-agent.md # Dispatcher agent template for `init` command
│ │ └── threat-analysis.md # Threat detection analysis prompt template
Expand Down Expand Up @@ -256,8 +252,7 @@ index to jump to the right page.

### Compiler internals & operations

- [`docs/template-markers.md`](docs/template-markers.md) — every `{{ marker }}`
in `src/data/base.yml`, `src/data/1es-base.yml`, `src/data/job-base.yml`, and `src/data/stage-base.yml` and how it is replaced.
- [`docs/ir.md`](docs/ir.md) — typed Azure DevOps pipeline IR (`Pipeline`, jobs/stages/steps, output refs, graph pass, lowering, and target builders).
- [`docs/cli.md`](docs/cli.md) — `ado-aw` CLI commands (`init`, `compile`,
`check`, `mcp`, `mcp-http`, `execute`, `secrets`, `enable`, `disable`,
`remove`, `list`, `status`, `run`, `audit`; `configure` is a deprecated hidden alias).
Expand All @@ -272,7 +267,7 @@ index to jump to the right page.
allowed domains, ecosystem identifiers, blocking, and ADO `permissions:`
service-connection model.
- [`docs/extending.md`](docs/extending.md) — adding new CLI commands, compile
targets, front-matter fields, template markers, safe-output tools,
targets, front-matter fields, typed IR extensions, safe-output tools,
first-class tools, and runtimes; the `CompilerExtension` trait.
- [`docs/filter-ir.md`](docs/filter-ir.md) — filter expression IR
specification: `Fact`/`Predicate` types, three-pass compilation (lower →
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ base64 = "0.22.1"
glob-match = "0.2.1"
similar = "3.1.0"
sha2 = "0.11.0"
indexmap = "2"
zip = { version = "8.6.0", default-features = false, features = ["deflate"] }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions docs/ado-aw-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ on the compiler and re-compiling frequently.
- [`docs/safe-outputs.md`](safe-outputs.md) — regular safe-outputs
surface (`create-issue` is **not** in it).
- [`docs/cli.md`](cli.md) — `--skip-integrity` CLI flag.
- [`docs/template-markers.md`](template-markers.md) — `{{ executor_ado_env }}`
and `{{ integrity_check }}` markers and their conditional behaviour.
- [`docs/ir.md`](ir.md) — typed pipeline IR and how debug-only choices such as
integrity-check omission are represented in generated steps.
12 changes: 6 additions & 6 deletions docs/ado-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ bundle**:

### Setup job (gate evaluator)

When `filters:` lowers to non-empty checks, `setup_steps()` returns
three step strings into the Setup job:
When `filters:` lowers to non-empty checks, `AdoScriptExtension::declarations()`
returns three typed `Declarations::setup_steps` entries for the Setup job:

1. **`NodeTool@0`** — installs Node 20.x LTS, capped at
`timeoutInMinutes: 5`.
Expand All @@ -332,8 +332,8 @@ three step strings into the Setup job:

When `inlined-imports: false` (the default) OR the execution-context
PR contributor activates (`on.pr` configured and not disabled),
`prepare_steps()` returns the install + download pair into the Agent
job's existing `{{ prepare_steps }}` block:
`AdoScriptExtension::declarations()` returns the install + download pair in
`Declarations::agent_prepare_steps` for the Agent job:

1. **`NodeTool@0`** — same shape as above.
2. **`curl` download + verify + extract** — same artefact, same
Expand All @@ -345,8 +345,8 @@ job's existing `{{ prepare_steps }}` block:
**Only emitted when `inlined-imports: false`.**

The PR-context precompute step (`node exec-context-pr.js`) is owned
by `ExecContextExtension` (not `AdoScriptExtension`) and emitted in
its own `Tool`-phase `prepare_steps()`. Phase ordering
by `ExecContextExtension` (not `AdoScriptExtension`) and emitted through
its own Tool-phase `Declarations::agent_prepare_steps`. Phase ordering
(`AdoScriptExtension::phase() == System` < `ExecContextExtension::phase() == Tool`)
guarantees the bundle is installed and on disk before the
exec-context invocation runs.
Expand Down
11 changes: 3 additions & 8 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,8 @@ These commands are not shown in `--help` but are available for contributors work
- `--output, -o <path>` - Write the schema to a file instead of stdout. Parent directories are created automatically.
- See [`docs/ado-script.md`](ado-script.md) for how this command fits into the ado-script build workflow (`cargo run -- export-gate-schema --output schema/gate-spec.schema.json`).

## Template Markers Reference
## Pipeline IR Reference

The compiler uses Mustache-style markers in template files to inject configuration:
- `base.yml` (standalone), `1es-base.yml` (1ES), `job-base.yml` (job template), `stage-base.yml` (stage template)
The compiler builds typed Azure DevOps pipeline IR and lowers it through one YAML emitter. Target-specific builders (`standalone_ir.rs`, `onees_ir.rs`, `job_ir.rs`, and `stage_ir.rs`) own job/stage names, template parameters, triggers, resources, and 1ES wrapping.

**Job/Stage Template Markers:**
- `{{ stage_prefix }}` — Prefixes job names with sanitized agent name for uniqueness (e.g., `DailyReview_Agent`)
- `{{ template_parameters }}` — Generates ADO template `parameters:` block (not pipeline parameters)

See [`docs/template-markers.md`](template-markers.md) for the complete marker reference.
See [`docs/ir.md`](ir.md) for the complete IR reference.
6 changes: 3 additions & 3 deletions docs/codemods.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ codemods") rather than clobbering whoever wrote the file.

`ado-aw check` exits non-zero when codemods would fire — there is no
opt-in flag and no warning-only mode. Rationale: compiled pipelines
download the **same** `ado-aw` version that produced them
(`src/data/base.yml`, `src/data/1es-base.yml`), so the in-pipeline
integrity check is internally consistent by construction. The only
download the **same** `ado-aw` version that produced them (recorded in
compiled YAML metadata), so the in-pipeline integrity check is internally
consistent by construction. The only
time `check` sees pending codemods is when a developer runs a newer
`ado-aw` locally against an older source — exactly when we want to
fail loudly. The fix is `ado-aw compile`, which applies the codemods
Expand Down
10 changes: 5 additions & 5 deletions docs/execution-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ commands.
## Agent prompt fragment

The precompute step appends one of two fragments directly to
`/tmp/awf-tools/agent-prompt.md` (the file built by the
"Prepare agent prompt" step in `base.yml`). This mirrors how gh-aw
injects its own built-in prompt sections.
`/tmp/awf-tools/agent-prompt.md` (the file built by the Agent job's
"Prepare agent prompt" step). This mirrors how gh-aw injects its own
built-in prompt sections.

### Success fragment

Expand Down Expand Up @@ -287,8 +287,8 @@ your own markdown body.
alias, `aw-context/` is still relative to `$(Build.SourcesDirectory)`
— i.e. the pipeline's working directory, not the workspace alias's
directory.
- **Ordering.** The precompute step runs after `{{ checkout_self }}`
in the Agent job's prepare phase, after the "Prepare agent prompt"
- **Ordering.** The precompute step runs after the typed `checkout: self`
step in the Agent job's prepare phase, after the "Prepare agent prompt"
step (so it can append) and before the agent runs (so the agent
sees the appended prompt).

Expand Down
Loading
Loading