Agent Skill · cast

workflow-brief-to-galaxy-template

Build a gxformat2 skeleton from a reviewed Workflow Brief and its Galaxy design briefs, consulting retained source evidence.

← 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:workflow-brief-to-galaxy-template

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:

$workflow-brief-to-galaxy-template

Install with Antigravity

git clone https://github.com/galaxyproject/foundry
agy plugin install foundry/casts/claude

Then select with /skills or invoke explicitly as:

/workflow-brief-to-galaxy-template

Skill Bundle

/ packaged cast
attached files
15
upfront
6
on demand
9
cast rev
n/a
validated
0

Produces: 2 artifacts.

Consumes: 8 artifacts.

Artifact Contract

/ skill handoff

Produces

galaxy-workflow-draft

gxformat2 draft (see [[galaxy-workflow-draft-format]]): topology fully resolved (workflow inputs, outputs, step set, edges); tool_id / state / tool_shed_repository and wrapper-determined port names may be TODO with free-text _plan_state / _plan_context / _plan_in / _plan_out per step for later implementation Molds.

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": "gxformat2 draft (see [[galaxy-workflow-draft-format]]): topology fully resolved (workflow inputs, outputs, step set, edges); tool_id / state / tool_shed_repository and wrapper-determined port names may be TODO with free-text _plan_state / _plan_context / _plan_in / _plan_out per step for later implementation Molds."
}

open-requirements-ledger

Carried obligations ledger re-emitted by this step: entries it appended or closed updated, every other entry passed through with its provenance intact.

yamlopen-requirements.ledger.yml
Raw artifact contract
{
  "id": "open-requirements-ledger",
  "kind": "yaml",
  "default_filename": "open-requirements.ledger.yml",
  "description": "Carried obligations ledger re-emitted by this step: entries it appended or closed updated, every other entry passed through with its provenance intact."
}

Consumes

workflow-brief

Expert-reviewed implementation contract governing scope and requirements.

Raw artifact contract
{
  "id": "workflow-brief",
  "description": "Expert-reviewed implementation contract governing scope and requirements.",
  "inherited_schema": "[[workflow-brief-schema]]",
  "producers": [
    "freeform-summary-to-workflow-brief",
    "nextflow-summary-to-workflow-brief"
  ]
}

freeform-summary

Optional narrative source evidence retained from brief production; consult it for source-backed detail within the selected scope.

Raw artifact contract
{
  "id": "freeform-summary",
  "description": "Optional narrative source evidence retained from brief production; consult it for source-backed detail within the selected scope.",
  "optional": true,
  "producers": [
    "interview-to-freeform-summary",
    "summarize-paper"
  ]
}

summary-nextflow

Optional structured Nextflow source evidence; source processes and channels are evidence, not a Galaxy topology mandate.

Raw artifact contract
{
  "id": "summary-nextflow",
  "description": "Optional structured Nextflow source evidence; source processes and channels are evidence, not a Galaxy topology mandate.",
  "optional": true,
  "inherited_schema": "[[summary-nextflow]]",
  "producers": [
    "summarize-nextflow"
  ]
}

workflow-brief-galaxy-interface

Galaxy interface brief from [[workflow-brief-to-galaxy-interface]] that pins workflow inputs, outputs, labels.

Raw artifact contract
{
  "id": "workflow-brief-galaxy-interface",
  "description": "Galaxy interface brief from [[workflow-brief-to-galaxy-interface]] that pins workflow inputs, outputs, labels.",
  "producers": [
    "workflow-brief-to-galaxy-interface"
  ]
}

workflow-brief-galaxy-data-flow

Galaxy data-flow brief from [[workflow-brief-to-galaxy-data-flow]] that pins abstract operations and collection choices.

Raw artifact contract
{
  "id": "workflow-brief-galaxy-data-flow",
  "description": "Galaxy data-flow brief from [[workflow-brief-to-galaxy-data-flow]] that pins abstract operations and collection choices.",
  "producers": [
    "workflow-brief-to-galaxy-data-flow"
  ]
}

iwc-comparison-notes

Structural diff guidance from [[compare-against-iwc-exemplar]] (run on the design brief); steers the skeleton toward IWC-aligned structure before per-step authoring. Carries an inline gxformat2 excerpt of the nearest exemplar.

Raw artifact contract
{
  "id": "iwc-comparison-notes",
  "description": "Structural diff guidance from [[compare-against-iwc-exemplar]] (run on the design brief); steers the skeleton toward IWC-aligned structure before per-step authoring. Carries an inline gxformat2 excerpt of the nearest exemplar.",
  "producers": [
    "compare-against-iwc-exemplar"
  ]
}

iwc-exemplar-gxformat2

Cleaned gxformat2 view of the nearest IWC exemplar's relevant subgraph from [[compare-against-iwc-exemplar]]; pattern-match the draft's input/collection shapes, map-over wiring, output promotion, and post-job actions against this concrete idiom. Absent when no nearest exemplar was found.

Raw artifact contract
{
  "id": "iwc-exemplar-gxformat2",
  "description": "Cleaned gxformat2 view of the nearest IWC exemplar's relevant subgraph from [[compare-against-iwc-exemplar]]; pattern-match the draft's input/collection shapes, map-over wiring, output promotion, and post-job actions against this concrete idiom. Absent when no nearest exemplar was found.",
  "producers": [
    "compare-against-iwc-exemplar"
  ]
}

open-requirements-ledger

Carried obligations ledger [[open-requirements-ledger]]: the run's open, resolved, and surrendered entries with their provenance. Absent on the first Mold of a run; start an empty one.

Raw artifact contract
{
  "id": "open-requirements-ledger",
  "description": "Carried obligations ledger [[open-requirements-ledger]]: the run's open, resolved, and surrendered entries with their provenance. Absent on the first Mold of a run; start an empty one.",
  "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",
    "mature-galaxy-workflow-for-iwc",
    "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",
    "workflow-brief-to-galaxy-data-flow",
    "workflow-brief-to-galaxy-interface",
    "workflow-brief-to-galaxy-template"
  ]
}

Attached Files

/ runtime references

Load upfront

research

galaxy-data-flow-draft-contract

packaged

Respect the handoff from the Workflow-Brief-to-Galaxy interface and data-flow briefs to the gxformat2 skeleton.

Trigger: When translating abstract nodes, unresolved tool needs, and placeholder transformations into template TODOs.

upfront runtime verbatim hypothesis deterministic 7.4 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-09-23
revision: 4
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]]"
  - "[[workflow-brief-to-galaxy-data-flow]]"
  - "[[nextflow-summary-to-galaxy-template]]"
  - "[[cwl-summary-to-galaxy-template]]"
  - "[[freeform-summary-to-galaxy-template]]"
  - "[[workflow-brief-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 in
...
research

galaxy-workflow-draft-format

packaged

Emit the gxformat2 draft superset: TODO tool_id, optional state / tool_shed_repository, and per-step _plan_state / _plan_context planning fields.

upfront runtime verbatim hypothesis deterministic 12.6 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-09-23
revision: 4
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]]"
  - "[[workflow-brief-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, 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 name
...
research

open-requirements-ledger

packaged

Close the open entries the settled topology discharges, and append a blocking entry for any settled step whose declared output no wired input can supply — the computability gap gxwf validation cannot see, raised here rather than left for the per-step loop to hit.

upfront runtime verbatim hypothesis deterministic 18.5 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-09-21
revision: 4
related_notes:
  - "[[galaxy-workflow-draft-format]]"
related_molds:
  - "[[advance-galaxy-draft-step]]"
  - "[[repair-galaxy-draft-topology]]"
  - "[[implement-galaxy-tool-step]]"
summary: "Carried workflow-run knowledge artifact for obligations, discoveries, decisions, brief-change recommendations, and convergence state."
---

# Open-requirements ledger

The `open-requirements-ledger` is the carried workflow-run knowledge artifact threaded through the source→Galaxy pipeline. It 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 — and **source work it decided not to carry**. It also records evidence discovered during implementation, decisions made within the approved scope, and recommended changes to an immutable Workflow Brief. Each Mold that surfaces an obligation **appends** it; each Mold whose decision closes one **marks it resolved**; the terminal path **surrenders** whatever remains open, explicitly, into the final artifact.

This ledger is about the workflow being built. It is distinct from the opt-in `foundry-feedback-ledger`, which records actionable defects or friction in the Foundry assets building it. It is also not the harness's phase-progress tracker: execution status belongs to harness state, checkpoints, and reports rather than requirement entries.

## 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 a
...
research

workflow-brief-design

packaged

Keep the reviewed brief authoritative while using retained summaries as evidence rather than replacement intent.

upfront runtime verbatim hypothesis deterministic 7.3 KB
bundle
references/notes/workflow-brief-design.md
source
content/research/workflow-brief-design/index.md
Preview md
---
type: research
title: "Workflow Brief"
tags:
  - meta
status: draft
created: 2026-09-17
revised: 2026-09-20
revision: 5
summary: "Markdown Workflow Brief definition and section contract for scope, constraints, agent environment, and explicit blockers."
---

# Workflow Brief

A Workflow Brief is an expert-editable document describing what a workflow should achieve, what it should leave out, and the constraints under which an agent will build and run it. It is an input to design and implementation. The draft workflow captures the proposed steps, wiring, and tool state.

## Document shape

The brief is Markdown with a title and two sections: `## Workflow` and `## Agent Environment`. The workflow needs an objective; most details are optional. The agent environment must contain a description, which can explicitly record what still needs to be checked.

The `workflowBriefSchema` declaration uses the shared engine described in [[markdown-document-contract]] and lives in `packages/gxwf-foundry/src/workflow-brief.ts`. An illustrative document lives in `packages/gxwf-foundry/test/fixtures/workflow-brief/read-alignment.md`.

| Heading | Required | Content |
| --- | --- | --- |
| `## Workflow` | Yes | Scientific intent and scope. |
| `### Objective` | Yes, under Workflow | Scientific goal and desired outcome. |
| `### Sources` | No | Papers, interviews, repositories, relevant source pins, and evidence availability. |
| `### Scope` | No | Optional `#### Included` and `#### Excluded` describe selected work and boundaries. |
| `### Inputs and outputs` | No | Scientific roles and source-supported formats or organization. |
| `### Requirements and preferences` | No | Expert or source requirements, their strength, rationale, and evidence. |
| `### Acceptance criteria` | No | High-lev
...
schema

galaxy-workflow-draft

packaged

Output contract: the emitted gxformat2 draft conforms to [[galaxy-workflow-draft]]. Cast bundles the JSON Schema so the skill carries its output shape alongside the [[draft-validate]] CLI checks.

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"
          
...
schema

workflow-brief-schema

packaged

Carry the required implementation-contract shape into skeleton construction.

upfront runtime verbatim cast-validated deterministic 2.0 KB
bundle
references/schemas/workflow-brief-schema.schema.json
source
package://@galaxy-foundry/gxwf-foundry#workflowBriefSchema
Preview json
{
  "name": "Workflow Brief",
  "title": "required",
  "sections": [
    {
      "heading": "Workflow",
      "min": 1,
      "max": 1,
      "content": true,
      "sections": [
        {
          "heading": "Objective",
          "min": 1,
          "max": 1,
          "content": true
        },
        {
          "heading": "Sources",
          "max": 1,
          "content": true
        },
        {
          "heading": "Scope",
          "max": 1,
          "content": true,
          "sections": [
            {
              "heading": "Included",
              "max": 1,
              "content": true
            },
            {
              "heading": "Excluded",
              "max": 1,
              "content": true
            }
          ]
        },
        {
          "heading": "Inputs and outputs",
          "max": 1,
          "content": true
        },
        {
          "heading": "Requirements and preferences",
          "max": 1,
          "content": true
        },
        {
          "heading": "Acceptance criteria",
          "max": 1,
          "content": true
        },
        {
          "heading": "Open questions",
          "max": 1,
          "content": true
        },
        {
          "heading": "Decisions",
          "max": 1,
          "content": true
        },
        {
          "heading": "Related artifacts",
          "max": 1,
          "content": true
        },
        {
          "heading": "Blockers",
          "max": 1
        }
      ]
    },
    {
      "heading": "Agent Environment",
      "min": 1,
      "max": 1,
      "content": true,
      "sections": [
        {
          "heading": "Tooling",
          "max": 1,
          "content": true
        },
        {
          "heading": "Constraints",
          "max": 1,
          "content": true
        },
        {
          "heading": "Containerization",
          "max": 1,
          "content": true
        },
        {
          "heading": "Blockers",
          "max": 1
        }
      ]
    }
  ]
}

Load on demand

cli-command

draft-validate

packaged

Validate the emitted draft against draft-contract rules (sentinel form, topology, _plan_* placement) before handing off.

Trigger: After writing or modifying the draft workflow file.

on-demand runtime sidecar hypothesis deterministic 8.6 KB
bundle
references/cli/draft-validate.json
source
content/cli/gxwf/draft-validate.md
Preview json
{
  "type": "cli-command",
  "tool": "gxwf",
  "command": "draft-validate",
  "summary": "Validate a `class: GalaxyWorkflowDraft` workflow against draft-contract rules; with --concrete, also validate the extracted concrete subset.",
  "source_path": "content/cli/gxwf/draft-validate.md",
  "source_revision": 1,
  "package": "@galaxy-tool-util/cli",
  "description": "Validate a draft Galaxy workflow (class: GalaxyWorkflowDraft)",
  "synopsis": "gxwf draft-validate [options] <file>",
  "args": [
    {
      "raw": "file",
      "name": "file",
      "required": true,
      "variadic": false,
      "description": "Draft workflow file (.gxwf.yml)"
    }
  ],
  "options": [
    {
      "flags": "--format <fmt>",
      "name": "format",
      "description": "Force format: format2 (native is rejected for drafts)",
      "takesArgument": true,
      "argumentPlaceholder": "<fmt>",
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--json",
      "name": "json",
      "description": "Output structured JSON report",
      "takesArgument": false,
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--report-html [file]",
      "name": "reportHtml",
      "description": "Write HTML report to file (or stdout if omitted)",
      "takesArgument": true,
      "argumentPlaceholder": "[file]",
      "optionalArgument": true,
      "negatable": false
    },
    {
      "flags": "--report-markdown [file]",
      "name": "reportMarkdown",
      "description": "Write Markdown report to file (or stdout if omitted)",
      "takesArgument": true,
      "argumentPlaceholder": "[file]",
      "optionalArgument": true,
      "negatable": false
    },
    {
      "flags": "--concrete",
      "name": "concrete",
      "description": "Additionally extract the concrete subset and run the regular `gxwf validate` checks on it",
      "takesArgument": false,
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--cache-dir <dir>",
      "name": "cacheDir",
      "description": "Tool cache directory (for --concrete tool-state validation)",
      "takesArgument": true,
      "argumentPlaceholder": "<dir>",
      "optionalArgument": false,
      "negatable": false
    },
    {
      "flags": "--offline",
      "name": "offline",
      "description": "Do not fetch uncached tools; read only the lo
...
pattern

galaxy-collection-patterns

packaged

Use corpus-grounded collection pattern guidance for unresolved skeleton steps.

Trigger: When adding TODO steps for collection cleanup, reshaping, relabeling, identifier synchronization, or collection-tabular bridges.

on-demand runtime verbatim corpus-observed deterministic 6.1 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-10-15
revision: 4
summary: "Choose a Galaxy collection operation or map-over recipe from the current and required data shapes."
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]]"
  - "[[collection-unbox-singleton]]"
  - "[[sync-collections-by-identifier]]"
  - "[[harmonize-by-sortlist-from-identifiers]]"
  - "[[regex-relabel-via-tabular]]"
  - "[[relabel-via-rules-and-find-replace]]"
  - "[[collection-flatten-after-fanout]]"
  - "[[collection-build-named-bundle]]"
  - "[[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]]"
  - "[[workflow-brief-to-galaxy-template]]"
  - "[[compare-against-iwc-exemplar]]"
---

# Galaxy: collection patterns

Ch
...
pattern

galaxy-conditionals-patterns

packaged

Use corpus-grounded conditional pattern guidance for unresolved skeleton steps.

Trigger: When adding TODO steps for optional steps, gating on non-empty results, routing between alternative outputs, or transform-or-pass-through branches.

on-demand runtime verbatim corpus-observed deterministic 3.6 KB
bundle
references/patterns/galaxy-conditionals-patterns.md
source
content/patterns/galaxy-conditionals-patterns.md
Preview md
---
type: pattern
pattern_kind: moc
evidence: corpus-observed
title: "Galaxy: conditionals patterns"
aliases:
  - "Galaxy conditional pattern MOC"
  - "Galaxy when patterns"
  - "conditional workflow patterns"
tags:
  - target/galaxy
  - topic/galaxy-transform
status: draft
created: 2026-05-02
revised: 2026-10-15
revision: 4
summary: "Choose a Galaxy when gate, routed output, fallback, or collection cleanup by what must change downstream."
related_notes:
  - "[[iwc-conditionals-survey]]"
related_patterns:
  - "[[conditional-run-optional-step]]"
  - "[[conditional-route-between-alternative-outputs]]"
  - "[[conditional-gate-on-nonempty-result]]"
  - "[[conditional-transform-or-pass-through]]"
  - "[[collection-cleanup-after-mapover-failure]]"
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]]"
  - "[[workflow-brief-to-galaxy-template]]"
  - "[[compare-against-iwc-exemplar]]"
---

# Galaxy: conditionals patterns

Choose by what should happen when the condition is false: skip a step, select one value for a continuing path, or remove unusable collection members. The linked pages give the construction details. The [[iwc-conditionals-survey]] records the IWC evidence behind them.

Galaxy steps in the observed patterns receive a boolean through an input named `when` and declare `when: $(inputs.when)`. If later steps require an output from a skipped branch, give them an explicit merge or fallback. A `when` gate alone does not provide that value.

## Skip work without replacing its output

- **User choice or another available boolean:** [[conditional-run-option
...
pattern

galaxy-interval-patterns

packaged

Use corpus-grounded genomic-interval pattern guidance for unresolved skeleton steps.

Trigger: When adding TODO steps for interval overlap, merge, coverage, windowing, masking, or set-algebra on coordinate features.

on-demand runtime verbatim corpus-observed deterministic 5.5 KB
bundle
references/patterns/galaxy-interval-patterns.md
source
content/patterns/galaxy-interval-patterns.md
Preview md
---
type: pattern
pattern_kind: moc
evidence: corpus-observed
title: "Galaxy: genomic interval patterns"
aliases:
  - "Galaxy interval pattern MOC"
  - "genomic interval transformation patterns"
  - "IWC interval pattern map"
tags:
  - target/galaxy
  - topic/galaxy-transform
  - topic/interval-transform
status: draft
created: 2026-06-10
revised: 2026-09-23
revision: 4
summary: "Use this MOC to choose corpus-grounded Galaxy genomic interval operations and recipes on coordinate features."
related_notes:
  - "[[iwc-interval-operations-survey]]"
related_patterns:
  - "[[interval-overlap-filter]]"
  - "[[interval-coverage]]"
  - "[[interval-merge-overlapping]]"
  - "[[interval-window-flank]]"
  - "[[interval-consensus-by-multi-intersect]]"
  - "[[interval-mask-by-set-algebra]]"
  - "[[interval-windowed-coverage]]"
  - "[[tabular-synthesize-bed-from-3col]]"
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]]"
  - "[[workflow-brief-to-galaxy-template]]"
  - "[[compare-against-iwc-exemplar]]"
---

# Galaxy: genomic interval patterns

The runtime-facing map for Galaxy **coordinate-feature** choices — operations that understand `chrom/start/end/strand`, as opposed to opaque-column [[galaxy-tabular-patterns]] or container-shaped [[galaxy-collection-patterns]]. Use it before loading raw survey notes; [[iwc-interval-operations-survey]] is the evidence backing, these pages are the actionable references.

This is the smallest of the three data-shape MOCs by design. Interval algebra is a real but moderate cluster in IWC — concentrated in epigenetics peak-consensus and
...
pattern

galaxy-tabular-patterns

packaged

Use corpus-grounded tabular pattern guidance for unresolved skeleton steps.

Trigger: When adding TODO steps for tabular filtering, projection, joins, aggregation, text-processing recipes, or tabular-collection bridges.

on-demand runtime verbatim corpus-observed deterministic 4.8 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-10-15
revision: 4
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]]"
  - "[[workflow-brief-to-galaxy-template]]"
  - "[[compare-against-iwc-exemplar]]"
---

# Galaxy: tabular patterns

Choose by the shape of the input and the result you need. These patterns treat table columns as values, even when a column contains coordinates or sequence text. For coordinate-aware operations use [[galaxy-interval-patterns]], and for FASTA records use [[galaxy-sequence-patterns]]. Open the linked operation page for tool parameters and exam
...
research

galaxy-collection-semantics

packaged

Preserve Galaxy collection typing and map-over/reduction semantics in the gxformat2 skeleton.

Trigger: When creating workflow inputs, outputs, and placeholder connections involving collections.

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
...
research

galaxy-collection-semantics

packaged

Preserve Galaxy collection typing and map-over/reduction semantics in the gxformat2 skeleton.

Trigger: When creating workflow inputs, outputs, and placeholder connections involving collections.

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.

...
research

galaxy-workflow-comments

packaged

Group the settled step set into titled stage frames (the gxformat2 `comments:` array) so the skeleton carries the analysis-stage narrative IWC authors annotate by hand. Schema-legal and optional.

Trigger: After topology is settled and the skeleton can be partitioned into named analysis stages (inputs, per-stage step clusters, parameter-derivation knots, visualization/outputs).

on-demand runtime verbatim corpus-observed deterministic 4.8 KB
bundle
references/notes/galaxy-workflow-comments.md
source
content/research/galaxy-workflow-comments/index.md
Preview md
---
type: research
tags:
  - target/galaxy
status: draft
created: 2026-06-12
revised: 2026-09-23
revision: 3
related_notes:
  - "[[iwc-comments-survey]]"
  - "[[gxformat2-schema]]"
  - "[[freeform-summary-to-galaxy-template]]"
  - "[[workflow-brief-to-galaxy-template]]"
  - "[[nextflow-summary-to-galaxy-template]]"
  - "[[cwl-summary-to-galaxy-template]]"
summary: "How to annotate a gxformat2 workflow with editor comments: one titled frame per analysis stage, populate contains_steps, color decorative."
---

# Galaxy workflow comments

Use this note when authoring or translating a Galaxy gxformat2 workflow and
deciding how to annotate it with editor comments — the top-level `comments:`
array the workflow editor renders as on-canvas frames and notes. Comments carry
no execution semantics; they document and visually organize the workflow. This
is presentation guidance, not a `content/patterns/` operation. Corpus evidence
behind every rule here lives in [[iwc-comments-survey]].

Comments are optional — roughly one in five IWC workflows use them. Add them when
the workflow has enough steps that a reader benefits from a stage map; skip them
on short linear workflows.

## 1. Box each analysis stage in a titled frame

The core move. Once topology is settled, partition the step set into `type:
frame` comments — one frame per logical stage of the analysis — and give each a
`title:` and a `contains_steps:` list of the step labels it groups:

```yaml
comments:
  - type: frame
    position: [687.5, 395.8]
    size: [498.9, 345.5]
    color: green
    title: Genome quality evaluation
    contains_steps:
      - run BUSCO
      - summarize BUSCO
```

`position` and `size` are editor-canvas geometry (floats); set them so the frame
encloses its steps, or copy them from the nearest IWC e
...
research

galaxy-workflow-testability-design

packaged

Choose stable workflow input/output labels, testable checkpoint outputs, and fixture-compatible workflow interfaces while drafting the skeleton.

Trigger: When the template decides workflow inputs, workflow outputs, promoted checkpoints, or collection output identifiers that future tests will need to address.

on-demand runtime verbatim corpus-observed deterministic 7.8 KB
bundle
references/notes/galaxy-workflow-testability-design.md
source
content/research/galaxy-workflow-testability-design/index.md
Preview md
---
type: research
tags:
  - target/galaxy
status: draft
created: 2026-05-03
revised: 2026-09-23
revision: 3
related_notes:
  - "[[iwc-workflow-testability-survey]]"
  - "[[iwc-test-data-conventions]]"
  - "[[planemo-asserts-idioms]]"
  - "[[iwc-shortcuts-anti-patterns]]"
  - "[[planemo-workflow-test-architecture]]"
  - "[[implement-galaxy-workflow-test]]"
  - "[[gxformat2-schema]]"
  - "[[gxformat2-workflow-inputs]]"
  - "[[galaxy-datatypes-conf]]"
summary: "Design guidance for Galaxy workflow inputs, outputs, and checkpoints that make IWC-style workflow tests possible."
---

# Design a Galaxy workflow that can be tested

Choose the workflow's public inputs and outputs while designing the analysis, before writing its `-tests.yml`. A workflow test supplies `job:` values by input name and checks `outputs:` by output name. It can only check results the workflow exposes. A good interface gives the test a reproducible input, an addressable result, and at least one assertion that would catch a meaningful wrong result.

This note concerns workflow design. [[iwc-test-data-conventions]] covers the test file's input fixtures, [[planemo-asserts-idioms]] covers assertion syntax, and [[iwc-shortcuts-anti-patterns]] explains when a smoke check is enough. [[iwc-workflow-testability-survey]] holds the broader corpus evidence.

## Name the public interface before writing tests

Give each input and promoted output a stable, descriptive public name. In an exported gxformat2 workflow this is commonly the entry's `id`. The structural [[gxformat2-schema]] also permits `label`. Check the **effective name in the workflow being tested** instead of assuming a step label, generated dataset name, or array position will become the test key. In the pinned [Scanpy workflow](https://github.com/galaxy
...

SKILL.md


# workflow-brief-to-galaxy-template

Follow the procedure below and use the artifact/reference sections as the runtime contract.

## When To Use

- Build a gxformat2 skeleton from a reviewed Workflow Brief and its Galaxy design briefs, consulting retained source evidence.

## Inputs

- Read artifact `workflow-brief`. Schema: workflow-brief-schema. Produced by `freeform-summary-to-workflow-brief`, `nextflow-summary-to-workflow-brief`. Expert-reviewed implementation contract governing scope and requirements.
- Read artifact `freeform-summary`. Optional; absence is allowed and must be reported honestly. Produced by `interview-to-freeform-summary`, `summarize-paper`. Optional narrative source evidence retained from brief production; consult it for source-backed detail within the selected scope.
- Read artifact `summary-nextflow`. Optional; absence is allowed and must be reported honestly. Schema: summary-nextflow. Produced by `summarize-nextflow`. Optional structured Nextflow source evidence; source processes and channels are evidence, not a Galaxy topology mandate.
- Read artifact `workflow-brief-galaxy-interface`. Produced by `workflow-brief-to-galaxy-interface`. Galaxy interface brief from workflow-brief-to-galaxy-interface that pins workflow inputs, outputs, labels.
- Read artifact `workflow-brief-galaxy-data-flow`. Produced by `workflow-brief-to-galaxy-data-flow`. Galaxy data-flow brief from workflow-brief-to-galaxy-data-flow that pins abstract operations and collection choices.
- Read artifact `iwc-comparison-notes`. Produced by `compare-against-iwc-exemplar`. Structural diff guidance from compare-against-iwc-exemplar (run on the design brief); steers the skeleton toward IWC-aligned structure before per-step authoring. Carries an inline gxformat2 excerpt of the nearest exemplar.
- Read artifact `iwc-exemplar-gxformat2`. Produced by `compare-against-iwc-exemplar`. Cleaned gxformat2 view of the nearest IWC exemplar's relevant subgraph from compare-against-iwc-exemplar; pattern-match the draft's input/collection shapes, map-over wiring, output promotion, and post-job actions against this concrete idiom. Absent when no nearest exemplar was found.
- 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`, `mature-galaxy-workflow-for-iwc`, `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`, `workflow-brief-to-galaxy-data-flow`, `workflow-brief-to-galaxy-interface`, `workflow-brief-to-galaxy-template`. Carried obligations ledger open-requirements-ledger: the run's open, resolved, and surrendered entries with their provenance. Absent on the first Mold of a run; start an empty one.

## Outputs

- Write artifact `galaxy-workflow-draft` as `galaxy-workflow-draft.gxwf.yml`. Format: `yaml`. Schema: galaxy-workflow-draft. gxformat2 draft (see galaxy-workflow-draft-format): topology fully resolved (workflow inputs, outputs, step set, edges); tool_id / state / tool_shed_repository and wrapper-determined port names may be TODO with free-text _plan_state / _plan_context / _plan_in / _plan_out per step for later implementation Molds.
- Write artifact `open-requirements-ledger` as `open-requirements.ledger.yml`. Format: `yaml`. Carried obligations ledger re-emitted by this step: entries it appended or closed updated, every other entry passed through with its provenance intact.

## Required Tools

- **`gxwf`** (gxwf). `npm install -g '@galaxy-tool-util/cli@^1.13.1'`.
  Ephemeral run: `npx --yes --package @galaxy-tool-util/cli@1.13.1 gxwf`.
  Check: `gxwf --help | grep -q draft-validate`.
  Docs: https://github.com/jmchilton/galaxy-tool-util-ts/tree/main/packages/cli

## Load Upfront

- `references/notes/galaxy-data-flow-draft-contract.md`: Research note copied verbatim into the bundle. Respect the handoff from the Workflow-Brief-to-Galaxy interface and data-flow briefs to the gxformat2 skeleton. Use when: translating abstract nodes, unresolved tool needs, and placeholder transformations into template TODOs.
- `references/notes/galaxy-workflow-draft-format.md`: Research note copied verbatim into the bundle. Emit the gxformat2 draft superset: TODO tool_id, optional state / tool_shed_repository, and per-step _plan_state / _plan_context planning fields.
- `references/notes/open-requirements-ledger.md`: Research note copied verbatim into the bundle. Close the open entries the settled topology discharges, and append a blocking entry for any settled step whose declared output no wired input can supply — the computability gap gxwf validation cannot see, raised here rather than left for the per-step loop to hit.
- `references/notes/workflow-brief-design.md`: Research note copied verbatim into the bundle. Keep the reviewed brief authoritative while using retained summaries as evidence rather than replacement intent.
- `references/schemas/galaxy-workflow-draft.schema.json`: Schema file copied verbatim into the bundle. Output contract: the emitted gxformat2 draft conforms to galaxy-workflow-draft. Cast bundles the JSON Schema so the skill carries its output shape alongside the draft-validate CLI checks.
- `references/schemas/workflow-brief-schema.schema.json`: Schema file copied verbatim into the bundle. Carry the required implementation-contract shape into skeleton construction.

## Load On Demand

- `references/cli/draft-validate.json`: CLI command reference packaged as a sidecar. Validate the emitted draft against draft-contract rules (sentinel form, topology, _plan_* placement) before handing off. Use when: after writing or modifying the draft workflow file.
- `references/patterns/galaxy-collection-patterns.md`: Pattern note copied verbatim into the bundle. Use corpus-grounded collection pattern guidance for unresolved skeleton steps. Use when: adding TODO steps for collection cleanup, reshaping, relabeling, identifier synchronization, or collection-tabular bridges.
- `references/patterns/galaxy-conditionals-patterns.md`: Pattern note copied verbatim into the bundle. Use corpus-grounded conditional pattern guidance for unresolved skeleton steps. Use when: adding TODO steps for optional steps, gating on non-empty results, routing between alternative outputs, or transform-or-pass-through branches.
- `references/patterns/galaxy-interval-patterns.md`: Pattern note copied verbatim into the bundle. Use corpus-grounded genomic-interval pattern guidance for unresolved skeleton steps. Use when: adding TODO steps for interval overlap, merge, coverage, windowing, masking, or set-algebra on coordinate features.
- `references/patterns/galaxy-tabular-patterns.md`: Pattern note copied verbatim into the bundle. Use corpus-grounded tabular pattern guidance for unresolved skeleton steps. Use when: adding TODO steps for tabular filtering, projection, joins, aggregation, text-processing recipes, or tabular-collection bridges.
- `references/notes/galaxy-collection-semantics.md`: Research note copied verbatim into the bundle. Preserve Galaxy collection typing and map-over/reduction semantics in the gxformat2 skeleton. Use when: creating workflow inputs, outputs, and placeholder connections involving collections.
- `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.
- `references/notes/galaxy-workflow-comments.md`: Research note copied verbatim into the bundle. Group the settled step set into titled stage frames (the gxformat2 `comments:` array) so the skeleton carries the analysis-stage narrative IWC authors annotate by hand. Schema-legal and optional. Use when: after topology is settled and the skeleton can be partitioned into named analysis stages (inputs, per-stage step clusters, parameter-derivation knots, visualization/outputs).
- `references/notes/galaxy-workflow-testability-design.md`: Research note copied verbatim into the bundle. Choose stable workflow input/output labels, testable checkpoint outputs, and fixture-compatible workflow interfaces while drafting the skeleton. Use when: the template decides workflow inputs, workflow outputs, promoted checkpoints, or collection output identifiers that future tests will need to address.

## Validation

- Validate `galaxy-workflow-draft.gxwf.yml` for artifact `galaxy-workflow-draft` against the galaxy-workflow-draft schema when a validator is available.

## Procedure

Read the unchanged Workflow Brief and its Galaxy interface and data-flow briefs. Consult the original source artifact and retained `freeform-summary` or `summary-nextflow` when present. Emit a gxformat2 skeleton with workflow inputs, workflow outputs, placeholder steps, rough connections, and TODO slots for later implementation skills.

The Workflow Brief is the implementation contract. Source artifacts are an evidence dossier: use them to substantiate methods, formats, parameters, and named tools within the selected scope, never to reintroduce excluded work or override expert requirements. A hand-authored brief without a source summary remains a valid input; record consequential missing evidence in the ledger instead of inventing it.

Topology is this skill's job to settle. The output must be concrete gxformat2: workflow inputs with their final collection shapes and formats, workflow outputs, the step set, the producer→consumer edge graph, branches, and `when:` guards are all decided here. The upstream Workflow-Brief-to-Galaxy interface and data-flow briefs guide those decisions, but if they hedge or leave a topology choice open, this skill makes the call from reviewed intent, source evidence, IWC exemplars, and pattern pages — never emit a topology `TODO`. Wrapper resolution, by contrast, is **evidence-gated, not source-gated**: resolve each tool step to the tier its evidence supports — **Resolved** (fully concrete, no `_plan_*`), **Identity-pinned** (concrete `tool_id`, parameters and changeset left to the per-step skill), or **Deferred** (`tool_id: TODO`) — as defined in galaxy-workflow-draft-format. Capture whatever you defer in the `_plan_*` family (`_plan_state`, `_plan_context`, `_plan_in`, `_plan_out`) so the per-step skill has the source evidence and constraints it needs.

Evidence tendency: narrative sources name tools less often than structured pipeline summaries, so their steps land in **Deferred** more often — but source evidence that names a specific tool/version can harden to the matching tier, and a corpus-confirmed utility wrapper is not deferred merely because the source is informal. When deferring a domain tool, cite the originating paper section, interview answer, pipeline location, figure, or supplementary table in `_plan_context`, and record vague intent in `_plan_state` so the per-step skill knows the evidence ceiling.

Before handing off, sanity-check that each step is computable from what feeds it. Once the step set is settled, re-read it and ask, for each step, whether the operation its intent implies can actually be produced from the inputs you wired. The connection graph only knows that ports connect — not what each port is supposed to *contain* — so an output that needs evidence no input carries will validate fine and still be impossible to implement. Where you spot that gap, don't leave it implicit: wire (or add) the step that supplies the missing input, or record the unmet need plainly in `_plan_state` so the per-step skill or a reviewer can act on it rather than discover it late.

Things worth a second look:

- an output column or field that no wired input carries;
- an aggregate or summary whose grouping key isn't present upstream;
- a filter or threshold whose criterion isn't produced by any input;
- a join whose key doesn't exist on both sides;
- a step whose `_plan_*` promises more than its `in:` ports can supply;
- if classification step, is that classification/enumeration possible only from inputs.

Optionally, once topology is settled, group the step set into titled stage frames via the gxformat2 `comments:` array (one frame per analysis stage, `contains_steps:` populated, color decorative) — see galaxy-workflow-comments for the convention.

Before handing off, check each settled step is computable from what feeds it. The connection graph knows that ports connect, not what they carry — so a declared output that needs evidence no wired input supplies will validate yet can't be implemented. Where you find that gap, wire (or add) the producer; if you can't, record the vague intent in `_plan_state` and append a **blocking** entry to the open-requirements-ledger naming the step, the uncomputable output, and the missing evidence, so the per-step loop or repair-galaxy-draft-topology acts on it rather than discovering it late.

Output shape is gxformat2 with wrapper-tier relaxations and `_plan_state` / `_plan_context` / `_plan_in` / `_plan_out` per tool step — see galaxy-workflow-draft-format. Refinement open work for those planning fields lives in `refinement.md`.

## Feedback Mode

- Feedback mode is off unless the caller explicitly enables `--feedback` or supplies a feedback-ledger path.
- When enabled, read `_feedback.md` before doing the work and use its registered `foundry-feedback.ledger.yml` protocol.
- Preserve harness-owned run and phase state. Append only concrete observations about a canonical Foundry source asset or a related project that this run showed to be at fault; do not put ordinary workflow requirements in this ledger.
- Before reporting completion, make one explicit pass over the work you just did. Do not ask yourself whether anything was unclear — recall what happened: where you guessed at something the instructions should have settled, needed information this bundle does not carry, hit an instruction that contradicted another or contradicted the artifacts in front of you, used a packaged reference that did not cover your case, or did something the procedure never describes.
- Append an entry for each such event that clears the protocol's bar. If none do, append nothing and report `no feedback` explicitly. Silence and a clean pass are not the same thing, and nothing downstream can tell them apart unless you say which one it was.
- Pass the same ledger path to any subagent used for this work, and merge updates serially so one writer cannot overwrite another.

## 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.