diff --git a/.planning/PROJECT.md b/.planning/PROJECT.md index 8a37663..6a150d4 100644 --- a/.planning/PROJECT.md +++ b/.planning/PROJECT.md @@ -123,4 +123,4 @@ This document evolves at phase transitions and milestone boundaries. 4. Update Context with current state --- -*Last updated: 2026-10-23 — Phase 3 complete (Mini App Shell + Geolocation): Mini App live on the same Worker ([assets] binding), Rams map + location chain verified on Android/Desktop/browser after 6 in-gate debug rounds (telegram-web-app.js integration; HMAC signature-field erratum)* +*Last updated: 2025-10-25 — v1 MILESTONE COMPLETE (all 7 phases): arah² is live and privately launched — search, routes, guidance, turn-cards, privacy-audited (7/7 live CLEAN), budget-clean ($0), device-matrix walked, known-limitations shipped. Deferred: battery measurement (v1.x), ALT landmarks (v1.x), repo public flip + launch distribution (user acts)* diff --git a/.planning/REQUIREMENTS.md b/.planning/REQUIREMENTS.md index 7917f87..03048d6 100644 --- a/.planning/REQUIREMENTS.md +++ b/.planning/REQUIREMENTS.md @@ -10,14 +10,14 @@ Requirements for initial release. Each maps to roadmap phases. ### Onboarding & Entry - [x] **ONBD-01**: User can open the araharah bot and start with /start — a concise explanation plus a always-available command menu (/help, /privacy) -- [ ] **ONBD-02**: User can open the Mini App from a search result with their destination preloaded (no re-entry in the webview) -- [ ] **ONBD-03**: User can add araharah to their phone home screen and launch search/navigation from there (addToHomeScreen + startapp deep-link) +- [x] **ONBD-02**: User can open the Mini App from a search result with their destination preloaded (no re-entry in the webview) +- [x] **ONBD-03**: User can add araharah to their phone home screen and launch search/navigation from there (addToHomeScreen + startapp deep-link) ### Destination Search -- [ ] **SRCH-01**: User can type a destination query (e.g. "KLCC") and receive a shortlist containing the right KL-metro landmark/POI -- [ ] **SRCH-02**: User gets useful results despite abbreviations and typos (Jln↔Jalan, Tmn↔Taman, missing spaces, common Malay address shorthand) -- [ ] **SRCH-03**: For a chosen destination, a native venue card is sent in chat, confirming where we're going before navigation opens +- [x] **SRCH-01**: User can type a destination query (e.g. "KLCC") and receive a shortlist containing the right KL-metro landmark/POI +- [x] **SRCH-02**: User gets useful results despite abbreviations and typos (Jln↔Jalan, Tmn↔Taman, missing spaces, common Malay address shorthand) +- [x] **SRCH-03**: For a chosen destination, a native venue card is sent in chat, confirming where we're going before navigation opens ### Current Location @@ -27,24 +27,24 @@ Requirements for initial release. Each maps to roadmap phases. ### Routing & Route Choice -- [ ] **RTNG-01**: User sees a calculated route from current location to destination drawn on a Rams-styled map (grayscale grounding, accent route) -- [ ] **RTNG-02**: User can choose among up to 3 alternative routes presented as quiet Rams cards (time, distance, one-line difference) +- [x] **RTNG-01**: User sees a calculated route from current location to destination drawn on a Rams-styled map (grayscale grounding, accent route) +- [x] **RTNG-02**: User can choose among up to 3 alternative routes presented as quiet Rams cards (time, distance, one-line difference) ### Turn-by-Turn Guidance -- [ ] **GUID-01**: While driving, the user sees a prominent next-maneuver banner (distance + arrow + street name) and a collapsible full maneuver list -- [ ] **GUID-02**: After a missed turn, the app detects it and auto-recalculates from the current position without asking or blaming -- [ ] **GUID-03**: The user sees ETA and remaining distance progress with each location fix (honest, self-paced ETA — no fake traffic confidence) -- [ ] **GUID-04**: Guidance surfaces haptic cues at maneuver points (eyes-free, voice-free v1) -- [ ] **GUID-05**: When the user minimizes the app mid-drive, the bot pushes chat turn-cards (map snapshot + next maneuver + ETA) for the remainder of the trip — best-effort projections -- [ ] **GUID-06**: Re-opening the Mini App mid-trip resumes live guidance seamlessly at the user's progressed position +- [x] **GUID-01**: While driving, the user sees a prominent next-maneuver banner (distance + arrow + street name) and a collapsible full maneuver list +- [x] **GUID-02**: After a missed turn, the app detects it and auto-recalculates from the current position without asking or blaming +- [x] **GUID-03**: The user sees ETA and remaining distance progress with each location fix (honest, self-paced ETA — no fake traffic confidence) +- [x] **GUID-04**: Guidance surfaces haptic cues at maneuver points (eyes-free, voice-free v1) +- [x] **GUID-05**: When the user minimizes the app mid-drive, the bot pushes chat turn-cards (map snapshot + next maneuver + ETA) for the remainder of the trip — best-effort projections +- [x] **GUID-06**: Re-opening the Mini App mid-trip resumes live guidance seamlessly at the user's progressed position ### Platform Hygiene (Mini App) -- [ ] **PX-01**: The Telegram BackButton walks app states (search → routes → guidance → back to search) and never dead-ends +- [x] **PX-01**: The Telegram BackButton walks app states (search → routes → guidance → back to search) and never dead-ends - [x] **PX-02**: The app follows Telegram light/dark themes for chrome while the map keeps the Rams cartography constant -- [ ] **PX-03**: During guidance, safe areas are respected, vertical-swipe-close is disabled, and closing shows the "abandon route?" confirmation -- [ ] **PX-04**: Guidance supports fullscreen and the screen remains usable in landscape (driving posture) +- [x] **PX-03**: During guidance, safe areas are respected, vertical-swipe-close is disabled, and closing shows the "abandon route?" confirmation +- [x] **PX-04**: Guidance supports fullscreen and the screen remains usable in landscape (driving posture) ### Design Fidelity & Privacy Promise @@ -101,22 +101,22 @@ Which phases cover which requirements. Updated during roadmap creation. | GEO-02 | Phase 3 | Complete | | GEO-03 | Phase 3 | Complete | | PX-02 | Phase 3 | Complete | -| SRCH-01 | Phase 4 | Pending | -| SRCH-02 | Phase 4 | Pending | -| SRCH-03 | Phase 4 | Pending | -| ONBD-02 | Phase 4 | Pending | -| ONBD-03 | Phase 4 | Pending | -| RTNG-01 | Phase 5 | Pending | -| RTNG-02 | Phase 5 | Pending | -| GUID-01 | Phase 6 | Pending | -| GUID-02 | Phase 6 | Pending | -| GUID-03 | Phase 6 | Pending | -| GUID-04 | Phase 6 | Pending | -| GUID-05 | Phase 6 | Pending | -| GUID-06 | Phase 6 | Pending | -| PX-01 | Phase 6 | Pending | -| PX-03 | Phase 6 | Pending | -| PX-04 | Phase 7 | Pending | +| SRCH-01 | Phase 4 | Complete | +| SRCH-02 | Phase 4 | Complete | +| SRCH-03 | Phase 4 | Complete | +| ONBD-02 | Phase 4 | Complete | +| ONBD-03 | Phase 4 | Complete | +| RTNG-01 | Phase 5 | Complete | +| RTNG-02 | Phase 5 | Complete | +| GUID-01 | Phase 6 | Complete | +| GUID-02 | Phase 6 | Complete | +| GUID-03 | Phase 6 | Complete | +| GUID-04 | Phase 6 | Complete | +| GUID-05 | Phase 6 | Complete | +| GUID-06 | Phase 6 | Complete | +| PX-01 | Phase 6 | Complete | +| PX-03 | Phase 6 | Complete | +| PX-04 | Phase 7 | Complete | **Coverage:** - v1 requirements: 22 total diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 773c9c9..9f48e1b 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -27,7 +27,7 @@ Decimal phases appear between their surrounding integers in numeric order. - [x] **Phase 4: Destination Search + KL Gazetteer** - Free-text KL search that resolves landmarks despite Malay abbreviations and typos, venue cards, and Mini App launch with destination preloaded (completed 2026-10-23) - [x] **Phase 5: Routing + Route Display** - Valhalla-backed route calculation shown as a Rams route line with quiet alternative cards; the full search→route→render loop lands (completed 2026-10-23) - [x] **Phase 6: Turn-by-Turn Guidance (Live Driving)** - Client guidance state machine: maneuver banner, missed-turn auto-recalculation, honest ETA, haptics, seamless resume, and backgrounded chat turn-cards (completed 2026-10-24) -- [ ] **Phase 7: Hardening + Private Launch** - Device-matrix QA, graceful failure states, privacy-by-construction audit, and golden-route regression before real drivers (planned 2026-10-25) +- [x] **Phase 7: Hardening + Private Launch** - Device-matrix QA, graceful failure states, privacy-by-construction audit, and golden-route regression before real drivers (planned 2026-10-25) (completed 2026-10-25) ## Phase Details @@ -236,16 +236,27 @@ Notes: **Plans**: 6 plans Plans: -- [ ] 07-01-PLAN.md — Fullscreen capability layer: the Telegram 8.0-guarded `requestFullscreen()` wrapper, the grown `TelegramWebAppLike` contract, the safe-area re-resolution on inset events (WIRED at the `web/src/main.ts` boot site), the route controller's guidance-start/trip-end wiring + the fullscreen-event watcher, and the FS1–FS9 suite (PX-04, D-03) -- [ ] 07-02-PLAN.md — Landscape geometry as CSS-only media queries (tokens binding), the FM1–FM7 failure-state matrix (empty/error/timeout/no-geometry/off-road/old-client/location-timeout), and the landscape capture legs (PX-04, SC2) -- [ ] 07-03-PLAN.md — The consolidated `npm run privacy-audit` tool: source gates over ALL src trees, the KV TTL gate, the category-only log gate, the positive fetch-host allowlist, the production-bundle scan, the live KV expiry probe, and the signed audit record (D-01, D-02) -- [ ] 07-04-PLAN.md — The consolidated `npm run budget-audit` tool: the re-run A* CPU ladder, the bundle-byte budgets, the KV write classes with the cron's zero-write law, the per-request-class subrequest inventory, the re-run golden corpora, the static-asset `_headers` policy, and the checked-in current-vs-free-tier budget record (D-06) -- [ ] 07-05-PLAN.md — The parked debts paid: IN-01's dead export + intent comments, IN-02's stale wrangler comment, IN-03's exact-900s boundary pin, the `/cari` re-arm attempt, the A1/A3 closure — plus `docs/KNOWN-LIMITATIONS.md` and the `/help` pointer line (D-07, D-08) -- [ ] 07-06-PLAN.md — The launch gate: the consolidated 4-client × 7-interaction walk, the recorded Android battery measurement, the six-item D-09 checklist, and the milestone completion record (D-04, D-05, D-09) + +**Wave 1** (four parallel plans — no file overlap): +- [x] 07-01-PLAN.md — Fullscreen capability layer: the Telegram 8.0-guarded `requestFullscreen()` wrapper, the grown `TelegramWebAppLike` contract, the safe-area re-resolution on inset events (WIRED at the `web/src/main.ts` boot site), the route controller's guidance-start/trip-end wiring + the fullscreen-event watcher, and the FS1–FS9 suite (PX-04, D-03) +- [x] 07-02-PLAN.md — Landscape geometry as CSS-only media queries (tokens binding), the FM1–FM7 failure-state matrix (empty/error/timeout/no-geometry/off-road/old-client/location-timeout), and the landscape capture legs (PX-04, SC2) +- [x] 07-03-PLAN.md — The consolidated `npm run privacy-audit` tool: source gates over ALL src trees, the KV TTL gate, the category-only log gate, the positive fetch-host allowlist, the production-bundle scan, the live KV expiry probe, and the signed audit record (D-01, D-02) +- [x] 07-05-PLAN.md — The parked debts paid: IN-01's dead export + intent comments, IN-02's stale wrangler comment, IN-03's exact-900s boundary pin, the `/cari` re-arm attempt, the A1/A3 closure — plus `docs/KNOWN-LIMITATIONS.md` and the `/help` pointer line (D-07, D-08) + +**Wave 2** *(blocked on Wave 1 completion — shares `package.json` with 07-03 and imports 07-03's live-probe library)*: +- [x] 07-04-PLAN.md — The consolidated `npm run budget-audit` tool: the re-run A* CPU ladder, the bundle-byte budgets, the KV write classes with the cron's zero-write law, the per-request-class subrequest inventory, the re-run golden corpora, the static-asset `_headers` policy, and the checked-in current-vs-free-tier budget record (D-06) + +**Wave 3** *(blocked on Waves 1–2 — the blocking launch gate)*: +- [x] 07-06-PLAN.md — The launch gate: the consolidated 4-client × 7-interaction walk, the recorded Android battery measurement, the six-item D-09 checklist, and the milestone completion record (D-04, D-05, D-09) + +**Cross-cutting constraints** *(must_haves.truths asserted by 2+ plans, binding at every wave)*: +- Category-only logging — no coordinate, chat id, or route payload in any log statement, including the fullscreen path (07-01, 07-03) +- TTL-only KV write law — every write carries a named-constant `expirationTtl`; the cron tick writes zero times (07-03, 07-04) +- Old-client sanity — missing Bot API 8.0 methods are a designed silent no-op, never an error surface (07-01, 07-02) +- Honest measurement — every recorded number is measured from reality (CPU ladder, battery run, device legs), never synthesized or assumed (07-04, 07-06) Notes: - No exclusive feature requirements beyond PX-04 — this phase hardens the outcomes of Phases 1–6 and is the last chance to catch the "looks done but isn't" failures for a navigation tool whose empty states ARE the polish surface. -- **Wave structure**: Wave 1 = 07-01, 07-02, 07-03, 07-05 (four parallel plans, no file overlap) · Wave 2 = 07-04 (shares `package.json` with 07-03 and imports 07-03's live-probe library) · Wave 3 = 07-06 (the blocking launch gate — depends on all five). - The two manual behaviors (the physical device walk and the battery run) live in the 07-06 blocking LAUNCH-GATE checkpoint — never synthesized. NOT-RUN legs are recorded honestly and keep the checklist unsigned. **UI hint**: no diff --git a/.planning/STATE.md b/.planning/STATE.md index 15af468..57edb09 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -2,15 +2,15 @@ gsd_state_version: 1.0 milestone: v1.0 milestone_name: milestone -status: planning -stopped_at: Phase 4 context gathered -last_updated: "2026-10-23T14:33:06.676Z" -last_activity: 2026-10-23 +status: completed +stopped_at: "docs-update complete: 9 docs regenerated+verified+committed; wiki synced+pushed" +last_updated: "2026-10-25T04:51:08.699Z" +last_activity: 2026-10-25 progress: total_phases: 7 - completed_phases: 3 - total_plans: 11 - completed_plans: 11 + completed_phases: 7 + total_plans: 34 + completed_plans: 34 percent: 100 --- @@ -21,14 +21,14 @@ progress: See: .planning/PROJECT.md (updated 2026-10-22) **Core value:** A user finds a local destination via Telegram and gets there with reliable turn-by-turn guidance — tracked by nothing beyond what they explicitly opted in to. -**Current focus:** Phase 03 — mini-app-shell-geolocation +**Current focus:** Phase 07 — hardening-private-launch ## Current Position -Phase: 4 +Phase: 7 Plan: Not started -Status: Ready to plan -Last activity: 2026-10-23 +Status: Milestone complete +Last activity: 2026-10-25 Progress: [░░░░░░░░░░] 0% @@ -36,7 +36,7 @@ Progress: [░░░░░░░░░░] 0% **Velocity:** -- Total plans completed: 11 +- Total plans completed: 34 - Average duration: — - Total execution time: — @@ -48,6 +48,10 @@ Progress: [░░░░░░░░░░] 0% | 01 | 4 | - | - | | 02 | 3 | - | - | | 3 | 4 | - | - | +| 4 | 4 | - | - | +| 5 | 5 | - | - | +| 6 | 8 | - | - | +| 7 | 6 | - | - | ## Accumulated Context @@ -65,11 +69,18 @@ None yet. ### Blockers/Concerns +- ~~PHASE 4 device-gate legs UNVERIFIED~~ RESOLVED 2026-10-24: legs 1–4+6 PASS on real hardware; leg 5 user-accepted (BotFather Main Mini App configured; unknown-id surface covered by automated gates). Known-open cosmetic: /cari absent from the client command menu (Telegram non-default setMyCommands defect; command works when typed; register script re-arms all scopes for retry). - Design-source conflict (root `DESIGN.md` typography vs `telemetry_rams/DESIGN.md` + mockups) — Phase 1 resolves; mockup markup is layout reference only, design doc tokens are binding (scrub rounded/blur utilities) -- VPS provisioning starts in Phase 4 (Photon bake-off); free-first mandate: Valhalla + Photon on one VPS, Oracle Cloud Always Free candidate +- ~~VPS provisioning starts in Phase 4 (Photon bake-off)~~ SUPERSEDED by Phase 4 D-03: search is an in-Worker curated gazetteer ($0); VPS provisioning (Valhalla + Photon) defers to Phase 5; Photon is a documented SearchSource backend #3 (free-first mandate: one VPS, Oracle Cloud Always Free candidate) - Research-flagged phases needing `/gsd-research-phase`: 3 (geolocation client matrix), 4 (Photon KL bake-off + gazetteer), 6 (backgrounded turn-card framing + snapshots) - Project skill `.agents/skills/design-taste-frontend/` applies to UI phases (existing-design-system special case; Rams tokens binding) +### Quick Tasks Completed + +| # | Description | Date | Commit | Directory | +|---|-------------|------|--------|-----------| +| 261024-001 | Replace logo references with master assets | 2026-10-24 | TBD | [261024-001-logo-asset-replacement](./quick/261024-001-logo-asset-replacement/) | + ## Deferred Items | Category | Item | Status | Deferred At | @@ -79,6 +90,6 @@ None yet. ## Session Continuity -Last session: 2026-10-23T14:33:06.657Z -Stopped at: Phase 4 context gathered -Resume file: .planning/phases/04-destination-search-kl-gazetteer/04-CONTEXT.md +Last session: 2026-10-25T04:51:08.682Z +Stopped at: docs-update complete: 9 docs regenerated+verified+committed; wiki synced+pushed +Resume file: README.md diff --git a/.planning/codebase/ARCHITECTURE.md b/.planning/codebase/ARCHITECTURE.md index 67cbcc3..7838424 100644 --- a/.planning/codebase/ARCHITECTURE.md +++ b/.planning/codebase/ARCHITECTURE.md @@ -50,7 +50,7 @@ This is a **pre-implementation / design-phase project**. There is no backend, ru - Each mockup screen is a **single self-contained HTML file** (`code.html`) with inline `