houserules/.sisyphus/plans
Joey Yakimowich-Payne 6a38be6fc6
feat(thressgame-100): Wave 1 partial — resolver V3 + add-to-attribute.target
Wave 1 (W1.0–W1.6) of the thressgame-100 epic — push ThressGame coverage from
27 % toward 85 %+ via resolver expressiveness. Foundation for Layer-1 rules
(self-targeting destroys, mass-mover, adjacent splash). Recipes (W1.7–W1.12)
land in subsequent commits.

Resolver V3 (param-resolver.ts) — 6 new shapes:
- {ctx-self-id: null}        → ctx.pieceId
- {ctx-self-marker-id: null} → ctx.markerId (throws when undefined)
- {add: [<resolver>, <int>]} → recursive arithmetic, MAX_SAFE_INTEGER overflow throws
- {sub: [...]}, {mul: [...]}, {mod: [...]} — same pattern; mod uses positive-modulo
  formula ((l % r) + r) % r so column-wrap recipes work for any sign of l

V3 union order locked (param-resolver-schema.ts):
[literal, $var, ctx-attr, ctx-build, ctx-self-id, ctx-self-marker-id, add, sub, mul, mod]

PrimitiveApplyContext (types.ts): added optional readonly markerId? field.
runPrimitives (triggers.ts): populates markerId in ctx for piece-entered-marker
and marker-expire events from event.markerId (single source of truth).

W1.6 — add-to-attribute.target:
- Schema gains optional target?: numberOrResolver({ min: 0 }) field
- apply() resolves target then defaults to ctx.pieceId when undefined
- Closes the long-documented adjacent-splash sharp edge — splash damage now
  expressible via target redirection instead of forcing set-piece-attr

Test surface:
- param-resolver.test.ts: +22 tests (39 total) — overflow boundary, recursive
  nesting, mixed shapes, replay determinism, ctx.markerId failure modes
- param-resolver-schema.test.ts: +19 tests (38 total) — V3 union for each helper,
  arithmetic shape parsing, ctx-self-id payload validation
- add-to-attribute.test.ts: +6 tests (10 total) — target literal, target $var,
  target omitted (backward-compat), reject string target, apply with/without target
- ParamField snapshot regenerated for add-to-attribute.target rendering

bun run check: 2983 tests pass (was 2941, +42).

Plan: .sisyphus/plans/thressgame-100.md (5 waves + cross-ref + final verification,
~73 atomic tasks locked end-to-end).
Notepads: .sisyphus/notepads/thressgame-100/

Locked architectural decisions (irrevocable across all 6 waves):
  A. Arithmetic resolver shapes — arity 2, no comparisons, no booleans
  B. Self-targeting via ctx-self-id / ctx-self-marker-id (NOT 'self' literal)
  C. add-to-attribute.target optional, defaults to ctx.pieceId
  D. Multi-turn countdowns via on-attr-expire trigger (Wave 2)
  E. Piece-pair lifecycle via PieceLink + on-piece-pair-link-broken (Wave 4)
  F. Resource accumulation on GAME_ENTITY (Wave 5)
  G. Board topology via BoardTopology attr (Wave 4)
  H. Validator V3 — superset of V2, all V2 fixtures auto-validate
  J. User-explicit overrides — no backward-compat constraint, no time/cost limit
2026-04-27 13:48:28 -06:00
..
modifier-profiles-t2.md chore(sisyphus): complete modifier-profiles-t2 boulder 2026-04-19 10:20:26 -06:00
modifier-profiles-t3.md chore(sisyphus): T3 Final Verification Wave — all reviewers APPROVE 2026-04-19 22:04:36 -06:00
piece-modifiers.md chore(sisyphus): complete piece-modifiers boulder 2026-04-19 08:25:35 -06:00
post-epic-deferrals.md plan(sisyphus): lock 7 design decisions for post-epic deferrals 2026-04-21 10:33:14 -06:00
preset-flexibility-architecture.md feat(chess): preset-flexibility architecture — decouple HP, damage, piece-types, state, effects 2026-04-18 16:26:17 -06:00
rete-rules-engine.md Add sisyphus 2026-04-17 15:22:04 -06:00
rule-variants-v2.md chore(sisyphus): Rule Variants Final Verification Wave — all reviewers APPROVE 2026-04-21 10:15:18 -06:00
rule-variants.md feat(chess): starting-layout foundation (Phase A) 2026-04-18 19:44:01 -06:00
starting-layouts.md feat(chess): starting-layout foundation (Phase A) 2026-04-18 19:44:01 -06:00
thressgame-100.md feat(thressgame-100): Wave 1 partial — resolver V3 + add-to-attribute.target 2026-04-27 13:48:28 -06:00
thressgame-coverage.md feat(thressgame-coverage): Wave 10 (8 parity descriptors + 6 templates + perf + e2e spec) 2026-04-26 13:50:28 -06:00
thressgame-templates.md feat(thressgame-templates): V2 validator + 9 new recipes + Playwright e2e 2026-04-27 13:47:01 -06:00
visual-modifier-builder.md fix(thressgame-coverage): F1+F4 remediation (T58 RequestChoiceModal + coin-flip kind) 2026-04-26 14:09:28 -06:00