# Hydra: Launch Readiness by Epic
**For:** Tyler
**Purpose:** Each section below is a Linear epic. Mark status and give days to production-ready. This becomes the roadmap.

Known gaps (Stripe, Jira, onboarding, pricing page, Marketplace listing) are listed with a days field only -- we know they're not built.

---

## Epic 1: Billing and Tier Enforcement
*Not built. Days to production-ready:*

Covers: Stripe account setup, products and prices, Checkout flow, webhook handlers (payment confirmed, subscription updated, cancelled), tier state in DB, Free tier counters (fix/cycle/doc run), repo limit enforcement, feature gating by tier, Customer Portal, upgrade prompt UI, billing settings page.

**Days:**

---

## Epic 2: Core Product
*Status and days for each layer:*

| Layer | What it covers | Status | Days |
|---|---|---|---|
| Discovery | Codebase read, .hydra/ generation, hydra.md, CLAUDE.md patching, PR creation | | |
| Audit (3-step) | Deterministic scanner, parallel agents, Opus meta-review, weighted output | | |
| Fix execution | Baseline tests, code change, post-fix audit, PR creation, Linear ticket close on merge | | |
| Improve / Kaizen | Improvement loops, Git worktrees, budget and exit conditions | | |
| Govern | PR review on push/PR events, living comment, GitHub check run, merge blocking | | |
| Self-improvement | Pattern generation, tenant pattern library, global contribution, false positive deactivation | | |
| Context injection | Freeform Notes, Related Repos | | |

---

## Epic 3: GitHub App
*Status and days:*

| Capability | Status | Days |
|---|---|---|
| Webhook events handled: install, push, PR opened, PR merged | | |
| PR creation via GitHub API | | |
| Check run creation and update (pass / fail) | | |
| PR comment creation and update (living comment) | | |
| GitHub Marketplace listing (published, installable) | | |

**Days (total):**

---

## Epic 4: Linear Integration
*Status and days:*

| Capability | Status | Days |
|---|---|---|
| OAuth / API key auth for new tenants | | |
| Issue creation (title, description, severity, labels) | | |
| Issue closure on PR merge | | |
| Cycle read (pick up issues from active cycle) | | |
| Cycle execution (full loop: issue to fix to PR to close) | | |

**Days (total):**

---

## Epic 5: Jira Integration
*Not built. Days to production-ready:*

Covers: OAuth 3LO, issue creation, issue closure via workflow transition, issue read for fix execution.

**Days:**

---

## Epic 6: Business Tier Features
*Status and days for each:*

| Feature | Status | Days |
|---|---|---|
| Custom agent rules (Team) | | |
| Priority fix queue (Business) | | |
| Audit logs (Business) | | |
| Usage reporting (Business) | | |

---

## Epic 7: Enterprise Features
*Status and days for each:*

| Feature | Status | Days |
|---|---|---|
| SSO / SAML | | |
| RBAC | | |
| VPC deployment | | |
| Custom model config (see note) | | |
| Compliance reporting | | |
| Global contribution controls | | |

*Custom model config — Tyler note (2026-05-01):* Before shipping multi-model support (Anthropic + OpenAI), run an A/B test on audit quality. If OpenAI models produce meaningfully worse audit results, do not allow them — poor outputs reflect on Hydra, not on the model provider. Quality gate must pass before this ships.

---

## Epic 8: Self-Service Onboarding
*Not built. Days to production-ready:*

Covers: install flow a stranger can complete, repo selection guidance, discovery progress feedback, first fix trigger, target under 10 minutes from install.

**Days:**

---

## Epic 9: Production Infrastructure
*Status and days:*

| Item | Status | Days |
|---|---|---|
| Running on production infra 24/7 (not local) | | |
| Deployment pipeline | | |
| Monitoring and alerting | | |
| Handles concurrent tenants without degradation | | |

---

## Epic 10: Security and Multi-Tenancy
*Status and days:*

| Item | Status | Days |
|---|---|---|
| Tenant data isolation (org A cannot access org B) | | |
| API keys encrypted at rest | | |
| Customer code handling within model provider terms | | |

---

## Epic 11: External Surfaces
*Not built. Days to production-ready:*

Covers: pricing page, Terms of Service, Privacy Policy.

**Days:**

---

## Summary

**Total days across all epics:**

**Critical path (what blocks everything else):**

**Biggest risk to the estimate:**
