@riddledc/riddle-proof-packs 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +13 -0
  2. package/dist/index.cjs +1176 -6
  3. package/dist/index.js +1176 -6
  4. package/package.json +1 -1
  5. package/packs/audio-mix/README.md +30 -0
  6. package/packs/audio-mix/authoring-guide.md +35 -0
  7. package/packs/audio-mix/human-review-rubric.md +31 -0
  8. package/packs/audio-mix/metrics-schema.json +30 -0
  9. package/packs/audio-mix/profile.template.json +130 -0
  10. package/packs/audio-mix/ratchet-method.md +26 -0
  11. package/packs/neon-step-sequencer/README.md +49 -0
  12. package/packs/neon-step-sequencer/case-study/findings.md +113 -0
  13. package/packs/neon-step-sequencer/case-study/ratchet-card.md +40 -0
  14. package/packs/neon-step-sequencer/case-study/ratchet-log.md +235 -0
  15. package/packs/neon-step-sequencer/case-study/reusable-lessons.md +31 -0
  16. package/packs/neon-step-sequencer/examples/README.md +22 -0
  17. package/packs/neon-step-sequencer/examples/run-001-fast-mix-health/profile-result.json +5010 -0
  18. package/packs/neon-step-sequencer/examples/run-001-fast-mix-health/summary.md +37 -0
  19. package/packs/neon-step-sequencer/examples/run-002-mix-change/profile-result.json +6816 -0
  20. package/packs/neon-step-sequencer/examples/run-002-mix-change/summary.md +37 -0
  21. package/packs/neon-step-sequencer/examples/run-003-full-matrix/profile-result.json +18490 -0
  22. package/packs/neon-step-sequencer/examples/run-003-full-matrix/summary.md +33 -0
  23. package/packs/neon-step-sequencer/examples/run-004-ratchet-loop-mix-level-search/profile-result.json +7003 -0
  24. package/packs/neon-step-sequencer/examples/run-004-ratchet-loop-mix-level-search/summary.md +39 -0
  25. package/packs/neon-step-sequencer/profile.template.json +75 -0
  26. package/packs/neon-step-sequencer/profiles/explore-songs-and-mixes.json +112 -0
  27. package/packs/neon-step-sequencer/profiles/fast-mix-health.json +181 -0
  28. package/packs/neon-step-sequencer/profiles/full-mix-health-matrix.json +154 -0
  29. package/packs/neon-step-sequencer/profiles/mix-change-before-after.json +202 -0
  30. package/packs/neon-step-sequencer/profiles/mobile-trainer-layout.json +109 -0
  31. package/packs/neon-step-sequencer/profiles/playback-sync.json +126 -0
  32. package/packs/neon-step-sequencer/profiles/ratchet-loop-mix-level-search.json +137 -0
  33. package/packs/neon-step-sequencer/profiles/source-readiness.json +114 -0
@@ -0,0 +1,39 @@
1
+ # Run 004 - Ratchet Loop Mix-Level Search
2
+
3
+ - profile: `lilarcade-neon-ratchet-loop-mix-level-search`
4
+ - evidence_role_pattern: `interaction_snapshots`
5
+ - status: `passed`
6
+ - captured_at: `2026-05-24T03:31:26.020Z`
7
+ - runner: `local-playwright`
8
+ - target: `http://127.0.0.1:5173/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass`
9
+
10
+ ## Atomic Claim
11
+
12
+ The current Neon target can run a bounded ratchet loop that proposes mix-level candidates, applies each candidate, captures proof-window evidence, ranks candidates by objective metrics, and restores the app state after the run.
13
+
14
+ ## Evidence
15
+
16
+ | Field | Value |
17
+ | --- | --- |
18
+ | strategy | `mix-level-search` |
19
+ | focus tracks | `bass`, `chord`, `guitar`, `rhythmSynth` |
20
+ | candidates tested | `6` |
21
+ | baseline score | `28.83345` |
22
+ | best score | `27.0708` |
23
+ | objective improvement | `1.7627` |
24
+ | best candidate | `chord -0.10` to level `0.28` |
25
+ | loop status | `candidate_found` |
26
+ | restored after run | `true` |
27
+
28
+ Console fatal count was `0`.
29
+
30
+ ## Verdict
31
+
32
+ Passed. The bounded loop produced a reviewable candidate packet without permanently applying the candidate.
33
+
34
+ ## What This Does Not Prove
35
+
36
+ - subjective mix quality
37
+ - that the candidate should be kept without listening review
38
+ - that all possible mix edits were searched
39
+ - that the ratchet loop primitive is mix-specific
@@ -0,0 +1,75 @@
1
+ {
2
+ "version": "riddle-proof.profile.v1",
3
+ "name": "neon-step-sequencer-template",
4
+ "target": {
5
+ "route": "/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass",
6
+ "viewports": [
7
+ {
8
+ "name": "desktop",
9
+ "width": 1440,
10
+ "height": 1000
11
+ }
12
+ ],
13
+ "timeout_sec": 240,
14
+ "wait_for_selector": ".drum-sequencer h1",
15
+ "setup_actions": [
16
+ {
17
+ "type": "window_eval",
18
+ "label": "install-neon-proof-helpers",
19
+ "timeout_ms": 10000,
20
+ "store_return_to": "__neonProof.install",
21
+ "script": "window.__neonProofApi=()=>window.__NEON_MIX_PROOF__||window.__RIDDLE_SEQUENCER_PROOF__; window.__neonProofRead=()=>{const api=window.__neonProofApi(); const diagnostic=api?.captureDiagnostic?.(); const state=api?.getState?.()||api?.getSummary?.()||diagnostic?.state||null; window.__neonProof={...(window.__neonProof||{}),state}; return {available:Boolean(api),route:state?.route||location.pathname,selectedSong:state?.selectedSong||state?.selected_song||null};}; window.__neonProofPrepare=async(options={})=>{const api=window.__neonProofApi(); return await (api?.prepareForAudioProof?.(options)||api?.prepareSampleSourcesForProof?.(options)||{ok:false,error:'missing prepareForAudioProof'});}; window.__neonProofRender=async(options={})=>{const api=window.__neonProofApi(); return await (api?.renderOfflineMetrics?.(options)||{ok:false,error:'missing renderOfflineMetrics'});}; return window.__neonProofRead();",
22
+ "return_summary_fields": [
23
+ {
24
+ "path": "available"
25
+ },
26
+ {
27
+ "path": "route"
28
+ },
29
+ {
30
+ "path": "selectedSong"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "type": "assert_window_value",
36
+ "path": "__neonProof.install.available",
37
+ "expected_value": true,
38
+ "timeout_ms": 10000
39
+ }
40
+ ]
41
+ },
42
+ "checks": [
43
+ {
44
+ "type": "route_loaded",
45
+ "expected_path": "/games/drum-sequencer"
46
+ },
47
+ {
48
+ "type": "selector_visible",
49
+ "selector": ".drum-sequencer h1"
50
+ },
51
+ {
52
+ "type": "text_visible",
53
+ "text": "Neon Step Sequencer"
54
+ },
55
+ {
56
+ "type": "no_fatal_console_errors"
57
+ }
58
+ ],
59
+ "artifacts": [
60
+ "screenshot",
61
+ "console",
62
+ "dom_summary",
63
+ "proof_json"
64
+ ],
65
+ "metadata": {
66
+ "pack_id": "neon_step_sequencer",
67
+ "pack_public_name": "Neon Step Sequencer Pack",
68
+ "evidence_role_pattern": "current_target",
69
+ "purpose": "Template for Neon Step Sequencer proof-pack authoring.",
70
+ "does_not_prove": [
71
+ "subjective mix quality",
72
+ "full song coverage"
73
+ ]
74
+ }
75
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "version": "riddle-proof.profile.v1",
3
+ "name": "neon-step-sequencer-explore-songs-and-mixes",
4
+ "target": {
5
+ "route": "/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass",
6
+ "viewports": [
7
+ {
8
+ "name": "desktop",
9
+ "width": 1440,
10
+ "height": 1000
11
+ }
12
+ ],
13
+ "timeout_sec": 360,
14
+ "wait_for_selector": ".drum-sequencer h1",
15
+ "setup_actions": [
16
+ {
17
+ "type": "window_eval",
18
+ "label": "install-neon-exploration-proof",
19
+ "timeout_ms": 10000,
20
+ "store_return_to": "__neonProof.install",
21
+ "script": "window.__neonProofApi=()=>window.__NEON_MIX_PROOF__||window.__RIDDLE_SEQUENCER_PROOF__; window.__neonProofWindows=async()=>{const api=window.__neonProofApi(); if(api?.renderProofWindows) return await api.renderProofWindows({}); if(api?.renderOfflineMetrics) return {ok:true,proofKind:'offline-audio-window-set',windows:[await api.renderOfflineMetrics({bars:1,seed:'neon-explore-fallback',monitorProfile:'smallSpeaker'})]}; return {ok:false,error:'missing renderProofWindows'};}; const api=window.__neonProofApi(); const state=api?.getState?.()||api?.getSummary?.()||{}; return {available:Boolean(api),selectedSong:state.selectedSong||null};",
22
+ "return_summary_fields": [
23
+ {
24
+ "path": "available"
25
+ },
26
+ {
27
+ "path": "selectedSong"
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "type": "assert_window_value",
33
+ "path": "__neonProof.install.available",
34
+ "expected_value": true,
35
+ "timeout_ms": 10000
36
+ },
37
+ {
38
+ "type": "window_call",
39
+ "label": "render-proof-windows",
40
+ "path": "__neonProofWindows",
41
+ "store_return_to": "__neonProof.exploration",
42
+ "capture_return": true,
43
+ "timeout_ms": 180000,
44
+ "return_summary_fields": [
45
+ {
46
+ "path": "ok"
47
+ },
48
+ {
49
+ "path": "proofKind"
50
+ },
51
+ {
52
+ "path": "windows.length"
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "type": "assert_window_value",
58
+ "path": "__neonProof.exploration.ok",
59
+ "expected_value": true,
60
+ "timeout_ms": 10000
61
+ },
62
+ {
63
+ "type": "screenshot",
64
+ "label": "neon-explore-songs-and-mixes",
65
+ "mode": "viewport"
66
+ }
67
+ ]
68
+ },
69
+ "checks": [
70
+ {
71
+ "type": "route_loaded",
72
+ "expected_path": "/games/drum-sequencer"
73
+ },
74
+ {
75
+ "type": "selector_visible",
76
+ "selector": ".drum-sequencer h1"
77
+ },
78
+ {
79
+ "type": "no_fatal_console_errors"
80
+ }
81
+ ],
82
+ "artifacts": [
83
+ "screenshot",
84
+ "console",
85
+ "dom_summary",
86
+ "proof_json"
87
+ ],
88
+ "baseline_policy": "invariant_only",
89
+ "failure_policy": {
90
+ "environment_blocked": "neutral",
91
+ "proof_insufficient": "review",
92
+ "product_regression": "fail",
93
+ "needs_human_review": "review"
94
+ },
95
+ "metadata": {
96
+ "pack_id": "neon_step_sequencer",
97
+ "pack_public_name": "Neon Step Sequencer Pack",
98
+ "evidence_role_pattern": "current_target",
99
+ "purpose": "Exploration sweep over the app-provided proof windows for prioritizing the next weakest song/mix combination.",
100
+ "required_receipts": [
101
+ "proof-window set returns ok",
102
+ "window receipts are captured",
103
+ "browser health is clean",
104
+ "screenshot is captured"
105
+ ],
106
+ "does_not_prove": [
107
+ "every possible song/mix combination",
108
+ "subjective listening quality",
109
+ "mobile layout"
110
+ ]
111
+ }
112
+ }
@@ -0,0 +1,181 @@
1
+ {
2
+ "version": "riddle-proof.profile.v1",
3
+ "name": "neon-step-sequencer-fast-mix-health",
4
+ "target": {
5
+ "route": "/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass",
6
+ "viewports": [
7
+ {
8
+ "name": "desktop",
9
+ "width": 1440,
10
+ "height": 1000
11
+ }
12
+ ],
13
+ "timeout_sec": 240,
14
+ "wait_for_selector": ".drum-sequencer h1",
15
+ "setup_actions": [
16
+ {
17
+ "type": "wait_for_selector",
18
+ "selector": ".drum-sequencer h1",
19
+ "timeout_ms": 20000
20
+ },
21
+ {
22
+ "type": "window_eval",
23
+ "label": "install-neon-proof-helpers",
24
+ "timeout_ms": 10000,
25
+ "store_return_to": "__neonProof.install",
26
+ "script": "window.__neonProofApi=()=>window.__NEON_MIX_PROOF__||window.__RIDDLE_SEQUENCER_PROOF__; window.__neonProofRead=()=>{const api=window.__neonProofApi(); const diagnostic=api?.captureDiagnostic?.(); const state=api?.getState?.()||api?.getSummary?.()||diagnostic?.state||null; window.__neonProof={...(window.__neonProof||{}),state}; return {available:Boolean(api),route:state?.route||location.pathname,selectedSong:state?.selectedSong||state?.selected_song||null,hasMixer:Boolean(state?.profile?.mixerLevels||state?.mixerState?.levels)};}; window.__neonProofPrepare=async(options={})=>{const api=window.__neonProofApi(); return await (api?.prepareForAudioProof?.(options)||api?.prepareSampleSourcesForProof?.(options)||{ok:false,error:'missing prepareForAudioProof'});}; window.__neonProofRender=async(options={})=>{const api=window.__neonProofApi(); return await (api?.renderOfflineMetrics?.(options)||{ok:false,error:'missing renderOfflineMetrics'});}; return window.__neonProofRead();",
27
+ "return_summary_fields": [
28
+ {
29
+ "path": "available"
30
+ },
31
+ {
32
+ "path": "selectedSong"
33
+ },
34
+ {
35
+ "path": "hasMixer"
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "type": "assert_window_value",
41
+ "path": "__neonProof.install.available",
42
+ "expected_value": true,
43
+ "timeout_ms": 10000
44
+ },
45
+ {
46
+ "type": "window_call",
47
+ "label": "prepare-audio-proof",
48
+ "path": "__neonProofPrepare",
49
+ "args": [
50
+ {
51
+ "loadAll": false
52
+ }
53
+ ],
54
+ "store_return_to": "__neonProof.sources",
55
+ "capture_return": true,
56
+ "timeout_ms": 90000,
57
+ "return_summary_fields": [
58
+ {
59
+ "path": "ok"
60
+ },
61
+ {
62
+ "path": "sources.drums"
63
+ },
64
+ {
65
+ "path": "sources.bass"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "type": "window_call",
71
+ "label": "render-baseline-metrics",
72
+ "path": "__neonProofRender",
73
+ "args": [
74
+ {
75
+ "bars": 1,
76
+ "seed": "neon-fast-mix-health",
77
+ "monitorProfile": "smallSpeaker"
78
+ }
79
+ ],
80
+ "store_return_to": "__neonProof.baseline",
81
+ "capture_return": true,
82
+ "timeout_ms": 120000,
83
+ "return_summary_fields": [
84
+ {
85
+ "path": "ok"
86
+ },
87
+ {
88
+ "path": "mixHealth.peak"
89
+ },
90
+ {
91
+ "path": "mixHealth.rms"
92
+ },
93
+ {
94
+ "path": "mixHealth.clipping"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "type": "assert_window_value",
100
+ "path": "__neonProof.baseline.ok",
101
+ "expected_value": true,
102
+ "timeout_ms": 10000
103
+ },
104
+ {
105
+ "type": "assert_window_number",
106
+ "path": "__neonProof.baseline.mixHealth.peak",
107
+ "max_value": 0.98,
108
+ "timeout_ms": 10000
109
+ },
110
+ {
111
+ "type": "assert_window_number",
112
+ "path": "__neonProof.baseline.mixHealth.rms",
113
+ "min_value": 0.005,
114
+ "timeout_ms": 10000
115
+ },
116
+ {
117
+ "type": "screenshot",
118
+ "label": "neon-fast-mix-health",
119
+ "mode": "viewport"
120
+ }
121
+ ]
122
+ },
123
+ "checks": [
124
+ {
125
+ "type": "route_loaded",
126
+ "expected_path": "/games/drum-sequencer"
127
+ },
128
+ {
129
+ "type": "selector_visible",
130
+ "selector": ".drum-sequencer h1"
131
+ },
132
+ {
133
+ "type": "text_visible",
134
+ "text": "Neon Step Sequencer"
135
+ },
136
+ {
137
+ "type": "selector_visible",
138
+ "selector": ".drum-sequencer"
139
+ },
140
+ {
141
+ "type": "no_horizontal_overflow",
142
+ "max_overflow_px": 1
143
+ },
144
+ {
145
+ "type": "no_fatal_console_errors"
146
+ }
147
+ ],
148
+ "artifacts": [
149
+ "screenshot",
150
+ "console",
151
+ "dom_summary",
152
+ "proof_json"
153
+ ],
154
+ "baseline_policy": "invariant_only",
155
+ "failure_policy": {
156
+ "environment_blocked": "neutral",
157
+ "proof_insufficient": "review",
158
+ "product_regression": "fail",
159
+ "needs_human_review": "review"
160
+ },
161
+ "metadata": {
162
+ "pack_id": "neon_step_sequencer",
163
+ "pack_public_name": "Neon Step Sequencer Pack",
164
+ "evidence_role_pattern": "current_target",
165
+ "purpose": "Fast current-target audit for Neon mixer state and one rendered audio-health receipt.",
166
+ "required_receipts": [
167
+ "Neon route is loaded",
168
+ "app proof contract is available",
169
+ "selected song and mixer state are readable",
170
+ "audio proof preparation returns a receipt",
171
+ "offline render metrics return ok",
172
+ "mix peak is below clipping threshold",
173
+ "mix RMS is above silence threshold"
174
+ ],
175
+ "does_not_prove": [
176
+ "subjective mix quality",
177
+ "that a visible mix edit affects rendered audio",
178
+ "full viewport or song/mix matrix coverage"
179
+ ]
180
+ }
181
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "version": "riddle-proof.profile.v1",
3
+ "name": "neon-step-sequencer-full-mix-health-matrix",
4
+ "target": {
5
+ "route": "/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass",
6
+ "viewports": [
7
+ {
8
+ "name": "desktop",
9
+ "width": 1440,
10
+ "height": 1000
11
+ },
12
+ {
13
+ "name": "phone",
14
+ "width": 390,
15
+ "height": 844
16
+ },
17
+ {
18
+ "name": "ipad-mini",
19
+ "width": 768,
20
+ "height": 1024
21
+ },
22
+ {
23
+ "name": "ipad",
24
+ "width": 820,
25
+ "height": 1180
26
+ }
27
+ ],
28
+ "timeout_sec": 300,
29
+ "wait_for_selector": ".drum-sequencer h1",
30
+ "setup_actions": [
31
+ {
32
+ "type": "window_eval",
33
+ "label": "install-neon-matrix-proof",
34
+ "timeout_ms": 10000,
35
+ "store_return_to": "__neonProof.install",
36
+ "script": "window.__neonProofApi=()=>window.__NEON_MIX_PROOF__||window.__RIDDLE_SEQUENCER_PROOF__; window.__neonProofRender=async(options={})=>{const api=window.__neonProofApi(); return await (api?.renderOfflineMetrics?.(options)||{ok:false,error:'missing renderOfflineMetrics'});}; const api=window.__neonProofApi(); const state=api?.getState?.()||api?.getSummary?.()||{}; window.__neonProof={...(window.__neonProof||{}),state}; return {available:Boolean(api),route:state.route||location.pathname,selectedSong:state.selectedSong||null};",
37
+ "return_summary_fields": [
38
+ {
39
+ "path": "available"
40
+ },
41
+ {
42
+ "path": "selectedSong"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "type": "assert_window_value",
48
+ "path": "__neonProof.install.available",
49
+ "expected_value": true,
50
+ "timeout_ms": 10000
51
+ },
52
+ {
53
+ "type": "window_call",
54
+ "label": "render-matrix-metrics",
55
+ "path": "__neonProofRender",
56
+ "args": [
57
+ {
58
+ "bars": 1,
59
+ "seed": "neon-full-mix-health-matrix",
60
+ "monitorProfile": "smallSpeaker"
61
+ }
62
+ ],
63
+ "store_return_to": "__neonProof.matrixMetrics",
64
+ "capture_return": true,
65
+ "timeout_ms": 120000,
66
+ "return_summary_fields": [
67
+ {
68
+ "path": "ok"
69
+ },
70
+ {
71
+ "path": "mixHealth.peak"
72
+ },
73
+ {
74
+ "path": "mixHealth.rms"
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "type": "assert_window_value",
80
+ "path": "__neonProof.matrixMetrics.ok",
81
+ "expected_value": true,
82
+ "timeout_ms": 10000
83
+ },
84
+ {
85
+ "type": "assert_window_number",
86
+ "path": "__neonProof.matrixMetrics.mixHealth.peak",
87
+ "max_value": 0.98,
88
+ "timeout_ms": 10000
89
+ },
90
+ {
91
+ "type": "assert_window_number",
92
+ "path": "__neonProof.matrixMetrics.mixHealth.rms",
93
+ "min_value": 0.005,
94
+ "timeout_ms": 10000
95
+ },
96
+ {
97
+ "type": "screenshot",
98
+ "label": "neon-full-mix-health-matrix",
99
+ "mode": "viewport"
100
+ }
101
+ ]
102
+ },
103
+ "checks": [
104
+ {
105
+ "type": "route_loaded",
106
+ "expected_path": "/games/drum-sequencer"
107
+ },
108
+ {
109
+ "type": "selector_visible",
110
+ "selector": ".drum-sequencer h1"
111
+ },
112
+ {
113
+ "type": "selector_visible",
114
+ "selector": ".drum-sequencer"
115
+ },
116
+ {
117
+ "type": "no_mobile_horizontal_overflow"
118
+ },
119
+ {
120
+ "type": "no_fatal_console_errors"
121
+ }
122
+ ],
123
+ "artifacts": [
124
+ "screenshot",
125
+ "console",
126
+ "dom_summary",
127
+ "proof_json"
128
+ ],
129
+ "baseline_policy": "invariant_only",
130
+ "failure_policy": {
131
+ "environment_blocked": "neutral",
132
+ "proof_insufficient": "review",
133
+ "product_regression": "fail"
134
+ },
135
+ "metadata": {
136
+ "pack_id": "neon_step_sequencer",
137
+ "pack_public_name": "Neon Step Sequencer Pack",
138
+ "evidence_role_pattern": "current_target",
139
+ "purpose": "Current-target matrix for Neon route, layout, proof contract, and one rendered mix-health receipt across device-shaped viewports.",
140
+ "required_receipts": [
141
+ "desktop, phone, iPad Mini, and iPad viewport evidence",
142
+ "proof contract available in every selected viewport",
143
+ "offline render metrics ok",
144
+ "no clipping",
145
+ "no low-level/silence regression",
146
+ "mobile overflow is clean"
147
+ ],
148
+ "does_not_prove": [
149
+ "subjective listening quality",
150
+ "every song/mix pair",
151
+ "long-running transport behavior"
152
+ ]
153
+ }
154
+ }