Documentation
¶
Overview ¶
Package mkdocs provides MkDocs integration for visionspec.
Package mkdocs generates MkDocs-compatible markdown files for visionspec projects.
Index ¶
- func GenerateProjectIndex(w io.Writer, report *status.Report, opts ProjectIndexOptions) error
- func GenerateSpecsLanding(w io.Writer, projects []ProjectSummary, opts SpecsLandingOptions) error
- func RenderAllEvals(projectPath string, opts RenderEvalOptions) (int, error)
- func RenderEvalFile(evalPath string, outputPath string, opts RenderEvalOptions) error
- func RenderEvalToMarkdown(w io.Writer, result *eval.Result, opts RenderEvalOptions) error
- func WriteNavigation(specsDir string, outputPath string) error
- func WriteProjectIndex(projectPath string, report *status.Report, opts ProjectIndexOptions) error
- func WriteSpecsLanding(specsDir string, opts SpecsLandingOptions) error
- type NavItem
- type ProjectIndexOptions
- type ProjectSummary
- type RenderEvalOptions
- type SpecsLandingOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateProjectIndex ¶
GenerateProjectIndex generates index.md for a single project.
func GenerateSpecsLanding ¶
func GenerateSpecsLanding(w io.Writer, projects []ProjectSummary, opts SpecsLandingOptions) error
GenerateSpecsLanding generates the main docs/specs/index.md file.
func RenderAllEvals ¶ added in v0.8.0
func RenderAllEvals(projectPath string, opts RenderEvalOptions) (int, error)
RenderAllEvals renders all eval JSON files in a project to markdown.
func RenderEvalFile ¶ added in v0.8.0
func RenderEvalFile(evalPath string, outputPath string, opts RenderEvalOptions) error
RenderEvalFile reads an eval JSON file and renders it to markdown.
func RenderEvalToMarkdown ¶ added in v0.8.0
RenderEvalToMarkdown converts an evaluation result to markdown.
func WriteNavigation ¶ added in v0.8.0
WriteNavigation writes the nav section to a YAML file fragment.
func WriteProjectIndex ¶
func WriteProjectIndex(projectPath string, report *status.Report, opts ProjectIndexOptions) error
WriteProjectIndex writes index.md for a project.
func WriteSpecsLanding ¶
func WriteSpecsLanding(specsDir string, opts SpecsLandingOptions) error
WriteSpecsLanding writes the main specs/index.md file.
Types ¶
type NavItem ¶ added in v0.8.0
type NavItem struct {
}
NavItem represents a single item in the MkDocs navigation.
func GenerateNavigation ¶ added in v0.8.0
GenerateNavigation generates the nav section for mkdocs.yml from a specs directory.
func (NavItem) MarshalYAML ¶ added in v0.8.0
MarshalYAML implements custom YAML marshaling for NavItem.
type ProjectIndexOptions ¶
type ProjectIndexOptions struct {
// IncludeGraphLink adds a link to the graph visualization if available.
IncludeGraphLink bool
// GraphPath is the relative path to the graph HTML file.
GraphPath string
}
ProjectIndexOptions configures project index generation.
type ProjectSummary ¶
type ProjectSummary struct {
Name string
Path string
Status string // ready, in_progress, not_ready
StatusEmoji string
Progress int // Percentage
LastUpdated time.Time
SpecCount int
EvalCount int
ApprovalCount int
}
ProjectSummary contains summary information for the specs landing page.
func ScanProjects ¶
func ScanProjects(specsDir string) ([]ProjectSummary, error)
ScanProjects scans a specs directory and returns summaries for all projects.
type RenderEvalOptions ¶ added in v0.8.0
type RenderEvalOptions struct {
// IncludeEvidence includes evidence snippets in findings.
IncludeEvidence bool
// IncludeJudgeMetadata includes information about the LLM judge.
IncludeJudgeMetadata bool
}
RenderEvalOptions configures evaluation rendering.
type SpecsLandingOptions ¶
type SpecsLandingOptions struct {
// IncludeConstitution adds a link to CONSTITUTION.md if it exists.
IncludeConstitution bool
// IncludeRoadmap adds a link to ROADMAP.md if it exists.
IncludeRoadmap bool
// ConstitutionPath is the relative path to CONSTITUTION.md.
ConstitutionPath string
// RoadmapPath is the relative path to ROADMAP.md.
RoadmapPath string
}
SpecsLandingOptions configures the specs landing page generation.