dcbc213d1f
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5.0 KiB
5.0 KiB
Tasks
Each task is independently testable. Stop on failure. Tasks in the same wave touch different files and can run in parallel; a wave starts when the previous one passes cargo test --lib. After each code wave a read-only Codex gpt-6.1-sol review; real findings get fixed before the next wave.
Wave 0: design (parallel with wave 1)
- 0. Mock-ups in the
PaperCraftdesign file, new pageDesign libraries:Modal / Variables,Modal / Libraries,Modal / Library updates,Panel / Assets(344x1440),Inspector / Bound fields(344x1440). Reuse theDesign Systempage variables and components. Only through the user's running app afterget_basic_infoconfirms the open file isPaperCraft; neveropen_filein the user's app.
Wave 1: model (parallel)
- 1. Design-system model (new
src/variables.rs). Types from the spec (DesignSystem,Collection,Mode,Variable,Kind,Value), ids, CSS name, group helpers (list groups, rename group), alias resolution per mode with cycle check, duplicate CSS name check,cache_for(page modes) -> (variables, modes, mode, tokens)producing today'sDocumentfields. Tests: groups, rename group, alias chain, cycle refused, duplicate refused, cache matches today's shape. - 2. Storage and migration (
src/project/format.rs,src/project/mod.rs,src/session.rs).design.jsonload/save next toproject.json; project version 2 with aPROJECT_STEPSstep building collectionsColorsandTokensfrom the first page;PageFile.modesper collection;component_keyfor existing mains. Tests: v1 project migrates, round trip, a v2 project's page files still deserialize in the old reader shape. - 3. Bindings field (
src/model/node.rs,src/model/paint.rs).Node.bindings,InstanceLink.source,Node.component_key, allserde(default). Tests: old pages load; serialization skips empty fields.
Wave 2: wiring (after 1–3; 4 then 5 and 6 in parallel)
- 4. One write path (
src/history.rs,src/editor/*). Design-system edits update the projectDesignSystem, rebuild every page's cache and re-apply fill and field bindings, one undo step per page; replaceon_every_pageand the page-only removals insrc/ui/confirm.rs. Per-page mode switch. Tests: number binding change on two pages; mode switch only touches its page; undo per page. - 5. Field bindings applied (
src/editor/structure.rs, layout). Apply bound stroke, text colour, size, gap, padding, radius, font size, line height, opacity, visible; instance sync carries bindings; detach writes resolved values. Tests per field. - 6. MCP and exports (
src/mcp/exec.rs,src/mcp/tools.rs,src/mcp/codegen.rs,src/design_system.rs). Extendedget_variables/set_variables,create_collection,delete_variables,bind_variable; DTCG nests groups; old calls still work. Tests: old and new call shapes, DTCG groups,edits_docclassification.
Wave 3: components across pages (after wave 2)
- 7. Cross-page instances (
src/editor/structure.rs,src/mcp/exec.rs).Source::Pagesync on main edit, create/swap from any page, "main missing" state. Tests: edit main on A updates B; undo per page; delete main leaves instance flagged.
Wave 4: libraries (after wave 3; 8 then 9)
- 8. Publish and enable (new
src/libraries.rs).library.jsonwriter with previews and publish diff, available list from the store, enable copies snapshot, library collections and components resolvable (Source::Library), duplicate CSS name refusal. Tests: publish, enable in second project, binding and instance work, conflict refused. - 9. Updates and missing sources (
src/libraries.rs). Version compare, review diff, update keeps overrides, missing library keeps working, disable detaches after confirm. MCPpublish_library,list_libraries,enable_library,update_library,disable_library. Tests per path.
Wave 5: UI (after wave 4 and the mock-ups; 10, 11, 12 in parallel, then 13)
- 10. Variables modal (new
src/ui/variables.rs). Screenshot check againstModal / Variables. - 11. Libraries modal (new
src/ui/libraries.rs). Screenshot check againstModal / LibrariesandModal / Library updates. - 12. Assets view (
src/ui/library.rsbecomes Assets). Screenshot check againstPanel / Assets. - 13. Design tab and inspector (
src/ui/design.rs,src/ui/inspector.rs, palette entries). Slim Design tab; variable picker on every bindable field. Screenshot check againstInspector / Bound fields.
Wave 6: finish
- 14. Docs and verify.
docs/design-system.md,docs/agents.md(new tools, count),ROADMAP.mdrows 7, 8, 12,PROGRESS.md; skillsskills/papercraft*mention collections, bindings and libraries. Fullcargo test --no-fail-fast, wasm and Windows checks, web build loads.
Model per task
Claude Sonnet: 0, 1, 2, 4, 5, 7, 8, 10, 11, 12. Claude Haiku: 3. Codex gpt-6.1-sol: 9, 13, and the reviews (task 6 moved to Sonnet: Codex hit its usage limit on 2026-10-21). Codex gpt-6-luna: 14.