diff --git a/docs/superpowers/plans/2026-09-02-infrastructure-backlog-starter-set.md b/docs/superpowers/plans/2026-09-02-infrastructure-backlog-starter-set.md new file mode 100644 index 0000000..59168aa --- /dev/null +++ b/docs/superpowers/plans/2026-09-02-infrastructure-backlog-starter-set.md @@ -0,0 +1,741 @@ +# Infrastructure Backlog — Starter Set Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Close the unblocked, independent items the backlog design names as +"start with" — remove an unpatched Node runtime from daily use, make +wrong-identity `gh` operations visible instead of silent, and retire the +manual `uchg` tripwire guarding local review. + +**Architecture:** Three independent tracks, no shared state, executable in any +order or in parallel. They land in two repos (`dotfiles`, +`claude-code-workflows-agents`), so tasks do not contend. +Every behavioral change is validated against a known-bad case before its fix +is accepted — the backlog's defining defect is checks that report success +while doing nothing. + +**Tech Stack:** Bash 5.x, shellcheck, the `dotfiles/bash/tests` suite (23 +tests, plain-bash, `run-tests.sh` runner), `claude-wrapper/tests`, GitHub +Actions, nvm. + +**Spec:** `docs/superpowers/specs/2026-09-01-infrastructure-backlog-design.md` + +## Scope + +This plan covers **only** the starter set: N1a, F3, and the remainder of L1. +Chosen 2026-09-02 because these are the items with no unresolved upstream +decision, so every task below can be written with real code rather than +placeholders. + +**F2 was in this plan and has been withdrawn** — see Task 3. The identity +leak it fixed does not exist; the claim was an inference presented as a +measurement. A verification audit of every other "Verified:" claim in the +design followed, and is recorded there. Two further claims were found false +(the `claude-config` empty pre-commit, and the no-protection repo count). +**Read the design's "Verification audit (2026-09-02)" section before +executing anything here.** + +Explicitly **not** in this plan, and why: + +| Item | Blocked on | +| --- | --- | +| F1 | **Already implemented** — see "What verification changed", below. | +| F4, I3 | F4 direction chosen (route org ops to keyring identity); needs its own plan. | +| I0, I1, I2 | I0's script must run on the company machine before I1 is designed. | +| W1/W2/W3 | Three decisions in `github-workflows#154` are unanswered. | +| N1b | Product-repo Node pins; larger fan-out, own plan. | +| L2, L3, L4, L5 | Sequenced behind L2 (deploy/edit separation), not yet planned. | + +## What verification changed + +State was re-verified against live code on 2026-09-02, before this plan was +written. Two spec items had already been implemented in the day since it was +authored. Both are recorded here rather than silently dropped, because the +spec still lists them as pending work. + +**F1 is done.** `_gh_wrapper_resolve_owner()` exists at +`dotfiles/bash/gh-wrapper.sh:61-96`, handles both `git@host:` and +`scheme://host/` remote forms plus `-R`/`--repo`/`--repo=`/`-R` +argument parsing, and is already shared by `_gh_wrapper_sync_identity` and +`_gh_wrapper_force_draft_for_off_org`. The spec's F1 ("extract it once") has +no work left. F2 and F3 below consume it as-is. + +**L1's remediation is done; only the tripwire removal remains.** +`bash/tests/lib/git-env-isolation.sh` exists and is used by 9 fixture tests. +`test-git-env-isolation.sh` is the known-bad-validated regression test the +spec asked for: it builds a throwaway repo with a linked worktree, exports a +`GIT_DIR` pointing at it, and runs the real fixture tests under that +condition — with a control case that requires the *unguarded* operation to +contaminate, so the guard cannot rot into decoration. Suite: 23 passed, 0 +failed. What is left is Task 4: confirm the guard holds with the `uchg` flag +off, then remove the flag. + +**Everything else matched the spec exactly:** `~/.nvm/alias/default` is `20`; +`which node` is v20.20.2 with v22.23.2 and v24.19.0 installed and idle; +`code-quality.yml:80` and `validate.yml:233` both read `node-version: '20'`; +`git-identity.sh:12-15` exports all four git identity variables +unconditionally (true, but harmless — see Task 3); +`CLAUDE_GH_TOKEN_ROUTER` appears only at +`gh-wrapper.sh:488-490`, in the standalone-executable branch, defined nowhere. + +## Global Constraints + +- **GNU Bash 5.x compatible.** All shellcheck issues resolved at + `-S info`. **Never** use `# shellcheck disable` directives. +- **Never** use `((var++))` under `set -e` — when `var=0` it exits. Use + `((var += 1))`. +- Run `shellcheck -S info