Run 7: Package API — Project Plan
Overview
Section titled “Overview”Finalize the published package surface: update barrel exports to reflect the consolidated component library, update dependencies (add/remove per analysis), and delete orphaned files. This is mechanical cleanup that must happen after all components are in their final state (Runs 1-6).
Repository: ux-prototype at /Users/jmp/code/arda/ux-prototype/
Branch: jmpicnic/component-consolidation
Worktree (read-only reference): /Users/jmp/code/arda/callil-consolidation-worktree/
Entry Criteria
Section titled “Entry Criteria”| # | Criterion | Verification |
|---|---|---|
| E1 | Run 6 exit gate passed | plan/run-6-item-grid-integration/validate-exit.sh returns 0 |
| E2 | All components in final locations with final APIs | Item-grid delegates to entity-data-grid, all organisms ported, all atoms in place |
| E3 | Branch clean, all Run 6 commits pushed | git status clean |
| E4 | Baseline tests pass | npm run lint && npx tsc --noEmit && npm run test all green |
Artifact Specifications
Section titled “Artifact Specifications”| Artifact | Location | Description |
|---|---|---|
| Updated barrel exports | src/canary.ts | Union of both branches minus ArdaDetailField, plus all worktree additions |
| Updated package.json | package.json | Dependencies added/removed per analysis/dependencies.md |
| Library build output | dist/ | Verified entry points after npm run build:lib |
Task List
Section titled “Task List”| # | Task | Persona | Depends On | Status | Acceptance Criteria |
|---|---|---|---|---|---|
| 7.1 | Update canary.ts barrel exports | front-end-engineer | E1-E4 | Pending | canary.ts exports the union of both branches minus ArdaDetailField, plus all worktree additions (sidebar, app-header, item-grid, item-details, new atoms, new molecules). ArdaBadge collision with extras.ts is acceptable. npx tsc --noEmit passes. |
| 7.2 | Verify extras.ts and index.ts unchanged | front-end-engineer | E1-E4 | Pending | extras.ts and index.ts are identical to their state on jmpicnic/list-view-management-620. No accidental modifications during Runs 1-6. If modified, justify the change. |
| 7.3 | Add radix-ui to production dependencies, remove @radix-ui/react-tooltip | front-end-engineer | E1-E4 | Pending | package.json has "radix-ui": "^1.4.3" in dependencies. @radix-ui/react-tooltip removed from dependencies. npm ci succeeds. |
| 7.4 | Add devDependencies: @reduxjs/toolkit, react-redux, redux-persist, sonner | front-end-engineer | E1-E4 | Pending | All four packages present in devDependencies with versions matching worktree. npm ci succeeds. |
| 7.5 | Remove devDependencies: next-themes, react-icons, shadcn, pako, qr-scanner, react-dropzone | front-end-engineer | E1-E4 | Pending | All six packages absent from package.json. No source file imports from any of them. npm ci succeeds. |
| 7.6 | Resolve @storybook/addon-links | front-end-engineer | E1-E4 | Pending | Search for linkTo and LinkTo across all source files. If zero usages found, remove @storybook/addon-links from devDependencies. If usages found, keep it and document where. |
| 7.7 | Delete src/components/canary/atoms/detail-field/ | front-end-engineer | 7.1 | Pending | Directory deleted. No imports reference detail-field anywhere. ArdaDetailField not exported from canary.ts. npx tsc --noEmit passes. |
| 7.8 | Delete src/components/ui/ directory if still present | front-end-engineer | 7.1 | Pending | If src/components/ui/ exists, it is deleted. All contents were moved to canary/primitives/ or canary/atoms/ in Run 1. No imports reference @/components/ui/*. npx tsc --noEmit passes. |
| 7.9 | Delete src/utils.ts if no remaining references | front-end-engineer | 7.1 | Pending | If src/utils.ts exists and no file imports from @/utils (all rewritten to @/types/canary/utils in Run 1), delete it. npx tsc --noEmit passes. |
| 7.10 | Delete src/hooks/use-mobile.ts if moved | front-end-engineer | 7.1 | Pending | If src/hooks/use-mobile.ts exists and the canonical location is src/types/canary/hooks/use-mobile.ts (moved in Run 1), delete the original. No imports reference @/hooks/use-mobile. npx tsc --noEmit passes. |
| 7.11 | Run npm ci to verify dependency changes | front-end-engineer | 7.3, 7.4, 7.5, 7.6 | Pending | rm -rf node_modules && npm ci succeeds with zero errors. Lock file updated. |
| 7.12 | Run npm run build:lib to verify library build | front-end-engineer | 7.1, 7.11 | Pending | npm run build:lib succeeds. dist/ contains expected entry points: index.js, canary.js, extras.js, type definitions, CSS. No build warnings about missing exports or unresolved imports. |
Dependency Graph
Section titled “Dependency Graph”E1-E4 (entry criteria) | +---+---+---+---+---+---+ | | | | | | | v v v v v v v 7.1 7.2 7.3 7.4 7.5 7.6 | | | | | +---+---+ | | +---+---+---+ | | | | | | v v v v v 7.7 7.8 7.9 7.10 7.11 | | | | | +---+---+---+------+ | v 7.12Parallelization: Tasks 7.1-7.6 can all start in parallel (they modify different files: barrel exports, package.json sections, source search). Tasks 7.7-7.10 depend on 7.1 (barrel must be updated before deleting files it no longer references). Task 7.11 depends on all package.json changes (7.3-7.6). Task 7.12 depends on both the barrel update (7.1) and clean install (7.11).
Single agent: All tasks assigned to one front-end-engineer. The parallelization describes logical independence, not agent concurrency.
Exit Criteria
Section titled “Exit Criteria”| # | Criterion | Verification |
|---|---|---|
| X1 | npm run lint passes | CI gate |
| X2 | npx tsc --noEmit passes | CI gate |
| X3 | npm run test passes | CI gate |
| X4 | npm run build:lib passes | CI gate |
| X5 | dist/ contains expected entry points (index, canary, extras, types, styles) | Manual inspection of dist/ |
| X6 | No orphaned files: src/components/ui/, src/utils.ts, src/hooks/use-mobile.ts, src/components/canary/atoms/detail-field/ all deleted (if applicable) | File system check |
| X7 | No unused dependencies in package.json | next-themes, react-icons, shadcn, pako, qr-scanner, react-dropzone absent |
| X8 | radix-ui in production deps, @radix-ui/react-tooltip removed | package.json inspection |
| X9 | canary.ts exports include all consolidated components | grep for key exports: ArdaSidebar, ArdaAppHeader, ArdaItemDetails, ItemGrid, createEntityDataGrid |
| X10 | All Run 7 commits on jmpicnic/component-consolidation | git log |
Agent Prompt Templates
Section titled “Agent Prompt Templates”front-end-engineer (all tasks)
Section titled “front-end-engineer (all tasks)”You are finalizing the package API for the consolidated component library.
Working directory: /Users/jmp/code/arda/ux-prototype/Branch: jmpicnic/component-consolidationRead-only reference: /Users/jmp/code/arda/callil-consolidation-worktree/
Key files:- Barrel exports: src/canary.ts, src/extras.ts, src/index.ts- Package config: package.json- Library build: vite.config.ts (LIB_BUILD mode)- Deprecated files to delete: see task list
Analysis documents:- Dependencies: /Users/jmp/code/arda/documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/analysis/dependencies.md- Barrel exports: /Users/jmp/code/arda/documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/analysis/index.md
Start with tasks 7.1-7.6 in parallel (they touch different files). For 7.1,read both the current canary.ts and the worktree's canary.ts to compute theunion. Remove ArdaDetailField. Add all new exports from the worktree.
For dependency tasks (7.3-7.6), read analysis/dependencies.md for exactpackage names and versions.
After barrel and dependency changes, proceed to cleanup (7.7-7.10), thenverification (7.11-7.12).
Run `npx tsc --noEmit` after each deletion to catch broken imports immediately.Implementation Output
Section titled “Implementation Output”At run completion, write the following to implementation/run-7-package-api/:
| Artifact | File | Description |
|---|---|---|
| Run summary | summary.md | What was done, decisions made during implementation, deviations from plan |
| Byproducts log | byproducts.md | Discovered issues, TODOs, observations for later runs |
| Validation output | validation-output.txt | Stdout from validate-exit.sh execution |
| Session log | session-log.md | Agent session IDs, timestamps, notable events |
Path: documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/implementation/run-7-package-api/
Handoff
Section titled “Handoff”To Run 8 (Acceptance)
Section titled “To Run 8 (Acceptance)”- Published package API is finalized:
canary.tshas all exports,package.jsonis clean - Library builds successfully with
npm run build:lib - All deprecated/orphaned files are deleted
- No unused dependencies remain
Key context for Run 8
Section titled “Key context for Run 8”- Run 8 composition stories should import from
@/components/canary/paths (or from the barrel if testing the published API) - The
canary.tsbarrel is the source of truth for what the package exports - MDX documentation should reference canonical import paths from
@arda-cards/design-system/canary
Copyright: © Arda Systems 2025-2026, All rights reserved