Skip to content

Structured Requirements

A Go library for creating, validating, and transforming structured requirements documents.

Overview

Structured Requirements provides typed data structures and utilities for three core document types used in product development:

Document Purpose Primary Audience
PRD Product Requirements Document Product Managers, Engineers
MRD Market Requirements Document Product Marketing, Sales
TRD Technical Requirements Document Engineers, Architects

Key Features

  • Structured JSON format - Machine-readable documents with defined schemas
  • Multiple output views - PM View, Executive View, Amazon 6-Pager, PR/FAQ
  • Goals alignment - Integrate with V2MOM and OKR frameworks
  • Scoring & validation - Automated quality assessment
  • Persona library - Reusable persona definitions across documents

Architecture

graph TD
    A[PRD] --> B[Views]
    A --> C[Scoring]
    A --> D[Goals]

    B --> B1[PM View]
    B --> B2[Exec View]
    B --> B3[6-Pager]
    B --> B4[PR/FAQ]

    D --> D1[V2MOM]
    D --> D2[OKR]

    E[MRD] --> F[Markdown]
    G[TRD] --> H[Markdown]

Quick Example

package main

import (
    "fmt"
    "github.com/grokify/structured-plan/prd"
)

func main() {
    // Create a new PRD
    doc := prd.New("PRD-2025-001", "User Authentication System",
        prd.Person{Name: "Alice Smith", Role: "Product Manager"})

    // Set problem statement
    doc.ExecutiveSummary.ProblemStatement = "Users cannot securely access their accounts"
    doc.ExecutiveSummary.ProposedSolution = "Implement OAuth 2.0 authentication"

    // Score the PRD
    scores := prd.Score(doc)
    fmt.Printf("Overall Score: %.0f%%\n", scores.OverallScore*100)

    // Generate views
    pmView := prd.GeneratePMView(doc)
    markdown := prd.RenderPMMarkdown(pmView)
    fmt.Println(markdown)
}

Installation

go get github.com/grokify/structured-plan

Document Relationships

Structured Requirements documents can reference each other and align with strategic goals:

graph LR
    V[V2MOM] --> P[PRD]
    O[OKR] --> P
    P --> T[TRD]
    P --> M[MRD]
    P --> |views| PM[PM View]
    P --> |views| EX[Exec View]
    P --> |views| SP[6-Pager]

Next Steps