Trigger Profiles M2: full trigger surface + profile sharing#9
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds encode_companion_trigger_effect_v2 (modes: V1 0-2 delegated, 3 off, 4 multi-feedback, 5 slope via new kTriggerEffectSlope 0x22, 6 multi-vibration), extends CompanionTriggerEffect with frequency_hz, zone_percents, end_percent, end_force_percent, and wires companion command 0x41 APPLY_ADAPTIVE_TRIGGER_EFFECT_V2 (0x21 from the brief collides with SET_HOST_PERSONA). Linux vdsd FFB call sites now use the V2 encoder. Adds trigger_effect_v2_test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Shared TriggerEffectEditor component with all seven effect modes, used by the profile editor slot cards, modifier rows (compact variant), and the Trigger Lab card. Zone strip renders ten vertical sliders; vibration modes get a 1-255 frequency field. Trigger Lab now holds a TriggerEffectSpec and tests V1 modes through a new bridge:previewAdaptiveTriggerEffect IPC so edited percents are heard; V2-only modes point at profile draft preview (the daemon 0x1F handler is V1-only). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t guard Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
revert-to-main.sh (user's local root-privileged revert script) and .remember/remember.md (agent handoff scratch) were tracked by mistake; remove them from the index (files kept on disk) and ignore both paths so they cannot be re-committed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
scale_trigger_effect had no case for the slope opcode (0x22), so SET_TRIGGER_EFFECT_INTENSITY was ignored for slope profiles -- at intensity 0 a slope effect stayed at full force. Add a slope case: percent 0 turns the trigger off; otherwise both 3-bit strength codes packed in trigger[3] (bits 0-2 start, bits 3-5 end, stored as strength-1) are scaled with scale_strength_code, matching the zone modes. Promote scale_trigger_effect to a public span-based function so the unit test can exercise it directly, and extend trigger_effect_v2_test with percent-0 and percent-50 slope asserts. Also whitelist vds/tests/ in vds/.gitignore: the whitelist-style ignore file silently excluded the test source even though CMakeLists.txt builds it unconditionally, so a fresh clone could not configure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the M2 design spec (
docs/superpowers/specs/2026-07-10-trigger-profiles-m2-design.md), executed task-by-task with per-task reviews and a final whole-branch review (verdict: ready to merge).Phase A — Full trigger surface
off,feedback,weapon,vibration(+ optionalfrequencyHz),multi-feedback(10 resistance zones),slope(ramping resistance),multi-vibration(zoned vibration + frequency). Strict validator with legacy M1 normalization — every existing profile still validates unchanged.trigger_effect_v2_test).TriggerEffectEditorexposes all modes in the profile editor, modifiers, and Trigger Lab (TEST constrained to V1 modes — daemon 0x0D limitation; V2 modes preview via the draft path).Phase B/C — Sharing
metablock (game/author/description/source, whitelisted + length-capped).profiles/library/+index.json),scripts/build-index.mjs --check, and the repo's first CI workflow gating library PRs through the real validator.Testing
trigger_effect_v2_testOK; e2e threads a multi-feedback+slope profile JSON → store → engine → V2 sink payloads.🤖 Generated with Claude Code