Documentation
¶
Overview ¶
Package augment defines locally-authored data layered on top of synced canonical items: prioritization (MoSCoW, Kano, RICE), OKR links, and notes. Augments are keyed by the source system's stable reference (e.g. an Aha reference number like "MYPROJ-123"), not by the synced row — sync overwrites provider data wholesale but never touches augments, so local judgments survive every re-sync. Apply overlays augments onto items at read time, with augment values winning over provider- or fieldmap-derived ones.
Index ¶
Constants ¶
const ( MetadataKeyOKRRefs = "augment.okr_refs" MetadataKeyNotes = "augment.notes" )
Metadata keys under which non-canonical augment fields surface on an applied Item's Metadata map.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(items []provider.Item, augs []ItemAugment)
Apply overlays augments onto items in place. Matching is by (Provider, SourceRef), falling back to (Provider, SourceID) for items without a ref. Augment values win over what sync stored.
Types ¶
type ItemAugment ¶
type ItemAugment struct {
Provider string `json:"provider"`
// SourceRef is the source system's human-facing reference (e.g.
// "MYPROJ-123"); for providers without refs, the source ID.
SourceRef string `json:"source_ref"`
// MoSCoW: must_have|should_have|could_have|wont_have; "" = unset.
MoSCoW string `json:"moscow,omitempty"`
// Kano: must-be|performance|attractive|indifferent|reverse|
// questionable; "" = unset.
Kano string `json:"kano,omitempty"`
// RICE components; set components override same-name components from
// the synced item, unset ones leave them intact.
RICE *provider.RICE `json:"rice,omitempty"`
// OKRRefs links the item to OKR documents/objectives (e.g.
// prism-roadmap objective IDs).
OKRRefs []string `json:"okr_refs,omitempty"`
Notes string `json:"notes,omitempty"`
// Metadata holds further augmentation fields; on Apply, keys surface on
// the item's Metadata prefixed "augment.".
Metadata map[string]any `json:"metadata,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
ItemAugment is locally-authored data for one item, keyed by (Provider, SourceRef).
func (*ItemAugment) IsZero ¶
func (a *ItemAugment) IsZero() bool
IsZero reports whether the augment carries no data (every augmentable field unset) — useful for treating a fully-cleared augment as deletable.
func (*ItemAugment) Key ¶
func (a *ItemAugment) Key() string
Key returns the canonical augment key, "<provider>:<source_ref>".