@rafinery/cli 0.8.0 → 0.8.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 +11 -0
- package/lib/gate/okf-emit.mjs +12 -0
- package/lib/okf.mjs +11 -1
- package/lib/releases.mjs +13 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ 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.8.1 — honest empty: absence is never conformance
|
|
8
|
+
|
|
9
|
+
`rafa okf check` over a root with zero `.md` files used to print a green "conforms" —
|
|
10
|
+
a vacuous truth over nothing, the exact silent-empty class the contract bans. Now:
|
|
11
|
+
zero files → loud failure ("nothing to check") with root guidance (a brain-repo clone
|
|
12
|
+
wants `--root=.`; a code repo's `.rafa` is lazy until `rafa pull --full`/a scan).
|
|
13
|
+
`rafa okf` (emit) on an empty root writes no scaffold and returns 1 — push logs it and
|
|
14
|
+
continues (a lazy `.rafa` is legitimate there); standalone exits loud.
|
|
15
|
+
`@rafinery/okf` 0.1.1 adds the additive `empty` flag to `validateBundle` so library
|
|
16
|
+
consumers distinguish "checked and clean" from "nothing to check."
|
|
17
|
+
|
|
7
18
|
## 0.8.0 — the OKF surface: every brain is an Open Knowledge Format bundle
|
|
8
19
|
|
|
9
20
|
**Adopt with:** `npx @rafinery/cli@latest update`, then `rafa push` — the next push
|
package/lib/gate/okf-emit.mjs
CHANGED
|
@@ -146,6 +146,18 @@ export function runOkfEmit(argv = []) {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
// Nothing to materialize is ABSENCE, not success: write no scaffold over an
|
|
150
|
+
// empty root (wrong --root, or a lazy .rafa before pull/scan). Standalone
|
|
151
|
+
// `rafa okf` exits 1 on this; push logs it and continues — a lazy instance
|
|
152
|
+
// is a legitimate state there, and the gates behind it stay honest.
|
|
153
|
+
if (concepts.length === 0) {
|
|
154
|
+
console.log(
|
|
155
|
+
`! rafa okf: no concepts under ${ROOT} — nothing to materialize ` +
|
|
156
|
+
`(brain-repo clone → --root=. · code repo → .rafa after \`rafa pull --full\` or a scan)`,
|
|
157
|
+
);
|
|
158
|
+
return 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
149
161
|
// id → { title, bundlePath } for wikilink transpilation.
|
|
150
162
|
const resolve = new Map();
|
|
151
163
|
for (const c of concepts) {
|
package/lib/okf.mjs
CHANGED
|
@@ -36,9 +36,19 @@ export default async function okf(args = []) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
if (sub === "check") {
|
|
39
|
-
const { conformant, checked, errors, warnings } = validateBundle(ROOT, {
|
|
39
|
+
const { conformant, empty, checked, errors, warnings } = validateBundle(ROOT, {
|
|
40
40
|
exempt: RAFA_EXEMPT,
|
|
41
41
|
});
|
|
42
|
+
// Zero files is ABSENCE, never conformance — a green over an empty root
|
|
43
|
+
// would be the silent-empty failure class (no assumed values, outward).
|
|
44
|
+
if (empty) {
|
|
45
|
+
console.error(
|
|
46
|
+
`✗ rafa okf check: no .md files under ${ROOT} — nothing to check.\n` +
|
|
47
|
+
` Wrong --root? In a brain-repo clone the bundle IS the directory: --root=.\n` +
|
|
48
|
+
` In a code repo the bundle is .rafa/ (lazy — \`rafa pull --full\` mirrors it).`,
|
|
49
|
+
);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
42
52
|
for (const e of errors) console.log(`✗ ${e.path} — ${e.rule}`);
|
|
43
53
|
for (const w of warnings) console.log(`⚠ ${w.path} — ${w.rule}`);
|
|
44
54
|
console.log(
|
package/lib/releases.mjs
CHANGED
|
@@ -203,6 +203,19 @@ export const RELEASES = [
|
|
|
203
203
|
"manifest shape + schemaVersion 1 + checker v2 — all additive " +
|
|
204
204
|
"(§8); no re-scan, adopt with `rafa update`, then `rafa push` materializes the bundle.",
|
|
205
205
|
},
|
|
206
|
+
{
|
|
207
|
+
version: "0.8.1",
|
|
208
|
+
contract: 1,
|
|
209
|
+
plans: 2,
|
|
210
|
+
requires: "update",
|
|
211
|
+
summary:
|
|
212
|
+
"Honest-empty patch: `rafa okf check` on a root with zero .md files now FAILS " +
|
|
213
|
+
"loudly (\"nothing to check\" + root guidance) instead of printing a vacuous " +
|
|
214
|
+
"conformance green — absence is never conformance. `rafa okf` (emit) on an empty " +
|
|
215
|
+
"root materializes nothing and returns 1 (push logs + continues past a lazy " +
|
|
216
|
+
".rafa; standalone exits loud). @rafinery/okf 0.1.1: validateBundle gains the " +
|
|
217
|
+
"additive `empty` flag so library consumers can make the same distinction.",
|
|
218
|
+
},
|
|
206
219
|
];
|
|
207
220
|
|
|
208
221
|
// The release this CLI build ships (last entry).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rafinery/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "rafa — the AI engineer CLI. Vendors the rafa blueprint into your repo (shadcn-style) and runs the deterministic contract gates.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">=18"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@rafinery/okf": "0.1.
|
|
19
|
+
"@rafinery/okf": "0.1.1"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|