@rafinery/cli 0.8.2 → 0.8.3
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/bin/rafa.mjs
CHANGED
|
@@ -148,18 +148,15 @@ End to end — from zero to a queryable, working brain:
|
|
|
148
148
|
validates, bloom writes the improvement ledger. Then rafa push
|
|
149
149
|
→ webhook → the platform ingests it (the brain repo only).
|
|
150
150
|
4. SEE IT Open the repo on the platform: Overview (health), Brain (files),
|
|
151
|
-
Improvements (kanban), Plans,
|
|
152
|
-
access" mints keys for more MCP clients (Slack, CI, incident.io).
|
|
151
|
+
Improvements (kanban), Plans, Reconciliations (merge runs).
|
|
153
152
|
5. WORK /rafa plan "<intent>" — prism-validated, brain-grounded; approval
|
|
154
153
|
pushes it to the platform (the plans channel). /rafa build —
|
|
155
154
|
execute it; statuses/journals + the branch WORKING SET sync at
|
|
156
155
|
checkpoints, so any teammate or session resumes where you stopped.
|
|
157
|
-
6.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
get_brain_status · search_knowledge · get_rule/playbook/improvement ·
|
|
162
|
-
list_plans · get_plan · get_active_plan. Read-only, cited, per-repo.
|
|
156
|
+
6. MERGE Just merge PRs — the platform detects the merge and distills the
|
|
157
|
+
branch's knowledge into the org brain automatically (watch the
|
|
158
|
+
Reconciliations tab). Teams that want the compute in their own
|
|
159
|
+
CI instead: rafa ci-setup (optional, org-CI adapter).
|
|
163
160
|
|
|
164
161
|
Then, inside Claude Code: /rafa scan · /rafa improve · /rafa plan · /rafa build
|
|
165
162
|
|
|
@@ -234,7 +234,7 @@ explicitly typed; an ACCEPTED boundary offer counts as the explicit invocation.
|
|
|
234
234
|
| `insights` | spawn compass → bootstrap/refresh the dev's private user brain from their native `/insights` report + recent work; every candidate OFFERED, banked only on yes (`put_dev_insight`). Capture during normal work is §capture's job, not this command. | [rafa-insights](../skills/rafa-insights/SKILL.md) |
|
|
235
235
|
| `leverage` | reason over the committed toolbox (`.claude/settings.json`, `.mcp.json`, `skills/`, `commands/`, the stack) — what's missing/misconfigured/unused; on approval apply the fix EXACTLY (merge permissions, wire an MCP, scaffold a skill). Merge, never clobber; show the diff. The CLI reports, you fix. | [rafa-leverage](../skills/rafa-leverage/SKILL.md) |
|
|
236
236
|
| `sage` | explicit OVERRIDE of the implicit observer pass (below) | [rafa-sage](../skills/rafa-sage/SKILL.md) |
|
|
237
|
-
| `push` | `npx @rafinery/cli push
|
|
237
|
+
| `push` | `npx @rafinery/cli push --verb=<scan\|improve\|build\|update>` — commit `.rafa/` and push to the brain remote (the dev's own git auth), stamped `brain-for: <code sha>`. Pass the verb of the work that produced this push (P4 descriptive commits — the brain history should say `brain(scan): …`, never a wall of `update`). After a scan, or to re-sync a changed brain. Never without approval. | — |
|
|
238
238
|
| `migrate` · `update` | brain-side schema migration — see below | — |
|
|
239
239
|
| `help` (also no arg / unrecognized) | print this reference verbatim, then stop | — |
|
|
240
240
|
|
|
@@ -61,6 +61,7 @@ try {
|
|
|
61
61
|
join(rafa, "intent", `${short}.md`),
|
|
62
62
|
`---\n` +
|
|
63
63
|
`type: IntentRecord\n` +
|
|
64
|
+
`description: "per-commit intent trail (capture-engine P2) — provenance, consumed at merge, never org-brain truth"\n` +
|
|
64
65
|
`code-commit: ${fullSha}\n` +
|
|
65
66
|
`code-branch: ${branch}\n` +
|
|
66
67
|
`timestamp: ${new Date().toISOString()}\n` +
|
|
@@ -254,7 +254,7 @@ pipeline; **`--brain-only`** stops after the brain is validated (step 5 PASS)
|
|
|
254
254
|
spawn `bloom` → `.rafa/improve/`. It reads the *validated* brain as its index, so it only
|
|
255
255
|
runs after PASS.
|
|
256
256
|
7. **Push** — present the full summary (brain verdict/score + top improvements). **On the
|
|
257
|
-
dev's explicit approval**, `npx @rafinery/cli push` — commits `.rafa/` and pushes to the
|
|
257
|
+
dev's explicit approval**, `npx @rafinery/cli push --verb=scan` — commits `.rafa/` and pushes to the
|
|
258
258
|
brain remote using the dev's own git auth, stamped `brain-for: <code sha>`. Never without approval.
|
|
259
259
|
8. **The coach offer (founding scan only)** — if this was the repo's FIRST scan and the dev's
|
|
260
260
|
user brain is empty (`list_dev_insights` → none), offer ONCE: *"the code side is mapped —
|
package/lib/ci-setup.mjs
CHANGED
|
@@ -121,6 +121,12 @@ export default async function ciSetup(args = []) {
|
|
|
121
121
|
const ROOT = process.cwd();
|
|
122
122
|
const target = join(ROOT, WORKFLOW_PATH);
|
|
123
123
|
|
|
124
|
+
console.log(
|
|
125
|
+
"OPTIONAL — the platform reconciles merges automatically (no CI, no repo secrets).\n" +
|
|
126
|
+
"This wires the org-CI ADAPTER instead: reconciliation compute runs in YOUR\n" +
|
|
127
|
+
"GitHub Actions on YOUR secrets. Most teams should skip this.\n",
|
|
128
|
+
);
|
|
129
|
+
|
|
124
130
|
if (existsSync(target)) {
|
|
125
131
|
const current = readFileSync(target, "utf8");
|
|
126
132
|
if (current === WORKFLOW) {
|
package/lib/init.mjs
CHANGED
|
@@ -176,25 +176,12 @@ export default async function init(args) {
|
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
//
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
" • Wire CI reconciliation now? (GitHub Actions: mechanical fold on branch merges,\n" +
|
|
186
|
-
" distillation on merge-to-main — runs on YOUR CI secrets) [y/N] ",
|
|
187
|
-
);
|
|
188
|
-
if (a === "y" || a === "yes") {
|
|
189
|
-
const { default: ciSetup } = await import("./ci-setup.mjs");
|
|
190
|
-
await ciSetup([]);
|
|
191
|
-
} else {
|
|
192
|
-
console.log(
|
|
193
|
-
" • skipped — wire it anytime with `rafa ci-setup`. Until then, the next dev\n" +
|
|
194
|
-
" session offers the same reconciliation after each merge (nothing is lost).",
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
179
|
+
// Reconciliation runs on the PLATFORM (App-only era, owner call 2026-07-18):
|
|
180
|
+
// merged PRs are detected and distilled by the platform's own sandbox — no
|
|
181
|
+
// CI workflow, no repo secrets, nothing to wire here. The org-CI adapter
|
|
182
|
+
// stays available as an explicit opt-out for teams that want the compute in
|
|
183
|
+
// their own CI: `rafa ci-setup`. Init no longer asks — one fewer question,
|
|
184
|
+
// one fewer confusion.
|
|
198
185
|
|
|
199
186
|
// Stamp the versions this repo was provisioned at — the compat anchor `update`/`migrate`
|
|
200
187
|
// diff against. Carries platform identity too when provisioned via a setup URL.
|
|
@@ -224,8 +211,8 @@ export default async function init(args) {
|
|
|
224
211
|
" Joining an ALREADY-scanned repo: run rafa pull — never re-scan for existing knowledge.\n" +
|
|
225
212
|
" 4. Open the repo on the rafinery platform — its Overview shows the brain once pushed." +
|
|
226
213
|
(p?.mcpUrl
|
|
227
|
-
? "\n 5.
|
|
228
|
-
|
|
214
|
+
? "\n 5. Merge PRs as usual — the platform reconciles branch knowledge into the\n" +
|
|
215
|
+
" brain automatically (watch the repo's Reconciliations tab)."
|
|
229
216
|
: ""),
|
|
230
217
|
);
|
|
231
218
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rafinery/cli",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "rafa
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "rafa \u2014 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": {
|
|
7
7
|
"rafa": "bin/rafa.mjs",
|