You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/src/content/docs/reference/ir.mdx
+153Lines changed: 153 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -266,3 +266,156 @@ The production target wrappers are:
266
266
The canonical 5-job Setup → Agent → Detection → SafeOutputs → Teardown shape itself lives in `agentic_pipeline.rs` and is reused unchanged by every wrapper above; extensions plug into it via `Declarations` (steps, env, hosts, MCPG entries, and Agent-job condition clauses — see `Declarations::agent_conditions`).
267
267
268
268
When adding a target, follow the same pattern: parse and validate front matter, collect extension `Declarations`, build typed jobs/stages/steps, set the correct `PipelineShape`, and call the shared emit path.
269
+
270
+
## Public JSON summary
271
+
272
+
The internal IR types (`Pipeline`, `Job`, `Step`, `Graph`, …) are intentionally tied to the compiler's lowering needs and are **not** public API. `src/compile/ir/summary.rs` defines a parallel **summary tree** with `#[derive(Serialize)]` that provides agent-facing tooling with a stable JSON view of a compiled pipeline.
273
+
274
+
This is the schema consumed by:
275
+
276
+
-`ado-aw inspect <source> --json` — returns a full `PipelineSummary`
-`ado-aw whatif` — static downstream skip analysis built on graph reachability
280
+
-`ado-aw audit --json` — the `pipeline_graph` field in `AuditData`
281
+
- The [author MCP server](/ado-aw/reference/mcp-author/) tools (`inspect_workflow`, `graph_summary`, `graph_dump`)
282
+
283
+
### Stability contract
284
+
285
+
`PipelineSummary::schema_version` (currently `1`) is the public schema version. It is bumped when the JSON shape changes in a backwards-incompatible way — renamed field, removed variant, or changed semantics. Additive changes (new optional fields) do not require a bump. New enum variants do require a bump because the serialized enums have no catch-all `Unknown` variants.
286
+
287
+
Internal IR types may change freely without bumping the summary version, as long as the `summary.rs` lowering keeps the existing field set populated correctly.
288
+
289
+
### Top-level shape
290
+
291
+
```jsonc
292
+
{
293
+
"schema_version":1,
294
+
"name":"<pipeline name>", // ADO build-number format string
0 commit comments