Documentation
¶
Index ¶
- type ArchitecturePreferences
- type Loader
- func (l *Loader) ListAvailable() ([]string, error)
- func (l *Loader) Load(agentName, inlinePrompt, promptFile string) (string, error)
- func (l *Loader) LoadAndRender(agentName, inlinePrompt, promptFile string, vars Variables) (string, error)
- func (l *Loader) Render(promptTemplate string, vars Variables) (string, error)
- type StackConflict
- type StackResolution
- type TechStack
- type Variables
- func (v Variables) GetResolvedValue(category string) string
- func (v Variables) HasCache() bool
- func (v Variables) HasDataLake() bool
- func (v Variables) HasDatabase() bool
- func (v Variables) HasMessageQueue() bool
- func (v Variables) HasResolution() bool
- func (v Variables) HasTargetCodebase() bool
- func (v Variables) HasUnresolvedConflicts() bool
- func (v Variables) IsBalanced() bool
- func (v Variables) IsCreateMode() bool
- func (v Variables) IsGRPC() bool
- func (v Variables) IsGitHubActions() bool
- func (v Variables) IsGraphQL() bool
- func (v Variables) IsKubernetes() bool
- func (v Variables) IsMinimal() bool
- func (v Variables) IsModifyMode() bool
- func (v Variables) IsProduction() bool
- func (v Variables) IsREST() bool
- func (v Variables) IsServerless() bool
- func (v Variables) IsStateless() bool
- func (v Variables) NeedsContainerization() bool
- func (v Variables) NeedsKubernetesManifests() bool
- func (v Variables) WantsBatteries() bool
- func (v Variables) WantsComprehensiveDocs() bool
- func (v Variables) WantsE2ETests() bool
- func (v Variables) WantsIntegrationTests() bool
- func (v Variables) WantsMinimalDeps() bool
- func (v Variables) WantsMinimalDocs() bool
- func (v Variables) WantsTests() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchitecturePreferences ¶
type ArchitecturePreferences = types.ArchitecturePreferences
Type aliases for the shared types - used in prompt templates
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader handles loading and rendering prompt templates
func NewLoader ¶
NewLoader creates a new prompt loader promptsDir is the directory containing custom prompt templates (optional)
func (*Loader) ListAvailable ¶
ListAvailable returns a list of available prompt templates
func (*Loader) Load ¶
Load loads a prompt template for the given agent Priority order: 1. Inline prompt (if provided) 2. Custom prompt file (if promptFile is provided) 3. Prompt from promptsDir (if directory exists) 4. Embedded default template
type StackConflict ¶
type StackConflict = types.StackConflict
Type aliases for the shared types - used in prompt templates
type StackResolution ¶
type StackResolution = types.StackResolution
Type aliases for the shared types - used in prompt templates
type Variables ¶
type Variables struct {
PRDPath string // Primary input file (backward compatible)
InputFiles []string // All input files (when input is a directory)
InputDir string // Input directory path (empty if single file)
HasMultiInput bool // True if multiple input files
OutputDir string
OutputPath string
AgentName string
ExistingFiles []string // List of files already in OutputDir
HasExisting bool // True if there are existing outputs to consider
Persona string // Implementation style: minimal, balanced, production
Stack TechStack // Technology stack preferences
Preferences ArchitecturePreferences // Architectural style preferences
// Mode-specific variables for existing codebase modifications
Mode string // "create" or "modify"
TargetCodebase string // Path to existing codebase (for modify mode)
SpecsOutputDir string // Directory for spec outputs
CodeOutputDir string // Directory for code outputs
// Resolution holds user-resolved conflicts from UI (nil if no UI interaction)
Resolution *StackResolution
// Custom allows arbitrary key-value pairs
Custom map[string]string
}
Variables holds the template variables for prompt rendering
func (Variables) GetResolvedValue ¶
GetResolvedValue returns the resolved value for a category, or the config default
func (Variables) HasDataLake ¶
HasDataLake returns true if a data lake is configured (not "none" or empty)
func (Variables) HasDatabase ¶
HasDatabase returns true if a database is configured (not "none" or empty)
func (Variables) HasMessageQueue ¶
HasMessageQueue returns true if a message queue is configured (not "none" or empty)
func (Variables) HasResolution ¶
HasResolution returns true if UI-resolved conflicts are available
func (Variables) HasTargetCodebase ¶
HasTargetCodebase returns true if a target codebase is specified
func (Variables) HasUnresolvedConflicts ¶
HasUnresolvedConflicts returns true if there are conflicts that need resolution
func (Variables) IsBalanced ¶
IsBalanced returns true if persona is "balanced"
func (Variables) IsCreateMode ¶
IsCreateMode returns true if mode is "create" or empty (default)
func (Variables) IsGitHubActions ¶
IsGitHubActions returns true if compute is github-actions
func (Variables) IsKubernetes ¶
IsKubernetes returns true if compute is kubernetes-based (kubernetes, eks, gke, aks)
func (Variables) IsModifyMode ¶
IsModifyMode returns true if mode is "modify"
func (Variables) IsProduction ¶
IsProduction returns true if persona is "production"
func (Variables) IsServerless ¶
IsServerless returns true if compute is serverless (lambda, cloud-functions, etc.)
func (Variables) IsStateless ¶
IsStateless returns true if stateless architecture is preferred This is true if either: 1. Preferences.Stateless is explicitly true, OR 2. All storage technologies (database, cache, message_queue) are "none" or empty
func (Variables) NeedsContainerization ¶
NeedsContainerization returns true if the app should be containerized This is false for GitHub Actions or serverless compute
func (Variables) NeedsKubernetesManifests ¶
NeedsKubernetesManifests returns true if k8s manifests should be generated
func (Variables) WantsBatteries ¶
WantsBatteries returns true if feature-rich dependencies are preferred
func (Variables) WantsComprehensiveDocs ¶
WantsComprehensiveDocs returns true if comprehensive documentation is wanted
func (Variables) WantsE2ETests ¶
WantsE2ETests returns true if e2e tests are wanted
func (Variables) WantsIntegrationTests ¶
WantsIntegrationTests returns true if integration tests are wanted
func (Variables) WantsMinimalDeps ¶
WantsMinimalDeps returns true if minimal dependencies are preferred
func (Variables) WantsMinimalDocs ¶
WantsMinimalDocs returns true if minimal documentation is wanted
func (Variables) WantsTests ¶
WantsTests returns true if testing is enabled (any level)