Work with branches

Create and compare branches

Explore multiple changes against the same cloud baseline without changing the live account.

Create a branch

Start with an analysis_id returned by a completed scan. Give the branch a name that describes the change you want to explore.

MCP tool call
emfirge_create_branch({
  base_analysis_id: "<analysis_id>",
  name: "reduce-db-exposure"
})

Stack changes

Each successful emfirge_apply_change appends a validated mutation. The engine rebuilds from the same base and applies the entire sequence in order. Only open branches can be changed.

Use Apply changes for supported resource types and examples.

Compare alternatives

Create separate branches from the same base to compare designs. Pass their IDs to the comparison tool. The engine summarizes their modeled changes and outcomes across the documented lenses and ranks them according to its checks.

MCP tool calls
emfirge_list_branches({ base_analysis_id: "<analysis_id>" })
 
emfirge_compare_branches({
  branch_ids: ["<branch_a>", "<branch_b>"]
})

A better modeled score is not a guarantee of application reliability or lower real-world spend.

Roll back a change

The current backend removes the most recent change. Call rollback again to remove another change; rolling back an empty change list is a no-op. The underlying AWS account is unaffected.

MCP tool call
emfirge_rollback_branch({ branch_id: "<branch_id>" })

Discard a branch

When an experiment is finished, discard it. The backend marks the branch as discarded, so it can no longer accept mutations. This does not delete cloud resources.

MCP tool call
emfirge_discard_branch({ branch_id: "<branch_id>" })
Based on the Emfirge MCP and engine source.View source
Documentation