Extensions
Refine the variant matrix beyond the full cross product.
extensions refine the variant set when the base axes do not express the combinations you need. Use extensions to narrow an axis, swap products or environments for a subtree, or append prompt guidance to a slice of variants.
If an experiment declares any extensions, AX creates only extension-derived variants.
Extension object
An extension object is one node in the refinement tree. Nested extensions are recursively cross-multiplied with their parents.
| Field | Required | Type / values | Notes |
|---|---|---|---|
id | Yes | Kebab-case string | Must be unique among sibling extensions. |
description | No | String | Human-readable notes. |
tags | No | String list | Added to resolved variant tags. |
agents | No | Agent list | Replaces inherited agents for this extension subtree. |
models | No | Model axis | Replaces inherited models for this extension subtree. |
agent_mode | No | Agent-mode axis | Replaces inherited agent modes for this extension subtree. |
prompts | No | Prompt list | An axis: each entry forks its own variant branch, and that entry's text is appended to inherited prompt text. Does not replace the prompt axis. |
environments | No | Environment list | Replaces inherited environments for this extension subtree. |
products | No | Product list | Replaces inherited products for this extension subtree. |
extensions | No | Extension list | Nested extensions. |
prompts:
- id: analyze
prompt: "Read /workspace/task.md and write /workspace/report.json."
extensions:
- id: with-cli
products:
- name: cli
type: CLI
setup: "curl -fsSL https://clickhouse.com/ | sh"
prompts: ["Use the ClickHouse CLI for the analysis."]
- id: without-cli
products:
- name: no-cli
setup: "true"
prompts: ["Do not use the ClickHouse CLI; use another local method."]Prompt forking
An extension's prompts list is an axis, exactly like the top-level prompt
list: each entry creates an independent variant branch, multiplied against the
other axes the extension accumulates. Only the chosen entry's text is appended
(after a blank line) to every inherited base prompt. The base prompt id is
preserved; in a multi-entry list each entry's id follows the extension id in the
variant id (bare strings get positional ids p0, p1, …). A single-entry list
appends its suffix without adding an id coordinate. Like the extension's chosen
environment and product, the entry id is a variant coordinate only —
resolved_extend_id stays the extension id path that both arms share.
prompts:
- id: base
prompt: BASE
extensions:
- id: scenario
environments: [{ name: h, setup: "true" }]
prompts:
- id: global-only
prompt: "Experiment: foo"
- id: global-plus-scenario
prompt: |
Experiment: foo
Investigate the gap.This resolves to two variants: …::base::h::scenario::global-only (prompt
BASE + Experiment: foo) and …::base::h::scenario::global-plus-scenario
(prompt BASE + the two-line entry).