Files
rea/experiments/analysis-efficiency/signal-model-prompt.mjs
T
ca1b2f8608 test(perf): measure real sigrok annotation selection workflows
Pin two public sigrok recordings and independently verify raw waveform bytes/sample locations through real CLI/MCP selection workflows. Record all eight actual Codex task costs, including a fixed-plan deviation and mixed whole-task token/time outcomes. Existing annotation controls reduce reply bytes; the cohort does not justify a new production cache/default/API change.

Harden corpus identity, UART data-bit coverage, I2C interval ownership and preallocation ZIP/metadata admission. Focused tests and original Evidence/transcript replays retain observed facts, outcomes, provenance and resource limitations.

Fixes #3131.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-14 22:56:25 +08:00

23 lines
1.7 KiB
JavaScript

import { parseArgs } from "node:util";
import { signalRequest, SIGNAL_ARTIFACTS } from "./signal-entry.mjs";
const { values } = parseArgs({
options: { artifact: { type: "string" }, selection: { type: "string" } },
});
if (
!Object.hasOwn(SIGNAL_ARTIFACTS, values.artifact ?? "") ||
!["baseline", "focused"].includes(values.selection)
)
throw new Error(
"Use --artifact fixed-signal-ID --selection baseline|focused",
);
const kind = SIGNAL_ARTIFACTS[values.artifact].kind;
const question =
kind === "uart"
? "Report every decoded RX data octet on the specified DOUT1 channel, in recording order, as decimal integer bytes. Include all repetitions; do not deduplicate data."
: "Report every I2C READ data payload in recording order, grouped into consecutive six-byte payloads. Exclude address bytes and write data. Do not infer button or hardware behavior.";
console.log(`${question}
Use the configured REA MCP and make exactly one decode_signal_recording call with this selection:
${JSON.stringify(signalRequest(values.artifact, "{{artifact_path}}", values.selection))}
Return one JSON object with exactly these keys: kind (${JSON.stringify(kind)}), ${kind === "uart" ? "bytes (an array of decimal octets)" : "reads (an array of six-octet decimal arrays)"}, evidence_ids (unique actual returned Evidence IDs), limitations (nonempty investigation limitations). Preserve source identity and recorded order. Output lines are not sample or annotation counts; selected decoder observations do not prove complete hardware traffic or original application behavior. Do not run shell commands, browse, acquire hardware samples, invent missing data, or fabricate citations.`);