roadmap

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package roadmap provides types for product and project roadmaps. Roadmaps can be used standalone or embedded in PRD/MRD/TRD documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PhaseTargetStatusIcon

func PhaseTargetStatusIcon(status string) string

PhaseTargetStatusIcon returns an emoji/icon for the phase target status.

func StatusIcon

func StatusIcon(status DeliverableStatus) string

StatusIcon returns an emoji/icon for the deliverable status.

func StatusLegend

func StatusLegend() string

StatusLegend returns a markdown table explaining the status icons.

func SwimlaneLabel

func SwimlaneLabel(dt DeliverableType) string

SwimlaneLabel converts a DeliverableType to a human-readable label.

Types

type Deliverable

type Deliverable struct {
	ID          string            `json:"id"`
	Title       string            `json:"title"`
	Description string            `json:"description"`
	Type        DeliverableType   `json:"type"`
	Status      DeliverableStatus `json:"status,omitempty"`
	Tags        []string          `json:"tags,omitempty"` // For filtering by topic/domain
}

Deliverable represents a phase deliverable.

type DeliverableStatus

type DeliverableStatus string

DeliverableStatus represents the status of a deliverable.

const (
	DeliverableNotStarted DeliverableStatus = "not_started"
	DeliverableInProgress DeliverableStatus = "in_progress"
	DeliverableCompleted  DeliverableStatus = "completed"
	DeliverableBlocked    DeliverableStatus = "blocked"
)

type DeliverableType

type DeliverableType string

DeliverableType represents types of deliverables.

const (
	DeliverableFeature        DeliverableType = "feature"
	DeliverableDocumentation  DeliverableType = "documentation"
	DeliverableInfrastructure DeliverableType = "infrastructure"
	DeliverableIntegration    DeliverableType = "integration"
	DeliverableMilestone      DeliverableType = "milestone"
	DeliverableRollout        DeliverableType = "rollout"
)

type Phase

type Phase struct {
	ID              string        `json:"id"`   // e.g., "phase-1", "q1-2026"
	Name            string        `json:"name"` // e.g., "MVP", "Q1 2026"
	Type            PhaseType     `json:"type"`
	StartDate       *time.Time    `json:"startDate,omitempty"`
	EndDate         *time.Time    `json:"endDate,omitempty"`
	Goals           []string      `json:"goals"`
	Deliverables    []Deliverable `json:"deliverables"`
	SuccessCriteria []string      `json:"successCriteria"`
	Dependencies    []string      `json:"dependencies,omitempty"` // Dependent phase IDs
	Risks           []Risk        `json:"risks,omitempty"`
	Status          PhaseStatus   `json:"status,omitempty"`
	Progress        *int          `json:"progress,omitempty"` // 0-100 percentage
	Tags            []string      `json:"tags,omitempty"`     // For filtering by topic/domain
	Notes           string        `json:"notes,omitempty"`
}

Phase represents a roadmap phase.

type PhaseStatus

type PhaseStatus string

PhaseStatus represents the current status of a phase.

const (
	PhaseStatusPlanned    PhaseStatus = "planned"
	PhaseStatusInProgress PhaseStatus = "in_progress"
	PhaseStatusCompleted  PhaseStatus = "completed"
	PhaseStatusDelayed    PhaseStatus = "delayed"
	PhaseStatusCancelled  PhaseStatus = "cancelled"
)

type PhaseType

type PhaseType string

PhaseType represents the type of roadmap phase.

const (
	PhaseTypeGeneric   PhaseType = "generic"   // Phase 1, 2, 3
	PhaseTypeQuarter   PhaseType = "quarter"   // Q1 2026, Q2 2026
	PhaseTypeMonth     PhaseType = "month"     // January 2026
	PhaseTypeSprint    PhaseType = "sprint"    // Sprint 1, Sprint 2
	PhaseTypeMilestone PhaseType = "milestone" // MVP, GA, etc.
)

type Risk

type Risk struct {
	ID          string   `json:"id"`
	Description string   `json:"description"`
	Probability string   `json:"probability"` // Low, Medium, High
	Impact      string   `json:"impact"`      // Low, Medium, High, Critical
	Mitigation  string   `json:"mitigation"`
	Status      string   `json:"status,omitempty"` // Identified, Mitigating, Resolved, Accepted
	Tags        []string `json:"tags,omitempty"`   // For filtering by topic/domain
}

Risk represents a risk associated with a roadmap phase. This is a simplified risk type for roadmap use; document-level risks in PRD/MRD/TRD may have additional fields.

type Roadmap

type Roadmap struct {
	Phases []Phase `json:"phases"`
}

Roadmap contains the product roadmap with phases.

func (*Roadmap) ToPhaseTable

func (r *Roadmap) ToPhaseTable(opts TableOptions) string

ToPhaseTable generates a traditional phase-based table showing each phase with its deliverables listed.

Example output:

| Phase   | Status      | Deliverables                          |
|---------|-------------|---------------------------------------|
| Phase 1 | In Progress | • ✅ Auth<br>• 🔄 Search<br>• ⏳ Docs |
| Phase 2 | Planned     | • Dashboard<br>• Monitoring           |

func (*Roadmap) ToSwimlaneTable

func (r *Roadmap) ToSwimlaneTable(opts TableOptions) string

ToSwimlaneTable generates a markdown table with phases as columns and deliverable types as swimlane rows.

Example output:

| Swimlane       | **Phase 1**<br>Foundation | **Phase 2**<br>Core Features |
|----------------|---------------------------|------------------------------|
| Features       | • Auth<br>• Search        | • Dashboard                  |
| Infrastructure | • CI/CD                   | • Monitoring                 |

type TableOptions

type TableOptions struct {
	// IncludeStatus adds status indicators to deliverables
	IncludeStatus bool
	// IncludeEmptySwimlanes shows rows even if no deliverables of that type exist
	IncludeEmptySwimlanes bool
	// SwimlaneOrder specifies the order of swimlanes (nil = alphabetical)
	SwimlaneOrder []DeliverableType
	// MaxTitleLen truncates deliverable titles (0 = no limit)
	MaxTitleLen int
	// IncludeOKRs adds Objectives and Key Results swimlanes derived from PhaseTargets.
	// This is primarily used by PRD documents that have OKR integration.
	IncludeOKRs bool
}

TableOptions configures roadmap table generation.

func DefaultTableOptions

func DefaultTableOptions() TableOptions

DefaultTableOptions returns sensible defaults for roadmap table generation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL