config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config handles configuration loading for visionspec.

Index

Constants

View Source
const (
	// ConfigFileName is the canonical config file name.
	ConfigFileName = "visionspec.yaml"

	// LegacyConfigFileName supports migration from multispec.
	LegacyConfigFileName = "multispec.yaml"

	// SpecsDir is the canonical specs directory name.
	SpecsDir = "docs/specs"

	// ConstitutionFile is the repo-level constitution file name.
	ConstitutionFile = "CONSTITUTION.md"

	// RoadmapFile is the repo-level roadmap file name.
	RoadmapFile = "ROADMAP.md"
)
View Source
const (
	SourceDir    = "source"
	GTMDir       = "gtm"
	TechnicalDir = "technical"
	EvalDir      = "eval"
)

Subdirectories within a project.

Variables

This section is empty.

Functions

func EvalPath

func EvalPath(projectPath string, specType types.SpecType) string

EvalPath returns the full path for an eval file within a project.

func FindConstitution

func FindConstitution(projectPath string) string

FindConstitution finds the constitution file from multiple locations. Search order (first found wins): 1. Repo-level: docs/specs/CONSTITUTION.md (from project path) 2. Org-level: ~/.config/visionspec/CONSTITUTION.md Returns the path if found, empty string otherwise.

func FindProjectRoot

func FindProjectRoot(startPath string) (string, error)

FindProjectRoot finds the project root by looking for visionspec.yaml (or legacy multispec.yaml).

func FindSpecsDir

func FindSpecsDir(startPath string) (string, error)

FindSpecsDir finds the specs directory from the current path.

func Load

func Load(projectPath string) (*types.Project, error)

Load loads the project configuration from visionspec.yaml (or legacy multispec.yaml).

func LoadConstitution

func LoadConstitution(projectPath string) string

LoadConstitution loads the constitution content from the first found location. Returns empty string if no constitution file exists.

func ProjectPath

func ProjectPath(specsDir, projectName string) string

ProjectPath returns the full path for a project within the specs directory.

func Save

func Save(project *types.Project) error

Save saves the project configuration to visionspec.yaml.

func SpecPath

func SpecPath(projectPath string, specType types.SpecType) string

SpecPath returns the full path for a spec file within a project.

Types

This section is empty.

Jump to

Keyboard shortcuts

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