Files
openhuman/MVP.md
T
Steven EnamakelandGitHub 58969667d9 fix: add ESLint and Prettier configuration (#15)
* ran prettier

* Refactor ESLint configuration to use ES module syntax and enhance TypeScript support

- Converted CommonJS `require` statements to ES module `import` syntax for better compatibility with modern JavaScript.
- Added new paths to ignore in ESLint configuration to exclude additional directories.
- Updated TypeScript file patterns to be more specific, improving linting accuracy.
- Adjusted React hooks rules to allow certain patterns, enhancing flexibility in component design.

These changes improve the maintainability and clarity of the ESLint configuration, aligning it with current best practices.

* Refactor ESLint configuration to use ES module syntax and enhance TypeScript support

- Converted CommonJS `require` statements to ES module `import` syntax for better compatibility with modern JavaScript.
- Added new paths to ignore in ESLint configuration to exclude additional directories.
- Updated TypeScript file patterns to be more specific, improving linting accuracy.
- Introduced new React hooks rules and adjusted existing rules for better adherence to best practices.
- Made minor adjustments to import statements across various files for consistency and clarity.

These changes improve the overall linting setup and ensure better code quality across the project.

* Refactor import statements across multiple files for consistency

- Updated import statements to use TypeScript's `type` syntax for type imports, enhancing clarity and consistency across the codebase.
- Consolidated imports from the same module into single statements, improving readability and maintainability.

These changes streamline the code structure and align with best practices for TypeScript imports.

* Refactor import statements in memory manager for improved clarity

- Updated import statements to consolidate type imports and enhance readability.
- Removed redundant imports, streamlining the code structure in the memory manager file.

These changes align with best practices for TypeScript imports and improve maintainability.

* Add Husky for pre-commit and pre-push hooks

- Introduced Husky to manage Git hooks, enhancing the development workflow.
- Added pre-commit and pre-push scripts to enforce code formatting and linting checks before commits and pushes.
- Updated package.json to include Husky as a dependency and added a prepare script for setup.

These changes improve code quality and ensure adherence to formatting and linting standards during the development process.

* Refactor import statements for improved clarity and consistency

- Updated import statements across multiple files to consolidate type imports and enhance readability.
- Adjusted the order of imports for better organization and alignment with best practices in TypeScript.

These changes streamline the code structure and improve maintainability throughout the project.

* ran formatter

* Refactor import statements and improve code formatting across multiple files

- Consolidated and reordered import statements for better clarity and consistency in `SkillsGrid.tsx`, `SkillProvider.tsx`, and `index.ts`.
- Enhanced readability by adjusting formatting and removing redundant lines.
- These changes align with best practices for TypeScript imports and improve overall maintainability of the codebase.

* Refactor and optimize code in multiple components

- Removed redundant properties from the `STATUS_DISPLAY` object in `SkillsGrid.tsx` to streamline status handling.
- Consolidated import statements in `SettingsModal.tsx` for improved organization.
- Simplified state management and error handling in `BillingPanel.tsx`, enhancing performance and readability.
- Added `REHYDRATE` import to `index.ts` for better state persistence management.

These changes improve code clarity, maintainability, and align with best practices in TypeScript development.

* Consolidate import statements in SettingsModal.tsx for improved organization

* Add Prettier and ESLint checks to typecheck workflow

- Integrated a Prettier formatting check to ensure code style consistency.
- Added an ESLint step to enforce code quality and catch potential issues.
- These enhancements improve the development workflow by automating formatting and linting checks during the typecheck process.

* Add activeSkillDescription state to ConnectionsPanel and ConnectStep

- Introduced activeSkillDescription state in both ConnectionsPanel and ConnectStep components to store and manage skill descriptions.
- Updated the SkillSetupModal to accept skillDescription as a prop, enhancing the modal's functionality and data handling.

These changes improve the user experience by providing more detailed information about skills during the connection setup process.

* Enhance pre-push hook to include TypeScript compile check

- Added a TypeScript compile check to the pre-push script, ensuring that code compiles successfully before pushing.
- Updated error handling to include compile errors alongside formatting and linting issues, providing clearer feedback to developers.

These changes improve the reliability of the codebase by preventing non-compiling code from being pushed.

* Update GitHub workflows for pull request handling and publishing logic

- Modified the package-and-publish workflow to support pull request events, ensuring proper handling of branches.
- Adjusted the SHOULD_PUBLISH environment variable to differentiate between pull requests and main branch events.
- Updated the pr-protection workflow to focus solely on the main branch, removing references to the master branch.

These changes enhance the CI/CD process by refining branch handling and improving clarity in workflow conditions.
2026-02-02 06:24:50 +05:30

7.8 KiB


# Cross-Platform Tauri Agent Assistant — MVP Specification

## Overview

This MVP defines a **Telegram-based Agent Assistant** built with **Tauri (Rust + Web UI)** targeting:

- Windows
- macOS
- Android
- iOS

The assistant:
- Interacts with users via a **Telegram bot (DM-first)**
- Processes Telegram channel data **locally on device**
- Uses a **minimal backend** only for:
  - identity & login
  - payments & entitlements
  - push notifications (especially for iOS)
- Avoids storing Telegram message content on servers

---

## Core Platform Behavior Summary

| Platform | Listening Model                 | Trigger to Respond         |
| -------- | ------------------------------- | -------------------------- |
| Windows  | Continuous (background)         | Bot DM or channel activity |
| macOS    | Continuous (background)         | Bot DM or channel activity |
| Android  | Continuous (foreground service) | Bot DM or channel activity |
| iOS      | On-demand only                  | Bot DM → push → tap → sync |

---

## Architectural Pillars

- **UI-first development**
- **Single Rust agent runtime**
- **Telegram bot as the user interface**
- **Privacy-first local processing**
- **Backend as infrastructure, not intelligence**

---

# PHASED MVP PLAN

---

## Phase 0 — Project Skeleton & Tooling

### Goals

- Prepare repo structure
- Establish documentation and contribution rules
- No business logic yet

### Deliverables

- Monorepo structure
- Tauri project scaffold
- Mobile targets enabled (Tauri v2)
- CI hooks (optional)

### Repo Structure

/apps /desktop /mobile /core /agent-runtime (Rust) /storage /telegram /backend /docs


### Documentation Commands (Required)

```bash
/docs/architecture.md        # high-level system design
/docs/decisions/ADR-000.md   # initial architecture decision record

Exit Criteria

  • App builds and runs (blank UI)
  • Docs folder initialized
  • ADR process agreed upon

Phase 1 — UI-First MVP (No Logic)

Goals

Build the entire UI flow before implementing logic.

UI Screens

  • Login / Signup
  • Telegram Connect (bot instructions)
  • Channel Selection
  • Sync Status Screen
  • Settings (background, privacy, storage)
  • Plan & Billing (stub)
  • Logs / Activity View (local only)

Platforms

  • All platforms (desktop + mobile)

Deliverables

  • Responsive UI
  • Navigation between screens
  • Mock data only
  • No Telegram, no backend, no Rust logic

Documentation Commands

/docs/ui/flows.md            # user flows
/docs/ui/screens.md          # screen definitions
/docs/ui/states.md           # loading / error / empty states

Exit Criteria

  • Entire app is navigable
  • No dead-end screens
  • UI approved before logic begins

Phase 2 — Local Agent Runtime (Rust Only)

Goals

Implement the local agent engine without Telegram or backend.

Components

  • Rust agent runtime
  • Intent router (question / sync / config)
  • Processing pipeline (stubbed)
  • Response composer (mock responses)

Deliverables

  • Tauri IPC commands:

    • agent_init
    • agent_process_query
    • agent_status
  • In-memory only state

Documentation Commands

/docs/core/agent.md          # agent architecture
/docs/core/events.md         # internal event types
/docs/core/state.md          # memory state model

Exit Criteria

  • UI can send a question
  • Agent returns a mock response
  • No persistence yet

Phase 3 — Local Storage & Privacy Layer

Goals

Add efficient, privacy-first local storage.

Storage Rules

  • No Telegram message bodies by default

  • Store only:

    • channel IDs
    • last processed message IDs
    • dedupe hashes
  • Encrypted at rest

Deliverables

  • Encrypted SQLite
  • OS keychain integration
  • Storage abstraction in Rust
  • “Ephemeral mode” toggle

Documentation Commands

/docs/storage/schema.md
/docs/storage/encryption.md
/docs/privacy/model.md

Exit Criteria

  • App restarts without losing cursors
  • “Delete local data” wipes all state
  • No plaintext sensitive data on disk

Phase 4 — Telegram Bot Integration (Agent Assistant)

Goals

Turn the app into a real Telegram agent assistant.

Telegram Capabilities (MVP)

  • Bot DM interaction
  • Read user questions
  • Fetch channel messages (where bot has access)
  • Reply via DM

Platform Behavior

  • Windows/macOS/Android: continuous polling
  • iOS: no polling (on-demand only)

Deliverables

  • Telegram Bot Gateway (Rust)
  • Update polling / fetching
  • Message dedupe + cursoring
  • Agent replies sent via bot DM

Documentation Commands

/docs/telegram/bot.md
/docs/telegram/flows.md
/docs/telegram/limits.md

Exit Criteria

  • User asks a question in Telegram
  • App processes it
  • Bot replies correctly
  • No duplicate replies

Phase 5 — Platform Background Execution

Goals

Enable platform-appropriate background behavior.

Platform Breakdown

Windows

  • Tray app
  • Autostart
  • Background polling

macOS

  • Menu bar app
  • Launch at login

Android

  • Foreground service (persistent notification)
  • Background polling allowed

iOS

  • No continuous background
  • Only foreground execution

Documentation Commands

/docs/platforms/windows.md
/docs/platforms/macos.md
/docs/platforms/android.md
/docs/platforms/ios.md

Exit Criteria

  • Desktop apps run without UI open
  • Android foreground service stable
  • iOS behaves strictly foreground-only

Phase 6 — Minimal Backend Integration

Goals

Introduce backend without violating privacy goals.

Backend Responsibilities

  • Authentication
  • Device registration
  • Entitlements
  • Push notifications
  • Payment verification

Explicit Non-Responsibilities

  • No Telegram message storage
  • No agent logic
  • No summaries

Deliverables

  • Auth flow wired into UI
  • Entitlements fetched on startup
  • Device registered for push

Documentation Commands

/docs/backend/api.md
/docs/backend/data-model.md
/docs/backend/security.md

Exit Criteria

  • User login works
  • Entitlements enforced locally
  • Backend DB contains no message content

Phase 7 — iOS Push → Tap → Sync Flow

Goals

Implement the iOS-specific agent interaction model.

Flow

  1. User sends question to bot
  2. Backend triggers visible push
  3. User taps notification
  4. App opens
  5. App syncs Telegram
  6. Agent processes
  7. Bot replies

Deliverables

  • APNs integration
  • Push payload handling
  • Sync-on-open logic

Documentation Commands

/docs/ios/push-flow.md
/docs/ios/limitations.md

Exit Criteria

  • Push reliably opens app
  • Sync runs automatically
  • Bot replies successfully

Phase 8 — Payments & Plan Gating

Goals

Monetize safely and correctly.

Platforms

  • Desktop: Stripe / Paddle
  • Android: Play Billing
  • iOS: StoreKit

Deliverables

  • Purchase flow per platform
  • Receipt verification
  • Feature gating in Rust

Documentation Commands

/docs/billing/plans.md
/docs/billing/verification.md
/docs/billing/entitlements.md

Exit Criteria

  • Paid features unlock correctly
  • Downgrades enforced
  • Offline grace period handled

Phase 9 — Hardening & Release Prep

Goals

Stability, observability, and trust.

Deliverables

  • Error handling
  • Rate limiting
  • Abuse prevention
  • Crash-safe storage
  • UX polish

Documentation Commands

/docs/release/checklist.md
/docs/known-issues.md
/docs/security/threat-model.md

Exit Criteria

  • No critical crashes
  • No duplicate Telegram replies
  • Clear user-facing error states

Final Notes

  • The Telegram bot is the product interface
  • The Tauri app is the execution engine
  • The backend is infrastructure, not intelligence
  • iOS behavior is intentionally constrained for correctness

END OF MVP