diff --git a/.github/workflows/reverse-survivors-ci.yml b/.github/workflows/reverse-survivors-ci.yml new file mode 100644 index 00000000..72bafef5 --- /dev/null +++ b/.github/workflows/reverse-survivors-ci.yml @@ -0,0 +1,35 @@ +name: reverse-survivors CI + +# Relocated here from reverse_survivors/.github/workflows/ci.yml when the game +# moved into this monorepo — GitHub only reads workflows from the repository +# root, so the nested copy would have been inert. + +on: + push: + branches: [main] + paths: + - "reverse_survivors/**" + - ".github/workflows/reverse-survivors-ci.yml" + pull_request: + branches: [main] + paths: + - "reverse_survivors/**" + - ".github/workflows/reverse-survivors-ci.yml" + +defaults: + run: + working-directory: reverse_survivors + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: reverse_survivors/package-lock.json + - run: npm ci + - run: npm run check + - run: npm run build diff --git a/CLAUDE.md b/CLAUDE.md index e2c84831..8912757e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -33,6 +33,7 @@ Archived / unmaintained projects live in the sibling repository | `python_pkg/` | Python packages — each maintained subpackage lives here | | `linux_configuration/` | Arch Linux setup, i3 config, system maintenance scripts | | `phone_focus_mode/` | GPS-based Android focus enforcer (Bash, ADB, Magisk) | +| `reverse_survivors/` | Reverse Survivors — React/Vite game, you play the horde (TypeScript, 100 % coverage gate) | | `meta/` | Repo-wide tooling: `pyproject.toml`, `requirements.txt`, `run.sh`, `lint_python.sh`, `.fvmrc` | | `scripts/` | Workspace-level helper scripts and pre-commit hooks (moved to `meta/scripts/`) | | `docs/` | Reference docs; `docs/superpowers/` holds AI workflow artifacts | diff --git a/README.md b/README.md index cd55035a..240d7bf1 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Utility scripts for development workflows — build file validation, secret dete | `python_pkg/` | Python packages (each maintained subpackage lives here) | | `linux_configuration/` | Arch Linux setup, i3 config, system maintenance scripts | | `phone_focus_mode/` | GPS-based Android focus enforcer | +| `reverse_survivors/` | Reverse Survivors — React/Vite game where you play the horde against an AI survivor (TypeScript, 100 % coverage gate) | | `scripts/` | Workspace-level helper scripts and pre-commit hooks | | `docs/` | Reference docs and historical reports | | `third_party/` | Vendored upstream skills/agents | diff --git a/docs/superpowers/contracts/reverse-survivors-2026-08-03.json b/docs/superpowers/contracts/reverse-survivors-2026-08-03.json new file mode 100644 index 00000000..8ba5c1bd --- /dev/null +++ b/docs/superpowers/contracts/reverse-survivors-2026-08-03.json @@ -0,0 +1,20 @@ +{ + "title": "Migrate Reverse Survivors into the testsAndMisc monorepo", + "objective": "Relocate the standalone React 19 + Vite 8 + TypeScript 6 game from ~/Downloads/reverse/reverse-survivors to reverse_survivors/ inside this monorepo, preserving its toolchain and quality gates verbatim. Success means the project builds, lints, and passes its 100 % coverage gate from the new path; a root-level path-scoped GitHub Actions workflow runs those same gates on every touching push or PR; and the directory is listed in both index tables. The migration is complete only when npm run check passes in place — a moved project that cannot build is the failure mode this contract exists to prevent.", + "acceptance_criteria": [ + "reverse_survivors/ contains all 33 project files; git status --porcelain -uall reports 33 and nothing was swallowed by the root .gitignore", + "The project's nested .github/ is deleted and its workflow lives at .github/workflows/reverse-survivors-ci.yml with paths: filters and defaults.run.working-directory both naming reverse_survivors", + "npm ci, npm run check (typecheck + eslint --max-warnings 0 + vitest at 100 % thresholds), and npm run build all pass from reverse_survivors/", + "npm run dev serves the app and Vite transforms /src/main.tsx from the new path", + "README.md and CLAUDE.md each gain a reverse_survivors/ Repository Layout row", + "The commit stages explicit paths only, leaving the concurrent uncommitted billsplit migration and the other modified files in the working tree untouched" + ], + "out_of_scope": [ + "Converting the project from npm to pnpm, or regenerating package-lock.json", + "Changing the project's source code, pinned dependency versions, ESLint config, or coverage thresholds", + "Adding a per-project run.sh — meta/run.sh is a polling-script profiler, not a project dispatcher, and Node 24 is already present locally", + "Committing, fixing, or otherwise touching the in-progress billsplit migration sitting untracked in this working tree", + "Backfilling the missing billsplit/ and bucket_catch/ rows in the index tables" + ], + "verifier": "cd reverse_survivors && npm ci && npm run check && npm run build (the project's own gate, mirrored by .github/workflows/reverse-survivors-ci.yml), plus pre-commit run --files and pre-commit run --hook-stage pre-push --files over the staged paths" +} diff --git a/docs/superpowers/evidence/reverse-survivors-2026-08-03.json b/docs/superpowers/evidence/reverse-survivors-2026-08-03.json new file mode 100644 index 00000000..e15de7be --- /dev/null +++ b/docs/superpowers/evidence/reverse-survivors-2026-08-03.json @@ -0,0 +1,56 @@ +{ + "intent": "Bring the standalone Reverse Survivors game (React 19 + Vite 8 + TypeScript 6) into this monorepo at reverse_survivors/, so it is version-controlled, indexed in README.md/CLAUDE.md, and built by a path-scoped GitHub Actions workflow instead of sitting untracked in ~/Downloads.", + "scope": [ + "reverse_survivors/ — 33 files copied from ~/Downloads/reverse/reverse-survivors", + ".github/workflows/reverse-survivors-ci.yml — relocated from the project's nested .github/workflows/ci.yml", + "README.md and CLAUDE.md — one Repository Layout row each", + "Non-goal: no change to the project's source, pinned dependency versions, lint config, or coverage thresholds", + "Non-goal: no conversion from npm to pnpm; the project ships package-lock.json and its CI uses npm ci", + "Non-goal: the concurrent uncommitted billsplit migration in this working tree is left untouched" + ], + "changes": [ + "Copied the project with cp -a to reverse_survivors/ (snake_case, matching kcd2_dice_solver / bucket_catch / phone_focus_mode), then deleted its nested .github/ directory — GitHub only reads workflows from the repository root, so the nested copy would have been inert. Same treatment billsplit received.", + "Added .github/workflows/reverse-survivors-ci.yml modeled on billsplit-ci.yml: push/pull_request on main filtered to reverse_survivors/** and the workflow file itself, defaults.run.working-directory: reverse_survivors, then npm ci / npm run check / npm run build on Node 22.", + "Set cache-dependency-path: reverse_survivors/package-lock.json on actions/setup-node, because defaults.run.working-directory applies only to run: steps and not to actions, so the npm cache would otherwise look for a lockfile at the repository root and fail.", + "Kept the project's own .gitignore (node_modules, dist, coverage) so it stays runnable standalone, matching kcd2_dice_solver. The root .prettierignore already covers **/package-lock.json, **/dist/ and **/coverage/, so no change was needed there.", + "Added a reverse_survivors/ row to the Repository Layout table in both README.md and CLAUDE.md." + ], + "verification": [ + { + "command": "cd reverse_survivors && npm ci", + "result": "pass", + "evidence": "added 277 packages, and audited 278 packages in 21s; found 0 vulnerabilities. One npm warn EBADENGINE for jsdom@30.0.1 (wants node ^22.22.2 || ^24.15.0, local node is v24.12.0) — a warning only; the CI job pins node-version: 22, which satisfies the ^22.22.2 range." + }, + { + "command": "cd reverse_survivors && npm run check", + "result": "pass", + "evidence": "tsc --noEmit clean; eslint --max-warnings 0 clean; Test Files 8 passed (8), Tests 95 passed (95) in 15.19s. Coverage summary: Statements 100% (410/410), Branches 100% (117/117), Functions 100% (75/75), Lines 100% (396/396) — the vitest thresholds are hard-set to 100 and the run fails below it." + }, + { + "command": "cd reverse_survivors && npm run build", + "result": "pass", + "evidence": "vite v8.2.0 built in 381ms; dist/index.html 0.42 kB, dist/assets/index-FNJxch8t.css 3.42 kB, dist/assets/index-hDCecHon.js 203.53 kB (gzip 64.55 kB)." + }, + { + "command": "cd reverse_survivors && npm run dev (then curl http://localhost:5173/)", + "result": "pass", + "evidence": "VITE v8.2.0 ready in 560 ms on http://localhost:5173/. curl of / returned the app shell with