Reverse self-discipline · AI persona supervision

A flag for every thousand who raise one, yours is the one that falls

FlagBreaker is a self-discipline app where a sharp-tongued AI buddy stares you down until the job is done. Hit the goal and the AI cheers; miss it and the AI roasts you. Pick bro (your foul-mouthed, soft-hearted friend) or senpai (an aloof ice-queen whose one line lands like a slap). After 3 days of consecutive misses it auto-switches to pure encouragement; minors get kind-only mode throughout; a 7-day clean streak wipes failure records.

Two AIs watching you

Not a cold assistant: real characters who roast you and pull you back up

😈

Bro

Sharp-tongued buddy, roast-style supervision

“Not bad, bro. First day and the flag is still standing; didn’t see that coming 🫡”
  • Colloquial
  • Fast and punchy
  • 1-3 sentences
  • ≤60 chars
  • Up to 1 emoji
🧊

Senpai

Aloof ice-queen, one line lands like a slap

“What were you thinking when the alarm went off.”
  • Economical
  • No filler words
  • 1-2 sentences
  • ≤40 chars
  • Short rhetorical question

Core mechanisms

Emotional contrast + safety rails + real facts, so discipline stops relying on raw willpower

😈

AI-persona contrast feedback

Bro is sharp-tongued but soft-hearted; senpai lands one line like a slap. Emotion ratios switch by state: praise is 60% warmth + 30% humor, roast is 70% jab + 20% veiled care. No rewards, no self-blame; contrast drives discipline.

🛡️

Protection mode has a floor

Three consecutive misses force-switch to pure encouragement at 80%. Minors (under 18) get forced kind-only mode throughout. Roasts target behavior, never identity. A local BANNED_WORDS array plus Doubao API content filtering double up.

🔄

Clean-streak wipe

Seven consecutive hits auto-clear the failed records for that goal, leaving room for a comeback narrative. Failure is not the end: sustained consistency erases the black history.

📱

PWA offline check-in

A Service Worker with multi-strategy caching plus a localStorage queue buffers check-ins offline and reconciles automatically on reconnect. Dashboard triggers replayQueue() on launch.

🔔

Web Push reminders

Get check-in reminders and failure pings with the tab closed. VAPID + Service Worker + subscription API form the full chain; Vercel Cron triggers scheduled pushes.

📊

Multi-goal weekly report

A 7-day report page with week navigation and multi-goal aggregation. html-to-image screenshot sharing goes through Web Share API. Weekly reports auto-generate and failed check-ins auto-mark via /api/cron.

Three steps to use FlagBreaker

From raising a flag to wiping failure records: the shortest path through one cycle

  1. 01

    Raise a flag

    A 3-step wizard sets the goal: pick a type (early rise / fitness / study), set difficulty (easy / medium / hard), write a description. Goals are editable and soft-deletable.

  2. 02

    Check in

    Each day ✅ done or ❌ missed, with optional reflection. Offline check-ins queue locally and reconcile on reconnect. Skip a rest day without breaking the streak.

  3. 03

    AI feedback

    Persona-driven contrast feedback: praise or roast. Three consecutive misses auto-switch to pure-encouragement protection mode; seven consecutive hits wipe failure records. Share screenshots via Web Share.

Protection mode: roasting has a floor

Three consecutive misses force-switch to pure encouragement; minors (<18) get kind-only mode end to end; roasts target behavior, never identity

🛡️

3 consecutive misses → forced pure encouragement

PROTECTION_MODE_THRESHOLD = 3. Roast intensity drops to 20% with 80% encouragement and one mandatory positive line. Re-decided in backend doubao.ts, not trusted to the AI.

🧒

Minors (<18) → forced kind-only throughout

MINOR_AGE = 18. The settings page disables the roast toggle; the backend forces the kind-only path and the client cannot bypass it.

🚫

Roasts target behavior, never identity

Forbidden from saying "you are useless" or "you are a failure". No appearance, weight, intelligence, family, origin, illness, gender, sexual orientation, religion, or race.

🔍

Double sensitive-word filtering

Doubao API content filtering plus a local BANNED_WORDS array of 14 words as a second pass. Better to over-block than to let one through.

📝

Auditable logs

Every AI reply is written to ai_feedback_logs with a consecutive_fail snapshot, so protection mode can be verified after the fact.

Frequently Asked Questions

Key questions on personas, roast boundaries, minor protection, and offline check-in

What is FlagBreaker?

FlagBreaker is an AI-persona-supervised self-discipline app: finish your goal and the AI cheers; miss it and the AI roasts you. The core driver is emotional contrast, not cold reminders or self-blame. It ships two AI personas, bro (your sharp-tongued buddy) and senpai (an aloof ice-queen), each with its own System Prompt and Few-Shot samples. Built on Next.js 14 + Supabase + Doubao API (Volcano Ark), with PWA offline check-in and Web Push reminders.

How do the two AI personas differ?

Bro is your long-time friend: colloquial, net-native, fast and punchy, occasionally dropping "hey man" to close the distance; replies are 1-3 sentences, max 60 chars. Senpai is a detached older-woman character, economical with words, 1-2 sentences max 40 chars, no filler words or memes, using one short rhetorical question to make you reflect. Both share the same feedback decision tree and compliance red lines.

How does AI feedback decide what to say? Is it random?

Not random. A strict decision tree applies: first success triggers exaggerated praise; 3+ days of consecutive success upgrades the praise; a comeback after a miss highlights the comeback; two consecutive misses trigger moderate roasting; 3+ consecutive misses force protection mode (80% encouragement + 20% roast with one positive line); first miss or easy-goal miss gets light roast. Emotion ratios are fixed too: praise mode is 60% warmth + 30% humor + 10% earnest encouragement.

What is protection mode and when does it trigger?

Protection mode triggers after 3 consecutive days of missing a goal (PROTECTION_MODE_THRESHOLD): the AI drops roast intensity to 20% and adds 80% encouragement, with one mandatory positive line. It is re-decided in the backend doubao.ts, not trusted to the AI itself. Minors (under MINOR_AGE=18) get forced kind-only mode throughout, with roasting disabled. The check lives on the backend and cannot be bypassed from the client.

Will the AI insult me? Any compliance risk?

It never attacks identity. The AI is forbidden from saying "you are useless" or "you are a failure", and from touching appearance, weight, intelligence, family, origin, illness, gender, sexual orientation, religion, or race. Roasts target behavior, never the person. The Doubao API does content filtering on its side; persona.ts adds a BANNED_WORDS array as a second filter (14 words). Every AI reply is written to ai_feedback_logs with a consecutive_fail snapshot for audit.

What is the clean-streak mechanism?

Seven consecutive days of hitting a goal (CLEAN_STREAK_DAYS) auto-wipes the failed records for that goal, giving the user psychological room to restart. It is a comeback narrative: failure is not the end, sustained consistency erases the black history.

What goal types are supported? Can I customize?

MVP ships 3 goal types: early_rise, fitness, study. Each has 3 difficulty levels: easy (miss it and you get roasted hard), medium (normal intensity), hard (the AI understands if you miss). Check-in has 3 states: success, failed, skipped (rest day). Custom goal types are planned for P1.

Can I check in offline? Will I lose data?

Yes. A PWA Service Worker with multi-strategy caching plus a localStorage offline queue (offlineQueue.ts) buffers check-ins while offline; once back online, /api/checkin/sync reconciles automatically. Dashboard triggers replayQueue() on launch. Web Push notifications are independent of the open tab; you still get reminders and failure pings with the tab closed.

How is FlagBreaker different from Forest, TickTick, or Keep?

Forest relies on positive tree-growing incentives and does not address flag failures. TickTick is a task manager with no AI feedback. Keep is a fitness content community, not a supervision tool. FlagBreaker’s core differentiation is AI-persona contrast companionship: a sharp-tongued buddy or an ice-queen senpai driving discipline through emotional contrast, avoiding shame and social death. Protection mode keeps the roast above a floor; minors get forced kind-only mode.

Is my data safe? Can others see my check-ins?

Supabase PostgreSQL has Row Level Security (RLS) on every table: users can only read and write their own rows. CSP and HTTP security headers (X-Frame-Options: DENY, X-Content-Type-Options: nosniff, etc.) are set in next.config.js. Every API route validates input with Zod. /api/checkin is rate-limited to 10/60s, /api/ai-feedback to 5/60s via a sliding-window algorithm. Server-side keys like ARK_API_KEY and CRON_SECRET never carry the NEXT_PUBLIC_ prefix and are never exposed to the browser.

Stop letting your flags fall on the floor

Let a sharp-tongued, soft-hearted AI buddy stare you down until today’s job is done