Help us shape the future of Go! Take the 2026 Go Developer Survey

profiles

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package profiles provides reusable configuration profiles for visionspec.

Profiles bundle together spec requirements, templates, and rubrics into a cohesive configuration that can be selected at runtime or compiled into custom CLI tools.

Default profiles are provided for common product stages:

  • 0-1: Minimal configuration for idea validation
  • startup: Lightweight configuration for pre-PMF startups
  • growth: Metrics-driven configuration for 1-N scaling
  • enterprise: Comprehensive configuration for post-PMF enterprises

Organizations can create custom profiles that extend default profiles or define entirely new configurations.

Index

Constants

This section is empty.

Variables

View Source
var DefaultProfileNames = []string{

	"0-1", "startup", "growth", "enterprise",

	"aws-product", "aws-feature",

	"google", "stripe", "lean-startup", "design-thinking", "jtbd", "shapeup", "continuous-discovery",

	"big-tech", "big-tech-product", "big-tech-feature",

	"big-tech-essentials", "big-tech-essentials-product", "big-tech-essentials-feature",
}

DefaultProfileNames returns the names of all default profiles.

Stage-based profiles (by company maturity):

  • 0-1: Pre-product-market-fit exploration
  • startup: Early product development
  • growth: Scaling product and team
  • enterprise: Mature organization with compliance needs

Methodology profiles (by product development approach):

  • aws-product: Amazon Working Backwards for new products
  • aws-feature: Amazon Working Backwards for features
  • google: Google Design Docs + RFC culture with OKRs
  • stripe: Stripe API-first development
  • lean-startup: Eric Ries' Build-Measure-Learn with validated learning
  • design-thinking: Stanford d.school human-centered design
  • jtbd: Clayton Christensen's Jobs-to-be-Done framework
  • shapeup: Basecamp Shape Up methodology
  • continuous-discovery: Teresa Torres Continuous Discovery Habits

Big Tech profiles (combines 10 methodologies):

  • big-tech: Abstract base for big-tech-product and big-tech-feature
  • big-tech-product: Full 10-company synthesis for new products
  • big-tech-feature: Full 10-company synthesis for features

Big Tech Essentials profiles (simplified 3-company synthesis):

  • big-tech-essentials: Abstract base (Amazon + Google + Stripe only)
  • big-tech-essentials-product: Essentials for new products
  • big-tech-essentials-feature: Essentials for features

Functions

func IsDefaultProfile

func IsDefaultProfile(name string) bool

IsDefaultProfile returns true if the name is a default profile.

func WriteProfileYAML

func WriteProfileYAML(path string, py *ProfileYAML) error

WriteProfileYAML writes a ProfileYAML to a file.

Types

type Loader

type Loader interface {
	// Load returns a profile by name.
	Load(name string) (*Profile, error)

	// Available returns all available profile names.
	Available() []string
}

Loader loads profiles by name.

func DefaultLoader

func DefaultLoader() Loader

DefaultLoader returns a loader for built-in default profiles.

func NewChainLoader

func NewChainLoader(loaders ...Loader) Loader

NewChainLoader creates a loader that tries multiple loaders in order.

func NewEmbedFSLoader

func NewEmbedFSLoader(fsys embed.FS, dir string) Loader

NewEmbedFSLoader creates a loader from an embedded filesystem. The dir parameter specifies the base directory within the embed.FS.

func NewFileLoader

func NewFileLoader(dir string) Loader

NewFileLoader creates a loader from a filesystem directory.

func NewResolvingLoader

func NewResolvingLoader(base Loader) Loader

NewResolvingLoader creates a loader that resolves profile inheritance.

type Profile

type Profile struct {
	// Name is the profile identifier (e.g., "startup", "enterprise").
	Name string `yaml:"name" json:"name"`

	// Description explains the profile's purpose and use case.
	Description string `yaml:"description" json:"description"`

	// Extends is the name of a parent profile to inherit from.
	// Settings from this profile override the parent.
	Extends string `yaml:"extends,omitempty" json:"extends,omitempty"`

	// SpecConfig defines which specs are required and their settings.
	SpecConfig *types.SpecConfig `yaml:"spec_config,omitempty" json:"spec_config,omitempty"`

	// TemplateLoader provides templates for this profile.
	// Set by the loader, not from YAML.
	TemplateLoader templates.Loader `yaml:"-" json:"-"`

	// RubricLoader provides rubrics for this profile.
	// Set by the loader, not from YAML.
	RubricLoader rubrics.Loader `yaml:"-" json:"-"`

	// Path is the filesystem path where the profile was loaded from.
	// Empty for embedded profiles.
	Path string `yaml:"-" json:"-"`
}

Profile represents a complete visionspec configuration profile.

func (*Profile) GetRubricLoader

func (p *Profile) GetRubricLoader() rubrics.Loader

GetRubricLoader returns the rubric loader, falling back to default.

func (*Profile) GetSpecConfig

func (p *Profile) GetSpecConfig() *types.SpecConfig

GetSpecConfig returns the effective SpecConfig, merging with parent if extends is set.

func (*Profile) GetTemplateLoader

func (p *Profile) GetTemplateLoader() templates.Loader

GetTemplateLoader returns the template loader, falling back to default.

func (*Profile) Merge

func (p *Profile) Merge(parent *Profile) *Profile

Merge combines this profile with a parent profile. Settings from this profile override the parent.

func (*Profile) RequiredSpecs

func (p *Profile) RequiredSpecs() []string

RequiredSpecs returns the list of required spec names.

func (*Profile) Summary

func (p *Profile) Summary() string

Summary returns a short description for display.

func (*Profile) Validate

func (p *Profile) Validate() error

Validate checks if the profile is valid.

type ProfileYAML

type ProfileYAML struct {
	Name        string                            `yaml:"name"`
	Description string                            `yaml:"description"`
	Extends     string                            `yaml:"extends,omitempty"`
	SpecConfig  map[string]*types.SpecRequirement `yaml:"spec_config,omitempty"`
}

ProfileYAML is the YAML representation of a profile.

func ProfileToYAML

func ProfileToYAML(p *Profile) *ProfileYAML

ProfileToYAML converts a Profile back to ProfileYAML for serialization.

func (*ProfileYAML) ToProfile

func (py *ProfileYAML) ToProfile() *Profile

ToProfile converts ProfileYAML to a Profile.

Jump to

Keyboard shortcuts

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