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 ¶
- type Layout
- func (l *Layout) AllDirs() []string
- func (l *Layout) CategoryDirs() map[string]string
- func (l *Layout) DirForCategory(category string) string
- func (l *Layout) EvalFilename(specType string) string
- func (l *Layout) EvalPath(specType string) string
- func (l *Layout) EvalPathAbs(projectRoot, specType string) string
- func (l *Layout) SpecFilename(specType string) string
- func (l *Layout) SpecPath(specType, category string) string
- func (l *Layout) SpecPathAbs(projectRoot, specType, category string) string
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) CategoryDirs ¶
CategoryDirs returns a map of category to directory.
func (*Layout) DirForCategory ¶
DirForCategory returns the directory for a given category.
func (*Layout) EvalFilename ¶
EvalFilename returns the evaluation filename for a spec type.
func (*Layout) EvalPath ¶
EvalPath returns the full path for an evaluation result, relative to project root. Always uses forward slashes for cross-platform consistency.
func (*Layout) EvalPathAbs ¶
EvalPathAbs returns the absolute path for an evaluation result.
func (*Layout) SpecFilename ¶
SpecFilename returns the filename for a spec type.
func (*Layout) SpecPath ¶
SpecPath returns the full path for a spec, relative to the project root. Always uses forward slashes for cross-platform consistency.
func (*Layout) SpecPathAbs ¶
SpecPathAbs returns the absolute path for a spec.