mrd

package
v0.4.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: 4 Imported by: 0

Documentation

Overview

Package mrd provides data types for structured Market Requirements Documents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approver

type Approver = common.Approver

Approver is an alias for common.Approver for backwards compatibility.

type Assumption

type Assumption struct {
	ID          string `json:"id"`
	Description string `json:"description"`
	Rationale   string `json:"rationale,omitempty"`
	Validated   bool   `json:"validated,omitempty"`
	Risk        string `json:"risk,omitempty"` // What if wrong
}

Assumption represents a market assumption.

type BuyerPersona

type BuyerPersona struct {
	ID                 string   `json:"id"`
	Name               string   `json:"name"`
	Title              string   `json:"title"` // Job title
	Description        string   `json:"description"`
	BuyingRole         string   `json:"buying_role"` // Decision Maker, Influencer, User, Gatekeeper
	BudgetAuthority    bool     `json:"budget_authority"`
	PainPoints         []string `json:"pain_points"`
	Goals              []string `json:"goals"`
	BuyingCriteria     []string `json:"buying_criteria,omitempty"`
	InformationSources []string `json:"information_sources,omitempty"` // Where they get info
	Tags               []string `json:"tags,omitempty"`                // For filtering by topic/domain
}

BuyerPersona represents a market-focused buyer persona.

type CompetitiveLandscape

type CompetitiveLandscape struct {
	Overview        string       `json:"overview"`
	Competitors     []Competitor `json:"competitors"`
	MarketPosition  string       `json:"market_position,omitempty"`  // Our current position
	Differentiators []string     `json:"differentiators,omitempty"`  // Key differentiators
	CompetitiveGaps []string     `json:"competitive_gaps,omitempty"` // Gaps to address
}

CompetitiveLandscape contains competitive analysis.

type Competitor

type Competitor struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Category    string   `json:"category,omitempty"` // Direct, Indirect, Substitute
	MarketShare string   `json:"market_share,omitempty"`
	Strengths   []string `json:"strengths"`
	Weaknesses  []string `json:"weaknesses"`
	Pricing     string   `json:"pricing,omitempty"`
	Positioning string   `json:"positioning,omitempty"`
	ThreatLevel string   `json:"threat_level,omitempty"` // High, Medium, Low
	Tags        []string `json:"tags,omitempty"`         // For filtering by topic/domain
}

Competitor represents a competitor analysis.

type CustomSection

type CustomSection struct {
	ID      string `json:"id"`
	Title   string `json:"title"`
	Content any    `json:"content"`
}

CustomSection allows document-specific sections.

type Document

type Document struct {
	Metadata             Metadata             `json:"metadata"`
	ExecutiveSummary     ExecutiveSummary     `json:"executive_summary"`
	MarketOverview       MarketOverview       `json:"market_overview"`
	TargetMarket         TargetMarket         `json:"target_market"`
	CompetitiveLandscape CompetitiveLandscape `json:"competitive_landscape"`
	MarketRequirements   []MarketRequirement  `json:"market_requirements"`
	Positioning          Positioning          `json:"positioning"`
	GoToMarket           *GoToMarket          `json:"go_to_market,omitempty"`
	SuccessMetrics       []SuccessMetric      `json:"success_metrics"`

	// Optional sections
	Risks          []Risk          `json:"risks,omitempty"`
	Assumptions    []Assumption    `json:"assumptions,omitempty"`
	Glossary       []GlossaryTerm  `json:"glossary,omitempty"`
	CustomSections []CustomSection `json:"custom_sections,omitempty"`
}

Document represents a complete Market Requirements Document.

func (Document) FilterByTags added in v0.4.0

func (d Document) FilterByTags(tags ...string) Document

FilterByTags returns a new Document containing only entities that have at least one of the specified tags (OR logic). If no tags are provided, returns a copy of the original document. Metadata tags are always preserved.

func (*Document) ToMarkdown

func (d *Document) ToMarkdown(opts MarkdownOptions) string

ToMarkdown converts the MRD to markdown format.

type ExecutiveSummary

type ExecutiveSummary struct {
	MarketOpportunity string   `json:"market_opportunity"`
	ProposedOffering  string   `json:"proposed_offering"`
	KeyFindings       []string `json:"key_findings"`
	Recommendation    string   `json:"recommendation,omitempty"`
}

ExecutiveSummary provides high-level market overview.

type GlossaryTerm

type GlossaryTerm struct {
	Term       string `json:"term"`
	Definition string `json:"definition"`
	Acronym    string `json:"acronym,omitempty"`
}

GlossaryTerm defines a glossary entry.

type GoToMarket

type GoToMarket struct {
	LaunchStrategy       string           `json:"launch_strategy,omitempty"`
	LaunchTiming         string           `json:"launch_timing,omitempty"`
	PricingStrategy      *PricingStrategy `json:"pricing_strategy,omitempty"`
	DistributionChannels []string         `json:"distribution_channels,omitempty"`
	PartnerStrategy      string           `json:"partner_strategy,omitempty"`
	MarketingStrategy    string           `json:"marketing_strategy,omitempty"`
	SalesStrategy        string           `json:"sales_strategy,omitempty"`
	Milestones           []Milestone      `json:"milestones,omitempty"`
}

GoToMarket contains go-to-market strategy elements.

type MarkdownOptions

type MarkdownOptions struct {
	IncludeFrontmatter bool
	Margin             string
	MainFont           string
	SansFont           string
	MonoFont           string
	FontFamily         string
}

MarkdownOptions configures markdown generation.

func DefaultMarkdownOptions

func DefaultMarkdownOptions() MarkdownOptions

DefaultMarkdownOptions returns default options.

type MarketOverview

type MarketOverview struct {
	TAM         MarketSize `json:"tam"`                    // Total Addressable Market
	SAM         MarketSize `json:"sam"`                    // Serviceable Addressable Market
	SOM         MarketSize `json:"som"`                    // Serviceable Obtainable Market
	GrowthRate  string     `json:"growth_rate,omitempty"`  // e.g., "46.3% CAGR"
	MarketStage string     `json:"market_stage,omitempty"` // Emerging, Growth, Mature, Declining
	Trends      []Trend    `json:"trends,omitempty"`
	Drivers     []string   `json:"drivers,omitempty"`  // What's driving growth
	Barriers    []string   `json:"barriers,omitempty"` // Barriers to entry
}

MarketOverview contains market size and growth analysis.

type MarketRequirement

type MarketRequirement struct {
	ID          string   `json:"id"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Priority    Priority `json:"priority"`
	Category    string   `json:"category,omitempty"`   // Capability, Integration, Support, etc.
	Source      string   `json:"source,omitempty"`     // Customer feedback, competitor analysis, etc.
	Validation  string   `json:"validation,omitempty"` // How this was validated
	Segments    []string `json:"segments,omitempty"`   // Which segments need this
	Personas    []string `json:"personas,omitempty"`   // Which personas need this
	Tags        []string `json:"tags,omitempty"`       // For filtering by topic/domain
}

MarketRequirement represents a market-level requirement.

type MarketSegment

type MarketSegment struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Size        string   `json:"size,omitempty"`       // Segment size
	Growth      string   `json:"growth,omitempty"`     // Segment growth rate
	Needs       []string `json:"needs,omitempty"`      // Key needs
	Challenges  []string `json:"challenges,omitempty"` // Key challenges
	Tags        []string `json:"tags,omitempty"`       // For filtering by topic/domain
}

MarketSegment represents a market segment.

type MarketSize

type MarketSize struct {
	Value  string `json:"value"`            // e.g., "$9.5B"
	Year   int    `json:"year,omitempty"`   // Reference year
	Source string `json:"source,omitempty"` // Citation
	Notes  string `json:"notes,omitempty"`
}

MarketSize represents a market size measurement.

type Metadata

type Metadata struct {
	ID        string     `json:"id"`
	Title     string     `json:"title"`
	Version   string     `json:"version"`
	Status    Status     `json:"status"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	Authors   []Person   `json:"authors"`
	Reviewers []Person   `json:"reviewers,omitempty"`
	Approvers []Approver `json:"approvers,omitempty"`
	Tags      []string   `json:"tags,omitempty"`
}

Metadata contains document metadata.

type Milestone

type Milestone struct {
	ID          string    `json:"id"`
	Name        string    `json:"name"`
	Description string    `json:"description,omitempty"`
	TargetDate  time.Time `json:"target_date,omitempty"`
	Status      string    `json:"status,omitempty"`
	Tags        []string  `json:"tags,omitempty"` // For filtering by topic/domain
}

Milestone represents a go-to-market milestone.

type Person

type Person = common.Person

Person is an alias for common.Person for backwards compatibility.

type Positioning

type Positioning struct {
	Statement       string   `json:"statement"` // Positioning statement
	TargetAudience  string   `json:"target_audience"`
	Category        string   `json:"category"` // Market category
	KeyBenefits     []string `json:"key_benefits"`
	Differentiators []string `json:"differentiators"`
	ProofPoints     []string `json:"proof_points,omitempty"` // Evidence supporting claims
	Tagline         string   `json:"tagline,omitempty"`
}

Positioning defines market positioning strategy.

type PricingStrategy

type PricingStrategy struct {
	Model       string        `json:"model"` // Subscription, Usage, Perpetual, Freemium
	Tiers       []PricingTier `json:"tiers,omitempty"`
	Positioning string        `json:"positioning,omitempty"` // Premium, Mid-market, Value
	Rationale   string        `json:"rationale,omitempty"`
}

PricingStrategy defines pricing approach.

type PricingTier

type PricingTier struct {
	Name        string   `json:"name"`
	Price       string   `json:"price"`
	Billing     string   `json:"billing,omitempty"` // Monthly, Annual
	Features    []string `json:"features,omitempty"`
	TargetBuyer string   `json:"target_buyer,omitempty"`
}

PricingTier represents a pricing tier.

type Priority

type Priority string

Priority represents requirement priority.

const (
	PriorityMust   Priority = "must"
	PriorityShould Priority = "should"
	PriorityCould  Priority = "could"
	PriorityWont   Priority = "wont"
)

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"`
	Category    string   `json:"category,omitempty"` // Market, Competitive, Regulatory, etc.
	Tags        []string `json:"tags,omitempty"`     // For filtering by topic/domain
}

Risk represents a market risk.

type Status

type Status string

Status represents the document lifecycle status.

const (
	StatusDraft      Status = "draft"
	StatusInReview   Status = "in_review"
	StatusApproved   Status = "approved"
	StatusDeprecated Status = "deprecated"
)

type SuccessMetric

type SuccessMetric struct {
	ID                string   `json:"id"`
	Name              string   `json:"name"`
	Description       string   `json:"description"`
	Metric            string   `json:"metric"`
	Target            string   `json:"target"`
	Timeframe         string   `json:"timeframe,omitempty"`
	MeasurementMethod string   `json:"measurement_method,omitempty"`
	Tags              []string `json:"tags,omitempty"` // For filtering by topic/domain
}

SuccessMetric defines market success metrics.

type TargetMarket

type TargetMarket struct {
	PrimarySegments   []MarketSegment `json:"primary_segments"`
	SecondarySegments []MarketSegment `json:"secondary_segments,omitempty"`
	BuyerPersonas     []BuyerPersona  `json:"buyer_personas,omitempty"`
	Verticals         []string        `json:"verticals,omitempty"`        // Industry verticals
	GeographicFocus   []string        `json:"geographic_focus,omitempty"` // Regions
	CompanySize       []string        `json:"company_size,omitempty"`     // SMB, Mid-Market, Enterprise
}

TargetMarket defines the target market segments.

type Trend

type Trend struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Impact      string `json:"impact,omitempty"`    // High, Medium, Low
	Timeframe   string `json:"timeframe,omitempty"` // Near-term, Mid-term, Long-term
}

Trend represents a market trend.

Jump to

Keyboard shortcuts

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