@rafinery/cli 0.15.0 → 0.15.1
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/CHANGELOG.md +12 -0
- package/lib/reflex.mjs +38 -2
- package/lib/releases.mjs +14 -0
- package/package.json +1 -1
- package/skills-bundle/skills-manifest.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ The machine-readable version of this lives in [`lib/releases.mjs`](lib/releases.
|
|
|
4
4
|
CLI reads it to tell a client, on `rafa update`, exactly what an upgrade requires (nothing,
|
|
5
5
|
a re-scan, or a `rafa migrate`).
|
|
6
6
|
|
|
7
|
+
## 0.15.1 — fix `rafa reflex --consume` verdict parsing
|
|
8
|
+
|
|
9
|
+
A `rafa reflex --consume <id> --reason session-only` silently recorded `banked`
|
|
10
|
+
instead — the parser only accepted a bare positional verdict and rejected
|
|
11
|
+
anything starting with `-`, then fell through to the `banked` default. That's a
|
|
12
|
+
silent wrong value, exactly what the platform forbids.
|
|
13
|
+
|
|
14
|
+
Now the verdict accepts a flag form (`--verdict=<v>` / `--reason=<v>`, plus the
|
|
15
|
+
bare positional), and an **unrecognized verdict fails loudly** instead of
|
|
16
|
+
defaulting — a session-only correction is recorded session-only, or the consume
|
|
17
|
+
errors. Regression-tested.
|
|
18
|
+
|
|
7
19
|
## 0.15.0 — learnings are a `.rafa/` sibling
|
|
8
20
|
|
|
9
21
|
sage's learnings move out of committed `.claude/rafa/learnings/` and become a
|
package/lib/reflex.mjs
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
//
|
|
4
4
|
// rafa reflex list unprocessed corrections
|
|
5
5
|
// rafa reflex --json machine shape (bootstrap digest / spawn prompts)
|
|
6
|
-
// rafa reflex --consume <id> [
|
|
6
|
+
// rafa reflex --consume <id> [verdict] mark one processed. verdict ∈
|
|
7
|
+
// banked | session-only | refuted — a bare word, or --verdict=<v> /
|
|
8
|
+
// --reason=<v>. Omitted ⇒ banked (the SOP default). An UNRECOGNIZED
|
|
9
|
+
// verdict fails loudly — never a silent wrong outcome (no assumed values).
|
|
7
10
|
// through the gates, or judged session-only
|
|
8
11
|
//
|
|
9
12
|
// Consume APPENDS a done-marker line ({id, done:true, verdict, at}) — the queue
|
|
@@ -50,7 +53,40 @@ export default async function reflex(args = []) {
|
|
|
50
53
|
console.error(`✗ no unprocessed correction with id ${id} (see \`rafa reflex\`)`);
|
|
51
54
|
process.exit(1);
|
|
52
55
|
}
|
|
53
|
-
|
|
56
|
+
// The verdict — from a bare positional (`--consume <id> session-only`) OR a
|
|
57
|
+
// flag (`--verdict=X` · `--verdict X` · `--reason=X` · `--reason X`; the
|
|
58
|
+
// human reaches for `--reason`, so accept it). NO ASSUMED VALUES: default to
|
|
59
|
+
// `banked` ONLY when no verdict was supplied at all; an unrecognized verdict
|
|
60
|
+
// — or a flag whose value is unrecognized — fails LOUDLY rather than
|
|
61
|
+
// silently recording the wrong outcome (the 2026-07-27 mislabel: a
|
|
62
|
+
// `--reason session-only` fell through to a false `banked`).
|
|
63
|
+
const VERDICTS = ["banked", "session-only", "refuted"];
|
|
64
|
+
const rest = args.slice(ci + 2);
|
|
65
|
+
let verdict = null;
|
|
66
|
+
let supplied = false;
|
|
67
|
+
for (let i = 0; i < rest.length; i++) {
|
|
68
|
+
const a = rest[i];
|
|
69
|
+
const m = a.match(/^--(?:verdict|reason)(?:=(.+))?$/);
|
|
70
|
+
if (m) {
|
|
71
|
+
supplied = true;
|
|
72
|
+
verdict = m[1] ?? rest[++i] ?? null; // `=value` or the next token
|
|
73
|
+
} else if (!a.startsWith("-")) {
|
|
74
|
+
supplied = true;
|
|
75
|
+
verdict = a; // bare positional verdict
|
|
76
|
+
} else {
|
|
77
|
+
continue; // an unrelated flag (e.g. a future --json) — skip, don't consume it as a verdict
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
if (!supplied) verdict = "banked"; // bare `--consume <id>` — the SOP's default
|
|
82
|
+
else if (!VERDICTS.includes(verdict)) {
|
|
83
|
+
console.error(
|
|
84
|
+
`✗ unrecognized verdict ${verdict === null ? "(none given after the flag)" : `"${verdict}"`} — ` +
|
|
85
|
+
`expected one of: ${VERDICTS.join(" | ")}.\n` +
|
|
86
|
+
` usage: rafa reflex --consume <id> [${VERDICTS.join("|")}] (bare word, or --verdict=<v> / --reason=<v>)`,
|
|
87
|
+
);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
54
90
|
appendFileSync(
|
|
55
91
|
file,
|
|
56
92
|
JSON.stringify({ id, done: true, verdict, at: new Date().toISOString() }) + "\n",
|
package/lib/releases.mjs
CHANGED
|
@@ -501,6 +501,20 @@ export const RELEASES = [
|
|
|
501
501
|
"governance framing is retired; the DB is the store, `.rafa/learnings/` " +
|
|
502
502
|
"the local working copy — no learning files clutter `.claude/`.",
|
|
503
503
|
},
|
|
504
|
+
{
|
|
505
|
+
version: "0.15.1",
|
|
506
|
+
contract: 1,
|
|
507
|
+
plans: 2,
|
|
508
|
+
requires: "update",
|
|
509
|
+
summary:
|
|
510
|
+
"FIX `rafa reflex --consume`: the verdict now accepts a flag form " +
|
|
511
|
+
"(`--verdict=<v>` / `--reason=<v>`, since the human reaches for " +
|
|
512
|
+
"`--reason`) as well as the bare positional, and an UNRECOGNIZED verdict " +
|
|
513
|
+
"fails loudly instead of silently defaulting to `banked` (the 2026-07-27 " +
|
|
514
|
+
"mislabel: `--reason session-only` fell through to a false `banked` in " +
|
|
515
|
+
"reflex.jsonl + the loop event). No assumed values — a session-only " +
|
|
516
|
+
"correction is recorded session-only, or the consume errors.",
|
|
517
|
+
},
|
|
504
518
|
];
|
|
505
519
|
|
|
506
520
|
// The release this CLI build ships (last entry).
|
package/package.json
CHANGED