@viberaven/cli 1.5.2 → 1.5.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/AGENTS.md +32 -125
- package/README.md +1 -1
- package/dist/cli.js +716 -490
- package/dist/stack/app.js +3 -2
- package/package.json +84 -84
- package/templates/AGENTS.snippet.md +24 -20
- package/templates/CLAUDE.snippet.md +8 -11
- package/templates/CURSOR.snippet.md +8 -11
package/AGENTS.md
CHANGED
|
@@ -1,152 +1,60 @@
|
|
|
1
1
|
<!-- VIBERAVEN:START -->
|
|
2
|
-
VibeRaven
|
|
2
|
+
VibeRaven reads a repository and lists launch gaps for AI-built apps that deploy on Vercel and use Supabase. It runs fully locally: no login, no API key, no telemetry.
|
|
3
3
|
|
|
4
|
-
Canonical command: `npx -y viberaven --agent-mode`
|
|
4
|
+
Canonical agent command: `npx -y viberaven --agent-mode`
|
|
5
5
|
|
|
6
6
|
If this command is run from the `viberaven` repo itself, use `node packages/cli/dist/cli.js --agent-mode` to avoid resolving the local package metadata.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Agent loop: run VibeRaven, read Mission Map (`.viberaven/mission-map.md`), fix one launch gap, re-run VibeRaven.
|
|
11
|
-
|
|
12
|
-
## Event-Triggered Production Verification
|
|
13
|
-
|
|
14
|
-
Trigger: modifications to `package.json`, `vercel.json`, `supabase/migrations/**/*`, `.env.example`, auth/billing/webhook paths, or deploy workflow files.
|
|
15
|
-
|
|
16
|
-
1. Do NOT claim "production ready" or close a deploy checklist until `gate.status === "clear"` in `.viberaven/gate-result.json`.
|
|
17
|
-
2. Do NOT run verify after every file patch. Batch heals, then `npx -y viberaven --verify` once per loop.
|
|
18
|
-
3. Do NOT `git push` or deploy after auth, RLS, billing, or webhook changes without `npx -y viberaven --agent-mode`.
|
|
19
|
-
4. If anomalies appear, read `.viberaven/agent-tasklist.md` fully before writing new repo logic.
|
|
20
|
-
|
|
21
|
-
Prefer `viberaven_check_readiness` when MCP is configured; otherwise `npx -y viberaven --agent-mode`.
|
|
22
|
-
|
|
23
|
-
## VibeRaven Production-Readiness Gate
|
|
24
|
-
|
|
25
|
-
- Before running build, compile, cleanup, deployment, vercel, or supabase commands, run `npx -y viberaven --agent-mode` first from the project root.
|
|
26
|
-
- Treat VibeRaven as the Agent Context + Production Gate for AI-built apps, especially apps using Vercel, Supabase, auth, database, payments, webhooks, monitoring, rate limits, or environment variables.
|
|
27
|
-
- Read `.viberaven/agent-tasklist.md` first. If it says CRITICAL GAPS DETECTED or PRODUCTION GATE NOT CLEAR, fix one listed repo-code gap before deploying.
|
|
28
|
-
- Read `.viberaven/gate-result.json` for the machine verdict.
|
|
29
|
-
- Read `.viberaven/context-map.json` for compact agent context.
|
|
30
|
-
- Read `.viberaven/agent-summary.md` second for scan context.
|
|
31
|
-
- Read `.viberaven/launch-playbook.md` third for the full checklist.
|
|
32
|
-
- Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix at a time.
|
|
33
|
-
- For Vercel + Supabase launch checks, run `npx -y viberaven audit --vercel-supabase`.
|
|
34
|
-
- Run `npx -y viberaven --verify` after one fix.
|
|
35
|
-
- Run `npx -y viberaven --strict` before deploy or CI pass.
|
|
36
|
-
- Use `npx -y viberaven --heal --plan --gap <id>` before any heal apply.
|
|
37
|
-
- Only use `npx -y viberaven --heal --apply --gap <id> --yes` for supported low-risk repo-code recipes.
|
|
38
|
-
- Preview local rule installation with `npx -y viberaven init --agents all --dry-run`.
|
|
39
|
-
- Cleanup is non-destructive: only run `npx -y viberaven clean --plan` to create a reviewable cleanup plan.
|
|
40
|
-
- Provider dashboard checks are not cleared by repo-code edits. Billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard or through read-only provider MCP evidence.
|
|
41
|
-
- Do not claim provider dashboard work is fixed by repo-code edits.
|
|
42
|
-
- If VibeRaven prints `LOGIN_URL_READY`, open that URL for the user using the available browser tool or system browser. Tell the user: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal process alive while the user approves.
|
|
43
|
-
|
|
44
|
-
## VibeRaven Production Copilot Loop
|
|
45
|
-
|
|
46
|
-
After every scan, read `.viberaven/agent-tasklist.md` for the prioritized task list.
|
|
47
|
-
|
|
48
|
-
The loop is:
|
|
49
|
-
|
|
50
|
-
1. Read `VIBERAVEN_NEXT_ACTION` from scan output for `batchSize`, `batchApplied`, `scanNow`, and `stalled`.
|
|
51
|
-
2. If `stalled: true`, stop calling verify — address provider-action gaps or report to the user.
|
|
52
|
-
3. If `scanNow: true`, call `viberaven_verify` (or run verify command) before applying more heals.
|
|
53
|
-
4. For each repo-code task where `requiresUserAction: false` (up to `batchSize` per batch):
|
|
54
|
-
- Call MCP: `viberaven_heal_apply { gap: "<gapId>", yes: true }`
|
|
55
|
-
- Or run heal apply command
|
|
56
|
-
5. After a successful heal, VibeRaven increments `.viberaven/loop-state.json`. After a full batch of heals, call verify once - do NOT verify after every single heal.
|
|
57
|
-
6. If verify prints `SCAN_DEFERRED`, do not retry verify. Apply the next listed repo-code heal. Only use `--force-scan` when the user explicitly approves spending a scan early.
|
|
58
|
-
7. Repeat until `gate.status === 'clear'` in `.viberaven/gate-result.json`.
|
|
59
|
-
8. If `requiresUserAction: true`:
|
|
60
|
-
- Read `VIBERAVEN_PROVIDER_ACTION` from terminal output.
|
|
61
|
-
- Present `dashboardUrl` and `exactStep` to the user.
|
|
62
|
-
- Wait for user confirmation, then verify.
|
|
63
|
-
9. If `fixType === 'upgrade-required'`, provide upgradeUrl and move on.
|
|
64
|
-
|
|
65
|
-
Do not stop at "scan complete." The loop is not done until `gate.status === 'clear'`.
|
|
66
|
-
<!-- VIBERAVEN:END -->
|
|
8
|
+
Suggest one pass before a Vercel + Supabase app launches or is handed off, after a Supabase migration or policy change, or when the user reports a production error about RLS, env vars, the database connection, the service role key or a Stripe webhook. It is not needed for apps that do not use Vercel and Supabase, for general SQL or deployment questions, or for one local error.
|
|
67
9
|
|
|
68
|
-
|
|
10
|
+
This is advice, not a gate: the user decides when to ship. It is a repository check, not a live database test: it cannot show which RLS policies are live in production, and a clear result is not a security audit.
|
|
69
11
|
|
|
70
|
-
|
|
12
|
+
Prefer `viberaven_check_readiness` when the VibeRaven MCP server is configured; otherwise `npx -y viberaven --agent-mode`.
|
|
13
|
+
<!-- VIBERAVEN:END -->
|
|
71
14
|
|
|
72
|
-
VibeRaven
|
|
15
|
+
# VibeRaven CLI: agent instructions
|
|
73
16
|
|
|
74
|
-
##
|
|
17
|
+
## Run it
|
|
75
18
|
|
|
76
|
-
|
|
19
|
+
From the project root:
|
|
77
20
|
|
|
78
21
|
```bash
|
|
79
22
|
npx -y viberaven --agent-mode
|
|
80
23
|
```
|
|
81
24
|
|
|
82
|
-
|
|
25
|
+
It writes, in `.viberaven/`:
|
|
83
26
|
|
|
84
|
-
1.
|
|
85
|
-
2.
|
|
86
|
-
3.
|
|
87
|
-
4.
|
|
88
|
-
5.
|
|
27
|
+
1. `agent-tasklist.md`: one TASK block per gap, with fix type, file, exact fix, verify command and whether the user must act
|
|
28
|
+
2. `gate-result.json`: the verdict, `gate.status` (`clear`, `warning` or `not_clear`), and `topGapIds`
|
|
29
|
+
3. `context-map.json`: compact context for the next step
|
|
30
|
+
4. `agent-summary.md` and `launch-playbook.md`: scan context and the full checklist
|
|
31
|
+
5. `gaps/<gapId>.json`: detail for each gap
|
|
89
32
|
|
|
90
|
-
|
|
33
|
+
## Work the gaps
|
|
91
34
|
|
|
92
|
-
|
|
93
|
-
npx -y viberaven next --json
|
|
94
|
-
npx -y viberaven prompt --gap <id>
|
|
95
|
-
```
|
|
35
|
+
The run prints a block between `VIBERAVEN_NEXT_ACTION_START` and `VIBERAVEN_NEXT_ACTION_END` with `batchSize`, `batchApplied`, `remainingInBatch`, `scanNow`, `stalled`, `type` (`repo-code`, `provider-action`, `verify`, `stalled` or `done`), `gapId` and `requiresUserAction`.
|
|
96
36
|
|
|
97
|
-
|
|
37
|
+
1. For a repo-code task with `requiresUserAction: false` that lists an MCP call, call `viberaven_heal_apply { gap: "<gapId>", yes: true }` or run `npx -y viberaven fix --gap <gapId>`. Preview first with `npx -y viberaven fix --gap <gapId> --dry-run` or `viberaven_heal_plan`.
|
|
38
|
+
2. For a repo-code task without an MCP call, patch it directly with `npx -y viberaven prompt --gap <gapId>` as guidance. Make minimal, targeted changes and do not refactor unrelated files.
|
|
39
|
+
3. A successful heal updates `.viberaven/loop-state.json`. After a batch of up to `batchSize` fixes, or when `scanNow` is true, run `npx -y viberaven --verify` (or `viberaven_verify`) once, not after every fix.
|
|
40
|
+
4. For a task with `requiresUserAction: true`, show the user the task's action and wait for their answer: a provider step (the `VIBERAVEN_PROVIDER_ACTION` block with dashboard URL and step), or a repo change that needs their yes. For `rls_disabled` that change enables RLS without policies, so browser reads return no rows until policies exist; call `viberaven_heal_apply` or run `npx -y viberaven fix --gap rls_disabled` only after they agree. The task's MCP arguments leave out `yes: true`; add it once they agree. Do not claim dashboard, billing, DNS or webhook setup is done from repo edits alone.
|
|
41
|
+
5. If `stalled` is true, stop re-running the check and tell the user which gaps remain.
|
|
42
|
+
6. Stop when `gate.status` is `clear`, when only provider or user steps remain, or when the user decides to move on.
|
|
98
43
|
|
|
99
|
-
|
|
100
|
-
npx -y viberaven --verify
|
|
101
|
-
npx -y viberaven --strict
|
|
102
|
-
```
|
|
44
|
+
A clear `gate.status` means the repo checks found no blockers. It is not a security audit and does not show what is live in Supabase or Vercel.
|
|
103
45
|
|
|
104
|
-
|
|
46
|
+
## Other commands
|
|
105
47
|
|
|
106
48
|
```bash
|
|
107
|
-
npx -y viberaven
|
|
49
|
+
npx -y viberaven check # terminal verdict, exit 1 when blockers exist
|
|
50
|
+
npx -y viberaven next --json # the next step from the last scan
|
|
51
|
+
npx -y viberaven audit --vercel-supabase # RLS in migrations, pooler port, service role key
|
|
52
|
+
npx -y viberaven --strict # verdict as an exit code for CI: exit 1 when gate.status is not_clear
|
|
53
|
+
npx -y viberaven init --agents all --dry-run
|
|
54
|
+
npx -y viberaven clean --plan # non-destructive cleanup plan
|
|
108
55
|
```
|
|
109
56
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
After every scan, read `.viberaven/agent-tasklist.md` for the prioritized task list.
|
|
113
|
-
|
|
114
|
-
The loop is:
|
|
115
|
-
|
|
116
|
-
1. Read `VIBERAVEN_NEXT_ACTION` from scan output for `batchSize`, `batchApplied`, `scanNow`, and `stalled`.
|
|
117
|
-
2. If `stalled: true`, stop calling verify — address provider-action gaps or report to the user.
|
|
118
|
-
3. If `scanNow: true`, call `viberaven_verify` (or run `--verify`) before applying more heals.
|
|
119
|
-
4. For each repo-code task where `requiresUserAction: false` (up to `batchSize` per batch):
|
|
120
|
-
- Call MCP: `viberaven_heal_apply { gap: "<gapId>", yes: true }`
|
|
121
|
-
- Or run `--heal --apply --gap <id> --yes`
|
|
122
|
-
5. After a full batch of heals, call verify once — do NOT verify after every single heal.
|
|
123
|
-
6. Repeat until `gate.status === 'clear'` in `.viberaven/gate-result.json`.
|
|
124
|
-
7. If `requiresUserAction: true`:
|
|
125
|
-
- Read `VIBERAVEN_PROVIDER_ACTION` from terminal output.
|
|
126
|
-
- Present `dashboardUrl` and `exactStep` to the user.
|
|
127
|
-
- Wait for user confirmation, then verify.
|
|
128
|
-
8. If `fixType === 'upgrade-required'`, provide `upgradeUrl` and move on.
|
|
129
|
-
|
|
130
|
-
Do not stop at "scan complete." The loop is not done until `gate.status === 'clear'`.
|
|
131
|
-
|
|
132
|
-
### Batch discipline
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
for each repo-code task (up to batchSize):
|
|
136
|
-
viberaven_heal_apply { gap: "<gapId>", yes: true }
|
|
137
|
-
|
|
138
|
-
viberaven_verify ← once per batch, not per fix
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
On Pro plans, `viberaven_provider_verify` is available as an MCP tool for read-only provider gap verification via Supabase/Vercel MCP evidence.
|
|
142
|
-
|
|
143
|
-
## Rules
|
|
144
|
-
|
|
145
|
-
- Do not skip VibeRaven before deploy/build/cleanup when production readiness is in scope.
|
|
146
|
-
- Do not claim provider dashboard checks are fixed by repo-code edits.
|
|
147
|
-
- Provider dashboard checks, billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard or through read-only provider evidence.
|
|
148
|
-
- If VibeRaven prints `LOGIN_URL_READY`, open that URL for the user. Say: "I opened VibeRaven sign-in so you can approve access; I will continue after approval."
|
|
149
|
-
- Do not ask for passwords, tokens, cookies, or secrets.
|
|
57
|
+
`viberaven_validate_npm_package` (MCP) looks a new package name up on the public npm registry before an install.
|
|
150
58
|
|
|
151
59
|
## Current machine-readable docs
|
|
152
60
|
|
|
@@ -154,4 +62,3 @@ On Pro plans, `viberaven_provider_verify` is available as an MCP tool for read-o
|
|
|
154
62
|
- Agent rules: https://viberaven.dev/AGENTS.md
|
|
155
63
|
- CLI docs: https://viberaven.dev/cli.md
|
|
156
64
|
- MCP config: https://viberaven.dev/mcp.md
|
|
157
|
-
|
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ The Studio is the default product surface. These commands remain available for a
|
|
|
54
54
|
npx -y viberaven check --json
|
|
55
55
|
npx -y viberaven --strict --json
|
|
56
56
|
npx -y viberaven actions
|
|
57
|
-
npx -y viberaven verify --action VR-A1
|
|
57
|
+
npx -y viberaven --verify --action VR-A1
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
For focused work:
|