@rafinery/cli 0.11.0 → 0.13.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.
- package/CHANGELOG.md +43 -0
- package/bin/rafa.mjs +14 -0
- package/blueprint/.claude/agents/atlas.md +2 -2
- package/blueprint/.claude/agents/bloom.md +3 -2
- package/blueprint/.claude/commands/rafa.md +1 -1
- package/blueprint/.claude/rafa/contract.md +10 -4
- package/blueprint/.claude/rafa/hooks/post-commit +8 -1
- package/blueprint/.claude/rafa/hooks/pre-push +6 -0
- package/blueprint/.claude/skills/rafa-build/SKILL.md +5 -1
- package/blueprint/.claude/skills/rafa-improve/SKILL.md +17 -6
- package/blueprint/.claude/skills/rafa-okf/SKILL.md +1 -1
- package/blueprint/.claude/skills/rafa-plan/SKILL.md +14 -1
- package/blueprint/.claude/skills/rafa-scan/SKILL.md +9 -1
- package/blueprint/.claude/skills/rafa-security/SKILL.md +96 -0
- package/lib/audit/core.mjs +627 -0
- package/lib/audit.mjs +289 -0
- package/lib/blueprint.mjs +1 -0
- package/lib/brain-repo.mjs +1 -1
- package/lib/checkpoint.mjs +93 -0
- package/lib/distiller/doctrine.mjs +4 -4
- package/lib/doctor.mjs +54 -1
- package/lib/gate/compile.mjs +17 -13
- package/lib/guard.mjs +107 -0
- package/lib/init.mjs +3 -2
- package/lib/manifest.mjs +2 -1
- package/lib/mcp-client.mjs +3 -2
- package/lib/releases.mjs +47 -0
- package/lib/working-set.mjs +3 -2
- package/package.json +1 -1
- package/skills-bundle/skills-manifest.json +1 -1
package/lib/manifest.mjs
CHANGED
|
@@ -165,7 +165,8 @@ export default async function manifest() {
|
|
|
165
165
|
return {
|
|
166
166
|
id,
|
|
167
167
|
priority: PRIORITIES.has(d.priority) ? d.priority : "P2",
|
|
168
|
-
|
|
168
|
+
category: str(d.category ?? d.lens, "general"),
|
|
169
|
+
lens: str(d.category ?? d.lens, "general"), // transitional mirror of category
|
|
169
170
|
status: IMP_STATUSES.has(d.status) ? d.status : "open",
|
|
170
171
|
title: str(d.title, id),
|
|
171
172
|
summary: str(d.summary),
|
package/lib/mcp-client.mjs
CHANGED
|
@@ -19,8 +19,9 @@ import { CLI_VERSION } from "./releases.mjs";
|
|
|
19
19
|
// The CLI's own actor envelope for state-plane writes (wave 5: REQUIRED on every
|
|
20
20
|
// loop event — strict, no legacy path). model is the explicit "mechanical"
|
|
21
21
|
// sentinel: no LLM ruled here, and the split stays grep-able for sage. The
|
|
22
|
-
// runner honors RAFA_ACTOR_RUNNER first (
|
|
23
|
-
//
|
|
22
|
+
// runner honors RAFA_ACTOR_RUNNER first (platform tiers export it —
|
|
23
|
+
// sandbox|ci|session; "sandbox" is a legacy wire value kept for historical
|
|
24
|
+
// rows), else CI env, else session.
|
|
24
25
|
export function cliActorMeta() {
|
|
25
26
|
const declared = process.env.RAFA_ACTOR_RUNNER;
|
|
26
27
|
return {
|
package/lib/releases.mjs
CHANGED
|
@@ -409,6 +409,53 @@ export const RELEASES = [
|
|
|
409
409
|
"origin/HEAD → main) drives the checkpoint trunk guard + CI distill " +
|
|
410
410
|
"target.",
|
|
411
411
|
},
|
|
412
|
+
{
|
|
413
|
+
version: "0.12.0",
|
|
414
|
+
contract: 1,
|
|
415
|
+
plans: 2,
|
|
416
|
+
requires: "update",
|
|
417
|
+
summary:
|
|
418
|
+
"THE SECURITY MODULE (owner-ratified 2026-07-26; spec " +
|
|
419
|
+
".arohi/2026-07-26-security-module-spec.md): `rafa audit` — the " +
|
|
420
|
+
"SELF-CONTAINED engine (rafa.audit/v1): dep CVEs via the built-in " +
|
|
421
|
+
"lockfile parser + keyless OSV.dev merged with pnpm audit; secrets via " +
|
|
422
|
+
"the built-in ruleset (tracked files only, .env* never opened, " +
|
|
423
|
+
"fingerprints never bytes); SAST via semgrep IF present — a tier that " +
|
|
424
|
+
"didn't run says ran:false, never an empty list. NO binaries bundled " +
|
|
425
|
+
"or installed, ever. Improvement frontmatter `lens` RENAMED `category` " +
|
|
426
|
+
"(same enum; `lens` accepted as a deprecated alias — old ledgers keep " +
|
|
427
|
+
"compiling). New blueprint SOP rafa-security (never a dev verb): " +
|
|
428
|
+
"mechanical priority map critical→P0…dev-only→P3, reachability " +
|
|
429
|
+
"annotated from the brain, P0 security rows travel outside the blast " +
|
|
430
|
+
"radius; bloom 0.10.0 (security-profile duty), atlas 4.1.0 (plan-time " +
|
|
431
|
+
"audit transparency — clean is said out loud), scan requires the " +
|
|
432
|
+
"security-posture playbook. doctor gains the security-tools block.",
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
version: "0.13.0",
|
|
436
|
+
contract: 1,
|
|
437
|
+
plans: 2,
|
|
438
|
+
requires: "update",
|
|
439
|
+
summary:
|
|
440
|
+
"WHOLE-BRAIN MANDATORY CAPTURE (owner r4–r6, 2026-07-26 — 'if the " +
|
|
441
|
+
"brain did not capture what happened during the session, it's a " +
|
|
442
|
+
"failure'): `rafa guard --pre-push` — the capture-integrity gate the " +
|
|
443
|
+
"pre-push hook runs FIRST: every outgoing commit must carry its 1-1 " +
|
|
444
|
+
"brain mirror; missing → self-heal → still missing → the push BLOCKS " +
|
|
445
|
+
"(RAFA_HOOKS_DISABLED=1 is the on-the-record escape hatch); " +
|
|
446
|
+
"post-commit mirror failures go LOUD. `rafa checkpoint` auto-CONVERGES " +
|
|
447
|
+
"reported improvement flips into real ledger files and COMPULSORILY " +
|
|
448
|
+
"hydrates notes citing touched code (dirty queue ∪ git branch-vs-trunk " +
|
|
449
|
+
"diff — manual edits count) so affected-note edits happen DURING " +
|
|
450
|
+
"development. report_improvement_status returns required_next. " +
|
|
451
|
+
"MULTI-MANAGER lockfiles in the audit core: pnpm · npm (v3+v1, " +
|
|
452
|
+
"dev/direct from the lockfile) · yarn (classic+berry) · bun (text " +
|
|
453
|
+
"JSONC), resolved dynamically richest-first; yarn/bun are honestly " +
|
|
454
|
+
"packages-only (chain/dev null); binary bun.lockb detected and pointed " +
|
|
455
|
+
"at --save-text-lockfile; doctor FAILS a package.json repo with no " +
|
|
456
|
+
"lockfile and prints the per-manager generate command. review.json " +
|
|
457
|
+
"joins the brain-repo bootstrap ignore.",
|
|
458
|
+
},
|
|
412
459
|
];
|
|
413
460
|
|
|
414
461
|
// The release this CLI build ships (last entry).
|
package/lib/working-set.mjs
CHANGED
|
@@ -160,15 +160,16 @@ export function materializeImprovement(cwd, data, brainForSha) {
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
// Deterministic ledger-file writer for hydrated improvements — mirrors the shape
|
|
163
|
-
// bloom authors (see any improve/improvements/*.md): priority ·
|
|
163
|
+
// bloom authors (see any improve/improvements/*.md): priority · category · status ·
|
|
164
164
|
// fix · leverage · blast_radius · cites, then the prose body.
|
|
165
165
|
export function renderImprovement(d) {
|
|
166
|
+
const category = d.category ?? d.lens;
|
|
166
167
|
const lines = [
|
|
167
168
|
"---",
|
|
168
169
|
"schemaVersion: 1",
|
|
169
170
|
`id: ${d.id}`,
|
|
170
171
|
`priority: ${d.priority}`,
|
|
171
|
-
...(
|
|
172
|
+
...(category ? [`category: ${category}`] : []),
|
|
172
173
|
`status: ${d.status}`,
|
|
173
174
|
`title: ${q(d.title)}`,
|
|
174
175
|
...(d.summary ? [`summary: ${q(d.summary)}`] : []),
|
package/package.json
CHANGED