diff --git a/ROADMAP.md b/ROADMAP.md index 862832f..3fe4fb3 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,67 +1,171 @@ # Inkfinite Roadmap Inkfinite is a local-first infinite canvas for humans and agents. The desktop -app, CLI, and programmatic interfaces share one native document model and +app, CLI, MCP server, and web application share one native document model and transaction engine. -The product centers on objects with meaning arranged in two-dimensional space. +The product centers on meaningful objects arranged in two-dimensional space. A small set of composable geometry, content, structure, and relationship primitives should support diagramming, sketching, spatial thinking, visual collection, and agent-assisted editing without separate internal systems for each workflow. -## Current direction +The roadmap prioritizes stronger primitives, interoperability, correctness, +editor usability, and performance before large libraries of templates or +format-specific content. + +## Current: reliable core editor + +### Visual defaults and editor polish + +A new document should look intentional without requiring immediate styling. + +Centralize creation defaults shared by the editor primitives and remove +hard-coded styling from individual tools. Use restrained neutral styling for +ordinary geometry and reserve Inkfinite's accent for interaction, emphasis, +and relationships. + +The editor should have coherent defaults for shapes, frames, connectors, pen +strokes, text, Markdown, and cards across light and dark appearances. Visual +regression fixtures should make accidental changes to those defaults visible. ### SVG round-trip Inkfinite has one validated Rust SVG pipeline across desktop, web, CLI, and MCP. It maps supported geometry and embedded images into native shapes, -preserves hierarchy, transforms, and compound fills, retains source assets, and -reports unsupported content. Web SVG files, dropped files, and pasted markup -commit to the active document through the Rust browser session. +preserves hierarchy, transforms, and compound fills, retains source assets, +and reports unsupported content. -The native transaction creates a root container and separate records for -supported SVG descendants. The remaining editor work must expose those children -through normal nested selection and ungrouping. Creating a document from SVG -should be a separate explicit action. +The remaining editor work must expose imported descendants through ordinary +selection, editing, reparenting, ungrouping, deletion, CLI access, and MCP +access. -The remaining work proves complete document workflows: save and reopen, edit -and export, undo and redo, CRDT merge, and CLI access. Interchange work should -favor deterministic native representation where Inkfinite understands the -content and a static visual fallback where it does not. +Complete workflows still need to be proven through save/reopen, edit/export, +undo/redo, CRDT merge, active-document import, and explicit creation of a new +document from SVG. + +Interchange should prefer deterministic native representation where Inkfinite +understands the content and sanitized static fallback content where it does +not. See [SVG import](apps/web/src/content/docs/development/svg-import.md) and [native path geometry](apps/web/src/content/docs/development/native-path-geometry.md). -### Richer interoperability and embeds +### Richer interoperability + +JSON Canvas support should continue to map external data onto ordinary +Inkfinite objects, relationships, frames, cards, and assets rather than +creating a parallel document system. + +Mixed-document fixtures should exercise native geometry, imported SVG, raster +assets, links, cards, frames, and relationships together. + +Mermaid and D2 are candidates for structured import only if their graphs map +cleanly onto Inkfinite's native objects and relationships. Avoid a separate +format-specific rendering architecture. + +## Next: stronger vector primitives + +Once native SVG round-trip and ordinary editing workflows are dependable, +expand the vector model itself. + +### Boolean geometry + +Support union, intersection, difference, and exclusion as deterministic, +undoable operations over native paths. Generated geometry must remain ordinary +Inkfinite vector data and survive SVG round trips. + +### Rich paint + +Extend flat colors with linear and radial gradients. Gradient data belongs in +the canonical document representation and must work through rendering, +serialization, SVG interoperability, editing, CLI inspection, and export. + +### Clipping, masks, and effects + +Add editable clipping first, then masks, then a deliberately bounded subset of +SVG filters. Unsupported SVG constructs should remain preserved through a safe +visual fallback rather than forcing the editor to implement the entire SVG +effects model. + +### Expressive strokes + +Add variable-width and pressure-aware strokes without making pressure hardware +a requirement. Width data must remain editable and have deterministic SVG +export behavior. + +### Text on path + +Allow text to reference editable vector geometry while retaining independent +text and path semantics. Support the useful subset of SVG text-path +interoperability. + +## Next: web installation and export workflows + +### Clipboard interoperability + +Treat the clipboard as another interchange surface. + +Selections and documents should be copyable as canonical SVG markup. Raster +exports should be copyable as PNG when platform clipboard APIs permit it, with +predictable browser fallbacks. + +### PWA and offline operation + +Make the existing local-first web editor installable rather than creating a +separate offline product. + +The PWA should cache the application shell, WASM runtime, and required static +assets while continuing to use Inkfinite's normal local document repository. +Creating, editing, reopening, and exporting local documents should continue to +work without a network connection. + +Application updates must be explicit enough that cached application code does +not become an invisible second deployment state. + +## Distribution + +Inkfinite should be releasable before its release process is heavily +automated. + +Define the public Rust package surface, crates.io publication order, desktop +platform matrix, and CLI/MCP binary distribution. Keep a documented manual +release checklist and small reproducible build scripts. + +GitHub Releases should eventually contain desktop, CLI, and MCP artifacts with +checksums. Publish the intended Rust packages to crates.io. + +Automation can be introduced where manual repetition becomes expensive; it is +not a prerequisite for the first useful release candidate. + +## Later: reusable content + +### User libraries -Inkfinite already imports and exports JSON Canvas nodes, groups, labeled edges, -files, links, and supported images. Extend that mapping only when new card, -relationship, frame, or asset fields have a meaningful representation. Mixed -documents still need fixtures that combine native geometry, imported SVG, -raster assets, and external links. +Built-in stencils already demonstrate reusable ordinary Inkfinite objects. +Later library work should let users save, find, insert, update, and remove +their own selections while retaining nested content, assets, relationships, +and semantics. -Mermaid or D2 import is useful only when it produces ordinary Inkfinite objects -and structured relationships. Evaluate those mappings before introducing a -format-specific rendering system. +Libraries remain ordinary document fragments validated by the shared native +document APIs. -### Stencil and library workflows +### Starter boards -Inkfinite already has a searchable, keyboard-accessible palette of built-in -stencils made from ordinary shapes and groups. The next library work lets users -save, find, insert, update, and remove local entries while preserving nested -content, assets, relationships, and semantics. Strong built-ins and composable -primitives take priority over large format-specific stencil packs. +Starter boards can eventually demonstrate workflows such as system design, +brainstorming, project planning, moodboards, research maps, and wireframes. -### Templates and starter boards +They should be ordinary inspectable documents assembled from the same +primitives available to users and agents. Templates should demonstrate a +capable editor rather than compensate for missing primitives or editing +behavior. -Once the core workflows are reliable, starter boards can demonstrate system -design, brainstorming, project planning, moodboards, research maps, and -wireframes. They should be standard documents that users can inspect, edit, -export, and repurpose, not substitutes for missing editor behavior. +## Later: agent and hosted capabilities -## Later +Revisit skill organization once CLI and permissioned MCP workflows have +stabilized. Skills should compose stable Inkfinite capabilities rather than +becoming another command or document layer. -Potential later work includes advanced vector operations, additional -interchange formats, PWA and offline installation, release packaging, richer -agent skills, hosted collaboration, remote MCP, and hosted identity and sync. +Hosted collaboration, remote MCP, identity, and hosted sync remain separate +future concerns. They should not complicate the local document model or local +editor architecture prematurely. diff --git a/TODO.md b/TODO.md index 3292fd3..7b8b44d 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,27 @@ # Inkfinite TODO +## Editor defaults + +Make newly created content look deliberate before the user changes any styling. + +- [ ] Move creation-time visual defaults into a shared style policy instead of + hard-coding colors independently in editor tools and UI controls +- [ ] Define defaults for rectangles, ellipses, frames, lines, arrows, pen + strokes, text, Markdown, and cards +- [ ] Use neutral shape styling by default and reserve the Inkfinite accent for + selection, arrows, emphasis, and interactive state +- [ ] Increase the default rectangle corner radius and define distinct frame + styling so frames do not look like ordinary shapes +- [ ] Remove light-canvas assumptions from text and Markdown defaults +- [] Resolve automatic creation colors against the document/page canvas at creation time + and persist the resulting explicit colors; keep application theme colors out of + canonical document rendering. +- [ ] Ensure creation through the editor, CLI, MCP, stencils, and starter + documents uses the same default style policy where appropriate +- [ ] Add light- and dark-canvas visual fixtures covering every built-in + primitive +- [ ] Add screenshot regression coverage for a representative mixed document + ## SVG round-trip Run representative native and fallback SVG fixtures through each complete @@ -8,7 +30,8 @@ and rendered output where visual fidelity matters. - [ ] Offer creation of a new document from SVG as a separate editor action - [ ] Verify and fix TypeScript editor traversal of imported root containers so - existing child records can be selected, edited, reparented, and deleted independently + existing child records can be selected, edited, reparented, and deleted + independently - [ ] Test import through save/reopen, edit/export, undo/redo, and CRDT merge - [ ] Test active-document import and explicit new-document creation end to end - [ ] Test imported child shapes through editor selection and targeted CLI @@ -31,6 +54,130 @@ and rendered output where visual fidelity matters. - [ ] Add end-to-end import, edit, and export comparisons for representative mixed-format documents +## Advanced vector editing + +### Boolean paths + +- [ ] Define union, intersection, difference, and exclusion operations over + Inkfinite's native path representation +- [ ] Preserve transforms and fill rules when combining selected paths +- [ ] Expose boolean operations through editor commands and selection controls +- [ ] Make each boolean operation one undoable document transaction +- [ ] Verify generated geometry through SVG import/export round trips +- [ ] Add deterministic fixtures for overlapping, nested, compound, and + self-intersecting paths + +### Gradient fills and strokes + +- [ ] Extend the paint representation beyond flat colors with linear and radial + gradients +- [ ] Represent gradient stops, positions, transforms, spread behavior, and + opacity in canonical document data +- [ ] Render gradients consistently in the interactive renderer and exports +- [ ] Import and export supported SVG gradients without flattening them +- [ ] Add gradient controls for stop creation, deletion, position, color, and + opacity +- [ ] Add fixtures covering transformed gradients and gradient inheritance + +### Clips, masks, and filters + +- [ ] Define which SVG clip, mask, and filter constructs Inkfinite can represent + natively +- [ ] Preserve unsupported constructs as sanitized fallback content instead of + silently discarding them +- [ ] Add native clip-path editing before exposing more general mask editing +- [ ] Add basic mask composition once clip-path behavior is stable +- [ ] Define the initial editable filter subset rather than attempting the full + SVG filter graph at once +- [ ] Verify deterministic import, editing, save/reopen, and SVG export + +### Variable-width strokes + +- [ ] Extend stroke data with a width or pressure profile along the path +- [ ] Capture pointer pressure where available without making pressure input + mandatory +- [ ] Add editing for width points independently of ordinary path nodes +- [ ] Render width profiles consistently at different zoom levels +- [ ] Define SVG export behavior, including conversion to outlined paths when + required +- [ ] Add pen, edit, undo/redo, and export fixtures + +### Text on path + +- [ ] Define the relationship between a text object and its supporting path +- [ ] Support offset, direction, alignment, and path reversal +- [ ] Keep the path independently editable without destroying attached text +- [ ] Add direct manipulation for text offset along the path +- [ ] Import and export representative SVG `textPath` content +- [ ] Add undo/redo and round-trip fixtures + +## Clipboard and export workflows + +### SVG as code + +- [ ] Add "Copy as SVG" for the current selection and document +- [ ] Generate the SVG through the same canonical exporter used by file export +- [ ] Write SVG markup as `text/plain` and `image/svg+xml` where supported +- [ ] Provide a visible fallback when rich clipboard MIME types are unavailable +- [ ] Verify copied SVG can be pasted into a text editor and common vector tools + +### PNG clipboard export + +- [ ] Render the current selection or document through the existing raster + export path +- [ ] Write PNG data to the system clipboard where the platform supports it +- [ ] Preserve transparent backgrounds when requested +- [ ] Provide file-download fallback where image clipboard APIs are unavailable +- [ ] Add browser capability tests and desktop integration coverage + +## PWA and offline web app + +- [ ] Add a web app manifest with name, icons, start URL, display mode, and + light/dark theme metadata +- [ ] Add installable application icons at the required sizes +- [ ] Add a service worker for the application shell and versioned static assets +- [ ] Cache the WASM runtime and other editor-critical assets for offline startup +- [ ] Keep documents in the existing local persistence layer rather than + introducing a second PWA-specific store +- [ ] Verify create, edit, save, close, reopen, and export while offline +- [ ] Define service-worker update behavior so stale application code cannot + silently remain active indefinitely +- [ ] Add Playwright coverage for first load, installation eligibility, cached + reload, offline reload, and application updates + +## Release and distribution + +Keep releases understandable and reproducible before investing in extensive +automation. + +- [ ] Decide which Rust crates are public API and which remain workspace-only +- [ ] Define crates.io package metadata and publication order for publishable + crates +- [ ] Decide whether CLI and MCP ship from one crate with multiple binaries or + independent packages +- [ ] Define the desktop release matrix for macOS, Linux, and Windows +- [ ] Define the CLI and MCP binary release matrix +- [ ] Add a documented manual release checklist covering version changes, + changelog, tests, builds, packaging, checksums, tags, and publication +- [ ] Add local release scripts for repeatable desktop and CLI/MCP builds + without requiring a fully automated release pipeline +- [ ] Publish GitHub release artifacts with checksums +- [ ] Publish intended Rust packages to crates.io +- [ ] Verify installation instructions against clean machines or containers + +## Agent skills + +Revisit skills after the CLI and MCP surfaces have stabilized. + +- [ ] Inventory existing skills and the commands or workflows each depends on +- [ ] Remove duplicated instructions that are better represented by CLI or MCP + capabilities +- [ ] Separate product workflows from repository-development skills +- [ ] Keep skills thin wrappers around stable Inkfinite capabilities rather + than introducing alternative document semantics +- [ ] Add end-to-end examples for the supported agent workflows +- [ ] Document when agents should use direct CLI control versus permissioned MCP + ## Stencil and library workflows - [ ] Serialize and validate reusable selections through Rust document APIs, @@ -51,15 +198,3 @@ and rendered output where visual fidelity matters. - [ ] Add the starter picker and new-board workflow in TypeScript - [ ] Verify every starter through open, edit, save, reopen, inspect, and export - [ ] Add end-to-end tests for opening and editing each starter - -## Backlog - -- [ ] Add boolean paths, gradient editing, clip/mask/filter editing, - variable-width strokes, and text on path -- [ ] Add a web manifest, service worker, PWA installation, and stronger - offline behavior -- [ ] Decide crates.io and desktop release packaging; automate release - artifacts -- [ ] Revisit skill organization after SVG and MCP workflows stabilize -- [ ] Export SVG as copyable code -- [ ] Export PNG to clipboard