schema

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomFieldDef

type CustomFieldDef struct {
	ent.Schema
}

CustomFieldDef holds a custom field definition (schema/metadata, not per-record values) synced from a provider.

func (CustomFieldDef) Fields

func (CustomFieldDef) Fields() []ent.Field

Fields of the CustomFieldDef.

func (CustomFieldDef) Indexes

func (CustomFieldDef) Indexes() []ent.Index

Indexes of the CustomFieldDef.

type DimensionOption

type DimensionOption struct {
	ent.Schema
}

DimensionOption holds one selectable option within a PortfolioDimension (e.g. Kano's "must_be", or a custom dimension's "ai"), including the judge Questions used to determine whether an opportunity belongs to it. Rows reference their parent PortfolioDimension by a plain string column (DimensionRowID), matching this repo's existing flat-table style (no Ent edges are used elsewhere in ent/schema).

func (DimensionOption) Fields

func (DimensionOption) Fields() []ent.Field

Fields of the DimensionOption.

func (DimensionOption) Indexes

func (DimensionOption) Indexes() []ent.Index

Indexes of the DimensionOption.

type Evidence

type Evidence struct {
	ent.Schema
}

Evidence holds one independently referenceable assessment.Evidence record (github.com/grokify/prism-roadmap/assessment RMI-PRISMROADMAP-001) as the normative record, plus indexed projection columns for the staleness sweep (prism-roadmap PRD FR11). Reverse lookup ("which assessments cite this evidence") is intentionally NOT a persisted table here either — the same reasoning as PortfolioDimension's doc comment: OpportunityAssessment.Canonical already carries every citation, and assessment.OpportunityAssessment.EvidenceReferences() + assessment.NewEvidenceIndex already answer the query over the in-memory corpus (see store.DoltStore.EvidenceCitations).

func (Evidence) Fields

func (Evidence) Fields() []ent.Field

Fields of the Evidence.

func (Evidence) Indexes

func (Evidence) Indexes() []ent.Index

Indexes of the Evidence.

type Item

type Item struct {
	ent.Schema
}

Item holds the canonical, tool-agnostic roadmap item (feature, epic, initiative, objective, key result) synced from a provider. Common fields are flattened into columns for indexing/filtering; the long tail (custom fields, RICE, provider metadata) is stored as JSON.

func (Item) Fields

func (Item) Fields() []ent.Field

Fields of the Item.

func (Item) Indexes

func (Item) Indexes() []ent.Index

Indexes of the Item.

type ItemAugment

type ItemAugment struct {
	ent.Schema
}

ItemAugment holds locally-authored data layered on top of a synced Item — prioritization (MoSCoW, Kano, RICE), OKR links, and notes. It is keyed by the source system's stable human-facing reference (e.g. an Aha reference number like "MYPROJ-123") rather than the item row, so it survives re-syncs: sync overwrites the items table wholesale and never touches this table. Reads overlay augments onto items, with augment values winning over provider/fieldmap-derived ones.

func (ItemAugment) Fields

func (ItemAugment) Fields() []ent.Field

Fields of the ItemAugment.

func (ItemAugment) Indexes

func (ItemAugment) Indexes() []ent.Index

Indexes of the ItemAugment.

type OpportunityAssessment

type OpportunityAssessment struct {
	ent.Schema
}

OpportunityAssessment holds the canonical Opportunity Assessment IR (github.com/grokify/prism-roadmap/assessment.OpportunityAssessment) as the normative record, plus indexed projection columns rebuilt deterministically from it by the store layer at save time — never hand-written independently of it (prism-roadmap TRD: "omniroadmap relational fields = indexed/materialized projection"). Distinct from Item/ItemAugment: an Item is a provider-synced roadmap entry; an OpportunityAssessment is an evidence-backed judgment record produced by the rubric-driven prioritization system (INIT-PRISMROADMAP-001).

func (OpportunityAssessment) Fields

func (OpportunityAssessment) Fields() []ent.Field

Fields of the OpportunityAssessment.

func (OpportunityAssessment) Indexes

func (OpportunityAssessment) Indexes() []ent.Index

Indexes of the OpportunityAssessment.

type OpportunitySpec

type OpportunitySpec struct {
	ent.Schema
}

OpportunitySpec holds the canonical canvas.OpportunitySpec IR (the normative record) plus indexed projection columns rebuilt deterministically from it at save time — same discipline as OpportunityAssessment/Evidence ("omniroadmap relational fields = indexed/materialized projection").

Nothing in omniroadmap persisted OpportunitySpec before this schema: assessment.OpportunityAssessment only ever references a spec by Opportunity.SpecID (a string), by design ("the spec is a human-authored discovery document with its own lifecycle" — prism-roadmap assessment.OpportunityRef doc comment). This table is that missing home.

func (OpportunitySpec) Fields

func (OpportunitySpec) Fields() []ent.Field

Fields of the OpportunitySpec.

func (OpportunitySpec) Indexes

func (OpportunitySpec) Indexes() []ent.Index

Indexes of the OpportunitySpec.

type PortfolioDimension

type PortfolioDimension struct {
	ent.Schema
}

PortfolioDimension holds a versioned portfolio dimension definition — Kano, Market Investment Horizon (both registered as built-in at migrate/seed time), or an organization-defined custom dimension (e.g. a "2026 Strategic Priority: AI/Growth/Excellence" category). Registering a new custom dimension is an INSERT into this table and DimensionOption, never a schema migration (prism-roadmap PRD FR4).

This table is deliberately just the definition registry — it does NOT duplicate per-opportunity dimension ASSIGNMENTS in a normalized junction table. Assignments already round-trip through OpportunityAssessment.Canonical (RMI-OMNIROADMAP-001)'s typed JSON, and portfolio-wide aggregation already has a home: assessment.ComputeDimensionDistribution operates directly on the in-memory []*OpportunityAssessment corpus. A redundant assignment table would duplicate that normative record for no query capability this repo actually needs yet.

func (PortfolioDimension) Fields

func (PortfolioDimension) Fields() []ent.Field

Fields of the PortfolioDimension.

func (PortfolioDimension) Indexes

func (PortfolioDimension) Indexes() []ent.Index

Indexes of the PortfolioDimension.

type ProfileAssignment

type ProfileAssignment struct {
	ent.Schema
}

ProfileAssignment holds the two-phase (LLM-proposed, PM-confirmed) primary COMPASS-RICE investment thesis for one opportunity (github.com/grokify/prism-roadmap/assessment.ProfileAssignment, RMI-PRISMROADMAP-017). One row per opportunity spec, matching RankOverride's one-row-per-key shape: an opportunity has at most one current profile assignment (proposed, confirmed, or rejected) at a time. Unlike OpportunityAssessment/Evidence, ProfileAssignment has no nested sub-structures that would lose information when flattened to columns, so it is fully decomposed rather than carrying a canonical JSON blob — following RankOverride's precedent, not the hybrid pattern.

func (ProfileAssignment) Fields

func (ProfileAssignment) Fields() []ent.Field

Fields of the ProfileAssignment.

func (ProfileAssignment) Indexes

func (ProfileAssignment) Indexes() []ent.Index

Indexes of the ProfileAssignment.

type RankOverride

type RankOverride struct {
	ent.Schema
}

RankOverride holds a governance decision to move an opportunity away from its calculated rank (github.com/grokify/prism-roadmap/assessment RankOverride, RMI-PRISMROADMAP-004) — recorded as evidence, never applied by quietly reweighting RICE/MoSCoW inputs to manufacture a desired number. One row per assessment ID: an assessment either has an active override or it doesn't, matching assessment.ApplyOverrides' keyed-by-AssessmentID lookup.

func (RankOverride) Fields

func (RankOverride) Fields() []ent.Field

Fields of the RankOverride.

func (RankOverride) Indexes

func (RankOverride) Indexes() []ent.Index

Indexes of the RankOverride.

type Release

type Release struct {
	ent.Schema
}

Release holds a canonical release/milestone synced from a provider.

func (Release) Fields

func (Release) Fields() []ent.Field

Fields of the Release.

func (Release) Indexes

func (Release) Indexes() []ent.Index

Indexes of the Release.

type ReportDataset

type ReportDataset struct {
	ent.Schema
}

ReportDataset holds one compile run's output (github.com/grokify/prism-roadmap/assessment.ReportDataset, RMI-PRISMROADMAP-010) as the normative record. Every compile produces a NEW row — datasets are never mutated in place, mirroring OpportunityAssessment's own cycle-history discipline. Status tracks where a dataset sits in the PM review workflow: "draft" (just compiled, awaiting review) or "final" (reviewed and rank-materialized — RMI-OMNIROADMAP-006).

func (ReportDataset) Fields

func (ReportDataset) Fields() []ent.Field

Fields of the ReportDataset.

func (ReportDataset) Indexes

func (ReportDataset) Indexes() []ent.Index

Indexes of the ReportDataset.

type SyncMeta

type SyncMeta struct {
	ent.Schema
}

SyncMeta tracks the last sync time and record count per (provider, kind), mirroring aha-studio's sync_meta pattern.

func (SyncMeta) Annotations

func (SyncMeta) Annotations() []schema.Annotation

Annotations of the SyncMeta.

func (SyncMeta) Fields

func (SyncMeta) Fields() []ent.Field

Fields of the SyncMeta.

func (SyncMeta) Indexes

func (SyncMeta) Indexes() []ent.Index

Indexes of the SyncMeta.

Jump to

Keyboard shortcuts

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