|
| 1 | +{ |
| 2 | + "schema_version": 1, |
| 3 | + "plan_slug": "flashpaste-overlayd-phase1-2026-05-20", |
| 4 | + "title": "flashpaste-overlayd Phase 1 — references, protocol spec, crate scaffold, Rust message types", |
| 5 | + "problem": "Ship a tiny Rust daemon (flashpaste-overlayd) that paints agent-driven annotations on a Wayland screen, with new MCP tools on flashpaste-mcp that drive it. Phase 1 lays the foundation: study reference implementations (wayscriber, gromit-mpx, gtk4-layer-shell), pin down the JSON-over-unix-socket wire protocol, scaffold the new Rust crate inside the existing flashpaste workspace, and implement the protocol types in Rust with round-trip serde tests. Phases 2-7 (rendering, IPC, MCP wiring, fallbacks, tests, release) follow in later plans. Source of truth: docs/flashpaste-overlayd-plan.md in the flashpaste repo.", |
| 6 | + "acceptance_criteria": [ |
| 7 | + "docs/overlay-references.md exists, summarizes wayscriber/gromit-mpx/gtk4-layer-shell across the four required dimensions, is under 400 lines, lints clean.", |
| 8 | + "docs/overlay-protocol.md fully specifies the five-message wire protocol with three example messages, three example responses, and the canonical socket path under $XDG_RUNTIME_DIR.", |
| 9 | + "rs/flashpaste-overlayd/ exists as a binary crate, registered in the rs/ workspace, with all required dependencies pinned and 'cargo check -p flashpaste-overlayd' succeeding clean.", |
| 10 | + "rs/flashpaste-overlayd/src/protocol.rs implements serde Serialize/Deserialize for every message in the spec with default-applying helpers, a Color newtype parsing #rrggbb/#rrggbbaa, and passing #[cfg(test)] round-trip tests; 'cargo test -p flashpaste-overlayd' is green.", |
| 11 | + "All four sub-task branches merge to main and the plan archives without an outstanding BLOCKED line in any tasks.md." |
| 12 | + ], |
| 13 | + "roles": [ |
| 14 | + "planner", |
| 15 | + "architect", |
| 16 | + "critic", |
| 17 | + "executor", |
| 18 | + "writer", |
| 19 | + "verifier" |
| 20 | + ], |
| 21 | + "tasks": [ |
| 22 | + { |
| 23 | + "subtask_index": 0, |
| 24 | + "title": "Prompt 1 — Read reference repos and write docs/overlay-references.md", |
| 25 | + "description": "Clone devmobasa/wayscriber, bk138/gromit-mpx, and wmww/gtk4-layer-shell into a references/ directory at the flashpaste repo root (add references/ to .gitignore). Do not modify these clones. Read each README.md and the top-level src/ directory listing. Produce docs/overlay-references.md summarizing for each repo: (a) crates/libraries used for Wayland layer-shell, (b) how GNOME (no layer-shell) is handled, (c) how rendering is done (Cairo, OpenGL, etc.), (d) one concrete pattern to adopt and one to avoid. Keep under 400 lines. Do not copy code. Acceptance: docs/overlay-references.md exists, lints clean with markdownlint, mentions all three repos. See docs/flashpaste-overlayd-plan.md Prompt 1 for the full prompt.", |
| 26 | + "file_scope": [ |
| 27 | + "docs/overlay-references.md", |
| 28 | + ".gitignore" |
| 29 | + ], |
| 30 | + "depends_on": [], |
| 31 | + "spec_row_id": null, |
| 32 | + "capability_hint": "doc_work", |
| 33 | + "status": "available", |
| 34 | + "claimed_by_session_id": null, |
| 35 | + "claimed_by_agent": null, |
| 36 | + "completed_summary": null |
| 37 | + }, |
| 38 | + { |
| 39 | + "subtask_index": 1, |
| 40 | + "title": "Prompt 2 — Write JSON-over-unix-socket wire protocol spec", |
| 41 | + "description": "Create docs/overlay-protocol.md. Define a JSON-over-Unix-socket protocol with exactly five message types: draw_rect, draw_circle, draw_arrow, draw_label, clear. Each message has fields: id (uuid v4 string), ttl_ms (int, default 3000, max 30000), color (hex string, default #ffae00), stroke_width (float pixels, default 2.0). Shape-specific fields: rect/circle take x,y,w,h; arrow takes x1,y1,x2,y2; label takes x,y,text (max 200 chars). clear takes optional id to clear one shape, or no field to clear all. Specify response format: {\"ok\":true,\"id\":\"...\"} or {\"ok\":false,\"error\":\"...\"}. Socket path: $XDG_RUNTIME_DIR/flashpaste-overlay.sock. One JSON object per line, newline-delimited. Include three example messages and three example responses. Do not add fields beyond what is listed. See docs/flashpaste-overlayd-plan.md Prompt 2.", |
| 42 | + "file_scope": [ |
| 43 | + "docs/overlay-protocol.md" |
| 44 | + ], |
| 45 | + "depends_on": [], |
| 46 | + "spec_row_id": null, |
| 47 | + "capability_hint": "doc_work", |
| 48 | + "status": "available", |
| 49 | + "claimed_by_session_id": null, |
| 50 | + "claimed_by_agent": null, |
| 51 | + "completed_summary": null |
| 52 | + }, |
| 53 | + { |
| 54 | + "subtask_index": 2, |
| 55 | + "title": "Prompt 3 — Scaffold the flashpaste-overlayd Rust crate", |
| 56 | + "description": "Inside the existing flashpaste Rust workspace (rs/), create a new binary crate called flashpaste-overlayd. Add it to the workspace Cargo.toml. The crate's Cargo.toml should declare these dependencies (pin to latest minor compatible): smithay-client-toolkit=0.19, wayland-protocols=0.32, wayland-protocols-wlr=0.3, cairo-rs=0.20, pangocairo=0.20, serde=1 with derive feature, serde_json=1, tokio=1 with full feature, clap=4 with derive feature, anyhow=1, tracing=0.1, tracing-subscriber=0.3, uuid=1 with v4 feature. Add a minimal src/main.rs that prints 'flashpaste-overlayd 0.1.0' and exits. Run 'cargo check -p flashpaste-overlayd' and confirm it builds clean. Report any unresolved dependency versions and pick the next-latest compatible version. See docs/flashpaste-overlayd-plan.md Prompt 3.", |
| 57 | + "file_scope": [ |
| 58 | + "rs/Cargo.toml", |
| 59 | + "rs/flashpaste-overlayd/Cargo.toml", |
| 60 | + "rs/flashpaste-overlayd/src/main.rs" |
| 61 | + ], |
| 62 | + "depends_on": [], |
| 63 | + "spec_row_id": null, |
| 64 | + "capability_hint": "infra_work", |
| 65 | + "status": "available", |
| 66 | + "claimed_by_session_id": null, |
| 67 | + "claimed_by_agent": null, |
| 68 | + "completed_summary": null |
| 69 | + }, |
| 70 | + { |
| 71 | + "subtask_index": 3, |
| 72 | + "title": "Prompt 4 — Define the wire-protocol message types in Rust", |
| 73 | + "description": "Create rs/flashpaste-overlayd/src/protocol.rs. Implement #[derive(Serialize, Deserialize)] enums and structs that exactly match the JSON spec in docs/overlay-protocol.md (from Prompt 2). Use #[serde(tag=\"type\", rename_all=\"snake_case\")] for the message enum. Use uuid::Uuid for ids. Default values via #[serde(default)] and helper fns. Add a Color newtype that parses #rrggbb and #rrggbbaa hex strings into an (r,g,b,a) tuple of f64s in 0.0-1.0, with impl Default returning #ffae00. Add #[cfg(test)] unit tests in the same file that round-trip each message type through serde_json and verify defaults apply. Update src/main.rs to declare 'mod protocol;'. Run 'cargo test -p flashpaste-overlayd' and confirm all tests pass. See docs/flashpaste-overlayd-plan.md Prompt 4.", |
| 74 | + "file_scope": [ |
| 75 | + "rs/flashpaste-overlayd/src/protocol.rs", |
| 76 | + "rs/flashpaste-overlayd/src/main.rs" |
| 77 | + ], |
| 78 | + "depends_on": [ |
| 79 | + 1, |
| 80 | + 2 |
| 81 | + ], |
| 82 | + "spec_row_id": null, |
| 83 | + "capability_hint": "api_work", |
| 84 | + "status": "available", |
| 85 | + "claimed_by_session_id": null, |
| 86 | + "claimed_by_agent": null, |
| 87 | + "completed_summary": null |
| 88 | + } |
| 89 | + ], |
| 90 | + "published": { |
| 91 | + "spec_task_id": 303, |
| 92 | + "spec_change_path": "/home/deadpool/Documents/flashpaste/openspec/changes/flashpaste-overlayd-phase1-2026-05-20/CHANGE.md", |
| 93 | + "auto_archive": false |
| 94 | + }, |
| 95 | + "created_at": "2026-05-19T22:14:38.216Z", |
| 96 | + "updated_at": "2026-05-19T22:14:38.216Z" |
| 97 | +} |
0 commit comments