Skip to content

Run 7: Package API — Project Plan

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/

#CriterionVerification
E1Run 6 exit gate passedplan/run-6-item-grid-integration/validate-exit.sh returns 0
E2All components in final locations with final APIsItem-grid delegates to entity-data-grid, all organisms ported, all atoms in place
E3Branch clean, all Run 6 commits pushedgit status clean
E4Baseline tests passnpm run lint && npx tsc --noEmit && npm run test all green
ArtifactLocationDescription
Updated barrel exportssrc/canary.tsUnion of both branches minus ArdaDetailField, plus all worktree additions
Updated package.jsonpackage.jsonDependencies added/removed per analysis/dependencies.md
Library build outputdist/Verified entry points after npm run build:lib
#TaskPersonaDepends OnStatusAcceptance Criteria
7.1Update canary.ts barrel exportsfront-end-engineerE1-E4Pendingcanary.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.2Verify extras.ts and index.ts unchangedfront-end-engineerE1-E4Pendingextras.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.3Add radix-ui to production dependencies, remove @radix-ui/react-tooltipfront-end-engineerE1-E4Pendingpackage.json has "radix-ui": "^1.4.3" in dependencies. @radix-ui/react-tooltip removed from dependencies. npm ci succeeds.
7.4Add devDependencies: @reduxjs/toolkit, react-redux, redux-persist, sonnerfront-end-engineerE1-E4PendingAll four packages present in devDependencies with versions matching worktree. npm ci succeeds.
7.5Remove devDependencies: next-themes, react-icons, shadcn, pako, qr-scanner, react-dropzonefront-end-engineerE1-E4PendingAll six packages absent from package.json. No source file imports from any of them. npm ci succeeds.
7.6Resolve @storybook/addon-linksfront-end-engineerE1-E4PendingSearch 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.7Delete src/components/canary/atoms/detail-field/front-end-engineer7.1PendingDirectory deleted. No imports reference detail-field anywhere. ArdaDetailField not exported from canary.ts. npx tsc --noEmit passes.
7.8Delete src/components/ui/ directory if still presentfront-end-engineer7.1PendingIf 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.9Delete src/utils.ts if no remaining referencesfront-end-engineer7.1PendingIf 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.10Delete src/hooks/use-mobile.ts if movedfront-end-engineer7.1PendingIf 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.11Run npm ci to verify dependency changesfront-end-engineer7.3, 7.4, 7.5, 7.6Pendingrm -rf node_modules && npm ci succeeds with zero errors. Lock file updated.
7.12Run npm run build:lib to verify library buildfront-end-engineer7.1, 7.11Pendingnpm 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.
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.12

Parallelization: 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.

#CriterionVerification
X1npm run lint passesCI gate
X2npx tsc --noEmit passesCI gate
X3npm run test passesCI gate
X4npm run build:lib passesCI gate
X5dist/ contains expected entry points (index, canary, extras, types, styles)Manual inspection of dist/
X6No 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
X7No unused dependencies in package.jsonnext-themes, react-icons, shadcn, pako, qr-scanner, react-dropzone absent
X8radix-ui in production deps, @radix-ui/react-tooltip removedpackage.json inspection
X9canary.ts exports include all consolidated componentsgrep for key exports: ArdaSidebar, ArdaAppHeader, ArdaItemDetails, ItemGrid, createEntityDataGrid
X10All Run 7 commits on jmpicnic/component-consolidationgit log
You are finalizing the package API for the consolidated component library.
Working directory: /Users/jmp/code/arda/ux-prototype/
Branch: jmpicnic/component-consolidation
Read-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 the
union. Remove ArdaDetailField. Add all new exports from the worktree.
For dependency tasks (7.3-7.6), read analysis/dependencies.md for exact
package names and versions.
After barrel and dependency changes, proceed to cleanup (7.7-7.10), then
verification (7.11-7.12).
Run `npx tsc --noEmit` after each deletion to catch broken imports immediately.

At run completion, write the following to implementation/run-7-package-api/:

ArtifactFileDescription
Run summarysummary.mdWhat was done, decisions made during implementation, deviations from plan
Byproducts logbyproducts.mdDiscovered issues, TODOs, observations for later runs
Validation outputvalidation-output.txtStdout from validate-exit.sh execution
Session logsession-log.mdAgent session IDs, timestamps, notable events

Path: documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/implementation/run-7-package-api/

  • Published package API is finalized: canary.ts has all exports, package.json is clean
  • Library builds successfully with npm run build:lib
  • All deprecated/orphaned files are deleted
  • No unused dependencies remain
  • Run 8 composition stories should import from @/components/canary/ paths (or from the barrel if testing the published API)
  • The canary.ts barrel is the source of truth for what the package exports
  • MDX documentation should reference canonical import paths from @arda-cards/design-system/canary