1. Core Architectural Manifest & Context
What We Are NOT Building: This is NOT a traditional, punitive habit tracker application. Traditional trackers weaponize negative reinforcement by showing flashing red error marks or hard zeros on a calendar grid when a user misses a day, which triggers psychological avoidance and app uninstalls.
What We ARE Building: An adaptive, velocity-centric habit calibration engine. The system treats an inevitable habit break not as a failure state, but as a critical diagnostic data signal.
The Core Metaphor: The system behaves exactly like a long-distance vehicle navigation engine. When traffic or fatigue strikes, the vehicle does not reset its journey back to the starting city; it temporarily lowers its speed/velocity to safely navigate the terrain while maintaining forward momentum.
The Core Success Metric: The objective is NOT to rigidly force the user to a flawless destination endpoint. Success is defined strictly as preventing a user from dropping down to a hard "0" and abandoning the routine entirely. Our goal is keeping the user in constant, low-friction motion.
2. Dynamic Problem Solving Flow (Interaction Logic)
When the application detects a missed habit slot on a give day (let's assume Day 8), it completely bypasses standard error logs and deploys a 3-step systemic loop:
Step 1: The Positive Interception
Instead of rendering a generic error screen, display a highly constructive, positive notification interface.
System Messaging Focus: Explicitly reinforce that their previous high-intensity baseline (e.g., 100 push-ups) established a premium foundation. Inform them that they have arrived at a natural system pivot point where it is time to reassess and calibrate their velocity to match their current recovery capacity.
Step 2: Autonomous Option Exposure
Present the user with a distinct vertical choice matrix containing exactly three pre-calculated options (The recommended lower-intensity "Floor", a minimal fallback tier, and a button to maintain their high-load "Ceiling").
The system must grant full user autonomy. The choice remains completely in their hands without algorithmic forcing.
Step 3: Stream Recalibration & Continuation
The exact option selected by the user instantly shifts to become their new, active daily target from that specific timestamp forward.
The previous high-intensity streak is cleanly compiled and archived into their long-term profile data ledger (inside the streaks page) as a successful historical volume milestone, while a fresh, high-velocity streak level activates immediately.
3. System Design Tokens & Clean UI Rules (Anti-Vibe Constraints)
Design System Separation: All core UI styles, layout parameters, and token mappings must be managed in a standalone structural file named exactly designs.md. No raw styling values may be hardcoded into the component files.
Typography Base: Global interface uses the Inter font family exclusively to ensure crisp rendering on mobile screens. Scale token names must be highly descriptive, starting from a baseline indicator (12px) and climbing/declining systematically.
Dynamic Flexibility: If the design requires an additional decorative or numerical font family later in development, it will be added structurally.
Color Theme Execution: The application renders a premium, dark mode UI style first. High contrast parameters (foreground and brand colors) must be strictly maintained across the entire system.
Initial Token Constraint: Start with a tight baseline of exactly 5 core functional color tokens to prevent design bloat. If the layout execution or component depth requires additional contrast tiers later in development, extra tokens may be systematically introduced, keeping the absolute total as minimal as possible (maximum 5 or 6 tokens).
Background Layering Strategy: The AI must establish depth by scaling background tokens systematically from the darkest hue to the lightest hue.
Foreground Scaling Strategy: The AI must manage text and label readability by structuring foreground tokens from highest visibility to muted visibility.
Brand Accent Directive: The brand token must utilize an ultra-high contrast color to guarantee immediate visibility for key active states, buttons, and motivational triggers.
Externalization Requirement: The AI engine is strictly forbidden from hardcoding raw color values. Every single color used must map directly to the centralized designs.md file. Each entry in that file must explicitly declare its unique Token Name, Hex Code, and HSL Value.
4. Visual Hierarchy & Structural Anti-Vibe Directives
Structural Card Enforcement: The AI engine is strictly prohibited from nesting structural containers or implementing layout patterns that place cards inside cards inside cards.
Modern Section Differentiation: To separate different sections, do not create cards inside cards. Instead, use only three things: typography, colors, and generous white space. Both the typography styles and color options must be pulled directly from our designs.md file. Combining these three elements provides a clean visual hierarchy and makes the interface look modern without clogging the layout with unnecessary boxes.
No All-Caps Forcing: Maintain natural sentence case across all text layers, buttons, and indicators unless specifically directed.
Tactile 3D Buttons: For primary actions, engineer clean, minimalist, and highly responsive 3D buttons that introduce a subtle sense of playfulness. The 3D elevation must be achieved using a flat 4px to 6px drop shadow with zero blur, utilizing a much darker tone from your color palette. Ensure the active click micro-interactions are instantaneous and fast to maintain a crisp, modern operational feel.