Skip to content

feat: add durable on-device goals - #36

Merged
BunsDev merged 5 commits into
mainfrom
feat/on-device-goals
Aug 1, 2026
Merged

feat: add durable on-device goals#36
BunsDev merged 5 commits into
mainfrom
feat/on-device-goals

Conversation

@BunsDev

@BunsDev BunsDev commented Aug 1, 2026

Copy link
Copy Markdown
Member

Implements on-device /goal execution with durable FFI-backed lifecycle, checked SQLite goal storage, autonomous continuation, slash-command UI, and a Live Activity widget.

Validation:

  • cargo test -p coven-pocket-ffi goals::tests
  • cargo clippy -p coven-pocket-ffi --all-targets -- -D warnings
  • cargo fmt --all --check
  • swiftlint lint --strict
  • xcodebuild test ... GoalCommandParserTests
  • ./scripts/build-xcframework.sh
  • simulator build, install, and launch on iPhone 16 Pro (iOS 26.5)

Simulator interaction remains behind the app's existing local unlock screen; the binary launches successfully.

BunsDev and others added 3 commits July 31, 2026 09:53
Define the upstream path-scoped goal boundary, bounded iOS lifecycle, privacy-safe ActivityKit surface, and release acceptance criteria. Record the completed Familiar bead and claim issue #13 for implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 1, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a durable on-device /goal workflow to Coven Pocket by extending the Rust FFI with goal storage + lifecycle operations, integrating an autonomous goal runner into the existing query loop, and wiring a Swift slash-command/UI layer plus a WidgetKit Live Activity presentation.

Changes:

  • Introduces a checked, path-scoped goal SQLite store (goals.sqlite) and integrates goal cleanup with session lifecycle in the Rust persistence layer.
  • Adds Rust FFI goal APIs (start/pause/resume/clear/status/reconcile) and a goal-capable query-loop runner that supports durable message journaling and a goal-only GoalComplete tool.
  • Adds Swift /goal command parsing, in-app goal card controls, and a WidgetKit Live Activity target wired via ActivityKit.

Reviewed changes

Copilot reviewed 17 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
rust/ffi/src/sessions.rs Adds GoalStorage wrapper over checked storage; validates goal DB sidecars; clears goals during session cleanup.
rust/ffi/src/lib.rs Exposes goal types/FFI surface and adds PocketEngine.reconcile_goals.
rust/ffi/src/goals.rs New Rust goal lifecycle module (FFI-facing types + blocking-backed operations + continuation).
rust/ffi/src/chat.rs Integrates goal runner into ChatSession, adds goal-only tool registry, durable message journaling, and cumulative cost tracking.
rust/Cargo.toml Bumps pinned coven-code engine rev to include upstream goal/path APIs.
rust/Cargo.lock Updates lockfile sources to match the new engine pin.
project.yml Adds widget extension target + Live Activity entitlements/versions.
docs/superpowers/specs/2026-07-31-on-device-goals-design.md Adds approved design spec for on-device goals and Live Activity behavior.
app/Tests/GoalCommandParserTests.swift Adds unit tests for /goal parsing and local error handling.
app/Sources/Views/ChatView.swift Adds a goal status card and routes /goal commands to model operations.
app/Sources/Support/Goals/GoalCommandParser.swift Implements local /goal command parsing per documented syntax.
app/Sources/Support/Goals/GoalActivityCoordinator.swift Adds an ActivityKit coordinator for goal progress presentation.
app/Sources/Support/Goals/GoalActivityAttributes.swift Defines ActivityKit attributes/content state for goal Live Activity.
app/Sources/Support/ChatModel.swift Adds goal state to the model, bridges FFI callbacks to @MainActor, and coordinates ActivityKit updates.
app/Sources/Generated/coven_pocket_ffi.swift Regenerates UniFFI bindings to include goal APIs and records/types.
app/GoalWidgets/Info.plist Adds widget extension Info.plist for WidgetKit target.
app/GoalWidgets/GoalLiveActivityWidget.swift Implements the goal Live Activity/Dynamic Island widget UI.
.beads/issues.jsonl Updates beads issues to track goal work items.
.beads/interactions.jsonl Records beads interaction updates related to milestones/status changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/Sources/Support/Goals/GoalActivityAttributes.swift
Comment thread app/GoalWidgets/GoalLiveActivityWidget.swift
Comment thread app/Sources/Views/ChatView.swift
@BunsDev
BunsDev merged commit 0fececc into main Aug 1, 2026
2 checks passed
BunsDev added a commit that referenced this pull request Aug 1, 2026
Record the on-device /goal milestone as complete across the parent and child beads, including merge/CI notes for PRs #36-#38 and GitHub issue #13 closure. Also adds the follow-up task to consolidate local worktrees and refreshes the remote MCP bead with current worktree and baseline notes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants