diacode 0.2.2 → 0.3.0-rc.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/CHANGELOG.md CHANGED
@@ -1,5 +1,102 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0-rc.1 (2026-11-16): the release candidate
4
+
5
+ 0.3.0 as it will be, for the hand test: on npm under the `next` tag (`npx diacode@next`; `latest` stays 0.2.3), the VS Code extension as a file to install by hand (its
6
+ Marketplace upload waits for 0.3.0 itself), and the Mac app as an unsigned zip. What changed is the next section. When the hand test passes this line goes and `0.3.0` is dated.
7
+
8
+ ## 0.3.0 (not yet released): one name
9
+
10
+ *In progress; this entry grows as the work lands. Plan: `docs/evolution/0.3.0-plan.md`.*
11
+
12
+ **The old name is gone.** DiaCode was called DcurseD until 0.2.0, and the old name was still in the folder, the agent entries, the
13
+ permission rule, the commands, the headers and the variables. Everything now says `diacode`.
14
+
15
+ **Upgrading from 0.2.x.** In each repository, run `npx diacode init <agent>` again. It moves the plans first (the same thing as
16
+ `npx diacode migrate`, which you can also run on its own): `.dcursed/` becomes `.diacode/`, the plan, architecture and layout files
17
+ now say `diacode.plan/1`, `diacode.arch/0` and `diacode.layout/0` (plan logs are left as they were), and what the old `init` wrote
18
+ under the old name is taken out — the `dcursed` MCP entry, the `mcp__dcursed` allow rule, the old rules files and the old block in
19
+ `AGENTS.md` — before the new entries are written. Nothing of yours is touched, a file that is in both folders is left and said, and it
20
+ can be run again. Then restart your agent's session. `serve` refuses a folder that still has `.dcursed/` (it would show an empty one
21
+ beside it) and says which command to run; `doctor` lists what is still old. Files under the old ids are still read, so a plan copied
22
+ in from a 0.2 repository opens.
23
+
24
+ - **Renamed:** the folder `.dcursed/` → `.diacode/`; the MCP server `dcursed` → `diacode` (so Claude Code's tools are
25
+ `mcp__diacode__…`); the headers `x-dcursed-*` → `x-diacode-*`; the variables `DCURSED_*` → `DIACODE_*` (`DIACODE_WAKE`,
26
+ `DIACODE_DEBUG`, `DIACODE_AGENT`, `DIACODE_URL`, `DIACODE_EDITOR`); the VS Code extension's id, commands, view and settings
27
+ `dcursed.*` → `diacode.*` (a setting you changed, `dcursed.port` for one, is not carried over); the Claude Code plugin `dcursed` →
28
+ `diacode` (`/diacode:setup`, `/diacode:doctor`, `/diacode:plan`); the desktop app's name inside (its list of recent folders starts empty).
29
+ - **Downgrading is not supported**: a plan the new `init` has migrated says `diacode.plan/1`, which a 0.2 DiaCode does not read.
30
+ Keep plans in git if you may go back.
31
+ - **Not renamed:** the site's address and the repository's name on GitHub.
32
+ - **OpenCode reads as "OpenCode".** Its default agent is called `build`, and the editor said so (*"Ask build to review these"*, a step owned by *build*, a status line reading *"build working"*), which means nothing
33
+ to someone who has not met OpenCode's agents. It now reads "OpenCode", and its other agents "OpenCode (name)", in the editor, the compact view and VS Code's status line.
34
+ - **A permission prompt shows the whole command.** The editor's line for a prompt was a summary: whitespace squeezed to single spaces and cut at 300
35
+ characters, so a compound command (start a server, some `curl`s, a `kill`) was cut before the part that matters, and a newline, which separates two
36
+ commands, read as a space. A command that is longer than one line, or has more than one, now has **Show the whole command** under it: the exact text,
37
+ newlines kept, selectable. A command too long to carry (over 20,000 characters) cannot be allowed from the editor, only denied, and says to answer it in
38
+ the agent's own window. This is in the editor, the compact view, VS Code and the desktop app alike.
39
+ - **The desktop app's error boxes no longer hold it up.** They were modal for the whole app, so while one was open it answered nothing, not even a quit
40
+ from outside; they are ordinary message boxes now.
41
+ - **The desktop app moves a DiaCode 0.2 folder's plans for you.** Opening a folder that 0.2 set up (plans in `.dcursed/`) used to end in an error box
42
+ that told you to run `diacode migrate`, a command a Mac-app user does not have. The app now asks, and its button **Move them and open** runs the same
43
+ migration with the command inside the app; afterwards connect your agent again (File ▸ Connect an Agent). A folder watched again from the last run is
44
+ never asked about. The first-open instructions for the unsigned zip are corrected: right-click ▸ Open stopped working in macOS 15 (`docs/desktop.md`).
45
+ - **VS Code and the desktop app: the re-plan buttons ask the agent you connected.** The extension started its plan server with `--reconcile manual`,
46
+ and since 0.2.3 any `--reconcile` makes those buttons run a separate OpenCode session, so a Claude Code user got OpenCode's buttons (and its errors).
47
+ `diacode.reconcile` is now `manual` (the agent you connected answers) or `auto` (a separate OpenCode session also asks by itself); only `auto` passes the flag.
48
+ - **VS Code starts the plan server for a folder you connected, as soon as it opens.** After a restart, with the agent's files in the folder and no plan
49
+ yet, nothing started it until you ran a command, so the agent's first call found nothing on its port. The extension now wakes for the files `init`
50
+ writes (and for a folder DiaCode 0.2 set up), and says in a notification why when the server will not start. The error carries the server's last lines
51
+ instead of "exited (code 1)"; in VS Code it tells you to run **DiaCode: Connect an agent…**, which moves a 0.2 folder's plans and starts the server.
52
+ - **The agent picker's text for Claude Code** said "rules in CLAUDE.md"; it writes `.claude/rules/diacode.md`.
53
+ - **A command prompt with no *don't ask again* says why.** For `node …` and `curl …` Claude Code sends the editor only the exact command, so the
54
+ editor has nothing narrow to offer; a line under the prompt now says so, and that Claude Code's own window may offer a wider rule (which DiaCode
55
+ does not pass on, because it would let the agent run anything of that kind unasked).
56
+ - **A box you add to the architecture is `box-3`, not `step-3`**, so that in an agent's report an id says which side it is on.
57
+
58
+ ## 0.2.3 (2026-11-11): six fixes from the Paper Shelf hand test
59
+
60
+ 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
61
+ description to a finished, tested app, and these are the rough spots it found. Upgrading needs `npx diacode init <agent>` again (the
62
+ 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`
63
+ checkpoint may now carry `options`, which an older DiaCode refuses to read in that one plan.
64
+
65
+ - **Fewer permission prompts, and a way to cut them.** In manual mode Claude Code asked up to 64 times in one eleven-step run.
66
+ (a) In the editor, a prompt Claude Code could have made a standing rule of now has a third button beside Allow and Deny:
67
+ **Allow, and don't ask again for …** (*npm test commands*, *file edits*). It sends back the "always allow" choice Claude Code
68
+ itself suggested for that request, rebuilt with the scope **session**: it lasts until that Claude Code session ends, writes no file,
69
+ and is never wider than what Claude Code offered. A prompt with no such suggestion has no such button, and neither does one whose
70
+ 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
71
+ --accept-edits` is the opt-in for the rest: it sets Claude Code's project mode to *accept edits* in `.claude/settings.local.json`,
72
+ 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
73
+ everything else still asks. Never a default; `init claude-code --remove` takes it out; `doctor` notes it. (Claude Code's folder-trust
74
+ dialog does not mention this mode, so `init` says so itself; a `--permission-mode` on the command line wins over it.)
75
+ - **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
76
+ run a separate OpenCode session whatever agent you used, and printed the provider's raw error when its key had expired. They now wake
77
+ the agent you connected, the same way every other edit does, saying which files are outside the plan or what failed: it
78
+ proposes the matching plan change (a card to accept) or says none is needed. An agent the editor cannot wake (Cursor, Antigravity,
79
+ nothing listening) is said so in words, and beside the files there are the plain actions, **Add it to a step** and **Ignore it**.
80
+ OpenCode does the job only if you start the server for it (`--reconcile`, `--reconciler-model`), and then the buttons say
81
+ *OpenCode*; its failures are worded by DiaCode (*OpenCode is not signed in*), never the provider's text. `doctor` no longer says the
82
+ re-planner "can run" because `opencode` is on the PATH: it says who answers the buttons.
83
+ - **Fixed: the Plan view drew its empty card over the architecture.** With an architecture and no plan, pressing **Plan** left the
84
+ architecture's boxes and arrows on the board under the card, and the address said `#architecture`. The board is cleared and the
85
+ address follows the tab. A probe in `npm run check:editor` fails on it.
86
+ - **Something to open for what the agent built.** The rules now say: a step that shows the person something leaves it running and puts
87
+ the address in its note, and a checkpoint that asks the person to look says where. The editor turns addresses in step notes, step
88
+ details and checkpoint words into links that open in a new tab (only `http://127.0.0.1`, `http://localhost` and `https://`; the
89
+ address is read, not pattern-matched, so `http://localhost.evil.example` is not one), and an approval whose step note has an address
90
+ shows an **Open** button before **Approve**.
91
+ - **One question per ask, with the options as buttons.** The rules say: one question per `step_ask`, the options listed in its text.
92
+ `step_ask` (and an `ask` arrow in `plan_create`, `edge.add` and `edge.set`) takes optional `options`: each is a button in the
93
+ editor that sends itself as the answer, beside the box for the person's own words. Old plans and questions without options are as
94
+ they were.
95
+ - **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
96
+ 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
97
+ 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
98
+ suggestion, or that nobody can make it from here.
99
+
3
100
  ## 0.2.2 (2026-11-11): the staged flow
4
101
 
5
102
  **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
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # dcursed
1
+ # diacode
2
2
 
3
3
  **A plan you and your coding agents share.**
4
4
 
5
- A plan is a file in your repository, `.dcursed/plans/<name>.plan.json`. You and your agents both edit
5
+ A plan is a file in your repository, `.diacode/plans/<name>.plan.json`. You and your agents both edit
6
6
  it: you drag a step or draw an arrow in the editor, an agent adds one through MCP, and both land in the same
7
7
  file under the same rules. Status comes from what the agents actually do: a step goes in progress when an
8
8
  agent's tools touch its files, not only when the agent says so, and each step shows how it is known (seen,
@@ -44,10 +44,10 @@ config with comments is yours: it says what to add instead).
44
44
 
45
45
  | | MCP (the plan tools) | Hooks or plugin (what the agent does, what you changed) | Rules |
46
46
  |---|---|---|---|
47
- | OpenCode | `opencode.json` | `.opencode/plugins/dcursed.js` and `.dcursed/opencode-plugin.js` | an `AGENTS.md` block |
48
- | Claude Code | `.mcp.json` | `.claude/settings.local.json` (yours alone; `--shared` writes `settings.json`) | `.claude/rules/dcursed.md` |
49
- | Cursor | `.cursor/mcp.json` | `.cursor/hooks.json` | `.cursor/rules/dcursed.mdc` |
50
- | Antigravity | `.agents/mcp_config.json` | `.agents/hooks.json` | `.agents/rules/dcursed.md` |
47
+ | OpenCode | `opencode.json` | `.opencode/plugins/diacode.js` and `.diacode/opencode-plugin.js` | an `AGENTS.md` block |
48
+ | Claude Code | `.mcp.json` | `.claude/settings.local.json` (yours alone; `--shared` writes `settings.json`) | `.claude/rules/diacode.md` |
49
+ | Cursor | `.cursor/mcp.json` | `.cursor/hooks.json` | `.cursor/rules/diacode.mdc` |
50
+ | Antigravity | `.agents/mcp_config.json` | `.agents/hooks.json` | `.agents/rules/diacode.md` |
51
51
 
52
52
  Commit the MCP entries and rules if you want your team to have them; the hooks assume a plan server on
53
53
  your machine, so Claude Code's go in your own settings file by default.
@@ -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 auto` lets a model propose edits by itself (off by default: it spends model calls) |
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
- | `dcursed import <file>` | bring in a Cursor `.plan.md`, markdown with a Mermaid block, or a `.mmd` file |
62
+ | `diacode import <file>` | bring in a Cursor `.plan.md`, markdown with a Mermaid block, or a `.mmd` file |
63
63
 
64
- The reconciler (the editor's *Ask the reconciler* and *Re-plan from this*) runs a separate, read-only
65
- [OpenCode](https://opencode.ai) session with whichever model you have configured there; without OpenCode
66
- installed, those two buttons say so and everything else works.
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