@getripple/cli 1.0.4 → 1.0.6

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @getripple/cli Changelog
2
2
 
3
+ ## [1.0.6] - 2026-06-07
4
+
5
+ ### Fixed
6
+ - Depend on the `1.0.6` core engine so CLI readiness output explains blocked Git execution clearly.
7
+ - Keep install and release proofs aligned with the fixed package set.
8
+
9
+ ## [1.0.5] - 2026-06-04
10
+
11
+ ### Changed
12
+ - Refresh package README wording for npm users.
13
+ - Restore the first-run `npx -y @getripple/cli doctor` readiness command.
14
+ - Clarify the plan/check/gate workflow, control modes, CI gate behavior, and local privacy posture.
15
+
3
16
  ## [1.0.4] - 2026-06-03
4
17
 
5
18
  ### Fixed
package/README.md CHANGED
@@ -1,15 +1,37 @@
1
1
  # @getripple/cli
2
2
 
3
- Run Ripple's architecture checks in your terminal and CI pipeline without VS Code.
3
+ Plan before edit. Check after edit. Catch drift. Tell the agent what to fix.
4
4
 
5
- ```bash
6
- npx -y @getripple/cli plan --file src/auth.ts --task "refactor token handling"
5
+ **Terminal and CI interface for Ripple's local drift-control gate for AI coding agents.**
6
+
7
+ `@getripple/cli` is the command-line interface for Ripple. Use it when you want to plan before an AI coding agent edits, check after edit, catch drift, and tell the agent what to fix.
8
+
9
+ Ripple helps agents work inside a human-approved boundary:
10
+
11
+ ```txt
12
+ plan before edit
13
+ save intent
14
+ check after edit
15
+ catch drift
16
+ tell the agent what to fix
17
+ continue / repair / human review
18
+ ```
19
+
20
+ The CLI is best for:
21
+
22
+ ```txt
23
+ terminal workflows
24
+ CI gates
25
+ release checks
26
+ local repo scanning
27
+ human-controlled agent workflows
7
28
  ```
8
29
 
9
- Ripple is a local AI-agent workflow engine: plan before edit, check after edit,
10
- catch drift, and tell the agent what to fix.
30
+ For MCP-compatible AI agents, use `@getripple/mcp`.
11
31
 
12
- ## Quick Start
32
+ ---
33
+
34
+ ## 60-Second Start
13
35
 
14
36
  Initialize Ripple in a repo:
15
37
 
@@ -17,26 +39,99 @@ Initialize Ripple in a repo:
17
39
  npx -y @getripple/cli init
18
40
  ```
19
41
 
20
- Create a saved plan before editing:
42
+ Create a saved intent before editing:
21
43
 
22
44
  ```bash
23
- npx -y @getripple/cli plan --file src/auth.ts --task "refactor token handling" --mode file --save
45
+ npx -y @getripple/cli plan \
46
+ --file src/auth.ts \
47
+ --task "refactor token handling" \
48
+ --mode file \
49
+ --agent \
50
+ --save
24
51
  ```
25
52
 
26
- After editing and staging files, check the change against the saved plan:
53
+ Let your AI coding agent edit the code, then stage the intended files:
27
54
 
28
55
  ```bash
29
- npx -y @getripple/cli check --staged --intent latest
56
+ git add src/auth.ts
30
57
  ```
31
58
 
32
- For the smallest continue/stop answer:
59
+ Ask Ripple whether work may continue:
33
60
 
34
61
  ```bash
35
62
  npx -y @getripple/cli gate --intent latest
36
63
  ```
37
64
 
65
+ If the agent stayed inside the saved plan, Ripple returns:
66
+
67
+ ```txt
68
+ continue
69
+ ```
70
+
71
+ If the agent crossed the boundary, Ripple returns:
72
+
73
+ ```txt
74
+ repair
75
+ ```
76
+
77
+ or:
78
+
79
+ ```txt
80
+ human-review
81
+ ```
82
+
83
+ with the exact reason and next action.
84
+
85
+ ---
86
+
87
+ ## Why This Exists
88
+
89
+ AI coding agents can edit quickly.
90
+
91
+ The hard question is not only:
92
+
93
+ ```txt
94
+ Is the code good?
95
+ ```
96
+
97
+ The deeper question is:
98
+
99
+ ```txt
100
+ Was the agent allowed to make this change?
101
+ ```
102
+
103
+ Ripple keeps a local record of what the human approved, then checks the actual staged changes against that approval.
104
+
105
+ Example:
106
+
107
+ ```txt
108
+ Approved:
109
+ - src/auth.ts
110
+
111
+ Agent changed:
112
+ - src/auth.ts
113
+ - src/payments/webhook.ts
114
+
115
+ Ripple:
116
+ human-review — agent changed a file outside the approved boundary
117
+ ```
118
+
119
+ Ripple does not replace tests, code review, or human judgment.
120
+
121
+ Ripple checks whether the agent stayed inside the work it was trusted to do.
122
+
123
+ ---
124
+
38
125
  ## Install
39
126
 
127
+ Use with `npx`:
128
+
129
+ ```bash
130
+ npx -y @getripple/cli doctor
131
+ ```
132
+
133
+ Or install globally:
134
+
40
135
  ```bash
41
136
  npm install -g @getripple/cli
42
137
  ```
@@ -45,65 +140,430 @@ Then run:
45
140
 
46
141
  ```bash
47
142
  ripple init
48
- ripple plan --file src/auth.ts --task "refactor token handling" --mode file --save
49
- ripple check --staged --intent latest
143
+ ripple doctor
144
+ ripple plan --file src/auth.ts --task "refactor token handling" --mode file --agent --save
145
+ ripple check --staged --agent --intent latest
50
146
  ripple gate --intent latest
51
147
  ```
52
148
 
53
- Check setup readiness:
149
+ ---
150
+
151
+ ## Core Workflow
152
+
153
+ ```txt
154
+ 1. Initialize Ripple
155
+ 2. Plan before edit
156
+ 3. Save the human-approved intent
157
+ 4. Let the agent edit
158
+ 5. Stage the intended files
159
+ 6. Check after edit
160
+ 7. Catch drift
161
+ 8. Tell the agent what to fix
162
+ 9. Continue, repair, or ask the human
163
+ ```
164
+
165
+ ---
166
+
167
+ ## 1. Initialize
54
168
 
55
169
  ```bash
56
- npx -y @getripple/cli doctor
170
+ ripple init
171
+ ```
172
+
173
+ Creates local workflow and CI files:
174
+
175
+ ```txt
176
+ .ripple/policy.json repo trust defaults
177
+ .github/workflows/ripple.yml GitHub Actions gate
178
+ .gitignore .ripple/.cache/ hygiene
179
+ .ripple/.cache/graph.cache.json local graph cache after scan
180
+ ```
181
+
182
+ Normal CLI `scan`, `check`, and `gate` runs stay lean. They do not dump broad agent files unless you ask.
183
+
184
+ Generate file-based agent instructions explicitly:
185
+
186
+ ```bash
187
+ ripple workflow
188
+ ```
189
+
190
+ MCP-capable agents should prefer `@getripple/mcp` instead of reading generated files.
191
+
192
+ ---
193
+
194
+ ## 2. Plan Before Edit
195
+
196
+ ```bash
197
+ ripple plan \
198
+ --file src/auth.ts \
199
+ --task "refactor token handling" \
200
+ --mode file \
201
+ --agent \
202
+ --save
203
+ ```
204
+
205
+ This creates a saved intent.
206
+
207
+ The saved intent tells Ripple:
208
+
209
+ ```txt
210
+ what task was approved
211
+ which file or symbol may change
212
+ which files are context only
213
+ which tests should be verified
214
+ which human gate applies
215
+ ```
216
+
217
+ The saved intent becomes the trust boundary for the agent's work.
218
+
219
+ ---
220
+
221
+ ## 3. Check After Edit
222
+
223
+ After the agent edits code and you stage the intended files:
224
+
225
+ ```bash
226
+ git add src/auth.ts
227
+ ripple check --staged --agent --intent latest
228
+ ```
229
+
230
+ For the compact continue/stop decision:
231
+
232
+ ```bash
233
+ ripple gate --intent latest
234
+ ```
235
+
236
+ `ripple gate` answers one question:
237
+
238
+ ```txt
239
+ Can the agent continue?
240
+ ```
241
+
242
+ ---
243
+
244
+ ## 4. Catch Drift
245
+
246
+ Ripple checks two forms of drift:
247
+
248
+ ```txt
249
+ intent drift -> did the edit leave the saved task?
250
+ boundary drift -> did the edit cross the chosen freedom level?
251
+ ```
252
+
253
+ If the agent stayed inside the approved work, Ripple allows the workflow to continue.
254
+
255
+ If the agent crossed the approved work, Ripple returns a repair or human-review decision.
256
+
257
+ ---
258
+
259
+ ## 5. Tell the Agent What to Fix
260
+
261
+ When drift is found, Ripple gives the agent a concrete handoff:
262
+
263
+ ```txt
264
+ what changed
265
+ why it is risky
266
+ what must be undone
267
+ what needs verification
268
+ when to ask the human
57
269
  ```
58
270
 
271
+ For detailed repair actions:
272
+
273
+ ```bash
274
+ ripple repair --agent --intent latest
275
+ ```
276
+
277
+ Repair may tell the agent to:
278
+
279
+ ```txt
280
+ unstage an unplanned file
281
+ undo a symbol outside the approved boundary
282
+ review a possible public contract change
283
+ run a verification target
284
+ create a wider intent if the task expanded
285
+ ask the human for approval
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Trust Boundaries
291
+
292
+ Choose how much freedom the agent gets when you plan:
293
+
294
+ | Mode | Boundary |
295
+ | ------------ | -------------------------------------------- |
296
+ | `brainstorm` | No edits allowed. Suggest and explain only. |
297
+ | `function` | Only the approved symbol may change. |
298
+ | `file` | Only the selected file may change. |
299
+ | `task` | Files in the saved task plan may change. |
300
+ | `pr` | Full task scope. Human reviews before merge. |
301
+
302
+ Example function boundary:
303
+
304
+ ```bash
305
+ ripple plan \
306
+ --file src/auth.ts \
307
+ --symbol refreshToken \
308
+ --task "fix retry behavior" \
309
+ --mode function \
310
+ --agent \
311
+ --save
312
+ ```
313
+
314
+ If `function` mode approves only `refreshToken` but the agent also changes `login`, Ripple stops the workflow and tells the agent what to fix.
315
+
316
+ ---
317
+
318
+ ## Gate Decisions
319
+
320
+ `ripple gate` is the command an agent or CI system should obey:
321
+
322
+ ```bash
323
+ ripple gate --intent latest
324
+ ```
325
+
326
+ Example output:
327
+
328
+ ```txt
329
+ STOP: agent crossed approved function boundary.
330
+
331
+ Allowed:
332
+ - src/auth.ts::refreshToken
333
+
334
+ Changed outside boundary:
335
+ - src/auth.ts::login
336
+
337
+ Fix:
338
+ - undo src/auth.ts::login
339
+ - or create a wider human-approved intent
340
+ ```
341
+
342
+ Machine-readable output includes:
343
+
344
+ ```json
345
+ {
346
+ "status": "closed",
347
+ "decision": "human-review",
348
+ "canContinue": false,
349
+ "mustStop": true,
350
+ "needsHuman": true,
351
+ "why": ["Changed symbol outside approved boundary: src/auth.ts::login"],
352
+ "fixNow": ["Undo src/auth.ts::login or replan with human approval."]
353
+ }
354
+ ```
355
+
356
+ Agent rule:
357
+
358
+ ```txt
359
+ canContinue=true -> continue after required verification
360
+ mustStop=true -> stop and follow fixNow
361
+ needsHuman=true -> ask the human; do not self-approve
362
+ ```
363
+
364
+ ---
365
+
366
+ ## Check and Repair
367
+
368
+ For detailed drift information:
369
+
370
+ ```bash
371
+ ripple check --staged --agent --intent latest
372
+ ```
373
+
374
+ For concrete repair actions:
375
+
376
+ ```bash
377
+ ripple repair --agent --intent latest
378
+ ```
379
+
380
+ Use `check` when you want evidence.
381
+
382
+ Use `gate` when you want a compact decision.
383
+
384
+ Use `repair` when the agent needs exact next actions.
385
+
386
+ ---
387
+
59
388
  ## CI Gate
60
389
 
61
- Generate a GitHub Actions workflow:
390
+ Generate the workflow:
62
391
 
63
392
  ```bash
64
393
  ripple init-ci
65
394
  ```
66
395
 
67
- Use Ripple as a pull-request gate:
396
+ Run the gate in CI:
68
397
 
69
398
  ```bash
70
399
  ripple ci --base origin/main --intent latest --github-annotations
71
400
  ```
72
401
 
73
- The gate speaks the same compact language used by CLI and MCP:
402
+ The CI gate emits GitHub annotations for:
74
403
 
75
404
  ```txt
76
- open/continue
77
- closed/repair
78
- closed/human-review
79
- closed/restore-readiness
405
+ intent drift
406
+ boundary drift
407
+ contract drift
408
+ policy drift
409
+ readiness drift
80
410
  ```
81
411
 
82
- ## Commands
412
+ It exits non-zero when work must not merge.
413
+
414
+ ---
415
+
416
+ ## Useful Commands
83
417
 
84
418
  ```txt
85
- ripple scan
86
- ripple focus
87
- ripple blast
88
- ripple plan
89
- ripple check
90
- ripple audit
91
- ripple repair
92
- ripple gate
93
- ripple doctor
94
- ripple agent
95
- ripple init
96
- ripple init-ci
419
+ ripple init initialize policy, CI, git hygiene, and graph cache
420
+ ripple doctor check project readiness
421
+ ripple scan refresh the local graph cache
422
+ ripple workflow generate .ripple/WORKFLOW.md for file-based agents
423
+ ripple plan plan context before editing and optionally save intent
424
+ ripple check check staged or changed files against saved intent
425
+ ripple audit audit a completed change for drift signals
426
+ ripple repair get concrete repair actions
427
+ ripple gate compact continue/stop decision
428
+ ripple approval check saved human gate status
429
+ ripple approve record human approval for a gate
430
+ ripple ci run the CI gate against a base ref
431
+ ripple agent print the agent workflow guide
432
+ ripple focus show focused context for a file
433
+ ripple blast show files affected by a target file
434
+ ripple imports show files imported by a target file
435
+ ripple importers show files that import a target file
436
+ ripple symbols show exported symbols for a file
437
+ ripple callers show callers of a symbol
438
+ ripple history show recent architectural history
439
+ ripple policy init create repo trust policy
440
+ ripple policy explain explain active policy for a file
441
+ ```
442
+
443
+ ---
444
+
445
+ ## Example Agent Loop
446
+
447
+ A safe CLI-based agent workflow should look like this:
448
+
449
+ ```txt
450
+ 1. Run ripple doctor
451
+ 2. Run ripple plan with --save
452
+ 3. Read the suggested context
453
+ 4. Edit only inside the approved boundary
454
+ 5. Stage the intended files
455
+ 6. Run ripple check --staged
456
+ 7. Run ripple gate
457
+ 8. Continue, repair, or stop based on the gate
458
+ ```
459
+
460
+ If `mustStop=true`, the agent must stop.
461
+
462
+ If `needsHuman=true`, the agent must ask the human.
463
+
464
+ If `canContinue=true`, the agent may continue only after required verification passes.
465
+
466
+ ---
467
+
468
+ ## Local Files
469
+
470
+ Ripple may create local workflow state in the target repo:
471
+
472
+ ```txt
473
+ .ripple/policy.json
474
+ .ripple/history.json
475
+ .ripple/intents/latest.json
476
+ .ripple/approvals/
477
+ .ripple/.cache/
478
+ .github/workflows/ripple.yml
479
+ ```
480
+
481
+ Recommended git behavior:
482
+
483
+ ```txt
484
+ commit: .ripple/policy.json
485
+ commit: .github/workflows/ripple.yml
486
+ commit: .ripple/intents/ only if your team wants saved intent records
487
+ ignore: .ripple/.cache/
488
+ ```
489
+
490
+ `.ripple/.cache/` is machine cache.
491
+
492
+ Policy, CI, intents, and approvals are workflow/audit state.
493
+
494
+ ---
495
+
496
+ ## MCP
497
+
498
+ For MCP-compatible AI agents, use:
499
+
500
+ ```bash
501
+ npx -y @getripple/mcp --workspace /absolute/path/to/your/repo
502
+ ```
503
+
504
+ The CLI is best for terminal, CI, scripts, and human-controlled workflows.
505
+
506
+ The MCP server is best when the agent should call Ripple tools directly.
507
+
508
+ ---
509
+
510
+ ## Language Support
511
+
512
+ Strongest today:
513
+
514
+ ```txt
515
+ JavaScript
516
+ TypeScript
517
+ ```
518
+
519
+ Basic support:
520
+
521
+ ```txt
522
+ Python imports
523
+ Python functions
524
+ Python classes
525
+ Python methods
526
+ file-level staged checks
97
527
  ```
98
528
 
529
+ ---
530
+
99
531
  ## Privacy
100
532
 
101
- Ripple runs locally. No account, telemetry, cloud indexing, or remote model call
102
- is required by the CLI.
533
+ Ripple runs locally.
534
+
535
+ ```txt
536
+ No account required
537
+ No telemetry
538
+ No cloud indexing
539
+ No code upload
540
+ No remote model call required
541
+ ```
542
+
543
+ Your repo is scanned on your machine.
544
+
545
+ ---
103
546
 
104
547
  ## Status
105
548
 
106
- Public alpha. The strongest current experience is JavaScript and TypeScript.
549
+ Public alpha.
550
+
551
+ Ripple is a strong local signal and gate.
552
+
553
+ It is not:
554
+
555
+ ```txt
556
+ a sandbox
557
+ a test replacement
558
+ a typechecker replacement
559
+ a code review replacement
560
+ a CI replacement
561
+ a human judgment replacement
562
+ ```
563
+
564
+ Ripple helps you check whether an AI coding agent stayed inside the work it was trusted to do.
565
+
566
+ ---
107
567
 
108
568
  ## License
109
569