Skip to main content

Cycle 214: AI-Native Spec-Driven Development — Mintlify + PRDs + RFCs + Cycles

Priority: HIGH Status: DONE Domain: infra Wave: 10 Owner: @pj Dependencies: None Product: Flux — AI-native hiring platform Organization: Employ Inc. (employ-inc GitHub org)

Overview

Flux development currently relies on Cycle docs as the primary spec artifact. These docs are powerful — detailed architecture, file-level implementation plans, validation criteria — but the development process lacks formal separation between product requirements (what), architectural decisions (how), and implementation plans (build). There’s no structured way for PMs to own functional specs, no formal RFC process for engineering decisions, and no AI-native tooling to make specs consumable by coding agents. This cycle establishes a complete, AI-native spec-driven development process built on three pillars:
  1. PRDs (docs/PRDs/) — Product Requirements Documents. The PM-owned functional spec. Written in Mintlify’s web editor or directly in MDX. Every feature starts here.
  2. RFCs (docs/RFCs/) — Request for Comments. Engineering-owned non-functional specs: architecture decisions, performance requirements, security constraints, data model changes. Written by engineers in MDX.
  3. Cycle Docs (docs/roadmap/cycles/) — Implementation specs. The engineering plan derived from one or more PRDs/RFCs. Contains architecture, file index, validation plan, and maps to GitHub Project items for tracking.
Mintlify is the AI-native documentation platform. Docs live as Markdown/MDX files directly in the monorepo — no translation layer, no proprietary format. PRDs and RFCs use MDX (.mdx) for Mintlify’s full component support, while Cycle docs remain plain Markdown (.md) since they are engineering-internal and don’t need interactive components. Bi-directional GitHub sync means edits in Mintlify’s web editor push commits, and repo commits appear instantly in Mintlify. Critically, Mintlify provides:
  • Autopilot: Proactive AI agent that monitors the repo, detects code changes that affect specs, and opens PRs with doc updates automatically
  • AGENTS.md: Customization file for AI agent behavior (mirrors our CLAUDE.md pattern)
  • Auto-generated MCP server: Every Mintlify site gets an MCP server that Claude Code can query
  • llms.txt / llms-full.txt: Auto-generated AI-friendly content index
  • AI traffic analytics: See which AI agents consume specs and where they fail
The loop: PM writes PRD (in Mintlify editor or MDX) → Engineer writes RFC if needed → Engineer creates Cycle doc → GitHub Project items track execution → Claude Code reads PRD + RFC + Cycle as native MDX files during implementation → Mintlify Autopilot detects code changes and suggests spec updates → PR links back to Cycle → Cycle marked complete. Success looks like: A PM creates a PRD in Mintlify’s web editor, the MDX file appears in docs/PRDs/ in the repo, an engineer creates a Cycle doc referencing it, Claude Code implements the feature reading all three spec types as native repo files, and Autopilot flags when code changes drift from the spec — no Slack threads, no lost context, no spec drift.

Current State

What Works

  • Cycle docs are mature and detailed (established template with frontmatter, architecture, implementation plan, validation criteria)
  • GitHub Projects track cycle execution with project items
  • ADR pattern exists but is nascent (1 ADR so far)
  • Claude Code already consumes cycle docs as context during implementation
  • CLAUDE.md pattern is established — Mintlify’s AGENTS.md is a natural extension

What’s Missing

  • No PRD structure — functional requirements are embedded in cycle docs, making it hard for PMs to own and edit them independently
  • No RFC structure — architectural decisions are either in cycle docs or ADRs, with no clear process for proposing and reviewing non-functional requirements
  • No documentation platform — all docs are raw markdown with no navigation, search, or AI-powered discovery
  • No proactive spec drift detection — when code changes, no one checks if specs are still accurate
  • No formal spec → cycle → implementation traceability — the link between “what the PM asked for” and “what got built” is implicit
  • No templates — cycle doc format is established by convention but not documented as a template

Architecture: The Spec-Driven Development Loop

Three-Document Model

┌─────────────────────────────────────────────────────────────────┐
│                    SPEC-DRIVEN DEV LOOP                         │
│                                                                 │
│  ┌──────────┐     ┌──────────┐     ┌──────────────────────┐    │
│  │   PRD    │────▶│   RFC    │────▶│     Cycle Doc        │    │
│  │ (PM)     │     │ (Eng)    │     │ (Eng + AI)           │    │
│  │          │     │          │     │                      │    │
│  │ WHAT &   │     │ HOW &    │     │ IMPLEMENTATION PLAN  │    │
│  │ WHY      │     │ WHY NOT  │     │ + GH PROJECT ITEMS   │    │
│  └──────────┘     └──────────┘     └──────────────────────┘    │
│       │                │                      │                 │
│       │                │                      ▼                 │
│       │                │           ┌──────────────────────┐     │
│       │                │           │   Claude Code        │     │
│       │                │           │   reads PRD + RFC    │     │
│       │                │           │   + Cycle as native  │     │
│       │                │           │   MDX files in repo  │     │
│       │                │           └──────────────────────┘     │
│       │                │                      │                 │
│       │                │                      │ code changes    │
│       │                │                      ▼                 │
│  ┌─────────────────────────────────────────────────────┐       │
│  │              Mintlify (AI-Native Layer)              │       │
│  │  - Web editor for PMs (MDX, bi-directional sync)    │       │
│  │  - Autopilot: detects code→spec drift, opens PRs    │       │
│  │  - AGENTS.md: customize AI agent behavior           │       │
│  │  - Auto-generated MCP server for AI consumption     │       │
│  │  - llms.txt + llms-full.txt for AI indexing         │       │
│  │  - AI traffic analytics (which agents read specs)   │       │
│  └─────────────────────────────────────────────────────┘       │
└─────────────────────────────────────────────────────────────────┘

Document Ownership & Lifecycle

DocumentOwnerAudienceEdited InLifecycle
PRDPMPM, Eng, StakeholdersMintlify web editor or MDX in repodraftreviewapprovedin-progresscompleted
RFCEngineerEngineers, ArchitectsMDX in repo (primary), Mintlify (browse)draftreviewaccepted / rejected / superseded
Cycle DocEngineerEngineers, AI agentsMDX in repodraftreadyin-progresscomplete

Traceability Chain

PRD-007 (Feature: Smart Scheduling)
  └── RFC-003 (Calendar API Architecture)
  └── Cycle 215 (Implement Smart Scheduling)
        ├── GH Project Item: flux#89 (backend)
        ├── GH Project Item: flux#90 (frontend)
        └── PR #92 → links to Cycle 215
              └── Mintlify Autopilot detects PR #92 changes
                   └── Opens PR #93 updating PRD-007 acceptance criteria
Every Cycle doc references its source PRD(s) and RFC(s) in frontmatter. Every PR references its Cycle. Every GitHub Project item references its Cycle. Mintlify Autopilot closes the loop by detecting when code changes require spec updates. The chain is navigable in both directions.

Implementation Plan

Phase 1: Repository Structure & Templates

Goal: Establish the docs/PRDs/ and docs/RFCs/ directories with templates, process docs, and Mintlify navigation config.

1.1 Directory Structure

docs/
├── docs.json                  # Mintlify configuration (navigation, theme, settings)
├── index.md                   # Landing page (overview of spec process)

├── PRDs/                      # Product Requirements Documents
│   ├── README.md              # PRD process guide + index
│   ├── _template.mdx          # PRD template
│   ├── PRD-001-example.mdx    # Example PRD (reference)
│   └── ...                    # Future PRDs

├── RFCs/                      # Requests for Comments
│   ├── README.md              # RFC process guide + index
│   ├── _template.mdx          # RFC template
│   ├── RFC-001-example.mdx    # Example RFC (reference)
│   └── ...                    # Future RFCs

├── adr/                       # Architecture Decision Records (existing)
│   └── 2026-03-28-job-distribution-strategy.md

├── guides/                    # Operational guides (existing)
│   └── dev-workstation-setup.md

└── roadmap/                   # Roadmap and cycles (existing)
    ├── roadmap-overview.md
    ├── canonical-strategy.md
    └── cycles/
        ├── _template.md       # Cycle doc template (NEW)
        └── ...

1.2 Mintlify Configuration

File: docs/docs.json
Note: Mintlify migrated from mint.json to docs.json in early 2025. The new schema consolidates navigation into a single recursive object with tabs containing groups.
{
  "$schema": "https://mintlify.com/docs.json",
  "theme": "mint",
  "name": "Flux Specs",
  "description": "Spec-driven development artifacts for Flux, an AI-native hiring platform",
  "colors": {
    "primary": "#6366f1",
    "light": "#818cf8",
    "dark": "#4f46e5"
  },
  "favicon": "/favicon.svg",
  "logo": {
    "light": "/logo/light.svg",
    "dark": "/logo/dark.svg"
  },
  "appearance": {
    "default": "dark"
  },
  "navigation": {
    "tabs": [
      {
        "tab": "Overview",
        "groups": [
          {
            "group": "Getting Started",
            "pages": ["index"]
          },
          {
            "group": "Roadmap",
            "pages": [
              "roadmap/roadmap-overview",
              "roadmap/canonical-strategy"
            ]
          }
        ]
      },
      {
        "tab": "PRDs",
        "groups": [
          {
            "group": "Product Requirements",
            "pages": [
              "PRDs/README",
              "PRDs/_template"
            ]
          }
        ]
      },
      {
        "tab": "RFCs",
        "groups": [
          {
            "group": "Technical RFCs",
            "pages": [
              "RFCs/README",
              "RFCs/_template"
            ]
          }
        ]
      },
      {
        "tab": "Cycles",
        "groups": [
          {
            "group": "Implementation Cycles",
            "pages": [
              "roadmap/cycles/cycle214-spec-driven-dev"
            ]
          }
        ]
      }
    ],
    "global": {
      "anchors": [
        {
          "anchor": "GitHub",
          "href": "https://github.com/employ-inc/flux",
          "icon": "github"
        }
      ]
    }
  },
  "contextual": {
    "options": ["copy", "view", "claude", "cursor", "mcp"]
  },
  "feedback": {
    "thumbsRating": true,
    "suggestEdit": true,
    "raiseIssue": true
  }
}

1.3 AGENTS.md (AI Agent Customization)

File: AGENTS.md (repository root — Mintlify expects this at the repo root, not inside docs/)
# Flux Specs — AI Agent Instructions

## Context
This documentation site contains the spec-driven development artifacts for Flux,
an AI-native hiring platform built by Employ Inc.

## Document Types
- **PRDs** (docs/PRDs/): Product Requirements Documents — functional specs owned by PMs
- **RFCs** (docs/RFCs/): Requests for Comments — non-functional/architectural specs owned by engineers
- **Cycles** (docs/roadmap/cycles/): Implementation plans referencing PRDs and RFCs

## For AI Coding Agents (Claude Code, Cursor, etc.)
When implementing a Cycle:
1. Read the Cycle doc first for the implementation plan
2. Read all referenced PRDs for functional requirements and acceptance criteria
3. Read all referenced RFCs for architectural constraints
4. Implement against the spec — do not assume requirements not stated in the PRD
5. If implementation must diverge from spec, flag it — spec drift is a bug

## For Mintlify Autopilot
When detecting code changes:
- Check if changes affect acceptance criteria in any PRD
- Check if changes introduce new patterns not covered by an RFC
- Suggest doc updates via PR, do not auto-merge

## Traceability
Every Cycle doc has `source_prds` and `source_rfcs` in frontmatter.
Every PR description should reference its Cycle number.

1.4 PRD Template

File: docs/PRDs/_template.mdx
---
title: "PRD-XXX: [Title]"
description: "[One-line description for navigation and AI indexing]"
prd: "PRD-XXX"
status: "draft"
priority: "medium"
created: ""
updated: ""
author: ""
stakeholders: []
target_cycle: null
rfcs: []
tags: []
---

# PRD-XXX: [Title]

## Problem Statement
{/* 2-3 sentences. What problem does this solve? Who has this problem? Why now? */}

## Success Criteria
{/* Measurable outcomes. How do we know this worked? */}
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3

## User Stories

### Story 1: [Persona][Goal]
**As a** [persona], **I want** [capability], **so that** [benefit].

**Acceptance Criteria**:
- [ ] Given [context], when [action], then [outcome]
- [ ] Given [context], when [action], then [outcome]

### Story 2: [Persona][Goal]
...

## Functional Requirements

### FR-1: [Requirement Name]
**Description**: [What the system must do]
**Priority**: Must-have | Should-have | Nice-to-have
**Acceptance Criteria**:
- [ ] [Testable criterion]

### FR-2: [Requirement Name]
...

## UX Requirements
{/* Wireframes, flows, or descriptions of the user experience.
    Mintlify supports embedded images, Figma embeds, and interactive components. */}

## Out of Scope
{/* Explicit list of what this PRD does NOT cover. Prevents scope creep. */}

## Open Questions
| # | Question | Owner | Target Date | Resolution |
|---|----------|-------|-------------|------------|
| 1 | | | | |

## Dependencies
{/* External dependencies, other PRDs, or prerequisites */}

## Risks
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| | | | |

---
*This PRD follows the Flux spec-driven development process. See [PRD Process](/PRDs/README).*

1.5 RFC Template

File: docs/RFCs/_template.mdx
---
title: "RFC-XXX: [Title]"
description: "[One-line description for navigation and AI indexing]"
rfc: "RFC-XXX"
status: "draft"
created: ""
updated: ""
author: ""
reviewers: []
related_prds: []
related_cycles: []
supersedes: null
superseded_by: null
tags: []
---

# RFC-XXX: [Title]

## Summary
{/* 2-3 sentences. What is this RFC proposing and why? */}

## Motivation
{/* Why is this change needed? What problem does it solve?
    Link to the PRD(s) that drive this if applicable. */}

## Detailed Design

### Architecture
{/* Technical architecture. Diagrams encouraged (Mermaid or embedded images). */}

### Data Model
{/* Schema changes, new tables, field additions. */}

### API Changes
{/* New or modified endpoints, request/response shapes. */}

### Security Considerations
{/* Authentication, authorization, data privacy implications. */}

### Performance Considerations
{/* Latency targets, throughput requirements, scalability. */}

## Alternatives Considered
| Alternative | Pros | Cons | Why Rejected |
|-------------|------|------|-------------|
| | | | |

## Migration Strategy
{/* How do we get from current state to proposed state?
    Breaking changes? Backwards compatibility? */}

## Validation Plan
- [ ] [Test or validation step]

## Risks
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| | | | |

## Open Questions
| # | Question | Owner | Target Date | Resolution |
|---|----------|-------|-------------|------------|
| 1 | | | | |

## Decision
{/* Filled in after review. What was decided? By whom? When? */}

---
*This RFC follows the Flux spec-driven development process. See [RFC Process](/RFCs/README).*

1.6 Cycle Doc Template

File: docs/roadmap/cycles/_template.md
---
cycle: null
title: ""
status: draft  # draft | plan-reviewed | ready | in-progress | complete
priority: medium  # critical | high | medium | low
created: ""
updated: ""
started: null
completed: null
owner: ""
wave: null
dependencies: []
absorbs: []
source_prds: []  # PRD numbers this cycle implements
source_rfcs: []  # RFC numbers this cycle implements
related_ADRs: []
related_PRs: []
gh_project_items: []  # GitHub Project item numbers
tags: []
hidden: false
---

# Cycle [N]: [Title]

**Priority**: [LEVEL]
**Status**: [STATUS]
**Wave**: [N]
**Owner**: [@handle]
**Dependencies**: [Cycle N (description)]
**Source PRDs**: [PRD-XXX, PRD-YYY]
**Source RFCs**: [RFC-XXX]
**Product**: Flux — AI-native hiring platform
**Organization**: Employ Inc. (`employ-inc` GitHub org)

---

## Overview
<!-- 1 paragraph: What does this cycle deliver? Why now?
     Reference the source PRDs/RFCs for context. -->

## Current State
<!-- What exists today? What's working? What's broken or missing? -->

## Architecture
<!-- Technical design. Diagrams, flow charts, component relationships. -->

## Implementation Plan
<!-- Phase-by-phase breakdown. File-level detail where appropriate.
     Each phase maps to one or more GitHub Project items. -->

### Phase 1: [Name]
**GH Project Item**: flux#[N]
<!-- Detailed implementation steps -->

### Phase 2: [Name]
**GH Project Item**: flux#[N]
<!-- Detailed implementation steps -->

## Validation Plan
<!-- How do we know this works? Specific test scenarios. -->
- [ ] [Scenario 1]
- [ ] [Scenario 2]

## Estimated Scope
| Dimension | Estimate |
|-----------|----------|
| Files touched | |
| Risk level | |
| Effort | |

## Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|
| | | | |

## Out of Scope
<!-- What this cycle explicitly does NOT do. -->

---
*This cycle implements [PRD-XXX](../../PRDs/PRD-XXX.mdx). See [Roadmap Overview](../roadmap-overview.md).*

Phase 2: Process Documentation

2.1 Docs Landing Page

File: docs/README.md Content: Overview of the spec-driven dev process, the three-document model (PRDs → RFCs → Cycles), how to create each type, how they flow into GitHub Projects and Claude Code implementation. Includes a quick-start guide for PMs (use Mintlify web editor) and engineers (use your editor, files are MDX in the repo).

2.2 PRD Process Guide

File: docs/PRDs/README.md Content:
  • What is a PRD? — The PM-owned functional specification. Captures what to build and why.
  • When to write a PRD — Every new feature, significant enhancement, or user-facing change.
  • When NOT to write a PRD — Bug fixes, refactors, infra changes (use Cycle docs directly). Tech debt (use RFCs).
  • PRD numbering — Sequential: PRD-001, PRD-002, etc. Never reuse numbers.
  • PRD lifecycledraft → PM writes in Mintlify web editor or MDX → review → stakeholder feedback → approved → engineer creates Cycle doc → in-progress → implementation begins → completed → feature shipped.
  • How to create a PRD — Option A: Mintlify web editor (duplicate template, fill sections). Option B: Copy _template.mdx, rename to PRD-NNN-slug.mdx, edit in your IDE.
  • Tips for AI-friendly PRDs — Use structured headings, explicit acceptance criteria with Given/When/Then, avoid ambiguity. Claude Code reads your PRD as a native file during implementation. Mintlify Autopilot monitors for spec drift.

2.3 RFC Process Guide

File: docs/RFCs/README.md Content:
  • What is an RFC? — An engineering-owned proposal for non-functional decisions: architecture, data model changes, security, performance, infrastructure, process changes.
  • When to write an RFC — New architectural patterns, breaking API changes, security model changes, new infrastructure, process changes, anything requiring cross-team input.
  • When NOT to write an RFC — Feature requirements (use PRDs). Implementation details (use Cycle docs).
  • RFC numbering — Sequential: RFC-001, RFC-002, etc.
  • RFC lifecycledraft → author writes → review → reviewers provide feedback via GitHub PR → accepted / rejected / superseded.
  • Review process — RFCs require at least one reviewer. For architectural RFCs, the CTO reviews.
  • Relationship to ADRs — An accepted RFC may result in an ADR that records the decision. RFCs capture the discussion; ADRs capture the outcome.

Phase 3: Mintlify Setup

3.1 Mintlify Project Configuration

  1. Sign up at mintlify.com and create a project for Employ Inc
  2. Connect GitHub repository: employ-inc/flux
  3. Set documentation directory to docs/
  4. Configure branch: main
  5. Deploy — Mintlify reads docs.json and renders the site
  6. Verify bi-directional sync: edit in Mintlify web editor → commit appears on main

3.2 Mintlify Autopilot Configuration

Autopilot is enabled per-project and configured via the Mintlify dashboard + AGENTS.md:
  1. Enable Autopilot in the Mintlify dashboard for the Flux project
  2. Configure monitoring: Point Autopilot at the backend/ and web/ directories for code change detection
  3. Set behavior: When code changes are detected that affect spec’d functionality, Autopilot opens a PR with suggested doc updates (not auto-merge)
  4. AGENTS.md (created in Phase 1) customizes what Autopilot looks for and how it suggests changes

3.3 Mintlify MCP Server + Claude Code Integration

Mintlify auto-generates an MCP server at the /mcp path of every published site using Streamable HTTP transport. Add it to Claude Code:
claude mcp add --transport http flux-specs https://specs.flux.employinc.io/mcp
Or add directly to .mcp.json at the repo root:
{
  "mcpServers": {
    "flux-specs": {
      "type": "http",
      "url": "https://specs.flux.employinc.io/mcp"
    }
  }
}
This enables Claude Code to query specs via MCP during implementation. However, since Mintlify docs are raw MDX files in the repo, Claude Code can also just read them directly — the MCP server adds richer search and cross-referencing. Additionally, Mintlify generates llms.txt and llms-full.txt at the site root for AI-friendly content indexing.

3.4 Mintlify Plan Recommendation

PlanCostKey Features
HobbyFree1 editor, GitHub sync, web editor, custom domain, MCP server, LLM optimizations
Pro$300/mo5 editors, AI Assistant, Autopilot, preview deployments, password protection, styling checks
Custom (Enterprise)Contact sales+ SSO, 99.99% SLA, granular permissions, audit logs, SOC 2
Recommendation for Flux: Start with Pro (300/mo).Autopilot(proactivespecdriftdetection)isonlyavailableonPro+,anditsthecoreAInativefeaturedrivingthisworkflow.5dashboardeditorsissufficientforthecurrentteam.Additionaleditorsare300/mo). Autopilot (proactive spec drift detection) is only available on Pro+, and it's the core AI-native feature driving this workflow. 5 dashboard editors is sufficient for the current team. Additional editors are 20/mo each.

3.5 Team Permissions

RoleAccessPrimary Workflow
PMFull edit on docs/PRDs/Create/edit PRDs in Mintlify web editor
EngineerFull edit on all docs/Create RFCs and Cycles in IDE, browse in Mintlify
CTOAdminFull access, configure Autopilot, review analytics
StakeholderRead-onlyBrowse specs in Mintlify, provide comments

Phase 4: End-to-End Workflow Integration

4.1 The Complete Spec-Driven Development Loop

Step 1: PM identifies need
    └── PM creates PRD in Mintlify web editor (or MDX in repo)
         └── Mintlify syncs PRD-XXX.mdx to docs/PRDs/ in GitHub

Step 2: Engineering review
    └── Engineer reads PRD (in Mintlify or as MDX file in repo)
    └── If architectural decisions needed → writes RFC-XXX.mdx
    └── RFC reviewed via GitHub PR, accepted/rejected

Step 3: Cycle planning
    └── Engineer creates Cycle doc referencing PRD + RFC in frontmatter
    └── Cycle doc includes implementation plan, file index, validation criteria
    └── GitHub Project items created for each phase

Step 4: Implementation
    └── Claude Code reads PRD + RFC + Cycle doc as native MDX/MD files
    └── Implements against spec
    └── PRs reference Cycle number in description

Step 5: Spec drift detection (AUTOMATED)
    └── Mintlify Autopilot detects code changes in PR
    └── Cross-references against PRD acceptance criteria
    └── Opens follow-up PR with suggested spec updates if drift detected

Step 6: Validation
    └── Engineer runs validation plan from Cycle doc
    └── PM verifies acceptance criteria from PRD
    └── Cycle marked complete, PRD marked completed

Step 7: Spec maintenance
    └── Completed PRDs/RFCs remain as historical record
    └── "Spec drift" is a bug — Autopilot catches it automatically

4.2 GitHub Project Integration

The existing GitHub Projects workflow continues unchanged. The additions:
  • Every GitHub Project item references a Cycle number (already true)
  • Every Cycle now references source PRD(s) and RFC(s) in frontmatter (new)
  • PRD status updates when its Cycle completes (manual for now, automatable later via GitHub Actions)
  • Mintlify Autopilot opens PRs when code changes affect spec’d functionality (new, automated)

4.3 AI-Native Workflow: Claude Code + Specs

Claude Code’s workflow becomes:
  1. Before implementation: Read the Cycle doc, its source PRD(s), and RFC(s)
  2. During implementation: Reference acceptance criteria and functional requirements from the PRD
  3. During code review: Verify implementation matches spec
  4. After implementation: Mintlify Autopilot handles spec drift detection
The specs are available to Claude Code three ways:
  • Direct file read: docs/PRDs/PRD-XXX.mdx — files are native MDX in the repo, zero friction
  • Mintlify MCP server: Query specs via MCP tool for richer search and cross-referencing
  • CLAUDE.md references: Cycle docs are already referenced in CLAUDE.md
The key advantage of Mintlify over alternatives: specs are raw MDX files in the monorepo. There is no proprietary format, no translation layer, no API required. Claude Code reads specs the same way it reads source code — they’re just files.

4.4 CLAUDE.md Update

Add to CLAUDE.md:
### Spec-Driven Development

Every feature follows the PRD → RFC → Cycle pipeline:
- **PRDs** (`docs/PRDs/`): Functional requirements. PM-owned. Read before implementing any feature.
- **RFCs** (`docs/RFCs/`): Non-functional requirements. Engineering-owned.
- **Cycles** (`docs/roadmap/cycles/`): Implementation specs. Always reference source PRDs/RFCs.

Before starting any Cycle implementation:
1. Read the Cycle doc
2. Read all referenced PRDs (for functional requirements and acceptance criteria)
3. Read all referenced RFCs (for architectural constraints)
4. Implement against the spec, not against assumptions
5. If implementation must diverge from spec, flag it — spec drift is a bug

Phase 5: Seed Example Docs

Create one example PRD and one example RFC to demonstrate the format and serve as reference:
  • PRD-001: Extract from the AI Chat feature (Cycle 212) — shows what a real PRD looks like with user stories, functional requirements, and acceptance criteria
  • RFC-001: Extract from the canonical schema strategy — shows what a real RFC looks like with architecture, data model, alternatives considered, and decision
These examples validate the templates and give PMs/engineers a concrete reference.

Validation Plan

  • docs/docs.json exists and is valid Mintlify configuration
  • AGENTS.md exists at repo root with AI agent instructions
  • docs/PRDs/_template.mdx exists with all required sections
  • docs/RFCs/_template.mdx exists with all required sections
  • docs/roadmap/cycles/_template.md exists with source_prds and source_rfcs frontmatter fields
  • docs/PRDs/README.md documents the PRD process
  • docs/RFCs/README.md documents the RFC process
  • docs/README.md documents the overall spec-driven dev process
  • Mintlify project created and GitHub sync configured
  • Bi-directional sync verified: edit in Mintlify → commit appears on main
  • Bi-directional sync verified: push to main → appears in Mintlify
  • Mintlify Autopilot enabled and configured
  • MCP server URL added to .mcp.json (repo root)
  • CLAUDE.md updated with spec-driven dev section
  • At least one example PRD (PRD-001) and one example RFC (RFC-001) exist
  • llms.txt is accessible at the published site root

Estimated Scope

DimensionEstimate
Files created~14 (templates, process docs, config, AGENTS.md, examples)
Files modified2 (CLAUDE.md, .mcp.json)
Risk levelLow — additive only, no code changes
EffortSmall — documentation and process, no engineering
Cost~$300/mo (Mintlify Pro plan)

Risks & Mitigations

RiskLikelihoodImpactMitigation
Mintlify web editor not polished enough for PMsLowMediumPMs can also use any Markdown editor; the web editor is improving rapidly; GitBook is a fallback
Autopilot generates noisy/unhelpful PRsMediumLowConfigure AGENTS.md with specific instructions; tune over first 2 weeks; can disable per-directory
MDX syntax unfamiliar to PMsLowLowMDX is a superset of Markdown — PMs write plain Markdown, MDX features are optional for engineering
Mintlify uptime/reliabilityLowMediumDocs are MDX files in the repo — Mintlify going down doesn’t block development, only browsing
Over-specification slows velocityLowHighPRDs are intentionally lightweight (problem + stories + acceptance criteria); RFC only when needed; process doc explicitly calls out when NOT to write
Spec drift (implementation diverges from spec)MediumMediumAutopilot detects drift automatically; convention: “spec drift is a bug”

Out of Scope

  • Automated spec → code generation — Claude Code uses specs as context, not as executable code generators. This is spec-driven, not spec-generated.
  • CI validation of spec completeness — No automated checks on whether PRD sections are filled. Future enhancement.
  • Automated PRD → Cycle doc creation — Engineers manually create Cycle docs. Automation is a future cycle.
  • Public-facing documentation site — Mintlify will initially serve internal specs. Public developer docs are a separate concern.
  • Migrating existing cycle docs to new templates — Existing cycle docs retain their current format. New cycles use the template.
  • ADR process changes — ADRs continue as-is. RFCs may produce ADRs but the ADR process itself isn’t changing.

Design Decisions

Why Three Documents Instead of One?

Problem: A single spec document (like current cycle docs) conflates “what to build” (PM concern) with “how to build it” (engineering concern). PMs can’t own their requirements without navigating implementation details, and engineers can’t restructure implementation plans without risking PM-owned content. Solution: Separation of concerns. PRDs own the “what and why.” RFCs own the “how and constraints.” Cycles own the “implementation plan.” Each has a clear owner, clear lifecycle, and clear audience. Trade-off: Three documents means more overhead per feature. Mitigation: small features can skip RFCs entirely (PRD → Cycle directly). Bug fixes and refactors skip PRDs entirely (Cycle only). The process doc explicitly defines when each document type is and isn’t needed.

Why Mintlify Over Alternatives?

CriteriaMintlifyGitBookDocusaurusNotion
Docs as native files in repoMDX — zero translationProprietary format → MarkdownGit-nativeNot in repo
Proactive AI agent (Autopilot)Shipped, monitors codeRoadmap onlyNoNo
AGENTS.md customizationYes — mirrors CLAUDE.mdNo equivalentNoNo
MCP server auto-generatedYesYesNoSeparate MCP server
llms.txt auto-generatedYesYesNoNo
AI traffic analyticsYesNoNoNo
WYSIWYG for PMsGood (beta, improving)Best in classNoBest in class
Bi-directional Git SyncYesYesN/A (Git-native)No
Used byAnthropic, Cursor, PerplexityMany teamsMeta (OSS)Broad
Mintlify wins on: AI-native SDLC features (Autopilot, AGENTS.md, AI traffic analytics) + docs as native MDX files (zero friction for AI coding agents). The AGENTS.md pattern is a natural extension of our existing CLAUDE.md workflow. Anthropic (makers of Claude Code) use Mintlify for their own documentation.

Why MDX Over Plain Markdown?

MDX is a superset of Markdown that supports JSX components. For specs:
  • PMs write plain Markdown — MDX adds zero complexity for them
  • Engineers can optionally use interactive components (API playgrounds, tabs, callouts) in RFCs
  • Mintlify’s rendering engine requires MDX for full feature support
  • Claude Code reads MDX files identically to Markdown — no friction

Numbering Convention

  • PRDs: PRD-001, PRD-002, etc. Sequential, never reused.
  • RFCs: RFC-001, RFC-002, etc. Sequential, never reused.
  • Cycles: Continue existing cycle[N] numbering.
All three use sequential numbers because they’re ordered chronologically and referenced by number in other documents. Descriptive slugs in filenames (e.g., PRD-001-smart-scheduling.mdx) for human readability.

Future Enhancements (Not This Cycle)

  1. Mintlify Autopilot tuning: Refine AGENTS.md based on first 2 weeks of Autopilot PRs
  2. Spec drift CI gate: GitHub Action that fails if a Cycle doc references non-existent PRD/RFC numbers
  3. PRD status automation: GitHub Action updates PRD status when linked Cycle completes
  4. AI-powered PRD review: Claude Code reviews PRDs for completeness and clarity before approval
  5. AI traffic dashboard: Monitor which specs AI agents consume most, identify gaps
  6. OpenAPI playground: Embed interactive API docs in RFCs using Mintlify’s OpenAPI support
  7. Searchable spec index: Auto-generated index of all PRDs/RFCs/Cycles with status and links

This cycle establishes the Flux spec-driven development process. See Roadmap Overview.