Skip to content

Commit 6d8885f

Browse files
NagyViktclaude
andcommitted
chore(openspec): publish Phase 1 of flashpaste-overlayd plan
Adds openspec/changes/flashpaste-overlayd-phase1-2026-05-20/ + openspec/plans/flashpaste-overlayd-phase1-2026-05-20/ scaffolded by 'colony plan publish'. Phase 1 = 4 sub-tasks across 2 waves: Wave 1 (parallel): sub-0 read reference repos -> docs/overlay-references.md sub-1 write JSON-over-socket protocol spec sub-2 scaffold rs/flashpaste-overlayd crate Wave 2 (after deps): sub-3 define wire-protocol Rust types + serde tests Workers self-claim from the published Colony plan once full-bringup.sh runs against this slug. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7f27f5a commit 6d8885f

11 files changed

Lines changed: 295 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
base_root_hash: missing-spec-root
3+
slug: flashpaste-overlayd-phase1-2026-05-20
4+
---
5+
6+
# CHANGE · flashpaste-overlayd-phase1-2026-05-20
7+
8+
## §P proposal
9+
# flashpaste-overlayd Phase 1 — references, protocol spec, crate scaffold, Rust message types
10+
11+
## Problem
12+
13+
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.
14+
15+
## Acceptance criteria
16+
17+
- docs/overlay-references.md exists, summarizes wayscriber/gromit-mpx/gtk4-layer-shell across the four required dimensions, is under 400 lines, lints clean.
18+
- 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.
19+
- 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.
20+
- 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.
21+
- All four sub-task branches merge to main and the plan archives without an outstanding BLOCKED line in any tasks.md.
22+
23+
## Sub-tasks
24+
25+
### Sub-task 0: Prompt 1 — Read reference repos and write docs/overlay-references.md
26+
27+
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.
28+
29+
File scope: docs/overlay-references.md, .gitignore
30+
31+
### Sub-task 1: Prompt 2 — Write JSON-over-unix-socket wire protocol spec
32+
33+
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.
34+
35+
File scope: docs/overlay-protocol.md
36+
37+
### Sub-task 2: Prompt 3 — Scaffold the flashpaste-overlayd Rust crate
38+
39+
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.
40+
41+
File scope: rs/Cargo.toml, rs/flashpaste-overlayd/Cargo.toml, rs/flashpaste-overlayd/src/main.rs
42+
43+
### Sub-task 3: Prompt 4 — Define the wire-protocol message types in Rust (depends on: 1, 2)
44+
45+
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.
46+
47+
File scope: rs/flashpaste-overlayd/src/protocol.rs, rs/flashpaste-overlayd/src/main.rs
48+
49+
50+
## §S delta
51+
op|target|row
52+
-|-|-
53+
54+
## §T tasks
55+
id|status|task|cites
56+
-|-|-|-
57+
58+
## §B bugs
59+
id|status|task|cites
60+
-|-|-|-
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Architect
2+
3+
Plan: `flashpaste-overlayd-phase1-2026-05-20`
4+
5+
## Responsibility
6+
7+
Check boundaries, data flow, interfaces, and rollback shape.
8+
9+
## Checkpoints
10+
11+
- [ ] Read `plan.md`, `tasks.md`, and `checkpoints.md`.
12+
- [ ] Record decisions or blockers in the plan workspace before handoff.
13+
- [ ] Keep task-thread status aligned with local files.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Checkpoints
2+
3+
## Rollup
4+
5+
- available: 4
6+
- claimed: 0
7+
- completed: 0
8+
- blocked: 0
9+
10+
## Subtasks
11+
12+
- [ ] sub-0 Prompt 1 — Read reference repos and write docs/overlay-references.md [available]
13+
- [ ] sub-1 Prompt 2 — Write JSON-over-unix-socket wire protocol spec [available]
14+
- [ ] sub-2 Prompt 3 — Scaffold the flashpaste-overlayd Rust crate [available]
15+
- [ ] sub-3 Prompt 4 — Define the wire-protocol message types in Rust [available]
16+
17+
## Completion Gate
18+
19+
- [ ] All subtasks complete.
20+
- [ ] Spec change archived or explicitly marked not applicable.
21+
- [ ] Verification evidence recorded.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Critic
2+
3+
Plan: `flashpaste-overlayd-phase1-2026-05-20`
4+
5+
## Responsibility
6+
7+
Challenge weak assumptions, hidden risks, and missing tests.
8+
9+
## Checkpoints
10+
11+
- [ ] Read `plan.md`, `tasks.md`, and `checkpoints.md`.
12+
- [ ] Record decisions or blockers in the plan workspace before handoff.
13+
- [ ] Keep task-thread status aligned with local files.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Executor
2+
3+
Plan: `flashpaste-overlayd-phase1-2026-05-20`
4+
5+
## Responsibility
6+
7+
Implement claimed subtasks inside declared file scope.
8+
9+
## Checkpoints
10+
11+
- [ ] Read `plan.md`, `tasks.md`, and `checkpoints.md`.
12+
- [ ] Record decisions or blockers in the plan workspace before handoff.
13+
- [ ] Keep task-thread status aligned with local files.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# flashpaste-overlayd Phase 1 — references, protocol spec, crate scaffold, Rust message types
2+
3+
Plan slug: `flashpaste-overlayd-phase1-2026-05-20`
4+
5+
## Problem
6+
7+
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.
8+
9+
## Acceptance Criteria
10+
11+
- docs/overlay-references.md exists, summarizes wayscriber/gromit-mpx/gtk4-layer-shell across the four required dimensions, is under 400 lines, lints clean.
12+
- 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.
13+
- 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.
14+
- 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.
15+
- All four sub-task branches merge to main and the plan archives without an outstanding BLOCKED line in any tasks.md.
16+
17+
## Roles
18+
19+
- [planner](./planner.md)
20+
- [architect](./architect.md)
21+
- [critic](./critic.md)
22+
- [executor](./executor.md)
23+
- [writer](./writer.md)
24+
- [verifier](./verifier.md)
25+
26+
## Operator Flow
27+
28+
1. Refine this workspace until scope, risks, and tasks are explicit.
29+
2. Publish the plan with `colony plan publish flashpaste-overlayd-phase1-2026-05-20` or the `task_plan_publish` MCP tool.
30+
3. Claim subtasks through Colony plan tools before editing files.
31+
4. Close only when all subtasks are complete and `checkpoints.md` records final evidence.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Planner
2+
3+
Plan: `flashpaste-overlayd-phase1-2026-05-20`
4+
5+
## Responsibility
6+
7+
Clarify scope, sequencing, dependencies, and acceptance criteria.
8+
9+
## Checkpoints
10+
11+
- [ ] Read `plan.md`, `tasks.md`, and `checkpoints.md`.
12+
- [ ] Record decisions or blockers in the plan workspace before handoff.
13+
- [ ] Keep task-thread status aligned with local files.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Tasks
2+
3+
| # | Status | Title | Files | Depends on | Capability | Spec row | Owner |
4+
| - | - | - | - | - | - | - | - |
5+
0|available|Prompt 1 — Read reference repos and write docs/overlay-references.md|`docs/overlay-references.md`<br>`.gitignore`|-|doc_work|-|-
6+
1|available|Prompt 2 — Write JSON-over-unix-socket wire protocol spec|`docs/overlay-protocol.md`|-|doc_work|-|-
7+
2|available|Prompt 3 — Scaffold the flashpaste-overlayd Rust crate|`rs/Cargo.toml`<br>`rs/flashpaste-overlayd/Cargo.toml`<br>`rs/flashpaste-overlayd/src/main.rs`|-|infra_work|-|-
8+
3|available|Prompt 4 — Define the wire-protocol message types in Rust|`rs/flashpaste-overlayd/src/protocol.rs`<br>`rs/flashpaste-overlayd/src/main.rs`|1, 2|api_work|-|-
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Verifier
2+
3+
Plan: `flashpaste-overlayd-phase1-2026-05-20`
4+
5+
## Responsibility
6+
7+
Prove completion with focused tests and explicit evidence.
8+
9+
## Checkpoints
10+
11+
- [ ] Read `plan.md`, `tasks.md`, and `checkpoints.md`.
12+
- [ ] Record decisions or blockers in the plan workspace before handoff.
13+
- [ ] Keep task-thread status aligned with local files.

0 commit comments

Comments
 (0)