Documentation
¶
Overview ¶
Package roadmap provides types for product and project roadmaps. Roadmaps can be used standalone or embedded in PRD/MRD/TRD documents.
Index ¶
- func PhaseTargetStatusIcon(status string) string
- func PhaseTargetStatusIconWithOptions(status string, useText bool) string
- func StatusIcon(status DeliverableStatus) string
- func StatusIconWithOptions(status DeliverableStatus, useText bool) string
- func StatusLegend() string
- func StatusLegendWithOptions(useText bool) string
- func SwimlaneLabel(dt DeliverableType) string
- type Deliverable
- type DeliverableStatus
- type DeliverableType
- type Phase
- type PhaseStatus
- type PhaseType
- type Risk
- type Roadmap
- type RolloutStage
- type RolloutStatus
- type RolloutWave
- type TableOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PhaseTargetStatusIcon ¶
PhaseTargetStatusIcon returns an emoji/icon for the phase target status.
func PhaseTargetStatusIconWithOptions ¶ added in v0.7.0
PhaseTargetStatusIconWithOptions returns an icon for the phase target status. If useText is true, returns ASCII text instead of emoji for PDF compatibility.
func StatusIcon ¶
func StatusIcon(status DeliverableStatus) string
StatusIcon returns an emoji/icon for the deliverable status.
func StatusIconWithOptions ¶ added in v0.7.0
func StatusIconWithOptions(status DeliverableStatus, useText bool) string
StatusIconWithOptions returns an icon for the deliverable status. If useText is true, returns ASCII text instead of emoji for PDF compatibility.
func StatusLegend ¶
func StatusLegend() string
StatusLegend returns a markdown table explaining the status icons.
func StatusLegendWithOptions ¶ added in v0.7.0
StatusLegendWithOptions returns a markdown table explaining the status icons. If useText is true, shows ASCII text icons instead of emoji.
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
Rollout *RolloutStatus `json:"rollout,omitempty"` // B2B deployment tracking
}
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 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 RolloutStage ¶ added in v0.10.0
type RolloutStage string
RolloutStage represents the current stage of a rollout.
const ( RolloutStageNotStarted RolloutStage = "not_started" RolloutStageRollingOut RolloutStage = "rolling_out" RolloutStageDeployed RolloutStage = "deployed" // 100% deployed, adoption ongoing RolloutStageAdopted RolloutStage = "adopted" // Target adoption achieved RolloutStagePaused RolloutStage = "paused" // Rollout paused RolloutStageRolledBack RolloutStage = "rolled_back" )
type RolloutStatus ¶ added in v0.10.0
type RolloutStatus struct {
TotalCustomers int `json:"totalCustomers"` // Total customers in rollout scope
DeployedCustomers int `json:"deployedCustomers"` // Customers with feature available
AdoptedCustomers int `json:"adoptedCustomers,omitempty"` // Customers actively using feature
Status RolloutStage `json:"status,omitempty"` // Current rollout stage
StartDate string `json:"startDate,omitempty"` // Rollout start date (ISO 8601)
TargetDate string `json:"targetDate,omitempty"` // Target completion date
Notes string `json:"notes,omitempty"` // Rollout notes
Waves []RolloutWave `json:"waves,omitempty"` // Phased rollout waves
}
RolloutStatus tracks deployment and adoption for B2B SaaS deliverables. Deployment = feature is available to customer (rolled out). Adoption = customer is actively using the feature.
func (*RolloutStatus) AdoptionOfDeployed ¶ added in v0.10.0
func (r *RolloutStatus) AdoptionOfDeployed() float64
AdoptionOfDeployed returns adoption as a percentage of deployed customers. This measures adoption among customers who have access to the feature.
func (*RolloutStatus) AdoptionPercent ¶ added in v0.10.0
func (r *RolloutStatus) AdoptionPercent() float64
AdoptionPercent returns the percentage of customers actively using the feature. This is relative to total customers, not deployed customers.
func (*RolloutStatus) DeploymentPercent ¶ added in v0.10.0
func (r *RolloutStatus) DeploymentPercent() float64
DeploymentPercent returns the percentage of customers with the feature deployed.
func (*RolloutStatus) IsFullyDeployed ¶ added in v0.10.0
func (r *RolloutStatus) IsFullyDeployed() bool
IsFullyDeployed returns true if all customers have the feature deployed.
type RolloutWave ¶ added in v0.10.0
type RolloutWave struct {
ID string `json:"id"`
Name string `json:"name"` // e.g., "Beta", "Wave 1", "GA"
TargetCustomers int `json:"targetCustomers"` // Customers in this wave
DeployedCustomers int `json:"deployedCustomers,omitempty"` // Deployed in this wave
StartDate string `json:"startDate,omitempty"`
EndDate string `json:"endDate,omitempty"`
Status string `json:"status,omitempty"` // planned, in_progress, completed
}
RolloutWave represents a phased rollout wave (e.g., beta, GA waves).
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
// UseTextIcons uses ASCII text instead of emoji for status icons.
// Enable this for Pandoc/LaTeX PDF generation compatibility.
UseTextIcons bool
}
TableOptions configures roadmap table generation.
func DefaultTableOptions ¶
func DefaultTableOptions() TableOptions
DefaultTableOptions returns sensible defaults for roadmap table generation.