Documentation
¶
Index ¶
- Constants
- Variables
- func Execute() error
- func FullVersion() string
- func ResolveScanDir(args []string) string
- func StripANSI(s string) string
- func ValidateFormat(format string, supported []string) error
- func WriteJSON(w io.Writer, v any) error
- func WriteYAML(w io.Writer, v any) error
- type DiffResult
- type FeedEntry
- type FileChange
- type GlobalFlags
- type InputResolver
- type Recommendation
- type ReportTaskJSON
- type SnapshotOutput
- type TableWriter
- type TagInfo
- type TaskChanges
- type TaskSnapshot
Constants ¶
const ( ExitSuccess = 0 ExitError = 1 ExitValidationWarning = 2 )
Exit codes used by taskmd commands.
const (
// DefaultTaskFile is the default file to read if no file is specified
DefaultTaskFile = "tasks.md"
)
Variables ¶
var ( // Version information (set via build flags) Version = "0.1.4" GitCommit = "unknown" BuildDate = "unknown" GitDirty = "" )
var ErrVerifyFailed = errors.New("verification failed")
ErrVerifyFailed is returned when one or more verification checks fail.
Functions ¶
func FullVersion ¶
func FullVersion() string
FullVersion returns the display version string. Examples: "0.0.3", "0.0.3-abc1234", "0.0.3-abc1234*"
func ResolveScanDir ¶
ResolveScanDir returns the scan directory from positional arg or --task-dir flag. Positional arg takes precedence for backward compatibility.
func ValidateFormat ¶
ValidateFormat checks that format is one of the supported values.
Types ¶
type DiffResult ¶
type DiffResult struct {
Completed []string // files with +status: completed
Added []string // new files (--- /dev/null) with +status: pending
Started []string // files with +status: in-progress
Blocked []string // files with +status: blocked
Cancelled []string // files with +status: cancelled
}
DiffResult categorizes files from a unified diff by their status change.
func (DiffResult) IsEmpty ¶
func (d DiffResult) IsEmpty() bool
IsEmpty returns true if no changes were detected.
type FeedEntry ¶
type FeedEntry struct {
Hash string `json:"hash"`
Author string `json:"author"`
Timestamp time.Time `json:"timestamp"`
Message string `json:"message"`
Files []FileChange `json:"files"`
}
FeedEntry represents a single commit in the activity feed.
type FileChange ¶
type FileChange struct {
Path string `json:"path"`
Status string `json:"status"`
TaskID string `json:"taskID,omitempty"`
}
FileChange represents a file changed in a commit.
type GlobalFlags ¶
type GlobalFlags struct {
Stdin bool
Quiet bool
Verbose bool
Debug bool
NoColor bool
TaskDir string
IgnoreDirs []string
Workflow string
}
GlobalFlags holds global flag values
func GetGlobalFlags ¶
func GetGlobalFlags() GlobalFlags
GetGlobalFlags returns a struct with all global flag values
type InputResolver ¶
type InputResolver struct {
// contains filtered or unexported fields
}
InputResolver handles resolving input sources (stdin, explicit file, default file)
func NewInputResolver ¶
func NewInputResolver(useStdin bool, verbose bool) *InputResolver
NewInputResolver creates a new input resolver
func (*InputResolver) ReadAll ¶
func (ir *InputResolver) ReadAll(args []string) ([]byte, error)
ReadAll reads all content from the resolved input source
func (*InputResolver) ResolveInput ¶
ResolveInput determines the input source and returns a reader and cleanup function Priority: stdin flag > explicit file argument > default tasks.md file
type Recommendation ¶
type Recommendation = next.Recommendation
Recommendation is re-exported from the shared package.
type ReportTaskJSON ¶
type ReportTaskJSON struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Priority string `json:"priority,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
}
ReportTaskJSON is the JSON representation of a task in report sections.
type SnapshotOutput ¶
type SnapshotOutput struct {
Tasks []TaskSnapshot `json:"tasks,omitempty" yaml:"tasks,omitempty"`
Groups map[string][]TaskSnapshot `json:"groups,omitempty" yaml:"groups,omitempty"`
}
SnapshotOutput represents the full snapshot output
type TableWriter ¶
type TableWriter struct {
// contains filtered or unexported fields
}
TableWriter writes aligned table output where ANSI escape codes don't affect alignment. It accepts both plain-text and colored versions of each cell, computing column widths from the plain-text values and emitting the colored text with correct padding.
func NewTableWriter ¶
func NewTableWriter() *TableWriter
NewTableWriter creates a TableWriter with the default " " column gap.
func (*TableWriter) AddHeader ¶
func (tw *TableWriter) AddHeader(cols []string)
AddHeader adds a plain-text header row (no coloring).
func (*TableWriter) AddRow ¶
func (tw *TableWriter) AddRow(plain, colored []string)
AddRow adds a data row. plain holds the visible text for width calculation; colored holds the text to render (may contain ANSI codes).
func (*TableWriter) AddSeparator ¶
func (tw *TableWriter) AddSeparator()
AddSeparator adds a row of dashes sized to match column widths. The actual dash strings are computed in Flush.
func (*TableWriter) Flush ¶
func (tw *TableWriter) Flush(w io.Writer)
Flush computes column widths and writes all rows to w.
type TaskChanges ¶
type TaskChanges struct {
Completed []*model.Task
Added []*model.Task
Started []*model.Task
Blocked []*model.Task
Cancelled []*model.Task
}
TaskChanges holds tasks categorized by their change type.
func (TaskChanges) IsEmpty ¶
func (tc TaskChanges) IsEmpty() bool
IsEmpty returns true if no task changes were found.
type TaskSnapshot ¶
type TaskSnapshot struct {
// Core fields (always included unless --core is used)
ID string `json:"id" yaml:"id"`
Title string `json:"title" yaml:"title"`
Status string `json:"status,omitempty" yaml:"status,omitempty"`
Priority string `json:"priority,omitempty" yaml:"priority,omitempty"`
Effort string `json:"effort,omitempty" yaml:"effort,omitempty"`
Dependencies []string `json:"dependencies,omitempty" yaml:"dependencies,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Group string `json:"group,omitempty" yaml:"group,omitempty"`
Created string `json:"created,omitempty" yaml:"created,omitempty"`
FilePath string `json:"file_path,omitempty" yaml:"file_path,omitempty"`
// Derived fields (only included with --derived)
IsBlocked *bool `json:"is_blocked,omitempty" yaml:"is_blocked,omitempty"`
DependencyDepth *int `json:"dependency_depth,omitempty" yaml:"dependency_depth,omitempty"`
TopologicalOrder *int `json:"topological_order,omitempty" yaml:"topological_order,omitempty"`
OnCriticalPath *bool `json:"on_critical_path,omitempty" yaml:"on_critical_path,omitempty"`
}
TaskSnapshot represents a task with core or derived fields
Source Files
¶
- add.go
- archive.go
- board.go
- colors.go
- commit_msg.go
- completion.go
- context.go
- debug.go
- deduplicate.go
- duplicate.go
- exitcodes.go
- feed.go
- filter.go
- format.go
- get.go
- graph.go
- importcmd.go
- init.go
- input.go
- list.go
- mcp.go
- next.go
- nextid.go
- project_init.go
- report.go
- report_collect.go
- report_html.go
- report_md.go
- rm.go
- root.go
- scope_config.go
- scope_filter.go
- search.go
- set.go
- snapshot.go
- snapshot_analysis.go
- snapshot_output.go
- spec.go
- stats.go
- status.go
- suggest.go
- sync.go
- tablewriter.go
- tags.go
- template_embeds.go
- templates_cmd.go
- todos.go
- tracks.go
- validate.go
- verify.go
- web.go
- web_export.go
- worklog.go