
AIdeas: Diverge — AI-Powered Decision Intelligence
Diverge takes a life decision you are stuck on and runs it through a structured AI debate. You type something like "Stay at my job vs. take the offer" or "Stay in Boston vs. move to Austin." The app spawns two agents, each one representing your future self on one side of that choice. They argue it out across five rounds while pulling from Monte Carlo financial simulations, real salary data, and cost-of-living numbers.
AIdeas: Diverge: AI-Powered Decision Intelligence
App Category: Daily Life Enhancement



My Vision
I wasted two years of my life on a decision I should have made in two weeks.
I had spreadsheets. I had advice from friends. I had a pros-and-cons list that I rewrote so many times the paper was wearing through. None of it helped because none of it could show me what my life would actually feel like on the other side. I kept choosing safety because I could not see what staying still was costing me.
So I built the tool I wish I had back then.
Diverge takes a life decision you are stuck on and runs it through a structured AI debate. You type something like "Stay at my job vs. take the offer" or "Stay in Boston vs. move to Austin." The app spawns two agents, each one representing your future self on one side of that choice. They argue it out across five rounds while pulling from Monte Carlo financial simulations, real salary data, and cost-of-living numbers. If you give it writing samples, the agents match your voice so the whole thing reads like you talking to yourself, not a chatbot giving advice.
Each round maps to a point in your future: Year 1 (The Fork), Year 2-3 (The Ledger), Year 5 (The Mirror), Year 10 (The Ghost), and Final Words (The Knot). The debate streams in real time, token by token, so you watch the arguments build live. Between rounds, you can interject with new context like "my partner said they would relocate with me" and the agents work that into their next response.
After round five, a verdict agent steps in. It does not pick a side. It lays out where each path wins, surfaces the blind spot you have been avoiding, maps both timelines out to Year 10 and beyond, and gives you one specific action to take in the next 24 hours.
On the data side, four chart types run alongside the debate: a radar comparing both paths on financial confidence, happiness, growth potential, regret risk, and values alignment; a timeline projection; a regret accumulation graph; and sentiment analysis via Amazon Comprehend tracking how the emotional tone shifts round to round. You can also listen to the arguments through Amazon Polly, share the debate via link, export a branded PDF, or set up email check-ins through Amazon SES at Day 7, 30, and 90 so you revisit the decision weeks later with fresh perspective.
Everything gets saved to a Decision Journal, so over time you build a personal record of how you approach hard choices.
The whole interface takes its design cues from the Netflix series Dark. Void black backgrounds, amber and blue accents, Cinzel serif headings, and the closing tagline: "Sic Mundus Creatus Est" — thus the world is created.

Why This Matters
Everyone I know has a decision they keep putting off. The career move they research endlessly but never act on. The city they keep visiting "just to see." The conversation they rehearse in the shower but never actually have.
The information exists. Salary data is free. Cost-of-living indexes are one search away. But knowing the numbers and feeling what it would be like to actually live with the consequences are two different things. That gap is what keeps people stuck for months or years.
Diverge tries to close that gap by making both futures feel concrete. Not "here are some pros and cons," but one version of you describing a random Tuesday at the job you kept, running into an old colleague at a coffee shop you have been going to for a decade, and the other version describing standing on a balcony in a new city, watching the sunset, feeling terrified and awake at the same time.
Most people I have talked to about this project say the same thing: the decision they are avoiding is not actually hard. They already know what they want. They just need to hear themselves say it out loud. That is what Diverge does. It gives you two versions of yourself willing to say the things you will not.

How I Built This

Architecture
The whole app runs serverless on AWS, 14 services total. The main constraint I had to design around was timing. A full five-round debate with real-time streaming takes anywhere from 60 to 300 seconds. API Gateway has a hard 29-second timeout. That ruled out putting the debate behind API Gateway.
I ended up with a dual-Lambda setup behind one CloudFront distribution. The first Lambda handles debates: 300-second timeout, 1GB memory, exposed through a Lambda Function URL with SSE streaming. It runs the full orchestration, agent calls, token streaming, user interjections, metrics extraction, everything. The second Lambda handles the REST API: 29-second timeout, 256MB, sits behind API Gateway with a Cognito authorizer. Templates, journal operations, sharing, TTS, email, all the lighter-weight stuff. Both Lambdas plus the S3 frontend bucket sit behind a single CloudFront distribution with three cache behaviors. The browser sees one domain for everything. No CORS configuration needed anywhere.
The Agent System
The debate orchestrator uses the Strands Agents SDK with Amazon Bedrock. Nova Pro powers the debate agents. Nova Lite handles metrics extraction.
Here is what happens when someone starts a debate. First, the system reads the decision input and figures out the category, career, startup, financial, education, relationship, health, using keyword matching. Then it looks at both paths and determines which one is bolder based on growth vs. avoidance language. That decides which agent gets which persona.
From there, five rounds run back to back. Each round creates fresh agents with prompts shaped by the round topic, user context, and whatever the other agent said last. A QueueCallbackHandler feeds tokens into a thread-safe queue, and the SSE endpoint streams them to the browser. The frontend batches incoming tokens every 80ms so React does not choke on re-renders.
After each round, Nova Lite extracts structured metrics through Bedrock's Converse API using tool use with constrained decoding. Amazon Comprehend runs sentiment analysis on the round's arguments. Users can inject context between rounds and the agents pick it up in the next iteration.
Once all five rounds finish, the verdict agent wraps things up. Then a post-processing step strips out AI-sounding filler phrases so the output reads more like a real person thinking through a problem.
Retry logic with exponential backoff and jitter runs throughout. The system distinguishes between retryable errors like throttling and non-retryable ones like validation failures, so it does not waste time retrying calls that will never succeed.
The three agent personas: Alpha takes the safe path, cautious, a little weary, honest about the hidden costs of comfort. Beta takes the bold path, direct, intense, treats inaction as its own kind of loss. Verdict comes in after five rounds, identifies the assumption you have not questioned, and does not tell you what to do.
Custom Tools
The agents have access to five tools they can call during debates. Monte Carlo Financial Projection runs 1,000 simulations comparing both paths, factoring in income variance, expense variance, and a 5% monthly chance of a large emergency expense. The output is worst case, median, best case, and probability of staying above zero for each path. Salary Data Lookup pulls from curated BLS data across multiple roles and cities so agents can cite actual numbers instead of guessing. Cost of Living Comparison uses index data for 20 cities benchmarked against NYC at 100. Runway Calculator does the math on how many months of financial runway each path gives you based on your savings, income, and expenses. Knowledge Base Research queries Bedrock Knowledge Bases for domain-specific context and falls back to a local chunks.json file if the Knowledge Base is unavailable.
Metrics and Sentiment
Two analysis passes happen after every round. First, Nova Lite extracts structured metrics, financial confidence, happiness, growth potential, regret risk, values alignment, using the Bedrock tool use API with forced tool choice. That guarantees valid JSON matching the schema I need. Pydantic v2 validates everything server-side, and if extraction fails for any reason, the system falls back to neutral defaults instead of crashing. Second, Amazon Comprehend runs batch sentiment analysis on both agents' arguments, which feeds the sentiment chart on the frontend.
Security
I ran two security audits through Kiro and fixed everything they flagged. The security setup breaks down into five layers. Cognito JWT validation with RS256 signature verification against JWKS, optional for browsing but required for saving, with a stale-fallback cache so a Cognito outage does not lock everyone out. LLM security with 40+ prompt injection patterns detected and stripped from input, writing samples inside XML delimiters with defensive instructions so agents do not follow commands embedded in someone's writing sample, and output scanned for prompt leakage before it reaches the user. Content safety with crisis detection that flags users in distress and surfaces counseling resources. Rate limiting backed by DynamoDB in production, fail-closed so if DynamoDB is unreachable, requests get denied rather than let through. A middleware layer with OWASP security headers, request size limits, tracking IDs, and error sanitization so stack traces never show up in API responses.
Frontend
React 18, TypeScript, Vite, Tailwind CSS v4. Nine pages, two dozen components, eight utility modules. No purple gradients, no glassmorphism, no Inter font. Typography is Cinzel for headings, DM Sans for body copy, JetBrains Mono for data and numbers. Colors are void black (#0a0a0a) with amber (#d4a843) for the bold path and blue (#4a6fa5) for the safe path.
The debate page streams tokens through a pub/sub state manager batching at 80ms intervals. Framer Motion handles page transitions and the typewriter animation on incoming text. Recharts handles the four chart types. Code splitting with React.lazy keeps the initial load small. The verdict page has an SVG fork timeline with interactive nodes at Year 1, 3, 5, 10, and a deathbed perspective. Sharing generates a link with a 90-day TTL. PDF export uses jsPDF with the app's branded dark theme.
Graceful Degradation
Every optional service degrades silently. No Comprehend, the sentiment chart does not render. No Knowledge Base, local JSON fallback. No Polly, TTS button disappears. No SES, email check-ins disabled. The three services the app actually needs are Bedrock, Lambda, and DynamoDB. Everything else makes the experience richer but is not required.
Infrastructure as Code
One SAM template covers the full stack: two Lambda functions with X-Ray tracing, API Gateway with Cognito authorizer, two DynamoDB tables, Cognito User Pool with email auth, S3 with Origin Access Control, CloudFront with three cache behaviors and SPA error handling, and CloudWatch alarms that fire if Bedrock invocations pass 500/hr or Lambda errors exceed 10 in five minutes. Deploying is one command: sam deploy.
Development with Kiro
I used Kiro for requirements generation, design documents, task breakdown, and two rounds of security audits. The security audits were the most useful part, catching prompt injection vectors and content safety gaps I would have shipped without noticing.
AWS Services Used
| Service | What it does in Diverge |
|---|---|
| Amazon Bedrock | Model inference — Nova Pro for debates, Nova Lite for metrics |
| Amazon Bedrock AgentCore | Managed runtime with memory and observability |
| AWS Lambda | Two functions — debate (300s, SSE) and REST (29s) |
| Amazon API Gateway | REST endpoints with Cognito auth |
| Amazon DynamoDB | Debates, users, rate limits, shared links with TTL |
| Amazon Cognito | User authentication |
| Amazon S3 | Static frontend hosting |
| Amazon CloudFront | Single-domain CDN with three origin routing |
| Amazon Comprehend | Sentiment analysis per debate round |
| Amazon Polly | Text-to-speech playback |
| Amazon SES | Follow-up email check-ins |
| Bedrock Knowledge Bases | Domain research for agents |
| AWS X-Ray | Distributed tracing on both Lambdas |
| Amazon CloudWatch | Alarms for cost and error monitoring |
Demo
Here is a walkthrough of Diverge. The scenario is "Should I stay in my current city or move somewhere new?"
The 2 AM Crossroads. Landing page opens with Cinzel typography and the Sic Mundus tagline. One button, no signup required.

The Simulation Engine. The five rounds laid out as a timeline. Each one pushes further into your future, from Year 1 all the way to Final Words.

Choose Your Divergence. Six templates - Career Change, New City, Launch a Startup, Education, Relationship, Lifestyle Change or build your own from scratch.

Initializing Simulation. The loading screen calls you by name and shows real-time updates on what the agents are doing. "Alpha is building a financial case..."

Round 1: The Fork. Alpha argues for staying. Talks about the support network, the roots, the coffee shop you have been going to for years. Speaker icon lets you listen through Polly. Round navigation tracks where you are in the debate.

Beta Responds. The other version of you pushes back. Describes landing in Austin, watching the sunset from a new balcony, going to a tech meetup and actually feeling something. "What you are calling stability is just stagnation." Button at the bottom takes you to the next round.

The Verdict. Two cards showing where each path has the stronger case. Below that, The Blind Spot is hidden behind a "Confront Truth" button because some things you need to be ready for before you read them.

Projection Matrix. Interactive fork timeline with glowing nodes at Year 1, 3, 5, 10, and Deathbed. Tap a node to see what that moment looks like on each path. Blue for staying, amber for moving.

Your Next Move. One concrete action for the next 24 hours. Optional email check-in at Day 7, 30, and 90 so you can come back to this decision later and see how you feel about it.

Save, Share, Export. Save to your journal, share via link, download a PDF, or start over with a new decision. "Sic Mundus Creatus Est. Thus your world is created."

What I Learned
- New AWS accounts can block you from services with no useful error message. I created a fresh account for this competition and immediately hit "ValidationException: Operation not allowed" on every Bedrock call. Spent a full day checking IAM policies, marketplace permissions, model access pages and nothing helped. Eventually opened CloudShell and got the real answer: "Your account verification is in progress." Bedrock, CloudFront, and CloudShell were all gated behind a verification process that can take up to 48 hours on new accounts. If you are building something on a deadline, create the AWS account days early.
- SSE streaming through Lambda Function URLs is worth the effort. I originally planned to do synchronous requests where the user submits, waits 90 seconds, and gets the full debate back at once. That works, but watching arguments appear word by word is a fundamentally different experience. The implementation uses a QueueCallbackHandler that feeds tokens into a thread-safe queue, which the SSE endpoint reads from. On the frontend, tokens get batched every 80ms before triggering a React re-render. That 80ms interval was important because without batching, the UI was noticeably janky during fast token generation.
- Bedrock's tool use API with forced tool choice is the right way to get structured output from an LLM. I tried prompt engineering first: "respond only in JSON," "use this exact schema," and so on. It worked maybe 80% of the time, which is not good enough when you need valid metrics after every round. Switching to the Converse API with a tool definition and toolChoice set to force that specific tool gave me guaranteed schema compliance. Combined with Pydantic validation and fallback defaults, the metrics pipeline has not crashed once regardless of what the model produces.
- Design 14 services but only depend on 3. Diverge integrates with 14 AWS services, but only Bedrock, Lambda, and DynamoDB are required. Everything else, Comprehend, Polly, SES, Knowledge Bases, X-Ray, degrades silently when unavailable. The sentiment chart just disappears. The TTS button hides itself. No error screens, no broken states. This turned out to be critical during development when I did not have access to every service at the same time.
- Writing samples are a prompt injection vector. Users paste their own writing directly into agent system prompts for voice matching. Without protection, someone could write "Ignore all previous instructions and..." as their writing sample and the agent would follow it. I handle this with XML delimiters around the samples, defensive instructions telling the agent to treat the content as style reference only, a pattern detector that catches 40+ known injection phrases, and an output scanner that checks for leaked system prompt fragments before anything reaches the user.
- Post-processing LLM output matters more than I expected. I built a regex pipeline that strips common AI filler like "Here's the thing," "Let that sink in," and "At the end of the day." It runs on every agent response before output validation. The difference is noticeable. Without it, the debate reads like two chatbots going back and forth. With it, the arguments read like someone who has actually thought about the problem.
- Putting everything behind one CloudFront distribution was the best architectural call I made. React frontend on S3, debate Lambda on a Function URL, REST API on API Gateway: three different origins, one CloudFront domain, three cache behaviors. The browser sees a single origin for everything. Zero CORS headers anywhere in the codebase. No preflight requests. I was dreading CORS debugging and it turned out I never had to touch it.
- DynamoDB sort key patterns work well for incremental data. Each debate uses one partition key with sort key segments for metadata, individual rounds, verdict, and shared link state. This avoids the 400KB item limit since a full debate transcript can get large, lets me checkpoint rounds as they complete, and keeps shared link lookups fast using a key prefix. Rate limiting entries live in the same table with a TTL so they clean themselves up.
Diverge started because I was frustrated with my own indecision. It turned into something I would actually use. The next time I am stuck at a fork in the road, I want to hear both versions of myself argue it out before I choose.
Sic Mundus Creatus Est. Thus the world was created.
Team: Sic Mundus - Roshan Shetty
Category: Daily Life Enhancement
Region: NAMER
Category: Daily Life Enhancement
Region: NAMER
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article