Documentation
¶
Overview ¶
Package roadmap parses and generates ROADMAP.md files that mirror the PRISM Control database state. The canonical format uses:
## Phase N — Title **Theme:** ... - [x] `RMI-REPO-NNN` Title - Depends on: `RMI-REPO-001`, `RMI-REPO-002`
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiffInput ¶
type DiffInput struct {
Phases []GeneratePhase
}
DiffInput holds the DB-side data for comparison.
type Difference ¶
type Difference struct {
Kind DiffKind
RMIID string
PhaseID string
File string // value from the file
DB string // value from the DB
Message string
}
Difference describes one discrepancy between a ROADMAP.md and the DB.
func Diff ¶
func Diff(parsed *Roadmap, db *DiffInput) []Difference
Diff compares a parsed ROADMAP.md against DB state and returns differences.
type GenerateInput ¶
type GenerateInput struct {
Initiative *store.Initiative
Phases []GeneratePhase
Deps []*store.RMIDependency
}
GenerateInput holds the data needed to generate a ROADMAP.md.
type GeneratePhase ¶
type GeneratePhase struct {
Phase *store.Phase
RMIs []*store.RoadmapItem
}
GeneratePhase is a phase with its RMIs for generation.
type ImportAction ¶
type ImportAction struct {
Entity string // "phase", "rmi", "dependency"
ID string
Action string // "created", "updated", "unchanged", "skipped"
Detail string
}
ImportAction describes what happened to one entity during import.
type Importer ¶
type Importer struct {
Store store.Store
CreateRMI func(ctx context.Context, id, repoID, initiativeID, phaseID, title, desc, itemType, priority string, required bool, seq int, acceptance []string) error
CreatePhase func(ctx context.Context, id, initiativeID string, seq int, title, theme string) error
CreateDep func(ctx context.Context, sourceID, targetID, relationship string) error
UpdateRMI func(ctx context.Context, rmi *store.RoadmapItem) error
UpdatePhase func(ctx context.Context, phase *store.Phase) error
}
Importer creates or updates DB entities from a parsed Roadmap.
func (*Importer) Import ¶
func (imp *Importer) Import(ctx context.Context, parsed *Roadmap, defaultRepo, defaultType string, dryRun bool) ([]ImportAction, error)
Import processes a parsed Roadmap, creating or updating entities. defaultRepo is the repository ID to use for new RMIs. defaultType is the item type for new RMIs (e.g. "capability").
type Item ¶
type Item struct {
ID string
Title string
Completed bool
DependsOn []string
Description string // sub-bullet text (Delivered, Acceptance, etc.)
}
Item is a parsed RMI line.