Home Mold

repair-galaxy-draft-topology

Make the smallest structural edit that closes an open blocking entry in a settled Galaxy draft.

Mold health

ok
  • Source layout

    Every file beside index.md is one the mold kind declares.

  • Axis fields

    target-specific fields are coherent.

  • Eval plan

    Abstract oracle: the properties any cast of this Mold must satisfy.

    eval.md declares properties and check type.

    eval.md ↗
  • Scenarios

    Concrete cases bound to fixtures, run against the eval properties.

    scenarios.md declares cases bound to fixtures.

    scenarios.md ↗
  • Typed refs

    10 typed references; 0 resolver issues.

  • On-demand triggers

    All on-demand references describe triggers.

  • Evidence checks

    Hypothesis references include verification.

axis
target-specific
target
galaxy
name
repair-galaxy-draft-topology
contract

Reference Loading

Typed references describe what casting consumes, and when the generated skill should load each artifact.

Schema galaxy-workflow-draft

Structured contract copied for validation or lookup.

Purpose
In/out contract: the draft this Mold reads and edits conforms to [[galaxy-workflow-draft]]; cast bundles the JSON Schema so the edited draft stays inside the superset the per-step loop expects.
Research galaxy-workflow-draft-format

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Emit added or replaced steps in the draft superset (TODO tool_id, _plan_* fields) so existing per-step machinery realizes them; respect the settle-vs-repair boundary.
Verify
Promote after a repair run inserts a producer the per-step loop then realizes without re-running the template Mold over the whole draft.
Research open-requirements-ledger

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Scope the repair from the open blocking entries — each names the step and what's missing — then mark resolved each one repaired, and leave any it cannot close open with a note.
Verify
Promote after a run closes a blocking entry and the loop terminates on the reduced open count.
CLI Command draft-validate

Command reference. Usually cast to a sidecar and loaded only when invoked.

Purpose
Check the draft contract, including dangling edges and sources, on the edited draft.
Trigger
After every edit.
Verify
Cast the skill, run a removal repair on a real draft, confirm the diagnostics name any source left dangling and the repaired draft exits 0.
Research galaxy-data-flow-draft-contract

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Edit the affected region consistently with the data-flow design that settled the surrounding topology.
Verify
Promote after two repairs preserve the surrounding data-flow design without re-deriving it from the source.
Research galaxy-collection-semantics

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Preserve collection typing and map-over/reduction semantics when an edit joins or reshapes collection inputs, and quote the rule when a removal rests on it.
Trigger
When the repair inserts or rewires steps touching collection inputs, outputs, or mapped/reduced connections, or a removal rests on collection semantics.
Research gxformat2-schema

Background synthesis loaded by explicit progressive-disclosure metadata.

Purpose
Keep post-job actions and nested parameter keys correct when an edit moves them.
Trigger
When an edit touches `out:` actions (`hide`, `rename`, `change_datatype`) or wires a nested parameter.
Pattern galaxy-collection-patterns

Workflow-construction idiom. Copied verbatim.

Purpose
Choose a corpus-attested collection recipe when the missing producer is a collection construction, reshape, or bridge.
Trigger
When an added step needs collection cleanup, reshaping, relabeling, identifier synchronization, or a collection-tabular bridge.
Pattern galaxy-tabular-patterns

Workflow-construction idiom. Copied verbatim.

Purpose
Choose a corpus-attested tabular recipe when the missing evidence is a column, key, or aggregate a tabular step can produce.
Trigger
When an added step needs a computed column, join key, filter criterion, or aggregate the blocked step depends on.

Cast artifacts

  • Claude skill repair-galaxy-draft-topology — Make the smallest structural edit that closes an open blocking entry in a settled Galaxy draft.

How to install →

Artifact handoffs

/ pipeline contract

repair-galaxy-draft-topology

Topology is settled upstream by the *-summary-to-galaxy-template Mold, and the per-step loop doesn’t edit it. This Mold makes the structural edits a settled draft still needs. It runs on an open blocking entry in the open-requirements-ledger: the settled draft can’t give a correct run, and a structural edit closes it. A missing wrapper is this case only when the discover-or-author branch is exhausted: no stock, shed or authored wrapper can produce the step’s declared output from its wired inputs, or the ledger already records the wrapper as confirmed absent. A tool version missing from a local cache is not absence. When the ledger records absence, don’t search again. A chosen wrapper that can’t produce one of the step’s declared outputs is this case too, whatever other wrappers might do: an add-step carries that output, and the loop resolves its wrapper later.

Decide the edit from the entry, the surrounding data-flow design (galaxy-data-flow-draft-contract), IWC structure, and the pattern pages.

Edit. Close each open blocking entry you have evidence for, not only the one that triggered the call, with the smallest set of edits, named by change-set kind: remove-step, rewire, change-parameter, add-input, remove-input, add-output / expose-output, remove-output, add-step, replace-tool. Apply all but the last two in place. add-step and replace-tool land at draft tier (galaxy-workflow-draft-format): concrete topology and edges, wrapper-tier TODO for tool_id and ports, _plan_* carrying intent. The discover-or-author → summarize-galaxy-tool → implement-galaxy-tool-step machinery realizes them on later loop iterations. A step duplicated from a realized step keeps its pin and state, and changes only the key that distinguishes it. Everything the entries don’t name stays as it is.

Interface. Change the workflow interface only when an entry names that as the remedy or a narrowing requires it. Promote an input with a default equal to the literal it replaces, and remove the literal from state. Expose an output by removing its hide, unless the design wants it hidden. Removing an input or output is a narrowing: append a kind: dropped entry with its units and a cited because.

Claims. A claim about a step with no resolved wrapper is not a fact. Attach it to that step as a plain ledger entry with step: set, and keep it out of doc:. “Computable” means the tool’s semantics give what the output declares, including element count and identifiers for collections. Reading a pinned wrapper’s command block or a consumer’s parser is allowed. Picking a wrapper is not.

Removal. When nothing can close an entry against a drafty step, narrow the step if it isn’t fully redundant, and rewrite its _plan_* to the reduced job. Otherwise remove it, append the kind: dropped entry, and resolve the blocking entry with a note naming the drop. A removal’s because quotes the primary artifact it rests on: the search run, the wrapper’s ports or command block, the semantics rule. The quoted artifacts must carry the removal alone: strike everything uncited, and the removal must still follow. Naming the blocking entry is not a citation, and a tool search says nothing about stock tools. Don’t remove a realized step.

After every edit:

  1. Remove what existed only to feed a removed step: compute it by walking every step’s in:, the workflow outputs, and ${label} in out: rename, not from the entry’s wording.
  2. Rewrite or remove mentions of removed ids and labels in doc, _plan_* and comment frames, and any doc promising what a removed step supplied.
  3. Move a removed step’s rename or change_datatype to the step that inherits its consumers.
  4. If an edit touched a step with a twin, a step duplicated from the same tool and plan, make the same edit there.
  5. Run draft-validate, with --concrete --strict-state when an edit touched a realized step, and fix what it reports.

Ledger. Mark each entry you close resolved, with a note naming the kinds you applied. A repair must leave fewer open blocking entries than it found, or say it could close none, which ends escalation. Never insert a producer whose own output is uncomputable from what feeds it. Leave an entry open, with a note saying what’s unproven, when a consumer truly needs the removed output, when no other edit closes an entry on a realized step, or when the removal doesn’t follow from what you can quote. An entry on a realized step reaches the final artifact as a labelled gap. A drafty step stays drafty, and the call reports it.

Incoming References (4)

  • advance-galaxy-draft-step related mold — Advance the gxformat2 draft by one step: pick the next drafty step, resolve a wrapper, implement the step, and validate.
  • apply-galaxy-workflow-changeset related mold — Apply a reviewed change-set to a concrete Galaxy workflow: untouched regions preserved, tool-introducing edits injected as drafty steps.
  • Galaxy workflow draft format related mold — gxformat2 draft superset: wrapper-tier TODOs (tool_id, state, port names) plus _plan_state / _plan_context / _plan_in / _plan_out per tool step.
  • Open-requirements ledger related mold — Carried workflow-run knowledge artifact for obligations, discoveries, decisions, brief-change recommendations, and convergence state.