@riddledc/riddle-proof-packs 0.4.6 → 0.4.7
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.
- package/README.md +51 -0
- package/bin/riddle-proof-durable-candidate-plan +4 -0
- package/dist/chunk-VFPSPQD7.js +219 -0
- package/dist/durableCandidatePlan-Dv2P33Wg.d.cts +77 -0
- package/dist/durableCandidatePlan-Dv2P33Wg.d.ts +77 -0
- package/dist/durableCandidatePlanCli.cjs +445 -0
- package/dist/durableCandidatePlanCli.d.cts +32 -0
- package/dist/durableCandidatePlanCli.d.ts +32 -0
- package/dist/durableCandidatePlanCli.js +177 -0
- package/dist/index.cjs +216 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/package.json +3 -2
- package/packs/audio-mix/ratchet-method.md +12 -0
- package/packs/neon-step-sequencer/README.md +4 -0
- package/packs/neon-step-sequencer/case-study/findings.md +11 -0
- package/packs/neon-step-sequencer/case-study/ratchet-card.md +2 -1
- package/packs/neon-step-sequencer/case-study/ratchet-log.md +57 -0
- package/packs/neon-step-sequencer/examples/README.md +3 -1
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/artifact-manifest.json +32 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/console.json +4 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/dom-summary.json +40 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/durable-candidate-patch-plan.json +69 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/durable-candidate-patch-plan.md +29 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/human-review-packet.json +801 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/human-review-packet.md +52 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/profile-result.json +5078 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/proof.json +5078 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/screenshots/lilarcade-neon-fast-mix-health-desktop-neon-fast-mix-health.png +0 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/screenshots/lilarcade-neon-fast-mix-health-desktop.png +0 -0
- package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/summary.md +39 -0
package/dist/index.cjs
CHANGED
|
@@ -22,8 +22,11 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
RIDDLE_PROOF_PACK_MANIFEST: () => RIDDLE_PROOF_PACK_MANIFEST,
|
|
24
24
|
RIDDLE_PROOF_PACK_PROFILES: () => RIDDLE_PROOF_PACK_PROFILES,
|
|
25
|
+
createDurableCandidatePatchPlan: () => createDurableCandidatePatchPlan,
|
|
26
|
+
createDurableCandidatePatchPlanArtifacts: () => createDurableCandidatePatchPlanArtifacts,
|
|
25
27
|
createHumanReviewPacketArtifacts: () => createHumanReviewPacketArtifacts,
|
|
26
28
|
findHumanReviewPacket: () => findHumanReviewPacket,
|
|
29
|
+
formatDurableCandidatePatchPlanMarkdown: () => formatDurableCandidatePatchPlanMarkdown,
|
|
27
30
|
formatHumanReviewPacketMarkdown: () => formatHumanReviewPacketMarkdown,
|
|
28
31
|
getPackEnabledRiddleProofPackProfiles: () => getPackEnabledRiddleProofPackProfiles,
|
|
29
32
|
getRiddleProofPackProfile: () => getRiddleProofPackProfile,
|
|
@@ -2663,12 +2666,225 @@ function createHumanReviewPacketArtifacts(proofOrPacket, options = {}) {
|
|
|
2663
2666
|
markdown
|
|
2664
2667
|
};
|
|
2665
2668
|
}
|
|
2669
|
+
|
|
2670
|
+
// src/durableCandidatePlan.ts
|
|
2671
|
+
var DEFAULT_APPROVAL_MODES = ["operator_approved", "mixing_canon_surrogate"];
|
|
2672
|
+
var DEFAULT_ACTION_TYPES = ["set_mixer_level"];
|
|
2673
|
+
var isRecord3 = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
2674
|
+
var asRecord2 = (value) => isRecord3(value) ? value : {};
|
|
2675
|
+
var getPath2 = (value, path) => {
|
|
2676
|
+
let cursor = value;
|
|
2677
|
+
for (const part of path.split(".")) {
|
|
2678
|
+
if (!isRecord3(cursor)) return void 0;
|
|
2679
|
+
cursor = cursor[part];
|
|
2680
|
+
}
|
|
2681
|
+
return cursor;
|
|
2682
|
+
};
|
|
2683
|
+
var asFiniteNumber = (value) => {
|
|
2684
|
+
if (value === null || value === void 0 || value === "") return null;
|
|
2685
|
+
if (typeof value !== "number" && typeof value !== "string") return null;
|
|
2686
|
+
const numeric = Number(value);
|
|
2687
|
+
return Number.isFinite(numeric) ? Number(numeric.toFixed(4)) : null;
|
|
2688
|
+
};
|
|
2689
|
+
var formatValue2 = (value) => {
|
|
2690
|
+
if (value === null || value === void 0 || value === "") return "not captured";
|
|
2691
|
+
if (typeof value === "number") return Number.isInteger(value) ? String(value) : String(Number(value.toFixed(4)));
|
|
2692
|
+
if (typeof value === "boolean") return value ? "true" : "false";
|
|
2693
|
+
return String(value);
|
|
2694
|
+
};
|
|
2695
|
+
var formatCodeValue2 = (value) => `\`${formatValue2(value)}\``;
|
|
2696
|
+
var selectedTargetLabel = (packet) => {
|
|
2697
|
+
const value = getPath2(packet, "target.selectedSong.selectedSong") ?? getPath2(packet, "target.routeState.selectedSong") ?? getPath2(packet, "target.label");
|
|
2698
|
+
return typeof value === "string" && value.trim() ? value : null;
|
|
2699
|
+
};
|
|
2700
|
+
var selectedRoute = (packet) => {
|
|
2701
|
+
const value = getPath2(packet, "target.routeState.route") ?? getPath2(packet, "target.routeState.path") ?? getPath2(packet, "target.route");
|
|
2702
|
+
return typeof value === "string" && value.trim() ? value : null;
|
|
2703
|
+
};
|
|
2704
|
+
var selectedMixProfileId = (packet) => {
|
|
2705
|
+
const value = getPath2(packet, "recommendation.candidate.summary.mixProfile.id") ?? getPath2(packet, "baseline.mixProfile.id") ?? getPath2(packet, "target.mixProfile.id");
|
|
2706
|
+
return typeof value === "string" && value.trim() ? value : null;
|
|
2707
|
+
};
|
|
2708
|
+
function createDurableCandidatePatchPlan(proofOrPacket, options = {}) {
|
|
2709
|
+
const packet = requireHumanReviewPacket(proofOrPacket);
|
|
2710
|
+
const recommendation = asRecord2(packet.recommendation);
|
|
2711
|
+
const candidate = asRecord2(recommendation.candidate);
|
|
2712
|
+
const action = asRecord2(candidate.action);
|
|
2713
|
+
const guardrails = asRecord2(packet.guardrails);
|
|
2714
|
+
const request = asRecord2(packet.request);
|
|
2715
|
+
const approval = asRecord2(request.approval);
|
|
2716
|
+
const ranking = asRecord2(packet.ranking);
|
|
2717
|
+
const proofBoundary = packet.proofBoundary;
|
|
2718
|
+
const target = {
|
|
2719
|
+
label: selectedTargetLabel(packet),
|
|
2720
|
+
route: selectedRoute(packet),
|
|
2721
|
+
mixProfileId: selectedMixProfileId(packet)
|
|
2722
|
+
};
|
|
2723
|
+
const actionType = action.type;
|
|
2724
|
+
const actionTrack = action.track;
|
|
2725
|
+
const from = asFiniteNumber(action.from);
|
|
2726
|
+
const to = asFiniteNumber(action.to);
|
|
2727
|
+
const numericDelta = asFiniteNumber(action.delta);
|
|
2728
|
+
const delta = numericDelta ?? (from !== null && to !== null ? asFiniteNumber(to - from) : null);
|
|
2729
|
+
const allowedApprovalModes = new Set(options.allowedApprovalModes ?? DEFAULT_APPROVAL_MODES);
|
|
2730
|
+
const allowedActionTypes = new Set(options.allowedActionTypes ?? DEFAULT_ACTION_TYPES);
|
|
2731
|
+
const errors = [];
|
|
2732
|
+
if (packet.status !== "candidate_applied_for_listening_review") {
|
|
2733
|
+
errors.push("packet status must be candidate_applied_for_listening_review");
|
|
2734
|
+
}
|
|
2735
|
+
if (recommendation.action !== "listen_to_applied_candidate") {
|
|
2736
|
+
errors.push("recommendation action must be listen_to_applied_candidate");
|
|
2737
|
+
}
|
|
2738
|
+
if (guardrails.approvedCandidateApplied !== true) {
|
|
2739
|
+
errors.push("approvedCandidateApplied guardrail must be true");
|
|
2740
|
+
}
|
|
2741
|
+
if (request.candidateActionsAreTransient !== false) {
|
|
2742
|
+
errors.push("candidateActionsAreTransient must be false before a durable patch handoff");
|
|
2743
|
+
}
|
|
2744
|
+
if (!approval.mode) {
|
|
2745
|
+
errors.push("approval mode is required");
|
|
2746
|
+
} else if (!allowedApprovalModes.has(String(approval.mode))) {
|
|
2747
|
+
errors.push(`approval mode ${formatValue2(approval.mode)} is not allowed for durable patch handoff`);
|
|
2748
|
+
}
|
|
2749
|
+
if (ranking.role !== "review_order_only") {
|
|
2750
|
+
errors.push("ranking role must remain review_order_only");
|
|
2751
|
+
}
|
|
2752
|
+
if (!String(proofBoundary ?? "").includes("musical taste still requires listening review")) {
|
|
2753
|
+
errors.push("proof boundary must preserve the listening-review caveat");
|
|
2754
|
+
}
|
|
2755
|
+
if (!actionType || !allowedActionTypes.has(String(actionType))) {
|
|
2756
|
+
errors.push(`action type ${formatValue2(actionType)} is not allowed for durable patch handoff`);
|
|
2757
|
+
}
|
|
2758
|
+
if (typeof actionTrack !== "string" || !actionTrack.trim()) {
|
|
2759
|
+
errors.push("candidate action track is required");
|
|
2760
|
+
}
|
|
2761
|
+
if (to === null) {
|
|
2762
|
+
errors.push("candidate action target value is required");
|
|
2763
|
+
}
|
|
2764
|
+
if (String(actionType) === "set_mixer_level" && (to === null || to < 0 || to > 1.5)) {
|
|
2765
|
+
errors.push("set_mixer_level target must be between 0 and 1.5");
|
|
2766
|
+
}
|
|
2767
|
+
if (options.requireTargetLabel !== false && !target.label) {
|
|
2768
|
+
errors.push("target label is required for a scoped durable patch handoff");
|
|
2769
|
+
}
|
|
2770
|
+
if (options.requireMixProfileId === true && !target.mixProfileId) {
|
|
2771
|
+
errors.push("mixProfileId is required for this durable patch handoff");
|
|
2772
|
+
}
|
|
2773
|
+
const actionShape = {
|
|
2774
|
+
type: actionType ?? null,
|
|
2775
|
+
track: actionTrack ?? null,
|
|
2776
|
+
from,
|
|
2777
|
+
to,
|
|
2778
|
+
delta
|
|
2779
|
+
};
|
|
2780
|
+
const mixerLevels = !errors.length && String(actionType) === "set_mixer_level" && typeof actionTrack === "string" && to !== null ? { [actionTrack]: to } : null;
|
|
2781
|
+
return {
|
|
2782
|
+
version: "riddle-proof.durable-candidate-patch-plan.v1",
|
|
2783
|
+
kind: "durable_candidate_patch_plan",
|
|
2784
|
+
status: errors.length ? "not_ready_for_durable_patch" : "ready_for_durable_patch",
|
|
2785
|
+
ok: errors.length === 0,
|
|
2786
|
+
errors,
|
|
2787
|
+
source: {
|
|
2788
|
+
packetStatus: packet.status ?? null,
|
|
2789
|
+
recommendationAction: recommendation.action ?? null,
|
|
2790
|
+
rankingRole: ranking.role ?? null,
|
|
2791
|
+
proofBoundary: proofBoundary ?? null
|
|
2792
|
+
},
|
|
2793
|
+
target,
|
|
2794
|
+
candidate: {
|
|
2795
|
+
label: candidate.label ?? null,
|
|
2796
|
+
action: actionShape
|
|
2797
|
+
},
|
|
2798
|
+
approval: {
|
|
2799
|
+
mode: approval.mode ?? null,
|
|
2800
|
+
approvedBy: approval.approvedBy ?? null,
|
|
2801
|
+
basis: approval.basis ?? null
|
|
2802
|
+
},
|
|
2803
|
+
durableEdit: errors.length ? null : {
|
|
2804
|
+
sourceFile: options.sourceFile ?? null,
|
|
2805
|
+
target,
|
|
2806
|
+
action: actionShape,
|
|
2807
|
+
mixerLevels,
|
|
2808
|
+
provenance: {
|
|
2809
|
+
humanReviewPacketStatus: packet.status ?? null,
|
|
2810
|
+
recommendationLabel: candidate.label ?? null,
|
|
2811
|
+
approvalMode: approval.mode ?? null,
|
|
2812
|
+
approvedBy: approval.approvedBy ?? null,
|
|
2813
|
+
basis: approval.basis ?? null
|
|
2814
|
+
},
|
|
2815
|
+
doesNotProve: [
|
|
2816
|
+
"subjective mix quality",
|
|
2817
|
+
"that the approval surrogate is a real listener preference",
|
|
2818
|
+
"all possible candidate edits"
|
|
2819
|
+
]
|
|
2820
|
+
},
|
|
2821
|
+
boundary: "This is a durable patch handoff for an approved listening-review candidate. It does not prove subjective mix quality.",
|
|
2822
|
+
caveats: [
|
|
2823
|
+
"A durable patch plan is not a taste verdict.",
|
|
2824
|
+
"Ranking orders review only; it is not a universal mix-quality score.",
|
|
2825
|
+
"Run a final current-target proof after the durable edit lands."
|
|
2826
|
+
]
|
|
2827
|
+
};
|
|
2828
|
+
}
|
|
2829
|
+
function formatDurableCandidatePatchPlanMarkdown(plan, options = {}) {
|
|
2830
|
+
if (plan.kind !== "durable_candidate_patch_plan") {
|
|
2831
|
+
throw new Error("Expected a durable_candidate_patch_plan");
|
|
2832
|
+
}
|
|
2833
|
+
const lines = [
|
|
2834
|
+
`# ${options.title ?? "Durable Candidate Patch Plan"}`,
|
|
2835
|
+
"",
|
|
2836
|
+
`- status: ${formatCodeValue2(plan.status)}`,
|
|
2837
|
+
`- ok: ${formatCodeValue2(plan.ok)}`,
|
|
2838
|
+
`- target_label: ${formatValue2(plan.target.label)}`,
|
|
2839
|
+
`- mix_profile_id: ${formatCodeValue2(plan.target.mixProfileId)}`,
|
|
2840
|
+
`- source_file: ${formatCodeValue2(plan.durableEdit?.sourceFile)}`,
|
|
2841
|
+
"",
|
|
2842
|
+
"## Candidate",
|
|
2843
|
+
"",
|
|
2844
|
+
`- label: ${formatCodeValue2(plan.candidate.label)}`,
|
|
2845
|
+
`- action: ${formatCodeValue2(`${formatValue2(plan.candidate.action.type)} ${formatValue2(plan.candidate.action.track)}: ${formatValue2(plan.candidate.action.from)} -> ${formatValue2(plan.candidate.action.to)} (${formatValue2(plan.candidate.action.delta)})`)}`,
|
|
2846
|
+
"",
|
|
2847
|
+
"## Approval Boundary",
|
|
2848
|
+
"",
|
|
2849
|
+
`- approval_mode: ${formatCodeValue2(plan.approval.mode)}`,
|
|
2850
|
+
`- approved_by: ${formatCodeValue2(plan.approval.approvedBy)}`,
|
|
2851
|
+
`- basis: ${formatValue2(plan.approval.basis)}`,
|
|
2852
|
+
`- boundary: ${formatValue2(plan.boundary)}`,
|
|
2853
|
+
"",
|
|
2854
|
+
"## Durable Edit",
|
|
2855
|
+
"",
|
|
2856
|
+
`- mixer_levels: ${formatCodeValue2(JSON.stringify(plan.durableEdit?.mixerLevels ?? null))}`
|
|
2857
|
+
];
|
|
2858
|
+
if (plan.errors.length) {
|
|
2859
|
+
lines.push("", "## Errors", "");
|
|
2860
|
+
for (const error of plan.errors) lines.push(`- ${error}`);
|
|
2861
|
+
}
|
|
2862
|
+
lines.push("", "## Caveats", "");
|
|
2863
|
+
for (const caveat of plan.caveats) lines.push(`- ${caveat}`);
|
|
2864
|
+
return `${lines.join("\n")}
|
|
2865
|
+
`;
|
|
2866
|
+
}
|
|
2867
|
+
function createDurableCandidatePatchPlanArtifacts(proofOrPacket, options = {}) {
|
|
2868
|
+
const plan = createDurableCandidatePatchPlan(proofOrPacket, options);
|
|
2869
|
+
const markdown = formatDurableCandidatePatchPlanMarkdown(plan, {
|
|
2870
|
+
title: options.title
|
|
2871
|
+
});
|
|
2872
|
+
return {
|
|
2873
|
+
plan,
|
|
2874
|
+
json: `${JSON.stringify(plan, null, 2)}
|
|
2875
|
+
`,
|
|
2876
|
+
markdown
|
|
2877
|
+
};
|
|
2878
|
+
}
|
|
2666
2879
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2667
2880
|
0 && (module.exports = {
|
|
2668
2881
|
RIDDLE_PROOF_PACK_MANIFEST,
|
|
2669
2882
|
RIDDLE_PROOF_PACK_PROFILES,
|
|
2883
|
+
createDurableCandidatePatchPlan,
|
|
2884
|
+
createDurableCandidatePatchPlanArtifacts,
|
|
2670
2885
|
createHumanReviewPacketArtifacts,
|
|
2671
2886
|
findHumanReviewPacket,
|
|
2887
|
+
formatDurableCandidatePatchPlanMarkdown,
|
|
2672
2888
|
formatHumanReviewPacketMarkdown,
|
|
2673
2889
|
getPackEnabledRiddleProofPackProfiles,
|
|
2674
2890
|
getRiddleProofPackProfile,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _riddledc_riddle_proof from '@riddledc/riddle-proof';
|
|
2
2
|
import { RiddleProofProfile } from '@riddledc/riddle-proof';
|
|
3
3
|
export { H as HumanReviewPacket, a as HumanReviewPacketArtifacts, b as HumanReviewPacketMarkdownOptions, c as createHumanReviewPacketArtifacts, f as findHumanReviewPacket, d as formatHumanReviewPacketMarkdown, r as requireHumanReviewPacket } from './humanReviewPacket-APSxuvat.cjs';
|
|
4
|
+
export { D as DurableCandidatePatchPlan, a as DurableCandidatePatchPlanArtifacts, b as DurableCandidatePatchPlanOptions, c as createDurableCandidatePatchPlan, d as createDurableCandidatePatchPlanArtifacts, f as formatDurableCandidatePatchPlanMarkdown } from './durableCandidatePlan-Dv2P33Wg.cjs';
|
|
4
5
|
|
|
5
6
|
interface RiddleProofPackProfileManifest {
|
|
6
7
|
/** Profile slug and canonical manifest key. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _riddledc_riddle_proof from '@riddledc/riddle-proof';
|
|
2
2
|
import { RiddleProofProfile } from '@riddledc/riddle-proof';
|
|
3
3
|
export { H as HumanReviewPacket, a as HumanReviewPacketArtifacts, b as HumanReviewPacketMarkdownOptions, c as createHumanReviewPacketArtifacts, f as findHumanReviewPacket, d as formatHumanReviewPacketMarkdown, r as requireHumanReviewPacket } from './humanReviewPacket-APSxuvat.js';
|
|
4
|
+
export { D as DurableCandidatePatchPlan, a as DurableCandidatePatchPlanArtifacts, b as DurableCandidatePatchPlanOptions, c as createDurableCandidatePatchPlan, d as createDurableCandidatePatchPlanArtifacts, f as formatDurableCandidatePatchPlanMarkdown } from './durableCandidatePlan-Dv2P33Wg.js';
|
|
4
5
|
|
|
5
6
|
interface RiddleProofPackProfileManifest {
|
|
6
7
|
/** Profile slug and canonical manifest key. */
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createDurableCandidatePatchPlan,
|
|
3
|
+
createDurableCandidatePatchPlanArtifacts,
|
|
4
|
+
formatDurableCandidatePatchPlanMarkdown
|
|
5
|
+
} from "./chunk-VFPSPQD7.js";
|
|
1
6
|
import {
|
|
2
7
|
createHumanReviewPacketArtifacts,
|
|
3
8
|
findHumanReviewPacket,
|
|
@@ -2501,8 +2506,11 @@ function instantiateRiddleProofProfile(profileName, options = {}) {
|
|
|
2501
2506
|
export {
|
|
2502
2507
|
RIDDLE_PROOF_PACK_MANIFEST,
|
|
2503
2508
|
RIDDLE_PROOF_PACK_PROFILES,
|
|
2509
|
+
createDurableCandidatePatchPlan,
|
|
2510
|
+
createDurableCandidatePatchPlanArtifacts,
|
|
2504
2511
|
createHumanReviewPacketArtifacts,
|
|
2505
2512
|
findHumanReviewPacket,
|
|
2513
|
+
formatDurableCandidatePatchPlanMarkdown,
|
|
2506
2514
|
formatHumanReviewPacketMarkdown,
|
|
2507
2515
|
getPackEnabledRiddleProofPackProfiles,
|
|
2508
2516
|
getRiddleProofPackProfile,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riddledc/riddle-proof-packs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Reusable proof pack profiles and metadata helpers for the Riddle proof framework.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "RiddleDC",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"README.md"
|
|
29
29
|
],
|
|
30
30
|
"bin": {
|
|
31
|
+
"riddle-proof-durable-candidate-plan": "./bin/riddle-proof-durable-candidate-plan",
|
|
31
32
|
"riddle-proof-review-packet": "./bin/riddle-proof-review-packet"
|
|
32
33
|
},
|
|
33
34
|
"sideEffects": false,
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"typescript": "^5.4.5"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
|
-
"build": "tsup src/index.ts src/reviewPacketCli.ts --format cjs,esm --dts --out-dir dist --clean",
|
|
47
|
+
"build": "tsup src/index.ts src/reviewPacketCli.ts src/durableCandidatePlanCli.ts --format cjs,esm --dts --out-dir dist --clean",
|
|
47
48
|
"clean": "rm -rf dist",
|
|
48
49
|
"lint": "echo 'lint: (not configured)'",
|
|
49
50
|
"test": "npm run build && node test.js"
|
|
@@ -10,6 +10,18 @@ The audio ratchet is:
|
|
|
10
10
|
6. Rerun with a sharper claim.
|
|
11
11
|
7. Extract reusable pack guidance.
|
|
12
12
|
|
|
13
|
+
For creative edits, add an explicit handoff gate before any durable source/config change:
|
|
14
|
+
|
|
15
|
+
1. Generate bounded candidates.
|
|
16
|
+
2. Keep ranking as review order only.
|
|
17
|
+
3. Emit a human-review packet.
|
|
18
|
+
4. Apply a candidate only when approval is explicit.
|
|
19
|
+
5. Generate a durable candidate patch plan from the applied packet.
|
|
20
|
+
6. Make the scoped source/config edit.
|
|
21
|
+
7. Rerun a `current_target` proof that verifies the app sees the durable state.
|
|
22
|
+
|
|
23
|
+
This proves the change claim and the durable application path. It still does not prove subjective mix quality.
|
|
24
|
+
|
|
13
25
|
## Smallest layer order
|
|
14
26
|
|
|
15
27
|
Prefer changes in this order:
|
|
@@ -38,6 +38,8 @@ This pack's first concrete strategy is `mix-level-search`, which turns small lev
|
|
|
38
38
|
|
|
39
39
|
The approved-candidate profile is the next handoff pattern after review-packet generation. It only applies a candidate when the app contract reports that the candidate's objective receipts passed, and the packet records `approvedCandidateApplied` plus the approval mode. The approval mode can keep development moving, but it is still an operator surrogate; it does not prove listener preference.
|
|
40
40
|
|
|
41
|
+
The durable patch handoff is a separate step after the approved-candidate proof. A follow-on agent can validate the applied `humanReviewPacket`, generate a scoped durable candidate plan, edit the app/config source, and then run a final `current_target` proof. That handoff proves the approved candidate became visible durable state in the running app. It still does not prove the mix is aesthetically better.
|
|
42
|
+
|
|
41
43
|
## Example evidence
|
|
42
44
|
|
|
43
45
|
The `examples/` directory contains local Playwright proof results captured against LilArcade Neon Step Sequencer on May 24, 2026:
|
|
@@ -48,6 +50,8 @@ The `examples/` directory contains local Playwright proof results captured again
|
|
|
48
50
|
- `run-004-ratchet-loop-mix-level-search`: passing `interaction_snapshots` proof where a bounded loop tested six mix-level change-claim candidates, found a supported `chord -0.10` candidate, recorded receipt-level verdicts, and restored app state without keeping the edit.
|
|
49
51
|
- `run-005-explore-songs-and-mixes-final`: passing `current_target` exploration sweep across four songs and eight song/part entries, with `8` passing entries, `0` prioritized findings, and no clipping after the local app-contract and mix-headroom ratchet.
|
|
50
52
|
- `run-006-ratchet-loop-human-review-packet`: passing `interaction_snapshots` proof where the same bounded loop returned a compact `humanReviewPacket` with the recommended `chord -0.10` candidate, objective guardrails, `review_order_only` ranking, state restoration, and explicit listening caveats.
|
|
53
|
+
- `run-007-approved-candidate-applied`: passing `interaction_snapshots` proof where an explicit `mixing_canon_surrogate` approval mode applied the supported `chord -0.10` candidate for listening review and recorded `approvedCandidateApplied`.
|
|
54
|
+
- `run-008-durable-mix-patch-handoff`: passing durable handoff example where the applied packet became a scoped source/config plan for `chord: 0.28`, followed by a `current_target` proof showing the running app saw the durable level without clipping or low-level windows.
|
|
51
55
|
|
|
52
56
|
## Naming note
|
|
53
57
|
|
|
@@ -134,6 +134,17 @@ Pack summary guidance first; Riddle Proof core only if a general display primiti
|
|
|
134
134
|
- rerun: passed on May 24, 2026 with local Playwright.
|
|
135
135
|
- next sharper question: can follow-on agents use the applied-candidate packet to prepare a code/config patch only when the operator explicitly asks for a durable edit?
|
|
136
136
|
|
|
137
|
+
### Run 008 closed the durable source handoff
|
|
138
|
+
|
|
139
|
+
- run: `run-008-durable-mix-patch-handoff`
|
|
140
|
+
- claim: an applied human-review packet can become a scoped source/config patch only after durable-readiness validation, and the running app should then prove it sees that durable state.
|
|
141
|
+
- observed evidence: durable plan status was `ready_for_durable_patch`; source file was `src/Games/songs/neon-approved-mix-overrides.json`; target was `Monkberry Moon Delight (Tab)` with mix profile `monkberry-moon-delight-eq-lane-mix-v7`; durable mixer level was `chord: 0.28`; final current-target proof passed with contract chord level `0.28`, peak `0.8303`, RMS `0.1234`, clipping `false`, low-level window `false`, and `6` active instruments.
|
|
142
|
+
- classification: none; passing durable handoff plus `current_target` proof with subjective listening caveat.
|
|
143
|
+
- smallest layer changed: reusable pack helper/CLI, app source override, and proof-pack example docs.
|
|
144
|
+
- change made: added a durable candidate plan helper that refuses transient/unapproved packets, committed a scoped Neon override in the app, and captured final proof that the running app saw the durable level.
|
|
145
|
+
- rerun: passed on May 24, 2026 with local Playwright and deployed in LilArcade PR #490.
|
|
146
|
+
- next sharper question: can this durable handoff become the default follow-on step for proof-backed creative edits across more strategies than `mix-level-search`?
|
|
147
|
+
|
|
137
148
|
### Local runner shutdown needs a small ergonomics follow-up
|
|
138
149
|
|
|
139
150
|
- run: `run-002-mix-change`, `run-003-full-matrix`, `run-004-ratchet-loop-mix-level-search`
|
|
@@ -37,7 +37,8 @@ The project shows that a complex audio app can improve proof confidence mostly b
|
|
|
37
37
|
- Run 005: a `current_target` exploration sweep sampled four songs and eight song/part entries. The first real sweep exposed app-contract normalization gaps and hot built-in song presets; after the local ratchet fixes it passed with `8` entries, `0` findings, and no clipping.
|
|
38
38
|
- Run 006: the bounded loop returned a compact `humanReviewPacket` with the supported `chord -0.10` candidate, objective guardrails, state restoration, review-order ranking, and listening caveats.
|
|
39
39
|
- Run 007: the approved-candidate profile used a `mixing_canon_surrogate` approval mode, restored loop state, applied the supported `chord -0.10` candidate, and recorded an applied-candidate receipt for listening review.
|
|
40
|
+
- Run 008: the applied packet became a durable candidate patch plan for `chord: 0.28`, the app stored it as a scoped source override, and a final `current_target` proof verified the running app saw the durable level without clipping or low-level windows.
|
|
40
41
|
|
|
41
42
|
## Honest boundary
|
|
42
43
|
|
|
43
|
-
These runs prove objective claims about a running app target. They do not prove that the mix is tasteful, that every song section is healthy, or that a release candidate is better than production. Run 005 is still bounded to configured song/part limits. Runs 006 and 007 make the human handoff explicit: the packet is a compact review object, and the approval mode is a visible operator/surrogate choice, not an automated taste verdict. The ratchet loop is a generic proof-loop shape; `mix-level-search` is only the first Neon strategy plugged into it.
|
|
44
|
+
These runs prove objective claims about a running app target. They do not prove that the mix is tasteful, that every song section is healthy, or that a release candidate is better than production. Run 005 is still bounded to configured song/part limits. Runs 006 and 007 make the human handoff explicit: the packet is a compact review object, and the approval mode is a visible operator/surrogate choice, not an automated taste verdict. Run 008 proves durable application and current-target visibility, not listener preference. The ratchet loop is a generic proof-loop shape; `mix-level-search` is only the first Neon strategy plugged into it.
|
|
@@ -392,6 +392,63 @@ Next sharper question:
|
|
|
392
392
|
|
|
393
393
|
Can the reusable pack expose this approved-candidate shape without making approval automatic, and can follow-on agents use the packet to prepare a code/config patch only when the operator explicitly asks for one?
|
|
394
394
|
|
|
395
|
+
## Run 008 - Durable mix patch handoff
|
|
396
|
+
|
|
397
|
+
Claim:
|
|
398
|
+
|
|
399
|
+
An explicitly applied human-review packet can become a scoped durable source/config patch, and a final current-target proof can verify the running app sees that durable state without claiming subjective mix quality.
|
|
400
|
+
|
|
401
|
+
Profile:
|
|
402
|
+
|
|
403
|
+
`profiles/fast-mix-health.json`
|
|
404
|
+
|
|
405
|
+
Evidence to capture:
|
|
406
|
+
|
|
407
|
+
- applied human-review packet
|
|
408
|
+
- durable candidate patch plan
|
|
409
|
+
- source/config target
|
|
410
|
+
- current app contract mixer state
|
|
411
|
+
- offline mix-health metrics
|
|
412
|
+
- listening-review caveat
|
|
413
|
+
|
|
414
|
+
Possible outcomes:
|
|
415
|
+
|
|
416
|
+
- `ready_for_durable_patch`: the packet is applied, approved, non-transient, ranked for review only, and still preserves the listening-review caveat.
|
|
417
|
+
- `not_ready_for_durable_patch`: the packet is still transient, lacks approval metadata, has a disallowed action, lacks required target scope, or dropped the proof/taste boundary.
|
|
418
|
+
- `current_target_passed`: the durable source edit is visible to the running app and current audio guardrails pass.
|
|
419
|
+
- `product_regression`: the durable edit is not reflected in app state or the current target clips / falls below level guardrails.
|
|
420
|
+
|
|
421
|
+
Observed status:
|
|
422
|
+
|
|
423
|
+
Passed on May 24, 2026 with `local-playwright`.
|
|
424
|
+
|
|
425
|
+
Observed evidence:
|
|
426
|
+
|
|
427
|
+
- durable plan status `ready_for_durable_patch`
|
|
428
|
+
- source file `src/Games/songs/neon-approved-mix-overrides.json`
|
|
429
|
+
- target `Monkberry Moon Delight (Tab)`
|
|
430
|
+
- mix profile `monkberry-moon-delight-eq-lane-mix-v7`
|
|
431
|
+
- durable mixer level `chord: 0.28`
|
|
432
|
+
- current-target profile status `passed`
|
|
433
|
+
- contract chord level `0.28`
|
|
434
|
+
- peak `0.8303`
|
|
435
|
+
- RMS `0.1234`
|
|
436
|
+
- clipping `false`
|
|
437
|
+
- low-level window `false`
|
|
438
|
+
- active instruments `6`
|
|
439
|
+
|
|
440
|
+
Failure classification:
|
|
441
|
+
|
|
442
|
+
None. This was a passing durable handoff plus `current_target` proof. It proves scoped durable application and browser-visible state, not listener preference.
|
|
443
|
+
|
|
444
|
+
Smallest layer changed:
|
|
445
|
+
|
|
446
|
+
Reusable proof-pack helper/CLI, app source override, and proof-pack example docs. Riddle Proof core did not need a change.
|
|
447
|
+
|
|
448
|
+
Next sharper question:
|
|
449
|
+
|
|
450
|
+
Can this durable handoff become the default follow-on step after approved packets for more creative strategies than `mix-level-search`?
|
|
451
|
+
|
|
395
452
|
## Project note
|
|
396
453
|
|
|
397
454
|
The ratchet is not a pass. The ratchet is the next sharper question.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
These examples are local Playwright runner outputs captured against LilArcade Neon Step Sequencer on May 24, 2026. They are included to show how this pack records atomic proof claims with explicit evidence-role patterns.
|
|
4
4
|
|
|
5
|
-
The raw `profile-result.json` files are real runner outputs. They intentionally keep enough evidence to audit the verdict, but the summaries are the preferred place to start. Runs 006 and
|
|
5
|
+
The raw `profile-result.json` files are real runner outputs. They intentionally keep enough evidence to audit the verdict, but the summaries are the preferred place to start. Runs 006, 007, and 008 also include standalone handoff artifacts generated from proof output.
|
|
6
6
|
|
|
7
7
|
## Runs
|
|
8
8
|
|
|
@@ -15,6 +15,7 @@ The raw `profile-result.json` files are real runner outputs. They intentionally
|
|
|
15
15
|
| `run-005-explore-songs-and-mixes-final` | `current_target` | passed | A bounded exploration sweep samples four songs and eight song/part entries, producing a zero-finding confidence map after app-contract and mix-headroom fixes. |
|
|
16
16
|
| `run-006-ratchet-loop-human-review-packet` | `interaction_snapshots` | passed | A bounded ratchet loop returns a compact `humanReviewPacket` for handoff: supported candidates, objective guardrails, state restoration, review-order ranking, and listening caveats. |
|
|
17
17
|
| `run-007-approved-candidate-applied` | `interaction_snapshots` | passed | A bounded ratchet loop uses an explicit operator-approval surrogate, applies the supported `chord -0.10` candidate, and keeps the listening-review caveat in the packet. |
|
|
18
|
+
| `run-008-durable-mix-patch-handoff` | `current_target` | passed | An applied packet becomes a durable candidate patch plan for `chord: 0.28`, then a current-target proof verifies the running app sees that durable level without clipping. |
|
|
18
19
|
|
|
19
20
|
## What these examples do not prove
|
|
20
21
|
|
|
@@ -26,3 +27,4 @@ The raw `profile-result.json` files are real runner outputs. They intentionally
|
|
|
26
27
|
- The ratchet-loop run does not prove that the supported candidate should be kept. Its ranking metric is a review-order hint, not a taste verdict.
|
|
27
28
|
- The human-review packet does not replace listening judgment. It compresses objective receipts and caveats so a person or follow-on agent can decide what to review next.
|
|
28
29
|
- The approved-candidate run does not prove that the surrogate approval is a real listener preference; it proves that the apply step was explicit, guarded by supported receipts, and recorded for review.
|
|
30
|
+
- The durable handoff run does not prove the mix is better. It proves the approved candidate was eligible for scoped source/config application and that the app saw the durable result afterward.
|
package/packs/neon-step-sequencer/examples/run-008-durable-mix-patch-handoff/artifact-manifest.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof-local-runner-manifest.v1",
|
|
3
|
+
"runner": "local-playwright",
|
|
4
|
+
"profile_name": "lilarcade-neon-fast-mix-health",
|
|
5
|
+
"captured_at": "2026-05-24T14:09:51.100Z",
|
|
6
|
+
"artifacts": [
|
|
7
|
+
{
|
|
8
|
+
"name": "proof.json",
|
|
9
|
+
"path": "proof.json",
|
|
10
|
+
"kind": "text",
|
|
11
|
+
"bytes": 191453
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "console.json",
|
|
15
|
+
"path": "console.json",
|
|
16
|
+
"kind": "text",
|
|
17
|
+
"bytes": 38
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "dom-summary.json",
|
|
21
|
+
"path": "dom-summary.json",
|
|
22
|
+
"kind": "text",
|
|
23
|
+
"bytes": 815
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "profile-result.json",
|
|
27
|
+
"path": "profile-result.json",
|
|
28
|
+
"kind": "text",
|
|
29
|
+
"bytes": 191453
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expected_viewport_count": 1,
|
|
3
|
+
"viewport_count": 1,
|
|
4
|
+
"partial": false,
|
|
5
|
+
"routes": [
|
|
6
|
+
{
|
|
7
|
+
"requested": "http://127.0.0.1:5178/games/drum-sequencer?song=monkberry-moon-delight-tab&mix=profile&view=trainer&instrument=bass",
|
|
8
|
+
"observed": "/games/drum-sequencer",
|
|
9
|
+
"expected_path": "/games/drum-sequencer",
|
|
10
|
+
"matched": true,
|
|
11
|
+
"http_status": 200
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"titles": [
|
|
15
|
+
"LilArcade"
|
|
16
|
+
],
|
|
17
|
+
"overflow_px": [
|
|
18
|
+
0
|
|
19
|
+
],
|
|
20
|
+
"bounds_overflow_px": [
|
|
21
|
+
0
|
|
22
|
+
],
|
|
23
|
+
"overflow_offender_counts": [
|
|
24
|
+
0
|
|
25
|
+
],
|
|
26
|
+
"frames": [
|
|
27
|
+
{
|
|
28
|
+
"viewport": "desktop",
|
|
29
|
+
"selectors": []
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"http_status": [],
|
|
33
|
+
"link_status": [],
|
|
34
|
+
"route_inventory": [],
|
|
35
|
+
"network_mock_count": 0,
|
|
36
|
+
"network_mock_hit_count": 0,
|
|
37
|
+
"dialog_count": 0,
|
|
38
|
+
"dialog_accept_count": 0,
|
|
39
|
+
"dialog_dismiss_count": 0
|
|
40
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "riddle-proof.durable-candidate-patch-plan.v1",
|
|
3
|
+
"kind": "durable_candidate_patch_plan",
|
|
4
|
+
"status": "ready_for_durable_patch",
|
|
5
|
+
"ok": true,
|
|
6
|
+
"errors": [],
|
|
7
|
+
"source": {
|
|
8
|
+
"packetStatus": "candidate_applied_for_listening_review",
|
|
9
|
+
"recommendationAction": "listen_to_applied_candidate",
|
|
10
|
+
"rankingRole": "review_order_only",
|
|
11
|
+
"proofBoundary": "Objective receipts support or reject candidate change claims; musical taste still requires listening review."
|
|
12
|
+
},
|
|
13
|
+
"target": {
|
|
14
|
+
"label": "Monkberry Moon Delight (Tab)",
|
|
15
|
+
"route": "/games/drum-sequencer",
|
|
16
|
+
"mixProfileId": "monkberry-moon-delight-eq-lane-mix-v7"
|
|
17
|
+
},
|
|
18
|
+
"candidate": {
|
|
19
|
+
"label": "chord -0.10",
|
|
20
|
+
"action": {
|
|
21
|
+
"type": "set_mixer_level",
|
|
22
|
+
"track": "chord",
|
|
23
|
+
"from": 0.38,
|
|
24
|
+
"to": 0.28,
|
|
25
|
+
"delta": -0.1
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"approval": {
|
|
29
|
+
"mode": "mixing_canon_surrogate",
|
|
30
|
+
"approvedBy": "codex",
|
|
31
|
+
"basis": "subtle level reduction after objective receipts pass; this keeps development moving while preserving a listening-review caveat"
|
|
32
|
+
},
|
|
33
|
+
"durableEdit": {
|
|
34
|
+
"sourceFile": "src/Games/songs/neon-approved-mix-overrides.json",
|
|
35
|
+
"target": {
|
|
36
|
+
"label": "Monkberry Moon Delight (Tab)",
|
|
37
|
+
"route": "/games/drum-sequencer",
|
|
38
|
+
"mixProfileId": "monkberry-moon-delight-eq-lane-mix-v7"
|
|
39
|
+
},
|
|
40
|
+
"action": {
|
|
41
|
+
"type": "set_mixer_level",
|
|
42
|
+
"track": "chord",
|
|
43
|
+
"from": 0.38,
|
|
44
|
+
"to": 0.28,
|
|
45
|
+
"delta": -0.1
|
|
46
|
+
},
|
|
47
|
+
"mixerLevels": {
|
|
48
|
+
"chord": 0.28
|
|
49
|
+
},
|
|
50
|
+
"provenance": {
|
|
51
|
+
"humanReviewPacketStatus": "candidate_applied_for_listening_review",
|
|
52
|
+
"recommendationLabel": "chord -0.10",
|
|
53
|
+
"approvalMode": "mixing_canon_surrogate",
|
|
54
|
+
"approvedBy": "codex",
|
|
55
|
+
"basis": "subtle level reduction after objective receipts pass; this keeps development moving while preserving a listening-review caveat"
|
|
56
|
+
},
|
|
57
|
+
"doesNotProve": [
|
|
58
|
+
"subjective mix quality",
|
|
59
|
+
"that the approval surrogate is a real listener preference",
|
|
60
|
+
"all possible candidate edits"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"boundary": "This is a durable patch handoff for an approved listening-review candidate. It does not prove subjective mix quality.",
|
|
64
|
+
"caveats": [
|
|
65
|
+
"A durable patch plan is not a taste verdict.",
|
|
66
|
+
"Ranking orders review only; it is not a universal mix-quality score.",
|
|
67
|
+
"Run a final current-target proof after the durable edit lands."
|
|
68
|
+
]
|
|
69
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Neon Durable Candidate Patch Plan
|
|
2
|
+
|
|
3
|
+
- status: `ready_for_durable_patch`
|
|
4
|
+
- ok: `true`
|
|
5
|
+
- target_label: Monkberry Moon Delight (Tab)
|
|
6
|
+
- mix_profile_id: `monkberry-moon-delight-eq-lane-mix-v7`
|
|
7
|
+
- source_file: `src/Games/songs/neon-approved-mix-overrides.json`
|
|
8
|
+
|
|
9
|
+
## Candidate
|
|
10
|
+
|
|
11
|
+
- label: `chord -0.10`
|
|
12
|
+
- action: `set_mixer_level chord: 0.38 -> 0.28 (-0.1)`
|
|
13
|
+
|
|
14
|
+
## Approval Boundary
|
|
15
|
+
|
|
16
|
+
- approval_mode: `mixing_canon_surrogate`
|
|
17
|
+
- approved_by: `codex`
|
|
18
|
+
- basis: subtle level reduction after objective receipts pass; this keeps development moving while preserving a listening-review caveat
|
|
19
|
+
- boundary: This is a durable patch handoff for an approved listening-review candidate. It does not prove subjective mix quality.
|
|
20
|
+
|
|
21
|
+
## Durable Edit
|
|
22
|
+
|
|
23
|
+
- mixer_levels: `{"chord":0.28}`
|
|
24
|
+
|
|
25
|
+
## Caveats
|
|
26
|
+
|
|
27
|
+
- A durable patch plan is not a taste verdict.
|
|
28
|
+
- Ranking orders review only; it is not a universal mix-quality score.
|
|
29
|
+
- Run a final current-target proof after the durable edit lands.
|