The Haunted Thread - Hackathon Submission

Inspiration

I've always been fascinated by the intersection of horror and community storytelling. Growing up, I loved "Choose Your Own Adventure" books, but I always wondered: what if the choices weren't just mine? What if an entire community could shape the narrative together?

When I saw the Reddit x Kiro Hackathon announcement, I knew this was my chance. Reddit's community-driven nature is perfect for collaborative storytelling, and the challenge of building something polished in just 16 days was exactly the kind of creative constraint I thrive under.

But here's the thing—I've built projects before where I jumped straight into code, only to realize halfway through that my architecture was a mess, my patterns were inconsistent, and I'd forgotten half the features I wanted to include. I needed a different approach. That's when I discovered Kiro's spec-driven workflow, and honestly, it changed everything.

What it does

The Haunted Thread is a multiplayer horror experience where Reddit communities collectively write a terrifying story through democratic voting. Here's how it works:

For Players:

  • You stumble upon a mysterious Reddit post—an old thread that shouldn't exist
  • Read the current chapter of the unfolding horror story
  • Vote on one of three choices that determine what happens next
  • Watch in real-time as other community members cast their votes
  • Experience the winning choice unfold in the next chapter
  • Multiple story paths lead to different endings—some escape the horror, others... don't

Technical Features:

  • Real-time voting with WebSocket updates—see votes change live
  • Story branching system with predefined narrative paths and dynamic generation
  • Redis-powered state management for handling hundreds of concurrent users
  • Admin controls for story management and voting resets
  • Content moderation tools for community safety
  • Mobile-responsive horror UI with atmospheric effects and animations
  • Optimistic updates so your vote feels instant
  • Polling fallback when WebSockets aren't available
  • Error recovery that handles network issues gracefully

The game creates genuine tension because you're not just reading a story—you're part of a community deciding its fate. Will you investigate the mysterious sound? Hide and observe? Try to escape? The community decides, and everyone experiences the consequences together.

How we built it

This is where Kiro absolutely transformed my development process. I'm not exaggerating when I say it turned what would have been a chaotic 16-day sprint into a structured, enjoyable development experience.

The Kiro Workflow

Day 1-2: Requirements & Design (2 hours instead of 3 days)

Instead of jumping into code, I started with a conversation. I told Kiro: "I want to build a community-driven horror story where votes shape the narrative."

Kiro didn't just nod and say "cool idea." It asked the right questions:

  • How do users vote? What prevents duplicate votes?
  • How does story progression work? Who triggers chapter transitions?
  • What happens if voting ends in a tie?
  • How do you handle users joining mid-story?
  • What about content moderation?

Within minutes, Kiro generated a complete requirements document with 12 user stories in EARS format (Easy Approach to Requirements Syntax). Each requirement had acceptance criteria, edge cases, and success metrics. Things I would have forgotten until they became bugs.

Then came the design phase. Kiro analyzed the requirements and created a complete architecture:

  • Redis schema for voting and state management
  • WebSocket strategy for real-time updates
  • Story progression engine with branching logic
  • Error handling patterns
  • Testing strategy

All documented before I wrote a single line of code.

Day 3-4: Implementation Planning

Kiro broke the design into 40+ actionable tasks. Not vague todos like "implement voting"—specific, ordered, buildable chunks:

  • "Create Redis-based voting manager with transaction support"
  • "Implement optimistic updates for instant vote feedback"
  • "Add WebSocket reconnection with exponential backoff"

Each task referenced the exact requirements it fulfilled. No guessing. No scope creep.

Day 5-14: Development (With Steering Rules)

Here's where Kiro's "steering rules" became my secret weapon. I documented our tech stack, project structure, and coding patterns once in .kiro/steering/. From that point on, Kiro remembered everything:

  • When I asked for a new feature, it automatically followed our established patterns
  • Redis key naming stayed consistent across 50+ files
  • Error handling used the same approach everywhere
  • API endpoints followed the same structure
  • No context switching between sessions

I could stop coding at midnight, come back the next morning, and Kiro would pick up exactly where we left off—with full context of the entire project.

Day 15-16: Polish & Testing

Because the architecture was solid from day one, polish wasn't about fixing technical debt—it was about making the experience delightful:

  • Custom horror-themed UI with atmospheric effects
  • Smooth transitions and animations
  • Comprehensive error messages
  • Admin tools for story management
  • Mobile responsiveness

The Tech Stack

  • Devvit Web - Reddit's developer platform
  • React + TypeScript - Type-safe UI components
  • Express.js - Server-side API
  • Redis - State management and voting
  • WebSockets - Real-time updates
  • Vite - Lightning-fast builds
  • Kiro - The development partner that made it all possible

Challenges we ran into

Challenge 1: Real-time Voting at Scale

The first version of my voting system had a race condition. Multiple users could vote simultaneously, and Redis would get confused. I spent hours debugging until I realized I needed Redis transactions.

Kiro helped me implement the solution using WATCH and MULTI commands, ensuring atomic operations. But more importantly, it helped me document the pattern in our steering rules so every future feature would use the same approach.

Challenge 2: WebSocket Reliability

Reddit's WebSocket service would occasionally disconnect. Users would see "Connecting..." flash on screen constantly—terrible UX.

Kiro helped me design a multi-layered solution:

  • Silent reconnection attempts with exponential backoff
  • Polling fallback when WebSockets fail
  • Optimistic updates so votes feel instant
  • Only show connection status when there's actually a problem

The result? Users don't even notice when WebSockets are struggling.

Challenge 3: Story Branching Complexity

I wanted predefined story branches for quality, but also dynamic generation for flexibility. How do you balance both?

Kiro helped me architect a StoryContentManager that:

  • Checks for predefined branches first
  • Falls back to dynamic generation
  • Maintains narrative continuity either way
  • Tracks which paths lead to which endings

The system is elegant because we designed it before implementing it.

Challenge 4: Keeping Context Across Sessions

This is where Kiro truly shined. In past projects, I'd forget why I made certain decisions. I'd rewrite code I'd already written. I'd break patterns I'd established.

With Kiro's specs and steering rules, every decision was documented. Every pattern was codified. I could stop mid-feature, sleep, and resume the next day with zero context loss.

Accomplishments that we're proud of

1. Zero Technical Debt

This is huge. Usually, hackathon projects are held together with duct tape and prayers. The Haunted Thread has clean architecture, consistent patterns, and comprehensive error handling. Why? Because Kiro helped me design it right from the start.

2. Living Documentation

The .kiro folder in my repo isn't just documentation—it's the story of how this project came to be:

  • requirements.md - Every feature, every edge case
  • design.md - Complete architecture with rationale
  • tasks.md - Implementation roadmap with requirement traceability
  • steering/ - Project DNA that guided every decision

Future developers (including future me) can understand this codebase instantly.

3. Real Community Play

This isn't a single-player game with a leaderboard tacked on. It's genuinely multiplayer:

  • Votes happen in real-time
  • Everyone sees the same story unfold
  • Community decisions have weight
  • The experience is shared, not parallel

4. Production-Ready Polish

Custom splash screen. Mobile-responsive design. Comprehensive error handling. Admin tools. Content moderation. This isn't a prototype—it's ready to ship.

5. The Kiro Workflow Itself

I didn't just build a game. I discovered a development methodology that I'll use for every project going forward. Spec-driven development with Kiro isn't just faster—it's smarter.

What we learned

About Development:

  1. Design before code isn't slower—it's faster. Those 2 hours of planning with Kiro saved me days of refactoring.

  2. Context switching is expensive. Steering rules eliminated it entirely. Every session started with full context.

  3. Documentation isn't a chore when it's part of the process. Kiro made documentation natural, not an afterthought.

  4. Patterns matter more than code. Consistent patterns across 50+ files made the codebase feel cohesive, not chaotic.

  5. AI partnership > AI assistance. Kiro didn't just write code—it helped me think through problems, anticipate edge cases, and maintain architectural coherence.

About Kiro Specifically:

  1. Specs are living documents. They evolved as the project evolved, always staying in sync with reality.

  2. Steering rules are force multipliers. Write your patterns once, benefit forever.

  3. Task breakdown is an art. Kiro's ability to break complex features into discrete, testable chunks was invaluable.

  4. Requirements prevent bugs. So many potential issues were caught in the requirements phase, before they became code.

  5. The .kiro folder is your project's memory. It remembers everything so you don't have to.

About Community Play:

  1. Shared experiences create engagement. Players aren't just playing—they're part of something bigger.

  2. Real-time updates matter. Seeing votes change live creates tension and excitement.

  3. Horror works in text. You don't need graphics to create atmosphere—good writing and pacing are enough.

  4. Community decisions are unpredictable. Players will surprise you. Design for flexibility.

What's next for The Haunted Thread

Short-term (Post-Hackathon):

  1. More Story Branches - Expand from 3 endings to 10+, each with unique narrative paths

  2. User-Generated Content - Let communities create their own horror stories with a story editor

  3. Achievement System - Track which endings players have discovered, encourage exploration

  4. Story Replay - Let users revisit past chapters and see alternate paths

  5. Enhanced Moderation - AI-powered content filtering for user-generated stories

Long-term Vision:

  1. Story Marketplace - Let creators publish and monetize their horror stories

  2. Collaborative Writing - Multiple authors can contribute to the same story universe

  3. Cross-Community Events - Multiple subreddits experience the same story simultaneously

  4. Adaptive Difficulty - Story branches adjust based on community engagement levels

  5. Voice Acting Integration - Partner with voice actors for audio narration

  6. Mobile App - Native iOS/Android experience with push notifications for chapter updates

The Kiro Workflow Evolution:

I'm also planning to open-source my Kiro workflow as a template for other developers:

  • Starter steering rules for common project types
  • Requirement templates for different features
  • Task breakdown patterns
  • Best practices documentation

Because honestly? This workflow is too good not to share.

Community Growth:

The real goal is to see The Haunted Thread become a platform where Reddit communities create their own horror experiences. Imagine:

  • r/nosleep running official community stories
  • r/horror hosting monthly story events
  • r/WritingPrompts using it for collaborative fiction
  • Niche communities creating genre-specific experiences

Technical Improvements:

  • Performance optimization - Handle 10,000+ concurrent voters
  • Analytics dashboard - Show story path statistics and popular choices
  • A/B testing - Let authors test different narrative approaches
  • Internationalization - Support multiple languages
  • Accessibility - Screen reader support, high contrast mode

Final Thoughts

Building The Haunted Thread taught me that the best tools don't just make you faster—they make you better. Kiro didn't write this project for me. It helped me think through problems more clearly, design more thoughtfully, and execute more consistently.

The .kiro folder in my repo isn't just documentation—it's proof that spec-driven development works. Every requirement, every design decision, every implementation task is traceable. Future developers (including future me) will thank past me for taking the time to do it right.

And honestly? I had fun. Building with Kiro felt less like grinding through a hackathon and more like collaborating with a thoughtful partner who always remembered the context, always asked the right questions, and always helped me see the bigger picture.

That's not AI assistance. That's AI partnership.


Built with Kiro. Powered by Community. Shaped by Nightmares. 👻


"Your choices shape the nightmare..."

Built With

Share this project:

Updates