Skip to content

Choreography: Image Upload Components

Setup before Run 1:

Terminal window
# Ensure main is up-to-date
git -C /Users/jmp/code/arda/ux-prototype fetch origin
git -C /Users/jmp/code/arda/ux-prototype checkout main
git -C /Users/jmp/code/arda/ux-prototype pull origin main
# Create base branch off main
git -C /Users/jmp/code/arda/ux-prototype branch jmpicnic/item-image-upload-components
# Create worktree for Run 1
git -C /Users/jmp/code/arda/ux-prototype worktree add \
/Users/jmp/code/arda/image-components-worktrees/run-1 \
jmpicnic/item-image-upload-components

For runs with parallel agents (e.g., Run 2), create one worktree per task branch:

Terminal window
# Create task branches off the base branch
git -C /Users/jmp/code/arda/ux-prototype branch \
jmpicnic/item-image-upload-components/image-display \
jmpicnic/item-image-upload-components
# Create worktree for parallel agent
git -C /Users/jmp/code/arda/ux-prototype worktree add \
/Users/jmp/code/arda/image-components-worktrees/run-2-display \
jmpicnic/item-image-upload-components/image-display

At the end of each wave, merge task branches back into the base branch and validate the gate.

OrderRunDirectoryTriggerWave
1Run 1: Infrastructurerun-1-infrastructure/Manual (after worktree setup)0a + 0b
2Run 2: Foundationrun-2-foundation/After Run 1 exit gate passes1
3Run 3: Compositionrun-3-composition/After Run 2 exit gate passes2
4Run 4: Grid + Organismrun-4-grid-organism/After Run 3 exit gate passes3 + 4
ArtifactProduced ByConsumed ByPathFormat
Utilities directory + barrelRun 1Runs 2-4src/types/canary/utilities/TypeScript
ImageFieldConfig typesRun 1Runs 2-4src/types/canary/utilities/image-field-config.tsTypeScript
getInitials utilityRun 1Run 2 (ImageDisplay, Avatar)src/types/canary/utilities/get-initials.tsTypeScript
getCroppedImage utilityRun 1Run 4 (ImageUploadDialog)src/types/canary/utilities/get-cropped-image.tsTypeScript
ShadCN primitives (6)Run 1Runs 2-4src/components/canary/primitives/TSX
Badge error-overlay variantRun 1Run 2 (ImageDisplay)src/components/canary/atoms/badge/badge-base.tsxTSX
Mock data moduleRun 1Runs 2-4src/components/canary/__mocks__/image-story-data.tsTypeScript
ImageDisplay moleculeRun 2Run 3 (HoverPreview, Comparison, FormField), Run 4 (CellDisplay)src/components/canary/molecules/image-display/TSX
ImageDropZone moleculeRun 2Run 4 (ImageUploadDialog)src/components/canary/molecules/image-drop-zone/TSX
ImagePreviewEditor moleculeRun 2Run 4 (ImageUploadDialog)src/components/canary/molecules/image-preview-editor/TSX
CopyrightAcknowledgment atomRun 2Run 4 (ImageUploadDialog)src/components/canary/atoms/copyright-acknowledgment/TSX
ImageHoverPreview moleculeRun 3Run 4 (ImageCellDisplay)src/components/canary/molecules/image-hover-preview/TSX
ImageComparisonLayout moleculeRun 3Run 4 (ImageUploadDialog)src/components/canary/molecules/image-comparison-layout/TSX
ImageFormField moleculeRun 3Run 4 (barrel exports)src/components/canary/molecules/form/image/TSX
ImageInspectorOverlay moleculeRun 3Run 4 (barrel exports)src/components/canary/molecules/image-inspector-overlay/TSX

All hand-offs are filesystem-only — no in-memory state is shared between runs. Each run reads committed code from prior runs.

  1. Current run completes all tasks and commits locally.
  2. validate-exit.sh for the current run passes.
  3. Next run’s entry criteria are checked (reference prior run outputs).
  4. Next run is launched.
  1. Run 4 exit gate passes.
  2. Final review of all stories in Storybook (manual).
  3. Push branch to origin: git push -u origin jmpicnic/item-image-upload-components
  4. Create PR against main.
  1. Check which tasks completed (review git log in worktree).
  2. Fix the failing task.
  3. Re-run the remaining tasks.
  4. Run validate-exit.sh to confirm.
  1. Read the validation output to identify which criteria failed.
  2. Fix the issues in the worktree.
  3. Commit the fixes.
  4. Re-run validate-exit.sh.
  1. This means Run N produced incomplete outputs.
  2. Return to Run N, fix the missing artifacts.
  3. Re-validate Run N exit, then retry Run N+1 entry.

After each wave gate: remove that wave’s worktrees and task branches.

After the final PR is merged:

Terminal window
# Remove any remaining worktrees
git -C /Users/jmp/code/arda/ux-prototype worktree prune
# Remove parent directory
rm -rf /Users/jmp/code/arda/image-components-worktrees
RunWorktree(s)Notes
1image-components-worktrees/run-1Single worktree, sequential tasks
2image-components-worktrees/run-2-* (up to 3)Parallel agents per component; merge to base branch at end
3image-components-worktrees/run-3-* (up to 3)3 parallel + 1 sequential (FormField after HoverPreview)
4image-components-worktrees/run-4Single worktree; critical path on ImageUploadDialog

Copyright: (c) Arda Systems 2025-2026, All rights reserved