roadmap

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 8 Imported by: 0

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

func Generate

func Generate(w io.Writer, input *GenerateInput) error

Generate writes a ROADMAP.md to w from the given input.

Types

type DiffInput

type DiffInput struct {
	Phases []GeneratePhase
}

DiffInput holds the DB-side data for comparison.

type DiffKind

type DiffKind string

DiffKind classifies a difference.

const (
	DiffStatusMismatch DiffKind = "status_mismatch"
	DiffTitleMismatch  DiffKind = "title_mismatch"
	DiffMissingInDB    DiffKind = "missing_in_db"
	DiffMissingInFile  DiffKind = "missing_in_file"
	DiffPhaseMissing   DiffKind = "phase_missing"
)

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.

type Phase

type Phase struct {
	Number int
	Title  string
	Theme  string
	Items  []Item
}

Phase is a themed grouping of RMIs.

type Roadmap

type Roadmap struct {
	InitiativeID string
	Repository   string
	Title        string
	Phases       []Phase
}

Roadmap is the parsed representation of a ROADMAP.md file.

func Parse

func Parse(r io.Reader) (*Roadmap, error)

Parse reads a ROADMAP.md from r and returns its structured representation.

Jump to

Keyboard shortcuts

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