feat: Implement Phase 5 Quest System (100% complete)
Add YAML-driven quest system with context-aware offering:
Core Implementation:
- Quest data models (Quest, QuestObjective, QuestReward, QuestTriggers)
- QuestService for YAML loading and caching
- QuestEligibilityService with level, location, and probability filtering
- LoreService stub (MockLoreService) ready for Phase 6 Weaviate integration
Quest Content:
- 5 example quests across difficulty tiers (2 easy, 2 medium, 1 hard)
- Quest-centric design: quests define their NPC givers
- Location-based probability weights for natural quest offering
AI Integration:
- Quest offering section in npc_dialogue.j2 template
- Response parser extracts [QUEST_OFFER:quest_id] markers
- AI naturally weaves quest offers into NPC conversations
API Endpoints:
- POST /api/v1/quests/accept - Accept quest offer
- POST /api/v1/quests/decline - Decline quest offer
- POST /api/v1/quests/progress - Update objective progress
- POST /api/v1/quests/complete - Complete quest, claim rewards
- POST /api/v1/quests/abandon - Abandon active quest
- GET /api/v1/characters/{id}/quests - List character quests
- GET /api/v1/quests/{quest_id} - Get quest details
Frontend:
- Quest tracker sidebar with HTMX integration
- Quest offer modal for accept/decline flow
- Quest detail modal for viewing progress
- Combat service integration for kill objective tracking
Testing:
- Unit tests for Quest models and serialization
- Integration tests for full quest lifecycle
- Comprehensive test coverage for eligibility service
Documentation:
- Reorganized docs into /docs/phases/ structure
- Added Phase 5-12 planning documents
- Updated ROADMAP.md with new structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
247
docs/phases/Phase12-Launch.md
Normal file
247
docs/phases/Phase12-Launch.md
Normal file
@@ -0,0 +1,247 @@
|
||||
# Phase 12: Launch Preparation
|
||||
|
||||
**Goal:** Marketing, final polish, and public launch
|
||||
**Priority:** High
|
||||
**Status:** Not Started
|
||||
**Last Updated:** November 29, 2025
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Prepare for public launch with marketing materials, user documentation, payment integration, legal compliance, and final quality assurance.
|
||||
|
||||
**Key Goals:**
|
||||
- Marketing landing page
|
||||
- User documentation (how to play)
|
||||
- Payment integration (Stripe subscriptions)
|
||||
- Legal compliance (privacy policy, ToS)
|
||||
- Final security and performance review
|
||||
- Public launch
|
||||
|
||||
---
|
||||
|
||||
## Task Groups
|
||||
|
||||
### Marketing & Landing Page (4 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.1 | Design landing page | ⬜ | Hero, features, pricing, CTA |
|
||||
| 12.2 | Create landing page | ⬜ | `/public_web/templates/landing.html` |
|
||||
| 12.3 | Create marketing screenshots/videos | ⬜ | Gameplay screenshots, demo video |
|
||||
| 12.4 | Set up social media accounts | ⬜ | Twitter/X, Discord, Reddit |
|
||||
|
||||
**Landing Page Sections:**
|
||||
- Hero: Tagline, CTA, hero image
|
||||
- Features: AI DM, character creation, combat, quests
|
||||
- Pricing: Free, Premium, Elite tiers
|
||||
- FAQ: Common questions
|
||||
- Footer: Links, legal, social
|
||||
|
||||
**Deliverable:** Public-facing marketing presence
|
||||
|
||||
---
|
||||
|
||||
### User Documentation (3 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.5 | Write "How to Play" guide | ⬜ | Getting started, character creation, gameplay |
|
||||
| 12.6 | Write FAQ | ⬜ | Common questions and answers |
|
||||
| 12.7 | **Checkpoint:** Review documentation | ⬜ | Test with new user |
|
||||
|
||||
**Documentation Topics:**
|
||||
- Account creation
|
||||
- Character creation
|
||||
- Gameplay basics (story, combat, quests)
|
||||
- Subscription tiers
|
||||
- Troubleshooting
|
||||
|
||||
**Deliverable:** User-friendly documentation
|
||||
|
||||
---
|
||||
|
||||
### Payment Integration (4 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.8 | Set up Stripe account | ⬜ | Business account, test mode first |
|
||||
| 12.9 | Create subscription products | ⬜ | Free, Premium ($X/mo), Elite ($X/mo) |
|
||||
| 12.10 | Implement subscription endpoints | ⬜ | Create, cancel, webhook handling |
|
||||
| 12.11 | Create subscription management UI | ⬜ | Upgrade, downgrade, cancel |
|
||||
|
||||
**Subscription Tiers:**
|
||||
| Tier | Price | Features |
|
||||
|------|-------|----------|
|
||||
| Free | $0 | Basic gameplay, limited AI calls |
|
||||
| Premium | $X/mo | Unlimited AI, marketplace, multiplayer |
|
||||
| Elite | $X/mo | All features, priority support, exclusive content |
|
||||
|
||||
**Stripe Integration:**
|
||||
```python
|
||||
# Webhook endpoint for subscription events
|
||||
@app.route('/api/v1/webhooks/stripe', methods=['POST'])
|
||||
def stripe_webhook():
|
||||
event = stripe.Webhook.construct_event(...)
|
||||
if event['type'] == 'customer.subscription.updated':
|
||||
# Update user tier in database
|
||||
return '', 200
|
||||
```
|
||||
|
||||
**Deliverable:** Working payment system
|
||||
|
||||
---
|
||||
|
||||
### Legal Compliance (3 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.12 | Create Privacy Policy | ⬜ | Data collection, usage, GDPR compliance |
|
||||
| 12.13 | Create Terms of Service | ⬜ | User responsibilities, liability, refunds |
|
||||
| 12.14 | Add cookie consent banner | ⬜ | If using analytics/tracking cookies |
|
||||
|
||||
**Deliverable:** Legal compliance
|
||||
|
||||
---
|
||||
|
||||
### Analytics & Support (3 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.15 | Set up analytics | ⬜ | Privacy-friendly (Plausible, Fathom) or GA |
|
||||
| 12.16 | Set up support system | ⬜ | Email support, Discord, or ticketing |
|
||||
| 12.17 | Create support documentation | ⬜ | How to contact, response times |
|
||||
|
||||
**Deliverable:** User analytics and support
|
||||
|
||||
---
|
||||
|
||||
### Final Reviews (3 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.18 | Final security review | ⬜ | Penetration testing, OWASP check |
|
||||
| 12.19 | Final performance review | ⬜ | Load testing with expected traffic |
|
||||
| 12.20 | **Checkpoint:** Launch readiness check | ⬜ | All systems go |
|
||||
|
||||
**Launch Readiness Checklist:**
|
||||
- [ ] All features working
|
||||
- [ ] No critical bugs
|
||||
- [ ] Payment system tested
|
||||
- [ ] Legal pages in place
|
||||
- [ ] Monitoring active
|
||||
- [ ] Backups running
|
||||
- [ ] Support ready
|
||||
- [ ] Marketing ready
|
||||
|
||||
**Deliverable:** Launch-ready application
|
||||
|
||||
---
|
||||
|
||||
### Launch (2 tasks)
|
||||
|
||||
| Task ID | Task | Status | Notes |
|
||||
|---------|------|--------|-------|
|
||||
| 12.21 | Write launch announcement | ⬜ | Blog post, social media posts |
|
||||
| 12.22 | **LAUNCH!** | ⬜ | Go live, announce, celebrate! |
|
||||
|
||||
**Launch Day Checklist:**
|
||||
1. Final backup before launch
|
||||
2. Remove any beta/test restrictions
|
||||
3. Enable payment processing (live mode)
|
||||
4. Post announcement on all channels
|
||||
5. Monitor systems closely for first 24 hours
|
||||
6. Respond quickly to any issues
|
||||
|
||||
**Deliverable:** Public launch of Code of Conquest
|
||||
|
||||
---
|
||||
|
||||
## Files to Create/Modify
|
||||
|
||||
**New Files:**
|
||||
- `/public_web/templates/landing.html` - Marketing landing page
|
||||
- `/public_web/templates/pricing.html` - Pricing page
|
||||
- `/public_web/templates/legal/privacy.html` - Privacy policy
|
||||
- `/public_web/templates/legal/terms.html` - Terms of service
|
||||
- `/public_web/templates/docs/how-to-play.html` - User guide
|
||||
- `/public_web/templates/docs/faq.html` - FAQ
|
||||
- `/api/app/api/subscriptions.py` - Subscription endpoints
|
||||
- `/api/app/api/webhooks.py` - Stripe webhook handling
|
||||
- `/api/app/services/subscription_service.py` - Subscription logic
|
||||
|
||||
**Modified Files:**
|
||||
- `/api/app/__init__.py` - Register subscription routes
|
||||
- `/api/config/*.yaml` - Stripe configuration
|
||||
- `/public_web/templates/base.html` - Analytics, cookie consent
|
||||
|
||||
---
|
||||
|
||||
## Testing Criteria
|
||||
|
||||
### Payment Testing
|
||||
- [ ] Subscription creation works (test mode)
|
||||
- [ ] Subscription cancellation works
|
||||
- [ ] Webhooks received and processed
|
||||
- [ ] Tier changes reflected immediately
|
||||
|
||||
### Legal Review
|
||||
- [ ] Privacy policy covers all data practices
|
||||
- [ ] Terms of service protect business
|
||||
- [ ] Cookie consent compliant
|
||||
|
||||
### Final Testing
|
||||
- [ ] Load test passed
|
||||
- [ ] Security test passed
|
||||
- [ ] All features working end-to-end
|
||||
- [ ] New user can complete full flow
|
||||
|
||||
---
|
||||
|
||||
## Success Criteria
|
||||
|
||||
- [ ] Landing page live and attractive
|
||||
- [ ] User documentation complete
|
||||
- [ ] Payment system working (Stripe live)
|
||||
- [ ] Legal pages in place
|
||||
- [ ] Analytics tracking
|
||||
- [ ] Support system ready
|
||||
- [ ] Security review passed
|
||||
- [ ] Performance review passed
|
||||
- [ ] Successful public launch
|
||||
|
||||
---
|
||||
|
||||
## Dependencies
|
||||
|
||||
**Requires (from earlier phases):**
|
||||
- Beta testing complete (Phase 11)
|
||||
- All bugs fixed
|
||||
- Performance optimized
|
||||
|
||||
---
|
||||
|
||||
## Post-Launch Priorities
|
||||
|
||||
After launch, focus on:
|
||||
1. Monitor systems closely (first 48 hours critical)
|
||||
2. Respond to user feedback quickly
|
||||
3. Fix any launch-day bugs immediately
|
||||
4. Engage with community on Discord/social
|
||||
5. Track key metrics (signups, conversions, retention)
|
||||
|
||||
---
|
||||
|
||||
## Task Summary
|
||||
|
||||
| Group | Tasks | Checkpoints |
|
||||
|-------|-------|-------------|
|
||||
| Marketing & Landing Page | 4 | 0 |
|
||||
| User Documentation | 2 | 1 |
|
||||
| Payment Integration | 4 | 0 |
|
||||
| Legal Compliance | 3 | 0 |
|
||||
| Analytics & Support | 3 | 0 |
|
||||
| Final Reviews | 2 | 1 |
|
||||
| Launch | 1 | 1 |
|
||||
| **Total** | **19** | **3** |
|
||||
Reference in New Issue
Block a user