Documentation
¶
Overview ¶
Package commands implements CLI commands for llm-clarification.
Index ¶
- Variables
- func Execute() error
- func SetLLMClient(client LLMClientInterface)
- type AddClarificationResult
- type Candidate
- type CandidatesResult
- type Cluster
- type ClusterResult
- type Conflict
- type ConflictEntry
- type ConflictsResult
- type ConsolidationResult
- type ConsolidationSuggestion
- type InitResult
- type LLMClientInterface
- type ListEntriesResult
- type MatchResult
- type NormalizeResult
- type PotentialMatch
- type PromoteResult
- type ValidateClarificationsResult
- type Validation
Constants ¶
This section is empty.
Variables ¶
var Version = "1.0.0"
Version is set at build time using ldflags
Functions ¶
func SetLLMClient ¶
func SetLLMClient(client LLMClientInterface)
SetLLMClient sets the LLM client (for testing).
Types ¶
type AddClarificationResult ¶
type AddClarificationResult struct {
Status string `json:"status"`
ID string `json:"id"`
Message string `json:"message"`
PotentialMatches []string `json:"potential_matches,omitempty"`
}
AddClarificationResult represents the JSON output of the add-clarification command.
type Candidate ¶
type Candidate struct {
ID string `json:"id"`
Question string `json:"question"`
Occurrences int `json:"occurrences"`
Confidence float64 `json:"confidence"`
Reason string `json:"reason"`
}
Candidate represents a promotion candidate.
type CandidatesResult ¶
type CandidatesResult struct {
Status string `json:"status"`
Candidates []Candidate `json:"candidates"`
Total int `json:"total"`
}
CandidatesResult represents the JSON output of the identify-candidates command.
type Cluster ¶
type Cluster struct {
Label string `json:"label"`
QuestionIndices []int `json:"question_indices"`
Questions []string `json:"questions,omitempty"`
}
Cluster represents a group of similar questions.
type ClusterResult ¶
type ClusterResult struct {
Status string `json:"status"`
Clusters []Cluster `json:"clusters"`
ClusterCount int `json:"cluster_count"`
Note string `json:"note,omitempty"`
}
ClusterResult represents the JSON output of the cluster-clarifications command.
type Conflict ¶
type Conflict struct {
EntryIDs []string `json:"entry_ids"`
Reason string `json:"reason"`
Severity string `json:"severity"`
Suggestion string `json:"suggestion"`
Entries []ConflictEntry `json:"entries,omitempty"`
}
Conflict represents a detected conflict between entries.
type ConflictEntry ¶
type ConflictEntry struct {
ID string `json:"id"`
Question string `json:"question"`
Answer string `json:"answer"`
}
ConflictEntry represents an entry involved in a conflict.
type ConflictsResult ¶
type ConflictsResult struct {
Status string `json:"status"`
Conflicts []Conflict `json:"conflicts"`
ConflictCount int `json:"conflict_count"`
Note string `json:"note,omitempty"`
}
ConflictsResult represents the JSON output of the detect-conflicts command.
type ConsolidationResult ¶
type ConsolidationResult struct {
Status string `json:"status"`
Suggestions []ConsolidationSuggestion `json:"suggestions"`
Total int `json:"total"`
}
ConsolidationResult represents the JSON output of the suggest-consolidation command.
type ConsolidationSuggestion ¶
type ConsolidationSuggestion struct {
PrimaryID string `json:"primary_id"`
MergeIDs []string `json:"merge_ids"`
Reason string `json:"reason"`
SuggestedMerge string `json:"suggested_merge,omitempty"`
}
ConsolidationSuggestion represents a suggested merge.
type InitResult ¶
type InitResult struct {
Status string `json:"status"`
File string `json:"file"`
Message string `json:"message"`
}
InitResult represents the JSON output of the init-tracking command.
type LLMClientInterface ¶
type LLMClientInterface interface {
Complete(prompt string, timeout time.Duration) (string, error)
}
LLMClientInterface defines the interface for LLM clients.
type ListEntriesResult ¶
type ListEntriesResult struct {
Count int `json:"count"`
Entries []tracking.Entry `json:"entries"`
}
ListEntriesResult represents the JSON output of the list-entries command.
type MatchResult ¶
type MatchResult struct {
Status string `json:"status"`
MatchID string `json:"match_id,omitempty"`
Confidence float64 `json:"confidence,omitempty"`
Reason string `json:"reason,omitempty"`
Question string `json:"question,omitempty"`
Answer string `json:"answer,omitempty"`
}
MatchResult represents the JSON output of the match-clarification command.
type NormalizeResult ¶
type NormalizeResult struct {
Status string `json:"status"`
OriginalQuestion string `json:"original_question"`
NormalizedQuestion string `json:"normalized_question"`
Changes string `json:"changes,omitempty"`
}
NormalizeResult represents the JSON output of the normalize-clarification command.
type PotentialMatch ¶
PotentialMatch represents a similar existing question.
type PromoteResult ¶
type PromoteResult struct {
Status string `json:"status"`
ID string `json:"id"`
Target string `json:"target"`
Message string `json:"message"`
}
PromoteResult represents the JSON output of the promote-clarification command.
type ValidateClarificationsResult ¶
type ValidateClarificationsResult struct {
Status string `json:"status"`
Validations []Validation `json:"validations"`
ValidCount int `json:"valid_count"`
StaleCount int `json:"stale_count"`
ReviewCount int `json:"review_count"`
}
ValidateClarificationsResult represents the JSON output of the validate-clarifications command.