Skip to content

Refactor pipeline to stage/step model with shared PIPELINE definition#88

Merged
nicpottier merged 3 commits intomainfrom
nicpottier/refactor-step-ui
Feb 19, 2026
Merged

Refactor pipeline to stage/step model with shared PIPELINE definition#88
nicpottier merged 3 commits intomainfrom
nicpottier/refactor-step-ui

Conversation

@nicpottier
Copy link
Contributor

Summary

  • Two-level DAG pipeline model: Stages (high-level UI groupings) contain Steps (atomic operations). Both levels have dependency graphs enabling parallel execution. Defined as a single PIPELINE constant in @adt/types.
  • DRY across the entire stack: CLI progress bars, API step runner, UI sidebar/cards/indicators, and DAG execution engine all derive topology from PIPELINE. No more hardcoded step ordering in multiple places.
  • Naming cleanup: StepRunCardStageRunCard, components/v2/steps/components/v2/stages/, image-classificationimage-filtering, image-meaningfulness label updated to "Image Meaningfulness".
  • Merged translations + TTS into single text-and-speech stage runner, eliminating duplicate text catalog building.
  • Updated docs: CLAUDE.md, GUIDELINES.md, and DECISIONS.md all updated with the stage/step architecture (ADR 017).

Test plan

  • pnpm typecheck passes
  • pnpm test — 662 tests pass
  • Manual: Run extract pipeline via CLI, verify progress bars grouped by stage
  • Manual: Run stages from Studio UI, verify sub-step indicators update correctly
  • Manual: Verify sidebar navigation and stage cards display correct labels

Introduce a shared pipeline definition (stages + steps) in @adt/types
that serves as the single source of truth for both execution order and
UI display. Replace the sequential runPipeline/runProof/runMaster CLI
flow with a DAG runner that respects inter-stage and intra-stage
dependencies, enabling parallel execution where possible.

- Add packages/types/src/pipeline.ts with StepName/StageName enums,
  PIPELINE definition, and derived lookups
- Add generic runDAG executor and runPipelineDAG wrapper with 26 tests
- Add runFullPipeline with individual step executors for all 17 steps
- Rewrite CLI to use DAG runner with pre-created grouped progress bars
- All step/stage topology now derived from PIPELINE in @adt/types (DRY)
- Rename StepRunCard → StageRunCard, sub-steps derived from PIPELINE
- Rename components/v2/steps/ → components/v2/stages/
- Rename image-classification step → image-filtering
- Update image-meaningfulness label to "Image Meaningfulness"
- Merge translations + TTS into single text-and-speech stage runner
- Add @adt/types as studio workspace dependency
- CLAUDE.md: Add Pipeline Architecture section, @adt/types import exception
- GUIDELINES.md: Add Pipeline Architecture subsection, update key files,
  progress reporting, code duplication warning, layer rule exception
- DECISIONS.md: Add ADR 017 (Two-Level DAG Pipeline), update ADR 006
  to reflect Tauri v2 decision
@nicpottier nicpottier merged commit f86444b into main Feb 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant