claude-do-it 0.1.1 → 0.1.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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # claude-do-it
2
2
 
3
+ [![CI](https://github.com/DomiR/claude-do-it/actions/workflows/ci.yml/badge.svg)](https://github.com/DomiR/claude-do-it/actions/workflows/ci.yml)
4
+
3
5
  **A Markdown todo that you and Claude edit at the same time.**
4
6
 
5
7
  You type in a browser editor. Claude reads the list, plans each task, hands it
@@ -9,6 +11,11 @@ on disk all merge instead of overwriting each other: every open file is one
9
11
  [Loro](https://loro.dev) CRDT held by a small daemon on your machine. The file
10
12
  itself stays plain Markdown, so any other editor still works on it.
11
13
 
14
+ <picture>
15
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/editor-dark.png">
16
+ <img alt="The do-it editor: a Markdown todo with tasks, tags, and the status lines agents write under each task" src="docs/images/editor-light.png">
17
+ </picture>
18
+
12
19
  ```mermaid
13
20
  flowchart LR
14
21
  you["You<br/>browser editor"] <-->|"live sync"| daemon
@@ -27,9 +34,11 @@ flowchart LR
27
34
  on demand and stops after 30 idle minutes.
28
35
  - **The browser editor.** Built with Foldkit and CodeMirror 6. It keeps the
29
36
  todo as plain Markdown while showing a live PlainTasks preview with markers,
30
- tags, actions, stamps, and a command palette. Task lines always stay
31
- rendered: markers show as ☐ ✔ ✘ and links as their text, with a popover to
32
- edit them.
37
+ tags, actions, stamps, and a command palette. Every line stays rendered
38
+ while you edit it: Markdown you type renders as soon as it is complete, a
39
+ formatting bar on top applies the same formats, task markers show as ☐ ✔ ✘
40
+ and delete like one character, and links show as their text with a popover
41
+ to edit them.
33
42
  - **The `/do-it` skill for Claude Code.** It turns a session into a conductor
34
43
  that sizes, plans, and delivers every task through worker agents and one
35
44
  shared tester.
@@ -38,9 +47,37 @@ flowchart LR
38
47
 
39
48
  Needs [Bun](https://bun.sh) 1.3 or newer on macOS or Linux.
40
49
 
50
+ ### As a Claude Code plugin
51
+
52
+ In Claude Code:
53
+
54
+ ```
55
+ /plugin marketplace add DomiR/claude-do-it
56
+ /plugin install do-it@do-it
57
+ ```
58
+
59
+ Or from a terminal:
60
+
61
+ ```bash
62
+ claude plugin marketplace add DomiR/claude-do-it
63
+ claude plugin install do-it@do-it
64
+ ```
65
+
66
+ The plugin brings the skill and the `do-it` command, with nothing else to
67
+ install. Claude Code puts the plugin's `bin` folder on its Bash tool's PATH,
68
+ and the `do-it` there runs the published CLI of the same version through
69
+ `bunx`, which downloads it on first use. A `do-it` you installed yourself comes
70
+ first, so keep it as current as the plugin. Plugin skills carry the
71
+ plugin's name, so the command is `/do-it:do-it`. The plugin's `do-it` exists
72
+ only inside Claude Code: to run `do-it open TODO.md` in your own terminal, also
73
+ install the CLI as below.
74
+
75
+ ### With the CLI
76
+
41
77
  ```bash
42
78
  bun add -g claude-do-it # or: npm install -g claude-do-it (Bun still runs it)
43
79
  do-it skill install # the /do-it skill, copied into ~/.claude/skills/do-it
80
+ do-it doctor # checks Bun, PATH, the daemon, and the skill
44
81
  do-it --help
45
82
  ```
46
83
 
@@ -48,6 +85,15 @@ Run `do-it skill install` again after upgrading to refresh the skill. It never
48
85
  replaces a skill directory it did not create unless you pass `--force`.
49
86
  `do-it --skill` prints the skill, and `do-it skill path` shows where the
50
87
  package keeps it. To try it without installing, use `bunx claude-do-it open TODO.md`.
88
+ Skip `do-it skill install` when you use the plugin: you would get the skill
89
+ twice, as `/do-it` and `/do-it:do-it`.
90
+
91
+ `do-it doctor` checks that Bun is 1.3 or newer, which `do-it` your PATH finds (a
92
+ repo checkout, the global bun install, a bunx copy, or a global npm install),
93
+ that a running daemon has this CLI's version and build, and that the installed
94
+ skill matches the one this package ships. It prints one line per check and the
95
+ exact command that fixes each problem, never starts the daemon, and exits 1
96
+ when it finds a problem. `--skill-dir DIR` checks a skill installed elsewhere.
51
97
 
52
98
  The command is `do-it`, not `do`: `do` is a reserved word in bash and zsh.
53
99
 
@@ -70,12 +116,38 @@ ln -s "$PWD/skill" ~/.claude/skills/do-it # the skill, always c
70
116
  /do-it PLAN.md
71
117
  ```
72
118
 
73
- The browser opens on the todo. Add one task per line. The session sizes each
74
- task, plans it, starts a worker in its own worktree, and writes one status line
75
- under it, plus any question it needs you to answer (answer by writing under the
76
- question). Delivered tasks are checked off with their branch and test result.
77
- Inside Herdr (`HERDR_ENV=1`) the workers are Claude architects in Herdr
78
- worktrees and tabs with Codex lanes; elsewhere they are Claude Code subagents.
119
+ With the plugin, the command is `/do-it:do-it` (for example `/do-it:do-it PLAN.md`).
120
+
121
+ The browser opens on the todo (inside Sheprd, in a split beside the
122
+ conversation). Add one task per line. The session is a conductor: it marks each
123
+ task `@started` as soon as it picks it up, sizes it, and delegates the rest
124
+ (planning, building, the single test queue, review, and answers to questions)
125
+ to agents, watching them instead of doing the work itself. Each task gets one
126
+ status line under it, plus any question it needs you to answer (answer by
127
+ writing under the question). Delivered tasks are checked off with `@done`,
128
+ their branch, and their test result. An optional messenger agent can write
129
+ those lines for the conductor.
130
+
131
+ Small tasks are planned by Opus and built by a Sonnet worker; medium ones use
132
+ Opus for both. Large tasks use a stronger planner, reviewer, and model when the
133
+ session finds one (an agent type or a CLI on PATH), otherwise Opus, and are always split
134
+ into subtasks written under the task. The first subtask is `Review this task`:
135
+ nothing is built until you check it off, and you can edit the other subtasks
136
+ before you do.
137
+
138
+ PlainTasks tags steer the work: `@critical`, `@high`, and `@today` go first,
139
+ `@low` last, and `@due(date)` reaches the worker as a deadline. Agents never
140
+ change your tags; `@started`, `@done`, and `@cancelled` come only from the
141
+ `do-it todo` commands.
142
+ The skill checks where it runs and starts workers there:
143
+
144
+ | Where | Workers |
145
+ | --- | --- |
146
+ | Herdr (`HERDR_ENV=1`) | one Claude session per task in a Herdr worktree and space, started in the background |
147
+ | [Orca](https://www.onorca.dev) | one Orca worktree per task, with Claude in a terminal of its own (`orca worktree create`, then `orca terminal create`) |
148
+ | [T3 Code](https://github.com/pingdotgg/t3code), with its `t3` CLI | one T3 Code thread per task, in its own worktree (`t3 thread start --worktree`) |
149
+ | super.engineering (formerly Superconductor), with its `sc` CLI | one super.engineering worktree per task with a Claude session working it, started in the background (`sc worktree create --background`) |
150
+ | Any other terminal | Claude Code subagents in worktrees, which need nothing beyond Claude Code |
79
151
 
80
152
  Set `DO_IT_BROWSER` to the command that should open links, or to `true` to
81
153
  open nothing.
@@ -95,6 +167,7 @@ do-it diff TODO.md --since 9 --wait 300
95
167
  do-it watch TODO.md --todos # or --settle 25 for one line per pause
96
168
  do-it status
97
169
  do-it stop
170
+ do-it doctor # what is wrong with this install, and how to fix it
98
171
  ```
99
172
 
100
173
  ### How versions work
@@ -105,6 +178,14 @@ document has moved on, nothing is applied and the reply is the latest version
105
178
  plus a diff (exit 1). With `--section ID` a stale version still applies while
106
179
  that section is unchanged.
107
180
 
181
+ `do-it watch TODO.md --settle 25` prints one `Settled at version N by WHO`
182
+ line once nobody changed the document for 25 seconds. When the person's latest
183
+ change adds a line (Enter at the end of a task or inside one), it settles after
184
+ `--settle-line` seconds instead (2 by default), so a new todo reaches the agents
185
+ at once. Every other change (typing, editing or deleting text, toggling a box)
186
+ waits the full `--settle`. Set `--settle-line` to the `--settle` value to
187
+ always wait the full period.
188
+
108
189
  A resumed watch that missed history prints
109
190
  `Missed changes, now at version N: run do-it read`. Use `--quiet` to skip the
110
191
  initial `Watching PATH at version N` line.
@@ -115,7 +196,7 @@ agent.
115
196
  | Exit code | Meaning |
116
197
  | --- | --- |
117
198
  | 0 | Done |
118
- | 1 | Refused, or version mismatch |
199
+ | 1 | Refused, version mismatch, or a problem `do-it doctor` found |
119
200
  | 2 | Invalid arguments |
120
201
  | 3 | The daemon is not running and could not start |
121
202
  | 4 | Nothing changed yet |
@@ -132,10 +213,18 @@ agent.
132
213
  | Move up | `Cmd-Ctrl-Up` or `Alt-Up` | `Ctrl-Shift-Up` or `Alt-Up` |
133
214
  | Move down | `Cmd-Ctrl-Down` or `Alt-Down` | `Ctrl-Shift-Down` or `Alt-Down` |
134
215
  | Continue task | `Enter` | `Enter` |
216
+ | Note under the task (folds with it) | `Shift-Enter` | `Shift-Enter` |
135
217
  | Expand a PlainTasks tag, or indent | `Tab` | `Tab` |
136
218
  | Outdent | `Shift-Tab` or `Cmd-[` | `Shift-Tab` or `Ctrl-[` |
137
219
  | Open link | `Cmd-Shift-U` or `Alt-Enter` | `Alt-Enter` |
138
- | Edit link (or click a link on a task line) | `Cmd-K` | `Ctrl-K` |
220
+ | Edit link (or click a link) | `Cmd-K` | `Ctrl-K` |
221
+ | Bold | `Cmd-B` | `Ctrl-B` |
222
+ | Italic | `Cmd-Shift-I` | `Alt-Shift-I` |
223
+ | Strikethrough | `Cmd-Shift-X` | `Ctrl-Shift-X` |
224
+ | Inline code | `Cmd-E` | `Ctrl-E` |
225
+ | Task line on or off | `Cmd-Alt-4` | `Ctrl-Shift-4` |
226
+ | Bulleted line on or off | `Cmd-Alt-5` | `Ctrl-Shift-5` |
227
+ | Project heading on or off | `Cmd-Alt-2` | `Ctrl-Shift-2` |
139
228
  | Go to project | `Cmd-P` | `Ctrl-P` |
140
229
  | Command palette | `Cmd-Shift-P` or `F1` | `Ctrl-Shift-P` or `F1` |
141
230
  | Find | `Cmd-F` | `Ctrl-F` |
@@ -150,7 +239,10 @@ There is one daemon per user. Any command starts it on demand; `do-it stop` or
150
239
  record, a per user token (mode 0600), the log, and the last version of each
151
240
  file, so version numbers survive restarts. It listens on `127.0.0.1:47100`
152
241
  (`DO_IT_PORT`) and only answers requests that carry the token or the browser
153
- cookie the `open` link sets.
242
+ cookie the `open` link sets. The runtime record and `/health` also carry a
243
+ build id (the npm build's id, or `source:` and the checkout path), which
244
+ `do-it doctor` compares with its own. In a checkout that id names the
245
+ checkout, not the revision, so after a `git pull` run `do-it stop` yourself.
154
246
 
155
247
  ## How it's built
156
248
 
@@ -173,12 +265,50 @@ in [docs/plan.md](docs/plan.md) and [docs/design.md](docs/design.md).
173
265
 
174
266
  ```bash
175
267
  bun run test # unit, daemon, and end to end tests
176
- bun run typecheck
268
+ bun run check # typecheck (effect-tsgo tsc)
269
+ bun run lint # Oxlint with the Effect rules
270
+ bun run format # oxfmt (bun run fmt:check only checks)
177
271
  bun run build:web
178
272
  bun run build:npm # the npm package, in dist/npm
179
273
  bun --cwd packages/web run dev # editor with a proxy to the daemon on 47100
180
274
  ```
181
275
 
276
+ CI runs the typecheck, lint, format check, tests, and both builds on every push
277
+ and pull request.
278
+ `claude plugin validate . --strict` checks the plugin and marketplace manifests.
279
+
280
+ ### Release
281
+
282
+ Set `APP_VERSION` in `packages/protocol/src/index.ts` (the npm package takes its
283
+ version from it), and the same version in `.claude-plugin/plugin.json` and in
284
+ the pinned `claude-do-it@` version in `bin/do-it` (`tests/plugin.test.ts` checks
285
+ that the three match). Add a section for the new version at the top of
286
+ `CHANGELOG.md`. Commit to `main`, then tag and push:
287
+
288
+ ```bash
289
+ git tag vX.Y.Z && git push origin vX.Y.Z
290
+ ```
291
+
292
+ The Release workflow checks that the tag equals `v` plus `APP_VERSION` and the
293
+ `version` in `.claude-plugin/plugin.json`, runs the CI checks, builds
294
+ `dist/npm`, and publishes it to npm with trusted publishing (OIDC), which adds
295
+ provenance itself. No `NPM_TOKEN` secret is needed. The job has
296
+ `id-token: write`, runs on a GitHub-hosted runner, and installs the latest npm
297
+ first, because trusted publishing needs npm 11.5.1 or newer. The plugin's
298
+ `do-it` runs that exact npm version, so a plugin installed from `main` fails
299
+ until the workflow has published it: push the tag right after the commit.
300
+
301
+ One time setup on npmjs.com, as the `domir` account: open the package
302
+ `claude-do-it`, then Settings, Trusted Publisher, and choose GitHub Actions.
303
+ Enter the organization or user `DomiR`, the repository `claude-do-it`, and the
304
+ workflow filename `release.yml` (the filename only, with the extension), and
305
+ leave the environment empty. Under allowed actions, tick `npm publish`: the
306
+ workflow publishes directly. The fields are case sensitive, npm does not check
307
+ them when you save, and a new configuration must finish its first successful
308
+ publish within two days. A wrong value shows up only as a failed publish.
309
+ Afterwards, set Publishing access to "Require two-factor authentication and
310
+ disallow tokens".
311
+
182
312
  ## Acknowledgements
183
313
 
184
314
  The editor's notebook colours, PlainTasks markers, tag completions, stamps, and