Documentation
¶
Overview ¶
Package domain contains shared domain types used across the Spectr codebase. This package has no internal dependencies to avoid import cycles.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TemplateFS embed.FS
TemplateFS contains embedded slash command templates. These templates are shared across all providers.
Functions ¶
This section is empty.
Types ¶
type SlashCommand ¶
type SlashCommand int
SlashCommand represents a type-safe slash command identifier.
const ( SlashProposal SlashCommand = iota SlashApply )
func (SlashCommand) String ¶
func (s SlashCommand) String() string
String returns the command name for debugging.
type TemplateContext ¶
type TemplateContext struct {
BaseDir string // e.g., "spectr"
SpecsDir string // e.g., "spectr/specs"
ChangesDir string // e.g., "spectr/changes"
ProjectFile string // e.g., "spectr/project.md"
AgentsFile string // e.g., "spectr/AGENTS.md"
}
TemplateContext holds path-related template variables for dynamic directory names.
func DefaultTemplateContext ¶
func DefaultTemplateContext() TemplateContext
DefaultTemplateContext returns a TemplateContext with default values.
type TemplateRef ¶
type TemplateRef struct {
Name string // template file name (e.g., "instruction-pointer.md.tmpl")
Template *template.Template // pre-parsed template
}
TemplateRef is a type-safe reference to a parsed template. It can be safely passed between packages without creating import cycles.
func (TemplateRef) Render ¶
func (tr TemplateRef) Render(ctx *TemplateContext) (string, error)
Render executes the template with the given context.