Documentation
¶
Overview ¶
Package goals provides a framework-agnostic wrapper for goal-setting systems.
Organizations use either OKR (Objectives and Key Results) or V2MOM (Vision, Values, Methods, Obstacles, Measures) for strategic planning. This package provides a unified interface that supports both frameworks through a discriminated union pattern.
Use Goals in PRDs and roadmaps to support organizations using either framework, with common rendering and reporting regardless of the underlying goal system.
Index ¶
- type Framework
- type GoalItem
- type Goals
- func (g *Goals) GoalCount() int
- func (g *Goals) GoalItems() []GoalItem
- func (g *Goals) GoalLabel() string
- func (g *Goals) IsOKR() bool
- func (g *Goals) IsV2MOM() bool
- func (g *Goals) ResultCount() int
- func (g *Goals) ResultItems() []ResultItem
- func (g *Goals) ResultItemsByPhase() map[string][]ResultItem
- func (g *Goals) ResultLabel() string
- type ResultItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoalItem ¶
type GoalItem struct {
ID string `json:"id,omitempty"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Owner string `json:"owner,omitempty"`
Status string `json:"status,omitempty"`
Priority string `json:"priority,omitempty"`
Tags []string `json:"tags,omitempty"`
}
GoalItem represents a high-level goal that can be either: - An Objective (OKR framework) - A Method (V2MOM framework)
This abstraction enables framework-agnostic rendering for roadmaps, reports, and presentations.
type Goals ¶
type Goals struct {
// Framework identifies which goal system is in use ("okr" or "v2mom").
Framework Framework `json:"framework"`
// OKR contains OKR data when Framework is "okr".
OKR *okr.OKRSet `json:"okr,omitempty"`
// V2MOM contains V2MOM data when Framework is "v2mom".
V2MOM *v2mom.V2MOM `json:"v2mom,omitempty"`
}
Goals is a framework-agnostic container for organizational goals. It supports both OKR and V2MOM through a discriminated union pattern. Exactly one of OKR or V2MOM should be set based on the Framework field.
func (*Goals) GoalItems ¶
GoalItems returns all goals as a unified slice. Returns Objectives for OKR, Methods for V2MOM.
func (*Goals) GoalLabel ¶
GoalLabel returns the display label for goals. Returns "Objectives" for OKR, "Methods" for V2MOM.
func (*Goals) ResultCount ¶
ResultCount returns the number of results.
func (*Goals) ResultItems ¶
func (g *Goals) ResultItems() []ResultItem
ResultItems returns all measurable results as a unified slice. Returns Key Results for OKR, Measures for V2MOM.
func (*Goals) ResultItemsByPhase ¶
func (g *Goals) ResultItemsByPhase() map[string][]ResultItem
ResultItemsByPhase returns results grouped by phase ID.
func (*Goals) ResultLabel ¶
ResultLabel returns the display label for results. Returns "Key Results" for OKR, "Measures" for V2MOM.
type ResultItem ¶
type ResultItem struct {
ID string `json:"id,omitempty"`
Title string `json:"title"`
Metric string `json:"metric,omitempty"`
Baseline string `json:"baseline,omitempty"`
Target string `json:"target,omitempty"`
Current string `json:"current,omitempty"`
Unit string `json:"unit,omitempty"`
Status string `json:"status,omitempty"`
Score float64 `json:"score,omitempty"` // 0.0-1.0 achievement score
GoalID string `json:"goalId,omitempty"`
PhaseID string `json:"phaseId,omitempty"` // For roadmap alignment
PhaseTarget string `json:"phaseTarget,omitempty"` // Target for specific phase
}
ResultItem represents a measurable result that can be either: - A Key Result (OKR framework) - A Measure (V2MOM framework)
This abstraction enables framework-agnostic rendering for tracking and reporting.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package okr provides types and utilities for OKR (Objectives and Key Results) goal-setting documents.
|
Package okr provides types and utilities for OKR (Objectives and Key Results) goal-setting documents. |
|
render
Package render provides interfaces and utilities for rendering OKR documents to various output formats including Marp slides.
|
Package render provides interfaces and utilities for rendering OKR documents to various output formats including Marp slides. |
|
render/marp
Package marp provides a Marp markdown renderer for OKR documents.
|
Package marp provides a Marp markdown renderer for OKR documents. |
|
Package v2mom provides types and utilities for V2MOM strategic planning documents.
|
Package v2mom provides types and utilities for V2MOM strategic planning documents. |
|
render
Package render provides interfaces and utilities for rendering V2MOM documents to various output formats.
|
Package render provides interfaces and utilities for rendering V2MOM documents to various output formats. |
|
render/marp
Package marp provides a Marp markdown renderer for V2MOM documents.
|
Package marp provides a Marp markdown renderer for V2MOM documents. |