Pinned references (Phenotype-org)
- MSRV: see rust-toolchain.toml
- cargo-deny config: see deny.toml
- cargo-audit: rustsec/audit-check@v2 weekly
- Branch protection: 1 reviewer required, no force-push
- Authority: phenotype-org-governance/SUPERSEDED.md
Status: v0.0.5 — Phase 1 in progress (~85%).
Connector-first screen-time management platform. Native iOS enforcement built on a portable Rust core: rules engine, connector runtime, reward/penalty ledger, audit chain, mascot state machine.
What's shipped:
- ✅ Domain layer end-to-end: event sourcing, rules engine, wallet/penalty ledgers, audit chain (hash-chained, tamper-evident), task scheduling, rituals (Morning Brief + Evening Shutdown)
- ✅ iOS shell: SwiftUI views, FamilyControls integration (awaiting entitlement approval), rule authoring wizard, Canvas OAuth
- ✅ 17 crates + 80+ passing tests (when workspace compiles)
- ✅ Multi-platform FFI (UniFFI Rust → Swift; JNI stubs for Android future)
Honest gaps blocking production:
- ❌ Workspace compilation: backup (E0505 borrow-check), rituals (E0277 Eq on f32), 3× connectors (type errors)
- ❌ Apple entitlement: FamilyControls driver logic shipped but gated behind
#if FOCALPOINT_HAS_FAMILYCONTROLSflag. Awaiting Apple review (submitted Phase 0, 1–4 week SLA). - ❌ Onboarding UX: 0 screens shipped. Users cannot self-serve setup today.
- ❌ Designer assets: Coachy 3D animation (
.rivRive file); SwiftUI placeholder in use. - ❌ Real-device QA: simulator only; entitlement approval required for real testing.
- ❌ GCal/GitHub OAuth: buttons exist, flows incomplete.
See roadmap_v2.md for phased plan (6 phases, honest effort estimates, dependencies, and known deviations from earlier claims).
| Feature | Status | Details |
|---|---|---|
| Domain: Events | [SHIPPED] | SHA256-chained deduping, 9+ event sources, schema v3 |
| Domain: Rules engine | [SHIPPED] | 12 condition primitives, 6 actions, schedule triggers, cooldowns, explainability |
| Domain: Wallet | [SHIPPED] | +/-Credit mutations, balance caps, audit trail on every change |
| Domain: Penalties | [SHIPPED] | Lockout windows, rigidity spectrum (Hard/Semi/Soft), debt tracking, escalation |
| Domain: Audit chain | [SHIPPED] | Hash-chained tamper-evident records; verification on startup |
| Domain: Task scheduling | [SHIPPED] | Rigidity-aware bin-packing, working-hours constraints, chunk splitting, 14 tests |
| Domain: Calendar integration | [SHIPPED] | Async trait + mock; GCal OAuth scaffold, EventKit real adapter (iOS) |
| Domain: Rituals | [SHIPPED] | Morning Brief (schedule-derived + LLM-coached), Evening Shutdown (task classification + streak); 15 tests |
| iOS: App shell | [SHIPPED] | SwiftUI skeleton, 5 tabs (Home, Tasks, Rules, Activity, Settings) |
| iOS: Rule authoring | [SHIPPED] | 4-step wizard (When/If/Then/Settings), JSON preview, DSL catalog |
| iOS: Canvas OAuth | [SHIPPED] | ASWebAuthenticationSession, keychain persistence, sync heartbeat |
| iOS: GCal OAuth | [SCAFFOLD] | Button present, flow incomplete |
| iOS: GitHub OAuth | [SCAFFOLD] | Button present, flow incomplete |
| iOS: Onboarding | [SCAFFOLD] | Canvas button only; no user-facing setup flow |
| iOS: FamilyControls driver | [SCAFFOLD] | ManagedSettingsStore + DeviceActivityCenter wired behind #if FOCALPOINT_HAS_FAMILYCONTROLS flag; awaiting entitlement approval |
| iOS: Coachy mascot | [PARTIAL] | SwiftUI render shipped; .riv Rive animation pending designer |
| Connectors: Canvas | [SHIPPED] | OAuth2, 4 event types, 44 wiremock tests, live-API test scaffold |
| Connectors: GCal | [SCAFFOLD] | OAuth2 scaffold, event list WIP |
| Connectors: GitHub | [SCAFFOLD] | Auth scaffold, event mapping pending |
| Connectors: Readwise, Notion, Linear | [SCAFFOLD] | Event mapping stubs only |
| Backup & restore | [SCAFFOLD] | age encryption + passphrase, CLI built; iOS FFI has E0505 borrow-check error |
| Builder (web task editor) | [SHIPPED] | 12 ReactFlow node types, Coachy preview, dist/ builds (not integrated to iOS) |
| Ecosystem: Connector manifest | [SHIPPED] | TOML format, tier system (Official/Verified/MCPBridged/Private) |
| Ecosystem: Webhook registry | [SHIPPED] | Signature verification, handler dispatch, 5 tests |
| Ecosystem: Template pack format | [SHIPPED] | ed25519 signing, TOML round-trip, deterministic UUID derivation |
| Ecosystem: MCP-bridged connectors | [SCAFFOLD] | Type defined, transport pending |
| Ecosystem: Marketplace catalog | [SHIPPED] | ConnectorRegistry, tier-ordered, deduped listings |
| Ecosystem: Visual rule builder | [SHIPPED] | iOS Rule Wizard shipped; web-hosted builder has all primitives to consume |
| Backend: Services | [SCAFFOLD] | auth-broker, webhook-ingest, sync-api placeholders only |
| Backend: Sentry integration | [SHIPPED] | SDK integrated, live monitoring pending real deploy |
| Backend: Release notes gen | [SHIPPED] | markdown + Discord format generators, tested |
| Docs: ADRs | [SHIPPED] | 9 decisions logged (stack, architecture, privacy, connectors, auth) |
| Docs: Connector SDK | [SHIPPED] | Manifest spec, trait contract, example walkthrough |
| Docs: Design docs | [SHIPPED] | Multi-device CRDT sync, Watch companion, Coachy art direction, connector ecosystem strategy |
| Docs: RFC process | [SHIPPED] | RFC-0001 plugin SDK, RFC-0002 template format |
| i18n: Translations | [SHIPPED] | Spanish + Japanese (122 strings), Localizable.xcstrings extracted |
| CI: Linting | [SHIPPED] | Clippy green, Vale markdown checks, commit-msg validator |
| CI: Testing | [SHIPPED] | 80+ unit tests, 44 Canvas wiremock tests, ritual integration tests, sync cursor persistence |
| CI: Security | [PARTIAL] | Audit chain tamper-detection tested; external security audit pending |
- Connector runtime treats Canvas LMS, calendars, tasks, health apps as first-class behavioral inputs. Ecosystem is the compounding moat, not blocking.
- Rules engine with explainable decisions, cooldowns, and state snapshots.
- Reward/penalty dual-ledger with escalation tiers, streaks, bypass budgets.
- Portable Rust core exported to iOS (Swift via UniFFI) + Android (Kotlin via JNI).
The focus CLI is ready for exploration. Walk through the end-to-end workflow:
# 3-command quickstart
cargo build -p focus-cli --release
./target/release/focus demo seed --db=/tmp/focus-demo.db
./target/release/focus tasks list --db=/tmp/focus-demo.db --jsonFor a full automated walkthrough with transcript, see CLI Demo or run:
task demoThis exercises all major subcommands (audit, tasks, rules, wallet, sync, eval, focus sessions, templates) and generates a markdown report.
crates/ Rust workspace — 17 crate stubs (domain core + mascot)
apps/ios/ SwiftUI + FamilyControls/ManagedSettings + Spline mascot
apps/android/ Deferred beyond Phase 2 (placeholder)
services/ Optional backend — deferred to Phase 5 (placeholders)
docs/ Architecture, ADRs, connector SDK, ecosystem strategy
examples/ Sample rules + connector fixtures
scripts/ Demo walkthrough runner + CI utilities
PRD.md— product requirementsADR.md— architecture decisions indexFUNCTIONAL_REQUIREMENTS.md— FR-CONN/EVT/RULE/STATE/ENF/DATA/UXPLAN.md— phased roadmapUSER_JOURNEYS.md— primary flows00_START_HERE.md— onboarding
When compilation is repaired:
cargo build --workspace
cargo test --workspace # ~80 tests pass
cargo clippy --workspace -- -D warnings # green after repair
cargo fmt --checkiOS build: SwiftUI compiles; requires Xcode 15.2+, iOS 16+ deployment target. Android build: JNI bindings scaffolded; no Gradle integration yet.
- Rust (1.82, edition 2021) — shared core (will bind to Android later)
- Swift 5.9+ / SwiftUI — iOS 16+; FamilyControls entitlement required
- SQLite — local-first persistence
- UniFFI — Rust↔Swift bindings
- Spline — iOS mascot animation runtime (
crates/focus-mascot+apps/ios/Mascot/)
Android Kotlin/Compose support reserved in apps/android/ but deferred
beyond Phase 2. Cross-native frameworks (Tauri / RN / Flutter) rejected
per ADR-001.
See ADR.md for the full decision log.
- roadmap_v2.md — Honest 6-phase roadmap with effort estimates, dependencies, and known gaps
- honest_coverage.md — Feature-by-feature audit (shipped vs scaffold vs partial vs external-blocked)
- open_questions.md — Tracked unknowns that may impact Phase 1.5+ timing
MIT OR Apache-2.0.