redlinify 0.0.0-stage → 0.4.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.
Files changed (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +341 -2
  3. package/dist/_shared/atomicFs.d.ts +10 -0
  4. package/dist/_shared/atomicFs.d.ts.map +1 -0
  5. package/dist/_shared/atomicFs.js +86 -0
  6. package/dist/_shared/atomicFs.js.map +1 -0
  7. package/dist/_shared/browser.d.ts +7 -0
  8. package/dist/_shared/browser.d.ts.map +1 -0
  9. package/dist/_shared/browser.js +7 -0
  10. package/dist/_shared/browser.js.map +1 -0
  11. package/dist/_shared/canonical.d.ts +8 -0
  12. package/dist/_shared/canonical.d.ts.map +1 -0
  13. package/dist/_shared/canonical.js +28 -0
  14. package/dist/_shared/canonical.js.map +1 -0
  15. package/dist/_shared/diff.d.ts +78 -0
  16. package/dist/_shared/diff.d.ts.map +1 -0
  17. package/dist/_shared/diff.js +350 -0
  18. package/dist/_shared/diff.js.map +1 -0
  19. package/dist/_shared/errors.d.ts +29 -0
  20. package/dist/_shared/errors.d.ts.map +1 -0
  21. package/dist/_shared/errors.js +46 -0
  22. package/dist/_shared/errors.js.map +1 -0
  23. package/dist/_shared/fileLock.d.ts +11 -0
  24. package/dist/_shared/fileLock.d.ts.map +1 -0
  25. package/dist/_shared/fileLock.js +114 -0
  26. package/dist/_shared/fileLock.js.map +1 -0
  27. package/dist/_shared/guards.d.ts +20 -0
  28. package/dist/_shared/guards.d.ts.map +1 -0
  29. package/dist/_shared/guards.js +395 -0
  30. package/dist/_shared/guards.js.map +1 -0
  31. package/dist/_shared/hash.d.ts +12 -0
  32. package/dist/_shared/hash.d.ts.map +1 -0
  33. package/dist/_shared/hash.js +80 -0
  34. package/dist/_shared/hash.js.map +1 -0
  35. package/dist/_shared/index.d.ts +9 -0
  36. package/dist/_shared/index.d.ts.map +1 -0
  37. package/dist/_shared/index.js +9 -0
  38. package/dist/_shared/index.js.map +1 -0
  39. package/dist/_shared/schemas.d.ts +727 -0
  40. package/dist/_shared/schemas.d.ts.map +1 -0
  41. package/dist/_shared/schemas.js +352 -0
  42. package/dist/_shared/schemas.js.map +1 -0
  43. package/dist/_shared/storage.d.ts +174 -0
  44. package/dist/_shared/storage.d.ts.map +1 -0
  45. package/dist/_shared/storage.js +801 -0
  46. package/dist/_shared/storage.js.map +1 -0
  47. package/dist/_shared/threadStatus.d.ts +5 -0
  48. package/dist/_shared/threadStatus.d.ts.map +1 -0
  49. package/dist/_shared/threadStatus.js +18 -0
  50. package/dist/_shared/threadStatus.js.map +1 -0
  51. package/dist/cli.d.ts +3 -0
  52. package/dist/cli.d.ts.map +1 -0
  53. package/dist/cli.js +269 -0
  54. package/dist/cli.js.map +1 -0
  55. package/dist/index.d.ts +5 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +5 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/mcp.d.ts +19 -0
  60. package/dist/mcp.d.ts.map +1 -0
  61. package/dist/mcp.js +654 -0
  62. package/dist/mcp.js.map +1 -0
  63. package/dist/preferences.d.ts +5 -0
  64. package/dist/preferences.d.ts.map +1 -0
  65. package/dist/preferences.js +56 -0
  66. package/dist/preferences.js.map +1 -0
  67. package/dist/uiDaemon.d.ts +47 -0
  68. package/dist/uiDaemon.d.ts.map +1 -0
  69. package/dist/uiDaemon.js +351 -0
  70. package/dist/uiDaemon.js.map +1 -0
  71. package/dist/updater.d.ts +35 -0
  72. package/dist/updater.d.ts.map +1 -0
  73. package/dist/updater.js +336 -0
  74. package/dist/updater.js.map +1 -0
  75. package/dist/web.d.ts +29 -0
  76. package/dist/web.d.ts.map +1 -0
  77. package/dist/web.js +648 -0
  78. package/dist/web.js.map +1 -0
  79. package/package.json +51 -4
  80. package/skill/SKILL.md +36 -0
  81. package/ui-dist/assets/elkjs-DuIp8wh-.js +26 -0
  82. package/ui-dist/assets/index-DhMWEByx.css +1 -0
  83. package/ui-dist/assets/index-Dy_FwyNG.js +99 -0
  84. package/ui-dist/assets/vendor-icons-IOjDvVjt.js +261 -0
  85. package/ui-dist/assets/vendor-react-5-35apmZ.js +49 -0
  86. package/ui-dist/assets/vendor-xyflow-BnuhLJ6X.css +1 -0
  87. package/ui-dist/assets/vendor-xyflow-cY2i6Lf0.js +23 -0
  88. package/ui-dist/index.html +29 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vojtěch Faltus
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,342 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/media/logo-dark.svg" />
4
+ <source media="(prefers-color-scheme: light)" srcset="docs/media/logo-light.svg" />
5
+ <img src="docs/media/logo-dark.svg" alt="Redlinify — Git-native visual workbench for developers & AI coding agents" width="520" />
6
+ </picture>
7
+ </p>
2
8
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
9
+ <p align="center">
10
+ <strong>Stop negotiating software architecture and DB schemas in linear chat threads.</strong>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="https://github.com/wltwror/Redlinify/actions/workflows/ci.yml"><img src="https://github.com/wltwror/Redlinify/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
15
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License" /></a>
16
+ <a href="#zero-friction-setup"><img src="https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg" alt="Node >= 22" /></a>
17
+ <a href="#development--architecture"><img src="https://img.shields.io/badge/TypeScript-strict-3178c6.svg" alt="Strict TypeScript" /></a>
18
+ <a href="#mcp-tool-reference-6-tools"><img src="https://img.shields.io/badge/MCP-6%20tools-8b5cf6.svg" alt="MCP 6 Tools" /></a>
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="#see-it-in-action">Demo</a> ·
23
+ <a href="#how-it-works">How It Works</a> ·
24
+ <a href="#why-redlinify">Features</a> ·
25
+ <a href="#visual-tour">Screenshots</a> ·
26
+ <a href="#zero-friction-setup">Setup</a> ·
27
+ <a href="#mcp-tool-reference-6-tools">MCP Tools</a>
28
+ </p>
29
+
30
+ <p align="center">
31
+ Redlinify gives you and your AI coding agent a shared, Git-tracked visual workbench directly inside your repo. Agents draft diagrams over MCP and launch the local browser UI automatically; you edit nodes, reply to questions, bend lines, and lock approved specs—then send back a compact <strong>semantic diff</strong> with zero pixel noise.
32
+ </p>
33
+
34
+ ---
35
+
36
+ ## See It in Action
37
+
38
+ https://github.com/user-attachments/assets/40982a94-da08-44c5-9ba0-dae41d199ee0
39
+
40
+ <p align="center">
41
+ <sub>Animated logo intro · Read &amp; reply to agent comments · Pin change requests &amp; lock in violet · Model &amp; bend ER lines (<code>Ctrl+Z</code>) · Compact semantic diff &amp; Decision Log</sub>
42
+ </p>
43
+
44
+ ---
45
+
46
+ ## How It Works
47
+
48
+ Redlinify runs a closed, Git-native collaboration loop between your coding agent and your browser—centered around a zero-coordinate `.design/` folder in your repository:
49
+
50
+ <p align="center">
51
+ <picture>
52
+ <source media="(prefers-color-scheme: dark)" srcset="docs/media/workflow-dark.svg" />
53
+ <source media="(prefers-color-scheme: light)" srcset="docs/media/workflow-light.svg" />
54
+ <img src="docs/media/workflow-dark.svg" alt="Redlinify 4-stage core workflow loop centered around .design/ Git Truth: Agent Drafts & Asks -> Comment & Model -> Lock & Decide -> Compact Semantic Diff & Code" width="920" />
55
+ </picture>
56
+ </p>
57
+
58
+ | Stage | Where | What Happens |
59
+ | :--- | :--- | :--- |
60
+ | **01 · Agent Drafts & Asks** | `MCP stdio` | Agent calls `save_view()`, auto-starts `127.0.0.1:4173`, and pins **amber** questions for your input. |
61
+ | **02 · Comment & Model** | `Browser UI` | Over live WebSockets, you read & reply to agent threads, right-click to add nodes or ER fields, connect edges, and drag bends. |
62
+ | **03 · Lock & Decide** | `Violet Guard` | Lock approved cards and contracts in **violet** so the agent cannot overwrite them; resolved threads graduate to **Decisions**. |
63
+ | **04 · Semantic Diff & Code** | `Zero Bloat` | `get_workspace()` returns only structural changes (`+node`, `~field`, replies), and `sync_code_refs()` links built files back to nodes. |
64
+
65
+ ### What Your Agent Actually Sees
66
+
67
+ When you say *"sync with my edits on the canvas"*, a single `get_workspace()` call hands your agent structural deltas and open comments — **no screenshots, no `(x, y)` pixels, no re-dumping the whole diagram**:
68
+
69
+ ```json
70
+ {
71
+ "view_diffs": [{
72
+ "view_id": "auth-flow",
73
+ "diff": {
74
+ "nodes_modified": [{ "id": "auth-api", "changes": { "locked": { "before": false, "after": true } } }],
75
+ "edges_added": [{ "id": "e-token", "source": "auth-api", "target": "redis-store", "label": "TTL 15m" }]
76
+ }
77
+ }],
78
+ "pending_threads": [{
79
+ "id": "th-rate-limit", "kind": "change_request", "target_type": "node", "target_id": "auth-api",
80
+ "messages": [{ "author": "human", "body": "Lock JWT expiry at 15m and add per-IP rate limiting." }]
81
+ }]
82
+ }
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Why Redlinify?
88
+
89
+ <table>
90
+ <tr>
91
+ <td width="50%" valign="top">
92
+ <strong>🔄 Two-Way Structured Editing</strong><br />
93
+ Unlike read-only Mermaid or brittle ASCII boxes, you and your agent edit the exact same clean <code>.design/views/*.json</code> graph.
94
+ </td>
95
+ <td width="50%" valign="top">
96
+ <strong>🔒 Violet Locks Protect Approved Specs</strong><br />
97
+ Lock finalized nodes and edges so agents cannot overwrite them—while still letting <code>sync_code_refs()</code> update code links and build status.
98
+ </td>
99
+ </tr>
100
+ <tr>
101
+ <td width="50%" valign="top">
102
+ <strong>⚡ Token-Efficient Semantic Diffs</strong><br />
103
+ Pixel <code>x/y</code> coordinates, edge bends, and zoom stay gitignored in <code>.design/.layout/</code>. Agents read only structural deltas against checkpoints.
104
+ </td>
105
+ <td width="50%" valign="top">
106
+ <strong>🗄️ System Architecture &amp; Crow's Foot ER</strong><br />
107
+ Switch seamlessly between module diagrams and relational ER models (<code>PK</code>, <code>FK</code>, <code>UQ</code>, mandatory <code>*</code> vs optional <code>○</code>, and <code>is-a</code> subtypes).
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <td width="50%" valign="top">
112
+ <strong>💬 Comments &amp; Searchable Decision Log</strong><br />
113
+ Discuss edge cases right on boxes or lines; resolved discussions become an anchored, searchable ADR log inside <strong>Decisions</strong>.
114
+ </td>
115
+ <td width="50%" valign="top">
116
+ <strong>🏠 Local-First &amp; Zero Telemetry</strong><br />
117
+ Everything lives as readable JSON in your Git repo, and the UI binds strictly to loopback (<code>127.0.0.1</code>) with zero cloud dependencies.
118
+ </td>
119
+ </tr>
120
+ </table>
121
+
122
+ <br />
123
+
124
+ | Approach | Spatial Modeling | Anti-Overwrite Locks | Agent Context Cost | Syncs Back to Code |
125
+ | :--- | :---: | :---: | :---: | :---: |
126
+ | **Linear Chat** | No (walls of prose) | No | High (re-explain context) | Manual |
127
+ | **Mermaid / ASCII** | Read-only diagrams | No | Medium (re-dumps full graph) | Goes stale quickly |
128
+ | **Excalidraw / Miro** | Freehand canvas | Visual-only | Very high (screenshots / raw pixels) | Disconnected |
129
+ | **Redlinify** | **Yes (cards, ER sections, bends)** | **Yes (violet `locked` guard)** | **Minimal (zero-coord semantic diffs)** | **Yes (`code_refs` + drift checks)** |
130
+
131
+ ---
132
+
133
+ ## Visual Tour
134
+
135
+ ### System Architecture — Dark Mode
136
+
137
+ Approved contracts stay **locked in violet** with live `code_refs` badges attached, while nodes awaiting human feedback highlight in **amber** both on the canvas and in the MiniMap.
138
+
139
+ <p align="center">
140
+ <img src="docs/media/screenshot-architecture-dark.webp" alt="Redlinify System Architecture view in Dark Mode showing violet locked nodes, amber needs_input node, MiniMap callout, and orthogonal numbered edges" width="880" />
141
+ </p>
142
+
143
+ ### Crow's Foot ER Modeling — Light Mode & Drafting Grid
144
+
145
+ Model entities with `PK` / `FK` / `UQ` badges, mandatory (`*`) vs nullable (`○`) columns, Crow's foot cardinalities, and subtype forks—complete with instant **Dark/Light** and **Dots/Grid** toggles.
146
+
147
+ <p align="center">
148
+ <img src="docs/media/screenshot-er-light.webp" alt="Redlinify Sandbox Fleet ER Model in Light Mode with Drafting Grid, Crow's foot cardinalities, subtype forks, and PK/FK/UQ badges" width="880" />
149
+ </p>
150
+
151
+ ### Searchable Decision Log & Anchored Threads
152
+
153
+ Resolved architectural threads move cleanly into the searchable **Decision Log**, preserving full multi-turn context alongside every node and edge across `draft → needs_input → approved → implemented | drifted`.
154
+
155
+ <p align="center">
156
+ <img src="docs/media/screenshot-decisions-dark.webp" alt="Redlinify Decisions drawer showing searchable resolved Decision Log entries with expandable agent and human discussion transcripts" width="880" />
157
+ </p>
158
+
159
+ ---
160
+
161
+ ## Zero-Friction Setup
162
+
163
+ Requires **Node.js >= 22.12.0** and **Git**.
164
+
165
+ ### Option 1: Zero-Install via `npx` / `npm` *(published starting `v0.3.0`)*
166
+
167
+ Add Redlinify directly to **Claude Code**, **Cursor**, **OpenCode**, or any MCP client—no global clone required:
168
+
169
+ ```json
170
+ {
171
+ "mcpServers": {
172
+ "redlinify": {
173
+ "command": "npx",
174
+ "args": ["-y", "redlinify", "mcp"]
175
+ }
176
+ }
177
+ }
178
+ ```
179
+
180
+ ```bash
181
+ npm install -g redlinify # Optional global install (`redlinify mcp`, `redlinify ui`, `redlinify init`)
182
+ ```
183
+
184
+ ### Option 2: Self-Updating Source Install (`curl` / PowerShell)
185
+
186
+ **macOS / Linux / WSL:**
187
+
188
+ ```bash
189
+ curl -fsSL https://raw.githubusercontent.com/wltwror/Redlinify/main/scripts/install.sh | bash
190
+ ```
191
+
192
+ **Windows (PowerShell):**
193
+
194
+ ```powershell
195
+ irm https://raw.githubusercontent.com/wltwror/Redlinify/main/scripts/install.ps1 | iex
196
+ ```
197
+
198
+ The installer clones Redlinify into `~/.redlinify`, builds all packages, and links `redlinify` cleanly (falling back to `~/.local/bin/redlinify` without `sudo` if global `npm link` is restricted). With the Git-clone install:
199
+
200
+ ```json
201
+ {
202
+ "mcpServers": {
203
+ "redlinify": {
204
+ "command": "redlinify",
205
+ "args": ["mcp"]
206
+ }
207
+ }
208
+ }
209
+ ```
210
+
211
+ ```bash
212
+ redlinify update # Pull latest changes, install deps if changed, rebuild & refresh active UI
213
+ redlinify update --check # Preview available updates without modifying your local setup
214
+ ```
215
+
216
+ * Built-in MCP instructions teach your agent how to draft views, pin questions, respect violet locks, and resolve decisions automatically.
217
+ * On the first diagram write in any Git repo, Redlinify initializes `.design/` and spawns the detached loopback UI daemon (`127.0.0.1:4173`), returning `ui_url`.
218
+
219
+ <details>
220
+ <summary>Manual install, setup without global link, &amp; CLI commands</summary>
221
+
222
+ ```bash
223
+ git clone https://github.com/wltwror/Redlinify.git
224
+ cd Redlinify && npm install && npm run build && npm test
225
+ npm link -w @redlinify/server
226
+ ```
227
+
228
+ ```json
229
+ {
230
+ "mcpServers": {
231
+ "redlinify": {
232
+ "command": "node",
233
+ "args": ["/path/to/Redlinify/packages/server/dist/cli.js", "mcp"]
234
+ }
235
+ }
236
+ }
237
+ ```
238
+
239
+ ```bash
240
+ redlinify mcp --open --dir /path/to/repo # Start MCP + auto-open browser immediately
241
+ redlinify mcp --no-ui --dir /path/to/repo # Headless MCP without auto-starting the UI
242
+ redlinify ui --open --dir /path/to/repo # Launch workbench UI standalone
243
+ redlinify ui --open --dir examples/coffee-shop # Try the standalone Coffee Shop sandbox
244
+ redlinify ui --open --dir examples/fleet-er # Try the standalone Fleet ER sandbox
245
+ redlinify stop --dir /path/to/repo # Stop the detached UI daemon
246
+ redlinify init --dir /path/to/repo # Pre-initialize .design/ explicitly
247
+ redlinify update # Self-update clone, rebuild & restart active UI (or `npm run update`)
248
+ redlinify update --check # Check if updates are available on origin
249
+ ```
250
+
251
+ </details>
252
+
253
+ ---
254
+
255
+ ## Repository Structure (`.design/`)
256
+
257
+ ```text
258
+ .design/
259
+ ├── workspace.json # Git-tracked: tab order, metadata, pending view_requests
260
+ ├── views/*.json # Git-tracked: semantic graphs (zero pixel coordinates)
261
+ ├── threads/*.json # Git-tracked: anchored discussions & resolved Decisions
262
+ ├── .layout/ # Gitignored: node positions, edge bend points, zoom
263
+ ├── .checkpoint/ # Gitignored: last agent-authored semantic snapshot
264
+ └── .ui-server.json # Gitignored: active detached UI server PID & port
265
+ ```
266
+
267
+ ---
268
+
269
+ ## MCP Tool Reference (6 Tools)
270
+
271
+ Redlinify exposes **6 orthogonal tools** (`~1.96k` startup tokens including workflow instructions), with `readOnlyHint` annotations on readers and compact non-echoing write responses.
272
+
273
+ | Tool | Role | Purpose |
274
+ | :--- | :--- | :--- |
275
+ | `get_workspace` | `Read` | Return tabs (`view_hash`, triage/drifted counts), `entity_ref` slugs, `view_requests`, pending semantic diffs, open threads, and `ui_url` (or launch browser with `open_browser: true`). |
276
+ | `get_view` | `Read` | Read a semantic `DesignView` (zero coordinates), its `view_hash`, open threads, and optional 1-line Decision summaries. |
277
+ | `get_decisions` | `Read` | Query resolved Decision (ADR) transcripts—or `open`/`all` threads—by `view_id`, `target_id`, `entity_ref`, or text `query`. |
278
+ | `save_view` | `Write` | Create/replace (`mode="replace"`), incrementally upsert/remove nodes & edges (`mode="patch"`), or accept human edits (`mode="acknowledge"`) with `base_hash` concurrency, violet lock guards, and auto-UI launch. |
279
+ | `post_thread` | `Write` | Open an anchored thread (`question`, `change_request`, `decision`, `drift_alert`), reply, reopen, or resolve with a 1-line ADR `resolution_summary`. |
280
+ | `sync_code_refs` | `Write` | Link source `code_refs` (`path:symbol`) and update `implemented` / `drifted` status on nodes (including locked ones) without clobbering unrelated edits. |
281
+
282
+ ---
283
+
284
+ <details id="canvas--keyboard-controls">
285
+ <summary><strong>Canvas &amp; Keyboard Controls</strong></summary>
286
+
287
+ <br />
288
+
289
+ | Action | Shortcut / Gesture |
290
+ | :--- | :--- |
291
+ | Select element & open inspector | Click a box/entity or relationship line |
292
+ | Multi-select boxes | `Ctrl+Click` / `Cmd+Click` (or `Shift+Drag` marquee) |
293
+ | Pan canvas | 2-finger swipe / scroll (`Scroll: Pan`, default), drag canvas or `Space+Drag`, `Shift+Scroll`, or `Arrow` keys (tap for precision, hold for accelerated cruise, `Shift+Arrow` fast) |
294
+ | Zoom canvas | Pinch / `Ctrl+Scroll` / `Cmd+Scroll` in `Pan` mode, plain scroll wheel in `Zoom` mode (bottom-left `Scroll: Pan \| Zoom` switch), `+`/`-`, `1` (100%), `0` or `Shift+1` (Fit View) |
295
+ | Connect two nodes | Drag from any 4-sided handle to another node |
296
+ | Bend or split an edge | Select a line and drag its midpoint or segment split handles |
297
+ | Inline edit title / entry / attribute | Double-click text inside an unlocked card (clear text + `Enter` deletes entries & ER attributes) |
298
+ | Cycle tabs | `Tab` / `Shift+Tab` |
299
+ | Quick search / jump | `Ctrl+K` / `Cmd+K` or `/` (typo-tolerant fuzzy search across views, boxes, attributes, edges & threads) |
300
+ | Export active diagram | Top-right `Export` button (`PNG 2× HD`, `SVG`, `Mermaid .mmd`, `Copy Mermaid`, `JSON`) |
301
+ | Quick actions menu | Right-click canvas (`Add Box Here`, `Add Shape…`), tab, card, or edge (`Change Shape…`) |
302
+ | Canvas editing toolbar | Floating bottom-center Canvas Dock (`+ ▾` quick-add & shape picker, `Undo`/`Redo`, `TB`/`LR` direction, `Auto-Layout`) |
303
+ | Undo / Redo (nodes, edges & bends) | `Ctrl+Z` / `Ctrl+Shift+Z` (`Cmd` on macOS) or Canvas Dock buttons |
304
+ | Delete selected unlocked elements | `Delete` or `Backspace` |
305
+ | Theme, grid & scroll preferences | Top-right Dots/Grid and Sun/Moon toggles + bottom-left `Scroll: Pan \| Zoom` (persisted globally in `~/.redlinify/preferences.json`) |
306
+
307
+ </details>
308
+
309
+ <details id="development--architecture">
310
+ <summary><strong>Development &amp; Monorepo Architecture</strong></summary>
311
+
312
+ <br />
313
+
314
+ ```bash
315
+ npm run typecheck # Type-check all workspace packages in topological order
316
+ npm run build # Build @redlinify/shared, @redlinify/server, and @redlinify/ui
317
+ npm test # Run Vitest unit & integration suites
318
+ npm run test:e2e # Run Playwright headless Chromium E2E checks
319
+ ```
320
+
321
+ * `packages/shared` (`@redlinify/shared`): Zod v4 schemas, canonical hashing, semantic diff engine, lock/patch guards, and locked atomic storage (`@redlinify/shared/browser` for UI).
322
+ * `packages/server` (`@redlinify/server`): CLI (`mcp`, `ui`, `stop`, `init`, `update`), stdio MCP server (with built-in `instructions` + detached auto-UI launcher), and loopback HTTP + WebSocket UI host.
323
+ * `packages/ui` (`@redlinify/ui`): React 19 + TypeScript + Vite + `@xyflow/react` + `elkjs` Tailwind workbench (`exportDiagram.ts` SVG/PNG + `exportMermaid.ts`).
324
+ * `examples/coffee-shop/` & `examples/fleet-er/`: Standalone General & Crow's Foot ER sample `.design/` workspaces.
325
+
326
+ See [docs/SPEC.md](docs/SPEC.md) for the specification and [AGENTS.md](AGENTS.md) for engineering invariants.
327
+
328
+ </details>
329
+
330
+ ---
331
+
332
+ ## Inspiration
333
+
334
+ Redlinify was inspired by discovering the **Archify** project and wanting direct, hands-on visual control over the software architecture and database schemas of applications built with AI coding agents—rather than letting structure drift across long text prompts.
335
+
336
+ ---
337
+
338
+ ## Issues & License
339
+
340
+ Bug reports and PRs are welcome—run `npm run typecheck && npm run build && npm test` before submitting.
341
+
342
+ [MIT](LICENSE) © 2026 Vojtěch Faltus
@@ -0,0 +1,10 @@
1
+ export declare function pathExists(targetPath: string): Promise<boolean>;
2
+ /**
3
+ * Atomically writes formatted JSON via a temporary file in the same directory,
4
+ * `fsync`, close, and `rename`.
5
+ */
6
+ export declare function writeJsonAtomic(filePath: string, data: unknown): Promise<void>;
7
+ export declare function readJsonFile<T>(filePath: string, schema: {
8
+ parse: (v: unknown) => T;
9
+ }, label: string): Promise<T>;
10
+ //# sourceMappingURL=atomicFs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicFs.d.ts","sourceRoot":"","sources":["../src/atomicFs.ts"],"names":[],"mappings":"AAQA,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOrE;AAkBD;;;GAGG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,IAAI,CAAC,CAwBf;AAED,wBAAsB,YAAY,CAAC,CAAC,EAClC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,CAAA;CAAE,EACpC,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,CAAC,CAAC,CA+BZ"}
@@ -0,0 +1,86 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { promises as fs } from "node:fs";
3
+ import path from "node:path";
4
+ import { ZodError } from "zod";
5
+ import { NotFoundError, ValidationError } from "./errors.js";
6
+ const RETRYABLE_RENAME_CODES = new Set(["EPERM", "EACCES", "EBUSY"]);
7
+ export async function pathExists(targetPath) {
8
+ try {
9
+ await fs.access(targetPath);
10
+ return true;
11
+ }
12
+ catch {
13
+ return false;
14
+ }
15
+ }
16
+ async function renameWithRetry(src, dst) {
17
+ const maxAttempts = 3;
18
+ for (let attempt = 1;; attempt += 1) {
19
+ try {
20
+ await fs.rename(src, dst);
21
+ return;
22
+ }
23
+ catch (err) {
24
+ const code = err.code;
25
+ if (attempt >= maxAttempts || !code || !RETRYABLE_RENAME_CODES.has(code)) {
26
+ throw err;
27
+ }
28
+ await new Promise((resolve) => setTimeout(resolve, 20 * attempt));
29
+ }
30
+ }
31
+ }
32
+ /**
33
+ * Atomically writes formatted JSON via a temporary file in the same directory,
34
+ * `fsync`, close, and `rename`.
35
+ */
36
+ export async function writeJsonAtomic(filePath, data) {
37
+ const dir = path.dirname(filePath);
38
+ await fs.mkdir(dir, { recursive: true });
39
+ const tmpPath = path.join(dir, `.tmp-${process.pid}-${Date.now()}-${randomUUID()}.json`);
40
+ const payload = `${JSON.stringify(data, null, 2)}\n`;
41
+ let handle;
42
+ try {
43
+ handle = await fs.open(tmpPath, "w", 0o644);
44
+ await handle.writeFile(payload, "utf8");
45
+ await handle.sync();
46
+ await handle.close();
47
+ handle = undefined;
48
+ await renameWithRetry(tmpPath, filePath);
49
+ }
50
+ catch (err) {
51
+ if (handle) {
52
+ await handle.close().catch(() => { });
53
+ }
54
+ await fs.unlink(tmpPath).catch(() => { });
55
+ throw err;
56
+ }
57
+ }
58
+ export async function readJsonFile(filePath, schema, label) {
59
+ let raw;
60
+ try {
61
+ raw = await fs.readFile(filePath, "utf8");
62
+ }
63
+ catch (err) {
64
+ if (err.code === "ENOENT") {
65
+ throw new NotFoundError(`${label} not found at ${filePath}`);
66
+ }
67
+ throw err;
68
+ }
69
+ let parsedJson;
70
+ try {
71
+ parsedJson = JSON.parse(raw);
72
+ }
73
+ catch (err) {
74
+ throw new ValidationError(`Invalid JSON in ${label} (${filePath}): ${err.message}`);
75
+ }
76
+ try {
77
+ return schema.parse(parsedJson);
78
+ }
79
+ catch (err) {
80
+ if (err instanceof ZodError) {
81
+ throw new ValidationError(`Invalid schema in ${label} (${filePath}): ${err.message}`, err.issues);
82
+ }
83
+ throw err;
84
+ }
85
+ }
86
+ //# sourceMappingURL=atomicFs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicFs.js","sourceRoot":"","sources":["../src/atomicFs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE7D,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAErE,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,UAAkB;IACjD,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,GAAW,EAAE,GAAW;IACrD,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,KAAK,IAAI,OAAO,GAAG,CAAC,GAAI,OAAO,IAAI,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC1B,OAAO;QACT,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,IAAI,GAAI,GAA6B,CAAC,IAAI,CAAC;YACjD,IAAI,OAAO,IAAI,WAAW,IAAI,CAAC,IAAI,IAAI,CAAC,s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
+ export * from "./canonical.js";
3
+ export * from "./diff.js";
4
+ export * from "./errors.js";
5
+ export * from "./guards.js";
6
+ export * from "./threadStatus.js";
7
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "./schemas.js";
2
+ export * from "./canonical.js";
3
+ export * from "./diff.js";
4
+ export * from "./errors.js";
5
+ export * from "./guards.js";
6
+ export * from "./threadStatus.js";
7
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Recursively canonicalizes JSON-compatible values by sorting object keys
3
+ * and stripping undefined properties while preserving array ordering.
4
+ */
5
+ export declare function canonicalize(value: unknown): unknown;
6
+ export declare function canonicalStringify(value: unknown): string;
7
+ export declare function canonicalEqual(a: unknown, b: unknown): boolean;
8
+ //# sourceMappingURL=canonical.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical.d.ts","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAgBpD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEzD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAE9D"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Recursively canonicalizes JSON-compatible values by sorting object keys
3
+ * and stripping undefined properties while preserving array ordering.
4
+ */
5
+ export function canonicalize(value) {
6
+ if (Array.isArray(value)) {
7
+ return value.map((item) => canonicalize(item));
8
+ }
9
+ if (value !== null && typeof value === "object") {
10
+ const record = value;
11
+ const sorted = {};
12
+ for (const key of Object.keys(record).sort()) {
13
+ const prop = record[key];
14
+ if (prop !== undefined) {
15
+ sorted[key] = canonicalize(prop);
16
+ }
17
+ }
18
+ return sorted;
19
+ }
20
+ return value;
21
+ }
22
+ export function canonicalStringify(value) {
23
+ return JSON.stringify(canonicalize(value));
24
+ }
25
+ export function canonicalEqual(a, b) {
26
+ return canonicalStringify(a) === canonicalStringify(b);
27
+ }
28
+ //# sourceMappingURL=canonical.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical.js","sourceRoot":"","sources":["../src/canonical.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,KAAgC,CAAC;QAChD,MAAM,MAAM,GAA4B,EAAE,CAAC;QAC3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAC7C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,MAAM,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,CAAU,EAAE,CAAU;IACnD,OAAO,kBAAkB,CAAC,CAAC,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,78 @@
1
+ import type { BoxSection, DesignEdge, DesignNode, DesignView, EntityField } from "./schemas.js";
2
+ export interface SectionDiff {
3
+ id: string;
4
+ heading: string;
5
+ heading_changed?: {
6
+ before: string;
7
+ after: string;
8
+ };
9
+ added_items: string[];
10
+ removed_items: string[];
11
+ reordered: boolean;
12
+ }
13
+ export interface FieldDiff {
14
+ id: string;
15
+ name: string;
16
+ changes: Record<string, {
17
+ before: unknown;
18
+ after: unknown;
19
+ }>;
20
+ }
21
+ export interface NodeDiff {
22
+ id: string;
23
+ title: string;
24
+ changes: Record<string, {
25
+ before: unknown;
26
+ after: unknown;
27
+ }>;
28
+ sections_added: BoxSection[];
29
+ sections_removed: Array<{
30
+ id: string;
31
+ heading: string;
32
+ }>;
33
+ sections_modified: SectionDiff[];
34
+ fields_added: EntityField[];
35
+ fields_removed: Array<{
36
+ id: string;
37
+ name: string;
38
+ }>;
39
+ fields_modified: FieldDiff[];
40
+ }
41
+ export interface EdgeDiff {
42
+ id: string;
43
+ source: string;
44
+ target: string;
45
+ changes: Record<string, {
46
+ before: unknown;
47
+ after: unknown;
48
+ }>;
49
+ }
50
+ export interface SemanticDiff {
51
+ view_id: string;
52
+ has_changes: boolean;
53
+ baseline_missing: boolean;
54
+ view_meta_changed: Partial<Record<"title" | "direction" | "diagram_type", {
55
+ before: string;
56
+ after: string;
57
+ }>>;
58
+ nodes_added: DesignNode[];
59
+ nodes_removed: Array<{
60
+ id: string;
61
+ title: string;
62
+ }>;
63
+ nodes_modified: NodeDiff[];
64
+ edges_added: DesignEdge[];
65
+ edges_removed: Array<{
66
+ id: string;
67
+ source: string;
68
+ target: string;
69
+ label?: string;
70
+ }>;
71
+ edges_modified: EdgeDiff[];
72
+ }
73
+ /**
74
+ * Computes a minimal semantic diff between an agent checkpoint baseline and
75
+ * the current view on disk, ignoring layout coordinates, JSON key order, and whitespace.
76
+ */
77
+ export declare function computeSemanticDiff(checkpointView: DesignView | null, currentView: DesignView): SemanticDiff;
78
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAC9D;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO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