Repository navigation
Closed
Labels
area:workflowDeveloper workflow, commands, rules, skillsarea:workspaceWorkspace tooling, justfile, templateseffort:largeMore than 4 hours or multi-sessionrefactorModifications that do not bring any significant change (e.g. style, reorganization)semver:minorNew feature, backward-compatible
Milestone
Description
Description
Split scripts/ into two clearly separated blocks:
- Project-specific — container build tooling that only applies to this repo. Stays in
scripts/. - Shared with downstream — utilities shipped to every deployed workspace. Moves into
packages/vig-utils/as modules (Python) or package data with wrapper entry points (shell).
Currently shared scripts are loose files in scripts/ copied to assets/workspace/.devcontainer/scripts/ via manifest. This creates:
- Unclear ownership (which scripts are build-only vs shared?)
- Duplicated copies in
assets/workspace/ - No standard entry point mechanism for downstream consumers
- Pre-commit hooks that break in deployed workspaces ([BUG] vig-utils pre-commit hooks fail in deployed workspace CI #161)
Proposed split
Stays in scripts/ (project-specific):
build.sh,prepare-build.sh,clean.sh,init.sh— image build pipelinesync_manifest.py,transforms.py— workspace sync enginemanifest.toml,requirements.yaml— build configutils.py— build helpers (sed-inplace, version patching)
Moves into packages/vig-utils/ (shared):
Python modules (as vig-utils submodules with entry points):
gh_issues.py— project dashboardprepare-commit-msg-strip-trailers.py— commit message hookcheck-agent-identity.py— agent identity checkcheck-pr-agent-fingerprints.py— PR fingerprint check
Shell scripts (as package data with wrapper entry points):
resolve-branch.sh— branch resolution helperderive-branch-summary.sh— branch summary derivationcheck-skill-names.sh— skill name validationsetup-labels.sh— label provisioning
Already in vig-utils (no move needed):
validate_commit_msg.py,check_action_pins.py,prepare_changelog.py,agent_blocklist.py
Files / Modules in Scope
scripts/(source of shared scripts to migrate)packages/vig-utils/(target for shared utilities)packages/vig-utils/pyproject.toml(new entry points)scripts/manifest.toml(update sync entries to point to vig-utils).pre-commit-config.yaml(update hook entries to use vig-utils entry points)justfile.base,justfile.gh,justfile.worktree(update script references)assets/workspace/.devcontainer/scripts/(remove redundant copies)
Out of Scope
- Functional changes to any script (pure reorganization)
- gh-issues rewrite ([FEATURE] Rewrite gh-issues dashboard — Polars + Typer + responsive layout #145) — comes after the move
- CI workflow changes beyond updating script paths
- Publishing vig-utils to PyPI ([BUG] vig-utils pre-commit hooks fail in deployed workspace CI #161 option 2)
Invariants / Constraints
just gh-issuescontinues to work end-to-end- All pre-commit hooks pass in both this repo and deployed workspaces
- All
justrecipes that invoke shared scripts continue to work - Existing tests pass without modification
- vig-utils remains installable as a local editable package
Acceptance Criteria
-
scripts/contains only project-specific build tooling - All shared Python scripts are vig-utils submodules with CLI entry points
- All shared shell scripts are vig-utils package data with wrapper entry points
-
manifest.tomlentries updated (no morescripts/*.py->.devcontainer/scripts/copies) - Downstream workspaces can invoke shared tools via vig-utils entry points
- All
justrecipes and pre-commit hooks updated to new paths/entry points - Redundant copies in
assets/workspace/.devcontainer/scripts/removed - All existing tests pass
- TDD compliance (see
.cursor/rules/tdd.mdc)
Changelog Category
Changed
Related Issues
- Subsumes [REFACTOR] Move gh_issues.py into vig-utils and add entry point #179 (move gh_issues.py into vig-utils)
- Subsumes [CHORE] Make container scripts callable via PATH and manifest sync #185 (make container scripts callable via PATH)
- Addresses part of [BUG] vig-utils pre-commit hooks fail in deployed workspace CI #161 (vig-utils hooks in deployed workspace CI)
- Partially addresses [BUG] Synced justfiles reference scripts not included in workspace manifest #190 (synced justfiles referencing missing scripts)
- Tangentially related to [BUG] just check uses wrong path — justfile_directory() resolves incorrectly in imported justfile.base #187 (path resolution in justfiles)
Metadata
Metadata
Assignees
Labels
area:workflowDeveloper workflow, commands, rules, skillsarea:workspaceWorkspace tooling, justfile, templateseffort:largeMore than 4 hours or multi-sessionrefactorModifications that do not bring any significant change (e.g. style, reorganization)semver:minorNew feature, backward-compatible
Activity
c-vigo commentedon Mar 4, 2026
Implementation Plan for Issue #217
Scope and migration strategy
scripts/.packages/vig-utils.1) Freeze script classification and caller map
scripts/:build.sh,prepare-build.sh,clean.sh,init.sh,sync_manifest.py,transforms.py,manifest.toml,requirements.yaml.gh_issues.py,prepare-commit-msg-strip-trailers.py,check-agent-identity.py,check-pr-agent-fingerprints.pyresolve-branch.sh,derive-branch-summary.sh,check-skill-names.sh,setup-labels.shutils.py(move reusable logic into vig-utils)justfile.ghjustfile.worktree.pre-commit-config.yamlscripts/manifest.toml2) Add shared commands to vig-utils
packages/vig-utils/pyproject.tomlwith entry points for migrated shared commands.packages/vig-utils/src/vig_utils.bash, preserving argv/stdin/stdout/stderr and exit codes.__file__in migrated scripts.3) Migrate
scripts/utils.pyinto vig-utils (with shim)substitute_in_file,sed_inplace,update_version_line, and CLI dispatch) underpackages/vig-utils/src/vig_utils.scripts/transforms.pyimports to use the new vig-utils module.scripts/utils.pyas a compatibility shim delegating to vig-utils so existing build commands remain stable during migration.scripts/utils.pyCLI behavior.4) Switch all root callers to vig-utils entry points/wrappers
justfile.ghgh-issuescommand to invoke the new vig-utils command instead ofpython3 scripts/gh_issues.py.justfile.worktreerecipes that callresolve-branch.shandderive-branch-summary.shto use vig-utils wrapper entry points..pre-commit-config.yamlhook entries currently callingscripts/*.sh/scripts/*.pyto call corresponding vig-utils entry points.5) Update workspace sync manifest and transforms
scripts/manifest.tomlso shared utilities are sourced from vig-utils (or no longer mirrored as loose.devcontainer/scripts/*files when entry points are sufficient).scripts/...paths in synced pre-commit config.assets/workspaceremain valid.6) Remove redundant copied shared scripts
assets/workspace/.devcontainer/scriptsthat are replaced by vig-utils entry points/wrappers.7) Verification and test plan
packages/vig-utils/testsfor new modules/wrappers.tests/test_utils.pyand any updated tests validating thescripts/utils.pycompatibility shim.scripts/sync_manifest.py) and confirm generated workspace files match expected command paths.just gh-issues.pre-commit-config.yamlDelivery notes
test(vigutils): add red tests for migrated scripts
feat(vigutils): migrate shared scripts into package entrypoints
refactor(setup): switch callers to vig-utils entrypoints
chore(setup): remove legacy script copies and superseded tests
refactor(vigutils): consolidate agent fingerprint helpers into shared…
chore(setup): remove legacy scripts/utils.py shim
docs: update CHANGELOG
test: improve coverage for agent blocklist and shell entrypoints
refactor(vigutils): migrate shared scripts into vig-utils package ent…
chore: release 0.3.0 (#270)