Wire the loop into Claude Code

turtwig

Claude wrote the doc. Reviewers commented on it. Now you want Claude to address the comments without you copy-pasting between a browser and a terminal. The CLI is the shortest path.

The loop, in 30 seconds

~/projects/checkout-v2 · zshlive
§01

One-time install + workspace init

npm install -g @duodoc/cli
cd ~/projects/my-feature
duodoc init

duodoc init drops a .duodoc/duodoc.json stub that tells subsequent commands which server to talk to and which doc this directory is bound to (filled in on first push).

§02

Push the artifact Claude just produced

duodoc push design.html
# → https://<server>/d/design-abc123/v/1

The URL is the share primitive. Send it to reviewers in the same message you'd send the file otherwise. Subsequent pushes from the same directory create new versions of the same doc (not new docs), so the URL is stable.

§03

Pull comments back into the repo

Once reviewers have left comments, pull them as a plain-Markdown sidecar:

duodoc pull
# writes:
#   design.html             (the latest version's raw HTML)
#   .duodoc/comments.md     (every open comment, anchored)

The sidecar is a file an agent can read. Each comment block includes the anchored selection, the author, and the body — same structure for top-level comments and threaded replies.

§04

Ask the agent to address them

Inside a Claude Code session, tell the agent:

Address every open comment in .duodoc/comments.md by editing design.html, then run duodoc push design.html.

Or skip the natural-language step and let the CLI run the loop in batch:

ANTHROPIC_API_KEY=sk-ant-… duodoc address --all

That iterates through every unresolved top-level comment, asks Claude to make a surgical edit per comment, and creates a new version each time — auto-resolving the comment on success. You end up at v5 or so, with a clean diff per round.

§05

Iterate without leaving the terminal

The reviewer side stays in the browser. The agent side stays in the terminal. The URL is the rendezvous. Re-comment, re-pull, re-address until the doc is ready.

When you're done, pull one last time, commit design.html + .duodoc/duodoc.json to your repo. The history of the conversation lives on the duodoc URL; the artifact lives in the repo.