export

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

ABOUTME: Dynamic DOT pipeline generation from SpecState, replacing the old fixed 10-node template. ABOUTME: Analyzes spec cards to build topology-aware graphs: sequential chains, parallel branches, gates.

ABOUTME: Shared lane ordering and card grouping logic for all exporters. ABOUTME: Produces deterministic lane order: Ideas, Plan, Spec first, then extra lanes alphabetically.

ABOUTME: Exports a SpecState as a deterministic Markdown document. ABOUTME: Sections follow spec Section 9.1 ordering: header, optional fields, then lanes with cards.

ABOUTME: Exports a SpecState as a structured YAML document matching spec.yaml format. ABOUTME: Uses gopkg.in/yaml.v3 for serialization with deterministic ordering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportDOT

func ExportDOT(state *core.SpecState) (string, error)

ExportDOT generates a DOT pipeline graph from the spec state. The pipeline topology reflects the actual spec structure. Returns the DOT string and any validation warnings.

func ExportGraph

func ExportGraph(state *core.SpecState) *dot.Graph

ExportGraph generates a dot.Graph from the spec state. This is the lower-level API; ExportDOT serializes the result.

func ExportMarkdown

func ExportMarkdown(state *core.SpecState) string

ExportMarkdown renders a SpecState as a Markdown string with deterministic ordering.

Lane ordering: Ideas, Plan, Spec first (in that order), then any other lanes sorted alphabetically. Cards within each lane are ordered by their order field (float64), with card_id string comparison as a tiebreaker.

func ExportYAML

func ExportYAML(state *core.SpecState) (string, error)

ExportYAML exports the spec state as structured YAML matching the spec.yaml format.

Uses the same deterministic ordering as the Markdown exporter: Ideas, Plan, Spec first, then extra lanes alphabetically. Cards within lanes sorted by order then card_id.

Types

type YamlCard

type YamlCard struct {
	ID        string   `yaml:"id"`
	CardType  string   `yaml:"type"`
	Title     string   `yaml:"title"`
	Body      string   `yaml:"body,omitempty"`
	Order     float64  `yaml:"order"`
	Refs      []string `yaml:"refs,omitempty"`
	CreatedBy string   `yaml:"created_by"`
}

YamlCard is a serializable YAML representation of a single card within a lane.

type YamlLane

type YamlLane struct {
	Name  string     `yaml:"name"`
	Cards []YamlCard `yaml:"cards"`
}

YamlLane is a serializable YAML representation of a lane containing cards.

type YamlSpec

type YamlSpec struct {
	Name            string     `yaml:"name"`
	Version         string     `yaml:"version"`
	OneLiner        string     `yaml:"one_liner"`
	Goal            string     `yaml:"goal"`
	Description     string     `yaml:"description,omitempty"`
	Constraints     string     `yaml:"constraints,omitempty"`
	SuccessCriteria string     `yaml:"success_criteria,omitempty"`
	Risks           string     `yaml:"risks,omitempty"`
	Notes           string     `yaml:"notes,omitempty"`
	Lanes           []YamlLane `yaml:"lanes"`
}

YamlSpec is the top-level serializable YAML representation of the spec state.

Jump to

Keyboard shortcuts

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