diff --git a/docs/architecture.md b/docs/architecture.md index 761e390..d9c388a 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -47,7 +47,7 @@ created_at: 2026-04-30T12:00:00Z - `task-timers.json` sidecar: JSON array of optional `FocusTimer` values. Array index matches the parsed task index; deleting a Task removes the matching timer entry. Expiry writes update the indexed timer to `status: Expired` atomically. Corrupted or missing task timer sidecars degrade to no task timers. - User hand-edits anywhere; file watcher reflects changes. - Atomic write via tmpfile + rename, serialized by an exclusive lock file per target. -- First launch seeds one example Focus. A marker file stops it from coming back after the user clears every Focus. +- Startup loads saved Focuses, Tasks, Timers, and Settings without creating example work. With no saved work, the ranch starts empty. Existing example Focuses and legacy `.example-focus-seeded` files remain untouched; Timers keep their saved start/duration and follow normal expiry, including time elapsed while the app was closed. ## Timers diff --git a/issues/063-resume-saved-work.md b/issues/063-resume-saved-work.md new file mode 100644 index 0000000..1c92071 --- /dev/null +++ b/issues/063-resume-saved-work.md @@ -0,0 +1,35 @@ +# 063 — Resume saved work without startup examples + +## Owning specification + +`specs/003-ranch-today/spec.md`: FR-001, FR-019, US1/AC4–AC5; `plan.md#startup-correction-slice`; tasks T030–T035. These feature artifacts remain Draft. The owner explicitly selected no seeding and resumption from saved work on 2026-10-18, then requested implementation. This narrow correction follows that direction without promoting other Draft features. + +## What to build + +Remove the automatic example writer: delete `src-tauri/src/app/seed.rs` and its module declaration/call in `src-tauri/src/app/mod.rs`. Update `docs/architecture.md`. Reuse existing work/Settings loading and Timer expiry; preserve old examples and marker files. No replacement service, flag, onboarding, schema/data migration, click-through fix, or Agent change. + +## Completion promise + +Ranch starts from the person's saved work and Settings, creates no example Focus or Task, and starts empty when no saved work exists, without resetting or deleting existing work or restarting Timers. + +## Acceptance criteria + +- [x] Automatic example creation and its marker writer are removed from startup; no replacement work writer is introduced. +- [ ] Saved Focuses/Tasks/Settings and old examples remain intact; legacy markers stay untouched and do not affect startup behavior. +- [ ] Empty roots with/without a legacy marker remain empty across launch/restart (V0). +- [ ] Future/Expired/due-while-closed Focus/Task Timers retain start/duration and follow normal expiry; canonical work is unchanged (V0). +- [x] Architecture documentation matches the correction. +- [x] Fresh `rtk task check` and `rtk task check:windows` pass on synchronized corrected source. +- [ ] Independent review, current-head green CI, and merge are recorded; native acceptance remains open until actual V0 proof exists. + +## Constitution compliance + +I: remove an unauthorized writer; preserve user-owned data and timer-only expiry. II–IV: retain independent domains, existing typed boundaries, and opt-in integration behavior. V: one narrow correction, current-source gates and actual native evidence before acceptance claims. VI: distinguish owner direction, implementation, historical evidence, and Draft artifacts. No exception or new architecture decision is proposed. + +## Blocked by + +No code prerequisite. Native startup proof is explicitly deferred until the owner resumes testing. This issue must not be moved to `issues/done/` or called fully accepted without that proof. The separate open-card click-through gap does not block this startup-only correction. + +## User stories addressed + +US1/AC4–AC5. Full US1 and all six baseline success criteria retain their actual separate status. diff --git a/specs/003-ranch-today/checklists/baseline.md b/specs/003-ranch-today/checklists/baseline.md new file mode 100644 index 0000000..7cf5aa1 --- /dev/null +++ b/specs/003-ranch-today/checklists/baseline.md @@ -0,0 +1,81 @@ +# Baseline Requirements Checklist: Ranch Today + +**Purpose**: Review the completeness, clarity, consistency, and measurability of 003's requirements, emphasizing local work/Timer rules and acceptance boundaries. +**Created**: 2026-10-18 +**Feature**: [Ranch Today specification](../spec.md) +**Depth**: Standard — 30 requirements-quality questions. +**Audience / Timing**: Reviewer; requirements review before the next specification revision or acceptance discussion. Suitable for PR review, not a runtime test procedure. +**Input**: `$speckit-checklist` with no additional focus supplied; standard scope selected from the current spec, plan, and tasks. + +**Note**: This custom checklist is generated by `$speckit-checklist` from feature context and requirements. +**Review Ownership**: This is a reviewer-owned requirements-quality artifact. Mark an item `[x]` only when the reviewer determines its requirements-quality criterion is satisfied. +**Marker Semantics**: `[x]` means reviewed and satisfied for requirements quality. It does not mean implementation work is complete or product acceptance has passed. + +**Constitution Alignment**: Questions cover local-state safety (I), independent domains (II), boundary ownership (III), explicit integration authority (IV), observable acceptance (V), and source/status authority (VI). Creating this checklist grants no compliance result, exception, or Draft-status promotion. + +## Requirement Completeness + +- [ ] CHK001 Are canonical work records, Timer ownership, and permitted work writers explicitly defined? [Completeness, Spec §FR-001, §FR-019] +- [ ] CHK002 Are requirements for Focus duplication and Task editing/undo explicit about which work and Timer state is retained? [Completeness, Gap, Spec §User Story 2, §FR-002–FR-003] +- [ ] CHK003 Are saved-duration validity, uniqueness, sharing, persistence, and removal rules stated consistently across the requirements and data model? [Completeness, Spec §FR-003; Data Model §User-owned work] +- [ ] CHK004 Is what counts toward each Limit explicitly defined, including completed Tasks and expired Focuses? [Completeness, Gap, Spec §FR-007; Data Model §User-owned work] + +## Requirement Clarity + +- [ ] CHK005 Is “a glance is enough” defined by an observable identification outcome and the conditions under which it applies? [Clarity, Ambiguity, Spec §User Story 1, §SC-001] +- [ ] CHK006 Is “within about a second” bounded by a stated tolerance and clear start/end events? [Clarity, Ambiguity, Spec §User Story 4, §SC-003] +- [ ] CHK007 Are Running, Expired, Clear, restart, and Revive distinguished without conflating Focus and Task Timer effects? [Clarity, Spec §FR-002–FR-003, §User Story 2; Data Model §State transitions] + +## Requirement Consistency + +- [ ] CHK008 Are Focus and Agent Session ownership, editability, Timer eligibility, and Limit contribution consistent across stories and requirements? [Consistency, Spec §FR-005, §FR-007, §FR-010] +- [ ] CHK009 Are notification permission, source-specific enablement, and per-crossing frequency requirements consistent with the allowed-attention rule? [Consistency, Spec §Edge Cases, §FR-017, §SC-004, §User Story 2/AC5] +- [ ] CHK010 Are app-authored Settings changes and external Settings edits assigned consistent immediate-versus-next-launch semantics? [Consistency, Spec §Edge Cases, §FR-008] +- [ ] CHK011 Are product-runtime network restrictions reconciled with the explicitly permitted external effects of integration installation? [Consistency, Conflict, Spec §FR-011–FR-012, §SC-006; Constitution I, IV] + +## Acceptance Criteria Quality + +- [ ] CHK012 Does each success criterion identify an observable outcome and sufficient conditions for a reviewer to judge it objectively? [Measurability, Spec §SC-001–SC-006] +- [ ] CHK013 Are success criteria traceable to requirements and acceptance scenarios, including Agent exclusion from Limits? [Traceability, Spec §FR-007, §SC-004–SC-005, §User Stories 3 and 5] +- [ ] CHK014 Are package-build acceptance and native product acceptance defined as distinct claims with distinct evidence requirements? [Measurability, Spec §FR-016, §SC-001–SC-006; Plan §Validation Slices; Tasks §Phase 9] +- [ ] CHK015 Are evidence-assessment completion, demonstrated acceptance, and owner-deferred acceptance clearly distinguished in the documented completion rules? [Clarity, Spec §Constitution Compliance Check; Tasks §Organization, §Phase 9/Completion rule, §Owner execution direction; Constitution V] + +## Scenario Coverage + +- [ ] CHK016 Are both app-authored work and external Markdown edits covered without changing canonical ownership or the permitted writer boundary? [Coverage, Spec §FR-001, §FR-019, §User Stories 2 and 4] +- [ ] CHK017 Are restart, time spent while Ranch is absent, and already-due Timer scenarios covered by requirements or explicitly left unresolved? [Coverage, Gap, Spec §FR-003, §User Story 2] +- [ ] CHK018 Are missing integration prerequisites, installation failure, and interrupted repair covered by requirements or explicitly excluded? [Coverage, Gap, Spec §FR-011; Constitution IV] +- [ ] CHK019 Are sessions already active before observation starts distinguished from sessions subsequently observed through Hook Firings? [Coverage, Spec §User Story 5/Current limitation, §SC-005] + +## Edge Case Coverage + +- [ ] CHK020 Are malformed canonical work records distinguished from missing or corrupt optional Timer state in the stated failure requirements? [Edge Cases, Gap, Spec §FR-001, §Edge Cases] +- [ ] CHK021 Are blank work text and invalid custom durations assigned explicit requirements, including nonpositive, duplicate, and built-in-equivalent durations? [Edge Cases, Gap, Spec §FR-001, §FR-003; Data Model §User-owned work] +- [ ] CHK022 Are empty-ranch state, deletion cancellation, and the persistence of the first-launch seed decision fully specified? [Edge Cases, Spec §Edge Cases, §User Story 3/AC3] + +## Non-Functional Requirements + +- [ ] CHK023 Are failure reporting, atomic persistence, and preservation of existing work specified for interrupted or rejected work changes? [Completeness, Gap, Spec §FR-001; Constitution I] +- [ ] CHK024 Are keyboard and assistive-access requirements for work cards, Timer controls, and Settings specified or intentionally excluded? [Coverage, Gap, Spec §User Stories 2 and 3, §FR-005, §FR-008] +- [ ] CHK025 Are privacy requirements for integration configuration and diagnostic records explicit about credential and transcript boundaries? [Completeness, Gap, Spec §FR-011–FR-012; Constitution I, IV] + +## Dependencies & Assumptions + +- [ ] CHK026 Are supported-platform and integration prerequisites explicit, including the boundary of unsupported Windows hook delivery? [Dependencies, Spec §FR-016, §Edge Cases; Plan §Technical Context] +- [ ] CHK027 Are configuration health and observed hook delivery defined separately, without assuming one proves the other? [Clarity, Assumption, Spec §FR-011, §User Story 5/AC4; Constitution IV] +- [ ] CHK028 Are known limitations, Accepted ADR direction, and Draft follow-on proposals classified so that observations do not become preservation requirements or implicit new scope? [Traceability, Spec §Clarifications, §Constitution Compliance Check, §FR-013–FR-015; Plan §Summary; Constitution VI] + +## Ambiguities & Conflicts + +- [ ] CHK029 Are empty-overlay interaction requirements reconciled with the interactive area required by an open Focus card? [Conflict, Spec §FR-004–FR-005, §User Story 2] +- [ ] CHK030 Is automatic first-launch example creation explicitly reconciled with the restriction on who may author work? [Conflict, Spec §Edge Cases, §FR-001, §FR-019; Constitution I] + +## Notes + +- Review the requirements as written; these questions are not instructions to exercise the app or certify its behavior. +- Leave items unchecked until the reviewer explicitly evaluates them. `[Gap]`, `[Ambiguity]`, `[Conflict]`, and `[Assumption]` identify review targets, not confirmed findings or authorized scope additions. +- `$speckit-implement` reads checklist checkbox state as a gate and must not modify these markers. +- `checklists/requirements.md` has a separate built-in lifecycle maintained by `$speckit-specify` and `$speckit-clarify`; this custom `baseline.md` does not use that exception. +- The owner's deferred native testing remains separate in [tasks T023–T028](../tasks.md#phase-9-convergence); successful package builds do not settle those acceptance claims. +- Add reviewer findings beside the relevant CHK ID. Proposed requirements changes need their own decision; the checklist does not amend the spec, plan, tasks, or Accepted ADRs. +- References: [spec](../spec.md), [plan](../plan.md), [tasks](../tasks.md), [data model](../data-model.md), [constitution](../../../.specify/memory/constitution.md). Section references describe written requirements, not implementation results. diff --git a/specs/003-ranch-today/contracts/current-behavior.md b/specs/003-ranch-today/contracts/current-behavior.md index 271114f..c8f0af8 100644 --- a/specs/003-ranch-today/contracts/current-behavior.md +++ b/specs/003-ranch-today/contracts/current-behavior.md @@ -1,10 +1,10 @@ # Current UI and IPC Contracts -**Status**: Draft baseline evidence, 2026-10-17. This maps the clarified [spec](../spec.md) to existing interfaces, without introducing endpoints or wire formats. Constitution I–IV govern these boundaries even where implementation is incomplete. +**Status**: Draft baseline evidence, revalidated 2026-10-18. This maps the clarified [spec](../spec.md) to existing interfaces, without introducing endpoints or wire formats. Constitution I–IV govern these boundaries even where implementation is incomplete. ## Boundary ownership -- **User → work:** card/tray actions use [Focus writer](../../../src/api/focusWriter.ts) and [Tauri bridge](../../../src-tauri/src/ui_bridge/mod.rs). Hand-edits enter through the watcher. Task operations address a Focus and current index; Timer operations use `TimerOwner`. Complete, Delete, and Clear are distinct. +- **User → work:** card/tray actions use [Focus writer](../../../src/api/focusWriter.ts) and [Tauri bridge](../../../src-tauri/src/ui_bridge/mod.rs). Hand-edits enter through the watcher. Startup must load saved work/Settings without automatically creating Focuses or Tasks. The current seed path violates this owner-selected rule; the plan removes it without modifying existing work or marker files. Task operations address a Focus and current index; Timer operations use `TimerOwner`. Complete, Delete, and Clear are distinct. - **Core → UI:** [Focus reader](../../../src/api/tauriFocusReader.ts), [scene reader](../../../src/api/tauriRenderSceneReader.ts), [Settings API](../../../src/api/settings.ts), and [Agent diagnostics](../../../src/api/agentDebug.ts) expose existing commands/events. Rust owns wire shapes and generated TypeScript; no duplicate schema is introduced. - **Domains → renderer:** [RenderScene](../../../crates/commands/src/render_scene.rs) is flat. [App selection](../../../src/components/App.tsx) resolves Focus details separately. Agent Animals have no Focus editing, Timer ownership, or Limit contribution. - **Claude → Ranch:** explicit plugin install uses the local CLI at user scope. A stable client delivers bounded Unix-socket frames; Windows has no delivery. Plugin health is separate from observed delivery. [Research](../research.md) distinguishes current shortcomings from accepted ADR direction. @@ -12,13 +12,15 @@ ## Observable contract and coverage -V1–V7 refer to [quickstart](../quickstart.md). FR-013–FR-015 require accurate observations, not tests requiring bugs to remain. +The table states the clarified acceptance contract, not a claim that every current path matches. **Known mismatch:** while a Focus card is open, [frontend hit regions](../../../src/hooks/useAnimalMovement.ts) cover the whole overlay and [the backdrop](../../../src/components/AnimalDetail.tsx) consumes outside clicks. The [native loop](../../../src-tauri/src/display/overlay.rs) honors those regions. Closing the card is implemented; simultaneous pass-through to the underlying app is not established by that path and needs a separately scoped runtime design/fix plus native proof. + +V0–V7 refer to [quickstart](../quickstart.md). FR-013–FR-015 require accurate observations, not tests requiring bugs to remain. | Spec entries | Observable contract | Existing proof owner / validation | |---|---|---| -| FR-001, FR-002 | Canonical local files; explicit edits; Complete retains, Delete removes, Clear affects only Timer; malformed sidecars do not block Focus. | [Store](../../../crates/storage/src/focus_store.rs), [workflows](../../../crates/commands/src/focus.rs); V1/V2. | +| FR-001, FR-002 | Startup loads existing persisted work/Settings, starts empty without work, never seeds or resets work/Timers, and preserves old examples/marker files; normal timer-only expiry applies (V0, US1/AC4–AC5). Canonical local files; explicit edits; Complete retains, Delete removes, Clear affects only Timer; malformed sidecars do not block Focus. Duplication creates fresh identity/creation time, preserves description and ordered Task text/completion, uses the collision-safe “ copy” title, copies no Focus or Task Timers, and leaves the source unchanged (US2/AC6). | [Store](../../../crates/storage/src/focus_store.rs), [workflows](../../../crates/commands/src/focus.rs), [startup](../../../src-tauri/src/app/mod.rs); V0/V1/V2. | | FR-003 | One Timer owner; built-ins 10/30/60 and shared saved custom chips; chip removal leaves running Timer; add Task revives only Expired Focus. | [Timers](../../../crates/commands/src/timers.rs), [Settings workflow](../../../src-tauri/src/app/settings_workflow.rs); V1. | -| FR-004, FR-005, FR-009 | One Pig per Focus; enabled displays/no gaps; drag/toss/Gather; empty-space click-through; Focus-only card closes outside/Escape. | [Scene contract](../../../crates/commands/tests/render_scene_contract.rs), [App tests](../../../src/components/App.test.tsx), [movement tests](../../../src/lib/animalMovement.test.ts); V3. | +| FR-004, FR-005, FR-009 | One Pig per Focus; absent/Running Focus Timer → Walking, Expired → Resting, independent of Task Timers; enabled displays/no gaps; drag/toss/Gather. Animals and an open Focus card receive interaction; empty space outside both passes clicks through and closes an open card; Escape closes it too. | [Scene contract](../../../crates/commands/tests/render_scene_contract.rs), [App tests](../../../src/components/App.test.tsx), [movement tests](../../../src/lib/animalMovement.test.ts); V3. | | FR-006, FR-007, FR-008 | Tray actions, delete confirmation, red Over Limit; soft defaults 5/7; editable Settings apply immediately; writes allowed; Agents excluded. | [Tray](../../../src-tauri/src/app/tray.rs), [Limits](../../../crates/commands/src/caps.rs), [Settings workflow](../../../src-tauri/src/app/settings_workflow.rs); V4/V5. | | FR-010, FR-011 | Agents default off; non-editable observed sessions; toggle leaves plugin; explicit install/repair; diagnostics include unchanged Firings. | [Plugin](../../../src-tauri/src/app/claude_plugin.rs), [socket tests](../../../crates/storage/tests/agent_hook_socket.rs), [journal](../../../crates/storage/src/agent_hooks/journal.rs); V5. | | FR-012, FR-017 | Ambient operation, allowed notifications/user-opened windows only; no outbound product network/model/telemetry; IPC boundary. | Constitution, source review, native/network observation V3/V6. | @@ -29,4 +31,8 @@ V1–V7 refer to [quickstart](../quickstart.md). FR-013–FR-015 require accurat | FR-018, FR-019, FR-020 | No sync/multi-user/import service, external work writer, auto-complete/merge, network API, slash command, or Harness notification forwarding. | Scoped source review V6; fixture file diffs V1/V5 check absence of unsolicited writes in exercised scenarios. | | FR-021, FR-022 | Primary-only default; Gather/no Wrangle; Pig and Claude Code only. | [Settings](../../../crates/domain/src/settings.rs), [Species](../../../crates/commands/src/render_scene.rs), tray; V3/V4/V6. | +SC-003 measures successful save completion of a valid local Focus file to the changed Task row visibly matching it in an already-open, visible Focus card: **at most 1.0 second**. This is an acceptance target, not measured performance. See V2 for timing and evidence conditions. + +The owner has resolved the startup policy: no seeding, resume saved state, start empty without work. Implementation and V0 proof are pending; the current seed path still conflicts with Constitution I / FR-019. The historical FR-019 source-scope PASS in the [pass record](../validation/pass-record.md) cannot certify that path as authorized. Existing package/gate evidence does not prove corrected runtime source. + SC-001 → V3; SC-002 → V1; SC-003 → V2; SC-004 → V4/V5; SC-005 → V5; SC-006 → V6. Source inspection and old tests must not substitute for fresh native results. diff --git a/specs/003-ranch-today/data-model.md b/specs/003-ranch-today/data-model.md index 85461b5..7ca1288 100644 --- a/specs/003-ranch-today/data-model.md +++ b/specs/003-ranch-today/data-model.md @@ -1,6 +1,6 @@ # Data Model: Ranch Today -**Status**: Draft description of current implementation, checked 2026-10-17. No new schema, stable Task identity, database, or migration. +**Status**: Draft description of the baseline and owner-selected startup correction, revalidated 2026-10-18. No new schema, stable Task identity, database, or migration. ## User-owned work @@ -15,6 +15,18 @@ The data root is `ADHD_RANCH_HOME` when set, otherwise `~/.adhd-ranch` on Unix, with platform path fallbacks on Windows. [Path resolution](../../src-tauri/src/app/paths.rs) is authoritative. No archive layout from draft spec 008 is adopted. +## Duplication contract + +FR-002 / US2/AC6 use [the existing duplication workflow](../../crates/commands/src/focus.rs): create an independent Focus with newly assigned identity and creation time; copy the description and Task text/completion in source order; leave the source unchanged. The title is the source title plus “ copy”, with a numeric suffix starting at 2 when needed to avoid an identity collision. Neither the Focus Timer nor any Task Timer is copied. No new schema or stable Task identity is introduced. + +## Startup loading and preservation + +FR-001 / FR-019 and US1/AC4–AC5 require no seeded work: load existing Focuses, Tasks, Timers, and Settings; an empty work root remains empty. This changes startup behavior, not entities or storage formats. The deletion is implemented in the startup correction branch; automated and native proof status is recorded in [the pass record](validation/pass-record.md#startup-correction-execution--2026-10-18-t030t035). + +Existing example Focuses remain ordinary persisted Focuses; do not detect or delete them by title or identity. `.example-focus-seeded` is a legacy artifact, not an active creation gate: leave it untouched and ignore its presence/absence. Directory setup may still create an empty storage directory; it must not create a Focus or Task. + +Reloaded Timers retain `started_at`, `duration_secs`, and status. Normal expiry may change a due Timer to Expired, including one due while Ranch was closed, without resetting start/duration or changing Focus/Task text/completion. Saved Settings retain the current loader/default behavior. No durable Animal position, open-card, or Agent-session restoration is introduced. See [the startup decision](research.md#8-resume-saved-work-without-seeding). + ## Observed activity | Entity | Current fields | Ownership / lifecycle | @@ -36,8 +48,8 @@ Each domain projects its state into this flat vocabulary. Movement and sprites c - **Task:** add → unchecked; Complete → checked in place; undo → unchecked; Delete → removed. Editing text preserves completion. None is Timer Clear. - **Timer:** start/restart → Running with fresh start time; due Running → Expired with timer-only persistence; Clear → absent. Adding a Task clears an Expired Focus Timer (Revive), never a Task Timer. -- **Focus projection:** running Focus Timer drives growth; Expired drives resting/ghostly/away appearance and tray Expired membership. Task Timer expiry changes neither projection nor tray membership. +- **Focus projection:** absent or Running Focus Timer → Walking; Expired → Resting. A Running Focus Timer drives growth; Expired drives ghostly/away appearance and tray Expired membership. Task Timer state does not control Animal motion; Task Timer expiry changes neither projection nor tray membership. - **Limits:** crossing above a threshold produces one transition and an allowed notification, not repeated notifications while above. Agent activity cannot change it. - **Agent:** Start establishes a session; Working/Idle update activity; End removes it. Disabling Agents hides/clears observed sessions and leaves the plugin installed. No activity state uses Focus Timer expiry. -These relationships preserve Constitution I–IV without authorizing new writes or installation. +These documented relationships propose no new write path or installation. They do not certify current runtime compliance; the seed-writing policy is resolved and deletion is implemented, while native runtime verification remains pending. diff --git a/specs/003-ranch-today/plan.md b/specs/003-ranch-today/plan.md index 6b7781c..3532937 100644 --- a/specs/003-ranch-today/plan.md +++ b/specs/003-ranch-today/plan.md @@ -1,18 +1,20 @@ # Implementation Plan: Ranch Today Baseline Validation -**Feature context**: `003-ranch-today` | **Date**: 2026-10-17 | **Spec**: [spec.md](spec.md) +**Feature context**: `003-ranch-today` | **Date**: 2026-10-18 | **Spec**: [spec.md](spec.md) -**Checkout branch**: `main` at `a48525d9a89555bf9bc925a20d626c0dc634b4ce` +**Planning baseline**: `main` at `7900cc445ac224464e254b31d4914b0a52055270` (feature context: `003-ranch-today`). + +**Implementation status**: Startup correction implemented in `550643a` on `fix/resume-saved-work`. T030–T033, automated gates, and independent review are complete. Native startup proof (T034) and final native/delivery reconciliation (T035) remain pending; see [the execution record](validation/pass-record.md#startup-correction-execution--2026-10-18-t030t035). **Status**: Draft. The specification remains Draft; these artifacts support owner review and do not promote it to approved authority. -**Input**: `specs/003-ranch-today/spec.md`, including the 2026-10-17 clarification that known limitations are observations which follow-on specifications may fix. +**Input**: `specs/003-ranch-today/spec.md`, including the 2026-10-17 observation rule and the five 2026-10-18 clarifications, including the owner's refined startup answer: no seeding, resume persisted work, and start empty when none exists. The interaction, motion, latency, and duplication decisions remain in force. ## Summary -Establish a reviewable baseline for the existing local-first desktop product: Focus and Task editing, Timers, ambient Animals, tray and Settings, hand-edited Markdown, and optional Claude Code observations. Reuse existing code and tests, document current contracts, and prepare a repeatable validation pass. No runtime implementation, dependencies, storage migration, new IPC, or archive work is proposed. +Establish a reviewable baseline for the existing local-first desktop product: Focus and Task editing, Timers, ambient Animals, tray and Settings, hand-edited Markdown, and optional Claude Code observations. Reuse existing code and tests, document current contracts, and prepare a repeatable validation pass. Add one bounded runtime correction selected by the owner: remove automatic startup example creation and use the existing persisted-state loading paths. No dependencies, storage migration, new IPC, onboarding UI, or archive work is proposed. -FR-013–FR-015 are observations, not behavior to preserve. ADR-0002's accepted transport direction is not fully implemented in current code; [research](research.md) records that discrepancy without approving it or absorbing its follow-on work into 003. +FR-013–FR-015 remain observations, not behavior to preserve. Automatic first-launch example creation violated Constitution I / FR-001 / FR-019 at the planning baseline. The owner-selected remedy—no startup seeding and no reset of saved work or Timers—is implemented in `550643a`; native proof remains pending. This plan grants no exception. ADR-0002's accepted transport direction is not fully implemented in current code; [research](research.md) records that discrepancy without approving it or absorbing its follow-on work into 003. ## Technical Context @@ -22,13 +24,13 @@ FR-013–FR-015 are observations, not behavior to preserve. ADR-0002's accepted **Storage**: Focus directories with `focus.md`, optional `timer.json` and `task-timers.json`; `settings.yaml` under the Ranch data root. Agent Sessions and recent Hook Firings are runtime observations, not user work. See [data model](data-model.md). -**Testing**: Existing Rust unit/integration tests, Vitest ^2.1.8, generated-type drift checks, native manual scenarios. [Quickstart](quickstart.md) distinguishes available coverage from checks actually executed. +**Testing**: Existing Rust unit/integration tests, Vitest ^2.1.8, generated-type drift checks, and the native startup matrix in V0. Remove the obsolete seed-preservation tests with their deleted implementation; retain storage/Timer coverage and prove actual startup through native launch/restart, not a no-op wrapper or source-text assertion. [Quickstart](quickstart.md) distinguishes available coverage from checks actually executed. -**Target Platform**: macOS primary; retain Windows and Linux package compatibility. Windows has no hook delivery. No platform code changes. +**Target Platform**: macOS primary; retain Windows and Linux package compatibility. Windows has no hook delivery. The planned source deletion affects the shared Tauri startup composition; use the existing host and Windows cross-target gates, with native startup proof on macOS. **Project Type**: Tauri desktop application with Rust workspace and React webviews; Tauri IPC is the frontend/core boundary. -**Performance Goals**: Hand-edited Markdown visible within about one second (SC-003); ambient rendering without unsolicited attention. No new FPS or throughput target. +**Performance Goals**: SC-003 requires at most 1.0 second from successful save completion of a valid local Focus file to the changed Task row matching it in an already-open, visible Focus card. This is an unmeasured acceptance target. Ambient rendering must not demand unsolicited attention; no new FPS or throughput target. **Constraints**: User-controlled atomic local writes; safe malformed optional sidecars; independent Focus and Agent Session domains; no outbound product network, telemetry, model calls, or stored provider credentials. Integration install remains explicit. @@ -36,18 +38,28 @@ FR-013–FR-015 are observations, not behavior to preserve. ADR-0002's accepted ## Constitution Check -These gates apply to this documentation and validation design, not a certification of all existing runtime behavior. +These gates assess the proposed startup correction and baseline validation design. They do not certify current runtime conformance or close existing acceptance gaps. | Principle / gate | Before research | After design | |---|---|---| -| I — User-owned local state | PASS: inspect existing files; no migration or personal-data writes. | PASS: synthetic validation data; no new write path or network service. | +| I — User-owned local state | ERROR at the planning baseline: automatic startup example creation wrote work without an authoring action. | PASS for the corrective design, implemented in `550643a`: the writer is removed; saved-state reads and normal timer-only expiry remain. Automated gates/review passed; native startup proof remains pending. | | II — Independent domains | PASS: preserve the accepted renderer seam. | PASS: Agent activity remains separate from Focus Timers, editing, and Limits. | -| III — Functional core, typed edges | PASS: reuse existing layers and generated contracts. | PASS: source owners linked; no code or generated-type edits. | +| III — Functional core, typed edges | PASS: reuse existing layers and generated contracts. | PASS: delete the seed adapter and its composition references; no replacement abstraction, schema, or generated-type edit. | | IV — Explicit integrations | PASS: no installation during planning. | PASS: isolated delivery proof; optional live check; configuration health is not delivery. | -| V — Observable small slices | PASS: baseline evidence only. | PASS: four bounded validation slices below; no passing-test or shipped-completion claim. | -| VI — Evidence and authority | PASS: keep the spec Draft and classify sources. | PASS: distinguish accepted ADR direction, observed code, and draft follow-ons; document existing transport drift. | +| V — Observable small slices | PASS: baseline evidence only. | PASS: one startup correction with explicit source/proof boundaries, plus four baseline validation slices; new runtime code requires a fresh gate, review, and merge. | +| VI — Evidence and authority | PASS: keep the spec Draft and classify sources. | PASS: distinguish accepted ADR direction, observed code, and draft follow-ons; document existing transport and seed-writing drift. | + +**Gate result:** PASS for the startup correction design and its implementation in `550643a`: the unauthorized startup writer is removed, with fresh automated gates and independent review recorded under T030–T033. Native startup acceptance (T034) and final native/delivery reconciliation (T035) remain open; source removal and passing component tests do not establish that proof. The specification remains Draft. Outside-click behavior and ADR-0002 drift remain separate unresolved work and are not bundled into this correction. -**Gate result:** PASS for Phase 0 and Phase 1 planning. No new exception is requested. ADR-0002 drift is an existing gap, not a compliant runtime result. Follow-on work must reconcile lower-level artifacts with accepted decisions before implementation. Owner approval of the current specification remains necessary before treating it as governing an implementation. +**Clarified behavior assessment (source inspection, not native proof):** + +| Clarification | Assessment / next boundary | +|---|---| +| Startup | Implemented in `550643a`: the seed call/module is removed; existing work/Settings loading and normal Timer expiry remain. T030–T033 and independent review are complete. Native proof of empty startup and saved-state preservation remains open in T034; final native/delivery reconciliation remains open in T035. | +| Outside-card click-through | Existing whole-overlay hit region/backdrop consumes outside clicks while closing the card. This differs from FR-004/FR-005 and US1/AC2. A separate runtime slice must design bounded Animal/card hit regions and an outside-click observation mechanism that does not swallow the underlying app’s click; current cursor polling alone observes position, not clicks. Native proof and relevant platform gates are required. No new global-input permission or platform mechanism is selected here. | +| Motion | Existing projection matches absent/Running → Walking and Expired → Resting, independent of Task Timers; native verification remains open. | +| Duplication | Existing workflow matches the clarified successful-copy semantics; new US2/AC6 still requires native evidence. | +| Update latency | Existing 200 ms debounce plus event/refetch is not measured end-to-end proof of ≤1.0 second; V2 defines the evidence. | ## Project Structure @@ -64,7 +76,7 @@ specs/003-ranch-today/ └── current-behavior.md ``` -`tasks.md` is a later `$speckit-tasks` output, not created by this command. +`tasks.md`, `validation/`, and the custom `checklists/baseline.md` already exist. This command preserves their history and checkbox states. The next task pass must append new unchecked tasks after T029 for the startup correction, documentation, fresh gates, and proof; update T023 for US1/AC4–AC5 and V0 while preserving checked T002's historical description. The current spec has 19 acceptance scenarios. Earlier constraints limiting every task to evidence-only work must be narrowed to allow this startup correction, while preserving the exclusions for click-through and FR-013–FR-015. Do not regenerate checked tasks or reuse v0.1.5 gates as proof of changed runtime source. ### Existing source and proof locations (repository root) @@ -84,17 +96,29 @@ src/lib/ # Movement, display and timer-picker helpers src/types/generated/ # Generated contracts, never manually edited ``` -**Structure Decision**: Keep the existing layout. This phase authors only five planning documents. Application code, unrelated dirty files, and the clarified specification remain unchanged. +**Structure Decision**: Keep the existing layout. This phase updates only the five existing planning documents. Application code, unrelated dirty files, and the clarified specification remain unchanged. + +## Startup Correction Slice + +**Completion promise:** Startup displays the person's saved work, creates no example Focus or Task, and starts empty when no saved work exists (FR-001 / FR-019, US1/AC4–AC5). Existing user data remains compatible. + +- **Source scope:** remove the sole `seed::ensure_example_focus` call and `pub mod seed` declaration in `src-tauri/src/app/mod.rs`; delete `src-tauri/src/app/seed.rs`, including its obsolete tests that require seeding. Update the startup description in `docs/architecture.md`. No replacement service, no-op function, seed flag, cleanup job, or new test harness. +- **Reuse:** keep `MarkdownFocusStore`, `load_settings`, IPC readers, render projection, directory setup, and `timer_expiry::spawn` unchanged. Persisted `started_at` and `duration_secs` remain authoritative; a Timer that became due while the app was closed may become Expired through the existing worker, without being restarted. +- **Data preservation:** do not identify/delete old Welcome Focuses or read/write/remove `.example-focus-seeded`. Storage already ignores that non-directory file. No schema migration or data rewrite is needed; ordinary saved examples remain editable work. A rollback to an older binary remains data-compatible but may restore its old seeding behavior on an empty unmarked root. +- **Proof:** V0 covers empty roots with/without a legacy marker, populated work including an old example, saved Settings, and Running/Expired/due-while-closed Timers. Reuse existing empty-store/read/sidecar/Timer tests for their actual boundaries; they are not proof of native startup. The deleted seed tests encode behavior the owner rejected; their removal must be paired with the V0 acceptance record, not a weakened gate or a claim that fewer tests prove the feature. Run a fresh `rtk task check` and `rtk task check:windows` on synchronized corrected source; retain unavailable native results as open. +- **Delivery boundary:** this correction is independently reviewable and does not fix click-through, alter Agent integration, or establish full 003 acceptance. Native testing remains deferred until the owner resumes it; no source edit or app launch occurs during this plan command. ## Validation Slices -1. **Files and Timers:** verify Task edits, Timer ownership/expiry/revival, optional sidecar failures, and persistence using existing tests plus card/file observations. Promise: accurately describe user work without making positional drift a rule. -2. **Ambient shell:** verify selection, movement, displays, Gather, tray, Settings, and soft Limits. Promise: visible behavior and platform-dependent gaps have explicit evidence or an unverified result. +1. **Files and Timers:** verify Task edits, duplication with fresh identity/creation time and copied ordered Task text/completion but no Timers, Timer ownership/expiry/revival, optional sidecar failures, and persistence using existing tests plus card/file observations. Promise: accurately describe user work without making positional drift a rule. +2. **Ambient shell:** verify selection, interactive Animals/open Focus card with empty-space click-through and outside/Escape closure, Focus Timer absent/Running → walking and Expired → resting independently of Task Timers, displays, Gather, tray, Settings, and soft Limits. Promise: visible behavior and platform-dependent gaps have explicit evidence or an unverified result. 3. **Agent boundary:** verify opt-in visibility, non-editability, exclusion from Limits, plugin health, unchanged Firings, and isolated delivery. Promise: configuration and actual delivery are reported separately. -4. **Evidence reconciliation:** map all FRs/SCs through [the contract](contracts/current-behavior.md) and [quickstart](quickstart.md), record commands/results/platform/commit, and route discrepancies to their owning follow-on. Promise: no acceptance claim rests only on source inspection or old CI. +4. **Evidence reconciliation:** map all FRs/SCs through [the contract](contracts/current-behavior.md) and [quickstart](quickstart.md), record commands/results/platform/commit, measure SC-003 under its precise conditions, track implementation and proof of the selected no-seeding correction, and route discrepancies to their owning follow-on. Promise: no acceptance claim rests only on source inspection or old CI. + +The [2026-10-17 pass record](validation/pass-record.md) and v0.1.5 package proof remain historical evidence: T029 is complete, T023–T028 are open, and all six SCs remain unverified end to end. Those results predate the refined startup policy and cannot establish its 19-scenario acceptance set. A subsequent runtime change invalidates reuse of the old gate/package results for that new source; fresh relevant checks and package identity are required for a new shipping claim. Native/live testing remains deferred by the owner; this planning command runs no app, gate, PR, merge, or release. -A discovered mismatch is evidence to report, not authorization for unrelated fixes. New acceptance gaps need a narrow issue. FR-013–FR-015 already have follow-on context. Any later runtime slice requires relevant gates after synchronization with current main, independent review, green CI, and merge before shipping completion is claimed. +The source-confirmed open-card click-through mismatch is not fixed by this documentation pass and must not be closed by source inspection or old UI tests. A discovered mismatch is evidence to report, not authorization for unrelated fixes. New acceptance gaps need a narrow issue. The startup correction above is the only runtime work planned here. FR-013–FR-015 already have follow-on context. Any later runtime slice requires relevant gates after synchronization with current main, independent review, green CI, and merge before shipping completion is claimed. ## Complexity Tracking -No new abstraction, protocol, schema, dependency, or constitutional exception. Existing accepted-decision drift is recorded in [research](research.md#5-record-accepted-decision-drift-without-enshrining-it). +No new abstraction, protocol, schema, dependency, or constitutional exception is introduced. The startup design removes a forbidden writer instead of exempting it; runtime compliance remains unverified until implementation and proof. See [the startup decision](research.md#8-resume-saved-work-without-seeding) and [separate accepted transport drift](research.md#5-record-accepted-decision-drift-without-enshrining-it). diff --git a/specs/003-ranch-today/quickstart.md b/specs/003-ranch-today/quickstart.md index 786a471..2562a46 100644 --- a/specs/003-ranch-today/quickstart.md +++ b/specs/003-ranch-today/quickstart.md @@ -1,6 +1,6 @@ # Validation Guide: Ranch Today -**Status**: Draft guide, not an execution report. Planning inspected source and test definitions only. See [contract coverage](contracts/current-behavior.md) and [data model](data-model.md). +**Status**: Draft guide, updated 2026-10-18, not an execution report. Planning inspected source and test definitions only. See [contract coverage](contracts/current-behavior.md) and [data model](data-model.md). ## Prerequisites and isolation @@ -42,11 +42,26 @@ A later shipping slice must pass `rtk task check`: lint, typecheck, tests, gener ## Native scenarios -For each scenario record pass/fail/unverified, platform, commit, and evidence. On first fixture launch expect one example Focus. Delete it and restart: its marker prevents reappearance. Create two clearly named Focuses for further checks. +Native/live testing remains deferred by the owner. These are instructions for the later test pass, not actions performed by this planning command. Existing [pass-record](validation/pass-record.md) results and task completion states remain historical; they do not prove the clarified criteria. + +For each scenario record pass/fail/unverified, platform, commit, and evidence. Run V0 against the corrected startup source before creating the two clearly named synthetic Focuses used by V1–V7. Automatic creation of an example Focus/Task is now a failed FR-001 / FR-019 / US1/AC5 observation, not an undecided policy or behavior to preserve. + +### V0 — Resume saved work without seeding + +Use a fresh isolated data/configuration root for each case. All launches use the same environment setup above and Agents as Animals off; stop Ranch completely between launches. Run V0 against the corrected startup source. V0 must pass; automatic creation of an example Focus/Task is a failure. Native execution remains pending until actual V0 evidence is recorded. + +1. **Empty root, no marker:** launch and restart. Expect zero Focus Animals and no example Focus/Task files. An empty storage directory and ordinary logs are permitted; startup must not create `.example-focus-seeded`. +2. **Empty work root, legacy marker:** place a synthetic `.example-focus-seeded` under the fixture `focuses/` directory before launch. Repeat. Expect no seeded work and unchanged marker contents; the marker does not control startup behavior. +3. **Saved work and Settings:** explicitly create synthetic Focuses and mixed completed/uncompleted Tasks, set nondefault Settings, and include a normal saved Focus named Welcome to ADHD Ranch. Before restarting, record file inventory/content and stable work identities. Restart with marker absent, then present. Expect the same work/Settings, no extra example, no deletion of the old example, and no new/modified marker. Compare canonical Markdown and Settings bytes before/after. Do not infer restoration of open cards, Animal positions, or old Agent sessions. +4. **Saved Timers:** include a Running Focus/Task Timer with a distant deadline, an Expired Timer, and a Timer that becomes due while Ranch is closed. Record `started_at`, `duration_secs`, status, and work text/completion before restart. After restart, future Timers continue from the saved timestamps; Expired remains Expired; the due Timer expires through the existing worker. Start/duration and Markdown must not reset or change. A normal Running → Expired status write is permitted, not evidence of startup seeding. Repeat the launch to check no restart/reset. + +Record source revision, platform, fixture case, launch/restart actions, actual UI/file outcomes, and pass/fail/unverified in `validation/us1.md` and `validation/pass-record.md`, linked to US1/AC4–AC5 and FR-001/FR-019. Link Timer proof to `validation/us2.md` / V1. Missing native execution leaves startup acceptance open. Storage unit tests alone do not establish actual host startup. + +The implementation removes seed-preservation tests because their required behavior is superseded; retain the existing storage/Timer tests and this replacement acceptance matrix. Run fresh `rtk task check` and `rtk task check:windows` on synchronized corrected source. Do not use old v0.1.5 results to claim the new runtime passed. No new test harness or source-text assertion is planned. ### V1 — Files, card, and Timers -Rename and duplicate a Focus; compare files and Animals. Add/edit two Tasks, Complete/undo one, then Delete it. Inspect fixture `focuses//focus.md`: Complete checks a retained line, Delete removes it. Blank Task input must not create a Task. +Rename a Focus. For duplication, give the source a description, ordered Tasks with mixed completion states, and both Focus and Task Timers. Duplicate and inspect both files and Animals: the independent copy gets fresh identity and creation time, retains description and Task text/order/completion, has title ` copy`, and has no Focus or Task Timers; the source remains unchanged. Duplicate the original again while that title is occupied to check the numeric suffix starting at 2 for identity collisions (FR-002 / US2/AC6). Add/edit two Tasks, Complete/undo one, then Delete it. Inspect fixture `focuses//focus.md`: Complete checks a retained line, Delete removes it. Blank Task input must not create a Task. Start/restart/Clear Focus and Task Timers and inspect their owning sidecars; Clear retains work. Check built-ins 10/30/60 and shared custom chips across pickers/restart. Remove saved chips during a running Timer: Timer and built-ins remain. @@ -54,11 +69,11 @@ Use short custom Timers to observe Focus growth then expiry (ghostly/resting/awa ### V2 — Hand edits and durability -Append a nonempty checkbox in fixture Markdown; time save-to-card visibility. Complete a checkbox externally and repeat. Record actual elapsed time against SC-003's approximately one-second outcome; debounce is not a measurement. Restart and verify work, Timers, and saved Settings survive. Hand-edited Settings apply on restart, not by live Settings-file watching. +Keep the corresponding Focus card already open and visible. Successfully save a valid local Focus file after appending a nonempty checkbox; then separately Complete a checkbox and repeat. For each change, measure from successful save completion to the corresponding Task row visibly matching the saved file. Record the timing method, both endpoints on a common time base, precision/uncertainty, and elapsed time. Each measured change must take **at most 1.0 second** (SC-003); a slower result fails that observation. If timing precision cannot establish the bound or the preconditions are unavailable, leave it unverified. Watcher debounce and source inspection are not end-to-end measurements. Restart and verify work, Timers, and saved Settings survive. Hand-edited Settings apply on restart, not by live Settings-file watching. ### V3 — Ambient overlay and displays -Name the open Focuses from visible labels. Confirm one Pig per Focus, drag/toss, and Gather to primary. Click empty overlay space: the underlying app receives it. Close a Focus card by outside click/Escape. Work in another app: Ranch must not raise a window or take attention on its own. +Name the open Focuses from visible labels. Confirm one Pig per Focus and check the motion matrix: absent or Running Focus Timer → Walking; Expired Focus Timer → Resting. Task Timer state must not control motion. Check drag/toss and Gather to primary. Click an Animal to open its Focus card; use card controls to verify they receive interaction. Click empty overlay space outside every Animal and the card: the underlying app receives the click and the card closes. Reopen and close with Escape. **Known source mismatch:** the current open-card whole-overlay hit region/backdrop consumes the outside click. Record the actual native result separately; do not mark simultaneous pass-through and closure passed merely because closure works. This guide does not authorize a runtime fix. Work in another app: Ranch must not raise a window or take attention on its own. Verify primary-only defaults; with multiple displays, enable another and check movement stays in visible regions rather than gaps. Mark that portion unverified without appropriate hardware. Native click-through, attention, visual usefulness, and ghosting need observations beyond component tests. @@ -82,8 +97,8 @@ Observe a packaged Ranch process using platform process-scoped network inspectio ### V7 — Known limitations -Record FR-013 positional drift, FR-014 transport/event gaps, and FR-015 retained legacy entries as source/fixture observations. Do not require reproducing them in personal data or fail future work because an approved feature fixes them. Explicitly report ADR-0002/current-code drift; [research](research.md) links follow-ons. No fixes are included in this baseline pass. +Record FR-013 positional drift, FR-014 transport/event gaps, and FR-015 retained legacy entries as source/fixture observations. Do not require reproducing them in personal data or fail future work because an approved feature fixes them. Also record whether the no-seeding correction is implemented and passes V0; automatic creation remains a Constitution I / FR-019 failure until corrected, while past seed tests remain historical evidence only. Explicitly report ADR-0002/current-code drift; [research](research.md) links follow-ons. Only the bounded startup correction is planned; FR-013–FR-015 and open-card click-through fixes are excluded. ## Completion evidence -Record commit, platform, commands/exit statuses, native observations, unverified checks, and linked discrepancies in later task/issue evidence. Map all six SCs using the contract. Source inspection and past CI are not fresh success. Stop after baseline evidence is reconciled; runtime changes require separately approved scope, gates, review, and merge. +Record commit, platform, commands/exit statuses, native observations, unverified checks, and linked discrepancies in later task/issue evidence. Map all six SCs using the contract. Source inspection and past CI are not fresh success. Retain existing task history, append unchecked startup correction/proof tasks after T029, and map US1/AC4–AC5 plus V0 before execution; do not turn a checked earlier evidence assessment into new native proof. Stop after baseline evidence is reconciled; the startup correction requires its fresh gates, review, and merge, with native acceptance left open until proved. Other runtime changes require separately defined scope. diff --git a/specs/003-ranch-today/research.md b/specs/003-ranch-today/research.md index d7b63c2..7b75d6d 100644 --- a/specs/003-ranch-today/research.md +++ b/specs/003-ranch-today/research.md @@ -1,8 +1,8 @@ # Research: Ranch Today -**Date**: 2026-10-17 | **Status**: Draft planning evidence +**Date**: 2026-10-18 | **Status**: Draft planning evidence -Research target: the clarified [specification](spec.md), checked against local `main` at `a48525d9a89555bf9bc925a20d626c0dc634b4ce`. Source inspection and a read-only research agent informed this record; tests and native smoke checks were not executed during planning. +Research target: the clarified [specification](spec.md), revalidated against local `main` at `7900cc445ac224464e254b31d4914b0a52055270`. The five 2026-10-18 clarifications, including the later owner decision to resume saved work without seeding, update the prior 2026-10-17 planning record. Source inspection and read-only research-agent findings inform this record; no tests or native smoke checks were executed during this planning update. Existing [validation and release evidence](validation/pass-record.md) remains historical, with no refined acceptance criterion promoted to passed. ## Source inventory and authority @@ -10,7 +10,7 @@ Research target: the clarified [specification](spec.md), checked against local ` |---|---|---| | Governing rules | [Constitution](../../.specify/memory/constitution.md) | Local ownership, independent domains, typed boundaries, explicit integration lifecycle, and evidence requirements. | | Accepted decisions | [ADR-0001](../../docs/adr/0001-two-apps-over-one-renderer.md), [ADR-0002](../../docs/adr/0002-agent-hook-transport.md), [ADR-0003](../../docs/adr/0003-rust-owned-render-scene.md) | Separate domains and a Rust-owned flat render scene; accepted hook direction is distinguished from current implementation below. | -| Present user direction | [Clarifications](spec.md#clarifications), 2026-10-17 | FR-013–FR-015 describe observations that follow-on work may fix. The planning request authorizes these draft artifacts; it does not silently change the specification's lifecycle status. | +| Present user direction | [Clarifications](spec.md#clarifications), 2026-10-17 and 2026-10-18 | FR-013–FR-015 describe observations that follow-on work may fix. The owner has selected removal of automatic startup example creation: load persisted work/Settings, preserve data, and start empty when none exists. The owner accepted precise interaction, motion, latency, and duplication criteria. The planning request authorizes these draft artifacts; it does not silently change the specification's lifecycle status. | | Verified source observations | [Workspace](../../Cargo.toml), [frontend manifest](../../package.json), [architecture](../../docs/architecture.md), source and test files linked below | Existing stack, storage, boundaries, and available proof. Test definitions establish coverage intent, not fresh passing results. | | Settled vocabulary | [CONTEXT.md](../../CONTEXT.md) | Focus, Task, Timer, Animal, Agent Session, Limit, Complete, Delete, and Clear. | | Non-normative context | [002](../002-speckit-docs-pass/spec.md), [004](../004-task-timer-hand-edits/spec.md), [005](../005-late-hook-frame/spec.md), [006](../006-unheard-turn-ends/spec.md), [007](../007-one-hook-delivery/spec.md), [008](../008-claude-session-storage/spec.md) | Documentation history and separate draft features. None supplies additional requirements for 003. Removed PRD content and icebox proposals are not design authority. | @@ -19,8 +19,8 @@ Research target: the clarified [specification](spec.md), checked against local ` ### 1. Validate the existing product rather than rebuild it -- **Decision:** Plan a baseline evidence pass for the five existing user stories, with no runtime changes or new dependencies. -- **Rationale:** The spec describes shipped behavior. [Focus workflows](../../crates/commands/src/focus.rs), [Timers](../../crates/commands/src/timers.rs), [scene projection](../../crates/commands/src/render_scene.rs), and [host composition](../../src-tauri/src/app/mod.rs) already implement the corresponding paths. +- **Decision:** Keep the baseline evidence pass and add only the owner-selected startup correction in decision 8. Reuse existing code for state loading; no new dependencies. +- **Rationale:** The spec describes the baseline plus an explicit correction to startup seeding. [Focus workflows](../../crates/commands/src/focus.rs), [Timers](../../crates/commands/src/timers.rs), [scene projection](../../crates/commands/src/render_scene.rs), and [host composition](../../src-tauri/src/app/mod.rs) already implement the corresponding paths. - **Alternatives considered:** A second implementation or folding all follow-on specs into this plan would duplicate working behavior and expand scope beyond the owner's clarification. ### 2. Keep the current file model and generated contracts @@ -33,7 +33,7 @@ Research target: the clarified [specification](spec.md), checked against local ` - **Decision:** Validate Focus and Agent Session projections independently, then their composition into `RenderScene`. - **Rationale:** ADR-0003 refines ADR-0001 by assigning projection and layout to Rust. [Focus projection](../../crates/commands/src/focus_animals.rs), [Agent projection](../../crates/commands/src/agent_animals.rs), and [the scene contract test](../../crates/commands/tests/render_scene_contract.rs) make the seam observable. The movement and sprite layers consume renderer vocabulary. -- **Alternatives considered:** Adding domain flags or Timer/Hook logic to movement would violate the accepted boundary and is unnecessary for validation. +- **Alternatives considered:** Adding domain flags or Timer/Hook logic to movement would violate the accepted boundary and is unnecessary for this work. ### 4. Treat hook installation and delivery as separate evidence @@ -50,9 +50,23 @@ Research target: the clarified [specification](spec.md), checked against local ` ### 6. Use existing gates and distinguish manual gaps - **Decision:** Use [Taskfile](../../Taskfile.yaml) gates and existing tests, then record manual observations for native behavior. -- **Rationale:** Existing tests cover core rules, persistence, render serialization, settings concurrency, plugin validation, and socket delivery. They do not establish OS click-through, attention behavior, visual usefulness, tray color, display gaps, actual notifications, or full watcher-to-UI latency. The watcher's debounce is not proof of SC-003's approximately one-second outcome. +- **Rationale:** Existing tests cover core rules, persistence, render serialization, settings concurrency, plugin validation, and socket delivery. They do not establish OS click-through, attention behavior, visual usefulness, tray color, display gaps, actual notifications, or full watcher-to-UI latency. The [host watcher](../../src-tauri/src/app/mod.rs) debounces for 200 ms; [the reader](../../src/api/tauriFocusReader.ts) refetches on `focuses-changed`, and [the hook](../../src/hooks/usePolledReader.ts) updates the rendered state. None proves SC-003's save-completion-to-visible-row latency of at most 1.0 second in an already-open, visible card for a valid local Focus file. - **Alternatives considered:** New tests solely for these planning documents would mirror prose. A dev-server connection is also not evidence of a product network API: Vite is development infrastructure. SC-006 needs a packaged-app observation, separately scoped from an explicit local Claude CLI action. +### 7. Make duplication, motion, and interaction checks explicit + +- **Decision:** Reuse the existing implementation and document the clarified behavior in the data model, UI contract, and native guide. A duplicate gets fresh identity/creation time, copied description and ordered Task text/completion, the collision-safe “ copy” title, and no Focus or Task Timers. Focus Timer absence/Running means Walking, Expired means Resting; Task Timers do not control motion. Animals and an open Focus card receive interaction; empty space passes through, closes an open card, and Escape also closes it. +- **Rationale:** [Focus commands](../../crates/commands/src/focus.rs) create the duplicate through the normal creation path and append Tasks without copying Timer state; [storage](../../crates/storage/src/focus_store.rs) persists it. [Focus projection](../../crates/commands/src/focus_animals.rs), [App](../../src/components/App.tsx), and [hit testing](../../src/hooks/useAnimalMovement.ts) own motion projection, card interaction, and OS hit regions. Source inspection supports duplication and motion. It exposes an interaction mismatch: selected Focus state makes `syncRects` submit a whole-overlay hit rectangle, while the card renders an interactive backdrop. The [native hit-test loop](../../src-tauri/src/display/overlay.rs) honors that region, so outside clicks close the card but are consumed. This does not satisfy clarified FR-004/FR-005 / US1/AC2. A later runtime slice needs actual Animal/card bounds plus a way to observe an outside click without intercepting it; the current loop observes cursor position only. No replacement or new OS permission is selected by this documentation plan. Existing tests are not native acceptance evidence. +- **Alternatives considered:** Copying Timers, changing Task identity, routing Task expiry into motion, or making card controls click-through would contradict the clarified spec. Preserving the full-overlay backdrop would retain the discovered mismatch; dropping it without an outside-click observation path would lose required closure. The runtime fix must be separately scoped and designed. + +### 8. Resume saved work without seeding + +- **Decision:** Implement the owner's refined startup rule by deleting the sole `seed::ensure_example_focus` call and module declaration from [startup composition](../../src-tauri/src/app/mod.rs), then deleting `src-tauri/src/app/seed.rs` and its two obsolete seeding tests. Update [architecture](../../docs/architecture.md). Load existing work/Settings through the current paths; start empty without work. No replacement function, flag, schema migration, or onboarding UI. +- **Rationale:** The only production seed caller is startup. Its adapter creates a Welcome Focus, two Tasks, and `.example-focus-seeded`; even the existing-work branch writes the marker. Removing this path removes the unauthorized work writer. [Focus storage](../../crates/storage/src/focus_store.rs) reads canonical work/sidecars and ignores non-directory entries, so old marker files can remain untouched. [Settings loading](../../src-tauri/src/app/mod.rs) already precedes app setup. [The expiry worker](../../src-tauri/src/app/timer_expiry.rs) checks saved Timers using the current clock; [Timer transitions](../../crates/commands/src/timers.rs) retain their original start/duration on expiry. No new restart semantics are needed. This design conforms to Constitution I; the current runtime is not corrected by writing the plan. +- **Alternatives considered:** Keeping automatic examples would contradict the owner and Constitution I. Making seeding opt-in would add unrequested UI. A no-op seeding function or startup service would retain an unnecessary abstraction. Removing old example Focuses or markers would mutate existing user data without need. Changing Timer deadlines or restoring ephemeral Agent sessions would exceed the persisted-work scope. +- **Proof boundary:** Existing storage tests cover empty/missing roots, canonical files, Timer sidecars, and create/list round trips; command tests cover due/not-due expiry and timer-only changes. They do not execute the native host startup. Do not replace the removed seed tests with source-text assertions or no-op tests. Validate actual launch/restart and file outcomes with V0, then fresh current-source host/Windows gates; keep native proof open while the owner has deferred testing. Existing package results apply to the old runtime only. +- **Compatibility/rollback:** No persisted file format changes. Preserve old Welcome Focuses as normal user-owned work and leave `.example-focus-seeded` untouched. Rolling back the binary is data-compatible, but older versions may seed an empty unmarked root again; no new marker write is added to hide that old behavior. + ## Resolution -No unresolved technical choices remain for this documentation and validation scope. Runtime verification remains work to execute, not evidence already obtained. The current stack is retained at its repository-declared versions; no new library or external API research is needed. +No unresolved technical choices remain for the bounded startup correction: the owner selected the policy and the existing read/expiry paths support the deletion design. The source correction is implemented; native runtime compliance is not claimed. The outside-click mechanism remains intentionally unselected for a separate runtime slice, and ADR-0002 reconciliation remains outside this correction. Native testing remains deferred, not waived. The current stack is retained at its repository-declared versions; no new library or external API research is needed. diff --git a/specs/003-ranch-today/spec.md b/specs/003-ranch-today/spec.md index 74743f8..84b0b0d 100644 --- a/specs/003-ranch-today/spec.md +++ b/specs/003-ranch-today/spec.md @@ -6,7 +6,7 @@ **Status**: Draft -**Input**: This specification converts the product requirements document into the current description of what the ranch does today. It stays Draft until the owner approves it. +**Input**: This specification converts the product requirements document into the current description of what the ranch does today. It stays Draft until the owner approves it. The owner's 2026-10-18 startup decision below specifies a correction to current automatic example creation; it is intended behavior, not a claim that the correction is implemented. ## Clarifications @@ -14,15 +14,25 @@ - Q: Should known bugs and limitations in Ranch Today be observations that later features may fix, or required behavior that future changes must preserve? → A: Record known limitations as observations of the current product; follow-on specifications may fix them. +### Session 2026-10-18 + +The owner accepted the first recommendation and explicitly delegated the remaining recommendations, then refined the startup answer: Ranch should pick up from saved work without seeding anything. The startup answer below supersedes its earlier unresolved-policy classification. These decisions do not establish implementation or native acceptance, or approve a constitutional exception. + +- Q: How should the specification treat the example Focus that Ranch automatically creates on first launch? → A: Do not seed any Focuses or Tasks. On startup, load the existing persisted work and Settings; if no work exists, start empty. Preserve existing saved data, including any example Focus already present. Normal Timer rules still apply; startup must not reset or restart Timers. Current automatic creation is implementation drift to remove, not an approved exception. +- Q: Which parts of the overlay should receive clicks instead of passing them to the app underneath? → A: Animals and an open Focus card receive interaction; empty overlay space passes clicks through. An empty-space click outside the card also closes it; Escape closes it without requiring a click. +- Q: When should a Focus Animal walk rather than rest? → A: A Focus Animal walks when its Focus Timer is absent or Running, and rests when that Timer is Expired; Task Timer state does not control its motion. +- Q: What measurable delay should be allowed between saving a Focus file and its updated Task list appearing? → A: At most 1.0 second from successful save completion of a valid local Focus file until the changed Task row matches it in an already-open, visible Focus card. This is an acceptance target, not a measured result. +- Q: Which work and Timer state should a duplicated Focus retain? → A: Create an independent Focus with fresh identity and creation time; copy the description and ordered Task text/completion states, use the source title plus “ copy” with a numeric suffix from 2 when needed, copy no Focus or Task Timers, and leave the source unchanged. + ## Constitution Compliance Check This check applies to the scope and requirements of this Draft baseline; it does not certify that every current runtime path conforms. | Principle | Scope check | |---|---| -| I — User-owned local state | FR-001–FR-003 preserve canonical local files, explicit user edits, safe optional sidecars, and timer-only expiry writes; FR-012 excludes outbound product network, telemetry, and model calls. | +| I — User-owned local state | FR-001–FR-003 preserve canonical local files, explicit user edits, safe optional sidecars, and timer-only expiry writes; FR-012 excludes outbound product network, telemetry, and model calls. The owner-selected startup rule loads existing state without seeding work; current automatic first-launch example creation remains implementation drift until corrected, not an approved exception. | | II — Independent domains | FR-005, FR-007, and FR-010 keep Agent Sessions separate from Focus editing, Timers, and Limits; domains meet through the accepted flat Animal render contract. | -| III — Functional core, typed edges | The baseline retains the existing pure domain rules, I/O adapters, Tauri IPC, and generated Rust-to-TypeScript contracts without proposing implementation changes. | +| III — Functional core, typed edges | The baseline retains the existing pure domain rules, I/O adapters, Tauri IPC, and generated Rust-to-TypeScript boundaries; the startup correction proposes no new schema or structural boundary. | | IV — Explicit integrations | FR-010–FR-011 require opt-in visibility and explicit installation/repair; configuration health and observed delivery are separate evidence. | | V — Observable completion | The plan and tasks validate existing behavior through current automated gates and native observations; failed or unverified criteria cannot support a completion claim. | | VI — Evidence and authority | This spec remains Draft. Source observations and known limitations do not override the constitution or Accepted ADRs; Draft follow-ons are context, not additional requirements. | @@ -33,17 +43,19 @@ ADR-0002's accepted transport direction is not fully implemented today. FR-014 r ### User Story 1 - Glance and know what is open (Priority: P1) -A person looks at the screen and sees one Animal for each Focus, wandering slowly on the enabled displays. Pig is the only Species. The Animals do not interrupt other work. A glance is enough to know what is open. +A person looks at the screen and sees one Animal for each Focus on the enabled displays, walking when its Focus Timer is absent or Running and resting when it is Expired. Pig is the only Species. The Animals do not interrupt other work. A glance is enough to know what is open. **Why this priority**: The ranch is a peripheral reminder. If a glance does not show the open Focuses, the product is not doing its job. -**Independent Test**: Create two Focuses and look at the overlay. Two Pig Animals wander. Clicking empty overlay space reaches the app underneath. +**Independent Test**: Create two Focuses with no Timers and look at the overlay. Two Pig Animals walk. Clicking empty overlay space outside Animals and any open Focus card reaches the app underneath. **Acceptance Scenarios**: -1. **Given** two Focuses exist, **When** the person looks at the overlay, **Then** two Animals of Species Pig are wandering on the enabled displays. -2. **Given** the pointer is not over an Animal, **When** the person clicks, **Then** the click reaches whatever is underneath the overlay. -3. **Given** the Animals are wandering, **When** the person is working in another app, **Then** the ranch does not raise a window or demand attention on its own, except for a notification the person has allowed. +1. **Given** two Focuses exist with no Expired Focus Timers, **When** the person looks at the overlay, **Then** two Animals of Species Pig are walking on the enabled displays. A Focus with an Expired Focus Timer is represented by a resting Animal instead. +2. **Given** the pointer is over empty overlay space outside every Animal and any open Focus card, **When** the person clicks, **Then** the click reaches whatever is underneath the overlay; any open Focus card closes. +3. **Given** the Animals are walking or resting, **When** the person is working in another app, **Then** the ranch does not raise a window or demand attention on its own, except for a notification the person has allowed. +4. **Given** saved Focuses, Tasks, Timers, and Settings, **When** Ranch starts again, **Then** it loads that persisted state without creating example work, deleting or resetting saved work, or restarting Timers; normal Timer expiry rules still apply. +5. **Given** no saved Focuses and Agents as Animals off, **When** Ranch starts, **Then** no Focus Animal appears and no example Focus or Task is created. This also applies when an older seed marker is absent. --- @@ -62,6 +74,7 @@ The person clicks a Focus Animal and gets a card: the Focus title, its Tasks, an 3. **Given** a running Focus Timer, **When** time passes, **Then** that Animal grows from its base size toward a larger size, and when the Timer is Expired the Animal rests, looks ghostly, faces away, and appears in the tray's Expired section. 4. **Given** an Expired Focus Timer, **When** the person adds a Task, **Then** the Focus is revived and the Animal returns to normal. 5. **Given** a Task Timer Expires, **When** the person looks at the ranch, **Then** that Task shows Expired and a notification can fire, and the Animal's size, motion, and the tray's Expired section do not change because of that Task Timer. +6. **Given** a Focus with Tasks and Timers, **When** the person successfully duplicates it, **Then** the copy has its own identity and creation time, retains the source description and ordered Task text/completion states, uses the copy-title rule in FR-002, has no Focus or Task Timers, and leaves the source unchanged. --- @@ -83,7 +96,7 @@ The person uses the tray to create a Focus, delete one, Gather Animals back to t ### User Story 4 - Hand-edit the markdown (Priority: P2) -The person edits a Focus file in their own editor. The overlay catches up within about a second. Tasks are checkbox lines. An optional Timer sidecar sits beside the Focus file. +The person edits a Focus file in their own editor. The Focus card catches up within 1.0 second under the conditions in SC-003. Tasks are checkbox lines. An optional Timer sidecar sits beside the Focus file. **Why this priority**: Markdown is the canonical state. The app is a projection of those files. @@ -91,7 +104,7 @@ The person edits a Focus file in their own editor. The overlay catches up within **Acceptance Scenarios**: -1. **Given** a Focus file, **When** the person adds or Completes a checkbox line and saves, **Then** the Animal's Task list matches the file. +1. **Given** a valid local Focus file and its already-open, visible Focus card, **When** a checkbox Task is added or Completed and the file is successfully saved, **Then** the card's Task list matches the saved file within the 1.0-second limit defined in SC-003. **Current limitation:** Task Timers are stored by Task position, so a hand-edit that reorders or inserts Tasks can move a Timer onto another Task. This records current behavior; a follow-on specification may fix it. --- @@ -115,7 +128,7 @@ The person can turn on Agents as Animals. While enabled, each ongoing Claude Cod ### Edge Cases -- The first launch creates one example Focus so the ranch is not empty. A marker stops that example from returning after the person deletes every Focus. +- **Startup — owner-selected behavior:** Load existing persisted Focuses, Tasks, Timers, and Settings without creating example work. An empty data root starts without Focuses or Tasks, regardless of an old seed marker. Existing saved data, including previously created example Focuses, remains intact; normal Timer expiry applies without resetting or restarting Timers. The current app's automatic example creation/marker path is a known implementation gap against this decision, not a behavior to preserve or an approved exception to Constitution I / FR-019. - A missing or corrupt Timer sidecar is treated as no Timer. It does not block the Focus file. - Going Over Limit still saves the Focus or Task. The tray icon turns red. If the relevant notification is enabled, it fires once for that crossing; if disabled, no notification fires. - Only the primary display is enabled until the person enables more in Settings. Animals do not wander through gaps between displays. @@ -128,11 +141,11 @@ The person can turn on Agents as Animals. While enabled, each ongoing Claude Cod ### Functional Requirements -- **FR-001**: The ranch MUST keep each Focus as a directory of markdown under the Ranch data directory, with Tasks as checkbox lines in the Focus file. Optional sidecars MUST hold the Focus Timer and the Task Timers. The person MUST be able to create and change a Focus or Task from the app or by editing those files. Timer expiry MUST update only Timer state. -- **FR-002**: Completing a Task MUST keep it in the Focus, shown as done. Deleting a Task MUST remove it. Clear MUST apply to a Timer, not to a Task or a Focus. +- **FR-001**: The ranch MUST keep each Focus as a directory of markdown under the Ranch data directory, with Tasks as checkbox lines in the Focus file. Optional sidecars MUST hold the Focus Timer and the Task Timers. The person MUST be able to create and change a Focus or Task from the app or by editing those files. Timer expiry MUST update only Timer state. On startup, the ranch MUST load existing persisted work and Settings without seeding Focuses or Tasks. If no work exists, it MUST start empty. It MUST preserve existing saved work, including older example Focuses, and MUST NOT reset or restart Timers; normal Timer expiry rules still apply. +- **FR-002**: Completing a Task MUST keep it in the Focus, shown as done. Deleting a Task MUST remove it. Clear MUST apply to a Timer, not to a Task or a Focus. Successful duplication MUST create an independent Focus with a fresh identity and creation time, copy the description and ordered Task text/completion states, and leave the source unchanged. The title MUST be the source title followed by “ copy”, adding a numeric suffix starting at 2 when needed to avoid an identity collision. The duplicate MUST have no Focus Timer or Task Timers. - **FR-003**: A Timer MUST belong to exactly one Focus or one Task. The person MUST be able to start one from the built-in durations of 10, 30, or 60 minutes, or add a custom duration as a saved chip, and MUST be able to restart or Clear it. Saved chips MUST be shared across timer pickers and persisted in Settings; removing or clearing saved chips MUST leave the built-ins available and MUST NOT clear a running Timer. An Expired Focus Timer MUST be cleared when a Task is added. A Task Timer MUST NOT be revived. -- **FR-004**: The ranch MUST show one Animal per Focus on the enabled displays, using Species Pig. The person MUST be able to drag an Animal and toss it. Gather MUST bring Animals back to the primary display. The overlay MUST let clicks through everywhere except on an Animal. -- **FR-005**: Clicking a Focus Animal MUST open a card for that Focus and MUST NOT open a card for an Agent Session Animal. The card MUST close when the person clicks outside it or presses Escape. +- **FR-004**: The ranch MUST show one Animal per Focus on the enabled displays, using Species Pig. A Focus Animal MUST walk when its Focus Timer is absent or Running and rest when it is Expired. Task Timer state MUST NOT control its motion. The person MUST be able to drag an Animal and toss it. Gather MUST bring Animals back to the primary display. The overlay MUST let clicks through everywhere except on an Animal or within an open Focus card. +- **FR-005**: Clicking a Focus Animal MUST open a card for that Focus and MUST NOT open a card for an Agent Session Animal. The card MUST close when the person clicks outside it or presses Escape. Its controls MUST remain interactive; a click on empty overlay space outside the card MUST close it and reach the app underneath. - **FR-006**: The tray MUST offer New Focus, delete, Gather, Agents as Animals, Settings, and quit. Delete MUST ask first when confirmation is on. The tray icon MUST turn red while the ranch is Over Limit. - **FR-007**: A Limit MUST be a soft threshold. The defaults MUST be 5 Focuses and 7 Tasks in one Focus, and the person MUST be able to change them in Settings. Crossing a Limit MUST NOT block the write. Agent Sessions MUST NOT count toward a Limit. - **FR-008**: Settings MUST be a file the app edits from the Preferences window, labeled Preferences only as the macOS menu name. Changes made in the app MUST apply without a restart. @@ -154,7 +167,7 @@ FR-013 through FR-015 describe current limitations as observations. Follow-on sp ### Non-goals - **FR-018**: The ranch MUST NOT sync, host multiple users, or import work from Jira, GitHub, or Linear. -- **FR-019**: The ranch MUST NOT offer a network API, a slash command, or any writer of Focuses and Tasks other than the person and Timer expiry. +- **FR-019**: The ranch MUST NOT offer a network API, a slash command, or any writer of Focuses and Tasks other than the person and Timer expiry. Startup MUST NOT automatically create example Focuses or Tasks; Timer expiry remains limited to Timer state as specified in FR-001. - **FR-020**: The ranch MUST NOT complete Tasks on its own, merge Focuses on its own, or forward notifications into a Harness. - **FR-021**: The ranch MUST NOT enable every display on first launch, and MUST NOT offer Wrangle. Gather is the action that brings Animals back. - **FR-022**: The ranch MUST NOT ship a second Species, and MUST NOT read a Harness other than Claude Code. @@ -175,7 +188,7 @@ FR-013 through FR-015 describe current limitations as observations. Follow-on sp - **SC-001**: A person can name their open Focuses by looking at the overlay, without opening another tool. - **SC-002**: A person can add, Complete, and Delete a Task, and start or Clear a Timer, from the Focus Animal's card, and the Focus file matches. -- **SC-003**: A hand-edit of a Focus file shows on the overlay within about a second. +- **SC-003**: Adding or Completing a checkbox Task in a valid local Focus file MUST be reflected in its already-open, visible Focus card within 1.0 second, measured from successful save completion until the corresponding Task row visibly matches the saved file. This is an acceptance target, not a claim of measured performance. - **SC-004**: Going past a Limit still saves and turns the tray icon red. If the relevant notification is enabled, it fires once for that crossing; if disabled, no notification fires. Agent Sessions do not count toward Limits. - **SC-005**: With Agents as Animals off, no Agent Session Animal is shown. With it on, ongoing sessions observed through Hook Firings are visible and cannot be edited as Focuses. - **SC-006**: The running app makes no outbound product network call. @@ -184,8 +197,8 @@ FR-013 through FR-015 describe current limitations as observations. Follow-on sp Checked against `main` on 2026-10-15. -- FR-001: source `.specify/memory/constitution.md` (User-Owned Local State) and `docs/architecture.md` (Persistence) — checked against `main` on 2026-10-15. Focus directories, checkbox Tasks, and Timer sidecars are the stored state. -- FR-002: source `CONTEXT.md` (Complete, Delete, Clear) — checked against `main` on 2026-10-15. The card still completes a Task in place and deletes a Task by removing its line. +- FR-001: source `.specify/memory/constitution.md` (User-Owned Local State) and `docs/architecture.md` (Persistence) — checked against `main` on 2026-10-15. Focus directories, checkbox Tasks, and Timer sidecars are the stored state. Owner direction on 2026-10-18 adds the startup correction: reload saved state without seeding, resetting work, or restarting Timers; start empty when no work exists. This is an intended correction, not verified current behavior. +- FR-002: source `CONTEXT.md` (Complete, Delete, Clear) — checked against `main` on 2026-10-15. The card still completes a Task in place and deletes a Task by removing its line. The duplication clarification was revalidated against `crates/commands/src/focus.rs` and `crates/storage/src/focus_store.rs` on 2026-10-18: fresh identity/time, copied work and completion state, copy-title suffixes, and no copied Timers. - FR-003: source `docs/architecture.md` (Timers), `CONTEXT.md` (Timer, Revive), and PR #89 (`8fa695d`) — checked against `main` on 2026-10-15. Built-ins are 10, 30, and 60 minutes; custom chips persist in `timers.saved_minutes`, and timer edits preserve other windows' saves. `Timers` starts, clears, revives, and expires. Adding a Task revives an Expired Focus Timer. A Task Timer is not revived. - FR-004: source `docs/adr/0003-rust-owned-render-scene.md` and `docs/architecture.md` (Renderer read model, Core interaction loop) — checked against `main` on 2026-10-15. Rust owns the scene and the Pig profile. Gather and drag-and-toss still behave as the interaction loop describes. - FR-005: source `docs/adr/0001-two-apps-over-one-renderer.md` — checked against `main` on 2026-10-15. Selection resolves only to a Focus. An Agent Session Animal has no card. @@ -202,7 +215,7 @@ Checked against `main` on 2026-10-15. - FR-016: source `.specify/memory/constitution.md` (Product and Architecture Constraints) and `docs/architecture.md` (Windows) — checked against `main` on 2026-10-15. Windows still compiles. The hook transport is not available there. - FR-017: source `.specify/memory/constitution.md` (ambient and peripheral) — checked against `main` on 2026-10-15. Notifications are settings-gated. The overlay does not steal focus. - FR-018: source `PRD.md` (Out of scope) — checked against `main` on 2026-10-15. No sync and no external aggregators are present. `PRD.md` was removed after this check. -- FR-019: source `.specify/memory/constitution.md` and `docs/architecture.md` (Writers) — checked against `main` on 2026-10-15. The proposal queue and localhost HTTP API are gone. Writers are the person and Timer expiry. +- FR-019: source `.specify/memory/constitution.md` and `docs/architecture.md` (Writers) — checked against `main` on 2026-10-15. The proposal queue and localhost HTTP API are gone. The governing writer rule permits person-authored work and timer-state expiry. On 2026-10-18 the owner selected no startup seeding and resumption from existing persisted state; current automatic example creation remains implementation drift pending correction, with no exception approved. - FR-020: source `PRD.md` (Non-goals) — checked against `main` on 2026-10-15. No auto-complete and no notification forwarding are present. `PRD.md` was removed after this check. - FR-021: source `issues/icebox/021-all-monitors-default.md` and `issues/icebox/022-wrangle.md` — checked against `main` on 2026-10-15. Both remain deferred. Gather exists. All-displays default and Wrangle do not. - FR-022: source `CONTEXT.md` (Species, Harness) and `docs/adr/0001-two-apps-over-one-renderer.md` — checked against `main` on 2026-10-15. Pig is the only Species. Claude Code is the only Harness the ranch reads. diff --git a/specs/003-ranch-today/tasks.md b/specs/003-ranch-today/tasks.md index 40230c4..76ce8e4 100644 --- a/specs/003-ranch-today/tasks.md +++ b/specs/003-ranch-today/tasks.md @@ -2,19 +2,21 @@ **Input**: Design documents in `specs/003-ranch-today/`: [plan](plan.md), [spec](spec.md), [research](research.md), [data model](data-model.md), [contracts](contracts/current-behavior.md), [quickstart](quickstart.md). -**Status**: Draft execution plan, generated 2026-10-17. The specification remains Draft. Generating this list does not approve product changes or certify current behavior. +**Status**: Draft execution plan, generated 2026-10-17; reconciled 2026-10-18 against the clarified spec and revised plan. The specification remains Draft. Generating this list does not approve product changes or certify current behavior. -**Scope**: Validate and document existing behavior. No product implementation, dependency changes, new tests, migrations, generated-type edits, or fixes for FR-013–FR-015. Existing tests are reused as evidence. New runtime work needs its own approved scope. +**Scope**: Preserve the baseline validation work and add only the owner-selected startup correction in T030–T035: remove automatic seeding, load existing work/Settings, and start empty without work. No dependency, schema, generated-type, onboarding, click-through, Agent integration, or FR-013–FR-015 change is authorized. Reuse existing tests; delete only the obsolete seed-behavior tests with the removed adapter and replace their acceptance promise with V0 native proof. No new test harness or source-text assertions. -**Organization**: Setup → foundation → five independently verifiable user stories → cross-cutting reconciliation. Every task starts unchecked. Mark an execution task done when its stated work and honest result record are complete; a recorded failure or unverified check is not a passed acceptance criterion. +**Organization**: Setup → foundation → five independently verifiable user stories → cross-cutting reconciliation. New tasks start unchecked. Existing IDs, completed task descriptions, checkbox states, and release proof are retained; the startup correction appends T030–T035 without duplicating earlier tasks. Mark an execution task done when its stated work and honest result record are complete; a recorded failure or unverified check is not a passed acceptance criterion. **Execution record (2026-10-17)**: The current-main automated gate passed. Native acceptance remains unverified; T029 platform package builds passed in v0.1.5 as detailed in [the pass record](validation/pass-record.md). Checked tasks record completed evidence assessment, not passed product acceptance; all six success criteria still need end-to-end proof. +**Reconciliation scope (2026-10-18)**: T001–T022 and T029 retain their completed descriptions and states as historical evidence, not proof of the corrected runtime. T023–T028 remain open; T030–T035 are new unchecked tasks. Native/live work, including T034, remains deferred until the owner resumes it. The old seed expectation in T002 is superseded by the no-seeding rule and T034; T015's approximate timing wording is superseded by T025. A fresh runtime gate is mandatory after T031; old v0.1.5 gate/package proof applies only to its original source. + ## Format and Paths Tasks use `- [ ] Tnnn [P?] [USn?] description`. `[P]` marks independent source checks with distinct output files after the foundation completes. Other tasks run sequentially. -All file paths below are relative to the repository root. Execution creates one shared `specs/003-ranch-today/validation/pass-record.md` and one evidence note per story (`us1.md` through `us5.md` in the same directory). These outputs are not created by task generation. +All file paths below are relative to the repository root. Execution creates one shared `specs/003-ranch-today/validation/pass-record.md` and one evidence note per story (`us1.md` through `us5.md` in the same directory). These outputs already exist from the prior execution; task generation neither recreates them nor changes their results. Evidence notes record source pointers, commit/platform, exact commands and exit statuses, observed outcomes, pass/fail/unverified status, and discrepancies. Never substitute source inspection or past CI for a fresh test or native result. Do not include personal data, credentials, raw transcripts, or machine-specific scratch paths in committed evidence. @@ -22,14 +24,16 @@ Evidence notes record source pointers, commit/platform, exact commands and exit | Principles | Execution constraint | |---|---| -| I — Local state | Use synthetic isolated data; inspect atomic-write/sidecar coverage; no personal work/configuration writes or outbound product feature. | +| I — Local state | Use synthetic isolated data; inspect atomic-write/sidecar coverage; no personal work/configuration writes or outbound product feature. Automatic seed writes remain a current Constitution I / FR-019 violation; the owner-selected remedy is T031, with data preservation and native proof in T034. No exception is approved. | | II — Domain separation | Validate Focus/Task/Timer independently from Agent activity; only the flat render contract joins them. | -| III — Typed boundaries | Reuse existing source owners and tests; generated contracts remain generated. No new implementation is authorized. | +| III — Typed boundaries | Reuse existing source owners and tests; generated contracts remain generated. The only planned implementation is deletion of the seed adapter and its composition references in T031; no new boundary or generated-contract edit. | | IV — Explicit integrations | Toggle is not install. Distinguish validated configuration from observed delivery; live checks use isolated configuration and explicit installation. | | V — Observable completion | Bound tasks by evidence outputs; synchronize with current main before the gate; retain failures and unverified outcomes. Shipping completion still requires review, green CI, and merge. | | VI — Authority | Keep Draft status; accepted ADRs outrank observed shortcomings. Record ADR-0002 drift and route follow-ons without silently changing accepted decisions. | -**Result**: PASS for this documentation/validation task design; no exception is requested. Existing runtime drift is not declared compliant. These tasks may collect baseline evidence without promoting a Draft spec to governing implementation authority. +**Result**: PASS for the bounded startup correction design in [plan.md](plan.md#constitution-check): the owner has selected no seeding and resumption from saved state. T030–T035 make that remedy executable. Current runtime compliance is still failed/unverified until implementation and actual startup proof; the policy decision does not close C1. Open-card click-through still differs from FR-004/FR-005 and remains outside this correction. These tasks grant no exception and do not change the specification's Draft status. + +**Gap closure constraints**: T023/T024 must retain the source-confirmed open-card mismatch in their story notes and `specs/003-ranch-today/validation/pass-record.md`, with pointers to `src/hooks/useAnimalMovement.ts`, `src/components/AnimalDetail.tsx`, and `src-tauri/src/display/overlay.rs`. Passing outside-click closure alone cannot close pass-through. A separate runtime slice must first select and authorize an outside-click mechanism that preserves delivery to the underlying app. The seed policy is now resolved: T031 removes the writer in `src-tauri/src/app/mod.rs` and `src-tauri/src/app/seed.rs`; T034 owns V0 proof. T023 incorporates that proof for US1/AC4–AC5 without duplicating the fixture run. Existing seed tests or the historical FR-019 source-scope PASS do not establish corrected startup behavior. Do not edit the historical pass record merely to make it appear compliant; append dated observations when execution resumes. ADR-0002 drift remains separately routed by T019 and is not implemented here. ## Phase 1: Setup @@ -51,7 +55,7 @@ Evidence notes record source pointers, commit/platform, exact commands and exit **Goal**: Establish that Focus Animals are useful, ambient reminders on enabled displays. -**Independent test**: With two synthetic Focuses, identify both by their visible Pig labels, verify empty-space click-through, drag/toss/Gather, and observe no unsolicited attention. +**Independent test**: With two explicitly created synthetic Focuses, identify both by visible Pig labels; verify absent/Running Focus Timer → Walking, Expired → Resting independently of Task Timers, interactive Animals/card, empty-space pass-through with card closed and open, outside/Escape closure, drag/toss/Gather, and no unsolicited attention. T023 owns the ambient native evidence and incorporates T034's independent no-seeding/saved-state proof for US1/AC4–AC5; the source-confirmed open-card mismatch remains a gap until separately fixed and proved. - [X] T005 [P] [US1] Review `crates/commands/src/focus_animals.rs`, `crates/commands/src/render_scene.rs`, `crates/commands/tests/render_scene_contract.rs`, and `src/lib/animalMovement.test.ts`; write `specs/003-ranch-today/validation/us1.md` with source/coverage pointers for the model constraints “Species is Pig; Motion is Walking or Resting.”, “Size is fixed or linearly sampled over time.”, optional `regionId`, and “Movement and sprites consume neither domain types nor source discriminators.”; distinguish generated wire shape from native behavior. - [X] T006 [US1] Execute V3 in `specs/003-ranch-today/quickstart.md` using two fresh synthetic Focuses; record labels/one Pig per Focus, drag/toss, Gather, primary-only defaults, display enablement/no gap traversal, empty-space click-through, and ambient attention observations in `specs/003-ranch-today/validation/us1.md`. Record unavailable multi-display/native checks as unverified rather than inferred from tests (SC-001). @@ -62,7 +66,7 @@ Evidence notes record source pointers, commit/platform, exact commands and exit **Goal**: Verify card editing and Timer ownership without changing their implementation. -**Independent test**: Open one Focus card, add/edit/Complete/Delete Tasks, start/Clear Timers, compare files, and independently exercise Focus versus Task expiry. +**Independent test**: Open one Focus card, add/edit/Complete/Delete Tasks, start/Clear Timers, compare files, and independently exercise Focus versus Task expiry. Duplicate a source with mixed Task completion and Focus/Task Timers: verify fresh identity/creation time, copied description and ordered Task text/completion, collision-safe copy title, no copied Timers, and an unchanged source (US2/AC6, T024). - [X] T007 [P] [US2] Review `crates/domain/src/focus.rs`, `crates/domain/src/parse.rs`, `crates/commands/src/focus.rs`, `crates/commands/src/timers.rs`, and `src/components/AnimalDetail.test.tsx`; record source/coverage in `specs/003-ranch-today/validation/us2.md` for “App writes reject blank text.”, “parser requires frontmatter with `id` and `title`.”, optional `timer`, `status: Running / Expired`, and one-owner `Focus { focus_id }` / `Task { focus_id, index }` addressing. Treat positional identity as an observation, not a constraint to preserve. - [X] T008 [US2] Execute V1 card/CRUD actions from `specs/003-ranch-today/quickstart.md`; record title rename, duplicate and delete, Task add/edit/Complete/undo/Delete, blank-input rejection, matching Markdown, and outside-click/Escape closure in `specs/003-ranch-today/validation/us2.md`. Verify “Editing text preserves completion.” and distinguish Complete/Delete from Timer Clear (SC-002). @@ -87,7 +91,7 @@ Evidence notes record source pointers, commit/platform, exact commands and exit **Goal**: Verify canonical file ownership, external edit latency, and safe optional sidecars. -**Independent test**: Append/Complete a checkbox in a fixture file, measure save-to-card visibility, and verify work remains usable across restart and malformed optional sidecars. +**Independent test**: Add and separately Complete a checkbox in a valid local Focus file while its card is already open and visible. Measure successful save completion → corresponding Task row visibly matching the file; each observation must be ≤1.0 second. Record endpoints, common time base, precision/uncertainty, and actual times; insufficient precision leaves SC-003 unverified. Verify restart and malformed optional-sidecar behavior independently (T025). - [X] T014 [P] [US4] Review `crates/domain/src/parse.rs`, `crates/storage/src/focus_store.rs`, `crates/storage/src/watcher.rs`, and `src-tauri/src/app/paths.rs`; record coverage in `specs/003-ranch-today/validation/us4.md` for “Missing/corrupt optional sidecars load as no Timer.”, nonempty checkbox parsing, derived `focus_id:index` identity with “no stable persisted Task ID.”, and current data-root resolution. Record FR-013 as an observation; do not add stable IDs, reorder repair, or a migration. - [X] T015 [US4] Execute V2 and the V1 disposable-sidecar checks from `specs/003-ranch-today/quickstart.md`; record external checkbox add/Complete, measured latency against about one second, restart durability, Settings hand-edit applying on next launch, and missing/corrupt optional sidecar behavior in `specs/003-ranch-today/validation/us4.md` (SC-003). Preserve fixture Markdown and distinguish measured UI timing from watcher debounce. @@ -117,29 +121,32 @@ Evidence notes record source pointers, commit/platform, exact commands and exit ## Coverage Index -| Requirement / outcome | Tasks | -|---|---| -| FR-001, FR-002 | T007–T008, T010, T014–T015 | -| FR-003 | T007, T009–T010 | -| FR-004, FR-009 | T005–T006, T012 | -| FR-005 | T008, T016, T018 | -| FR-006, FR-008 | T011–T012, T015 | -| FR-007 | T011, T013, T016, T018 | -| FR-010, FR-011 | T016–T018 | -| FR-012, FR-017 | T006, T020 | -| FR-013 | T014, T019 (observation only) | -| FR-014, FR-015 | T016, T019 (observation only) | -| FR-016 | T020 (separate platform evidence; no fabricated build result) | -| FR-018, FR-019, FR-020 | T010, T018, T020 | -| FR-021, FR-022 | T005–T006, T011–T012, T016, T020 | -| SC-001 | T006 | -| SC-002 | T008–T010 | -| SC-003 | T015 | -| SC-004 | T013, T018 | -| SC-005 | T017–T018 | -| SC-006 | T020 | - -T021 reconciles all entries; T022 checks the final evidence and governance claims. +Historical assessment tasks remain linked; the current open acceptance tasks and completed package proof are included explicitly. + +| Requirement / outcome | Historical assessment | Current acceptance task / status | +|---|---|---| +| FR-001, FR-002 | T007–T008, T010, T014–T015 | T024/T025 existing work; T030–T035 startup correction/proof (FR-001). T024 includes duplication and US2/AC6. | +| FR-003 | T007, T009–T010 | T024 Timer behavior; T031/T033/T034 preserve loaded timestamps and normal expiry. | +| FR-004, FR-009 | T005–T006, T012 | T023; motion matrix and open/closed-card click-through (known mismatch). | +| FR-005 | T008, T016, T018 | T023/T024 outside/Escape and card interaction; T028 Agent non-editability. | +| FR-006, FR-008 | T011–T012, T015 | T026 tray/Settings; T025 Settings hand-edit/restart; T034 preserves saved Settings at startup. | +| FR-007 | T011, T013, T016, T018 | T026 Focus/Task crossing; T028 live-Agent exclusion. | +| FR-010, FR-011 | T016–T018 | T028 (open). | +| FR-012, FR-017 | T006, T020 | T027 process network proof; T023 ambient attention. | +| FR-013 | T014, T019 | T025 records positional drift only; no preservation or repair requirement. | +| FR-014, FR-015 | T016, T019 | T028 distinguishes known transport/legacy observations from live proof; no fixes authorized. | +| FR-016 | T020 | T029 complete for v0.1.5 only; T033 fresh host/Windows gates for corrected source, with no new package claim. | +| FR-018, FR-019, FR-020 | T010, T018, T020 | T024 timer-only writes; T028 Agent isolation; T027 network scope. T030–T035 implement/verify the no-seeding remedy for FR-019; native proof remains open despite historical source-scope PASS. | +| FR-021, FR-022 | T005–T006, T011–T012, T016, T020 | T023 displays/Gather/Pig; T026 tray; T028 Claude-only Agent observations. | +| SC-001 | T006 | T023 (open); T034 separately covers US1/AC4–AC5 without claiming full ambient acceptance. | +| SC-002 | T008–T010 | T024 (open). | +| SC-003 | T015 | T025 (open): ≤1.0 second with exact endpoints and valid-file/visible-card conditions. | +| SC-004 | T013, T018 | T026 and T028; both portions need evidence. | +| SC-005 | T017–T018 | T028 (open). | +| SC-006 | T020 | T027 (open). | +| US1/AC4–AC5 | No prior native proof | T031/T033 implement/check; T034 V0 proves startup; T035 reconciles delivery; T023 incorporates results. | + +T021/T022 are historical reconciliation/format checks, not evidence for the 2026-10-18 clarifications. When T023–T028 execute, update their story notes and the shared pass-record index with dated results and remaining gaps. T029's existing release proof remains intact for the old source. T030/T033/T035 own the new correction's setup, gates, and final issue/evidence reconciliation; T031/T032 implement/document it and T034 proves actual startup. No FR/SC or new task is unmapped. ## Dependencies and Execution Order @@ -155,6 +162,18 @@ T001 → T002 → T003 → T004 all story results → T019 → T020 → T021 → T022 ``` +The graph above describes the original T001–T022 assessment order; it does not instruct rerunning completed tasks. Current native execution, when resumed by the owner, is: + +```text +completed T001–T022 foundation/evidence + → T030–T033 startup implementation/gates → T034 V0 (when testing resumes) + → T023 US1 → T024 US2 → T026 US3 → T025 US4 → T028 US5 → T027 network scope + → reconcile affected story notes + validation/pass-record.md within those tasks +completed T029 package proof → retained, no rerun without a relevant change +``` + +The native order is a serial schedule for the shared OS surface, not a dependency between independent story fixtures. T026 and T028 jointly establish SC-004. The startup correction uses the separate T030–T035 dependency graph below and can proceed through automated work before native testing resumes. Other runtime fixes remain outside this plan; read-only diagnosis or an honestly recorded native failure may proceed when testing resumes. + - All stories depend on the foundation, not on another story's successful outcome. Create fresh story-specific synthetic state as needed; do not rely on a previous story's mutations. - After T004, T005/T007/T011/T014/T016 can run together: they read source and write different story notes. They reference T004's results without running concurrent generated-type/build gates. - Native tasks share the foreground app/OS surface and must run one at a time. Prefer priority order US1 → US2 → US3 → US4 → US5; independent story fixtures allow a different order. @@ -175,25 +194,27 @@ These are scheduling examples, not instructions to spawn agents during task gene ## Implementation Strategy -**MVP first**: Complete T001–T006 and stop to assess the ambient Focus reminder. This establishes only US1, not Timer, tray, hand-edit, or Agent acceptance. +**MVP first**: Deliver the independently reviewable startup correction through T030–T033, then obtain its actual V0 proof in T034 and reconcile in T035. Do not wait for unrelated native acceptance or implement the separate click-through fix in this slice. For full US1, reuse completed T001–T006 assessment/setup and complete T023 once native testing resumes. US1 acceptance still requires its clarified motion and click-through evidence; the known open-card mismatch cannot be called passed. This establishes only the ambient Focus reminder, not Timer, tray, hand-edit, or Agent acceptance. -**Incremental validation**: Add US2, then US3, US4, and US5; preserve separate story results and execute shared native work serially. Reuse T004's unchanged-code automated gate rather than adding new tests or rerunning whole suites per story. +**Incremental validation**: Continue with T024 (US2), T026 (US3), T025 (US4), T028 (US5), and T027 (process scope) after US1 assessment; preserve separate fixtures/results and execute shared native work serially. Failures may be recorded without blocking independent observations, but remain acceptance gaps. T031 changes runtime source, so T033 must obtain fresh automated results; v0.1.5 gates/packages remain historical. Add no new tests for task-list prose. -**Stop condition**: Finish T019–T022 with all evidence reconciled and remaining gaps explicit. A finished evidence pass may still have unverified product criteria. No runtime fix, new abstraction, approval-status change, PR, merge, or release is implied by checking off this documentation workflow. +**Stop condition**: T019–T022 are already assessed. Startup completion requires T031–T034 proof plus T035's delivery/evidence reconciliation. Full baseline completion separately requires actual T023–T028 evidence and corresponding updated FR/SC/acceptance-scenario rows, with unresolved failures left open; do not cycle another availability assessment as proof. A finished evidence pass may still have unverified product criteria. The startup correction has its own completion promise and fresh checks; completing it does not close full US1, the click-through gap, or the remaining baseline tasks. No approval-status change or full-baseline/release claim follows from task markers. ## Phase 9: Convergence **Assessment (2026-10-17, before release):** 28 FR/SC entries, 16 acceptance scenarios, six plan decisions, four validation slices, and Constitution I–VI checked. Seven partial acceptance-evidence gaps remain: five HIGH, two MEDIUM. Existing implementation and automated proof do not establish the native results below. No additional confirmed code defect or constitutional violation was established by this bounded assessment. +**Clarification reconciliation (2026-10-18):** The 16-scenario assessment above is historical; the current spec has 19 acceptance scenarios including US2/AC6 and US1/AC4–AC5. T023/T024/T025 below supersede their earlier unexecuted descriptions, with no checkbox or completed-task change. Automatic seed creation is a Constitution I violation with an owner-selected removal remedy in T030–T035, not a preservation criterion; the open-card click-through mismatch remains unresolved. + **Constitution compliance:** This phase preserves local synthetic state, independent domains, typed boundaries, and explicit integration actions (I–IV). It requires actual acceptance evidence before completion claims (V), preserves Draft status and source classifications (VI), and grants no exception. FR-013–FR-015 remain observations; their fixes and stale follow-on issue contracts stay outside this baseline. -**Owner execution direction (2026-10-17):** Ship the existing implementation and these baseline documents through independent review, green CI, merge, and release before the owner performs native testing. T023–T028 remain open for that later test pass; T029 still requires successful matching platform packages. This direction does not mark acceptance passed, promote Draft artifacts, or authorize implementing Draft follow-ons. See the [owner direction record](validation/pass-record.md#owner-direction--ship-before-later-native-testing-2026-10-17). +**Owner execution direction (2026-10-17):** Ship the existing implementation and these baseline documents through independent review, green CI, merge, and release before the owner performs native testing. T023–T028 remain open for that later test pass; T029 required matching platform packages at the time of that direction; it is now complete per the release checkpoint below. This direction does not mark acceptance passed, promote Draft artifacts, or authorize implementing Draft follow-ons. See the [owner direction record](validation/pass-record.md#owner-direction--ship-before-later-native-testing-2026-10-17). -**Completion rule:** These tasks close acceptance gaps left open by the availability assessment in T001–T022. Mark a task complete only after its stated proof is obtained and recorded. If native access, a disposable Claude setup, inspection tools, or a target platform is unavailable, record the limitation and leave the task unchecked. Do not replace observations with source inspection, historical CI, or another note that the check was unavailable. A failed observation remains an open acceptance gap and needs separately scoped resolution; this phase authorizes no product changes, new test infrastructure, or release publication. +**Completion rule:** These tasks close acceptance gaps left open by the availability assessment in T001–T022. Mark a task complete only after its stated proof is obtained and recorded. If native access, a disposable Claude setup, inspection tools, or a target platform is unavailable, record the limitation and leave the task unchecked. Do not replace observations with source inspection, historical CI, or another note that the check was unavailable. A failed observation remains an open acceptance gap and needs separately scoped resolution; Phase 9 remains validation-only and authorizes no product changes, new test infrastructure, or release publication. Only the separate Phase 11 startup task T031 changes runtime source. -- [ ] T023 [US1] **HIGH — F1:** Execute V3 in `specs/003-ranch-today/quickstart.md` with native app control and isolated synthetic data; observe first-launch example creation and non-reappearance after deletion/restart, then identify two Focuses by visible labels. Verify one Pig per Focus, drag/toss/Gather to primary, enabled-display boundaries/no gaps, empty-space OS click-through, and no unsolicited attention. Record platform, source revision, actions and actual outcomes in `specs/003-ranch-today/validation/us1.md` and the corresponding `validation/pass-record.md` rows; leave unobserved items open per SC-001, US1/AC1–AC3, FR-004, FR-009, FR-017, FR-021, and plan: ambient-shell validation (partial). -- [ ] T024 [US2] **HIGH — F2:** Complete native V1 from `specs/003-ranch-today/quickstart.md`: Focus rename/duplicate/delete, Task add/edit/Complete/undo/Delete and blank rejection, outside-click/Escape closure, and matching canonical files. Verify Focus/Task Timer start/restart/Clear, shared saved chips across pickers/restart, chip removal preserving running Timers, Focus growth/expiry appearance/tray membership, add-Task revival, and Task expiry independence. Compare synthetic work files across expiry to establish timer-only writes. Record actual observations and file outcomes in `specs/003-ranch-today/validation/us2.md` and its `validation/pass-record.md` rows per SC-002, US2/AC1–AC5, FR-001–FR-003, FR-005, and plan: files-and-Timers validation (partial). -- [ ] T025 [US4] **HIGH — F3:** Execute native V2 and the disposable-sidecar cases from `specs/003-ranch-today/quickstart.md`; externally add/Complete checkbox Tasks and measure save-to-visible-card elapsed times against the approximately one-second outcome. Verify native restart durability, hand-edited Settings applying on next launch, and usable Focuses with missing/corrupt optional sidecars. Record measurement method, actual times, revision/platform, and results in `specs/003-ranch-today/validation/us4.md` and its `validation/pass-record.md` rows; do not substitute debounce duration for end-to-end timing or repair positional Timer drift per SC-003, US4/AC1, FR-001, FR-008, and plan: hand-edit validation (partial). +- [ ] T023 [US1] **HIGH — F1:** When the owner resumes native testing, execute V3 in `specs/003-ranch-today/quickstart.md` with native app control and isolated synthetic data. Use T034's V0 results for no-seeding and saved-state resumption (US1/AC4–AC5), rather than rerunning its cases. If the corrected app creates any example work, record a failed FR-001 / FR-019 result; the policy is resolved. Empty-root behavior must not depend on the legacy seed marker. Explicitly create two Focuses and identify their Pig labels. Verify one Pig per Focus, “absent or Running Focus Timer → Walking; Expired → Resting.” and “Task Timer state does not control Animal motion”; independently vary Task Timer state. Check drag/toss/Gather, primary-only/default and enabled-display boundaries/no gaps, card controls receiving interaction, empty-space OS click-through with no card and with an open card, simultaneous outside-click closure/delivery to the underlying app, Escape closure, and no unsolicited attention. Retain the known whole-overlay hit-region/backdrop failure: closure alone does not pass FR-004/FR-005 / US1/AC2. Record revision/platform, actions, actual outcomes, startup proof status and unresolved click-through follow-on in `specs/003-ranch-today/validation/us1.md` and `specs/003-ranch-today/validation/pass-record.md`; append a dated clarification result without rewriting historical evidence. Leave missing/failed acceptance proof open per SC-001, US1/AC1–AC5, FR-001, FR-004, FR-005, FR-009, FR-017, FR-019, and FR-021. This task records native evidence only; T031 owns the startup correction and click-through remains outside scope. +- [ ] T024 [US2] **HIGH — F2:** When native testing resumes, execute V1 in `specs/003-ranch-today/quickstart.md`: Focus rename/delete, Task add/edit/Complete/undo/Delete, blank rejection, matching canonical files, interactive card controls, and outside-click/Escape closure. For duplication (US2/AC6), give the source a description, ordered Tasks with mixed completion states, and Focus/Task Timers; verify the independent copy has newly assigned identity/creation time, copied description and Task text/order/completion, and unchanged source files/state. Verify title ` copy`, then suffix starting at 2 when identity collisions occur by duplicating the original again; “Neither the Focus Timer nor any Task Timer is copied.” Keep new copy Timers absent. Verify Focus/Task Timer start/restart/Clear, saved chips across pickers/restart, chip removal preserving running Timers, Focus growth/expiry appearance/tray membership, add-Task revival, and Task expiry independence. Compare synthetic work files across expiry for timer-only writes. Record actual observations/file outcomes and all US2/AC1–AC6 results in `specs/003-ranch-today/validation/us2.md` and `specs/003-ranch-today/validation/pass-record.md` per SC-002, FR-001–FR-003, and FR-005. Cross-reference T023 for simultaneous outside-click pass-through; do not mark that known mismatch passed solely because the card closes. Missing/failed native proof keeps this task open; no fix is authorized. +- [ ] T025 [US4] **HIGH — F3:** When native testing resumes, execute V2 and disposable-sidecar cases in `specs/003-ranch-today/quickstart.md`. With a valid local Focus file and its already-open, visible Focus card, separately add and Complete a checkbox Task and successfully save. Measure each change from successful save completion until its corresponding Task row visibly matches the saved file; SC-003 requires at most 1.0 second. Record timing method, both endpoints on a common time base, precision/uncertainty, actual elapsed times, revision/platform, and outcomes in `specs/003-ranch-today/validation/us4.md` and `specs/003-ranch-today/validation/pass-record.md`. A slower result fails; insufficient precision or missing preconditions leave the criterion unverified. Verify restart durability, hand-edited Settings applying on next launch, and “Missing/corrupt optional sidecars load as no Timer.” Preserve synthetic Markdown and keep positional Timer drift observational; neither watcher debounce nor historical T015 proves the bound. Leave this task open without actual proof per SC-003, US4/AC1, FR-001, and FR-008; no repair is authorized. - [ ] T026 [US3] **HIGH — F4:** Execute native V4 in `specs/003-ranch-today/quickstart.md`: verify tray New Focus, Gather, delete cancellation/confirmation, Settings/Preferences naming, quit, immediate Settings application and restart persistence. Verify defaults 5/7, then cross lowered Focus/Task Limits while retaining writes, observe the red tray icon and one enabled notification per crossing without repeats, repeat with notifications disabled, and confirm completed Tasks count. Record evidence in `specs/003-ranch-today/validation/us3.md` and its `validation/pass-record.md` rows per SC-004, US3/AC1–AC3, FR-006–FR-008, and plan: ambient-shell validation (partial). T028 supplies the separate live-Agent exclusion proof; SC-004 cannot close until both portions are supported. - [ ] T027 **HIGH — F5:** Obtain a matching packaged Ranch build using existing `Taskfile.yaml` build commands if needed, then execute V6 from `specs/003-ranch-today/quickstart.md` with process-scoped network inspection while exercising the core synthetic scenarios. Record build identity, platform, inspection tool, process, observation window, exercised actions, and actual connection/listener results in `specs/003-ranch-today/validation/pass-record.md`; separate Vite traffic and explicit Claude CLI effects from product runtime. Source searches alone do not close this task per SC-006, FR-012, and plan: runtime-boundary validation (partial). - [ ] T028 [US5] **MEDIUM — F6:** Execute native/live V5 from `specs/003-ranch-today/quickstart.md` in an independently usable disposable Claude configuration with matching Ranch/Claude environment values and an explicit Install Hooks action. Verify default-off and opt-in visibility, no silent installation, a post-listener session Firing, Agent non-editability, unchanged Focus/Task files and Limits, and toggle-off hiding Agents while retaining Focus Animals/plugin. Open Agent Hooks and observe wiring/configuration health, live sessions, and recent Firings including an unchanged repeat; distinguish configuration health from real delivery. Record actual results in `specs/003-ranch-today/validation/us5.md` and its `validation/pass-record.md` rows without borrowing credentials or reading personal transcripts per SC-005, SC-004 (Agent exclusion), US5/AC1–AC4, FR-010–FR-011, and plan: Agent-boundary validation (partial). @@ -205,3 +226,41 @@ Path clarification for this phase: shortened `validation/pass-record.md` referen **Release checkpoint (2026-10-17):** T029 is complete: matching Windows smoke builds and the native v0.1.5 release matrix produced all required packages. All five downloaded release packages matched `SHA256SUMS.txt`; source/build identity and hashes are in [the release proof](validation/pass-record.md#release-package-proof-t029). T023–T028 remain unchecked for the owner’s later native/live test pass. No SC is promoted by package builds. + +## Phase 10: Startup Correction — Setup and Foundation + +**Purpose:** Scope the owner-selected correction as one shipping issue and prepare a synchronized checkout without disturbing unrelated work. Historical T001–T022/T029 results are retained, not rerun or reset as preparation. + +- [X] T030 Prepare the startup slice using `specs/003-ranch-today/plan.md#startup-correction-slice` and `issues/README.md`: create `issues/063-resume-saved-work.md` with owning spec FR-001/FR-019, US1/AC4–AC5, the completion promise, explicit source scope, acceptance criteria, Constitution I–VI check, and deferred native-proof status. Check the proposed filename is unoccupied before creating it; do not overwrite unrelated work. Record input revisions, source/base commit and isolation in a new dated startup section of `specs/003-ranch-today/validation/pass-record.md`. Arrange an isolated branch synchronized with current main, carrying only the selected current 003 artifacts and startup slice; preserve all unrelated dirty work in place. This task prepares the issue/checkout, not native acceptance or a lifecycle-status change. + +**Checkpoint:** Startup scope is reviewable and isolated. T031 and T032 may begin independently; no new app launch, personal-data copying, plugin installation, or migration is needed for setup. + +## Phase 11: US1 — Resume Saved Work Without Seeding (P1, Startup MVP) + +**Goal:** Ranch starts from saved work and Settings, creates no example Focus or Task, and starts empty when no work exists. This is independent of full US1 click-through/ambient acceptance. + +**Independent test:** Execute V0 in `specs/003-ranch-today/quickstart.md` against the corrected host. Check empty roots with/without a legacy marker, saved work including an old example, nondefault Settings, and future/Expired/due-while-closed Focus/Task Timers. Preserve work and Timer timestamps; permit only normal expiry status changes. + +- [X] T031 [P] [US1] After T030, remove `pub mod seed` and the sole `seed::ensure_example_focus` call from `src-tauri/src/app/mod.rs`; delete `src-tauri/src/app/seed.rs`, including the two tests requiring the superseded seed behavior. Keep store construction, directory setup, `load_settings`, IPC readers, projections, and `timer_expiry::spawn` unchanged. Preserve the data-model constraints “Existing example Focuses remain ordinary persisted Focuses; do not detect or delete them by title or identity.” and “Reloaded Timers retain `started_at`, `duration_secs`, and status.” Normal expiry may change status without resetting start/duration or changing Task text/completion. Leave `.example-focus-seeded` untouched and ignore its presence/absence; no replacement no-op function, startup service, flag, onboarding UI, schema migration, data rewrite, cleanup pass, or Agent-session restoration. Search all seed references before editing and confirm no remaining runtime caller afterward. This is the only runtime edit authorized by this list (FR-001/FR-019, US1/AC4–AC5). +- [X] T032 [P] [US1] After T030, update the startup description in `docs/architecture.md` to match the planned correction: load existing persisted work/Settings, start empty without work, never seed or reset work/Timers, preserve old examples/markers, and retain normal expiry. Reference the existing persistence/Timer owners rather than inventing a new startup abstraction. Keep current runtime observations distinct from the intended change until T031 is integrated; do not imply restoration of Animal positions, open cards, or ephemeral Agent Sessions. This file is independent of T031's source files; do not edit the shared evidence record in parallel. +- [X] T033 [US1] After T031/T032 and synchronization with latest main, run fresh `rtk task check` and `rtk task check:windows` using `Taskfile.yaml` on the corrected source. Inspect existing storage empty/missing-root, saved Focus/Task, Timer-sidecar, and Timer due/not-due/expiry results in `crates/storage/src/focus_store.rs` and `crates/commands/src/timers.rs`; preserve their actual assertions and all generated-artifact gates. Record exact commands, revision/platform, exit statuses, remaining source scope, and the deliberate retirement of the two obsolete seed tests in `specs/003-ranch-today/validation/pass-record.md`. Do not replace them with a source-text absence test or a no-op wrapper, lower a gate, or reuse old runtime/package results. A failed or unavailable required gate leaves T033 open; passing units/compilation do not prove native startup or a new package build. +- [ ] T034 [US1] After T033, when the owner resumes native testing, execute all four V0 cases from `specs/003-ranch-today/quickstart.md` on the corrected revision with isolated synthetic data and Agents as Animals off. Empty roots must stay free of Focuses/Tasks across launch/restart, with marker absent or present; no new/modified marker is allowed. Saved work/Settings, including an old Welcome Focus, must retain identities, text, completion and bytes; do not delete old examples. For future/Expired/due-while-closed Focus/Task Timers, verify “Reloaded Timers retain `started_at`, `duration_secs`, and status.” except the documented normal Running → Expired transition; start/duration and canonical work must not reset. Record case-by-case actual UI/file evidence, revision/platform, actions and pass/fail/unverified in `specs/003-ranch-today/validation/us1.md` and `specs/003-ranch-today/validation/pass-record.md`; link relevant Timer evidence to `specs/003-ranch-today/validation/us2.md`. T023 incorporates these results for US1/AC4–AC5 without repeating V0. Leave T034 unchecked while testing is deferred or any required case lacks passing proof. This task does not require or establish the separate click-through fix. + +**Checkpoint:** T031/T032 implement/document the deletion; T033 proves current-source automated/platform gates; only actual T034 evidence proves startup acceptance. No full-baseline criterion is promoted by this slice. + +## Phase 12: Startup Correction — Final Reconciliation + +- [ ] T035 After T033/T034, reconcile the startup evidence in `specs/003-ranch-today/validation/pass-record.md`, `specs/003-ranch-today/validation/us1.md`, and `issues/063-resume-saved-work.md` with FR-001/FR-019 and US1/AC4–AC5. Verify links, input/source revisions, unchanged data formats, preservation of unrelated work, and `rtk git diff --check`; distinguish fresh results from the retained v0.1.5 record. Record the startup issue/PR, independent review, current-head green CI, and merged commit when obtained; close the shipping issue only after its complete acceptance and delivery proof exists. Keep T023–T028, click-through, and other FR/SC results at their actual status; startup proof does not close full US1 or all of 003. T035 remains open without required native/delivery evidence, even if implementation and automated checks are complete. No release or package-build claim follows from old T029 results. + +### Startup dependencies and parallel work + +```text +T030 → T031 source deletion ─┐ + → T032 architecture ────┴→ T033 fresh gates → T034 V0 (when testing resumes) → T035 final proof +completed original foundation ──────────────────────────┘ +T034 results → T023's US1/AC4–AC5 mapping (no duplicate V0 run) +``` + +T031 and T032 may run in parallel after T030 because they change different files. T033 runs once after both are integrated; native tasks share the OS surface and run serially. T030, T033, T034, and T035 write the shared pass record at distinct dependency stages and must not run concurrently. The completed source-review lanes in the earlier per-story examples remain historical; no other open task is marked parallel. + +**Execution order for the new work:** T030–T033 can proceed before the owner resumes native testing. Leave T034/T035 pending until their actual proof is available; do not rerun an availability assessment or mark deferred work complete. Native checks for the other stories remain independently scheduled as above. Startup-only implementation and automated success may be reported separately from complete product acceptance. diff --git a/specs/003-ranch-today/validation/pass-record.md b/specs/003-ranch-today/validation/pass-record.md index 4220e7b..993c979 100644 --- a/specs/003-ranch-today/validation/pass-record.md +++ b/specs/003-ranch-today/validation/pass-record.md @@ -230,3 +230,40 @@ Downloaded all five packages and `SHA256SUMS.txt` with `gh release download v0.1 Delivery: [PR #92](https://github.com/killallgit/adhd-ranch/pull/92) merged after independent review, correction of CodeRabbit's Linux-proof finding, and [current-head CI](https://github.com/killallgit/adhd-ranch/actions/runs/39073736207). Fresh local `rtk task check` passed (exit 0, 136.05 seconds), and [merged-main CI](https://github.com/killallgit/adhd-ranch/actions/runs/39073944179) passed before release dispatch. This proof update changes documentation only and reuses those unchanged-runtime results. T023–T028 remain open for the owner's deferred native/live testing. All six SCs remain unverified end to end; package builds do not establish UI behavior, notifications, live Claude delivery, or runtime network behavior. The specification remains Draft and FR-013–FR-015 remain known observations. No product acceptance or ADR-conformance waiver is claimed. + + +## Startup correction execution — 2026-10-18 (T030–T035) + +**Scope:** owner-selected no startup seeding, resumption from saved work/Settings, and empty start without work. Native testing remains explicitly deferred. The owner approved proceeding past the reviewer-owned `checklists/baseline.md` gate (0/30 checked); its markers remain unchanged. This does not waive native acceptance or mark requirements review complete. + +**T030 — PASS, preparation:** fetched origin successfully; local main and origin/main both identified `7900cc445ac224464e254b31d4914b0a52055270`. Created isolated branch `fix/resume-saved-work` from origin/main and carried only current 003 artifacts; unrelated main-checkout edits remain in place. Created `issues/063-resume-saved-work.md` with the narrow completion promise, scope and acceptance criteria. No app launch, personal fixture/configuration copy, plugin installation, migration, or lifecycle-status promotion occurred. + +Input SHA-256 values below identify the clarified pre-implementation artifact versions; later task markers/results are execution updates. + +| Artifact | SHA-256 | +|---|---| +| `specs/003-ranch-today/spec.md` | `3394925e405a83374a6938256349b4de1f8b39a31204f80a9c1c600d5a527fd8` | +| `specs/003-ranch-today/plan.md` | `d29f546e9af6f39fa286c815e29b061a70ba86a8ca08eb92c73dcd542b1a6960` | +| `specs/003-ranch-today/tasks.md` | `b409aec098728e93abe7782a1f1d7913e51d012f7614d8529a1471c392f64723` | +| `specs/003-ranch-today/research.md` | `ee2fa20e592ca3b893dad8080f3dc3bf30cbe8b22b89ee5e0f1bd648e2290939` | +| `specs/003-ranch-today/data-model.md` | `e87e80bd60e1ab63b7efcb7574fa9ac25ae7f583436099e2feadd019bfc0114e` | +| `specs/003-ranch-today/contracts/current-behavior.md` | `95ebf6cd09494ef11fde3fc7d4a2fc908f61896fa0700d73d0928e39d8aebfef` | +| `specs/003-ranch-today/quickstart.md` | `c22ce702fad5bfd71ca7c70e0e6d35a46a0f1a4cd5d947302e49fffcde625a3d` | + +**Setup verification:** existing `.gitignore` covers Rust/Node output, generated sidecars, logs, environment files, editor/OS files and temporary files. No Docker, ESLint, Prettier, Terraform or Helm setup applies. The npm package is private, so no publishing ignore is needed. No ignore/configuration changes are required; worktrees use the local Git exclude. Existing files, schemas, manifests and generated contracts are unchanged by preparation. + +**Constitution:** the startup deletion is the selected remedy for I, not an exception or a claim of current runtime compliance. II–IV retain existing boundaries. V requires fresh corrected-source gates and actual V0 proof; old v0.1.5 results do not establish the new runtime. VI retains Draft status and historical evidence. T034/T035 remain open while required native/delivery evidence is absent. + +**T031 — PASS, implementation:** removed the sole startup seed call and module declaration, then deleted `src-tauri/src/app/seed.rs`. Its two tests asserted automatic creation and its marker-based persistence, behavior now explicitly superseded by the owner. No replacement function, writer, flag, migration, cleanup, or test suppression was added. Existing storage, Settings, Timer start/expiry, IPC, renderer and Agent code are unchanged. No saved work or marker file was inspected or modified. + +**T032 — PASS, architecture:** replaced the obsolete first-launch seed statement in `docs/architecture.md` with saved-state loading, empty startup, preservation of existing examples/markers, and Timer continuity with normal expiry. This documents the implemented deletion, not native acceptance. + +**T033 — PASS, fresh corrected-source gates:** `rtk task check`, exit 0, 114.68 seconds; `rtk task check:windows`, exit 0, 38.03 seconds, on macOS arm64 and the synchronized startup branch based on `7900cc445ac224464e254b31d4914b0a52055270`. A second fetch confirmed origin/main unchanged after the gates, so no rebase or redundant rerun was needed. Normal Rust suites passed 333 tests (the prior 335 minus the two deliberately retired seed-behavior tests); Vitest passed 170 tests across 26 files. Generated-export/drift checks passed separately. Host debug/release linting, frontend build/lint/typecheck, unused-code checks, IPC/CSS checks, and Windows x64 cross-target compilation passed. No gate was weakened, suppressed, or narrowed. + +Windows emitted the existing unused `script` warning at `src-tauri/src/app/claude_plugin/contract.rs:84` and the cross-check's intentional placeholder-sidecar notice. `git diff --exit-code origin/main -- src-tauri/src/app/claude_plugin/contract.rs` confirmed the warning's owner is unchanged by this correction. Windows cross-compilation is not installer/package or native Windows proof. + +Runtime source identity for these results: base commit above plus deletion of `src-tauri/src/app/seed.rs` and exactly two removed lines in `src-tauri/src/app/mod.rs`. No other runtime source changed. The resulting `mod.rs` SHA-256 is `534b045b7b8641750170d3e0db820b8f610a617702b1f62d9c26e6c31e82618a`. Manifests, lockfiles, and generated contracts matched origin/main after both gates. The existing storage/Timer tests retain their assertions; their passing results are component evidence, not execution of actual native startup. + +**Independent review — PASS:** a fresh reviewer inspected the corrected source, caller search, preserved readers/expiry, issue contract, and evidence scope. No actionable correctness/security/architecture findings. Review did not run builds or claim native proof. Subsequent edits update evidence, status wording and the historical link for the deleted seed file only; runtime code is unchanged. + +**Completion boundary:** T030–T033 are complete. T023–T028, T034 V0 native launch/restart, and T035 final native/delivery reconciliation remain unchecked. No app launch, screen capture, user-data/legacy-marker access, plugin installation, PR, merge, new package build or release occurred in this implementation pass. No native FR/SC or full issue completion is promoted; issue 063 stays open. The reviewer-owned custom checklist remains 0/30 checked under the owner's explicit proceed override. diff --git a/specs/003-ranch-today/validation/us4.md b/specs/003-ranch-today/validation/us4.md index e264273..e88c005 100644 --- a/specs/003-ranch-today/validation/us4.md +++ b/specs/003-ranch-today/validation/us4.md @@ -11,6 +11,6 @@ Fresh automated gate and runtime commit: [pass record](pass-record.md#automated- [Watcher](../../../crates/storage/src/watcher.rs) recursively observes Focus files; [host composition](../../../src-tauri/src/app/mod.rs) uses a 200 ms debounce and emits invalidations. That value is not SC-003's full editor-save-to-UI latency. Settings are loaded through the startup/settings paths, separate from the Focus-directory watcher. [Paths](../../../src-tauri/src/app/paths.rs) uses the explicit Ranch override, otherwise Unix home or Windows data-directory fallback. -Fresh existing proof includes `fires_callback_when_a_file_changes_under_root`, `reading_a_timer_without_a_sidecar_is_none`, `reading_a_corrupt_timer_sidecar_is_none`, positional/deletion Task Timer tests, and Markdown parsing/editing/storage tests. [Seed tests](../../../src-tauri/src/app/seed.rs) `creates_example_focus_once_when_store_is_empty` and `does_not_recreate_example_after_user_clears_all_focuses` passed under T004; they are automated proof, not a first-launch native observation. +Fresh existing proof includes `fires_callback_when_a_file_changes_under_root`, `reading_a_timer_without_a_sidecar_is_none`, `reading_a_corrupt_timer_sidecar_is_none`, positional/deletion Task Timer tests, and Markdown parsing/editing/storage tests. [Historical seed tests](https://github.com/killallgit/adhd-ranch/blob/a48525d9a89555bf9bc925a20d626c0dc634b4ce/src-tauri/src/app/seed.rs) `creates_example_focus_once_when_store_is_empty` and `does_not_recreate_example_after_user_clears_all_focuses` passed under T004; they are automated proof, not a first-launch native observation. V2 not performed: external checkbox add/Complete reflected in an actual card, approximately one-second measured visibility, work/Timer/Settings durability across native restart, Settings hand-edit applying on next launch. V1 optional-sidecar failures are verified in temporary test fixtures, but not in a running native app. SC-003 therefore remains UNVERIFIED. No schema, stable Task identity, reorder repair, or migration was added. diff --git a/src-tauri/src/app/mod.rs b/src-tauri/src/app/mod.rs index cb28e50..5ade4b3 100644 --- a/src-tauri/src/app/mod.rs +++ b/src-tauri/src/app/mod.rs @@ -4,7 +4,6 @@ mod claude_hook; mod claude_plugin; pub mod menu; pub mod paths; -pub mod seed; pub mod settings_workflow; pub mod timer_expiry; pub mod tray; @@ -130,7 +129,6 @@ pub fn run() { Arc::new(|| uuid::Uuid::now_v7().to_string()), Arc::clone(&settings_provider), )); - seed::ensure_example_focus(&commands, &focuses_root)?; let cap_monitor = Arc::new(OverCapMonitor::new()); let notifier = Arc::new(TauriCapNotifier::new(app.handle().clone())); diff --git a/src-tauri/src/app/seed.rs b/src-tauri/src/app/seed.rs deleted file mode 100644 index cc83160..0000000 --- a/src-tauri/src/app/seed.rs +++ /dev/null @@ -1,104 +0,0 @@ -use std::path::Path; - -use adhd_ranch_commands::{Commands, CreateFocusInput}; - -const EXAMPLE_MARKER: &str = ".example-focus-seeded"; -const EXAMPLE_TITLE: &str = "Welcome to ADHD Ranch"; - -pub fn ensure_example_focus( - commands: &Commands, - focuses_root: &Path, -) -> Result<(), Box> { - let marker = focuses_root.join(EXAMPLE_MARKER); - let focuses = commands.list_focuses()?; - if !focuses.is_empty() { - mark_seeded(&marker)?; - return Ok(()); - } - if marker.exists() { - return Ok(()); - } - - let created = commands.create_focus(CreateFocusInput { - title: EXAMPLE_TITLE.to_string(), - description: "Example focus created on first launch so the ranch has one animal to show." - .to_string(), - timer_preset: None, - })?; - commands.append_task(&created.id, "Click the animal to open this task card")?; - commands.append_task( - &created.id, - "Use + New Focus from the tray to add your own work", - )?; - mark_seeded(&marker)?; - Ok(()) -} - -fn mark_seeded(marker: &Path) -> std::io::Result<()> { - std::fs::write(marker, b"1\n") -} - -#[cfg(test)] -mod tests { - use super::*; - use adhd_ranch_commands::{Commands, NotificationRequest, NotificationSink, Timers}; - use adhd_ranch_domain::Settings; - use adhd_ranch_storage::MarkdownFocusStore; - use std::sync::Arc; - use tempfile::TempDir; - - struct SilentSink; - - impl NotificationSink for SilentSink { - fn notify(&self, _request: NotificationRequest) {} - } - - fn commands(root: &Path) -> Commands { - let focuses_root = root.join("focuses"); - std::fs::create_dir_all(&focuses_root).unwrap(); - let store = Arc::new(MarkdownFocusStore::new(focuses_root)); - let timers = Arc::new(Timers::new( - store.clone(), - Arc::new(|| 1_779_235_200), - Arc::new(Settings::default), - Arc::new(SilentSink), - )); - Commands::new( - store, - timers, - Arc::new(|| "2026-05-20T00:00:00Z".to_string()), - Arc::new(|| "example-id".to_string()), - Arc::new(Settings::default), - ) - } - - #[test] - fn creates_example_focus_once_when_store_is_empty() { - let dir = TempDir::new().unwrap(); - let commands = commands(dir.path()); - let focuses_root = dir.path().join("focuses"); - - ensure_example_focus(&commands, &focuses_root).unwrap(); - ensure_example_focus(&commands, &focuses_root).unwrap(); - - let focuses = commands.list_focuses().unwrap(); - assert_eq!(focuses.len(), 1); - assert_eq!(focuses[0].title, EXAMPLE_TITLE); - assert_eq!(focuses[0].tasks.len(), 2); - assert!(focuses_root.join(EXAMPLE_MARKER).is_file()); - } - - #[test] - fn does_not_recreate_example_after_user_clears_all_focuses() { - let dir = TempDir::new().unwrap(); - let commands = commands(dir.path()); - let focuses_root = dir.path().join("focuses"); - - ensure_example_focus(&commands, &focuses_root).unwrap(); - let focus_id = commands.list_focuses().unwrap()[0].id.0.clone(); - commands.delete_focus(&focus_id).unwrap(); - ensure_example_focus(&commands, &focuses_root).unwrap(); - - assert!(commands.list_focuses().unwrap().is_empty()); - } -}