commands

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalJSONOutput bool
	GlobalMinOutput  bool
)

Global output flags accessible to all commands

View Source
var RootCmd = &cobra.Command{
	Use:   "llm-support",
	Short: "LLM-focused codebase analysis and transformation tools",
	Long: `llm-support provides 32+ specialized commands for working with
code, configuration files, and documentation in LLM-assisted workflows.

Designed for fast startup (10-20x faster than Python), single binary
distribution, and integration with Claude, Gemini, and Qwen prompts.`,
	Version:       Version,
	SilenceErrors: true,
	SilenceUsage:  true,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {

		if f := cmd.Flag("json"); f != nil && f.Changed {
			GlobalJSONOutput = true
		}
		if f := cmd.Flag("min"); f != nil && f.Changed {
			GlobalMinOutput = true
		}
	},
}

RootCmd is the base command when called without any subcommands

View Source
var Version = "1.5.0"

Version is set at build time via ldflags

Functions

func Execute

func Execute()

Execute runs the root command

Types

type AlignmentCheckResult added in v1.6.0

type AlignmentCheckResult struct {
	TotalRequirements   int                 `json:"total_requirements"`
	RequirementsMet     int                 `json:"requirements_met"`
	RequirementsPartial int                 `json:"requirements_partial"`
	RequirementsUnmet   int                 `json:"requirements_unmet"`
	AlignmentScore      float64             `json:"alignment_score"`
	Gaps                []AlignmentGap      `json:"gaps,omitempty"`
	ScopeCreep          []string            `json:"scope_creep,omitempty"`
	RequirementDetails  []RequirementStatus `json:"requirement_details,omitempty"`
	RequirementsFile    string              `json:"requirements_file"`
	StoriesDirectory    string              `json:"stories_directory"`
	TasksDirectory      string              `json:"tasks_directory,omitempty"`
	ReadErrors          []string            `json:"read_errors,omitempty"`
	ParseWarnings       []string            `json:"parse_warnings,omitempty"`
}

AlignmentCheckResult holds the alignment analysis results

type AlignmentGap added in v1.6.0

type AlignmentGap struct {
	RequirementID string `json:"requirement_id"`
	Description   string `json:"description,omitempty"`
	Status        string `json:"status"` // "unmet" or "partial"
	Reason        string `json:"reason,omitempty"`
}

AlignmentGap represents a requirement gap

type AnalyzeDepsResult added in v1.2.0

type AnalyzeDepsResult struct {
	// Standard mode fields (always included when not minimal)
	FilesRead   []string `json:"files_read"`
	FilesModify []string `json:"files_modify"`
	FilesCreate []string `json:"files_create"`
	Directories []string `json:"directories"`
	TotalFiles  *int     `json:"total_files,omitempty"`
	Confidence  string   `json:"confidence"`
	// Minimal mode fields
	FR    []string `json:"fr,omitempty"`
	FM    []string `json:"fm,omitempty"`
	FC    []string `json:"fc,omitempty"`
	Dirs  []string `json:"dirs,omitempty"`
	Total *int     `json:"total,omitempty"`
	Conf  string   `json:"conf,omitempty"`
}

AnalyzeDepsResult represents the JSON output of the analyze-deps command.

type ArgsResult added in v1.3.0

type ArgsResult struct {
	Positional []string          `json:"positional,omitempty"`
	Flags      map[string]string `json:"flags,omitempty"`
}

ArgsResult holds parsed argument results

type CatFileEntry added in v1.2.0

type CatFileEntry struct {
	Path    string `json:"path,omitempty"`
	P       string `json:"p,omitempty"`
	Size    int64  `json:"size,omitempty"`
	S       *int64 `json:"s,omitempty"`
	Content string `json:"content,omitempty"`
	C       string `json:"c,omitempty"`
}

CatFileEntry represents a single file in the catfiles result

type Categories added in v1.6.0

type Categories struct {
	Source    []string `json:"source"`
	Test      []string `json:"test"`
	Config    []string `json:"config"`
	Docs      []string `json:"docs"`
	Generated []string `json:"generated"`
	Other     []string `json:"other"`
}

Categories holds files grouped by category

type CategorizeChangesResult added in v1.6.0

type CategorizeChangesResult struct {
	Categories     Categories     `json:"categories"`
	Counts         CategoryCounts `json:"counts"`
	SensitiveFiles []string       `json:"sensitive_files"`
	Total          int            `json:"total"`
}

CategorizeChangesResult holds the complete categorization result

type CategorizedFile added in v1.6.0

type CategorizedFile struct {
	Path     string       `json:"path"`
	Status   string       `json:"status"` // M, A, D, R, ?
	Category FileCategory `json:"category"`
}

CategorizedFile represents a file with its category and status

type CategoryCounts added in v1.6.0

type CategoryCounts struct {
	Source    int `json:"source"`
	Test      int `json:"test"`
	Config    int `json:"config"`
	Docs      int `json:"docs"`
	Generated int `json:"generated"`
	Other     int `json:"other"`
}

CategoryCounts holds the count for each category

type CatfilesResult added in v1.2.0

type CatfilesResult struct {
	Files     []CatFileEntry `json:"files,omitempty"`
	F         []CatFileEntry `json:"f,omitempty"`
	FileCount int            `json:"file_count,omitempty"`
	FC        *int           `json:"fc,omitempty"`
	TotalSize int64          `json:"total_size,omitempty"`
	TS        *int64         `json:"ts,omitempty"`
}

CatfilesResult represents the catfiles result

type ClassifiedCommit added in v1.6.0

type ClassifiedCommit struct {
	CommitInfo
	Classification TDDClassification
	HasTestFiles   bool
	HasCodeFiles   bool
}

ClassifiedCommit holds a commit with its TDD classification

type CleanTempResult added in v1.3.0

type CleanTempResult struct {
	// Standard output
	Removed      []string `json:"removed,omitempty"`
	RemovedCount int      `json:"removed_count,omitempty"`
	Status       string   `json:"status,omitempty"`
	DryRun       bool     `json:"dry_run,omitempty"`

	// Minimal output aliases
	R  []string `json:"r,omitempty"`  // removed
	RC *int     `json:"rc,omitempty"` // removed_count
	S  string   `json:"s,omitempty"`  // status
	DR *bool    `json:"dr,omitempty"` // dry_run
}

CleanTempResult holds the clean-temp command result

type CommitInfo added in v1.6.0

type CommitInfo struct {
	Hash    string
	Author  string
	Date    string
	Message string
	Files   []string
}

CommitInfo holds parsed commit information

type CompleteResult added in v1.5.0

type CompleteResult struct {
	Status       string `json:"status,omitempty"`
	S            string `json:"s,omitempty"`
	Attempts     int    `json:"attempts,omitempty"`
	A            *int   `json:"a,omitempty"`
	Model        string `json:"model,omitempty"`
	M            string `json:"m,omitempty"`
	OutputFile   string `json:"output_file,omitempty"`
	OF           string `json:"of,omitempty"`
	OutputLength int    `json:"output_length,omitempty"`
	OL           *int   `json:"ol,omitempty"`
	Response     string `json:"response,omitempty"`
	R            string `json:"r,omitempty"`
	LastError    string `json:"last_error,omitempty"`
	LE           string `json:"le,omitempty"`
}

CompleteResult represents the result of an API completion

type CountCheckboxResult added in v1.2.0

type CountCheckboxResult struct {
	Count     int     `json:"count"`
	Checked   int     `json:"checked"`
	Unchecked int     `json:"unchecked"`
	Percent   float64 `json:"percent"`
}

CountCheckboxResult holds checkbox count results

type CountFilesResult added in v1.2.0

type CountFilesResult struct {
	Count int `json:"count"`
}

CountFilesResult holds file count results

type CountLinesResult added in v1.2.0

type CountLinesResult struct {
	Count int `json:"count"`
}

CountLinesResult holds line count results

type CoverageReportResult added in v1.6.0

type CoverageReportResult struct {
	TotalRequirements     int                 `json:"total_requirements"`
	CoveredCount          int                 `json:"covered_count"`
	UncoveredRequirements []string            `json:"uncovered_requirements"`
	CoveragePercentage    float64             `json:"coverage_percentage"`
	CoverageByStory       map[string][]string `json:"coverage_by_story"`
	RequirementsFile      string              `json:"requirements_file"`
	StoriesDirectory      string              `json:"stories_directory"`
	ReadErrors            []string            `json:"read_errors,omitempty"`
}

CoverageReportResult holds the coverage analysis results

type Dependency

type Dependency struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Type    string `json:"type"` // prod, dev, optional
}

Dependency represents a single dependency with its version

type DepsResult

type DepsResult struct {
	Manifest     string       `json:"manifest"`
	ManifestType string       `json:"manifest_type"`
	Dependencies []Dependency `json:"dependencies"`
}

DepsResult holds the parsed dependencies

type DetectResult added in v1.2.0

type DetectResult struct {
	Stack          string `json:"stack"`
	Language       string `json:"language"`
	PackageManager string `json:"package_manager"`
	Framework      string `json:"framework"`
	HasTests       bool   `json:"has_tests"`
	PytestAvail    bool   `json:"pytest_available"`
}

DetectResult represents the project detection result

type DiffResult added in v1.2.0

type DiffResult struct {
	Identical bool     `json:"identical"`
	File1     string   `json:"file1,omitempty"`
	F1        string   `json:"f1,omitempty"`
	File2     string   `json:"file2,omitempty"`
	F2        string   `json:"f2,omitempty"`
	Additions []string `json:"additions,omitempty"`
	A         []string `json:"a,omitempty"`
	Deletions []string `json:"deletions,omitempty"`
	D         []string `json:"d,omitempty"`
}

DiffResult represents the result of a diff operation

type DiscoverTestsResult added in v1.2.0

type DiscoverTestsResult struct {
	Pattern        string `json:"pattern"`
	Framework      string `json:"framework"`
	TestRunner     string `json:"test_runner"`
	ConfigFile     string `json:"config_file"`
	SourceDir      string `json:"source_dir"`
	TestDir        string `json:"test_dir"`
	E2eDir         string `json:"e2e_dir"`
	UnitTestCount  int    `json:"unit_test_count"`
	E2eTestCount   int    `json:"e2e_test_count"`
	TotalTestCount int    `json:"total_test_count"`
}

DiscoverTestsResult represents the test discovery result

type EncodeResult added in v1.2.0

type EncodeResult struct {
	Input    string `json:"input,omitempty"`
	I        string `json:"i,omitempty"`
	Encoding string `json:"encoding,omitempty"`
	Enc      string `json:"enc,omitempty"`
	Output   string `json:"output,omitempty"`
	O        string `json:"o,omitempty"`
}

EncodeResult represents the result of encoding/decoding

type ExtensionInfo added in v1.2.0

type ExtensionInfo struct {
	Extension string `json:"extension,omitempty"`
	Ext       string `json:"ext,omitempty"`
	Count     int    `json:"count,omitempty"`
	C         int    `json:"c,omitempty"`
	Size      string `json:"size,omitempty"`
	S         string `json:"s,omitempty"`
}

ExtensionInfo represents file extension statistics.

type ExtractLinksResult added in v1.4.0

type ExtractLinksResult struct {
	URL   string     `json:"url,omitempty"`
	U     string     `json:"u,omitempty"`
	Links []LinkInfo `json:"links,omitempty"`
	L     []LinkInfo `json:"l,omitempty"`
	Total int        `json:"total,omitempty"`
	N     *int       `json:"n,omitempty"`
	Error string     `json:"error,omitempty"`
	E     string     `json:"e,omitempty"`
}

ExtractLinksResult holds the extraction result

type ExtractRelevantResult

type ExtractRelevantResult struct {
	Path            string   `json:"path,omitempty"`
	P               string   `json:"p,omitempty"`
	URL             string   `json:"url,omitempty"`
	U               string   `json:"u,omitempty"`
	Context         string   `json:"context,omitempty"`
	Ctx             string   `json:"ctx,omitempty"`
	ExtractedParts  []string `json:"extracted_parts,omitempty"`
	EP              []string `json:"ep,omitempty"`
	TotalFiles      int      `json:"total_files,omitempty"`
	TF              *int     `json:"tf,omitempty"`
	ProcessedFiles  int      `json:"processed_files,omitempty"`
	PF              *int     `json:"pf,omitempty"`
	Error           string   `json:"error,omitempty"`
	E               string   `json:"e,omitempty"`
	ProcessingTimeS float64  `json:"processing_time_s,omitempty"`
	PTS             *float64 `json:"pts,omitempty"`
}

ExtractRelevantResult holds the extraction result

type ExtractResult added in v1.2.0

type ExtractResult struct {
	Type    string   `json:"type,omitempty"`
	T       string   `json:"t,omitempty"`
	File    string   `json:"file,omitempty"`
	F       string   `json:"f,omitempty"`
	Count   int      `json:"count,omitempty"`
	Cnt     *int     `json:"cnt,omitempty"`
	Results []string `json:"results,omitempty"`
	R       []string `json:"r,omitempty"`
}

ExtractResult holds the extraction result

type FileCategory added in v1.6.0

type FileCategory string

FileCategory represents a file change category

const (
	CategorySource    FileCategory = "source"
	CategoryTest      FileCategory = "test"
	CategoryConfig    FileCategory = "config"
	CategoryDocs      FileCategory = "docs"
	CategoryGenerated FileCategory = "generated"
	CategoryOther     FileCategory = "other"
)

type FileContent added in v1.2.0

type FileContent struct {
	Path    string `json:"path,omitempty"`
	P       string `json:"p,omitempty"`
	Content string `json:"content,omitempty"`
	C       string `json:"c,omitempty"`
}

FileContent represents file content for outline/full modes

type FileHeaders added in v1.6.0

type FileHeaders struct {
	Path    string        `json:"path,omitempty"`
	P       string        `json:"p,omitempty"`
	Headers []HeaderEntry `json:"headers,omitempty"`
	H       []HeaderEntry `json:"h,omitempty"`
}

FileHeaders represents headers extracted from a markdown file

type FileStatus

type FileStatus struct {
	Path   string `json:"path"`
	Exists bool   `json:"exists"`
}

FileStatus represents the status of a required/optional file

type ForeachFileRes

type ForeachFileRes struct {
	InputFile  string `json:"input_file,omitempty"`
	IF         string `json:"if,omitempty"`
	OutputFile string `json:"output_file,omitempty"`
	OF         string `json:"of,omitempty"`
	Status     string `json:"status,omitempty"` // success, skipped, failed
	S          string `json:"s,omitempty"`
	Error      string `json:"error,omitempty"`
	E          string `json:"e,omitempty"`
}

ForeachFileRes holds the result for a single file

type ForeachResult

type ForeachResult struct {
	TotalFiles     int              `json:"total_files,omitempty"`
	TF             *int             `json:"tf,omitempty"`
	ProcessedFiles int              `json:"processed_files,omitempty"`
	PF             *int             `json:"pf,omitempty"`
	SkippedFiles   int              `json:"skipped_files,omitempty"`
	SF             *int             `json:"sf,omitempty"`
	FailedFiles    int              `json:"failed_files,omitempty"`
	FF             *int             `json:"ff,omitempty"`
	Results        []ForeachFileRes `json:"results,omitempty"`
	R              []ForeachFileRes `json:"r,omitempty"`
	ProcessingTime float64          `json:"processing_time_s,omitempty"`
	PT             *float64         `json:"pt,omitempty"`
}

ForeachResult holds the result of processing files

type FormatTDSummary added in v1.7.0

type FormatTDSummary struct {
	TotalItems        int            `json:"total_items"`
	SectionsFormatted int            `json:"sections_formatted"`
	ItemsPerSection   map[string]int `json:"items_per_section"`
}

FormatTDSummary provides counts

type FormatTDTableResult added in v1.7.0

type FormatTDTableResult struct {
	Tables  map[string]string `json:"tables"`
	Summary FormatTDSummary   `json:"summary"`
}

FormatTDTableResult represents the output

type GitBranch

type GitBranch struct {
	Current  string `json:"current"`
	Tracking string `json:"tracking,omitempty"`
}

GitBranch holds branch information

type GitChangesResult added in v1.2.0

type GitChangesResult struct {
	Count int      `json:"count"`
	Files []string `json:"files,omitempty"`
}

GitChangesResult holds the git changes detection result

type GitCommit

type GitCommit struct {
	SHA     string `json:"sha"`
	Author  string `json:"author"`
	Date    string `json:"date"`
	Message string `json:"message"`
}

GitCommit holds commit information

type GitContext

type GitContext struct {
	Repository GitRepository `json:"repository"`
	Branch     GitBranch     `json:"branch"`
	Status     GitStatus     `json:"status"`
	Commits    []GitCommit   `json:"commits,omitempty"`
	Remotes    []GitRemote   `json:"remotes,omitempty"`
	Diff       string        `json:"diff,omitempty"`
}

GitContext holds the gathered git repository information

type GitRemote

type GitRemote struct {
	Name     string `json:"name"`
	FetchURL string `json:"fetch_url"`
	PushURL  string `json:"push_url"`
}

GitRemote holds remote information

type GitRepository

type GitRepository struct {
	Path string `json:"path"`
	Root string `json:"root"`
}

GitRepository holds repository path info

type GitStatus

type GitStatus struct {
	Clean     bool `json:"clean"`
	Modified  int  `json:"modified"`
	Added     int  `json:"added"`
	Deleted   int  `json:"deleted"`
	Untracked int  `json:"untracked"`
	Conflict  bool `json:"conflict"`
}

GitStatus holds working tree status

type GitStatusEntry added in v1.6.0

type GitStatusEntry struct {
	Status string // M, A, D, R, ?, etc.
	Path   string
}

GitStatusEntry represents a parsed git status line

type GrepMatch added in v1.2.0

type GrepMatch struct {
	File string `json:"file,omitempty"`
	Line int    `json:"line,omitempty"`
	Text string `json:"text,omitempty"`
}

GrepMatch represents a single grep match

type GrepResult added in v1.2.0

type GrepResult struct {
	Pattern string      `json:"pattern,omitempty"`
	Matches []GrepMatch `json:"matches,omitempty"`
	Files   []string    `json:"files,omitempty"`
}

GrepResult represents the complete grep result

type GroupTDInput added in v1.7.0

type GroupTDInput struct {
	Items []map[string]interface{} `json:"items"`
	Rows  []map[string]interface{} `json:"rows"`
}

GroupTDInput represents the input format

type GroupTDResult added in v1.7.0

type GroupTDResult struct {
	Groups    []TDGroup                `json:"groups"`
	Ungrouped []map[string]interface{} `json:"ungrouped"`
	Summary   GroupTDSummary           `json:"summary"`
}

GroupTDResult represents the output

type GroupTDSummary added in v1.7.0

type GroupTDSummary struct {
	TotalItems     int `json:"total_items"`
	GroupedCount   int `json:"grouped_count"`
	UngroupedCount int `json:"ungrouped_count"`
	GroupCount     int `json:"group_count"`
}

GroupTDSummary provides counts

type HashEntry added in v1.2.0

type HashEntry struct {
	File string `json:"file,omitempty"`
	F    string `json:"f,omitempty"`
	Hash string `json:"hash,omitempty"`
	H    string `json:"h,omitempty"`
}

HashEntry represents a single file hash result.

type HashResult added in v1.2.0

type HashResult struct {
	Algorithm string      `json:"algorithm,omitempty"`
	Algo      string      `json:"algo,omitempty"`
	Hashes    []HashEntry `json:"hashes,omitempty"`
	H         []HashEntry `json:"h,omitempty"`
	Count     int         `json:"count,omitempty"`
	C         int         `json:"c,omitempty"`
}

HashResult represents the JSON output of the hash command.

type HeaderEntry added in v1.6.0

type HeaderEntry struct {
	Level int    `json:"level,omitempty"`
	L     *int   `json:"l,omitempty"`
	Text  string `json:"text,omitempty"`
	T     string `json:"t,omitempty"`
}

HeaderEntry represents a single markdown header

type HighestResult added in v1.2.0

type HighestResult struct {
	Highest  string `json:"highest"`
	Name     string `json:"name"`
	FullPath string `json:"full_path"`
	Next     string `json:"next"`
	Count    int    `json:"count"`
}

HighestResult represents the output of the highest command

type InitTempResult added in v1.2.0

type InitTempResult struct {
	// Core fields (always present)
	TempDir   string `json:"temp_dir"`
	TD        string `json:"td,omitempty"` // minimal alias
	RepoRoot  string `json:"repo_root"`
	RR        string `json:"rr,omitempty"` // minimal alias
	Today     string `json:"today"`
	TodayLong string `json:"today_long,omitempty"`
	TSLong    string `json:"ts_long,omitempty"` // minimal alias
	Timestamp string `json:"timestamp"`
	TS        string `json:"ts,omitempty"` // minimal alias
	Epoch     int64  `json:"epoch"`

	// Git fields (with --with-git) - optional
	Branch      string `json:"branch,omitempty"`
	BR          string `json:"br,omitempty"` // minimal alias
	CommitShort string `json:"commit_short,omitempty"`
	CS          string `json:"cs,omitempty"` // minimal alias

	// Status fields
	Status        string `json:"status"`
	S             string `json:"s,omitempty"` // minimal alias
	Cleaned       int    `json:"cleaned,omitempty"`
	Cl            *int   `json:"cl,omitempty"` // minimal alias
	ExistingFiles int    `json:"existing_files,omitempty"`
	EF            *int   `json:"ef,omitempty"` // minimal alias
	ContextFile   string `json:"context_file"`
	CF            string `json:"cf,omitempty"` // minimal alias
}

InitTempResult holds the init-temp command result

type LLMLinkInput added in v1.5.0

type LLMLinkInput struct {
	Index   int    `json:"index"`
	Href    string `json:"href"`
	Text    string `json:"text"`
	Section string `json:"section,omitempty"`
}

LLMLinkInput represents a link for LLM input

type LLMRankRequest added in v1.5.0

type LLMRankRequest struct {
	Context string         `json:"context"`
	Links   []LLMLinkInput `json:"links"`
}

LLMRankRequest represents the input for LLM ranking

type LLMRankResponse added in v1.5.0

type LLMRankResponse struct {
	Rankings []LLMRanking `json:"rankings"`
}

LLMRankResponse represents the LLM's ranking response

type LLMRanking added in v1.5.0

type LLMRanking struct {
	Index int `json:"index"`
	Score int `json:"score"`
}

LLMRanking represents a single link's relevance score

type LinkInfo added in v1.4.0

type LinkInfo struct {
	Href    string `json:"href,omitempty"`
	H       string `json:"h,omitempty"`
	Text    string `json:"text,omitempty"`
	T       string `json:"t,omitempty"`
	Context string `json:"context,omitempty"`
	C       string `json:"c,omitempty"`
	Score   int    `json:"score,omitempty"`
	S       *int   `json:"s,omitempty"`
	Section string `json:"section,omitempty"`
	Sec     string `json:"sec,omitempty"`
}

LinkInfo represents a single extracted link with context

type ListdirEntry added in v1.2.0

type ListdirEntry struct {
	Name     string `json:"name,omitempty"`
	Type     string `json:"type,omitempty"`
	Size     int64  `json:"size,omitempty"`
	Modified string `json:"modified,omitempty"`
}

ListdirEntry represents a single directory entry

type ListdirResult added in v1.2.0

type ListdirResult struct {
	Path    string         `json:"path,omitempty"`
	Entries []ListdirEntry `json:"entries,omitempty"`
	Empty   bool           `json:"empty,omitempty"`
}

ListdirResult represents the directory listing result

type MdCodeBlock added in v1.2.0

type MdCodeBlock struct {
	Number   int    `json:"number,omitempty"`
	N        *int   `json:"n,omitempty"`
	Language string `json:"language,omitempty"`
	L        string `json:"l,omitempty"`
	Code     string `json:"code,omitempty"`
	C        string `json:"c,omitempty"`
}

MdCodeBlock represents a code block

type MdCodeblocksResult added in v1.2.0

type MdCodeblocksResult struct {
	File   string        `json:"file,omitempty"`
	F      string        `json:"f,omitempty"`
	Blocks []MdCodeBlock `json:"blocks,omitempty"`
	B      []MdCodeBlock `json:"b,omitempty"`
}

MdCodeblocksResult holds the codeblocks extraction result

type MdFrontmatterResult added in v1.2.0

type MdFrontmatterResult struct {
	File   string            `json:"file,omitempty"`
	F      string            `json:"f,omitempty"`
	Raw    string            `json:"raw,omitempty"`
	R      string            `json:"r,omitempty"`
	Parsed map[string]string `json:"parsed,omitempty"`
	P      map[string]string `json:"p,omitempty"`
}

MdFrontmatterResult holds the frontmatter extraction result

type MdHeaderEntry added in v1.2.0

type MdHeaderEntry struct {
	Level int    `json:"level,omitempty"`
	L     *int   `json:"l,omitempty"`
	Text  string `json:"text,omitempty"`
	T     string `json:"t,omitempty"`
}

MdHeaderEntry represents a markdown header

type MdHeadersResult added in v1.2.0

type MdHeadersResult struct {
	File    string          `json:"file,omitempty"`
	F       string          `json:"f,omitempty"`
	Headers []MdHeaderEntry `json:"headers,omitempty"`
	H       []MdHeaderEntry `json:"h,omitempty"`
}

MdHeadersResult holds the headers extraction result

type MdSectionResult added in v1.2.0

type MdSectionResult struct {
	File    string `json:"file,omitempty"`
	F       string `json:"f,omitempty"`
	Title   string `json:"title,omitempty"`
	Ti      string `json:"ti,omitempty"`
	Content string `json:"content,omitempty"`
	C       string `json:"c,omitempty"`
}

MdSectionResult holds the section extraction result

type MdTask added in v1.2.0

type MdTask struct {
	Text string `json:"text,omitempty"`
	T    string `json:"t,omitempty"`
	Done bool   `json:"done,omitempty"`
	D    *bool  `json:"d,omitempty"`
}

MdTask represents a single task

type MdTasksResult added in v1.2.0

type MdTasksResult struct {
	File           string   `json:"file,omitempty"`
	F              string   `json:"f,omitempty"`
	TotalTasks     int      `json:"total_tasks,omitempty"`
	TT             *int     `json:"tt,omitempty"`
	Completed      int      `json:"completed,omitempty"`
	Cp             *int     `json:"cp,omitempty"`
	Incomplete     int      `json:"incomplete,omitempty"`
	Inc            *int     `json:"inc,omitempty"`
	CompletionRate float64  `json:"completion_rate,omitempty"`
	CR             *float64 `json:"cr,omitempty"`
	Tasks          []MdTask `json:"tasks,omitempty"`
	Ts             []MdTask `json:"ts,omitempty"`
}

MdTasksResult holds the tasks extraction result

type MultiexistsEntry added in v1.2.0

type MultiexistsEntry struct {
	Path   string `json:"path,omitempty"`
	Exists bool   `json:"exists"`
	Type   string `json:"type,omitempty"`
}

MultiexistsEntry represents a single path check result

type MultiexistsResult added in v1.2.0

type MultiexistsResult struct {
	Entries      []MultiexistsEntry `json:"entries,omitempty"`
	AllExist     bool               `json:"all_exist"`
	ExistCount   int                `json:"exist_count"`
	MissingCount int                `json:"missing_count"`
}

MultiexistsResult represents the complete check result

type MultigrepResult added in v1.2.0

type MultigrepResult struct {
	KeywordsSearched    int                       `json:"keywords_searched,omitempty"`
	KS                  *int                      `json:"ks,omitempty"`
	KeywordsWithMatches int                       `json:"keywords_with_matches,omitempty"`
	KWM                 *int                      `json:"kwm,omitempty"`
	TotalMatches        int                       `json:"total_matches,omitempty"`
	TM                  *int                      `json:"tm,omitempty"`
	SearchPath          string                    `json:"search_path,omitempty"`
	SP                  string                    `json:"sp,omitempty"`
	FilesSearched       int                       `json:"files_searched,omitempty"`
	FS                  *int                      `json:"fs,omitempty"`
	Results             map[string]*keywordResult `json:"results,omitempty"`
	R                   map[string]*keywordResult `json:"r,omitempty"`
}

MultigrepResult represents the overall multigrep result

type ParseError added in v1.6.0

type ParseError struct {
	Line    int    `json:"line"`
	Column  int    `json:"column,omitempty"`
	Message string `json:"message"`
}

ParseError represents a parsing error at a specific location

type ParseStreamResult added in v1.6.0

type ParseStreamResult struct {
	Format      string                   `json:"format"`
	Delimiter   string                   `json:"delimiter,omitempty"`
	Headers     []string                 `json:"headers"`
	Rows        []map[string]interface{} `json:"rows"`
	RowCount    int                      `json:"row_count"`
	ParseErrors []ParseError             `json:"parse_errors"`
}

ParseStreamResult holds the result of stream parsing

type PartitionGroup added in v1.2.0

type PartitionGroup struct {
	ID    int      `json:"id"`
	I     *int     `json:"i,omitempty"`
	Items []string `json:"items"`
	It    []string `json:"it,omitempty"`
}

PartitionGroup represents a group of items

type PartitionResult added in v1.2.0

type PartitionResult struct {
	Groups        []PartitionGroup `json:"groups"`
	G             []PartitionGroup `json:"g,omitempty"`
	TotalGroups   int              `json:"total_groups"`
	TG            *int             `json:"tg,omitempty"`
	ItemsPerGroup []int            `json:"items_per_group"`
	IPG           []int            `json:"ipg,omitempty"`
	Message       string           `json:"message"`
	M             string           `json:"m,omitempty"`
}

PartitionResult represents the partition result

type PlanTypeResult added in v1.2.0

type PlanTypeResult struct {
	Type                string `json:"type"`
	Label               string `json:"label"`
	Icon                string `json:"icon"`
	RequiresUserStories bool   `json:"requires_user_stories"`
	WorkSource          string `json:"work_source"`
}

PlanTypeResult holds the plan type information

type PlanValidationResult

type PlanValidationResult struct {
	Path          string            `json:"path"`
	Valid         bool              `json:"valid"`
	RequiredFiles []FileStatus      `json:"required_files"`
	OptionalFiles []FileStatus      `json:"optional_files"`
	Warnings      []string          `json:"warnings,omitempty"`
	Errors        []string          `json:"errors,omitempty"`
	Metadata      map[string]string `json:"metadata,omitempty"`
}

PlanValidationResult holds the validation results

type PromptResult added in v1.2.0

type PromptResult struct {
	Status       string `json:"status,omitempty"`
	S            string `json:"s,omitempty"`
	Attempts     int    `json:"attempts,omitempty"`
	A            *int   `json:"a,omitempty"`
	Cached       bool   `json:"cached,omitempty"`
	Ca           *bool  `json:"ca,omitempty"`
	CacheAge     int    `json:"cache_age,omitempty"`
	CAg          *int   `json:"cag,omitempty"`
	OutputFile   string `json:"output_file,omitempty"`
	OF           string `json:"of,omitempty"`
	OutputLength int    `json:"output_length,omitempty"`
	OL           *int   `json:"output_len,omitempty"`
	Response     string `json:"response,omitempty"`
	R            string `json:"result,omitempty"`
	LastError    string `json:"last_error,omitempty"`
	LE           string `json:"le,omitempty"`
}

PromptResult represents the result of a prompt execution

type RawTDInput added in v1.7.0

type RawTDInput struct {
	Items []map[string]interface{} `json:"items"`
	Rows  []map[string]interface{} `json:"rows"`
}

RawTDInput represents a raw array of TD items

type RepoRootResult added in v1.2.0

type RepoRootResult struct {
	Root  string `json:"root,omitempty"`
	Valid bool   `json:"valid,omitempty"`
	Error string `json:"error,omitempty"`
}

RepoRootResult represents the repo root result

type ReportResult added in v1.2.0

type ReportResult struct {
	Title      string            `json:"title,omitempty"`
	Ti         string            `json:"ti,omitempty"`
	Status     string            `json:"status,omitempty"`
	S          string            `json:"s,omitempty"`
	Stats      map[string]string `json:"stats,omitempty"`
	St         map[string]string `json:"st,omitempty"`
	Timestamp  string            `json:"timestamp,omitempty"`
	TS         string            `json:"ts,omitempty"`
	Content    string            `json:"content,omitempty"`
	C          string            `json:"c,omitempty"`
	OutputFile string            `json:"output_file,omitempty"`
	OF         string            `json:"of,omitempty"`
}

ReportResult holds the report generation result

type RequirementStatus added in v1.6.0

type RequirementStatus struct {
	ID          string   `json:"id"`
	Description string   `json:"description,omitempty"`
	Status      string   `json:"status"` // "met", "partial", "unmet"
	TracedBy    []string `json:"traced_by,omitempty"`
}

RequirementStatus tracks a requirement's alignment status

type RiskDetail added in v1.6.0

type RiskDetail struct {
	ID          string   `json:"id"`
	Description string   `json:"description,omitempty"`
	Covered     bool     `json:"covered"`
	CoveredBy   []string `json:"covered_by,omitempty"`
}

RiskDetail holds information about a single risk

type RouteTDInput added in v1.6.0

type RouteTDInput struct {
	Rows []map[string]interface{} `json:"rows"`
}

RouteTDInput represents the expected input structure

type RouteTDResult added in v1.6.0

type RouteTDResult struct {
	QuickWins   []map[string]interface{} `json:"quick_wins"`
	Backlog     []map[string]interface{} `json:"backlog"`
	TDFiles     []map[string]interface{} `json:"td_files"`
	Summary     RouteTDSummary           `json:"routing_summary"`
	ParseErrors []ParseError             `json:"parse_errors,omitempty"`
}

RouteTDResult holds the routing results

type RouteTDSummary added in v1.6.0

type RouteTDSummary struct {
	TotalInput     int `json:"total_input"`
	TotalRouted    int `json:"total_routed"`
	QuickWinsCount int `json:"quick_wins_count"`
	BacklogCount   int `json:"backlog_count"`
	TDFilesCount   int `json:"td_files_count"`
}

RouteTDSummary provides routing statistics

type RoutedTDInput added in v1.7.0

type RoutedTDInput struct {
	QuickWins []map[string]interface{} `json:"quick_wins"`
	Backlog   []map[string]interface{} `json:"backlog"`
	TDFiles   []map[string]interface{} `json:"td_files"`
}

RoutedTDInput represents the output from route_td command

type RuntimeResult added in v1.3.0

type RuntimeResult struct {
	// Full output fields
	Start       int64   `json:"start,omitempty"`
	End         int64   `json:"end,omitempty"`
	ElapsedSecs float64 `json:"elapsed_secs,omitempty"`
	Formatted   string  `json:"formatted,omitempty"`

	// Minimal output fields
	S   int64   `json:"s,omitempty"`   // start
	E   int64   `json:"e,omitempty"`   // end
	ES  float64 `json:"es,omitempty"`  // elapsed_secs
	F   string  `json:"f,omitempty"`   // formatted
	Raw float64 `json:"raw,omitempty"` // raw value (when --raw)
}

RuntimeResult holds the runtime command result

type SprintStatusResult added in v1.6.0

type SprintStatusResult struct {
	Status               string   `json:"status"` // COMPLETED, PARTIAL, FAILED
	TasksTotal           int      `json:"tasks_total"`
	TasksCompleted       int      `json:"tasks_completed"`
	CompletionPercentage float64  `json:"completion_percentage"`
	TestsPassed          bool     `json:"tests_passed"`
	Coverage             float64  `json:"coverage"`
	CriticalIssues       int      `json:"critical_issues"`
	Reasons              []string `json:"reasons,omitempty"`
}

SprintStatusResult holds the sprint status determination

type StatsResult added in v1.2.0

type StatsResult struct {
	Path        string          `json:"path,omitempty"`
	P           string          `json:"p,omitempty"`
	Files       int             `json:"files,omitempty"`
	F           int             `json:"f,omitempty"`
	Directories int             `json:"directories,omitempty"`
	D           int             `json:"d,omitempty"`
	TotalSize   string          `json:"total_size,omitempty"`
	S           string          `json:"s,omitempty"`
	Extensions  []ExtensionInfo `json:"by_extension,omitempty"`
	Ext         []ExtensionInfo `json:"ext,omitempty"`
}

StatsResult represents the JSON output of the stats command.

type SummarizeDirFileInfo added in v1.2.0

type SummarizeDirFileInfo struct {
	Path string `json:"path,omitempty"`
	P    string `json:"p,omitempty"`
	Size int64  `json:"size,omitempty"`
	S    *int64 `json:"s,omitempty"`
	Ext  string `json:"ext,omitempty"`
	E    string `json:"e,omitempty"`
}

SummarizeDirFileInfo represents file info in the result

type SummarizeDirHeadersResult added in v1.6.0

type SummarizeDirHeadersResult struct {
	Directory string        `json:"directory,omitempty"`
	Dir       string        `json:"dir,omitempty"`
	Format    string        `json:"format,omitempty"`
	Fmt       string        `json:"fmt,omitempty"`
	Files     []FileHeaders `json:"files,omitempty"`
	F         []FileHeaders `json:"f,omitempty"`
	FileCount int           `json:"file_count,omitempty"`
	FC        *int          `json:"fc,omitempty"`
}

SummarizeDirHeadersResult represents the headers format result

type SummarizeDirResult added in v1.2.0

type SummarizeDirResult struct {
	Directory   string                 `json:"directory,omitempty"`
	Dir         string                 `json:"dir,omitempty"`
	Format      string                 `json:"format,omitempty"`
	Fmt         string                 `json:"fmt,omitempty"`
	Directories []string               `json:"directories,omitempty"`
	Dirs        []string               `json:"dirs,omitempty"`
	Files       []SummarizeDirFileInfo `json:"files,omitempty"`
	F           []SummarizeDirFileInfo `json:"f,omitempty"`
	FileCount   int                    `json:"file_count,omitempty"`
	FC          *int                   `json:"fc,omitempty"`
	DirCount    int                    `json:"dir_count,omitempty"`
	DC          *int                   `json:"dc,omitempty"`
	Contents    []FileContent          `json:"contents,omitempty"`
	C           []FileContent          `json:"c,omitempty"`
}

SummarizeDirResult represents the summarize-dir result

type TDDBreakdown added in v1.6.0

type TDDBreakdown struct {
	TestFirst int `json:"test_first"`
	TestWith  int `json:"test_with"`
	TestAfter int `json:"test_after"`
	TestOnly  int `json:"test_only"`
	NoTest    int `json:"no_test"`
	NonCode   int `json:"non_code"`
}

TDDBreakdown holds counts for each classification

type TDDClassification added in v1.6.0

type TDDClassification string

TDDClassification represents how a commit relates to TDD practices

const (
	ClassTestFirst TDDClassification = "test-first"
	ClassTestWith  TDDClassification = "test-with"
	ClassTestAfter TDDClassification = "test-after"
	ClassTestOnly  TDDClassification = "test-only"
	ClassNoTest    TDDClassification = "no-test"
	ClassNonCode   TDDClassification = "non-code"
)

type TDDComplianceResult added in v1.6.0

type TDDComplianceResult struct {
	TotalCommits     int            `json:"total_commits"`
	TotalCodeCommits int            `json:"total_code_commits"`
	Breakdown        TDDBreakdown   `json:"breakdown"`
	ComplianceScore  float64        `json:"compliance_score"`
	ComplianceGrade  string         `json:"compliance_grade"`
	Violations       []TDDViolation `json:"violations"`
	ViolationsCount  int            `json:"violations_count"`
	Message          string         `json:"message,omitempty"`
}

TDDComplianceResult holds the complete TDD analysis result

type TDDViolation added in v1.6.0

type TDDViolation struct {
	CommitHash     string   `json:"commit_hash"`
	Author         string   `json:"author"`
	Date           string   `json:"date"`
	Message        string   `json:"message"`
	Files          []string `json:"files"`
	Classification string   `json:"classification"`
	Severity       string   `json:"severity"` // "error" for no-test, "warning" for test-after
	Remediation    string   `json:"remediation"`
}

TDDViolation represents a TDD compliance violation

type TDGroup added in v1.7.0

type TDGroup struct {
	Theme        string                   `json:"theme"`
	PathPattern  string                   `json:"path_pattern,omitempty"`
	Items        []map[string]interface{} `json:"items"`
	Count        int                      `json:"count"`
	TotalMinutes int                      `json:"total_minutes"`
}

TDGroup represents a group of related TD items

type TDItem added in v1.7.0

type TDItem struct {
	ID          string      `json:"ID,omitempty"`
	Severity    string      `json:"SEVERITY,omitempty"`
	Category    string      `json:"CATEGORY,omitempty"`
	FileLine    string      `json:"FILE_LINE,omitempty"`
	Problem     string      `json:"PROBLEM,omitempty"`
	Fix         string      `json:"FIX,omitempty"`
	EstMinutes  interface{} `json:"EST_MINUTES,omitempty"`
	Description string      `json:"DESCRIPTION,omitempty"`
}

TDItem represents a technical debt item

type TemplateResult added in v1.2.0

type TemplateResult struct {
	OutputFile string `json:"output_file,omitempty"`
	OF         string `json:"of,omitempty"`
	Content    string `json:"content,omitempty"`
	C          string `json:"c,omitempty"`
	Status     string `json:"status,omitempty"`
	S          string `json:"s,omitempty"`
}

TemplateResult holds the template processing result

type TransformCaseResult added in v1.2.0

type TransformCaseResult struct {
	Input  string `json:"input,omitempty"`
	I      string `json:"i,omitempty"`
	Output string `json:"output,omitempty"`
	O      string `json:"o,omitempty"`
	ToCase string `json:"to_case,omitempty"`
	TC     string `json:"tc,omitempty"`
}

TransformCaseResult holds the case transformation result

type TransformFilterResult added in v1.2.0

type TransformFilterResult struct {
	File    string   `json:"file,omitempty"`
	F       string   `json:"f,omitempty"`
	Pattern string   `json:"pattern,omitempty"`
	P       string   `json:"p,omitempty"`
	Lines   []string `json:"lines,omitempty"`
	L       []string `json:"l,omitempty"`
	Count   int      `json:"count,omitempty"`
	Cnt     *int     `json:"cnt,omitempty"`
}

TransformFilterResult holds the filter result

type TransformSortResult added in v1.2.0

type TransformSortResult struct {
	File  string   `json:"file,omitempty"`
	F     string   `json:"f,omitempty"`
	Lines []string `json:"lines,omitempty"`
	L     []string `json:"l,omitempty"`
	Count int      `json:"count,omitempty"`
	Cnt   *int     `json:"cnt,omitempty"`
}

TransformSortResult holds the sort result

type TreeEntry added in v1.2.0

type TreeEntry struct {
	Name  string       `json:"name,omitempty"`
	Path  string       `json:"path,omitempty"`
	Type  string       `json:"type,omitempty"`
	Size  int64        `json:"size,omitempty"`
	Items []*TreeEntry `json:"items,omitempty"`
}

TreeEntry represents a single entry in the tree

type TreeResult added in v1.2.0

type TreeResult struct {
	Root      string       `json:"root,omitempty"`
	Depth     int          `json:"depth,omitempty"`
	Entries   []*TreeEntry `json:"entries,omitempty"`
	Total     int          `json:"total,omitempty"`
	Truncated bool         `json:"truncated,omitempty"`
	Message   string       `json:"message,omitempty"`
}

TreeResult represents the complete tree output

type ValidateResult added in v1.2.0

type ValidateResult struct {
	Results      []validationResult `json:"results,omitempty"`
	R            []validationResult `json:"r,omitempty"`
	AllValid     bool               `json:"all_valid"`
	ValidCount   int                `json:"valid_count,omitempty"`
	VC           *int               `json:"vc,omitempty"`
	InvalidCount int                `json:"invalid_count,omitempty"`
	IC           *int               `json:"ic,omitempty"`
}

ValidateResult represents the overall validation result

type ValidateRisksResult added in v1.6.0

type ValidateRisksResult struct {
	RisksIdentified    int          `json:"risks_identified"`
	RisksAddressed     int          `json:"risks_addressed"`
	RisksUnaddressed   []string     `json:"risks_unaddressed"`
	CoveragePercentage float64      `json:"coverage_percentage"`
	RiskDetails        []RiskDetail `json:"risk_details"`
	DesignFile         string       `json:"design_file"`
	ReadErrors         []string     `json:"read_errors,omitempty"`
}

ValidateRisksResult holds the risk validation results

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL