vivekmind 0.15.7 → 1.0.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/LICENSE +1 -2
- package/README.md +34 -15
- package/bundled/qc-helper/SKILL.md +2 -2
- package/bundled/review/DESIGN.md +2 -2
- package/bundled/review/SKILL.md +18 -18
- package/cli.js +330 -267
- package/locales/ca.js +10 -10
- package/locales/de.js +10 -10
- package/locales/en.js +10 -10
- package/locales/fr.js +8 -8
- package/locales/ja.js +8 -8
- package/locales/pt.js +10 -10
- package/locales/ru.js +10 -10
- package/locales/zh-TW.js +10 -10
- package/locales/zh.js +10 -10
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -187,8 +187,7 @@
|
|
|
187
187
|
same "printed page" as the copyright notice for easier
|
|
188
188
|
identification within third-party archives.
|
|
189
189
|
|
|
190
|
-
Copyright
|
|
191
|
-
Copyright 2025 Qwen
|
|
190
|
+
Copyright 2026 VivekMind (https://code.vivekmind.com)
|
|
192
191
|
|
|
193
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
193
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
VivekMind is a
|
|
21
|
+
VivekMind CLI is a powerful, provider-flexible AI coding assistant that lives entirely inside your terminal. It features native AWS Bedrock integration, multi-model capability (20+ providers supported), and a rich extensible architecture built around tools, skills, subagents, and Model Context Protocol (MCP) servers.
|
|
22
22
|
|
|
23
23
|
Install it, point it at any model, and start coding — all from your shell.
|
|
24
24
|
|
|
@@ -50,7 +50,7 @@ VivekMind supports a wide range of AI providers out of the box. Set the correspo
|
|
|
50
50
|
|
|
51
51
|
| Provider | Auth Type | Example Models |
|
|
52
52
|
|----------|-----------|----------------|
|
|
53
|
-
| **AWS Bedrock** | `bedrock` | Claude (3/3.5/4.7), Amazon Nova (Pro/Lite/Micro), Llama (3/3.1/3.3/4),
|
|
53
|
+
| **AWS Bedrock** | `bedrock` | Claude (3/3.5/4.7), Amazon Nova (Pro/Lite/Micro), Llama (3/3.1/3.3/4), VivekMind CLIr, GLM, Mistral, Cohere |
|
|
54
54
|
| **Anthropic** | `anthropic` | Claude Opus 4.7, Sonnet 4.6, Haiku 4.5 |
|
|
55
55
|
| **Google Gemini** | `gemini` | Gemini 3 Pro, 2.5 Pro, 2.5 Flash |
|
|
56
56
|
| **OpenAI** | `openai` | GPT-5.2, 5.4 Mini, 4.1, o3, o4-mini |
|
|
@@ -58,7 +58,7 @@ VivekMind supports a wide range of AI providers out of the box. Set the correspo
|
|
|
58
58
|
| **Anthropic (Vertex AI)** | `anthropic-vertex-ai` | Claude Opus 4.7 (Vertex) |
|
|
59
59
|
| **DeepSeek** | `deepseek` | DeepSeek Chat V3, DeepSeek Reasoner R1 |
|
|
60
60
|
| **Mistral AI** | `mistral` | Mistral Large, Codestral, Pixtral Large |
|
|
61
|
-
| **Alibaba DashScope** | `dashscope` |
|
|
61
|
+
| **Alibaba DashScope** | `dashscope` | VivekMind3 Coder Plus, VivekMind VL Max |
|
|
62
62
|
| **xAI (Grok)** | `xai` | Grok 4 |
|
|
63
63
|
| **OpenRouter** | `openrouter` | Claude Opus 4.7 (OpenRouter) |
|
|
64
64
|
| **Groq** | `groq` | Llama 3.3 70B (Groq) |
|
|
@@ -75,7 +75,7 @@ VivekMind supports a wide range of AI providers out of the box. Set the correspo
|
|
|
75
75
|
|
|
76
76
|
### AWS Bedrock Setup
|
|
77
77
|
|
|
78
|
-
AWS Bedrock works with your existing AWS credentials. No additional API key is needed. VivekMind supports the full list of AWS Bedrock models, including **Anthropic Claude** (3/3.5/4.7), **Amazon Nova** (Pro/Lite/Micro), **Meta Llama** (3/3.3/4), **
|
|
78
|
+
AWS Bedrock works with your existing AWS credentials. No additional API key is needed. VivekMind supports the full list of AWS Bedrock models, including **Anthropic Claude** (3/3.5/4.7), **Amazon Nova** (Pro/Lite/Micro), **Meta Llama** (3/3.3/4), **VivekMind CLIr** models, **GLMs**, **Mistral**, and **Cohere Command**:
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
81
|
# Ensure AWS credentials are set
|
|
@@ -143,7 +143,8 @@ Over 40 built-in commands for session control, configuration, and workflow manag
|
|
|
143
143
|
|
|
144
144
|
```
|
|
145
145
|
/model Switch AI model
|
|
146
|
-
/
|
|
146
|
+
/context Show context window usage breakdown (add "detail" for per-item)
|
|
147
|
+
/compress Compress chat history to save context (shows % saved)
|
|
147
148
|
/clear Clear conversation
|
|
148
149
|
/memory Open memory manager
|
|
149
150
|
/remember Save info to memory
|
|
@@ -260,6 +261,7 @@ vivekmind -p "refactor module" --output stream-json
|
|
|
260
261
|
|
|
261
262
|
### Additional Features
|
|
262
263
|
|
|
264
|
+
- **Context Compression** — Aggressive multi-layer compression system that reduces token usage by 80-95% on long sessions, minimizing AWS Bedrock costs. Combines LLM-based summarization, microcompaction (automatic old tool output clearing), and output pruning to keep 100k+ token sessions within budget. Triggered automatically at 70% context usage or manually via `/compress`.
|
|
263
265
|
- **Sandbox** — Docker and Podman sandbox support for safe code execution
|
|
264
266
|
- **LSP Integration** — Language Server Protocol for code intelligence
|
|
265
267
|
- **Extensions** — Install community extensions from GitHub or npm
|
|
@@ -275,6 +277,33 @@ vivekmind -p "refactor module" --output stream-json
|
|
|
275
277
|
|
|
276
278
|
---
|
|
277
279
|
|
|
280
|
+
## Token Optimization
|
|
281
|
+
|
|
282
|
+
VivekMind includes a comprehensive token optimization system designed to minimize API costs, especially important for AWS Bedrock users who pay per token.
|
|
283
|
+
|
|
284
|
+
### How It Works
|
|
285
|
+
|
|
286
|
+
The compression system operates on three layers:
|
|
287
|
+
|
|
288
|
+
1. **Microcompaction (automatic)** — Before every API turn, old tool results (file reads, shell output, grep results) that are no longer relevant are replaced with a one-line placeholder. This is triggered by either idle time (>60 min) or when tool outputs consume more than 20% of the context window. The most recent 3 results are preserved.
|
|
289
|
+
|
|
290
|
+
2. **Output Pruning (automatic)** — When building the compression prompt, high-volume tool outputs (file reads, shell, grep, glob, etc.) are aggressively truncated to 80 characters per tool in the history being summarized. This prevents the compression LLM call itself from bloating.
|
|
291
|
+
|
|
292
|
+
3. **LLM-Based Compression (automatic + manual)** — When context usage exceeds 70% of the model's context window, the entire conversation history (except the most recent 5%) is sent to the LLM to produce a structured XML `<state_snapshot>` containing: overall goal, key knowledge, user preferences, file system state, unresolved bugs, recent actions, and current plan. The summary is capped at 1024 output tokens. Manual trigger via `/compress` uses a 3% preserve threshold for more aggressive compression.
|
|
293
|
+
|
|
294
|
+
### Context Usage Display
|
|
295
|
+
|
|
296
|
+
The footer shows real-time context window usage as a percentage with the actual token count (e.g., `45.2% context used (181.2k/200k tok)`). The `/context` command shows a detailed breakdown by category: system prompt, built-in tools, MCP tools, memory files, skills, and messages.
|
|
297
|
+
|
|
298
|
+
### Cost Impact
|
|
299
|
+
|
|
300
|
+
For a typical 100k-token session on AWS Bedrock (Claude Sonnet):
|
|
301
|
+
- **Without compression**: Every turn sends the full 100k+ tokens, costing ~$1.50/turn
|
|
302
|
+
- **With compression**: History is summarized to ~3-5k tokens after the 70% threshold, reducing per-turn cost by 80-95% for subsequent turns
|
|
303
|
+
- **Microcompaction alone**: Clears 40-60% of historical tool output bloat before it reaches the LLM
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
278
307
|
## Configuration
|
|
279
308
|
|
|
280
309
|
### Settings
|
|
@@ -373,16 +402,6 @@ npm run lint
|
|
|
373
402
|
npm run preflight
|
|
374
403
|
```
|
|
375
404
|
|
|
376
|
-
---
|
|
377
|
-
|
|
378
|
-
## Attribution
|
|
379
|
-
|
|
380
|
-
VivekMind is a fork of [Qwen Code](https://github.com/QwenLM/qwen-code), originally developed by Google LLC and Alibaba Cloud.
|
|
381
|
-
|
|
382
|
-
Qwen Code is copyright (C) 2025 Google LLC and Alibaba Cloud, and is used under the Apache License, Version 2.0.
|
|
383
|
-
|
|
384
|
-
VivekMind modifications are copyright (C) 2026 [VivekMind](https://code.vivekmind.com).
|
|
385
|
-
|
|
386
405
|
## License
|
|
387
406
|
|
|
388
407
|
This project is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
|
|
@@ -41,7 +41,7 @@ Use this index to locate the right document for the user's question. Load only t
|
|
|
41
41
|
| Settings reference (all config keys) | `docs/configuration/settings.md` |
|
|
42
42
|
| Authentication setup | `docs/configuration/auth.md` |
|
|
43
43
|
| Model providers (OpenAI-compatible, etc.) | `docs/configuration/model-providers.md` |
|
|
44
|
-
| .vivekmindignore file | `docs/configuration/
|
|
44
|
+
| .vivekmindignore file | `docs/configuration/vivekmind-ignore.md` |
|
|
45
45
|
| Themes | `docs/configuration/themes.md` |
|
|
46
46
|
| Memory | `docs/configuration/memory.md` |
|
|
47
47
|
| Trusted folders | `docs/configuration/trusted-folders.md` |
|
|
@@ -103,7 +103,7 @@ When the user asks about configuration, the primary reference is `docs/configura
|
|
|
103
103
|
| ------- | ------------------------------------------------------------ | -------------------------------------- |
|
|
104
104
|
| User | `~/.vivekmind/settings.json` | Personal global config |
|
|
105
105
|
| Project | `<project>/.vivekmind/settings.json` | Project-specific, overrides user level |
|
|
106
|
-
| System | macOS: `/Library/Application Support/
|
|
106
|
+
| System | macOS: `/Library/Application Support/VivekMindCode/settings.json` | Admin-level config |
|
|
107
107
|
|
|
108
108
|
**Priority** (highest to lowest): CLI args > env vars > system settings > project settings > user settings > defaults
|
|
109
109
|
|
package/bundled/review/DESIGN.md
CHANGED
|
@@ -149,7 +149,7 @@ Line-based classification was chosen because it's deterministic, cheap, and catc
|
|
|
149
149
|
- ❌ Adds two extra API calls (`check-runs` + `statuses`) per APPROVE-bound submit; only relevant for the `APPROVE` path so the cost is negligible.
|
|
150
150
|
- ❌ A genuinely flaky CI failure can downgrade what should have been an Approve. Mitigation: the body text directs the user to verify; they can always submit `APPROVE` manually after triaging.
|
|
151
151
|
|
|
152
|
-
## Why the deterministic checks live as `
|
|
152
|
+
## Why the deterministic checks live as `vivekmind review` subcommands
|
|
153
153
|
|
|
154
154
|
**Original behavior:** Step 9's three pre-submission checks (self-PR detection, CI status, existing-comment classification) and Step 11's cleanup were inlined in SKILL.md as `gh api` / `git` shell commands. The LLM ran each command itself, parsed the output, and applied the classification logic.
|
|
155
155
|
|
|
@@ -157,7 +157,7 @@ Line-based classification was chosen because it's deterministic, cheap, and catc
|
|
|
157
157
|
|
|
158
158
|
1. **Token cost**: each command, jq filter, classification rule, and output schema is part of the prompt — every `/review` invocation pays this cost.
|
|
159
159
|
2. **Drift risk**: the classification logic exists twice (in the prompt's English description, and in whatever the LLM internally synthesizes). When rules change (new check_run conclusion type, new comment bucket), both have to update or they drift.
|
|
160
|
-
3. **Cross-platform fragility**: `/tmp/
|
|
160
|
+
3. **Cross-platform fragility**: `/tmp/vivekmind-review-*` worked on macOS shell but Node's `os.tmpdir()` returned `/var/folders/...`. The mismatch only surfaced when the cleanup logic was tested.
|
|
161
161
|
4. **Testability**: prompt text isn't unit-testable. Logic that classifies CI states or comment buckets is the kind of thing that benefits from real assertions.
|
|
162
162
|
|
|
163
163
|
**Current behavior:** the deterministic logic lives in `packages/cli/src/commands/review/` as TypeScript subcommands of the `vivekmind` CLI:
|
package/bundled/review/SKILL.md
CHANGED
|
@@ -32,8 +32,8 @@ First, parse the `--comment` flag: split the arguments by whitespace, and if any
|
|
|
32
32
|
To disambiguate the argument type: if the argument is a pure integer, treat it as a PR number. If it's a URL containing `/pull/`, extract the owner/repo/number from the URL. Then determine if the local repo can access this PR:
|
|
33
33
|
|
|
34
34
|
1. Check if any git remote URL matches the URL's owner/repo: run `git remote -v` and look for a remote whose URL contains the owner/repo (e.g., `openjdk/jdk`). This handles forks — a local clone of `wenshao/jdk` with an `upstream` remote pointing to `openjdk/jdk` can still review `openjdk/jdk` PRs.
|
|
35
|
-
2. If a matching remote is found, proceed with the **normal worktree flow** — use that remote name (instead of hardcoded `origin`) for `git fetch <remote> pull/<number>/head:
|
|
36
|
-
3. If **no remote matches**, use **lightweight mode**: run `gh pr diff <url>` to get the diff directly. Skip Steps 2 (no local rules), 3 (no local linter), 8 (no local files to fix), 10 (no local cache). In Step 11, skip worktree removal (none was created) but still clean up temp files (`.vivekmind/tmp/
|
|
35
|
+
2. If a matching remote is found, proceed with the **normal worktree flow** — use that remote name (instead of hardcoded `origin`) for `git fetch <remote> pull/<number>/head:vivekmind-review/pr-<number>`. In Step 9, use the owner/repo from the URL for posting comments.
|
|
36
|
+
3. If **no remote matches**, use **lightweight mode**: run `gh pr diff <url>` to get the diff directly. Skip Steps 2 (no local rules), 3 (no local linter), 8 (no local files to fix), 10 (no local cache). In Step 11, skip worktree removal (none was created) but still clean up temp files (`.vivekmind/tmp/vivekmind-review-{target}-*`). Also fetch existing PR comments using the URL's owner/repo (`gh api repos/{owner}/{repo}/pulls/{number}/comments`) to avoid duplicating human feedback. In Step 9, use the owner/repo from the URL. Inform the user: "Cross-repo review: running in lightweight mode (no build/test, no linter, no autofix)."
|
|
37
37
|
|
|
38
38
|
Otherwise (not a URL, not an integer), treat the argument as a file path.
|
|
39
39
|
|
|
@@ -44,15 +44,15 @@ Based on the remaining arguments:
|
|
|
44
44
|
- If both diffs are empty, inform the user there are no changes to review and stop here — do not proceed to the review agents
|
|
45
45
|
|
|
46
46
|
- **PR number or same-repo URL** (e.g., `123` or a URL whose owner/repo matches the current repo — cross-repo URLs are handled by the lightweight mode above):
|
|
47
|
-
- **Run `vivekmind review fetch-pr`** to set up the working state in one pass — it cleans any stale worktree, fetches the PR HEAD into `
|
|
47
|
+
- **Run `vivekmind review fetch-pr`** to set up the working state in one pass — it cleans any stale worktree, fetches the PR HEAD into `vivekmind-review/pr-<n>`, queries `gh pr view` for metadata, and creates an ephemeral worktree at `.vivekmind/tmp/review-pr-<n>`:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
vivekmind review fetch-pr <pr_number> <owner>/<repo> \
|
|
51
51
|
--remote <remote> \
|
|
52
|
-
--out .vivekmind/tmp/
|
|
52
|
+
--out .vivekmind/tmp/vivekmind-review-pr-<pr_number>-fetch.json
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
`<remote>` is the matched remote from the URL-based detection above (e.g. `upstream` for fork workflows), or `origin` by default for pure integer PR numbers. Read `.vivekmind/tmp/
|
|
55
|
+
`<remote>` is the matched remote from the URL-based detection above (e.g. `upstream` for fork workflows), or `origin` by default for pure integer PR numbers. Read `.vivekmind/tmp/vivekmind-review-pr-<n>-fetch.json` for: `worktreePath`, `baseRefName`, `headRefName`, `fetchedSha` (use as the **pre-autofix HEAD commit SHA** for Step 9), `isCrossRepository`, `diffStat` (files / additions / deletions). If the command fails (auth, network, PR not found), inform the user and stop.
|
|
56
56
|
|
|
57
57
|
Worktree isolation: all subsequent steps (linting, agents, build/test, autofix) operate inside `worktreePath`, not the user's working tree. Cache and reports (Step 10) are written to the **main project directory**, not the worktree.
|
|
58
58
|
|
|
@@ -66,7 +66,7 @@ Based on the remaining arguments:
|
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
68
|
vivekmind review pr-context <pr_number> <owner>/<repo> \
|
|
69
|
-
--out .vivekmind/tmp/
|
|
69
|
+
--out .vivekmind/tmp/vivekmind-review-pr-<pr_number>-context.md
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
The subcommand fetches `gh pr view` metadata + inline / issue comments and writes a single Markdown file with the PR title, description, base/head, diff stats, an **"Already discussed"** section, and an "Open inline comments" section. Each replied-to thread renders the **complete reply chain** (root comment + chronological replies), so review agents can see whether a "Fixed in `<commit>`"-style reply has closed the topic — agents must NOT re-report a concern whose latest reply addresses it. Issue-level (general PR) comments appear in the same section. The file's own preamble tells agents to treat its contents as DATA, so no extra security prefix is needed when passing it to review agents.
|
|
@@ -86,12 +86,12 @@ Run `vivekmind review load-rules` to read project-specific rules. **For PR revie
|
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
88
|
vivekmind review load-rules <resolved_base_ref> \
|
|
89
|
-
--out .vivekmind/tmp/
|
|
89
|
+
--out .vivekmind/tmp/vivekmind-review-<target>-rules.md
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
`<resolved_base_ref>` is the base ref to load from: prefer `<base>` if it exists locally, otherwise `<remote>/<base>` (run `git fetch <remote> <base>` first if not yet fetched). For local-uncommitted or file-path reviews use `HEAD`.
|
|
93
93
|
|
|
94
|
-
The subcommand reads (in order, all sources combined): `.vivekmind/review-rules.md`, then either `.github/copilot-instructions.md` or root-level `copilot-instructions.md` (only one — preferred wins), then the `## Code Review` section of `AGENTS.md`, then the `## Code Review` section of `
|
|
94
|
+
The subcommand reads (in order, all sources combined): `.vivekmind/review-rules.md`, then either `.github/copilot-instructions.md` or root-level `copilot-instructions.md` (only one — preferred wins), then the `## Code Review` section of `AGENTS.md`, then the `## Code Review` section of `VIVEKMIND.md`. Missing files are silently skipped. The output file is empty when no rules are found — the subcommand reports `No review rules found on <ref>` to stdout in that case; skip rule injection in Step 4.
|
|
95
95
|
|
|
96
96
|
If the output file is non-empty, prepend its content to each **LLM-based review agent's** (Agents 1-6) instructions:
|
|
97
97
|
"In addition to the standard review criteria, you MUST also enforce these project-specific rules:
|
|
@@ -109,10 +109,10 @@ Extract the list of changed files from the diff output. For local uncommitted re
|
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
111
|
echo '<json array of changed files relative to worktree>' \
|
|
112
|
-
> .vivekmind/tmp/
|
|
112
|
+
> .vivekmind/tmp/vivekmind-review-<target>-changed.json
|
|
113
113
|
vivekmind review deterministic <worktree> \
|
|
114
|
-
--changed-files .vivekmind/tmp/
|
|
115
|
-
--out .vivekmind/tmp/
|
|
114
|
+
--changed-files .vivekmind/tmp/vivekmind-review-<target>-changed.json \
|
|
115
|
+
--out .vivekmind/tmp/vivekmind-review-<target>-deterministic.json
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Tools currently covered:
|
|
@@ -475,7 +475,7 @@ Use the **pre-autofix HEAD commit SHA** captured in Step 1. If not captured, fal
|
|
|
475
475
|
Optionally write the `(path, line)` anchors of the comments you're about to post so existing-comment Overlap can be detected:
|
|
476
476
|
|
|
477
477
|
```bash
|
|
478
|
-
echo '[{"path":"src/foo.ts","line":42}, ...]' > .vivekmind/tmp/
|
|
478
|
+
echo '[{"path":"src/foo.ts","line":42}, ...]' > .vivekmind/tmp/vivekmind-review-{target}-findings.json
|
|
479
479
|
```
|
|
480
480
|
|
|
481
481
|
Then run:
|
|
@@ -483,11 +483,11 @@ Then run:
|
|
|
483
483
|
```bash
|
|
484
484
|
vivekmind review presubmit \
|
|
485
485
|
{pr_number} {commit_sha} {owner}/{repo} \
|
|
486
|
-
.vivekmind/tmp/
|
|
487
|
-
[--new-findings .vivekmind/tmp/
|
|
486
|
+
.vivekmind/tmp/vivekmind-review-{target}-presubmit.json \
|
|
487
|
+
[--new-findings .vivekmind/tmp/vivekmind-review-{target}-findings.json]
|
|
488
488
|
```
|
|
489
489
|
|
|
490
|
-
Read `.vivekmind/tmp/
|
|
490
|
+
Read `.vivekmind/tmp/vivekmind-review-{target}-presubmit.json`. Schema:
|
|
491
491
|
|
|
492
492
|
```typescript
|
|
493
493
|
{
|
|
@@ -528,7 +528,7 @@ Read `.vivekmind/tmp/qwen-review-{target}-presubmit.json`. Schema:
|
|
|
528
528
|
|
|
529
529
|
⚠️ **Findings that can be mapped to a diff line → go in `comments` array (with `line` field). Findings that CANNOT be mapped to a specific diff line → go in `body` field.** Every entry in the `comments` array MUST have a valid `line` number. Do NOT put a comment in the `comments` array without a `line` — it creates an orphaned comment with no code reference.
|
|
530
530
|
|
|
531
|
-
**Build the review JSON** with `write_file` to create `.vivekmind/tmp/
|
|
531
|
+
**Build the review JSON** with `write_file` to create `.vivekmind/tmp/vivekmind-review-{target}-review.json`. Every high-confidence Critical/Suggestion finding that can be mapped to a diff line MUST be an entry in the `comments` array:
|
|
532
532
|
|
|
533
533
|
````json
|
|
534
534
|
{
|
|
@@ -559,7 +559,7 @@ Then submit:
|
|
|
559
559
|
|
|
560
560
|
```bash
|
|
561
561
|
gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews \
|
|
562
|
-
--input .vivekmind/tmp/
|
|
562
|
+
--input .vivekmind/tmp/vivekmind-review-{target}-review.json
|
|
563
563
|
```
|
|
564
564
|
|
|
565
565
|
If there are **no confirmed findings**, submit a single-line review. Use `event=APPROVE` by default; if the presubmit JSON has `downgradeApprove=true`, use `event=COMMENT` and prepend the downgrade reasons to the body:
|
|
@@ -629,7 +629,7 @@ Run the bundled cleanup subcommand:
|
|
|
629
629
|
vivekmind review cleanup <target>
|
|
630
630
|
```
|
|
631
631
|
|
|
632
|
-
`<target>` is the same suffix used throughout (`pr-<n>`, `local`, or filename). The command removes the worktree at `.vivekmind/tmp/review-pr-<n>` (PR targets only), deletes the local branch ref `
|
|
632
|
+
`<target>` is the same suffix used throughout (`pr-<n>`, `local`, or filename). The command removes the worktree at `.vivekmind/tmp/review-pr-<n>` (PR targets only), deletes the local branch ref `vivekmind-review/pr-<n>`, and clears any `.vivekmind/tmp/vivekmind-review-<target>-*` side files (review JSON, PR context, presubmit / findings reports). It is idempotent — missing files are silent OK.
|
|
633
633
|
|
|
634
634
|
**If Step 8 flagged the worktree for preservation** (autofix commit/push failure), skip Step 11 entirely. The user needs the worktree intact to recover the autofix commit. Inform the user the worktree is preserved at `.vivekmind/tmp/review-pr-<n>` and they should run `vivekmind review cleanup pr-<n>` manually after recovering the commit.
|
|
635
635
|
|