T-V6JD-repoint-template-sync-and-scripts
Status: planning/draft · Impact: low · Complexity: small
Fix pumice’s helper scripts that assume a repo-root working directory so they
work from apps/pumice: the upstream template-sync (bring-up-to-date /
template-check), the dynamic dev-port allocator, and the drift/dep scripts.
Either repoint them or retire the sync deliberately.
Pumice’s scripts/ and mise.toml assume the pumice repo root is the CWD.
mise.toml computes TAURI_DEV_PORT/STORYBOOK_PORT/MCP_PORT/HTTP_PORT
via exec() of scripts/dev-port.sh, and bring_up_to_date.sh /
sync-template-check sync against an upstream template repo.
| Location | Assumption today |
|---|---|
apps/pumice/scripts/bring_up_to_date.sh | Runs from pumice repo root; root-relative paths |
apps/pumice/scripts/sync-template-check | Compares against upstream template at repo root |
apps/pumice/mise.toml ([env]) | exec() of scripts/dev-port.sh; relative paths |
apps/pumice/scripts/dev-port.sh | Per-worktree port block |
Proposed
Section titled “Proposed”Make the scripts CWD-correct under apps/pumice (resolve paths relative to the
script/app root, not the repo root), and decide the fate of the template-sync
workflow now that pumice is no longer its own repo root.
Approach
Section titled “Approach”- Audit CWD assumptions. Enumerate scripts that resolve paths relative to
the repo root and would break at
apps/pumice. - Repoint paths. Anchor script paths to the app root (e.g. via
justfile_directory()/ script-relative resolution) sojustrecipes and themise.tomlexec()env work fromapps/pumice. - Decide template-sync. Pumice’s upstream-template sync assumed a
standalone repo; under the monorepo, either keep it scoped to
apps/pumiceor retire it. Record the decision. - Verify dev ports. Confirm the dynamic port env resolves and dev/storybook still get non-colliding ports under the monorepo.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/pumice/scripts/* | edit | Anchor paths to the app root |
apps/pumice/mise.toml | edit | Fix exec() env CWD assumptions |
apps/pumice/justfile | edit | Ensure recipes resolve from the app root |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
justrecipes and themise.tomlport env run correctly fromapps/pumice. - AC-2: The template-sync scripts either run scoped to
apps/pumiceor are retired with the decision recorded. - AC-3: No script silently reads/writes outside
apps/pumice.
Out of scope
Section titled “Out of scope”- CI wiring —
T-T2HB. - Bun migration of scripts’ package-manager calls —
T-M7QX(this task handles CWD/pathing, not the PM swap).
Dependencies
Section titled “Dependencies”T-K3PN(hard): the vendored scripts are what this repoints.
Depends on
Section titled “Depends on”T-K3PN