Agent Skill · cast repair-galaxy-draft-topology
Re-wire a Galaxy draft region when a step's declared output can't be computed from its wired inputs.
← All cast skills · Source mold →
Install with Claude Code
/plugin marketplace add galaxyproject/foundry
/plugin install foundry-skills@galaxy-workflow-foundry
Then invoke as:
/foundry-skills:repair-galaxy-draft-topology
Install with Codex
codex plugin marketplace add galaxyproject/foundry
codex plugin add foundry-skills@galaxy-workflow-foundry
Then select with /skills or invoke explicitly as:
$repair-galaxy-draft-topology
Skill Bundle
/ packaged cast
- attached files
- 8
- upfront
- 4
- on demand
- 4
- cast rev
- n/a
- validated
- 0
Produces: 2 artifacts.
Consumes: 2 artifacts.
Artifact Contract
/ skill handoff Produces
galaxy-workflow-draft
Re-wired gxformat2 draft: a producer step (or small sub-path) inserted so the previously-blocked step's declared output is computable; new steps land at draft (TODO) tier.
yamlgalaxy-workflow-draft.gxwf.yml[[galaxy-workflow-draft]]
Raw artifact contract
{
"id": "galaxy-workflow-draft",
"kind": "yaml",
"default_filename": "galaxy-workflow-draft.gxwf.yml",
"schema": "[[galaxy-workflow-draft]]",
"description": "Re-wired gxformat2 draft: a producer step (or small sub-path) inserted so the previously-blocked step's declared output is computable; new steps land at draft (TODO) tier."
}
open-requirements-ledger
Ledger with the addressed blocking entries marked resolved, or surrendered with a note when no producer can be found within the escalation budget.
yamlopen-requirements.ledger.yml
Raw artifact contract
{
"id": "open-requirements-ledger",
"kind": "yaml",
"default_filename": "open-requirements.ledger.yml",
"description": "Ledger with the addressed blocking entries marked resolved, or surrendered with a note when no producer can be found within the escalation budget."
}
Consumes
galaxy-workflow-draft
Partially-realized gxformat2 draft (see [[galaxy-workflow-draft-format]]) whose topology can't support a declared step — the region to repair.
Raw artifact contract
{
"id": "galaxy-workflow-draft",
"description": "Partially-realized gxformat2 draft (see [[galaxy-workflow-draft-format]]) whose topology can't support a declared step — the region to repair.",
"inherited_schema": "[[galaxy-workflow-draft]]",
"producers": [
"advance-galaxy-draft-step",
"apply-galaxy-workflow-changeset",
"cwl-summary-to-galaxy-template",
"freeform-summary-to-galaxy-template",
"implement-galaxy-tool-step",
"nextflow-summary-to-galaxy-template",
"repair-galaxy-draft-topology"
]
}
open-requirements-ledger
Carried obligations from [[open-requirements-ledger]]; the open blocking entries name which step output is uncomputable and what evidence is missing.
Raw artifact contract
{
"id": "open-requirements-ledger",
"description": "Carried obligations from [[open-requirements-ledger]]; the open blocking entries name which step output is uncomputable and what evidence is missing.",
"producers": [
"advance-galaxy-draft-step",
"apply-galaxy-workflow-changeset",
"compare-against-iwc-exemplar",
"cwl-summary-to-galaxy-data-flow",
"cwl-summary-to-galaxy-interface",
"cwl-summary-to-galaxy-template",
"freeform-summary-to-galaxy-data-flow",
"freeform-summary-to-galaxy-interface",
"freeform-summary-to-galaxy-template",
"implement-galaxy-tool-step",
"interview-to-galaxy-workflow-changeset",
"nextflow-summary-to-galaxy-data-flow",
"nextflow-summary-to-galaxy-interface",
"nextflow-summary-to-galaxy-reference-data",
"nextflow-summary-to-galaxy-template",
"repair-galaxy-draft-topology"
]
}
Attached Files
/ runtime references Load upfront
Re-wire the affected region consistently with the data-flow design that settled the surrounding topology.
upfront runtime verbatim hypothesis deterministic 7.3 KB
- bundle
references/notes/galaxy-data-flow-draft-contract.md - source
content/research/galaxy-data-flow-draft-contract/index.md
Preview md
---
type: research
title: "Galaxy data-flow draft contract"
tags:
- target/galaxy
status: draft
created: 2026-05-02
revised: 2026-05-03
revision: 2
related_notes:
- "[[nextflow-to-galaxy-channel-shape-mapping]]"
- "[[nextflow-operators-to-galaxy-collection-recipes]]"
- "[[galaxy-workflow-draft]]"
related_molds:
- "[[nextflow-summary-to-galaxy-data-flow]]"
- "[[cwl-summary-to-galaxy-data-flow]]"
- "[[freeform-summary-to-galaxy-data-flow]]"
- "[[nextflow-summary-to-galaxy-template]]"
- "[[cwl-summary-to-galaxy-template]]"
- "[[freeform-summary-to-galaxy-template]]"
- "[[compare-against-iwc-exemplar]]"
- "[[advance-galaxy-draft-step]]"
sources:
- "https://github.com/galaxyproject/foundry/issues/54"
summary: "Defines the proposed boundary between Galaxy data-flow drafts, gxformat2 templates, and concrete step implementation."
---
# Galaxy Data-Flow Draft Contract
This is an architectural contract, not a schema. Evidence is strongest for Mold and Pipeline boundaries. Proposed fields are speculative until exercised by two or three worked translations.
## Boundary
The data-flow draft owns a target-shaped abstract DAG for Galaxy. It should not be valid `gxformat2` and should not resolve exact Tool Shed tools.
Data-flow draft owns:
- Galaxy-facing workflow inputs and outputs.
- Abstract nodes, edges, branches, collection mapping, collection reduction, and placeholder transformations.
- Input/output shape decisions such as `File`, `list`, `paired`, `list:paired`, or `list:list`.
- Conceptual Galaxy idioms: map-over, reduction, Apply Rules, collection cleanup, identifier synchronization, tabular bridge, fan-in / combine (concatenate, merge, or union N sources into one — a distinct node, not a side-effect of a reshape).
- Abstract unresolved tool nee
...
Emit re-wired steps in the draft superset (TODO tool_id, _plan_* fields) so existing per-step machinery realizes them; respect the settle-vs-repair boundary.
upfront runtime verbatim hypothesis deterministic 12.5 KB
- bundle
references/notes/galaxy-workflow-draft-format.md - source
content/research/galaxy-workflow-draft-format/index.md
Preview md
---
type: research
title: "Galaxy workflow draft format"
tags:
- target/galaxy
status: draft
created: 2026-05-06
revised: 2026-05-10
revision: 2
related_notes:
- "[[gxformat2-schema]]"
- "[[galaxy-data-flow-draft-contract]]"
- "[[discover-shed-tool]]"
- "[[galaxy-workflow-draft]]"
- "[[open-requirements-ledger]]"
related_molds:
- "[[nextflow-summary-to-galaxy-template]]"
- "[[cwl-summary-to-galaxy-template]]"
- "[[freeform-summary-to-galaxy-template]]"
- "[[compare-against-iwc-exemplar]]"
- "[[implement-galaxy-tool-step]]"
- "[[advance-galaxy-draft-step]]"
- "[[repair-galaxy-draft-topology]]"
summary: "gxformat2 draft superset: wrapper-tier TODOs (tool_id, tool_state, port names) plus _plan_state / _plan_context / _plan_in / _plan_out per tool step."
---
# Galaxy workflow draft format
The output artifact `galaxy-workflow-draft` produced by the `*-summary-to-galaxy-template` Molds is **gxformat2 with wrapper-tier relaxations and free-text planning fields**, sized to the gap between data-flow design and tool-resolved implementation.
Topology — workflow inputs and their collection shapes, workflow outputs, the step set, the producer→consumer edge graph, branches, and `when:` guards — is **settled by the template Mold itself**, drawing on the upstream interface and data-flow briefs (see [[galaxy-data-flow-draft-contract]]). The output is concrete gxformat2 with no topology TODOs. Wrapper-tier resolution — which Tool Shed wrapper, what parameters, the wrapper-determined port names that populate `in:` / `out:` / `outputSource` — is **evidence-gated per step** (see Resolution tiers below): a step resolves fully when the evidence pins wrapper and parameters together, pins identity alone when the wrapper is named but its settings are not, and defers
...
Read open blocking entries to scope the repair; mark each resolved or surrender it, feeding the loop's decreasing-blocker convergence gate.
upfront runtime verbatim hypothesis deterministic 7.8 KB
- bundle
references/notes/open-requirements-ledger.md - source
content/research/open-requirements-ledger/index.md
Preview md
---
type: research
title: "Open-requirements ledger"
tags:
- target/galaxy
status: draft
created: 2026-06-16
revised: 2026-06-16
revision: 1
related_notes:
- "[[galaxy-workflow-draft-format]]"
related_molds:
- "[[advance-galaxy-draft-step]]"
- "[[repair-galaxy-draft-topology]]"
- "[[implement-galaxy-tool-step]]"
summary: "Carried unresolved-requirements artifact the source→Galaxy pipeline discharges or explicitly surrenders, autonomously."
---
# Open-requirements ledger
The `open-requirements-ledger` is a single artifact threaded through the source→Galaxy pipeline that records **obligations the pipeline has taken on but not yet met** — a declared output with no producer, a parameter whose value the source never pinned, a tool with no corpus exemplar. Each Mold that surfaces one **appends** it; each Mold whose decision closes one **marks it resolved**; the terminal path **surrenders** whatever remains open, explicitly, into the final artifact.
## Framing: obligations the pipeline discharges, not questions a human answers
This is deliberately *not* an "open questions for the user" list. The pipeline is autonomous — no human-in-the-loop gate is assumed. The ledger's consumers are **Molds and the loop's convergence gate**, with human readout a secondary affordance. An entry is closed by a downstream Mold doing work (wiring a producer, picking a wrapper, settling a value), or — when nothing can close it — surrendered: written into the final draft as a known, labelled gap rather than silently dropped or fabricated around.
The distinction matters because a "questions for a human" framing leaks an operator's personal interaction style into a tool meant to run inside anyone's harness. The ledger must behave identically cast into a fresh harness with no ambient con
...
In/out contract: the draft this Mold reads and re-wires conforms to [[galaxy-workflow-draft]]; cast bundles the JSON Schema so the re-wired draft stays inside the superset the per-step loop expects.
upfront runtime verbatim cast-validated deterministic 58.6 KB
- bundle
references/schemas/galaxy-workflow-draft.schema.json - source
package://@galaxy-tool-util/schema#galaxyWorkflowDraftJsonSchema
Preview json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$defs": {
"WorkflowStepSchema": {
"type": "object",
"required": [],
"properties": {
"id": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"label": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"doc": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"position": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"required": [
"top",
"left"
],
"properties": {
"top": {
"type": "number"
},
"left": {
"type": "number"
}
},
"additionalProperties": false
}
]
},
"tool_id": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"tool_shed_repository": {
"$ref": "#/$defs/Shared15"
},
"tool_version": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"errors": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"uuid": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"in": {
"$ref": "#/$defs/Shared16"
},
"out": {
"anyOf": [
{
"type": "array",
"items": {
"$ref": "#/$defs/Shared4"
...
Load on demand
Choose a corpus-attested collection recipe when the missing producer is a collection construction, reshape, or bridge.
Trigger: When the repair sub-path needs collection cleanup, reshaping, relabeling, identifier synchronization, or a collection-tabular bridge.
on-demand runtime verbatim corpus-observed deterministic 4.6 KB
- bundle
references/patterns/galaxy-collection-patterns.md - source
content/patterns/galaxy-collection-patterns.md
Preview md
---
type: pattern
pattern_kind: moc
evidence: corpus-observed
title: "Galaxy: collection patterns"
aliases:
- "Galaxy collection pattern MOC"
- "collection transformation patterns"
- "IWC collection pattern map"
tags:
- target/galaxy
- topic/galaxy-transform
- topic/collection-transform
status: draft
created: 2026-05-02
revised: 2026-05-02
revision: 1
summary: "Use this MOC to choose corpus-grounded Galaxy collection transformation patterns."
related_notes:
- "[[iwc-transformations-survey]]"
- "[[iwc-conditionals-survey]]"
related_patterns:
- "[[manifest-to-mapped-collection-lifecycle]]"
- "[[cleanup-sync-and-publish-nonempty-results]]"
- "[[reshape-relabel-remap-by-collection-axis]]"
- "[[fan-in-bundle-consume-and-flatten]]"
- "[[collection-cleanup-after-mapover-failure]]"
- "[[sync-collections-by-identifier]]"
- "[[harmonize-by-sortlist-from-identifiers]]"
- "[[regex-relabel-via-tabular]]"
- "[[relabel-via-rules-and-find-replace]]"
- "[[collection-swap-nesting-with-apply-rules]]"
- "[[collection-split-identifier-via-rules]]"
- "[[collection-build-list-paired-with-apply-rules]]"
- "[[tabular-to-collection-by-row]]"
- "[[tabular-concatenate-collection-to-table]]"
- "[[tabular-pivot-collection-to-wide]]"
related_molds:
- "[[implement-galaxy-tool-step]]"
- "[[nextflow-summary-to-galaxy-data-flow]]"
- "[[cwl-summary-to-galaxy-data-flow]]"
- "[[nextflow-summary-to-galaxy-template]]"
- "[[cwl-summary-to-galaxy-template]]"
- "[[freeform-summary-to-galaxy-template]]"
- "[[compare-against-iwc-exemplar]]"
---
# Galaxy: collection patterns
This is the runtime-facing map for Galaxy collection transformation choices. Use it before loading raw survey notes. The survey remains evidence backing; the operation and recipe pag
...
Choose a corpus-attested tabular recipe when the missing evidence is a column, key, or aggregate a tabular step can produce.
Trigger: When the repair sub-path needs a computed column, join key, filter criterion, or aggregate the blocked step depends on.
on-demand runtime verbatim corpus-observed deterministic 3.3 KB
- bundle
references/patterns/galaxy-tabular-patterns.md - source
content/patterns/galaxy-tabular-patterns.md
Preview md
---
type: pattern
pattern_kind: moc
evidence: corpus-observed
title: "Galaxy: tabular patterns"
aliases:
- "Galaxy tabular pattern MOC"
- "tabular transformation patterns"
- "IWC tabular pattern map"
tags:
- target/galaxy
- topic/galaxy-transform
- topic/tabular-transform
status: draft
created: 2026-05-02
revised: 2026-05-02
revision: 1
summary: "Use this MOC to choose corpus-grounded Galaxy tabular transformation patterns."
related_notes:
- "[[iwc-tabular-operations-survey]]"
related_patterns:
- "[[tabular-filter-by-column-value]]"
- "[[tabular-filter-by-regex]]"
- "[[tabular-cut-and-reorder-columns]]"
- "[[tabular-compute-new-column]]"
- "[[tabular-join-on-key]]"
- "[[tabular-group-and-aggregate-with-datamash]]"
- "[[tabular-sql-query]]"
- "[[tabular-prepend-header]]"
- "[[tabular-synthesize-bed-from-3col]]"
- "[[tabular-split-taxonomy-string]]"
- "[[tabular-relabel-by-row-counter]]"
- "[[tabular-to-collection-by-row]]"
- "[[tabular-concatenate-collection-to-table]]"
- "[[tabular-pivot-collection-to-wide]]"
related_molds:
- "[[implement-galaxy-tool-step]]"
- "[[nextflow-summary-to-galaxy-data-flow]]"
- "[[cwl-summary-to-galaxy-data-flow]]"
- "[[nextflow-summary-to-galaxy-template]]"
- "[[cwl-summary-to-galaxy-template]]"
- "[[freeform-summary-to-galaxy-template]]"
- "[[compare-against-iwc-exemplar]]"
---
# Galaxy: tabular patterns
This is the runtime-facing map for Galaxy tabular transformation choices. Use it before loading raw survey notes. The survey remains evidence backing; the operation pages are the actionable references.
## Row And Column Operations
- [[tabular-filter-by-column-value]] — keep/drop rows by string column value with `Filter1`.
- [[tabular-filter-by-regex]] — keep/drop rows by regex or pa
...
Preserve collection typing and map-over/reduction semantics when an inserted producer step joins or reshapes collection inputs.
Trigger: When the repair inserts or rewires steps touching collection inputs, outputs, or mapped/reduced connections.
on-demand runtime verbatim corpus-observed deterministic 1.9 KB
- bundle
references/notes/galaxy-collection-semantics.md - source
content/research/galaxy-collection-semantics/index.md
Preview md
---
type: research
title: "Galaxy collection semantics"
tags:
- target/galaxy
status: draft
created: 2026-04-30
revised: 2026-05-05
revision: 3
license: MIT
license_file: LICENSES/galaxy.LICENSE
related_notes:
- "[[galaxy-xsd]]"
- "[[galaxy-collection-tools]]"
- "[[galaxy-apply-rules-dsl]]"
- "[[nextflow-to-galaxy-channel-shape-mapping]]"
- "[[nextflow-operators-to-galaxy-collection-recipes]]"
- "[[galaxy-tool-job-failure-reference]]"
- "[[galaxy-workflow-invocation-failure-reference]]"
- "[[iwc-transformations-survey]]"
- "[[galaxy-discover-datasets]]"
sources:
- "https://github.com/galaxyproject/galaxy/blob/7765fae934fbfdee77e3be5f5b235e43735273ae/lib/galaxy/model/dataset_collections/types/collection_semantics.yml"
companions:
- "galaxy-collection-semantics.yml"
summary: "Vendored formal spec of Galaxy dataset-collection mapping/reduction semantics, with labeled examples and pinned test references."
---
> **Vendored from upstream**, pinned at SHA `7765fae`. One file travels with this note:
>
> - `galaxy-collection-semantics.yml` — the structured source. **Agents and casting should consume this.** It carries the `tests:` blocks that pin concrete Galaxy test names; the rendered upstream view drops them.
>
> The Foundry also vendors Galaxy's auto-generated MyST/LaTeX rendering of the same YAML, which
> is what the human view below renders from. It is a site asset: casting does not carry it, so
> do not look for it beside this note in a skill bundle. Sync is manual.
>
> **When to consult:** authoring or reasoning about Molds and patterns that touch `data_collection` inputs, map-over / reduction shape changes, sub-collection mapping, `paired_or_unpaired`, or `sample_sheet`.
```vendored-myst
file: galaxy-collection-semantics.upstream.myst
source: h
...
Preserve collection typing and map-over/reduction semantics when an inserted producer step joins or reshapes collection inputs.
Trigger: When the repair inserts or rewires steps touching collection inputs, outputs, or mapped/reduced connections.
on-demand runtime verbatim corpus-observed deterministic 43.8 KB
- bundle
references/notes/galaxy-collection-semantics.yml - source
content/research/galaxy-collection-semantics/galaxy-collection-semantics.yml
Preview yml
- doc: |
# Collection Semantics
This document describes the semantics around working with Galaxy dataset collections.
In particular it describes how they operate within Galaxy tools and workflows.
:::{admonition} You Probably Don't Need to Read This
:class: caution
Any significantly sophisticated workflow language will have ways to collect data
into arrays or vectors or dictionaries and apply operations across this data (mapping)
or reduce the dimensionality of this data (reductions). Typically, this is explicitly
annotated with map functions or for loops. Galaxy however is designed to be a point
and click interface for connecting steps and running tools. It is important that steps
just connect and just do the most natural thing - and this is what Galaxy does.
This document just provides a mathematical formalism to that "what should just
intuitively work" that can be used to document test cases and help with implementation.
This is reference documentation not user documentation, Galaxy should just work.
:::
## Mapping
If a tool consumes a simple dataset parameter and produces a simple dataset parameter,
then any collection type may be "mapped over" the data input to that tool. The result of
that is the tool being applied to each element of the collection and "implicit collections"
being created from the outputs that are produced from those operations. Those implicit
collections have the same element identifiers in the same order as the input collection that is
mapped over. Each element of the implicit collections correspond to their own job and
Galaxy very naturally and intuitively parallelizes jobs without extra work from the user
and without any knowledge of the tool.
...
SKILL.md
# repair-galaxy-draft-topology
Follow the procedure below and use the artifact/reference sections as the runtime contract.
## When To Use
- Re-wire a Galaxy draft region when a step's declared output can't be computed from its wired inputs.
## Inputs
- Read artifact `galaxy-workflow-draft`. Schema: galaxy-workflow-draft. Produced by `advance-galaxy-draft-step`, `apply-galaxy-workflow-changeset`, `cwl-summary-to-galaxy-template`, `freeform-summary-to-galaxy-template`, `implement-galaxy-tool-step`, `nextflow-summary-to-galaxy-template`, `repair-galaxy-draft-topology`. Partially-realized gxformat2 draft (see galaxy-workflow-draft-format) whose topology can't support a declared step — the region to repair.
- Read artifact `open-requirements-ledger`. Produced by `advance-galaxy-draft-step`, `apply-galaxy-workflow-changeset`, `compare-against-iwc-exemplar`, `cwl-summary-to-galaxy-data-flow`, `cwl-summary-to-galaxy-interface`, `cwl-summary-to-galaxy-template`, `freeform-summary-to-galaxy-data-flow`, `freeform-summary-to-galaxy-interface`, `freeform-summary-to-galaxy-template`, `implement-galaxy-tool-step`, `interview-to-galaxy-workflow-changeset`, `nextflow-summary-to-galaxy-data-flow`, `nextflow-summary-to-galaxy-interface`, `nextflow-summary-to-galaxy-reference-data`, `nextflow-summary-to-galaxy-template`, `repair-galaxy-draft-topology`. Carried obligations from open-requirements-ledger; the open blocking entries name which step output is uncomputable and what evidence is missing.
## Outputs
- Write artifact `galaxy-workflow-draft` as `galaxy-workflow-draft.gxwf.yml`. Format: `yaml`. Schema: galaxy-workflow-draft. Re-wired gxformat2 draft: a producer step (or small sub-path) inserted so the previously-blocked step's declared output is computable; new steps land at draft (TODO) tier.
- Write artifact `open-requirements-ledger` as `open-requirements.ledger.yml`. Format: `yaml`. Ledger with the addressed blocking entries marked resolved, or surrendered with a note when no producer can be found within the escalation budget.
## Required Tools
- None declared. Procedure should not assume external CLIs are present.
## Load Upfront
- `references/notes/galaxy-data-flow-draft-contract.md`: Research note copied verbatim into the bundle. Re-wire the affected region consistently with the data-flow design that settled the surrounding topology.
- `references/notes/galaxy-workflow-draft-format.md`: Research note copied verbatim into the bundle. Emit re-wired steps in the draft superset (TODO tool_id, _plan_* fields) so existing per-step machinery realizes them; respect the settle-vs-repair boundary.
- `references/notes/open-requirements-ledger.md`: Research note copied verbatim into the bundle. Read open blocking entries to scope the repair; mark each resolved or surrender it, feeding the loop's decreasing-blocker convergence gate.
- `references/schemas/galaxy-workflow-draft.schema.json`: Schema file copied verbatim into the bundle. In/out contract: the draft this Mold reads and re-wires conforms to galaxy-workflow-draft; cast bundles the JSON Schema so the re-wired draft stays inside the superset the per-step loop expects.
## Load On Demand
- `references/patterns/galaxy-collection-patterns.md`: Pattern note copied verbatim into the bundle. Choose a corpus-attested collection recipe when the missing producer is a collection construction, reshape, or bridge. Use when: the repair sub-path needs collection cleanup, reshaping, relabeling, identifier synchronization, or a collection-tabular bridge.
- `references/patterns/galaxy-tabular-patterns.md`: Pattern note copied verbatim into the bundle. Choose a corpus-attested tabular recipe when the missing evidence is a column, key, or aggregate a tabular step can produce. Use when: the repair sub-path needs a computed column, join key, filter criterion, or aggregate the blocked step depends on.
- `references/notes/galaxy-collection-semantics.md`: Research note copied verbatim into the bundle. Preserve collection typing and map-over/reduction semantics when an inserted producer step joins or reshapes collection inputs. Use when: the repair inserts or rewires steps touching collection inputs, outputs, or mapped/reduced connections.
- `references/notes/galaxy-collection-semantics.yml`: Companion file copied verbatim into the bundle. Sibling of `references/notes/galaxy-collection-semantics.md`; read it where that note directs.
## Validation
- Validate `galaxy-workflow-draft.gxwf.yml` for artifact `galaxy-workflow-draft` against the galaxy-workflow-draft schema when a validator is available.
## Procedure
Topology is settled upstream by the `*-summary-to-galaxy-template` skill, and the per-step loop is wrapper-tier — it does not edit topology. This skill is the **escalation target** the loop reaches when implementation proves the settled topology cannot support a declared step: a step output that needs evidence no wired input carries (the connection graph validates fine, but nothing produces what the output requires). Wrapper-tier gaps — no Tool Shed wrapper picked yet — are not this case; those route through the discover-or-author branch.
You are invoked with the partially-realized draft and the open-requirements-ledger. Read the open blocking entries: each names a step, the uncomputable output, and the missing evidence. Your job is **bounded topology repair** — not re-settling the workflow. Repair the named region and nothing else; the surrounding topology, already-realized steps, and workflow interface stay put.
Decide the *shape* of the fix from the missing evidence, the surrounding data-flow design (galaxy-data-flow-draft-contract), IWC structure, and the pattern pages. It may be one producer step, or a small sub-path of a few tools, or — when the declared output is genuinely uncomputable and no producer exists — narrowing the step to what its inputs can support. Insert the new step(s) in the draft superset (galaxy-workflow-draft-format): concrete topology and edges, wrapper-tier `TODO` for `tool_id` and ports, `_plan_*` fields carrying intent. The existing discover-or-author → `summarize-galaxy-tool` → `implement-galaxy-tool-step` machinery realizes them on later loop iterations; do not resolve wrappers here.
Then update the ledger. For each blocking entry your repair addresses, mark it `resolved` with a note on how (producer added, sub-path added, output narrowed). The loop's convergence gate counts open blocking entries and requires each escalation to strictly reduce that count, under a hard cap on escalations. If you cannot close an entry — no producer is discoverable and the output cannot be honestly narrowed — **surrender it**: leave it open with a note, so the terminal path writes it into the final draft as a labelled gap rather than spinning or fabricating. Never insert a producer whose own output is uncomputable from what feeds it; that grows the DAG without reducing the open count and the loop will not converge.
## Runtime Notes
- Do not read Foundry source files at runtime; use only files packaged in this skill bundle and user-supplied artifacts.
- Preserve declared artifact filenames unless the user or harness supplies explicit paths.
- Carry unresolved assumptions into the output artifact instead of silently inventing missing source evidence.