diacode 0.2.1 → 0.2.2

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,46 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2 (2026-11-11): the staged flow
4
+
5
+ **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
6
+ 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:
7
+ you write the task; the agent draws the architecture and stops; you edit it and approve; the agent draws the
8
+ plan and stops; you edit it and approve; the agent checks the architecture against the plan and asks you about any change; you finalize
9
+ both and press **Start**. After that, a change to either side is told to the agent, which proposes the matching change on the other.
10
+
11
+ **Upgrading from 0.2.1.** Run `npx diacode init <agent>` again in each repository (it rewrites the rules file the agent reads; `doctor`
12
+ 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
13
+ 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
14
+ architectures from 0.2.1 are read as they were.
15
+
16
+ - **The editor has one bar, in Plan and in Architecture.** *Task › Architecture › Plan › Start › Running*, the stage underlined, a
17
+ sentence saying what to do, and the one button: **Approve architecture**, **Approve plan**, **Start** (grey while the agent is
18
+ still at work, or a change it proposed waits for you, and it says why), then **Pause**, **Stop**, **Resume**, **Mark plan done**.
19
+ The stage is worked out by the plan server from what exists (`GET /api/flow`), nothing is stored for it. The *Plan* and
20
+ *Architecture* tabs count what waits on the side you are not looking at.
21
+ - **Approving the plan no longer starts it.** The plan has a new phase, *approved*: the agent is woken to check the architecture
22
+ against the plan, once (every part the plan adds is a box marked planned, each step lists the boxes it changes) and its changes
23
+ to the architecture are proposals you accept or reject. Only **Start** carries the plan out, and until then an agent is refused any
24
+ step it tries to start. **Stop** now takes the plan back to *approved* (it used to be *planning*), so Start carries on.
25
+ - **The architecture is drawn first, even in an empty folder.** The rules file, the start of every turn (Claude Code adds the stage
26
+ to your message through its prompt hook; OpenCode through its plugin's request text) and the end of every DiaCode tool's answer
27
+ say the stage and the one move. A weaker model that skims its rules still draws the architecture first: **`plan_create` is
28
+ refused until there is an architecture the person has approved** (unless the person said they want none, `no_architecture`), and
29
+ 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
30
+ to the plan when it is drawn (so *make what it planned real* works for a plan that started from nothing).
31
+ - **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
32
+ 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
33
+ in its window anyway nothing breaks: the flow carries on from your answer there.
34
+ - **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
35
+ last edit with *make the architecture agree*, and what you change on the architecture with *make the plan agree*; its answer is a
36
+ proposal on the other side. **Pause is where you edit**: Resume tells the agent what changed on both sides in one message.
37
+ Accepting or rejecting what it proposed is not a change it has to follow, so nothing loops; a rejected architecture proposal tells
38
+ it to adjust the plan steps that depended on it.
39
+ - `init` and `doctor` print the order in words; `doctor` flags rules written by an older init. The compact view, the VS Code status
40
+ line and the desktop app know the new phase, and the plan's approval waits for a draft architecture's.
41
+ - Smaller: the buttons of the bar keep their place when **Stop** asks again (it asked to be pressed twice, and a click on the
42
+ second moved onto Pause); a plan with a draft architecture asked for two approvals at once in the compact view.
43
+
3
44
  ## 0.2.1 (2026-11-10)
4
45
 
5
46
  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 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.
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.