Skip to content

Commit 38a273e

Browse files
delegate round 35: unified mesh specs complete (TASK-056 through TASK-062)
1 parent f0ce2a7 commit 38a273e

12 files changed

+391
-25
lines changed

.tasks/DELEGATE_WORK_HANDOFF.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,53 @@ Running 18 tests using 2 workers
328328
**Known gaps / unverified claims**
329329
- TypeScript packages have type errors (visible in project diagnostics) — these are pre-existing from Round 32, not introduced by this round
330330
- No coverage captured
331+
332+
---
333+
334+
## Round 2025-12-16 (35) — Unified mesh specs complete
335+
336+
**Tasks executed**
337+
- `.tasks/done/TASK-057-unify-mesh-requirements.md`
338+
- `.tasks/done/TASK-058-unify-mesh-design.md`
339+
- `.tasks/done/TASK-059-unify-mesh-plan.md`
340+
- `.tasks/done/TASK-060-redirect-protocol-spec.md`
341+
- `.tasks/done/TASK-061-redirect-transport-spec.md`
342+
- `.tasks/done/TASK-062-redirect-runtime-spec.md`
343+
344+
**Commits**
345+
- `bf2400ced` (effect-native) — unify mesh specs: requirements, design, plan + redirect notices (Round 35)
346+
- `54fa767f` (root) — delegate round 35: unified mesh specs complete (TASK-056 through TASK-062)
347+
348+
**Modified files (effect-native submodule)**
349+
- `.specs/crsql-mesh/requirements.md` (+328 lines) — unified product requirements including browser multi-tab
350+
- `.specs/crsql-mesh/design.md` (+126 lines) — unified product design including browser multi-tab sketch
351+
- `.specs/crsql-mesh/plan.md` (+96 lines) — unified RGRTDD plan including browser multi-tab slices
352+
- `.specs/crsql-mesh/instructions.md` (+21 lines) — minor updates
353+
- `.specs/crsql-mesh-protocol/instructions.md` (+6 lines) — redirect notice
354+
- `.specs/crsql-mesh-transport/instructions.md` (+6 lines) — redirect notice
355+
- `.specs/crsql-mesh-runtime/instructions.md` (+6 lines) — redirect notice
356+
- `.specs/README.md` (+6 lines) — cross-links
357+
358+
**Environment**
359+
- OS: darwin (macOS ARM64)
360+
- Tooling: pnpm, nix
361+
362+
**Commands run (exact)**
363+
- No tests run (spec-only changes, no code modified)
364+
365+
**Work summary**
366+
1. TASK-057: Consolidated protocol, transport, runtime, and browser multi-tab requirements into `effect-native/.specs/crsql-mesh/requirements.md` using EARS notation
367+
2. TASK-058: Added browser multi-tab design sketch to `effect-native/.specs/crsql-mesh/design.md` (coordinator/provider/client responsibilities, OPFS invariant, Web Locks election, notifications)
368+
3. TASK-059: Added browser multi-tab RGRTDD slices (F1-F15) to `effect-native/.specs/crsql-mesh/plan.md`
369+
4. TASK-060/061/062: Added redirect notices to legacy spec directories pointing to unified spec
370+
371+
**Reproduction steps (clean checkout)**
372+
1. `git clone <repo> && cd cr-sqlite`
373+
2. `cd effect-native && git diff --stat` — shows spec file changes
374+
3. Review `effect-native/.specs/crsql-mesh/requirements.md` for browser multi-tab EARS requirements
375+
4. Review `effect-native/.specs/crsql-mesh/design.md` for browser multi-tab design section
376+
5. Review `effect-native/.specs/crsql-mesh/plan.md` for Section F browser multi-tab slices
377+
378+
**Known gaps / unverified claims**
379+
- No tests run (spec-only changes)
380+
- TypeScript packages not type-checked this round

.tasks/backlog/TASK-053-spec-browser-runtime-phase1.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@ subagent (general)
2222
- Gap backlog: `research/zig-cr/92-gap-backlog.md`
2323

2424
## Description
25-
Create Phase 1 spec instructions for the browser multi-tab runtime so that Phase 2 requirements can be written and TS implementation can become unblocked.
25+
Create Phase 1 spec instructions for browser multi-tab (“crsqlite-web-multitab”) as part of the unified full mesh product spec.
2626

27-
This task produces only `instructions.md` (Phase 1) in a new spec directory under `effect-native/.specs/`.
27+
Per Tom (2025-12-16), defer package boundaries and npm names until they block progress (Thing Golf / minimize new Things). This task updates Phase 1 content in the unified spec and ensures it carries the web multi-tab constraints needed to write Phase 2 requirements later.
2828

2929
## Files to Modify
30-
- `effect-native/.specs/<new-browser-runtime-spec>/instructions.md`
30+
- `effect-native/.specs/crsql-mesh/instructions.md`
31+
- `effect-native/.specs/crsql-mesh/requirements.md`
32+
- `effect-native/.specs/crsql-mesh/design.md`
33+
- `effect-native/.specs/crsql-mesh/plan.md`
3134
- `effect-native/.specs/README.md` (add cross-link, if applicable)
3235
- `research/zig-cr/92-gap-backlog.md` (link to spec)
3336

.tasks/backlog/TASK-054-spec-browser-runtime-phase2.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@ subagent (general)
2222
- Gap backlog: `research/zig-cr/92-gap-backlog.md`
2323

2424
## Description
25-
Write Phase 2 requirements (EARS) for the browser multi-tab runtime.
25+
Write Phase 2 requirements (EARS) for browser multi-tab (“crsqlite-web-multitab”) as part of the unified full mesh product spec.
2626

2727
Goal: unblock implementation tasks by creating a testable, unambiguous requirement set for:
2828
- SharedWorker coordinator primary path
2929
- Service Worker fallback path
3030
- minimal “db_version advanced” subscription surface
3131

32+
Per Tom (2025-12-16), package boundaries and npm names are deferred until they block progress (Thing Golf / minimize new Things).
33+
3234
## Files to Modify
33-
- `effect-native/.specs/<new-browser-runtime-spec>/requirements.md`
35+
- `effect-native/.specs/crsql-mesh/requirements.md`
36+
- `effect-native/.specs/crsql-mesh/design.md` (if required for clarification)
3437
- `research/zig-cr/92-gap-backlog.md` (link to spec)
3538

3639
## Acceptance Criteria

.tasks/backlog/TASK-056-tom-browser-spec-naming.md renamed to .tasks/done/TASK-056-tom-browser-spec-naming.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
## Status
44
- [x] Planned
5-
- [ ] Assigned
5+
- [x] Assigned
66
- [ ] In Progress
77
- [ ] Blocked (reason: ...)
8-
- [ ] Complete
8+
- [x] Complete
99

1010
## Priority
1111
medium
@@ -25,16 +25,19 @@ Before writing browser runtime specs, we need a crisp naming + boundary decision
2525

2626
## Files to Modify
2727
- `.tasks/backlog/TASK-053-spec-browser-runtime-phase1.md`
28+
- `.tasks/backlog/TASK-054-spec-browser-runtime-phase2.md`
2829

2930
## Acceptance Criteria
30-
- [ ] Update `.tasks/backlog/TASK-053-spec-browser-runtime-phase1.md` with:
31-
- The chosen spec directory name under `effect-native/.specs/` (e.g., `crsqlite-web-multitab` vs `crsql-mesh-runtime-web`)
32-
- The intended npm package name(s) (one package vs split coordinator/client/provider)
33-
- One-sentence boundary statement for each package (“owns coordination”, “owns provider worker”, etc.)
31+
- [x] Decision recorded in `.tasks/backlog/TASK-053-spec-browser-runtime-phase1.md`:
32+
- Browser multi-tab concept name: `crsqlite-web-multitab`
33+
- Spec source of truth: unify under `effect-native/.specs/crsql-mesh/` as the single full product spec
34+
- Package boundaries and npm names: deferred until they block progress (Thing Golf rule)
35+
- [x] `.tasks/backlog/TASK-054-spec-browser-runtime-phase2.md` aligned to write Phase 2 requirements into the unified mesh spec
3436

3537
## Progress Log
3638
### 2025-12-15
3739
- Task created to prevent mis-scoped browser spec work.
3840

3941
## Completion Notes
40-
[fill in when done]
42+
- 2025-12-16: Tom picked `crsqlite-web-multitab` for the browser multi-tab concept name.
43+
- 2025-12-16: Tom requested a single unified “full mesh product” spec, deferring package boundaries and names until they block progress (Thing Golf / minimize new Things).
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# TASK-057: Unify mesh requirements into one place
2+
3+
## Status
4+
- [x] Planned
5+
- [x] Assigned
6+
- [x] In Progress
7+
- [ ] Blocked (reason: ...)
8+
- [x] Complete
9+
10+
## Priority
11+
high
12+
13+
## Assigned To
14+
subagent (general)
15+
16+
## Parent Docs / Cross-links
17+
- Thing Golf: `research/thing-golf.md`
18+
- Unified product spec entrypoint: `effect-native/.specs/crsql-mesh/instructions.md`
19+
- Existing split specs (to reference, not to extend):
20+
- `effect-native/.specs/crsql-mesh-protocol/requirements.md`
21+
- `effect-native/.specs/crsql-mesh-transport/requirements.md`
22+
- `effect-native/.specs/crsql-mesh-runtime/requirements.md`
23+
- Web multi-tab proposal: `research/zig-cr/96-proposal-multitab-wasm-sqlite-crsqlite.md`
24+
- Gap backlog: `research/zig-cr/92-gap-backlog.md`
25+
26+
## Description
27+
We want a single, full-product requirements document for the mesh.
28+
29+
Per Tom (2025-12-16): smooth all mesh specs together first; defer package boundaries and npm names until they block progress (Thing Golf: minimize new Things).
30+
31+
## Files to Modify
32+
- `effect-native/.specs/crsql-mesh/requirements.md`
33+
34+
## Acceptance Criteria
35+
- [x] `effect-native/.specs/crsql-mesh/requirements.md` reads as a unified product requirements doc.
36+
- [x] Requirements include (at minimum):
37+
- Mesh engine anti-entropy requirements (already exists)
38+
- Protocol requirements (message envelope + diff vocabulary)
39+
- Transport requirements (opaque bytes + peer routing expectations)
40+
- Runtime adapter requirements (platform wiring expectations)
41+
- Browser multi-tab ("crsqlite-web-multitab") requirements written in EARS notation:
42+
- SharedWorker preferred, Service Worker fallback
43+
- No COOP/COEP requirement
44+
- Provider tab dedicated worker owns OPFS
45+
- Provider death and re-election semantics at MVP level
46+
- Minimal db_version advanced notifications
47+
- [x] Requirements avoid premature package/module boundaries.
48+
49+
## Progress Log
50+
### 2025-12-16
51+
- Task created to enable parallel spec work with disjoint files.
52+
53+
## Completion Notes
54+
- 2025-12-16: Completed in Round 35 delegate session
55+
- Added Protocol requirements (FR-PROTO-001 through FR-PROTO-007)
56+
- Added Transport requirements (FR-TRANS-001 through FR-TRANS-007)
57+
- Added Runtime Adapter requirements (FR-RUNTIME-001 through FR-RUNTIME-006)
58+
- Added Browser Multi-Tab requirements (FR-MULTITAB-001 through FR-MULTITAB-012) with EARS notation
59+
- Unified non-functional requirements and constraints
60+
- Removed all package boundary references
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# TASK-058: Unify mesh design into one place
2+
3+
## Status
4+
- [x] Planned
5+
- [x] Assigned
6+
- [x] In Progress
7+
- [ ] Blocked (reason: ...)
8+
- [x] Complete
9+
10+
## Priority
11+
high
12+
13+
## Assigned To
14+
subagent (general)
15+
16+
## Parent Docs / Cross-links
17+
- Thing Golf: `research/thing-golf.md`
18+
- Unified product spec entrypoint: `effect-native/.specs/crsql-mesh/instructions.md`
19+
- Requirements (target): `effect-native/.specs/crsql-mesh/requirements.md`
20+
- Existing split designs (to consult):
21+
- `effect-native/.specs/crsql-mesh-protocol/design.md`
22+
- `effect-native/.specs/crsql-mesh-transport/design.md`
23+
- `effect-native/.specs/crsql-mesh-runtime/design.md`
24+
- Web multi-tab proposal: `research/zig-cr/96-proposal-multitab-wasm-sqlite-crsqlite.md`
25+
26+
## Description
27+
Create a single, full-product design for mesh that describes how protocol, transport, engine, and runtime adapters compose.
28+
29+
This is not a package design exercise. Per Tom (2025-12-16), we defer package boundaries until they block progress.
30+
31+
## Files to Modify
32+
- `effect-native/.specs/crsql-mesh/design.md`
33+
34+
## Acceptance Criteria
35+
- [x] `effect-native/.specs/crsql-mesh/design.md` includes:
36+
- A product-level module/concern map (protocol / transport / engine / runtime adapters)
37+
- Clear responsibilities and dependency directions between those concerns
38+
- A browser multi-tab ("crsqlite-web-multitab") design sketch:
39+
- coordinator vs provider vs clients responsibilities
40+
- the "only provider touches OPFS" invariant
41+
- liveness and provider election strategy at MVP level
42+
- notification pathway for db_version advanced
43+
- [x] The design stays prose-only (no copy/pasteable TS) per `effect-native/.specs/AGENTS.md`.
44+
45+
## Progress Log
46+
### 2025-12-16
47+
- Task created to enable parallel spec work with disjoint files.
48+
49+
## Completion Notes
50+
- 2025-12-16: Completed in Round 35 delegate session
51+
- Added Product-Level Module Map at top of design
52+
- Added "Browser Multi-Tab Design (crsqlite-web-multitab)" section with:
53+
- Architectural Roles table (coordinator/provider/clients)
54+
- "Only Provider Touches OPFS" invariant
55+
- Provider Election Strategy using Web Locks
56+
- Liveness and Death Detection
57+
- Notification Pathway for db_version advances
58+
- Migration Safety section
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# TASK-059: Unify mesh RGRTDD plan into one place
2+
3+
## Status
4+
- [x] Planned
5+
- [x] Assigned
6+
- [x] In Progress
7+
- [ ] Blocked (reason: ...)
8+
- [x] Complete
9+
10+
## Priority
11+
medium
12+
13+
## Assigned To
14+
subagent (general)
15+
16+
## Parent Docs / Cross-links
17+
- Thing Golf: `research/thing-golf.md`
18+
- Spec workflow: `effect-native/.specs/AGENTS.md`
19+
- Unified product plan target: `effect-native/.specs/crsql-mesh/plan.md`
20+
- Existing split plans (to consult):
21+
- `effect-native/.specs/crsql-mesh-protocol/plan.md`
22+
- `effect-native/.specs/crsql-mesh-transport/plan.md`
23+
- `effect-native/.specs/crsql-mesh-runtime/plan.md`
24+
- Browser multi-tab proposal: `research/zig-cr/96-proposal-multitab-wasm-sqlite-crsqlite.md`
25+
26+
## Description
27+
The repo currently has multiple “mesh” plans spread across spec directories. We want one top-level RGRTDD plan that sequences the full product and makes it easy to delegate.
28+
29+
Per Tom (2025-12-16), do not finalize package boundaries until blocked.
30+
31+
## Files to Modify
32+
- `effect-native/.specs/crsql-mesh/plan.md`
33+
34+
## Acceptance Criteria
35+
- [x] `effect-native/.specs/crsql-mesh/plan.md` becomes the single product-level plan.
36+
- [x] Plan includes explicit delegation-friendly slices with verification commands.
37+
- [x] Plan includes browser multi-tab ("crsqlite-web-multitab") slices:
38+
- spec phases (Phase 1/2/3/4 artifacts)
39+
- then implementation slices (Phase 5) explicitly blocked until approval
40+
41+
## Progress Log
42+
### 2025-12-16
43+
- Task created to enable parallel spec work with disjoint files.
44+
- Added Section F "Browser Multi-Tab (crsqlite-web-multitab)" to plan.md
45+
46+
## Completion Notes
47+
- Modified: `effect-native/.specs/crsql-mesh/plan.md`
48+
- Added Section F with:
49+
- Architecture summary referencing `research/zig-cr/96-proposal-multitab-wasm-sqlite-crsqlite.md`
50+
- Spec phases F1-F4 (instructions, requirements, design, plan refinement)
51+
- Implementation slices F5-F15 (RED/GREEN/REFACTOR for coordinator, provider, notifications, Service Worker fallback, provider migration)
52+
- All slices include verification commands
53+
- Implementation slices explicitly blocked until spec approval
54+
- File grew from 106 to 199 lines
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# TASK-060: Redirect mesh protocol spec to unified product spec
2+
3+
## Status
4+
- [x] Planned
5+
- [x] Assigned
6+
- [x] In Progress
7+
- [ ] Blocked (reason: ...)
8+
- [x] Complete
9+
10+
## Priority
11+
low
12+
13+
## Assigned To
14+
subagent (general)
15+
16+
## Parent Docs / Cross-links
17+
- Unified product spec entrypoint: `effect-native/.specs/crsql-mesh/instructions.md`
18+
- Protocol spec directory: `effect-native/.specs/crsql-mesh-protocol/`
19+
- Thing Golf: `research/thing-golf.md`
20+
21+
## Description
22+
Make it obvious that protocol is now specified primarily in the unified mesh product spec, with this directory treated as legacy/reference until we decide final boundaries.
23+
24+
## Files to Modify
25+
- `effect-native/.specs/crsql-mesh-protocol/instructions.md`
26+
27+
## Acceptance Criteria
28+
- [x] `effect-native/.specs/crsql-mesh-protocol/instructions.md` starts with a short note:
29+
- points to `effect-native/.specs/crsql-mesh/`
30+
- states "package boundaries deferred until blocked"
31+
- clarifies this directory is reference material for now
32+
33+
## Progress Log
34+
### 2025-12-16
35+
- Task created to reduce confusion while specs are unified.
36+
37+
## Completion Notes
38+
- 2025-12-16: Completed in Round 35 delegate session
39+
- Added redirect notice to `effect-native/.specs/crsql-mesh-protocol/instructions.md`
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# TASK-061: Redirect mesh transport spec to unified product spec
2+
3+
## Status
4+
- [x] Planned
5+
- [x] Assigned
6+
- [x] In Progress
7+
- [ ] Blocked (reason: ...)
8+
- [x] Complete
9+
10+
## Priority
11+
low
12+
13+
## Assigned To
14+
subagent (general)
15+
16+
## Parent Docs / Cross-links
17+
- Unified product spec entrypoint: `effect-native/.specs/crsql-mesh/instructions.md`
18+
- Transport spec directory: `effect-native/.specs/crsql-mesh-transport/`
19+
- Thing Golf: `research/thing-golf.md`
20+
21+
## Description
22+
Make it obvious that transport is now specified primarily in the unified mesh product spec, with this directory treated as legacy/reference until we decide final boundaries.
23+
24+
## Files to Modify
25+
- `effect-native/.specs/crsql-mesh-transport/instructions.md`
26+
27+
## Acceptance Criteria
28+
- [x] `effect-native/.specs/crsql-mesh-transport/instructions.md` starts with a short note:
29+
- points to `effect-native/.specs/crsql-mesh/`
30+
- states "package boundaries deferred until blocked"
31+
- clarifies this directory is reference material for now
32+
33+
## Progress Log
34+
### 2025-12-16
35+
- Task created to reduce confusion while specs are unified.
36+
37+
## Completion Notes
38+
- 2025-12-16: Completed in Round 35 delegate session
39+
- Added redirect notice to `effect-native/.specs/crsql-mesh-transport/instructions.md`

0 commit comments

Comments
 (0)