TS_NORMALIZED_WORKFLOWS_PLAN

Plan: Normalized Format2 + Native Workflow Models (galaxy-tool-util)

Step 0 — Restructure packages/schema/src/workflow/

Move generated (raw) schemas into packages/schema/src/workflow/raw/:

Step 1 — Expand Makefile sync targets ✅

Step 2 — Declarative test runner (red) ✅

New file: packages/schema/test/declarative-normalized.test.ts

Results: 16 red, 24 skipped (deferred operations), 0 green.

Step 3 — Implement normalizedNative (Effect schemas, green) ✅

New: packages/schema/src/workflow/normalized/native.ts

Schemas (Effect Schema.Struct):

Normalization rules (normalizedNative() function):

Results: 7 native tests green + 4 unique_tools native tests green = 7 total green. 9 format2 tests still red.

Lessons learned

Step 4 — Implement normalizedFormat2

New: packages/schema/src/workflow/normalized/format2.ts

Schemas (Effect Schema.Struct, same pattern as native):

Normalization rules (all implemented):

Gap coverage — synced 6 new fixtures + 10 new test expectations from gxformat2 worktree covering: doc array joining, input type aliases (data_input, data_collection, File), step out shorthand, outputs dict→list, array-form inputs, tool_state JSON parsing, tags, $link resolution.

Not implemented (no test expectations, may belong at expanded level):

Results: 25 green (7 native + 9 original format2 + 9 gap coverage), 24 skipped (deferred operations), 0 red.

Lessons learned

Step 5 — Export + shared types ✅

All normalized types, schemas, and normalizer functions accessible via @galaxyproject/tool-util-schema package import.


Resolved questions

Unresolved questions