Skip to content

[P3] scripts/prune-stale-branches.sh lives in scripts/ — mixed-purpose directory #360

Description

@itsmiso-ai

Ask: Move scripts/prune-stale-branches.sh out of scripts/ into a directory reserved for non-GDScript tooling (scripts/bin/, scripts/ops/, or tools/) so the scripts/ directory strictly holds .gd files.
Expected files: scripts/prune-stale-branches.sh, scripts/bin/prune-stale-branches.sh (new path), docs/branch-cleanup.md

Problem: scripts/prune-stale-branches.sh is a bash script that prunes merged and stale generated local branches. It lives alongside the .gd files that make up the game's runtime modules (colony_sim.gd, game_state.gd, etc.). The scripts/ directory is otherwise exclusively .gd files; mixing shell tooling in there muddies the boundary between runtime code (loaded by Godot via preload and load) and out-of-band operator scripts (run manually or by CI). The README and root .gitignore treat scripts/ as the GDScript surface; an editor configured to "show Godot files in scripts/" would not match the bash script. A future tooling commit that adds another script (e.g. backfill-saves.sh) will most likely land in scripts/ too, entrenching the mixed-purpose directory.

Evidence:

  • scripts/prune-stale-branches.sh — bash script with set -euo pipefail, executed manually via ./scripts/prune-stale-branches.sh
  • ls scripts/ — 12 entries, 11 .gd files (colony_sim.gd, colony_stance.gd, constants.gd, goal_progression.gd, goal_reward.gd, game_state.gd, layout_math.gd, main.gd, milestone_manager.gd, rotating_goal.gd, tile_render.gd, worker_cap_logic.gd, worker_renderer.gd) and 1 bash script (prune-stale-branches.sh)
  • docs/branch-cleanup.md — companion doc that documents the script's intent; locate references and update them in the same PR
  • grep -rn "prune-stale-branches" — the script is only referenced in docs/branch-cleanup.md

Acceptance:

  • scripts/prune-stale-branches.sh moved to scripts/bin/prune-stale-branches.sh (or tools/); scripts/ now contains only .gd files (and .uid files alongside them)
  • docs/branch-cleanup.md updated to reference the new path
  • Any CI or cron mention of the old path updated (none found currently)
  • ls scripts/ and git status show the move cleanly without orphaned references

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit, review, or investigation work.priority/p3Low priority.status/readyReady for Dispatch worker pickup.type/choreChore or maintenance.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions