diacode 0.0.0-stage → 0.2.0
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 +317 -0
- package/LICENSE +21 -0
- package/README.md +73 -2
- package/THIRD-PARTY-NOTICES.md +1535 -0
- package/bin/dcursed.js +8090 -0
- package/editor/app/compact/index.html +24 -0
- package/editor/app/index.html +115 -0
- package/editor/assets/app-1SR3-4wc.css +1 -0
- package/editor/assets/app-CSD76pDG.js +122 -0
- package/editor/assets/compact-D4LqjEE-.css +1 -0
- package/editor/assets/compact-OOTi-DHu.js +36 -0
- package/editor/assets/fonts-C71K6yRy.js +153 -0
- package/editor/assets/fonts-CdeCoHOe.css +1 -0
- package/editor/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/editor/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/editor/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/editor/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/editor/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/editor/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/editor/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/editor/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/editor/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/editor/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/editor/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/editor/favicon-needs.svg +12 -0
- package/editor/favicon.svg +11 -0
- package/opencode-plugin.js +353 -0
- package/package.json +32 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0 (2026-11-10)
|
|
4
|
+
|
|
5
|
+
**DcurseD is now DiaCode.** The package and the command are `diacode` (`npx diacode init claude-code`, `npx diacode serve`);
|
|
6
|
+
`dcursed` on npm stays at 0.1.0 and points here. What is in a repository does not change: the plans are still in `.dcursed/`,
|
|
7
|
+
in the same formats, and an agent's tools are still `dcursed`'s, so a repository set up with 0.1.0 keeps working (run `init`
|
|
8
|
+
again for the new hooks, below).
|
|
9
|
+
|
|
10
|
+
The second release: a repository's **architecture** beside its plans (two modes in one editor), a run you can **pause, stop and put
|
|
11
|
+
checkpoints in**, an editor with **no toolbar**, a **compact view** for the side of an IDE, and a **Mac app** for testers. The parts
|
|
12
|
+
below are in the order they were built, newest first; the plan they followed is `docs/evolution/next-version-plan.md`. The last
|
|
13
|
+
part, from running the extension with OpenCode, is the fixes made since 0.1.0 that belong to no one part.
|
|
14
|
+
|
|
15
|
+
**Upgrading from 0.1.0.**
|
|
16
|
+
- Run `npx diacode init <agent>` again in each repository, and restart the agent's session. It adds Claude Code's `PreToolUse` hook
|
|
17
|
+
(Stop needs it) and `Notification` hook, refreshes the rules and, for OpenCode, the plugin (which has to match the server; `doctor`
|
|
18
|
+
says when it does not). The VS Code extension's *Connect an agent to this repository…* does the same.
|
|
19
|
+
- A plan file from 0.1.0 (`dcursed.plan/0`) is read as it was, and written as `dcursed.plan/1` the next time it changes. **0.1.0 does
|
|
20
|
+
not read version 1** (it reports the file as a problem and leaves it alone), so keep plans in git if you may go back.
|
|
21
|
+
- There is no toolbar and the letter shortcuts V, C, G, A, X are gone (*The editor, reshaped*, below). **Back to planning** is gone:
|
|
22
|
+
Stop does it.
|
|
23
|
+
- The Mac app is not in the npm package or the extension.
|
|
24
|
+
|
|
25
|
+
From running 0.2.0-rc.1 as a stranger gets it, with a live Claude Code, from a task description to a finished plan (9 November):
|
|
26
|
+
|
|
27
|
+
- **Approving a plan after Stop wakes the agent again.** Stop refused the next tool with `continue: false`, which ends Claude Code's
|
|
28
|
+
turn without its Stop hooks, so nothing was left waiting to wake it: you had to type into its window. Now every tool is refused
|
|
29
|
+
until the agent ends its turn itself (in a sentence, seen in about 4 seconds), and approving again wakes the agent that was at
|
|
30
|
+
work (not necessarily the one that drafted the plan).
|
|
31
|
+
- **The wake waits a day, not an hour.** The wake hook gave up an hour after a turn ended, so accepting the architecture the next
|
|
32
|
+
morning started nothing. `init` writes a 24-hour one; `doctor` says when a repository has the old one. (Claude Code documents
|
|
33
|
+
no limit for it; a day-long wait has been seen to start, not to finish.)
|
|
34
|
+
- **A wake you made unnecessary is dropped.** Typing to the agent yourself drops what was waiting to wake it, which otherwise
|
|
35
|
+
woke it once more afterwards to say "still waiting for you".
|
|
36
|
+
- **An agent's status is true when nothing is happening.** A window that has just opened is idle, not working; a window closed
|
|
37
|
+
mid-turn stops counting as working after 15 minutes; and an agent quiet for a while but still listening for the editor is idle,
|
|
38
|
+
not gone.
|
|
39
|
+
- **A plan reads too.** A group of one step is its name over the box, not a frame round it (an agent that gave every step a group
|
|
40
|
+
drew six frames for eight steps), and the layout treats it as no group; an arrow that skips a layer gets a lane in a plan as in
|
|
41
|
+
an architecture; a checkpoint's mark sits where its arrow leaves the box, not on its label. The rules ask for groups only where
|
|
42
|
+
several steps share an area.
|
|
43
|
+
- **One approval, not two.** A plan an agent drew on its own draft architecture is approved with it: Approve plan accepts both,
|
|
44
|
+
and the agent is woken once. The rules tell an agent asked for both to draft both before it stops.
|
|
45
|
+
- **The editor no longer offers you the agent's job.** A step an agent holds has no Mark done, Mark failed or Release in the
|
|
46
|
+
Steps panel, a ready step no Start, and a question the agent has not asked yet is not listed as waiting on you (with "Let it
|
|
47
|
+
start without asking" beside it). In a hand test those were taken for what the run waited on. Each is now in the step's
|
|
48
|
+
Details, under *Do it yourself*.
|
|
49
|
+
- **A finished plan says so.** When every step is done, *Every step is done* waits on you, with Mark plan done, in the inbox, the
|
|
50
|
+
compact view and the tab's count; closing it is what asks about the planned boxes. The agent is told to say that.
|
|
51
|
+
- **What waits in the architecture is seen from anywhere.** The compact view showed only "No plan yet" before there was a plan, so
|
|
52
|
+
an agent's first draft could not be accepted from it (or from the VS Code sidebar or the desktop menu). It lists the draft
|
|
53
|
+
now, and the agents. The editor's Architecture button carries a count, and the empty board says what waits there.
|
|
54
|
+
- **A permission prompt is answered in the editor.** Claude Code's prompts ("run npm test?") could be answered only in its own
|
|
55
|
+
window; the editor said "waiting for you in its own window". A PermissionRequest hook (`init` writes it; `doctor` says when it
|
|
56
|
+
is missing) now puts each one in the inbox and the compact view, before a plan exists too, with the command and **Allow** and
|
|
57
|
+
**Deny** (with why). The window's own prompt works all the while, and whichever you answer first decides (seen with Claude Code
|
|
58
|
+
2.1.319: an answer from the editor is applied and the prompt leaves the window; one in the window runs at once).
|
|
59
|
+
- **An approval says what to look at**: the agent's note on the step it finished (where the app runs, how to try it), where you
|
|
60
|
+
approve it. A person at "You check the app" had to ask the agent where the app was.
|
|
61
|
+
- **Reject takes a reason**, as Send back does, and the agent is woken with it: it no longer has to ask what you wanted. A
|
|
62
|
+
proposal's card names boxes by their labels, not their ids.
|
|
63
|
+
- **Names and labels.** `claude-code:main` reads Claude Code and `server:footprint` DcurseD; an arrow's label shows 26
|
|
64
|
+
characters, cut at a word ("The person checks the app", not "The person c…"), and the layout leaves room for it.
|
|
65
|
+
- **Fewer permission prompts.** The rules ask an agent to write files with its file tools and to keep shell commands plain, which
|
|
66
|
+
a person can allow once: a run that asked about ten times asked twice.
|
|
67
|
+
- **The architecture reads.** Boxes an agent adds later in a frame of their own no longer land on the frames already there; an
|
|
68
|
+
arrow that skips a layer gets a lane of its own, so it runs beside a frame instead of across it and its name; and the diagram
|
|
69
|
+
carries no tech (under each box, under each arrow, beside each frame's name): it is in the side panel and the cards. The rules
|
|
70
|
+
ask agents to draw what runs, not tests or docs, and to keep arrow labels short. Not done: a frame's name is still cut to its
|
|
71
|
+
width, and the view opens at 85% even when the diagram is wider.
|
|
72
|
+
- **ElicitJS 0.1.0-alpha.2** (its link router, ports and node boxes): DiaCode's two additions moved onto it unchanged; arrows dock
|
|
73
|
+
on a box's edge. Pinned to `sosImnotSafe/elicitjs#ebf095f` (branch `external-writes-alpha2`, tag `v0.1.0-alpha.2-dcursed.1`).
|
|
74
|
+
|
|
75
|
+
The desktop app (the fifth part of the next version, `docs/evolution/next-version-plan.md`; `docs/desktop.md`):
|
|
76
|
+
|
|
77
|
+
- **DcurseD as a Mac app, beside `npx diacode` and the VS Code extension.** Open a repository's folder and the app finds the plan server that
|
|
78
|
+
serves it, or starts one (with its own binary as Node, so none need be installed), and shows the full editor in a window. **An icon in the
|
|
79
|
+
menu bar** carries the compact view in a small window under it, with a number beside the icon (and on the Dock) for what waits on you, the
|
|
80
|
+
same count as VS Code's status bar; a right click is its menu. **Native notifications** say when something starts to wait on you (a question,
|
|
81
|
+
a failure, a proposal, a checkpoint, an architecture draft), and a click opens the editor there. Folders opened before are listed and watched
|
|
82
|
+
again at the next start. **Connect an Agent** runs `dcursed init` for the folder. The server, the editor and the compact view are the same
|
|
83
|
+
code the other two use; the menu-bar window reuses the extension's relay, unchanged, and checks every request twice.
|
|
84
|
+
- **An unsigned test build, not a download.** It goes to testers as a zip (`DcurseD-0.2.0-darwin-arm64.zip`), not through npm, the
|
|
85
|
+
Marketplace or a public release. `npm run desktop:install` puts Electron 44.9.3 and its packager in `packages/desktop/tooling/` (about 0.46 GB,
|
|
86
|
+
outside the repository's own install), `npm run desktop` runs the app from a checkout, `npm run desktop:build` makes an **unsigned** (ad hoc
|
|
87
|
+
signed) arm64 `.app` of about 290 MB, and `npm run desktop:check` runs the real app and drives it. Signing, notarising and a DMG wait for the
|
|
88
|
+
Apple Developer account (decision 8b: unsigned test builds first). Checked with 37 unit tests and nine checks of the real app, on the
|
|
89
|
+
checkout and on the built `.app`; not checked: that a notification banner and the menu-bar icon appear on screen, the native menus and
|
|
90
|
+
dialogs, a downloaded copy through Gatekeeper, Intel, Windows.
|
|
91
|
+
|
|
92
|
+
The compact view (the fourth part of the next version, `docs/evolution/next-version-plan.md`):
|
|
93
|
+
|
|
94
|
+
- **`/app/compact`: the plan in brief, in a narrow column.** A page the plan server serves, for the side of an IDE, a small window or a
|
|
95
|
+
browser tab at 240 pixels. It shows the plan's title, phase and progress (a picker when the repository has several plans), who has
|
|
96
|
+
the steps in progress, **what waits on you with the click that answers it**, **Pause, Resume and Stop**, a small diagram with each box
|
|
97
|
+
edged by its status, **what the plan does to the architecture** (the boxes it adds, changes and removes, by name), and **Open full
|
|
98
|
+
screen**. The needs-you list is the editor's inbox, not a copy of it: a question has its box to answer in, a checkpoint **Approve** and
|
|
99
|
+
**Send back**, a failure **Re-plan from this**, a proposal **Accept** and **Reject**, and the architecture's are there too: **Accept
|
|
100
|
+
the architecture** for a draft an agent drew, **Accept** and **Reject** for its proposals. A plan an agent drafted and nobody has
|
|
101
|
+
approved asks for **Approve plan**. It edits no structure: what it cannot do opens the full editor at that step or proposal, through
|
|
102
|
+
new addresses (`/app/#<plan>/step/<step>`, `/app/#<plan>/proposal/<id>`, `/app/#architecture/proposal/<id>`). It follows the plan it
|
|
103
|
+
shows as it happens and looks at the rest every few seconds; the tab's title and icon count what waits on you. It works at 240 pixels
|
|
104
|
+
with no sideways scroll.
|
|
105
|
+
- **In VS Code, Cursor and Antigravity: a DcurseD icon in the activity bar** shows that page in the sidebar, with a badge for what waits on
|
|
106
|
+
you and **Open full screen** in its title bar (it opens the editor in a tab, through a relay that passes on only that request and the
|
|
107
|
+
count). **DcurseD: Show the compact view** opens it from the palette. The status line counts the architecture's draft and proposals too,
|
|
108
|
+
and speaks up when an agent has drawn an architecture and no plan is in progress. Run in the installed VS Code on macOS (a host test opens the view, reads the badge and the open request); Cursor and
|
|
109
|
+
Antigravity are built to the documented contribution points and not run.
|
|
110
|
+
- **Accepting an architecture wakes the agent.** Accepting the draft an agent drew, and accepting or rejecting one of its proposals, are
|
|
111
|
+
calls like approving a plan: the agent that drew the draft is told that its changes are proposals from now on, and the agent that made a
|
|
112
|
+
proposal is told what you decided, each in a sentence that says what to do (and that nothing is the answer when nothing is). Several
|
|
113
|
+
decisions in a row are one call; a call waits while the agent is at work and is dropped if it has read the architecture since; the
|
|
114
|
+
server's own proposals wake no one. The editor says how it went, as it does for an approval.
|
|
115
|
+
- **An abandoned plan proposes dropping what it planned.** As a done plan asks to make its planned boxes real, a plan marked `abandoned`
|
|
116
|
+
asks (as `server:footprint`, once) to remove what it planned and to take `retiring` off what it was going to remove.
|
|
117
|
+
- Not done, and said so: the compact view's picture has no step names; the page is light only (the site has no dark theme), so in a dark
|
|
118
|
+
editor it is a light panel, as the editor tab already is; Windows, other browsers and touch are not run; the menu-bar window is the next
|
|
119
|
+
part (the desktop app).
|
|
120
|
+
|
|
121
|
+
Architecture mode (the third part of the next version, `docs/evolution/next-version-plan.md`):
|
|
122
|
+
|
|
123
|
+
- **A repository has one architecture, and any number of plans.** `.dcursed/architecture.json` (with a layout file and a log, as a
|
|
124
|
+
plan has) is the system as it is. Its boxes are a **person**, **service**, **component**, **store**, **queue** or **group**
|
|
125
|
+
(a frame round others); **external** marks what someone else runs; a box sits in a service or a group (`in`), and an arrow from A
|
|
126
|
+
to B means **A uses B**, with a label, a technology, `async` (A does not wait) and `via` (the queue that carries it). A **flow** is
|
|
127
|
+
an ordered list of steps over those arrows. The format is `dcursed.arch/0`, with its own JSON Schemas, a worked example and rules
|
|
128
|
+
(`docs/schema-arch.md`): a frame takes no arrows (the boxes inside do), nesting cannot loop, one arrow per ordered pair, and loops
|
|
129
|
+
between boxes are fine. Mermaid in (flowchart shapes, `:::external`, dotted arrows, nested subgraphs, and C4's `Person`, `System`,
|
|
130
|
+
`Container`, `Component`, `Rel`) and out.
|
|
131
|
+
- **A Plan | Architecture switch** in the editor says which you are looking at, in the header and in the corner of the board, with how an
|
|
132
|
+
arrow reads there (plan: B comes after A; architecture: A uses B). Every gesture works the same and is saved the same. Each kind is
|
|
133
|
+
drawn as its own shape (a head over a body, a rounded box, a box, a cylinder, a pipe), grey for what someone else runs. The shapes
|
|
134
|
+
are drawn by the editor under the chart's own transparent box, so the library needed no change. Frames nest and **fold** into one
|
|
135
|
+
box that says how much it holds, with its arrows drawn to it; dragging a folded frame moves what is in it. A box's card says what it
|
|
136
|
+
is, what it runs on, what it is for, and its files (the step card's picker); the menu changes a box's kind, who runs it, and
|
|
137
|
+
which frame it is in. **Flows** are numbered on the diagram and play a step at a time; a reply is marked, and a step with no arrow
|
|
138
|
+
behind it is a dashed line with a question mark. The Source drawer shows the architecture as data, Mermaid and spec.
|
|
139
|
+
- **The link between the modes.** A plan step says which boxes it changes (`touches`, a new field of the plan format version 1, which
|
|
140
|
+
is still unreleased), or lists files a box's `files` cover. A box can be `planned` or `retiring` by a plan. **Look at a plan on it**
|
|
141
|
+
and the diagram shows its footprint: new green, changed amber, removed red and struck through, the rest faded, each with an icon
|
|
142
|
+
and a word, and a box's card names the steps that change it. A step's card lists **the boxes it changes**. When a plan is done the
|
|
143
|
+
server proposes making its planned boxes real (as `server:footprint`, once), and you accept.
|
|
144
|
+
- **Drafts, and proposals.** An architecture you draw is accepted from the start. One an agent drafts (`arch_draft`, new MCP tools
|
|
145
|
+
`arch_read`, `arch_draft` and `arch_edit`, with HTTP routes under `/api/architecture`) is a draft: its edits land at once, you
|
|
146
|
+
look it over and **Accept the architecture**, and from then on an agent's structural edits are proposals, a ghost on the diagram
|
|
147
|
+
with Accept and Reject. Accepting wakes the agent (see the compact view, above); it also hears at its next reply, which names the boxes that use
|
|
148
|
+
what it changed. Verified with a real Claude Code 2.1.310: it read a small repository, drew a draft (a person, three services, a
|
|
149
|
+
store, a queue, an outside service, an async arrow, the files each owns, a nine-step flow), and after it was accepted, asked for a
|
|
150
|
+
change and got a proposal.
|
|
151
|
+
- **The six architecture samples** are six of the eight Cursor diagrams, which turned out not to be plans: their arrows mean "calls". They
|
|
152
|
+
moved to `.dcursed/architectures/` with each box's kind, who runs it and which subgraphs are frames said by hand (`tools/arch-samples.mjs`),
|
|
153
|
+
and what Cursor marked NEW as `planned`. The demo lists the two plans and the six architectures separately.
|
|
154
|
+
- **The layered layout knows about frames.** It lays a frame out as one block (what is in it first, then the blocks), so no frame
|
|
155
|
+
holds a box that is not in it, nested to any depth, and it copes with loops. The two named exceptions to that in core's layout
|
|
156
|
+
test are gone with the old samples.
|
|
157
|
+
- **An order-only arrow, and an async one, are dashed.** The library cannot sweep `strokeDasharray`, so the editor sets it on the line the
|
|
158
|
+
chart drew (the one under it that takes the pointer is untouched). This closes the one thing the last part left undone, without a
|
|
159
|
+
library change.
|
|
160
|
+
- Not done, and said so: flows are written by agents or in the Data tab, there is no
|
|
161
|
+
gesture to draw one; there is no needs-review state on the architecture (the reply to an edit names the boxes that use what changed);
|
|
162
|
+
the check of the drawing against the code's imports is later; state
|
|
163
|
+
machines are out of scope; Cursor and Antigravity are built to their documented formats and not run.
|
|
164
|
+
|
|
165
|
+
The editor, reshaped (the second part of the next version, `docs/evolution/next-version-plan.md`):
|
|
166
|
+
|
|
167
|
+
- **No toolbar.** Every thing you do to the diagram has a place of its own, so there is no mode to be in and the letter
|
|
168
|
+
shortcuts (V, C, G, A, X) are gone. Drag a box to move it. Point at a box and dots appear on its edges: drag from one
|
|
169
|
+
to another box to connect them. The **+** beside a box adds a step after it, already connected, with its name ready
|
|
170
|
+
to type (one Undo takes both back). Double-click empty canvas to add a step. Click a box or an arrow to pick it, and
|
|
171
|
+
**Delete** or **Backspace** removes it (the steps either side of a deleted step stay in order). **Right-click**, or the
|
|
172
|
+
menu key, opens a menu: rename; move to a group, or a new one; flip an arrow; say what an arrow means (needs, after,
|
|
173
|
+
approve first, ask first, needs your input); delete. Finished work is shown in it, greyed, with the reason. The
|
|
174
|
+
Gestures tab is a **?** card. This also answers *choosing an arrow's kind on the chart*: it was JSON or an agent.
|
|
175
|
+
A finished step can now be pointed at, picked and added after, though it is still locked against change.
|
|
176
|
+
- **Colours.** Boxes are neutral. The one colour on a plan is **status**, as the edge of the box, and never alone: each
|
|
177
|
+
status has an icon on the box's corner and a word under it (not started, working, waiting, done, failed, cancelled,
|
|
178
|
+
struck through). Every colour holds 4.5:1 or better (the amber and the grey were 3.6:1 and 3.5:1 and are darker), and a
|
|
179
|
+
test measures it and checks that the statuses a colour-blind person could confuse differ in icon and word.
|
|
180
|
+
**Groups are labelled frames** round their members, not fill colours; drop a box inside one to put it in the group.
|
|
181
|
+
Ember keeps its one meaning, what you hold or changed. A checkpoint on an arrow wears an icon (✓ ? ✎), amber while it
|
|
182
|
+
waits for you. A **Legend** says all of it. The six group colours are gone, from the editor, the thumbnails and the front
|
|
183
|
+
page; two samples had a box moved so that no frame holds a stranger (a test checks all eight).
|
|
184
|
+
- **The right panel holds what you are looking at.** Steps, the step card, and Changes. The **Review** tab is gone:
|
|
185
|
+
**proposals are on the diagram** as a ghost with a card beside it (who, why, what it does in words, **Accept** and
|
|
186
|
+
**Reject**, a reason the agent is told, and *1 of 3* to step through); **needs review** is a badge on the box, and
|
|
187
|
+
**Looks fine** is on the step's card. The line above the board is now the **inbox**: it opens to each thing that waits
|
|
188
|
+
(a question with its answer box, a checkpoint with Approve, a failure, a proposal, *Review 3 steps* with **Ask the
|
|
189
|
+
re-planner**), each with its action. Steps for review are in it but do not light the browser tab: they are the ripple of
|
|
190
|
+
your own edit.
|
|
191
|
+
- **A step's files are picked, not typed.** A box under the step's card searches the repository (a new
|
|
192
|
+
`GET /api/files?q=`, from the re-planner's walker: never a dotfile, a key, or anything git ignores). Each file is a chip.
|
|
193
|
+
A pattern says how many files it matches and warns when it matches none; a file the step will create can be named
|
|
194
|
+
before it exists and says *new file*; a folder is added as `folder/**`. Enter picks the best match even if pressed before the
|
|
195
|
+
search has answered.
|
|
196
|
+
- **A Source drawer** slides up from the bottom of the board (the **Source** button, or <kbd>S</kbd>): **Data** (the JSON,
|
|
197
|
+
editable, as the Data tab was), **Mermaid**, and **Spec**, the ElicitJS chart spec the editor builds from the plan,
|
|
198
|
+
read only, each edit as the call that made it and each function by name. It works on the hosted demo too.
|
|
199
|
+
- The front page's figure is fixed with the same gestures (pick the stray box and press Delete; draw from a dot), and
|
|
200
|
+
says there are eleven gestures, not nine.
|
|
201
|
+
Running a plan (the first part of the next version, `docs/evolution/next-version-plan.md`):
|
|
202
|
+
|
|
203
|
+
- **Pause and Stop.** While a plan runs, the plan header has **Pause** (the agents finish the step they are on and
|
|
204
|
+
start nothing new; **Resume** wakes the one that was at work) and **Stop** (pressed twice: the agents stop now, even
|
|
205
|
+
mid-step, and the plan goes back to planning with what was in progress put back). Stop reaches Claude Code through a
|
|
206
|
+
new `PreToolUse` hook that refuses the next tool and ends the turn, OpenCode by its plugin aborting the session, and
|
|
207
|
+
any agent through the dcursed tools, which answer only with the order. Rerun `init` for the hook; `doctor` says when
|
|
208
|
+
it is missing. *Back to planning* is gone: Stop does it.
|
|
209
|
+
- **Arrows say more than "first this".** An arrow can be `after` (order only: changing the step before does not ask
|
|
210
|
+
for the one after to be reviewed) or a **checkpoint** where you come in before the next step starts: `approve` the
|
|
211
|
+
result before it (or send it back, saying why), give the `input` it needs, or answer the question the agent must
|
|
212
|
+
`ask` first (a new tool, `step_ask`). The line above the board counts checkpoints waiting for you, the Steps panel
|
|
213
|
+
lists them with what you can do, and passing one wakes the agent waiting there with what you said. Agents put them
|
|
214
|
+
in a plan with `plan_create` (`after: [{ id, kind }]`). On the chart, an order-only arrow is lighter and a checkpoint
|
|
215
|
+
heavier, amber while it waits for you. Mermaid carries them as dotted (`-.->`) and named thick (`==>|approve|`) arrows.
|
|
216
|
+
- **The plan format is version 1** (`dcursed.plan/1`): version 0 plus arrow kinds, checkpoints and the `paused`
|
|
217
|
+
phase. A version-0 plan reads as version 1 unchanged and is written as version 1 the next time it changes.
|
|
218
|
+
`docs/schema-v0.md` is now `docs/schema.md`.
|
|
219
|
+
- **Mark plan done** is offered only when every step is done, not when the last one has merely started.
|
|
220
|
+
|
|
221
|
+
- **An agent waiting for your permission is said to be waiting for you**, not working, quiet or gone. Claude Code's
|
|
222
|
+
`Notification` hook (permission prompts and MCP dialogs only) and OpenCode's `permission.asked` event put the agent
|
|
223
|
+
in a new presence state, `asking`: its chip says *waiting for you* with the harness's own words (*Claude needs your
|
|
224
|
+
permission*; never the command), a step it holds says so instead of stalling, and the line above the
|
|
225
|
+
board counts it first (*Waiting on you: 1 agent asking you in its window.*). It lasts until the agent is heard from
|
|
226
|
+
again (a refused tool is heard through Claude Code's `PostToolUseFailure`), its process ends (a closed terminal
|
|
227
|
+
runs no `SessionEnd`, so the hook sends Claude Code's process id), or an hour. Found in a real run: an agent
|
|
228
|
+
held 20 minutes on a `curl` prompt showed as working, then gone. Rerun `init` to get the hooks; `doctor` says when
|
|
229
|
+
they are missing.
|
|
230
|
+
- **The answer box says where your answer goes**: straight to an agent listening for the editor, which carries on; any
|
|
231
|
+
other reads it at its next step. It used to say every answer waited for the next step.
|
|
232
|
+
|
|
233
|
+
From running the extension in VS Code with OpenCode on a free model (written up in `docs/spikes/vscode-opencode-run-2026-10-26.md`):
|
|
234
|
+
|
|
235
|
+
- **What you change while a plan runs reaches an agent that has stopped.** It used to hear your edits only at its next
|
|
236
|
+
tool call, so an instruction added just after its last step, or a cancelled step it was waiting on, reached no one.
|
|
237
|
+
A few seconds after your last edit (one call for a burst of edits), an OpenCode or Claude Code agent between turns is
|
|
238
|
+
woken with what changed, its own steps first under `HEADS UP`. Held while it works or waits on a permission prompt,
|
|
239
|
+
and dropped if a tool's reply has told it since. Rerun `init` for the rules line that says so.
|
|
240
|
+
- **A step's details save when you leave the box** (or with ⌘Enter / Ctrl Enter), not only with **Save**: a typed
|
|
241
|
+
instruction once looked made and never left the editor.
|
|
242
|
+
- **Removing a step keeps the order around it**: deleting B from A → B → C in the editor leaves A → C (not for a finished
|
|
243
|
+
step). It used to drop B's arrows, so what came after B could start at once.
|
|
244
|
+
- **Flipping an arrow takes Shift-click** (Move tool). A plain click flipped it, easily by accident while arranging boxes.
|
|
245
|
+
- **`plan_create` questions a plan with no dependencies**: three or more steps and not one `after` is made, with a note
|
|
246
|
+
asking the agent to add the dependencies it meant.
|
|
247
|
+
- **OpenCode after `/new`**: the agent is shown at work on the new session's plan, not the first one's.
|
|
248
|
+
- **A review line about a removed step says it was removed**, not "x now depends on it; it was removed".
|
|
249
|
+
- **A status note may be 2,000 characters** (was 500): an agent's question was refused for its length.
|
|
250
|
+
- **The extension starts its plan server on the port the folder's agents were connected to**, and warns when another
|
|
251
|
+
folder's server has it. *Connect an agent* no longer ends by telling you to start a server the extension runs.
|
|
252
|
+
|
|
253
|
+
## 0.1.0 (2026-10-25)
|
|
254
|
+
|
|
255
|
+
The first release: a plan as a file, edited by you and by agents.
|
|
256
|
+
|
|
257
|
+
- **The plan is a file.** `.dcursed/plans/<id>.plan.json` (schema v0), with its layout in a file of its
|
|
258
|
+
own and an op log beside it. A hand edit to the file shows in the editor; an edit in the editor is a clean
|
|
259
|
+
git diff.
|
|
260
|
+
- **A local plan server** (`dcursed serve`) owns the files: one writer, operations against a base revision,
|
|
261
|
+
the editor at `/`. It listens on 127.0.0.1 only.
|
|
262
|
+
- **An editor in the browser**: drag, connect, group, add and delete steps; a Steps panel for execution (who
|
|
263
|
+
has which step, how that is known, what is waiting, failed or stalled); a Review panel; Mermaid and
|
|
264
|
+
Cursor `.plan.md` import. A box dragged to the edge of the canvas stays whole (the chart used to cut it in
|
|
265
|
+
half), the board has a visible edge, and a plan opens readable with zoom, Fit, panning and a map for the
|
|
266
|
+
part that is out of view. Plans are chosen from a switcher, not a row of tabs, so the board gets the height.
|
|
267
|
+
- **A plan an agent drafts appears in an open editor** (a `GET /api/events` stream of the plan list), offered
|
|
268
|
+
with **Open it**, or opened at once when there was none. A repository with no plans gets a first screen with the three
|
|
269
|
+
ways to start; a lost server gets a banner; a step moves with the arrow keys and renames with Enter, and only
|
|
270
|
+
steps are tab stops. `npm run check:editor` drives the built editor and landing page in a real Chrome.
|
|
271
|
+
- **Approving a plan starts the agent.** Pressing **Approve plan**, or answering a question an agent stopped on,
|
|
272
|
+
gives the agent that should act on it a turn with the words, so nothing is copied from the editor into the
|
|
273
|
+
agent's window. OpenCode's plugin and a Claude Code hook that waits when a turn ends (`asyncRewake`) each keep a
|
|
274
|
+
request open to the plan server for it (`POST /api/agent/wait`, `/hooks/claude-code/wake`); the editor says
|
|
275
|
+
whether the agent was told, is mid-turn, or could not be, and only then offers the sentence to copy. Cursor and
|
|
276
|
+
Antigravity cannot be woken yet. Checked with a real Claude Code session: six seconds after the approval it had
|
|
277
|
+
started the step, and three later it was done.
|
|
278
|
+
- **MCP tools for agents**: `plan_list`, `plan_read`, `plan_create`, `plan_edit`, `step_start`, `step_done`,
|
|
279
|
+
`step_failed`, `step_wait`. Every reply carries what changed since the agent last looked, and a heads-up
|
|
280
|
+
when you changed a step it holds.
|
|
281
|
+
- **Adapters**: OpenCode (a plugin), Claude Code (HTTP hooks), Cursor and Antigravity (command hooks), all
|
|
282
|
+
through one neutral event service. `dcursed init <harness>` writes each one's configuration.
|
|
283
|
+
OpenCode and Claude Code have been run with real models; Cursor and Antigravity are built to their
|
|
284
|
+
documented formats and have not been run with their agents.
|
|
285
|
+
- **A reconciler**: a separate read-only OpenCode session that proposes re-plans (never a status) when you
|
|
286
|
+
change a step, when a step fails, and when work happens outside the plan. Off unless you ask.
|
|
287
|
+
- **`dcursed doctor`** checks the repository, each agent's configuration and the plan server against each
|
|
288
|
+
other and prints the command that fixes what it finds; `dcursed init <harness|all> --remove` takes out
|
|
289
|
+
again only what `init` wrote.
|
|
290
|
+
- **The phase is yours to set from the editor**: **Start executing** is the approval after which an agent's
|
|
291
|
+
changes to steps and arrows arrive as proposals; **Back to planning**, **Mark plan done** and **Reopen**
|
|
292
|
+
complete it.
|
|
293
|
+
- **The VS Code extension** (VS Code, Cursor and Antigravity): the plan server started for the folder, the
|
|
294
|
+
editor in a panel, `*.plan.json` opened as a diagram, a status bar, and *Check this repository's setup*.
|
|
295
|
+
- **A Claude Code plugin and marketplace** (`/dcursed:setup`, `/dcursed:doctor`, `/dcursed:plan`).
|
|
296
|
+
- **By hand, too.** A ready step has **Start** and **Mark done** in the Steps panel, so a plan can be walked to its
|
|
297
|
+
end with no agent. `init` and `doctor` print commands the way you ran them (`npx dcursed …` after `npx`).
|
|
298
|
+
`init claude-code` keeps the personal settings file out of git for your clone.
|
|
299
|
+
- **Local only.** The server listens on 127.0.0.1, makes no network requests and has no telemetry. Windows is
|
|
300
|
+
untested; Node 22 or newer is required.
|
|
301
|
+
- **What waits on you is said where you will see it.** A line above the board counts questions, failures, stalled steps
|
|
302
|
+
and proposals; the browser tab's title and icon carry the count, and so does the VS Code status bar. Each agent's chip
|
|
303
|
+
says what it has been shown of the plan (*has seen everything*, or *has not seen the last 2 changes*). The plan's header
|
|
304
|
+
holds its goal, its phase and **Approve plan**, which says that it starts no agent and offers the prompt to give one.
|
|
305
|
+
- **A step has a card.** Click a box, press Space on one, or press Details on a row: the Steps panel shows what the
|
|
306
|
+
step's status is and how that is known, what done means and the files that make "seen" work (both editable, each saved
|
|
307
|
+
as one edit of yours), what it depends on and what waits on it, and what has been done to it. Pressing Save twice in a
|
|
308
|
+
row no longer drops the second.
|
|
309
|
+
- **A proposal shows the words it would write**, before and after, for a step's `detail` and the plan's `goal`.
|
|
310
|
+
The line under each box says its status in words (*done*, *failed*, *waits on grid.js*) and a blocked step is no longer
|
|
311
|
+
faded to 60%; the live figure on the front page works from the keyboard.
|
|
312
|
+
- **Safer by default.** The re-planner's prompt no longer includes dotfiles, key files or anything git ignores; the
|
|
313
|
+
server trusts only its own origin unless told otherwise (`--allow-origin`); a second server for one folder refuses to
|
|
314
|
+
start; a `files` glob can no longer hold the server for seconds, and `files` and `detail` have size limits; a plan log
|
|
315
|
+
damaged by a git merge is re-baselined once, not at every start. `dcursed doctor --report` prints a report to paste
|
|
316
|
+
into an issue, with paths replaced; `/api/health` carries a version.
|
|
317
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sosImnotSafe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,74 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dcursed
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**A plan you and your coding agents share.**
|
|
4
|
+
|
|
5
|
+
A plan is a file in your repository, `.dcursed/plans/<name>.plan.json`. You and your agents both edit
|
|
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
|
+
file under the same rules. Status comes from what the agents actually do: a step goes in progress when an
|
|
8
|
+
agent's tools touch its files, not only when the agent says so, and each step shows how it is known (seen,
|
|
9
|
+
said, or set by you).
|
|
10
|
+
|
|
11
|
+
A repository also has one **architecture**: its services, components and stores, and what uses what, drawn in the same
|
|
12
|
+
editor (the **Plan | Architecture** switch). A plan shows on it as what it adds, changes and removes. You can **Pause** or
|
|
13
|
+
**Stop** a running plan, put **checkpoints** on its arrows where you approve, answer or give input before the next step
|
|
14
|
+
starts, and keep an eye on it from a narrow **compact view** (`/app/compact`, also in the sidebar of the VS Code
|
|
15
|
+
extension).
|
|
16
|
+
|
|
17
|
+
For **OpenCode** and **Claude Code**, and built for **Cursor** and **Antigravity** (to their documented
|
|
18
|
+
formats; not yet run with their agents). Local only: the plan server listens on 127.0.0.1, nothing is sent
|
|
19
|
+
anywhere, and there is no telemetry.
|
|
20
|
+
|
|
21
|
+
## In five minutes
|
|
22
|
+
|
|
23
|
+
You need Node 22 or newer, and a repository.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd your-repo
|
|
27
|
+
npx diacode init claude-code # or: opencode, cursor, antigravity, all
|
|
28
|
+
npx diacode serve # leave it running; the editor is at http://127.0.0.1:7300/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Start your agent in that folder and ask it for a plan, for example *"Draft a plan for adding a --format
|
|
32
|
+
flag to the CLI, using the dcursed tools."* The plan appears in the editor as it is written. Reshape it
|
|
33
|
+
(drag, connect, reword, add); your agent reads what you changed at its next step. Press **Approve plan** and
|
|
34
|
+
the agent that drafted it is told to carry it out (OpenCode and Claude Code; for the others, tell it yourself);
|
|
35
|
+
the steps show who has which and what is done, and what you change while it runs reaches it, even once it has stopped.
|
|
36
|
+
|
|
37
|
+
Something off? `npx diacode doctor` checks the repository, the agents' configuration and the server
|
|
38
|
+
against each other and says what to run.
|
|
39
|
+
|
|
40
|
+
## What `init` writes
|
|
41
|
+
|
|
42
|
+
Each in the file that harness reads. It is safe to run again, and it leaves everything of yours alone (a
|
|
43
|
+
config with comments is yours: it says what to add instead).
|
|
44
|
+
|
|
45
|
+
| | MCP (the plan tools) | Hooks or plugin (what the agent does, what you changed) | Rules |
|
|
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` |
|
|
51
|
+
|
|
52
|
+
Commit the MCP entries and rules if you want your team to have them; the hooks assume a plan server on
|
|
53
|
+
your machine, so Claude Code's go in your own settings file by default.
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
| | |
|
|
58
|
+
|---|---|
|
|
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) |
|
|
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 |
|
|
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.
|
|
67
|
+
|
|
68
|
+
## Not yet
|
|
69
|
+
|
|
70
|
+
Windows is untested. The hooks are shell commands that use `curl`. Cursor and Antigravity have not been run with their
|
|
71
|
+
agents. The Mac desktop app is not part of this package: it is an unsigned test build, sent to testers.
|
|
72
|
+
|
|
73
|
+
Upgrading from 0.1.0: run `npx diacode init <agent>` again in each repository (it adds the hooks Stop needs). A plan
|
|
74
|
+
from 0.1.0 is read as it was and written in the new format when it next changes; 0.1.0 cannot read the new format.
|