command-code 1.4.1 → 1.4.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/CHANGELOG.md +12 -0
- package/dist/bundled/command-code-knowledge/SKILL.md +2 -3
- package/dist/bundled/command-code-knowledge/reference/custom-agents.md +2 -2
- package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +195 -271
- package/dist/bundled/command-code-knowledge/reference/headless.md +20 -3
- package/dist/bundled/command-code-knowledge/reference/hooks.md +4 -2
- package/dist/bundled/command-code-knowledge/reference/mcp.md +2 -2
- package/dist/bundled/command-code-knowledge/reference/memory.md +77 -38
- package/dist/bundled/command-code-knowledge/reference/permissions.md +37 -3
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +215 -64
- package/dist/bundled/command-code-knowledge/reference/{checkpoints.md → sessions.md} +28 -4
- package/dist/bundled/command-code-knowledge/reference/skills.md +1 -1
- package/dist/bundled/mod-builder/reference/overview.md +25 -12
- package/dist/bundled/mod-builder/reference/verify.md +1 -1
- package/dist/cli.mjs +3 -3
- package/package.json +5 -5
- package/vsix/commandcode-vscode.vsix +0 -0
- package/dist/bundled/command-code-knowledge/reference/plan-review.md +0 -226
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "command-code",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Command Code, coding agent that continuously learns your coding taste. Best coding agent for open models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -109,13 +109,13 @@
|
|
|
109
109
|
"tsup": "^8.5.0",
|
|
110
110
|
"vitest": "^4.1.6",
|
|
111
111
|
"vitest-ansi-serializer": "^0.2.1",
|
|
112
|
+
"@commandcode/harness": "0.1.0",
|
|
112
113
|
"@commandcode/provider-anthropic": "0.1.0",
|
|
113
114
|
"@commandcode/provider-openai": "0.1.0",
|
|
114
|
-
"@commandcode/
|
|
115
|
-
"@commandcode/providers": "0.1.0",
|
|
115
|
+
"@commandcode/provider-copilot": "0.1.0",
|
|
116
116
|
"@commandcode/tui": "0.1.0",
|
|
117
|
-
"@commandcode/
|
|
118
|
-
"@commandcode/
|
|
117
|
+
"@commandcode/shared": "0.0.1",
|
|
118
|
+
"@commandcode/providers": "0.1.0"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {
|
|
121
121
|
"prebuild": "test -f vsix/commandcode-vscode.vsix || bash ../../scripts/build-ext.sh",
|
|
Binary file
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
<!-- GENERATED FILE — do not edit. Source: packages/docs/src/app/core-concepts/plan-review/page.mdx. Regenerate: pnpm generate:knowledge -->
|
|
2
|
-
|
|
3
|
-
# Plan Review
|
|
4
|
-
|
|
5
|
-
Plan review is the full-screen surface where Command Code presents a written plan for your sign-off — a code-review experience for plans, in the terminal. New in **v1**, it turns a plan into a first-class, persistent artifact you can read, comment on, revise, and approve, instead of a block of text that scrolls away.
|
|
6
|
-
|
|
7
|
-
If you've reviewed a pull request on GitHub, plan review will feel familiar: one plan line is always selected, you leave inline comments, and you resolve the plan with a verb — **Submit review**, **Approve**, or **Cancel**.
|
|
8
|
-
|
|
9
|
-
Plan review pairs with [Plan Mode](./plan-mode.md). Plan mode is where the agent *writes* the plan; plan review is where you *sign off* on it.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## At a glance
|
|
14
|
-
|
|
15
|
-
- **One mode: REVIEW.** Read line by line, comment on any line, resolve with a verb. There is no separate "edit mode" — plan edits go through your `$EDITOR`.
|
|
16
|
-
- **Plans persist.** Every plan is saved to `~/.commandcode/plans/` as markdown and indexed, so canceling a review never throws the plan away.
|
|
17
|
-
- **Comments are review artifacts, not plan text.** They live in a sidecar overlay and only reach the agent inside a prompt — they never get written into the plan document.
|
|
18
|
-
- **GitHub-style verbs.** Submit review (`ctrl+r`), Approve (`ctrl+a`) or Execute plan (`ctrl+e`), Cancel/Back (`esc`).
|
|
19
|
-
- **Review rounds.** When the agent revises a plan, the next round diffs against the last one — changed lines render green so you re-review only what moved.
|
|
20
|
-
- **Deterministic.** A harness backstop guarantees the review is offered even when a weaker model writes a plan and simply stops.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## How it works
|
|
25
|
-
|
|
26
|
-
A plan starts in plan mode, lands in review, and loops until you approve it. Submitting a review sends it back to the agent for a revision; approving implements it; canceling saves it for later.
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
You: "plan a rate limiter"
|
|
30
|
-
│
|
|
31
|
-
▼
|
|
32
|
-
┌──────────────┐ agent explores (read-only) and writes
|
|
33
|
-
│ PLAN MODE │ ~/.commandcode/plans/rate-limiter.md
|
|
34
|
-
└──────┬───────┘
|
|
35
|
-
│ exit_plan_mode (or plan_review / /plan-review / the backstop)
|
|
36
|
-
▼
|
|
37
|
-
┌───────────────────────────┐ revised plan (round N+1)
|
|
38
|
-
│ PLAN REVIEW · REVIEW │◀─────────────────────────┐
|
|
39
|
-
│ read · comment · revise │ │
|
|
40
|
-
└──┬──────────┬──────────┬───┘ ┌──────┴──────┐
|
|
41
|
-
│ │ │ │ agent │
|
|
42
|
-
Submit review │ │ ── comments ─────────▶│ revises the │
|
|
43
|
-
(ctrl+r) ──────┘ │ │ plan │
|
|
44
|
-
▲ │ └─────────────┘
|
|
45
|
-
└── another round ────┘
|
|
46
|
-
│
|
|
47
|
-
Approve (ctrl+a) / Execute (ctrl+e)
|
|
48
|
-
│
|
|
49
|
-
▼
|
|
50
|
-
┌─────────────┐
|
|
51
|
-
│ IMPLEMENT │
|
|
52
|
-
└─────────────┘
|
|
53
|
-
|
|
54
|
-
Cancel (esc) ──▶ plan saved · status: not-implemented
|
|
55
|
-
reopen anytime with /plans
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
Inside the reader, one line is always selected, comments pin inline under their line, and the pinned bottom bar holds the review verbs:
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
┌ Plan review: Rate limiter · ~/.commandcode/plans/rate-limiter.md · v2 ┐
|
|
62
|
-
│ │
|
|
63
|
-
│ 3 ## Approach ← headings / code styled │
|
|
64
|
-
│ 4 │
|
|
65
|
-
│ 5 ● 1. Add a token-bucket middleware. ← ● marks a commented line │
|
|
66
|
-
│ ↳ why not a sliding window? ← your inline comment │
|
|
67
|
-
│ 6 2. Store buckets in Redis. │
|
|
68
|
-
│ 7 3. Return 429 with Retry-After. ← green if changed (round 2) │
|
|
69
|
-
│ │
|
|
70
|
-
│ ─────────────────────────────────────────────────────────────────── │
|
|
71
|
-
│ REVIEW 1 pending comment · round 2 · 1 line changed │
|
|
72
|
-
│ Submit review (1) ctrl+r agent revises the plan, returns it │
|
|
73
|
-
│ Approve ctrl+a executes the plan · comments go as notes │
|
|
74
|
-
│ Cancel esc │
|
|
75
|
-
│ type + enter to comment · ctrl+n/p jump changes · quick: ? x ! · ^g │
|
|
76
|
-
└───────────────────────────────────────────────────────────────────── ┘
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## Opening plan review
|
|
82
|
-
|
|
83
|
-
There are four ways into the same review surface. All of them are scoped to a plan written during the **current session**.
|
|
84
|
-
|
|
85
|
-
### 1. Finishing plan mode
|
|
86
|
-
|
|
87
|
-
While in [plan mode](./plan-mode.md), the agent writes the plan to `~/.commandcode/plans/<name>.md` and then calls `exit_plan_mode`. That opens plan review as the approval surface — the plan *is* the approval prompt. Approving here can also switch you into [auto-accept mode](./plan-mode.md#auto-accept-mode) so implementation runs without further prompts.
|
|
88
|
-
|
|
89
|
-
### 2. Asking to review a plan (`plan_review` tool)
|
|
90
|
-
|
|
91
|
-
Outside plan mode, just ask:
|
|
92
|
-
|
|
93
|
-
> "review plan" · "open plan review" · "show me the plan"
|
|
94
|
-
|
|
95
|
-
The agent calls the `plan_review` tool, which opens the review panel for the most recent plan file. This exists so the agent shows you the real review surface instead of pasting the plan back as a wall of text. In plan mode the agent uses `exit_plan_mode` instead — there is exactly one review path per mode.
|
|
96
|
-
|
|
97
|
-
### 3. The `/plan-review` slash command
|
|
98
|
-
|
|
99
|
-
Run `/plan-review` to jump straight into a review of **this session's latest plan**.
|
|
100
|
-
|
|
101
|
-
### 4. The `/plans` browser
|
|
102
|
-
|
|
103
|
-
Run `/plans` to open the full-screen plan browser — every plan from this session and past sessions, with status badges, comment counts, and search. Open any plan to read and review it. `/plans <name>` jumps straight into a named plan.
|
|
104
|
-
|
|
105
|
-
### The automatic backstop (auto plan review)
|
|
106
|
-
|
|
107
|
-
Some models write a plan file and stop without ever presenting it. Command Code makes the review a guarantee, not a courtesy: when a run ends naturally with a plan that was written but never reviewed (in **default** or **plan** mode), the harness presents the same review panel itself. Approving it continues the run with an instruction to implement; declining lets the run end so you can steer. Modes that mean "don't interrupt me" — auto-accept, bypass, and dont-ask — skip the backstop.
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Reviewing a plan
|
|
112
|
-
|
|
113
|
-
The reader renders the plan like a document — headings, code, quotes, and tables are styled per line. One line is always highlighted. The bottom of the screen holds a fixed zone: a **REVIEW** badge with the pending-comment count, a single context-sensitive hint line, and the stacked review verbs. Nothing in that zone changes as you scroll — your position lives in the highlight and the gutter line number.
|
|
114
|
-
|
|
115
|
-
### Navigating
|
|
116
|
-
|
|
117
|
-
| Key | Action |
|
|
118
|
-
|-----|--------|
|
|
119
|
-
| `↑` / `↓` | Move one line; past the last line drops onto the review verbs |
|
|
120
|
-
| `PgUp` / `PgDn` (`Fn+↑/↓` on Mac) | Page up/down one viewport, like `less` |
|
|
121
|
-
| `Home` / `End` (`Fn+←/→` on Mac) | Jump the cursor to the first / last line |
|
|
122
|
-
| `ctrl+n` / `ctrl+p` | Jump between marked lines — your comments, plus changed lines in a revised plan |
|
|
123
|
-
|
|
124
|
-
Long lines **wrap** at a comfortable reading width (80 columns when there's room, otherwise 60) rather than truncating, so you can always read the full paragraph.
|
|
125
|
-
|
|
126
|
-
### Leaving comments
|
|
127
|
-
|
|
128
|
-
Commenting is Figma-style — just start typing on a line and a draft comment box opens **inline, directly under that line**, exactly where it will sit once pinned.
|
|
129
|
-
|
|
130
|
-
| Key | Action |
|
|
131
|
-
|-----|--------|
|
|
132
|
-
| type + `Enter` | Open a draft on the selected line, then pin it |
|
|
133
|
-
| `Enter` on a commented line | Reopen the comment to edit it |
|
|
134
|
-
| empty + `Enter` | Remove the comment |
|
|
135
|
-
| `?` | Quick comment: "Why? Explain the reasoning behind this." |
|
|
136
|
-
| `x` | Quick comment: "Cut this — remove it from the plan." |
|
|
137
|
-
| `!` | Quick comment: "Risky — double-check this before implementing." |
|
|
138
|
-
| `esc` (while drafting) | Discard the draft |
|
|
139
|
-
|
|
140
|
-
Pinned comments show a `●` gutter marker on the line and a `↳ comment` row beneath it. Comments are saved to disk with the plan, so they survive closing the reader and even ending the session. They never become part of the plan document.
|
|
141
|
-
|
|
142
|
-
### Editing the plan
|
|
143
|
-
|
|
144
|
-
Plan review has no separate edit mode. Press `ctrl+g` to hand the plan file to your `$EDITOR` (from `$EDITOR`/`$VISUAL`); the reader reloads when you close it. The editor is the edit surface, the reader is the review surface.
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## Resolving a review
|
|
149
|
-
|
|
150
|
-
The review verbs are stacked in the pinned bottom bar. Trigger them by chord from anywhere, or arrow onto them and press `Enter`.
|
|
151
|
-
|
|
152
|
-
| Verb | Chord | What it does |
|
|
153
|
-
|------|-------|--------------|
|
|
154
|
-
| **Submit review** | `ctrl+r` | The agent takes your pending comments, revises the plan, and re-presents it for another round. Only shown when you have pending comments. |
|
|
155
|
-
| **Approve** *(approval surface)* | `ctrl+a` | Executes the plan and begins implementation. If you have pending comments, they ride along as notes (see below). |
|
|
156
|
-
| **Execute plan** *(browser surface)* | `ctrl+e` | Executes the plan as written — from the `/plans` browser this is itself an approval, so the agent implements directly. |
|
|
157
|
-
| **Cancel** / **Back** | `esc` | Ends the review. In plan mode the plan stays saved and you keep refining; from the browser it returns to the list. |
|
|
158
|
-
|
|
159
|
-
### Approving with pending comments
|
|
160
|
-
|
|
161
|
-
If you press Approve while comments are still pending, Command Code doesn't guess. It asks:
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
Approve (•) with N comments as notes ( ) original plan · discard comments
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Choose **with comments as notes** and your comments are sent as a follow-up user turn — non-blocking notes the agent implements against. Choose **original plan** to approve it clean and drop the comments. Use `←/→` to switch, `Enter` to confirm, `esc` to back out.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Review rounds and versioning
|
|
172
|
-
|
|
173
|
-
Plan review is iterative. Each time you **Submit review**, Command Code:
|
|
174
|
-
|
|
175
|
-
1. Snapshots the current plan to `~/.commandcode/plans/versions/<name>-v<N>.md`.
|
|
176
|
-
2. Bumps the plan's version and clears your pending comments (they were all handed to the agent in one prompt).
|
|
177
|
-
3. Lets the agent revise the plan, overwriting the live file.
|
|
178
|
-
|
|
179
|
-
When the revised plan comes back (version > 1), the reader **diffs it against the previous round's snapshot**. Changed lines render **green**, and the badge line reports `round N · M lines changed` — so a second review means re-reading only what actually moved, not the whole plan again. `ctrl+n`/`ctrl+p` jump between those changed lines.
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Where plans live
|
|
184
|
-
|
|
185
|
-
Plans and their metadata are stored under your home directory:
|
|
186
|
-
|
|
187
|
-
```
|
|
188
|
-
~/.commandcode/plans/<descriptive-name>.md ← the plan markdown (written by the agent)
|
|
189
|
-
~/.commandcode/plans/plans-index.json ← titles, status, comments, versions
|
|
190
|
-
~/.commandcode/plans/versions/<name>-v<N>.md ← prior review-round snapshots
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
Every plan carries a status:
|
|
194
|
-
|
|
195
|
-
- **pending** — written but not yet taken through review.
|
|
196
|
-
- **approved** — you approved it and moved to implementation.
|
|
197
|
-
- **not-implemented** — you canceled the review; the plan is kept for later reading, commenting, and revision.
|
|
198
|
-
|
|
199
|
-
Because a canceled plan is recorded rather than discarded, planning never feels throwaway — reopen it any time with `/plans`. Writes to `~/.commandcode/plans/*.md` never prompt for permission (in any mode), and only `.md` files there get that exemption, so the plans directory can't double as a scratchpad.
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## Slash commands
|
|
204
|
-
|
|
205
|
-
| Command | Description |
|
|
206
|
-
|---------|-------------|
|
|
207
|
-
| `/plan` | Enter plan mode; `/plan <task>` plans that task |
|
|
208
|
-
| `/plans` | Browse, review, and comment on saved plans — `/plans [name]` opens one directly |
|
|
209
|
-
| `/plan-review` | Open plan review on this session's latest plan |
|
|
210
|
-
| `/mode plan` | Switch to plan mode (read-only, no side effects) |
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
-
|
|
214
|
-
## Related tools
|
|
215
|
-
|
|
216
|
-
- **`exit_plan_mode`** — presents the plan for approval when leaving plan mode. Only valid *in* plan mode.
|
|
217
|
-
- **`plan_review`** — opens the review panel on demand *outside* plan mode. Renders as `PLAN(review)` in the activity feed.
|
|
218
|
-
- **`enter_plan_mode`** — switches into plan mode (with your confirmation) for read-only exploration.
|
|
219
|
-
|
|
220
|
-
---
|
|
221
|
-
|
|
222
|
-
## Next steps
|
|
223
|
-
|
|
224
|
-
- Learn how [Plan Mode](./plan-mode.md) and Auto-Accept mode split reasoning from execution.
|
|
225
|
-
- Use [Checkpoints](./checkpoints.md) to rewind after an approved plan is implemented.
|
|
226
|
-
- Browse the full [Slash Commands](https://commandcode.ai/docs/reference/slash-commands) and [Tools](https://commandcode.ai/docs/reference/tools) references.
|