Skip to content

Centralize script path resolution #28

Description

@natashaannn

Centralize script path resolution

Objective

Create a single path-resolution module for scripts so file paths are no longer duplicated across script entrypoints.


Why this matters

Current scripts contain scattered hardcoded paths.

Centralized path helpers reduce drift and make later pipeline migration safer.


Parallelization metadata

Track

scripts

Depends on

  • none

Safe to run in parallel with

  • pipeline node migration
  • transcript pure-function extraction

Merge risk

  • low

Files in scope

Primary:

  • scripts/config/paths.ts

Avoid touching:

  • broad script rewrites

Required implementation

1. Add shared path helpers

Examples:

  • transcribeInput(cwd)
  • transcriptOutput(cwd)
  • projectFile(cwd)
  • artifactDir(cwd)

2. Normalize path construction

Use consistent project-root-relative resolution.

3. Keep helpers pure

No filesystem reads.


Constraints

  • additive only
  • no bulk script migration yet

Handoff contract

Later script migrations can depend on stable path helpers.


Acceptance criteria

Functional

  • path helpers return expected absolute paths

Unit tests

  • cwd-based path resolution tests

Integration checks

  • module imports cleanly

Verification commands

node -e "require('./scripts/config/paths.ts')"

Expected result:

  • exits successfully

Explicitly out of scope

  • migrating all scripts
  • CLI parsing

Suggested branch

refactor/s4-paths

Suggested commit slug

phase-3-step-1-paths

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions