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 ¶
- Variables
- func IsDefaultProfile(name string) bool
- func WriteProfileYAML(path string, py *ProfileYAML) error
- type Loader
- type Profile
- func (p *Profile) GetRubricLoader() rubrics.Loader
- func (p *Profile) GetSpecConfig() *types.SpecConfig
- func (p *Profile) GetTemplateLoader() templates.Loader
- func (p *Profile) Merge(parent *Profile) *Profile
- func (p *Profile) RequiredSpecs() []string
- func (p *Profile) Summary() string
- func (p *Profile) Validate() error
- type ProfileYAML
Constants ¶
This section is empty.
Variables ¶
var DefaultProfileNames = []string{
"0-1", "startup", "growth", "enterprise",
"aws", "google", "stripe", "lean-startup", "design-thinking", "jtbd",
}
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: Amazon Working Backwards with Leadership Principles
- google: Google Design Docs + RFC culture with OKRs
- 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
Functions ¶
func IsDefaultProfile ¶
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 ¶
NewChainLoader creates a loader that tries multiple loaders in order.
func NewEmbedFSLoader ¶
NewEmbedFSLoader creates a loader from an embedded filesystem. The dir parameter specifies the base directory within the embed.FS.
func NewFileLoader ¶
NewFileLoader creates a loader from a filesystem directory.
func NewResolvingLoader ¶
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 ¶
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 ¶
GetTemplateLoader returns the template loader, falling back to default.
func (*Profile) Merge ¶
Merge combines this profile with a parent profile. Settings from this profile override the parent.
func (*Profile) RequiredSpecs ¶
RequiredSpecs returns the list of required spec names.
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.