Commit graph

12 commits

Author SHA1 Message Date
8605a22530
feat(ui): AttrCombobox declare vs. consume semantics
Attr-string fields in the Custom Modifier Editor now differentiate
between declare-sites (seed-attribute.attr) and consume-sites
(add-to-attribute.attr, multiply-attribute.attr, add-aura.targetAttr,
absorb-damage-with-attribute.attr):

- Consume-sites hide the illustrative 'User-defined examples' group
  (ArmorPlates/BloodStacks/ManaPool) because those names are fiction
  unless something seeds them.
- Consume-sites surface a new 'Seeded in this descriptor' group
  populated from seed-attribute primitives elsewhere in the current
  tree (including inside trigger children via childPrimitives).
- Badge states: emerald 'seeded' when the typed value matches an
  in-tree seed; red 'not seeded' when it's a non-schema name with no
  backing seed; amber 'user-defined' only in declare-mode for
  off-catalog names.

Declare-mode behaviour is unchanged — inventing ShieldCharges there
still works without warnings.
2026-04-21 13:07:27 -06:00
934db775f9
feat(ui): custom modifier editor in-modal docs, recipes, and attr combobox
Surfaces the contents of docs/user/custom-modifiers.md directly inside
the Custom Modifier Editor so authors can compose descriptors without
cross-referencing the guide:

- Per-primitive docs panel in the Parameter Inspector with a longer
  behaviour explanation + one or more worked examples (collapsible).
- Palette hover tooltips now show the full long description plus the
  first example's headline.
- New 'Templates' header button opens a picker with 5 built-in recipes
  (Boosted Pawn, 3-Charge Shield, Aura King, Vampire, Low-HP Fortress).
- AttrCombobox replaces plain text inputs for attr / targetAttr fields.
  Grouped, free-form autocomplete over 17 curated suggestions with a
  'user-defined' badge for out-of-catalog typed names so ShieldCharges-
  style recipes still work.

Primitives gain optional longDescription + examples fields on their
EffectPrimitive descriptor; 15 registrations annotated. Recipe
descriptors pass the existing validator, and new unit tests enforce
doc coverage going forward.
2026-04-21 12:50:14 -06:00
52752ecf33
docs(adr): T4 scripted modifiers forward-design
T3 Wave 5 (T32). New forward-design document at
docs/adr/T4-scripted-modifiers-design.md capturing where T4 would land
if/when it becomes a priority:

- Why T4 is deferred (security surface area)
- Sandbox candidates evaluated (QuickJS recommended; Duktape, vanilla
  WASM, custom interpreter, Web Workers, vm2 / isolated-vm rejected
  with rationale)
- Descriptor shape extension preserving T3 backwards compatibility
  via the type: 'data' | 'scripted' discriminator already reserved
  on CustomModifierDescriptor
- Permission model sketch (read/write self/board, history, effects,
  random — granted/prompt defaults per permission)
- Validation strategy (static analysis + runtime sandbox enforcement,
  whitelist over blacklist for forbidden globals, source/AST size
  caps, loop-bound checks)
- T3 → T4 ejection path (a T3 descriptor can generate equivalent
  scripted source as a starting point)
- 7 open questions blocking T4 kickoff (DSL surface, multiplayer
  determinism, editor experience, sharing trust, rate limiting,
  versioning, failure mode)
2026-04-19 21:09:52 -06:00
6dd5eb17ce
docs(user): custom modifier DSL user guide
T3 Wave 5 (T31). New user-facing guide at docs/user/custom-modifiers.md
covering:
- Opening the editor + 3-column workspace
- All 15 effect primitives (state / mechanic / advanced) with one
  example per primitive
- Composing primitives (simple boosted-pawn → medium shield → complex
  aura king)
- Saving + loading from the local library
- Using a custom modifier in a profile (panel kind dropdown)
- Multi-profile stacking (solo-only T3 limitation noted)
- Aura semantics (Chebyshev distance, recompute cadence)
- Limits and DoS guards (50 primitives, depth 3, 20 per library, 10
  per multiplayer room)
- T3 limitations called out inline (trigger primitives seed but don't
  yet fire; AuraContributions written but not yet consumed)
2026-04-19 21:09:24 -06:00
1e69675596
docs(adr): T3 implementation retrospective 2026-04-19 21:08:01 -06:00
60b89d8c5e
docs(adr): T3 custom modifier DSL architecture decisions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-19 17:16:17 -06:00
ebed10d39a
docs(user): T2 modifier profile features
- Hot-Swap rewritten for solo vs multiplayer: propose/consent with
  60s window, turn-boundary semantics, last-write-wins on rapid
  proposals. Drops the T1 host-only caveat.
- New Editor Features section: undo/redo (Cmd/Ctrl+Z, 50-deep,
  cleared on save/cancel), per-instance and per-type copy/paste
  (editor-local clipboard), conflict resolution panel with Fix
  buttons plus the manual-only cases.
- New Board Indicators section: fuchsia dot on modified pieces,
  updates across hot-swaps.
- In-Play Inspection expanded with the enhanced source chain
  (per-instance / per-type / preset / default) and the combine
  semantics (HP additive, resistance multiplicative, directions
  unioned).
- Known Limitations: drop the T1 host-only bullet; add a Coming
  in T3 subsection (custom authoring, auras, multi-profile
  stacking).
2026-04-19 09:29:56 -06:00
a27cb29a5b
docs(adr): T2 implementation retrospective 2026-04-19 09:29:07 -06:00
3557aa7cb4
docs(adr): T2 polish architecture decisions 2026-04-19 08:43:40 -06:00
cfc68bba51
docs(user): modifier profiles user guide 2026-04-18 23:23:09 -06:00
a442e54d79
docs(adr): modifier-profiles architecture decisions 2026-04-18 22:03:06 -06:00
f3a38d44be
chore(root): scaffold monorepo — Phase 0 complete 2026-04-16 13:32:21 -06:00