Refactor repo layout: group scripts into directories #71

Merged
vnprc merged 4 commits from agent/refactor-layout into master 2026-06-24 21:59:45 +01:00
Contributor

Closes #70

Group scripts into logical directories instead of keeping everything flat at the repo root.

Directory layout:

  • workspace/ -- pull-all, work-diff
  • flake/ -- flake-status, flake-update-cascade
  • git-hooks/ -- protected-refs-policy, setup-tracked-hooks
  • allod and forge stay at the root (large standalone tools)
  • lib/workspace.sh -- shared library (unchanged location)

Other changes:

  • Extract WORK_DIR default into lib/workspace.sh to remove 4 duplicate declarations
  • Break README into a layout overview + link tree pointing to per-group docs under docs/
  • Restructure tests/ to mirror the new source layout

Note: Nix packaging expressions in profiles and nexus reference scripts by path and will need corresponding updates after this lands.

Validation

# Run all tests from the repo root
for t in tests/workspace/*.sh tests/flake/flake-status.sh \
         tests/flake/flake-update-cascade/*.sh \
         tests/flake/flake-update-cascade-multiple-inputs.sh \
         tests/git-hooks/*.sh tests/allod-change.sh; do
  echo "--- $t ---"
  bash "$t"
done
for t in tests/forge/*.sh; do
  [[ "$(basename "$t")" == "testlib.sh" ]] && continue
  echo "--- $t ---"
  bash "$t"
done

All 274 tests pass.

Closes #70 Group scripts into logical directories instead of keeping everything flat at the repo root. **Directory layout:** - `workspace/` -- `pull-all`, `work-diff` - `flake/` -- `flake-status`, `flake-update-cascade` - `git-hooks/` -- `protected-refs-policy`, `setup-tracked-hooks` - `allod` and `forge` stay at the root (large standalone tools) - `lib/workspace.sh` -- shared library (unchanged location) **Other changes:** - Extract `WORK_DIR` default into `lib/workspace.sh` to remove 4 duplicate declarations - Break README into a layout overview + link tree pointing to per-group docs under `docs/` - Restructure `tests/` to mirror the new source layout **Note:** Nix packaging expressions in `profiles` and `nexus` reference scripts by path and will need corresponding updates after this lands. ## Validation ```bash # Run all tests from the repo root for t in tests/workspace/*.sh tests/flake/flake-status.sh \ tests/flake/flake-update-cascade/*.sh \ tests/flake/flake-update-cascade-multiple-inputs.sh \ tests/git-hooks/*.sh tests/allod-change.sh; do echo "--- $t ---" bash "$t" done for t in tests/forge/*.sh; do [[ "$(basename "$t")" == "testlib.sh" ]] && continue echo "--- $t ---" bash "$t" done ``` All 274 tests pass.
Move scripts into logical directories: workspace/ (pull-all, work-diff),
flake/ (flake-status, flake-update-cascade), git-hooks/ (protected-refs-policy,
setup-tracked-hooks). allod and forge stay at the root.

Extract WORK_DIR into lib/workspace.sh so callers no longer duplicate it.
Break README into a layout overview with links to per-group docs under docs/.
Restructure tests/ to mirror the new source layout.

All 274 tests pass.
vnprc requested changes 2026-06-24 21:30:43 +01:00
Dismissed
vnprc left a comment
Owner

shouldn't the specific tools documentation be README.md files under the correct source code dir? that would make it easier to navigate from the forgejo UI.

shouldn't the specific tools documentation be README.md files under the correct source code dir? that would make it easier to navigate from the forgejo UI.
Author
Contributor

Good call. Moving the docs from docs/ to README.md files in each source directory so they render when browsing workspace/, flake/, and git-hooks/ in the Forgejo UI. Will also add a README.md for forge since its docs are substantial enough to warrant one.

Good call. Moving the docs from docs/ to README.md files in each source directory so they render when browsing workspace/, flake/, and git-hooks/ in the Forgejo UI. Will also add a README.md for forge since its docs are substantial enough to warrant one.
Move workspace, flake, and git-hooks docs from docs/ into their
respective source directories as README.md so they render when browsing
directories in the Forgejo UI. forge docs stay in docs/ since forge
is a root-level script without its own directory.
vnprc approved these changes 2026-06-24 21:59:39 +01:00
vnprc merged commit c9d28d5ad5 into master 2026-06-24 21:59:45 +01:00
vnprc deleted branch agent/refactor-layout 2026-06-24 21:59:46 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
allod/tools!71
No description provided.