Documentation
¶
Overview ¶
options.go provides shared option definitions for CLI and TUI.
Index ¶
Constants ¶
const ( PersonaMinimal = "minimal" // MVP, prototype - ship fast, iterate later PersonaBalanced = "balanced" // Pragmatic defaults - essential quality PersonaProduction = "production" // Enterprise-grade - comprehensive, scalable )
Persona constants define implementation styles
const ( ModeCreate = "create" // Create a new codebase from scratch (default) ModeModify = "modify" // Modify an existing codebase )
Mode constants define execution modes
const ( VerbosityNormal = "normal" VerbosityVerbose = "verbose" VerbosityQuiet = "quiet" )
VerbosityNormal, VerbosityVerbose, VerbosityQuiet are verbosity constants
const ( ExecutionParallel = "parallel" ExecutionSequential = "sequential" )
ExecutionParallel, ExecutionSequential are execution mode constants
const ( ResumeModeNormal = "normal" ResumeModeResume = "resume" ResumeModeForce = "force" )
ResumeModeNormal, ResumeModeResume, ResumeModeForce are resume mode constants
const ( ArchitectureConfig = "config" ArchitectureStateless = "stateless" ArchitectureDatabase = "database" )
ArchitectureConfig, ArchitectureStateless, ArchitectureDatabase are architecture constants
Variables ¶
var ArchitectureOptions = []Option{ {Value: ArchitectureConfig, Label: "From config", Description: "Use config setting"}, {Value: ArchitectureStateless, Label: "Stateless", Description: "Prefer stateless"}, {Value: ArchitectureDatabase, Label: "Database", Description: "DB-backed"}, }
var ExecutionOptions = []Option{ {Value: ExecutionParallel, Label: "Parallel", Description: "Faster, respects dependencies"}, {Value: ExecutionSequential, Label: "Sequential", Description: "One at a time"}, }
var PersonaOptions = []Option{ {Value: PersonaMinimal, Label: "Minimal", Description: "MVP focus"}, {Value: PersonaBalanced, Label: "Balanced", Description: "Standard"}, {Value: PersonaProduction, Label: "Production", Description: "Enterprise"}, }
Shared option definitions - SINGLE SOURCE OF TRUTH
var ResumeModeOptions = []Option{ {Value: ResumeModeNormal, Label: "Normal", Description: "Regenerate all"}, {Value: ResumeModeResume, Label: "Resume", Description: "Skip existing"}, {Value: ResumeModeForce, Label: "Force", Description: "Overwrite all"}, }
var ValidModes = []string{ModeCreate, ModeModify}
ValidModes lists all valid mode values
var ValidPersonas = []string{PersonaMinimal, PersonaBalanced, PersonaProduction}
ValidPersonas lists all valid persona values
var VerbosityOptions = []Option{ {Value: VerbosityNormal, Label: "Normal", Description: "Standard output"}, {Value: VerbosityVerbose, Label: "Verbose", Description: "Debug info"}, {Value: VerbosityQuiet, Label: "Quiet", Description: "Errors only"}, }
Functions ¶
func IsValidPersona ¶
IsValidPersona checks if a persona string is valid
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Prompt string `yaml:"prompt"` // Inline prompt (takes precedence)
PromptFile string `yaml:"prompt_file"` // Path to prompt template file
Output string `yaml:"output"`
DependsOn []string `yaml:"depends_on"`
}
AgentConfig represents a single agent's configuration
type ArchitecturePreferences ¶
type ArchitecturePreferences = types.ArchitecturePreferences
Type aliases for backward compatibility and convenience These reference the canonical types in the types package
func DefaultPreferences ¶
func DefaultPreferences() ArchitecturePreferences
DefaultPreferences returns the default architecture preferences These are neutral defaults that work for most projects
type Config ¶
type Config struct {
OutputDir string `yaml:"output_dir"`
Timeout int `yaml:"timeout"`
Persona string `yaml:"persona"` // Implementation style: minimal, balanced, production
Stack TechStack `yaml:"stack"` // Technology stack preferences
Preferences ArchitecturePreferences `yaml:"preferences"` // Architectural style preferences
ResumeMode bool `yaml:"-"` // Set via CLI flag, not config file
ForceMode bool `yaml:"-"` // Set via CLI flag, not config file
Agents map[string]AgentConfig `yaml:"agents"`
// Mode-specific configuration for existing codebase modifications
Mode string `yaml:"mode"` // "create" (default) or "modify"
TargetCodebase string `yaml:"target_codebase"` // Path to existing codebase (required for modify mode)
InputFiles []string `yaml:"input_files"` // Multiple input files (TRD, requirements, etc.)
SpecsOutputDir string `yaml:"specs_output_dir"` // Directory for spec outputs (default: output_dir)
// Post-processing options
PostProcessing PostProcessingConfig `yaml:"post_processing"`
}
Config represents the pagent configuration
func Default ¶
func Default() *Config
Default returns the default configuration Prompts are loaded from embedded templates (internal/prompt/templates/) Users can override by specifying prompt_file or inline prompt in config
func (*Config) ApplyEnvOverrides ¶
func (c *Config) ApplyEnvOverrides()
ApplyEnvOverrides applies environment variable overrides to config
func (*Config) GetAgentNames ¶
GetAgentNames returns sorted list of agent names
func (*Config) GetDependencies ¶
GetDependencies returns the dependencies for an agent
func (*Config) GetEffectiveCodeOutputDir ¶
GetEffectiveCodeOutputDir returns the directory where code should be written In modify mode, this is the target codebase; in create mode, it's output_dir/code
func (*Config) GetEffectiveSpecsOutputDir ¶
GetEffectiveSpecsOutputDir returns the directory where specs should be written
func (*Config) IsModifyMode ¶
IsModifyMode returns true if the config is set to modify an existing codebase
type PostProcessingConfig ¶
type PostProcessingConfig struct {
GenerateDiffSummary bool `yaml:"generate_diff_summary"` // Generate git diff summary
GeneratePRDescription bool `yaml:"generate_pr_description"` // Generate PR description from changes
ValidationCommands []string `yaml:"validation_commands"` // Custom commands to run after implementation
}
PostProcessingConfig contains options for post-execution actions
type RunOptions ¶ added in v0.1.0
type RunOptions struct {
InputPath string
Agents []string
Persona string
OutputDir string
Sequential bool
ResumeMode string // "normal", "resume", "force"
Architecture string // "config", "stateless", "database"
Timeout int
ConfigPath string
Verbosity string // "normal", "verbose", "quiet"
}
RunOptions contains all parameters for running agents. This is the single source of truth used by both CLI and TUI.
func DefaultRunOptions ¶ added in v0.1.0
func DefaultRunOptions(cfg *Config) RunOptions
DefaultRunOptions returns RunOptions with sensible defaults from config
func (RunOptions) IsQuiet ¶ added in v0.1.0
func (o RunOptions) IsQuiet() bool
IsQuiet returns true if verbosity is set to quiet
func (RunOptions) IsVerbose ¶ added in v0.1.0
func (o RunOptions) IsVerbose() bool
IsVerbose returns true if verbosity is set to verbose
type TechStack ¶
Type aliases for backward compatibility and convenience These reference the canonical types in the types package
func DefaultStack ¶
func DefaultStack() TechStack
DefaultStack returns the default technology stack preferences These are widely-used, well-documented technologies