Documentation
¶
Index ¶
- type AIAgentConfig
- type GitConfig
- type Profile
- type ProfileStore
- type ProjectConventions
- type QualityStandards
- type SQLiteProfileStore
- func (s *SQLiteProfileStore) Close() error
- func (s *SQLiteProfileStore) Get(ctx context.Context) (p *Profile, err error)
- func (s *SQLiteProfileStore) GetField(ctx context.Context, path string) (val any, err error)
- func (s *SQLiteProfileStore) Import(ctx context.Context, p *Profile) error
- func (s *SQLiteProfileStore) Version(ctx context.Context) (v int, err error)
- type TechnicalPreferences
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIAgentConfig ¶
type AIAgentConfig struct {
TrustTiers map[string]any `yaml:"trust_tiers,omitempty" json:"trust_tiers,omitempty"`
ModelRouting map[string]any `yaml:"model_routing,omitempty" json:"model_routing,omitempty"`
Communication map[string]any `yaml:"communication,omitempty" json:"communication,omitempty"`
}
AIAgentConfig defines how agents behave, what tools they have, and what knowledge they carry.
type GitConfig ¶
type GitConfig struct {
BranchPattern string `yaml:"branch_pattern,omitempty" json:"branch_pattern,omitempty"`
CommitFormat string `yaml:"commit_format,omitempty" json:"commit_format,omitempty"`
MergeStrategy string `yaml:"merge_strategy,omitempty" json:"merge_strategy,omitempty"`
}
GitConfig holds git workflow preferences.
type Profile ¶
type Profile struct {
ProjectConventions ProjectConventions `yaml:"project_conventions" json:"project_conventions"`
TechnicalPreferences TechnicalPreferences `yaml:"technical_preferences" json:"technical_preferences"`
AIAgentConfig AIAgentConfig `yaml:"ai_agent_configuration" json:"ai_agent_configuration"`
QualityStandards QualityStandards `yaml:"quality_standards" json:"quality_standards"`
}
Profile represents the full user profile with 4 sections.
func LoadFromFile ¶
LoadFromFile reads a YAML profile from disk and returns it.
type ProfileStore ¶
type ProfileStore interface {
// Get returns the latest profile version.
Get(ctx context.Context) (*Profile, error)
// GetField extracts a single field by dot-separated path (e.g., "git.branch_pattern").
GetField(ctx context.Context, path string) (any, error)
// Version returns the current profile version number.
Version(ctx context.Context) (int, error)
// Import stores a new profile version (append-only).
Import(ctx context.Context, p *Profile) error
// Close releases resources.
Close() error
}
ProfileStore defines the read API for user profiles.
type ProjectConventions ¶
type ProjectConventions struct {
DirectoryStructure map[string]string `yaml:"directory_structure,omitempty" json:"directory_structure,omitempty"`
FileNaming map[string]string `yaml:"file_naming,omitempty" json:"file_naming,omitempty"`
Git GitConfig `yaml:"git,omitempty" json:"git,omitempty"`
}
ProjectConventions defines how projects are structured, named, and governed.
type QualityStandards ¶
type QualityStandards struct {
ErrorPolicy string `yaml:"error_policy,omitempty" json:"error_policy,omitempty"`
ReviewPolicy string `yaml:"review_policy,omitempty" json:"review_policy,omitempty"`
CIRequirements map[string]any `yaml:"ci_requirements,omitempty" json:"ci_requirements,omitempty"`
}
QualityStandards defines error handling, review, and CI policies.
type SQLiteProfileStore ¶
type SQLiteProfileStore struct {
// contains filtered or unexported fields
}
SQLiteProfileStore implements ProfileStore using SQLite.
func New ¶
func New(db *sql.DB) (ps *SQLiteProfileStore, err error)
New creates a ProfileStore using the given database connection. It runs migrations to ensure the profiles table exists.
func (*SQLiteProfileStore) Close ¶
func (s *SQLiteProfileStore) Close() error
Close is a no-op because the db connection is shared and owned by the caller.
func (*SQLiteProfileStore) Get ¶
func (s *SQLiteProfileStore) Get(ctx context.Context) (p *Profile, err error)
Get returns the latest profile version.
func (*SQLiteProfileStore) GetField ¶
GetField extracts a single field by dot-separated path. It navigates the JSON representation of the profile using the path segments.
type TechnicalPreferences ¶
type TechnicalPreferences struct {
Languages map[string]any `yaml:"languages,omitempty" json:"languages,omitempty"`
Frameworks map[string]any `yaml:"frameworks,omitempty" json:"frameworks,omitempty"`
Testing map[string]any `yaml:"testing,omitempty" json:"testing,omitempty"`
Build map[string]any `yaml:"build,omitempty" json:"build,omitempty"`
Linting map[string]any `yaml:"linting,omitempty" json:"linting,omitempty"`
}
TechnicalPreferences captures language, framework, testing, and build preferences.