plan: reorganize the repo by machine #4

Merged
thodkatz merged 5 commits from plan/repo-layout into main 2026-11-05 09:26:41 +00:00
Owner

The plan for docs/superpowers/specs/2026-11-05-repo-layout-design.md (approved, PR #3):
docs/superpowers/plans/2026-11-05-repo-layout/ (README index, one file per slice, first handoff).

Slices

  1. impl/repo-layout-1-prune (~600 deleted, ~40 added LoC): delete caddy-microvm/, memos/, newsblur/, open-webui/, pdfding/, seafile/, ttrss/; write RETIRED.md; remove their Caddy blocks and headscale extra_records (D2, D3); the docs stop describing the microVM's caddy. Its PR body shows the target tree (the spec's early output) and asks the user why memos, open-webui and pdfding were dropped. After merge, the user runs compose down on the VPS for the retired stacks before pulling, then pulls, reloads caddy and restarts headscale.
  2. impl/repo-layout-2-restructure (~150 LoC changed; renames count 0): every git mv into vps/, nixos/, backup/; pinned name: (D4), the new .gitignore (D5), relative mounts (D11), the upstream checker in the check command (D6), Plane on one machine (D8), docs (D10) and the move guide (D9). After merge, the user follows the move guide on each machine.

Also in this PR

  • AGENTS.md Current work: the track now points at slice 1 and the handoff.
  • docs/README.md: the plan's row.
  • BACKLOG.md: firefly/.db.env and firefly/.importer.env are tracked and hold what look like real credentials. They should be rotated and untracked; that is outside this track.
  • A proposed spec clarification (added in slice 2): D10's grep also matches three strings that are not repo paths, and it matches the move guide, so the check filters those.

Every command in the tasks was run against scratch copies of the target layout while the plan was written.

🤖 Generated with Claude Code

The plan for `docs/superpowers/specs/2026-11-05-repo-layout-design.md` (approved, PR #3): `docs/superpowers/plans/2026-11-05-repo-layout/` (README index, one file per slice, first handoff). **Slices** 1. `impl/repo-layout-1-prune` (~600 deleted, ~40 added LoC): delete `caddy-microvm/`, `memos/`, `newsblur/`, `open-webui/`, `pdfding/`, `seafile/`, `ttrss/`; write `RETIRED.md`; remove their Caddy blocks and headscale `extra_records` (D2, D3); the docs stop describing the microVM's caddy. Its PR body shows the target tree (the spec's early output) and asks the user why memos, open-webui and pdfding were dropped. **After merge, the user** runs `compose down` on the VPS for the retired stacks *before* pulling, then pulls, reloads caddy and restarts headscale. 2. `impl/repo-layout-2-restructure` (~150 LoC changed; renames count 0): every `git mv` into `vps/`, `nixos/`, `backup/`; pinned `name:` (D4), the new `.gitignore` (D5), relative mounts (D11), the upstream checker in the check command (D6), Plane on one machine (D8), docs (D10) and the move guide (D9). **After merge, the user** follows the move guide on each machine. **Also in this PR** - `AGENTS.md` *Current work*: the track now points at slice 1 and the handoff. - `docs/README.md`: the plan's row. - `BACKLOG.md`: `firefly/.db.env` and `firefly/.importer.env` are tracked and hold what look like real credentials. They should be rotated and untracked; that is outside this track. - A proposed spec clarification (added in slice 2): D10's grep also matches three strings that are not repo paths, and it matches the move guide, so the check filters those. Every command in the tasks was run against scratch copies of the target layout while the plan was written. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Signed-off-by: theo <thodkatz@pm.me>
The spec (PR #3) is approved; this turns it into two PRs that can each be
reviewed whole: slice 1 deletes the stacks that no longer run (so the move
touches only live ones) and shows the user the target tree first; slice 2
does every git mv plus the edits they force in one PR, so no commit on main
has half the stacks moved.

Every command in the tasks (the prune script, RETIRED.md's check, the D4
name pinning, the .gitignore, the upstream checker in bash and zsh, the
Plane lib.sh rewrite, the move guide's state mover) was run against scratch
copies of the target layout while writing, so the implementer starts from
checks known to pass on a correct tree and fail on a broken one.

Also lands two things found while planning: D10's grep needs three
non-path exceptions (a slice 2 spec clarification), and firefly's tracked
env files hold what look like live credentials (BACKLOG.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: theo <thodkatz@pm.me>
thodkatz changed title from WIP: plan: reorganize the repo by machine to plan: reorganize the repo by machine 2026-11-05 09:06:29 +00:00
thodkatz force-pushed plan/repo-layout from e98ccc1cdd to 9bc728677b 2026-11-05 09:17:19 +00:00 Compare
The methodology update landed while this plan was open: worktrees are made by worktree.sh and sessions chained
by next-session.sh, so the handoff no longer creates its own worktree, and each slice ends with the post-merge
handoff and --next/--end. Handoff names come from handoff.sh. The firefly credentials item waits on the user,
so it belongs in BACKLOG's Next, which every session reads. The zsh glob gotcha becomes a knowledge note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: theo <thodkatz@pm.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: theo <thodkatz@pm.me>
The move guide's state-moving function is bash: run it under sudo bash, since
zsh aborts its dotfile glob. Name the expected leftover grep hit, drop a
BACKLOG edit for text that isn't there, cover freshrss's README and Plane's
nixed.env comments, which D10's grep misses, cite the spec for RETIRED.md's
rule until slice 2 writes it into AGENTS.md, list ttrss's real container
names, and count the VPS stacks right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: theo <thodkatz@pm.me>
Author
Owner

Local review round (local reviewer: two subagents, methodology and correctness focus).

Methodology (fixed in 4d921d3)

  1. (high) The slice-1 handoff created its own worktree. It now follows the start routine and claims inside the worktree that next-session.sh --next makes. Fixed.
  2. (medium) The README used ls handoffs | tail -1. It now uses handoff.sh newest. Fixed.
  3. (medium) The slices named their handoffs by hand and had no chain step. They now use handoff.sh new and gain a Chain step: slice 1 runs --next impl/repo-layout-2-restructure, slice 2 runs --end. Fixed.
  4. (medium) The firefly credentials item sat under Unscheduled. It moved to BACKLOG.md Next, where it waits on the user. Fixed.
  5. (low) The zsh glob gotcha was written down only in the handoff. It now has its own note, docs/knowledge/zsh-unmatched-glob.md. Fixed.
  6. (low) The empty claim commit 13aec32 has no Co-Authored-By. No action: the squash merge drops it.
  7. (info) The handoff's name matches the clock. Nothing to do.

Correctness (fixed in 1b78ae8)
8. (medium) move_state breaks under zsh (sudo -s): its .[!.]* glob aborts in any directory without dotfiles. The guide now says sudo bash. Fixed.
9. (low) Slice 1 Step 4's expected grep hits left out docs/knowledge/zsh-unmatched-glob.md, where memos appears as a glob example. Now listed as expected. Fixed.
10. (low) Task 2.5 Step 4 removed a BACKLOG sentence that doesn't exist. The instruction is dropped. Fixed.
11. (low) D10's grep misses freshrss/REAMDE.md's cd freshrss and Plane's per-machine nixed.env comments. Both are now added to Tasks 2.2 and 2.4. Fixed.
12. (low) RETIRED.md cited AGENTS.md Project in brief for its rule, but that text only arrives in slice 2. It now cites the spec (D2). Fixed.
13. (low) The PR body's container list named only ttrss. It now lists ttrss and ttrss-*-1. Fixed.
14. (info) The README said "16 VPS stacks + rclone/", which counts rclone twice. Now 15. Fixed.
15. (info) Task 2.5 Step 1 expects Plane README hits that Task 2.4 has already rewritten. Harmless; no change.
16. (info) The name: awk adds a final newline to 9 compose files. Harmless; no change.
17. (info) The D6 checker ignores upstreams without a scheme, which is what the spec asks for. Every current upstream uses http://. No change.

The correctness reviewer simulated both slices literally on a scratch copy. Every D1–D11 check passed there, caddy validate passed after each slice, and the D6 checker caught every violation it was given.

Checks: sign-off branch check exit 0 (no output); sync-agents.py --check exit 0; Setup Caddyfile check exit 0. All re-run on 1b78ae8.

Local review round (`local` reviewer: two subagents, methodology and correctness focus). **Methodology** (fixed in `4d921d3`) 1. (high) The slice-1 handoff created its own worktree. It now follows the start routine and claims inside the worktree that `next-session.sh --next` makes. Fixed. 2. (medium) The README used `ls handoffs | tail -1`. It now uses `handoff.sh newest`. Fixed. 3. (medium) The slices named their handoffs by hand and had no chain step. They now use `handoff.sh new` and gain a *Chain* step: slice 1 runs `--next impl/repo-layout-2-restructure`, slice 2 runs `--end`. Fixed. 4. (medium) The firefly credentials item sat under *Unscheduled*. It moved to `BACKLOG.md` *Next*, where it waits on the user. Fixed. 5. (low) The zsh glob gotcha was written down only in the handoff. It now has its own note, `docs/knowledge/zsh-unmatched-glob.md`. Fixed. 6. (low) The empty claim commit `13aec32` has no Co-Authored-By. No action: the squash merge drops it. 7. (info) The handoff's name matches the clock. Nothing to do. **Correctness** (fixed in `1b78ae8`) 8. (medium) `move_state` breaks under zsh (`sudo -s`): its `.[!.]*` glob aborts in any directory without dotfiles. The guide now says `sudo bash`. Fixed. 9. (low) Slice 1 Step 4's expected grep hits left out `docs/knowledge/zsh-unmatched-glob.md`, where `memos` appears as a glob example. Now listed as expected. Fixed. 10. (low) Task 2.5 Step 4 removed a BACKLOG sentence that doesn't exist. The instruction is dropped. Fixed. 11. (low) D10's grep misses `freshrss/REAMDE.md`'s `cd freshrss` and Plane's per-machine `nixed.env` comments. Both are now added to Tasks 2.2 and 2.4. Fixed. 12. (low) `RETIRED.md` cited `AGENTS.md` *Project in brief* for its rule, but that text only arrives in slice 2. It now cites the spec (D2). Fixed. 13. (low) The PR body's container list named only `ttrss`. It now lists `ttrss` and `ttrss-*-1`. Fixed. 14. (info) The README said "16 VPS stacks + `rclone/`", which counts rclone twice. Now 15. Fixed. 15. (info) Task 2.5 Step 1 expects Plane README hits that Task 2.4 has already rewritten. Harmless; no change. 16. (info) The `name:` awk adds a final newline to 9 compose files. Harmless; no change. 17. (info) The D6 checker ignores upstreams without a scheme, which is what the spec asks for. Every current upstream uses `http://`. No change. The correctness reviewer simulated both slices literally on a scratch copy. Every D1–D11 check passed there, `caddy validate` passed after each slice, and the D6 checker caught every violation it was given. Checks: sign-off branch check exit 0 (no output); `sync-agents.py --check` exit 0; *Setup* Caddyfile check exit 0. All re-run on `1b78ae8`.
thodkatz deleted branch plan/repo-layout 2026-11-05 09:26:41 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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
thodkatz/selfhosted!4
No description provided.