[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77917":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":13,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":28,"discoverSource":29},77917,"roughdraft","Lex-Inc\u002Froughdraft","Lex-Inc","Review markdown docs in a nice interface that lets you leave comments","https:\u002F\u002Fwww.roughdraft.page",null,"TypeScript",355,42,2,25,0,14,52,240,91.9,false,"main",true,[],"2026-06-12 04:01:22","# Roughdraft\nA local-first markdown editor and viewer for working with AI.\n\n{==Open one markdown file on your machine. Review it, comment on it, and suggest edits.==}{>>What does this mean?\u003C\u003C}{id=\"c3\" by=\"user\" at=\"2026-04-30T20:18:51.163Z\"}{>>It means Roughdraft works with a normal local Markdown file: you open one .md file from your computer, read it in the app, leave inline comments, and propose edits that are saved back into the Markdown using CriticMarkup.\u003C\u003C}{id=\"c4\" by=\"AI\" at=\"2026-04-30T20:19:39.000Z\" re=\"c3\"}{>>cjool\u003C\u003C}{id=\"c5\" by=\"user\" at=\"2026-05-07T20:38:25.621Z\" re=\"c4\"}\n\nPaste this into your coding agent:\n\n```text\nInstall Roughdraft for me using `npm i -g roughdraft`, then read https:\u002F\u002Froughdraft.md\u002Fsetup.md and set yourself up to use it.\n```\n\nOr install and open a file yourself:\n\n```bash\nnpm i -g roughdraft\nroughdraft open \u002Fabsolute\u002Fpath\u002Fto\u002Ffile.md\n```\n## What is this?\nRoughdraft is a local-first markdown editor and viewer that runs on your computer.\n\nIts job is to make markdown files easy to open, read, edit, review, and discuss with your AI agent without moving them into a proprietary format or a hosted app.\n\nRoughdraft opens a single markdown file directly for CriticMarkup comments and suggested changes.\n## How it works\n- **Local-first markdown editor** — Open normal `.md` files from your machine and edit them directly\n  \n- **Works with your AI agent** — Tell your local agent to open a file in Roughdraft on your computer, then keep collaborating from there\n  \n- **Comments & suggested changes** — Use CriticMarkup for inline feedback, revisions, and review conversations\n  \n- **Markdown files on disk** — Everything stays as regular markdown files you can also edit in VS Code, Vim, Cursor, or anywhere else\n  \n- **No cloud, no account, no telemetry** — Runs entirely on your machine\n  \n## Quick start\nInstall Roughdraft and start the local server:\n\n```bash\nnpm i -g roughdraft\nroughdraft start\n```\n\n`roughdraft start` runs Roughdraft in the background, reuses or chooses a free localhost port, writes server state to `~\u002F.roughdraft\u002Fserver.json`, prints the active URL, and exits while the server keeps running.\n\nOpen a specific markdown file:\n\n```bash\nroughdraft open .\u002Fpath\u002Fto\u002Fmy-essay\u002Fdraft.md\n```\n\nFor scripts and agents that need a URL without launching a browser:\n\n```bash\nroughdraft open .\u002Fpath\u002Fto\u002Fmy-essay\u002Fdraft.md --print-url\nroughdraft status --json\n```\n\nCheck or stop the background server:\n\n```bash\nroughdraft status\nroughdraft stop\n```\n\n`roughdraft open` will reuse the running server and auto-start it if needed. You can also use `roughdraft .\u002Fpath\u002Fto\u002Ffile.md` as a shortcut when the input clearly looks like a path.\n\nRoughdraft does not edit `~\u002FCLAUDE.md`, `~\u002FAGENTS.md`, or other user-level agent files. The setup prompt asks your agent to update its own guidance.\n\nIf the local server is already running, you can also open a file directly by URL:\n\n```text\nhttp:\u002F\u002Flocalhost:7373\u002F?path=\u002Fabsolute\u002Fpath\u002Fto\u002Fmy-essay\u002Fdraft.md\n```\n\nThat makes an agent-friendly workflow possible:\n\n1. Your AI writes or updates markdown files on disk.\n  \n2. You tell it to open a markdown file in Roughdraft.\n  \n3. Roughdraft opens locally on your machine.\n  \n4. You read, edit, leave comments, and suggest changes.\n  \n5. You click **Done Reviewing** in Roughdraft, and the AI can respond to your comments or revise the document.\n  \n\nAgents can watch that handoff directly:\n\n```bash\nroughdraft open .\u002Fpath\u002Fto\u002Fmy-essay\u002Fdraft.md --json\n```\n\n`roughdraft open` starts or reuses the local server, opens the document, registers a fresh watcher, blocks until the next `review.completed` event, then prints event JSON with the document path, file version, and feedback counts. By default there is no watch timeout; pass `--timeout \u003Cseconds>` when you want one. Use `--no-watch` when you only want to open the document and return immediately. If no watcher is active when you click **Done Reviewing**, Roughdraft shows a fallback prompt you can copy into the agent.\n\nExperimental MCP clients can start the stdio server with:\n\n```bash\nroughdraft mcp\n```\n\nThe MCP server exposes tools to read the review index, list pending feedback, watch review events, append replies, and mark items resolved. CriticMarkup in the Markdown file remains the durable source of truth.\n## Local development\n```bash\n.\u002Fscripts\u002Fsetup.sh\n.\u002Fscripts\u002Frun.sh\n```\n\n`.\u002Fscripts\u002Fsetup.sh` installs workspace dependencies and builds the app and server. `.\u002Fscripts\u002Frun.sh` serves the built app at `http:\u002F\u002Flocalhost:7373`.\n\nThe two scripts coordinate through a lock file, so it's safe to start `.\u002Fscripts\u002Frun.sh` while `.\u002Fscripts\u002Fsetup.sh` is still in progress. `run` will wait for setup to finish, or trigger setup itself if nothing has been built yet.\n\nIf you prefer package scripts, the same commands are available as `pnpm setup` and `pnpm start`.\n\nRunning `pnpm setup` also installs a per-worktree dev CLI wrapper into `~\u002F.local\u002Fbin` by default, using the current worktree directory name. For example, this checkout might install `roughdraft-dev-lyon-v2`, which points at this worktree's local code while leaving the published global `roughdraft` command untouched.\n\nEach dev wrapper keeps its own server state under `~\u002F.roughdraft\u002Fdev\u002F\u003Cwrapper-name>` by default, so opening a file from one worktree will not accidentally reuse a backend started from another worktree. `roughdraft-dev-\u003Cworktree> open ...` can start its own background server as needed; you do not need to run `pnpm dev` first just to open files in Roughdraft.\n\nYou can refresh that wrapper manually with:\n\n```bash\npnpm dev:install-cli\npnpm dev:install-cli --name api-redesign\n```\n\nQuality checks:\n\n```bash\npnpm lint\npnpm test\npnpm check\n```\n\n`pnpm check` is the same command the pull request workflow runs before merge.\n## Publishing\nRoughdraft publishes from `main` when the root `package.json` version is newer than the current npm `latest` version.\n\nRelease flow:\n\n1. Bump the root `package.json` version in a pull request.\n  \n2. Merge the pull request to `main`.\n  \n3. The `Publish to npm` GitHub Actions workflow runs `pnpm check`, publishes the package if that exact version is not already on npm and is newer than `latest`, then creates a `v\u003Cversion>` git tag.\n  \n\nThe workflow uses npm trusted publishing, so npm must be configured with this trusted publisher:\n\n```text\nOwner: Lex-Inc\nRepository: roughdraft\nWorkflow filename: publish.yml\n```\n\nNo `NPM_TOKEN` secret is required.\n## Files on disk\n```\nmy-essay\u002F\n  draft-1.md            # A normal markdown file on disk\n  draft-2.md            # Another file you can open separately\n```\n\nRoughdraft reads and writes the markdown file directly.\n## Agent setup\nIf you want your local agent to remember the Roughdraft workflow, ask it to read the live setup prompt:\n\n```text\nInstall Roughdraft for me using `npm i -g roughdraft`, then read https:\u002F\u002Froughdraft.md\u002Fsetup.md and set yourself up to use it.\n```\n\nUse `roughdraft help`, `roughdraft help agent`, or `roughdraft help criticmarkup` if you need a local refresher.\n## CLI reference\n```text\nroughdraft [flags] \u003Ccommand> [args]\nroughdraft \u003Cpath>\n```\n\nCommands:\n\n```text\nopen \u003Cpath>        Open one Markdown file and wait for Done Reviewing\nstart              Start or reuse the background server\nstatus             Show server status\nstop               Stop the managed background server\nwatch \u003Cpath>       Wait for a Done Reviewing event\nmcp                Start the experimental stdio MCP server\ndoctor [path]      Diagnose setup or validate Markdown\nhelp agent         Print the agent setup prompt\nhelp criticmarkup  Show CriticMarkup examples\nagent-setup        Print the agent setup prompt\ncriticmarkup       Show CriticMarkup examples\n```\n\nGlobal flags:\n\n```text\n-h, --help         Show help\n--version          Print version\n--json             Print JSON for supported commands\n--no-color         Disable color\n```\n\nUseful command flags:\n\n```text\nroughdraft open \u003Cpath> --no-open\nroughdraft open \u003Cpath> --print-url\nroughdraft open \u003Cpath> --json\nroughdraft open \u003Cpath> --no-watch\nroughdraft start --port \u003Cport>\nroughdraft status --json\nroughdraft stop --all\nroughdraft watch .\u002Fdraft.md --json\nroughdraft doctor --json\nroughdraft doctor .\u002Fdraft.md\nroughdraft doctor .\u002Fdraft.md --json\n```\n\nUsage errors return exit code `2`. Runtime failures return exit code `1`. `roughdraft status --json` returns exit code `0` even when the JSON says `\"running\": false`.\n\nSupported environment variables:\n\n```text\nROUGHDRAFT_PORT\n  Preferred server port.\n\nPORT\n  Legacy preferred server port. Used only when ROUGHDRAFT_PORT is unset.\n\nROUGHDRAFT_NO_OPEN=1\n  Disable browser\u002Fapp opening.\n\nROUGHDRAFT_STATE_FILE\n  Exact path to the server state JSON file.\n\nROUGHDRAFT_STATE_DIR\n  Directory containing server.json.\n```\n\nDevelopment-only environment variables:\n\n```text\nROUGHDRAFT_DEV_FRONTEND_STATE_FILE\nROUGHDRAFT_DEV_BIN_DIR\nROUGHDRAFT_DEV_STATE_BASE_DIR\nROUGHDRAFT_DEV_WRAPPER_NAME\nROUGHDRAFT_DEV_WRAPPER_PATH\nROUGHDRAFT_DEV_WRAPPER_REPO_ROOT\n```\n## Roughdraft-flavored CriticMarkup\nRoughdraft uses [CriticMarkup](https:\u002F\u002Fcriticmarkup.com) as the readable review layer inside normal Markdown files. It supports the standard markers for comments, highlights, insertions, deletions, and substitutions:\n\nThe canonical Roughdraft Flavored Markdown spec is published at [roughdraft.md\u002Fspec\u002Froughdraft-flavored-markdown.md](https:\u002F\u002Froughdraft.md\u002Fspec\u002Froughdraft-flavored-markdown.md). The review-index JSON Schema is published at [roughdraft.md\u002Fspec\u002Froughdraft-flavored-markdown.schema.json](https:\u002F\u002Froughdraft.md\u002Fspec\u002Froughdraft-flavored-markdown.schema.json).\n\n```markdown\nThis is {--deleted--} text.\nThis is {++inserted++} text.\nThis is {~~old~>new~~} substituted text.\nThis is {>>a comment\u003C\u003C} in the margin.\nThis is {==highlighted==} text.\n```\n\nRoughdraft extends those markers with compact attribute blocks so review state can round-trip through the file. Attribute blocks are written immediately after the comment or suggestion:\n\n```markdown\nPlease revisit {==this sentence==}{>>Needs a source\u003C\u003C}{id=\"c1\" by=\"user\" at=\"2026-04-28T12:00:00.000Z\"}.\n```\n\nSupported attributes:\n\n- `id` gives the comment or suggested change a stable document-local id.\n  \n- `by` records the reviewer or agent that created it.\n  \n- `at` records an ISO timestamp.\n  \n- `re` links a reply to another comment or suggestion id.\n  \n\nReplies are stored as additional comment blocks that point at the parent id:\n\n```markdown\nPlease revisit {==this sentence==}{>>Needs a source\u003C\u003C}{id=\"c1\" by=\"user\" at=\"2026-04-28T12:00:00.000Z\"}{>>I can add one from the intro.\u003C\u003C}{id=\"c2\" by=\"AI\" at=\"2026-04-28T12:05:00.000Z\" re=\"c1\"}.\n```\n\nSuggested changes can also carry ids and discussion:\n\n```markdown\nAdd {++one concrete example++}{id=\"s1\" by=\"AI\" at=\"2026-04-28T12:10:00.000Z\"}{>>Use the customer story here.\u003C\u003C}{id=\"c3\" by=\"user\" at=\"2026-04-28T12:12:00.000Z\" re=\"s1\"}.\nRemove {--vague phrasing--}{id=\"s2\" by=\"user\" at=\"2026-04-28T12:13:00.000Z\"}.\nUse {~~rough~>specific~~}{id=\"s3\" by=\"AI\" at=\"2026-04-28T12:14:00.000Z\"} wording.\n```\n\nCriticMarkup inside inline code and fenced code blocks is treated as literal example text, not live review feedback:\n\n````markdown\nInline code stays literal: `{==not a comment==}`.\n\n```text\n{++not a suggestion++}\n```\n````\n\nThis matters because the main workflow is often:\n\n- The AI writes a doc\n  \n- The user opens it in Roughdraft\n  \n- The user leaves comments and suggested changes\n  \n- The AI reads those comments and responds in the same markdown file\n  \n## Try the demo\nDon't want to install anything? Try the [live demo](https:\u002F\u002Froughdraft.md) — it runs entirely in your browser using local storage.\n## License\nMIT\n\n* * *\n\nBuilt by [Nathan Baschez](https:\u002F\u002Ftwitter.com\u002Fnbashaw)\n","Roughdraft 是一个专注于本地 Markdown 文件编辑与审阅的工具，旨在提供一个用户友好的界面来查看文档并添加评论。其核心功能包括直接打开本地的 `.md` 文件、支持使用 CriticMarkup 进行内联反馈和修订建议、以及与本地 AI 代理无缝协作的能力。该工具完全基于本地运行，无需云服务或账户注册，确保了数据的安全性和隐私性。适用于需要对 Markdown 文档进行详细审查和讨论的场景，如技术写作、团队协作等。","2026-06-11 03:56:12","CREATED_QUERY"]