spectype

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package spectype defines the registry of specification document types.

Each SpecType represents a distinct document artifact in a specification workflow (e.g., PRD, MRD, Press Release, FAQ, 6-Pager).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorshipMode

type AuthorshipMode string

AuthorshipMode indicates whether a spec is typically human-authored or LLM-synthesized.

const (
	// AuthorshipHuman indicates the spec is primarily human-authored.
	AuthorshipHuman AuthorshipMode = "human"

	// AuthorshipSynthesized indicates the spec is primarily LLM-synthesized.
	AuthorshipSynthesized AuthorshipMode = "synthesized"

	// AuthorshipHybrid indicates the spec involves both human and LLM authorship.
	AuthorshipHybrid AuthorshipMode = "hybrid"
)

type Category

type Category string

Category groups spec types by their role in the workflow.

const (
	// CategorySource represents human-authored discovery documents.
	CategorySource Category = "source"

	// CategoryGTM represents go-to-market documents (often synthesized).
	CategoryGTM Category = "gtm"

	// CategoryTechnical represents technical specification documents.
	CategoryTechnical Category = "technical"

	// CategoryExecution represents execution tracking documents.
	CategoryExecution Category = "execution"

	// CategoryOutput represents reconciled output documents.
	CategoryOutput Category = "output"

	// CategoryStrategic represents strategic planning documents (e.g., V2MOM).
	CategoryStrategic Category = "strategic"
)

type SpecType

type SpecType struct {
	// ID is the canonical identifier (e.g., "prd", "press", "narrative-6p").
	ID string `json:"id" jsonschema:"required,description=Canonical identifier for the spec type"`

	// Name is the human-readable name (e.g., "Product Requirements Document").
	Name string `json:"name" jsonschema:"required,description=Human-readable name"`

	// ShortName is an abbreviated name for UI display (e.g., "PRD", "6-Pager").
	ShortName string `json:"shortName,omitempty" jsonschema:"description=Abbreviated name for compact display"`

	// Description explains the purpose of this spec type.
	Description string `json:"description,omitempty" jsonschema:"description=Purpose and usage of this spec type"`

	// Category groups this spec type (source, gtm, technical, etc.).
	Category Category `json:"category" jsonschema:"required,enum=source,enum=gtm,enum=technical,enum=execution,enum=output,enum=strategic"`

	// Authorship indicates typical authorship mode.
	Authorship AuthorshipMode `json:"authorship" jsonschema:"required,enum=human,enum=synthesized,enum=hybrid"`

	// Filename is the canonical filename (e.g., "PRD.md", "press.md").
	Filename string `json:"filename" jsonschema:"required,description=Canonical filename for this spec"`

	// EvalFilename is the filename for evaluation results (e.g., "PRD.eval.json").
	EvalFilename string `json:"evalFilename,omitempty" jsonschema:"description=Filename for LLM-as-Judge evaluation results"`

	// Origins lists the methodologies that use this spec type.
	Origins []string `json:"origins,omitempty" jsonschema:"description=Methodologies that originated or use this spec type"`

	// Aliases are alternative names for this spec type.
	Aliases []string `json:"aliases,omitempty" jsonschema:"description=Alternative names or abbreviations"`
}

SpecType defines a specification document type in the registry.

func CoreSpecTypes

func CoreSpecTypes() []SpecType

CoreSpecTypes returns the built-in spec type definitions.

type SpecTypeRegistry

type SpecTypeRegistry struct {
	// Version is the schema version for this registry.
	Version string `json:"version" jsonschema:"required,description=Schema version"`

	// Types is the list of registered spec types.
	Types []SpecType `json:"types" jsonschema:"required,description=Registered specification types"`
}

SpecTypeRegistry is a collection of spec type definitions.

Jump to

Keyboard shortcuts

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