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

layout

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package layout defines filesystem conventions for specification projects.

A typical visionspec project layout:

project/
├── source/           # Source specs (human-authored)
│   ├── mrd.md
│   ├── prd.md
│   └── uxd.md
├── gtm/              # GTM specs (synthesized)
│   ├── press.md
│   ├── faq.md
│   └── narrative-6p.md
├── technical/        # Technical specs
│   ├── trd.md
│   └── ird.md
├── strategic/        # Strategic planning (V2MOM)
│   └── v2mom-vision.md
├── execution/        # Execution phase specs
│   └── tpd.md
├── evals/            # Evaluation results
│   ├── mrd.eval.json
│   └── prd.eval.json
├── spec.md           # Reconciled output spec
└── current-truth.md  # Post-ship state

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

type Layout struct {
	// SourceDir is the directory for source specs (default: "source").
	SourceDir string `json:"source_dir,omitempty" yaml:"source_dir,omitempty"`

	// GTMDir is the directory for GTM specs (default: "gtm").
	GTMDir string `json:"gtm_dir,omitempty" yaml:"gtm_dir,omitempty"`

	// TechnicalDir is the directory for technical specs (default: "technical").
	TechnicalDir string `json:"technical_dir,omitempty" yaml:"technical_dir,omitempty"`

	// StrategicDir is the directory for strategic specs (default: "strategic").
	StrategicDir string `json:"strategic_dir,omitempty" yaml:"strategic_dir,omitempty"`

	// ExecutionDir is the directory for execution specs (default: "execution").
	ExecutionDir string `json:"execution_dir,omitempty" yaml:"execution_dir,omitempty"`

	// EvalDir is the directory for evaluation results (default: "evals").
	EvalDir string `json:"eval_dir,omitempty" yaml:"eval_dir,omitempty"`

	// SpecExtension is the file extension for specs (default: ".md").
	SpecExtension string `json:"spec_extension,omitempty" yaml:"spec_extension,omitempty"`

	// EvalExtension is the file extension for evals (default: ".eval.json").
	EvalExtension string `json:"eval_extension,omitempty" yaml:"eval_extension,omitempty"`
}

Layout defines the filesystem layout for a specification project.

func DefaultLayout

func DefaultLayout() *Layout

DefaultLayout returns the default filesystem layout.

func (*Layout) AllDirs

func (l *Layout) AllDirs() []string

AllDirs returns all spec directories (excluding root/output).

func (*Layout) CategoryDirs

func (l *Layout) CategoryDirs() map[string]string

CategoryDirs returns a map of category to directory.

func (*Layout) DirForCategory

func (l *Layout) DirForCategory(category string) string

DirForCategory returns the directory for a given category.

func (*Layout) EvalFilename

func (l *Layout) EvalFilename(specType string) string

EvalFilename returns the evaluation filename for a spec type.

func (*Layout) EvalPath

func (l *Layout) EvalPath(specType string) string

EvalPath returns the full path for an evaluation result, relative to project root. Always uses forward slashes for cross-platform consistency.

func (*Layout) EvalPathAbs

func (l *Layout) EvalPathAbs(projectRoot, specType string) string

EvalPathAbs returns the absolute path for an evaluation result.

func (*Layout) SpecFilename

func (l *Layout) SpecFilename(specType string) string

SpecFilename returns the filename for a spec type.

func (*Layout) SpecPath

func (l *Layout) SpecPath(specType, category string) string

SpecPath returns the full path for a spec, relative to the project root. Always uses forward slashes for cross-platform consistency.

func (*Layout) SpecPathAbs

func (l *Layout) SpecPathAbs(projectRoot, specType, category string) string

SpecPathAbs returns the absolute path for a spec.

Jump to

Keyboard shortcuts

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