Choreography: Callil Consolidation
Execution Sequence
Section titled “Execution Sequence”| Order | Run | Directory | Trigger | Estimated Duration |
|---|---|---|---|---|
| 1 | Run 0: Branch Setup | run-0-branch-setup/ | Manual | 5 min |
| 2 | Run 1: Foundation | run-1-foundation/ | After Run 0 exit gate passes | 45-60 min |
| 3 | Run 2: Visual Foundation | run-2-visual-foundation/ | After Run 1 exit gate passes | 20-30 min |
| 4 | Run 3: Organism Port | run-3-organism-port/ | After Run 2 exit gate passes | 45-60 min |
| 5 | Run 4: Cell Editor Upgrade | run-4-cell-editor-upgrade/ | After Run 3 exit gate passes | 30-45 min |
| 6 | Run 5: Entity-data-grid Evolution | run-5-entity-grid-evolution/ | After Run 4 exit gate passes | 90-120 min |
| 7 | Run 6: Item-grid Integration | run-6-item-grid-integration/ | After Run 5 exit gate passes | 45-60 min |
| 8 | Run 7: Package API | run-7-package-api/ | After Run 6 exit gate passes | 20-30 min |
| 9 | Run 8: Acceptance | run-8-acceptance/ | After Run 7 exit gate passes | 60-90 min |
| 10 | Run 9: canary-refactor Adaptation | run-9-canary-refactor/ | After Run 8 exit gate passes | 30-45 min |
All runs are sequential. Each depends on the prior run’s exit gate passing.
Artifact Dependency Map
Section titled “Artifact Dependency Map”| Artifact | Produced By | Consumed By | Path | Format |
|---|---|---|---|---|
Branch jmpicnic/component-consolidation | Run 0 | All subsequent runs | ux-prototype repo | Git branch |
| Baseline green status | Run 0 | Run 1 (entry criterion) | run-0-branch-setup/validate-exit.sh output | Script pass |
src/styles/tokens.css (Arda orange) | Run 1 | Run 2, Run 3 (theme tokens) | ux-prototype/src/styles/tokens.css | CSS |
src/styles/globals.css (refactored) | Run 1 | Run 2, Run 3 (global styles) | ux-prototype/src/styles/globals.css | CSS |
src/components/canary/primitives/ | Run 1 | Run 3 (organism imports) | ux-prototype/src/components/canary/primitives/ | TSX |
src/components/canary/atoms/ (expanded) | Run 1 | Run 3, Run 4 (organism/editor imports) | ux-prototype/src/components/canary/atoms/ | TSX |
src/types/canary/hooks/use-mobile.ts | Run 1 | Run 3 (sidebar organism) | ux-prototype/src/types/canary/hooks/use-mobile.ts | TS |
Canonical cn import path | Run 1 | All subsequent runs | @/types/canary/utils across 38+ files | TS imports |
| Primitives import check story | Run 1 | Run 2 (Storybook verification) | ux-prototype/src/components/canary/primitives/primitives.stories.tsx | TSX |
DataGrid molecule with themeQuartz | Run 2 | Run 3 (organism grid rendering), Run 5 (entity-data-grid base) | ux-prototype/src/components/canary/molecules/data-grid/data-grid.tsx | TSX |
ThemedGrid story | Run 2 | Run 3, Run 8 (visual reference) | ux-prototype/src/components/canary/molecules/data-grid/ | TSX |
| VRT baselines (grid) | Run 2 | Run 6 (regression comparison) | ux-prototype/__screenshots__/ | PNG |
| Sidebar, app-header, item-details, item-grid organisms | Run 3 | Run 4, Run 5, Run 6, Run 8 | ux-prototype/src/components/canary/organisms/ | TSX |
| Supporting molecules (sidebar, item-grid, item-details, overflow-toolbar) | Run 3 | Run 4, Run 5, Run 6 | ux-prototype/src/components/canary/molecules/ | TSX |
atoms/grid/select/ (SelectCellEditor) | Run 4 | Run 5 (entity-data-grid editing), Run 6 (item-grid refactor) | ux-prototype/src/components/canary/atoms/grid/select/ | TSX |
| Entity-data-grid with auto-publish, actions, search, pagination, toolbar | Run 5 | Run 6 (item-grid base) | ux-prototype/src/components/canary/organisms/shared/entity-data-grid/ | TSX |
| 10+ new stories with play functions | Run 5 | Run 8 (acceptance reference) | ux-prototype/src/components/canary/organisms/shared/entity-data-grid/ | TSX |
| Refactored item-grid using entity-data-grid | Run 6 | Run 7 (barrel exports), Run 8 (composition stories) | ux-prototype/src/components/canary/organisms/item-grid/ | TSX |
Updated src/canary.ts barrel | Run 7 | Run 8 (library build verification), Run 9 (canary-refactor imports) | ux-prototype/src/canary.ts | TS |
Updated package.json | Run 7 | Run 8 (build verification) | ux-prototype/package.json | JSON |
Library build (dist/) | Run 7 | Run 8 (entry criterion) | ux-prototype/dist/ | JS/TS |
| Composition stories (items, suppliers, list views) | Run 8 | Run 9 (visual reference) | ux-prototype/src/use-cases/ | TSX |
| VRT baselines (complete set) | Run 8 | Run 9 (regression baseline) | ux-prototype/__screenshots__/ | PNG |
| MDX documentation | Run 8 | Run 9 (reference) | ux-prototype/src/components/canary/ | MDX |
| Adapted canary-refactor stories | Run 9 | Final deliverable | ux-prototype/src/canary-refactor/ | TSX |
Hand-Off Protocol
Section titled “Hand-Off Protocol”All hand-offs are filesystem-only — no in-memory state is shared between runs. Each run works on the same branch (jmpicnic/component-consolidation) in the ux-prototype repository. State is transmitted via committed files on the branch.
General Protocol (Between Any Run N and Run N+1)
Section titled “General Protocol (Between Any Run N and Run N+1)”- Run N completes all tasks and commits results to
jmpicnic/component-consolidation. - Run N’s
validate-exit.shpasses (all entry and exit criteria verified). - The project manager reviews the exit gate output.
- Run N+1 is launched. Its entry criteria reference Run N’s committed artifacts.
- Run N+1’s
validate-exit.shentry section verifies prerequisites before work begins.
Between Run 0 and Run 1
Section titled “Between Run 0 and Run 1”- Run 0 creates branch
jmpicnic/component-consolidationoff HEAD ofjmpicnic/list-view-management-620. - Baseline verification passes:
npm ci && npm run lint && npx tsc --noEmit && npm run test. - Run 1 begins with the clean branch as its working state.
Between Run 1 and Run 2
Section titled “Between Run 1 and Run 2”- Run 1 commits all foundation work (styles, primitives, atoms, hooks, import rewrites).
- Full verification gate passes: lint + tsc + test + build-storybook.
- No references to
@/components/ui/*or@/utilsremain (except vendored code). - Run 2 begins with the themed DataGrid work.
Between Run 2 and Run 3
Section titled “Between Run 2 and Run 3”- Run 2 commits the
themeQuartzDataGrid migration and regenerated VRT baselines. - All grid stories render with the Arda-themed appearance.
- Run 3 begins porting organisms that depend on the themed DataGrid.
Between Run 3 and Run 4
Section titled “Between Run 3 and Run 4”- Run 3 commits all ported organisms, molecules, and assets with rewritten imports.
- All organism stories render in Storybook.
- Run 4 begins with the SelectCellEditor upgrade, which depends on the ported item-grid molecule.
Between Run 4 and Run 5
Section titled “Between Run 4 and Run 5”- Run 4 commits the promoted SelectCellEditor atom and deleted/replaced EnumCellEditor.
- All grid stories with enum columns still work.
- Run 5 begins entity-data-grid evolution using the new SelectCellEditor.
Between Run 5 and Run 6
Section titled “Between Run 5 and Run 6”- Run 5 commits all 5 sub-runs (auto-publish, actions, search, pagination, toolbar).
- Entity-data-grid API supports all capabilities needed for item-grid integration.
- Run 6 begins refactoring item-grid to delegate to entity-data-grid.
Between Run 6 and Run 7
Section titled “Between Run 6 and Run 7”- Run 6 commits the refactored item-grid.
- Item-grid stories are visually equivalent to pre-refactor.
- Run 7 begins package API cleanup (barrel exports, dependencies, orphan deletion).
Between Run 7 and Run 8
Section titled “Between Run 7 and Run 8”- Run 7 commits updated barrel exports, package.json, and deleted orphan files.
- Library build succeeds (
npm run build:lib). - Run 8 begins acceptance work (composition stories, VRT, documentation).
Between Run 8 and Run 9
Section titled “Between Run 8 and Run 9”- Run 8 commits composition stories, VRT baselines, and MDX documentation.
- All play functions pass; Storybook build succeeds.
- Run 9 begins adapting canary-refactor stories to use consolidated components.
Recovery Procedures
Section titled “Recovery Procedures”Run N fails mid-execution
Section titled “Run N fails mid-execution”- Identify which task failed by checking the task list status in the project plan.
- The branch should have commits from completed tasks (each task commits independently).
- Fix the failing task and re-run its intermediate gate.
- Resume from the failed task forward; do not re-run completed tasks.
- If the failure corrupted committed state, use
git logto identify the last good commit andgit reset --hard <sha>to that point before retrying.
Run N exit gate fails
Section titled “Run N exit gate fails”- Run
validate-exit.shto identify which specific criteria failed. - For build/lint/test failures: fix the code on the branch, re-run the failing checks.
- For missing-file criteria (e.g., expected directory does not exist): the task that produces that artifact was not completed — re-run that task.
- For import-path criteria (e.g., stale
@/utilsreferences found): usegrep -rto locate remaining references and fix them. - Re-run
validate-exit.shuntil all criteria pass.
Run N+1 entry criteria fail
Section titled “Run N+1 entry criteria fail”- The entry criteria check artifacts from Run N. If they fail, Run N did not complete correctly.
- Return to Run N and re-run its exit gate to diagnose.
- Fix any issues in Run N, re-commit, and re-validate.
- Then re-attempt Run N+1 launch.
Storybook build fails after file moves
Section titled “Storybook build fails after file moves”This is the most likely failure mode in Runs 1 and 3 (large file moves with import rewrites).
- Run
npm run build-storybook 2>&1 | head -50to identify the first error. - Common causes: missing import (file not copied), wrong import path (rewrite missed), circular dependency (barrel re-export loop).
- Fix the identified file, re-run
npx tsc --noEmitto verify, then re-runnpm run build-storybook.
VRT baseline mismatch after theme change (Run 2)
Section titled “VRT baseline mismatch after theme change (Run 2)”- This is expected — Run 2 changes the grid theme, so all grid VRT baselines will diff.
- Visually review the diffs using Playwright MCP screenshots.
- If the new appearance matches the Arda design tokens, regenerate baselines:
npx playwright test --project=vrt --update-snapshots. - If the appearance is wrong, fix the theme token mapping and re-run.
VRT diffs the agent cannot assess
Section titled “VRT diffs the agent cannot assess”When a VRT diff is ambiguous — the agent cannot confidently determine whether the visual change is acceptable or a regression — the agent must stop and consult the user before regenerating baselines.
Procedure:
- Do NOT regenerate baselines automatically.
- Copy the diff images (expected, actual, diff) to the run’s implementation output directory:
implementation/<run-dir>/vrt-review/. - Notify the user with:
- Which story/stories have ambiguous diffs
- File paths to the expected, actual, and diff screenshots so the user can open them side-by-side
- [Playwright MCP] Offer to navigate to the affected story in Storybook so the user can inspect it live in the browser
- Wait for the user to respond with “accept” (regenerate baselines) or “reject” (fix the code).
This applies to all runs that involve VRT, not just Run 2.
Launch Commands
Section titled “Launch Commands”| Run | Command |
|---|---|
| 0 | /launch-team callil-consolidation/plan/run-0-branch-setup |
| 1 | /launch-team callil-consolidation/plan/run-1-foundation |
| 2 | /launch-team callil-consolidation/plan/run-2-visual-foundation |
| 3 | /launch-team callil-consolidation/plan/run-3-organism-port |
| 4 | /launch-team callil-consolidation/plan/run-4-cell-editor-upgrade |
| 5 | /launch-team callil-consolidation/plan/run-5-entity-grid-evolution |
| 6 | /launch-team callil-consolidation/plan/run-6-item-grid-integration |
| 7 | /launch-team callil-consolidation/plan/run-7-package-api |
| 8 | /launch-team callil-consolidation/plan/run-8-acceptance |
| 9 | /launch-team callil-consolidation/plan/run-9-canary-refactor |
Note: All launch commands reference plan directories relative to the documentation/src/content/docs/roadmap/backlog/requested/ base. The team lead reads project-plan.md from the specified directory.
Copyright: © Arda Systems 2025-2026, All rights reserved