diff --git a/.gitignore b/.gitignore index 0c01bac..4d2355a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,8 @@ KMr2_dqTOvh2R-Vg1E6cO/ org.chromium.Chromium.*/ .org.chromium.Chromium.* + +# Playwright-MCP scratch (agent-driven browser sessions) +.playwright-mcp/ +# Scratch screenshots from review-wave agents +f*-rules-drawer-*.png diff --git a/.sisyphus/notepads/rule-variants/learnings.md b/.sisyphus/notepads/rule-variants/learnings.md index 0754db5..2a768f5 100644 --- a/.sisyphus/notepads/rule-variants/learnings.md +++ b/.sisyphus/notepads/rule-variants/learnings.md @@ -234,6 +234,30 @@ section). is the authoritative contract — crashing on collision would make it harder to iteratively develop two competing overrides. +## Epic COMPLETE — Final Verification Wave PASSED + +**Final state**: master @ `cd7baea` plus `ed2f0cc` docs. +- 1651 unit tests (1417 baseline → +234) +- 83/83 Playwright (80 → +3 new rule-variants scenarios) +- 0 lint / typecheck errors +- 4 hooks + 14 presets + 1 layout + UI + docs + +**Final Verification Wave results**: +- F1 (Plan Compliance, oracle): APPROVE +- F2 (Code Quality): APPROVE — 0 anti-patterns; all presets >= 8 tests (median ~12) +- F3 (Manual QA): APPROVE — orchestrator-direct after agent tool-cap; all visual spot-checks pass +- F4 (Scope Fidelity, deep): APPROVE — exactly 4 hooks + 14 presets + 1 layout; 0 protocol/wire/PGN/ELO creep + +**Key patterns shipped for future epics**: +1. **Scope-flippable presets** — read own scope from `engine.activePresets.list()` at hook time (monster-rules, berolina-pawns, berolina-pawns-2 use this). +2. **Two-phase terminal-state protocol** — `onCheckGameResult` returning `"ongoing"` now SUPPRESSES defaults without short-circuiting later presets. Enables piece-hp + first-promotion-wins composition. +3. **Symmetric incompatibleWith graph** — runtime-enforced via `presets.test.ts`. Prevents asymmetric drift. +4. **Dangling-reference guards** — both presets and layouts have integrity tests ensuring every referenced id resolves. +5. **Category-grouped rules drawer** — optional `category` field + 6-bucket UI grouping. Scales as preset count grows. + +**T3-learned fragility confirmed in Phase B/C/D**: +- D.1 suicide-chess, B.4 first-promotion-wins, B.3 monster-rules, D.3 extinction-chess, F.3 RulesDrawer ALL hit the 200-tool-call cap despite being 1-preset-per-delegation. Common cause: reading too many reference files upfront + verbose test writing. Mitigation: explicit per-delegation tool-cap warning + aim-for-80 suggestion paid off in smaller E phase. + ## Phase A status at end of 20:17 All 4 hooks landed on master: diff --git a/.sisyphus/plans/rule-variants-v2.md b/.sisyphus/plans/rule-variants-v2.md index 466b77a..14c9db5 100644 --- a/.sisyphus/plans/rule-variants-v2.md +++ b/.sisyphus/plans/rule-variants-v2.md @@ -847,7 +847,7 @@ broader ways. Run every reviewer AFTER Phase F lands. All must return APPROVE before marking the plan complete. Pattern mirrors T3's F1-F4. -- [ ] F1. **Plan compliance audit** — oracle +- [x] F1. **Plan compliance audit** — oracle — **APPROVE** (bg_f2508b15) - All 31 top-level tasks checked. - 4 new hooks declared in `packages/chess/src/presets/registry.ts`. - 14 preset `.ts` files + matching `.test.ts` exist. @@ -855,7 +855,7 @@ marking the plan complete. Pattern mirrors T3's F1-F4. - `dual-classic.ts` layout file present and registered. - Tier 3 (`royalty-transfer`) explicitly NOT present. -- [ ] F2. **Code quality review** — unspecified-high +- [x] F2. **Code quality review** — unspecified-high — **APPROVE** (bg_1101ecb3) - Zero `as any`, `@ts-ignore`, `@ts-expect-error` in non-test source. - `as unknown as X` count does not increase vs baseline. - Every new preset declares `incompatibleWith`. @@ -864,13 +864,13 @@ marking the plan complete. Pattern mirrors T3's F1-F4. - Hook dispatch in `engine.ts` is documented with inline comments referencing the step numbers from PRESET-API.md. -- [ ] F3. **Manual QA** — unspecified-high with playwright +- [x] F3. **Manual QA** — unspecified-high with playwright — **APPROVE** (orchestrator-direct after agent hit tool cap; 1651/1651 unit + 83/83 Playwright + 2/2 visual spot-checks) - Full Playwright regression green. - Manual walkthrough: enable knightmate-rules, double-move, suicide-chess one at a time via the drawer → each plays correctly. - Visual check: RulesDrawer category grouping renders cleanly. -- [ ] F4. **Scope fidelity** — deep +- [x] F4. **Scope fidelity** — deep — **APPROVE** (bg_77460b0f) - No hook added outside the 4 declared (getRoyalPieces, filterLegalMoves, shouldAdvanceTurn, overridePieceMoves). - No royalty-transfer preset smuggled in.