diacode 0.2.1 → 0.2.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 +83 -0
- package/README.md +9 -9
- package/bin/dcursed.js +710 -125
- package/editor/app/compact/index.html +3 -3
- package/editor/app/index.html +3 -3
- package/editor/assets/app-BukOKzI8.css +1 -0
- package/editor/assets/app-DkKBnx6M.js +122 -0
- package/editor/assets/compact-BwaR1-sL.js +36 -0
- package/editor/assets/compact-DPQA5WVu.css +1 -0
- package/editor/assets/fonts-D2FlQA0D.js +156 -0
- package/package.json +1 -1
- package/editor/assets/app-0Ti-gp9D.js +0 -122
- package/editor/assets/app-1SR3-4wc.css +0 -1
- package/editor/assets/compact-D4LqjEE-.css +0 -1
- package/editor/assets/compact-OOTi-DHu.js +0 -36
- package/editor/assets/fonts-C71K6yRy.js +0 -153
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,88 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.3 (2026-11-11): six fixes from the Paper Shelf hand test
|
|
4
|
+
|
|
5
|
+
Written after a hand test of 0.2.2 with Claude Code on Sonnet 5.5 (the Paper Shelf task, Part 1): the staged flow worked from the
|
|
6
|
+
description to a finished, tested app, and these are the rough spots it found. Upgrading needs `npx diacode init <agent>` again (the
|
|
7
|
+
rules file changed) and a restart of the plan server and of the agent's session. Plans from 0.2.2 are read as they were; an `ask`
|
|
8
|
+
checkpoint may now carry `options`, which an older DiaCode refuses to read in that one plan.
|
|
9
|
+
|
|
10
|
+
- **Fewer permission prompts, and a way to cut them.** In manual mode Claude Code asked up to 64 times in one eleven-step run.
|
|
11
|
+
(a) In the editor, a prompt Claude Code could have made a standing rule of now has a third button beside Allow and Deny:
|
|
12
|
+
**Allow, and don't ask again for …** (*npm test commands*, *file edits*). It sends back the "always allow" choice Claude Code
|
|
13
|
+
itself suggested for that request, rebuilt with the scope **session**: it lasts until that Claude Code session ends, writes no file,
|
|
14
|
+
and is never wider than what Claude Code offered. A prompt with no such suggestion has no such button, and neither does one whose
|
|
15
|
+
suggestion would run anything (every command, `node -e …`, `sudo …`) or is one exact command; a folder is named by how wide it is. (b) `init claude-code
|
|
16
|
+
--accept-edits` is the opt-in for the rest: it sets Claude Code's project mode to *accept edits* in `.claude/settings.local.json`,
|
|
17
|
+
so file writes and edits inside the folder (and mkdir, touch, rm, rmdir, mv, cp and sed on files in it) go ahead without asking, and
|
|
18
|
+
everything else still asks. Never a default; `init claude-code --remove` takes it out; `doctor` notes it. (Claude Code's folder-trust
|
|
19
|
+
dialog does not mention this mode, so `init` says so itself; a `--permission-mode` on the command line wins over it.)
|
|
20
|
+
- **The re-plan buttons ask your agent, not OpenCode.** *Should the plan cover this?*, *Ask the re-planner* and *Re-plan from this* used to
|
|
21
|
+
run a separate OpenCode session whatever agent you used, and printed the provider's raw error when its key had expired. They now wake
|
|
22
|
+
the agent you connected, the same way every other edit does, saying which files are outside the plan or what failed: it
|
|
23
|
+
proposes the matching plan change (a card to accept) or says none is needed. An agent the editor cannot wake (Cursor, Antigravity,
|
|
24
|
+
nothing listening) is said so in words, and beside the files there are the plain actions, **Add it to a step** and **Ignore it**.
|
|
25
|
+
OpenCode does the job only if you start the server for it (`--reconcile`, `--reconciler-model`), and then the buttons say
|
|
26
|
+
*OpenCode*; its failures are worded by DiaCode (*OpenCode is not signed in*), never the provider's text. `doctor` no longer says the
|
|
27
|
+
re-planner "can run" because `opencode` is on the PATH: it says who answers the buttons.
|
|
28
|
+
- **Fixed: the Plan view drew its empty card over the architecture.** With an architecture and no plan, pressing **Plan** left the
|
|
29
|
+
architecture's boxes and arrows on the board under the card, and the address said `#architecture`. The board is cleared and the
|
|
30
|
+
address follows the tab. A probe in `npm run check:editor` fails on it.
|
|
31
|
+
- **Something to open for what the agent built.** The rules now say: a step that shows the person something leaves it running and puts
|
|
32
|
+
the address in its note, and a checkpoint that asks the person to look says where. The editor turns addresses in step notes, step
|
|
33
|
+
details and checkpoint words into links that open in a new tab (only `http://127.0.0.1`, `http://localhost` and `https://`; the
|
|
34
|
+
address is read, not pattern-matched, so `http://localhost.evil.example` is not one), and an approval whose step note has an address
|
|
35
|
+
shows an **Open** button before **Approve**.
|
|
36
|
+
- **One question per ask, with the options as buttons.** The rules say: one question per `step_ask`, the options listed in its text.
|
|
37
|
+
`step_ask` (and an `ask` arrow in `plan_create`, `edge.add` and `edge.set`) takes optional `options`: each is a button in the
|
|
38
|
+
editor that sends itself as the answer, beside the box for the person's own words. Old plans and questions without options are as
|
|
39
|
+
they were.
|
|
40
|
+
- **A step or box added by name only gets help.** When you add a step or a box with only a name, the agent (told by the edit, as
|
|
41
|
+
before: while the plan is approved or running) is asked to propose a description, files and boxes as a card to accept; Approve plan's
|
|
42
|
+
check asks the same for a step that still has only a name. The editor says on that step or box that it is waiting for the
|
|
43
|
+
suggestion, or that nobody can make it from here.
|
|
44
|
+
|
|
45
|
+
## 0.2.2 (2026-11-11): the staged flow
|
|
46
|
+
|
|
47
|
+
**One order, one button at a time: the architecture, then the plan, then Start.** Written after a hand test of 0.2.1 with Claude Code on
|
|
48
|
+
Sonnet 5.5, which drew a plan and no architecture in an empty folder and asked its question in its own window. The flow is now:
|
|
49
|
+
you write the task; the agent draws the architecture and stops; you edit it and approve; the agent draws the
|
|
50
|
+
plan and stops; you edit it and approve; the agent checks the architecture against the plan and asks you about any change; you finalize
|
|
51
|
+
both and press **Start**. After that, a change to either side is told to the agent, which proposes the matching change on the other.
|
|
52
|
+
|
|
53
|
+
**Upgrading from 0.2.1.** Run `npx diacode init <agent>` again in each repository (it rewrites the rules file the agent reads; `doctor`
|
|
54
|
+
says when it is the old one), and restart the agent's session. **A plan can now say `phase: "approved"`: a DiaCode before this one
|
|
55
|
+
cannot read such a plan** (it reports the file as a problem and leaves it alone), so keep plans in git if you may go back. Plans and
|
|
56
|
+
architectures from 0.2.1 are read as they were.
|
|
57
|
+
|
|
58
|
+
- **The editor has one bar, in Plan and in Architecture.** *Task › Architecture › Plan › Start › Running*, the stage underlined, a
|
|
59
|
+
sentence saying what to do, and the one button: **Approve architecture**, **Approve plan**, **Start** (grey while the agent is
|
|
60
|
+
still at work, or a change it proposed waits for you, and it says why), then **Pause**, **Stop**, **Resume**, **Mark plan done**.
|
|
61
|
+
The stage is worked out by the plan server from what exists (`GET /api/flow`), nothing is stored for it. The *Plan* and
|
|
62
|
+
*Architecture* tabs count what waits on the side you are not looking at.
|
|
63
|
+
- **Approving the plan no longer starts it.** The plan has a new phase, *approved*: the agent is woken to check the architecture
|
|
64
|
+
against the plan, once (every part the plan adds is a box marked planned, each step lists the boxes it changes) and its changes
|
|
65
|
+
to the architecture are proposals you accept or reject. Only **Start** carries the plan out, and until then an agent is refused any
|
|
66
|
+
step it tries to start. **Stop** now takes the plan back to *approved* (it used to be *planning*), so Start carries on.
|
|
67
|
+
- **The architecture is drawn first, even in an empty folder.** The rules file, the start of every turn (Claude Code adds the stage
|
|
68
|
+
to your message through its prompt hook; OpenCode through its plugin's request text) and the end of every DiaCode tool's answer
|
|
69
|
+
say the stage and the one move. A weaker model that skims its rules still draws the architecture first: **`plan_create` is
|
|
70
|
+
refused until there is an architecture the person has approved** (unless the person said they want none, `no_architecture`), and
|
|
71
|
+
the refusal says what to do instead. `arch_draft` takes `planned: true` on a box or arrow that does not exist yet, which is bound
|
|
72
|
+
to the plan when it is drawn (so *make what it planned real* works for a plan that started from nothing).
|
|
73
|
+
- **A question the task asked for is a checkpoint in the plan.** The rules say so and say how (an ask checkpoint on the arrow into the
|
|
74
|
+
first step that needs the answer, asked with `step_ask`), so the question reaches the editor, not the agent's window. If an agent asks
|
|
75
|
+
in its window anyway nothing breaks: the flow carries on from your answer there.
|
|
76
|
+
- **The two sides follow each other.** From *approved* on, what you change on the plan is told to the agent a few seconds after your
|
|
77
|
+
last edit with *make the architecture agree*, and what you change on the architecture with *make the plan agree*; its answer is a
|
|
78
|
+
proposal on the other side. **Pause is where you edit**: Resume tells the agent what changed on both sides in one message.
|
|
79
|
+
Accepting or rejecting what it proposed is not a change it has to follow, so nothing loops; a rejected architecture proposal tells
|
|
80
|
+
it to adjust the plan steps that depended on it.
|
|
81
|
+
- `init` and `doctor` print the order in words; `doctor` flags rules written by an older init. The compact view, the VS Code status
|
|
82
|
+
line and the desktop app know the new phase, and the plan's approval waits for a draft architecture's.
|
|
83
|
+
- Smaller: the buttons of the bar keep their place when **Stop** asks again (it asked to be pressed twice, and a click on the
|
|
84
|
+
second moved onto Pause); a plan with a draft architecture asked for two approvals at once in the compact view.
|
|
85
|
+
|
|
3
86
|
## 0.2.1 (2026-11-10)
|
|
4
87
|
|
|
5
88
|
A fix release: **run `npx diacode init <agent>` again** in each repository to get the permission rule (below), then restart the agent's
|
package/README.md
CHANGED
|
@@ -28,11 +28,11 @@ npx diacode init claude-code # or: opencode, cursor, antigravity, all
|
|
|
28
28
|
npx diacode serve # leave it running; the editor is at http://127.0.0.1:7300/
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Start your agent in that folder and
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
Start your agent in that folder and give it the task, for example *"Add a --format flag to the CLI."* It draws the
|
|
32
|
+
architecture of the system as it will be, in the editor, and stops. Reshape it and press **Approve architecture**: the agent draws the
|
|
33
|
+
plan. Reshape that and press **Approve plan**: the agent checks the architecture against the plan and proposes what needs to change
|
|
34
|
+
(OpenCode and Claude Code are woken; for the others, tell it yourself). Then press **Start**. The steps show who has which and what is
|
|
35
|
+
done, and what you change on either side while it runs reaches the agent, which proposes the matching change on the other.
|
|
36
36
|
|
|
37
37
|
Something off? `npx diacode doctor` checks the repository, the agents' configuration and the server
|
|
38
38
|
against each other and says what to run.
|
|
@@ -57,13 +57,13 @@ your machine, so Claude Code's go in your own settings file by default.
|
|
|
57
57
|
| | |
|
|
58
58
|
|---|---|
|
|
59
59
|
| `diacode init <harness\|all>` | connect this repository to an agent; `--port` if 7300 is taken, `--root` for another folder; `--remove` takes out again only what it wrote |
|
|
60
|
-
| `diacode serve` | the plan server and the editor; `--reconcile
|
|
60
|
+
| `diacode serve` | the plan server and the editor; `--reconcile` / `--reconciler-model` make the re-plan buttons run a separate OpenCode session instead of asking your agent (off by default), and `--reconcile auto` lets it propose edits by itself (it spends model calls) |
|
|
61
61
|
| `diacode doctor` | check that the pieces fit |
|
|
62
62
|
| `dcursed import <file>` | bring in a Cursor `.plan.md`, markdown with a Mermaid block, or a `.mmd` file |
|
|
63
63
|
|
|
64
|
-
The
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
The editor's re-plan buttons (*Should the plan cover this?*, *Ask your agent to review these*, *Ask your agent to re-plan from this*) wake the
|
|
65
|
+
agent you connected, which proposes the plan change or says none is needed. A separate, read-only [OpenCode](https://opencode.ai)
|
|
66
|
+
session does that only if you start the server for it (`--reconcile`, `--reconciler-model`).
|
|
67
67
|
|
|
68
68
|
## Not yet
|
|
69
69
|
|