Documentation
¶
Overview ¶
Package integrations provides readers for external configuration and task sources. Supports claude.md, agents.md, td task management, and GitHub issues.
Index ¶
- type AgentsMDReader
- type AggregatedResult
- type ClaudeMDReader
- type GitHubReader
- func (r *GitHubReader) Close(ctx context.Context, projectPath string, issueNumber int) error
- func (r *GitHubReader) Comment(ctx context.Context, projectPath string, issueNumber int, body string) error
- func (r *GitHubReader) Enabled() bool
- func (r *GitHubReader) Name() string
- func (r *GitHubReader) Read(ctx context.Context, projectPath string) (*Result, error)
- type Hint
- type HintType
- type Manager
- type Reader
- type ReaderError
- type Result
- type TDReader
- func (r *TDReader) Assign(ctx context.Context, projectPath, taskID string) error
- func (r *TDReader) Complete(ctx context.Context, projectPath, taskID string) error
- func (r *TDReader) Enabled() bool
- func (r *TDReader) Name() string
- func (r *TDReader) Read(ctx context.Context, projectPath string) (*Result, error)
- type TaskItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentsMDReader ¶
type AgentsMDReader struct {
// contains filtered or unexported fields
}
AgentsMDReader reads agents.md files for agent behavior configuration.
func NewAgentsMDReader ¶
func NewAgentsMDReader(cfg *config.Config) *AgentsMDReader
NewAgentsMDReader creates a reader based on config.
func (*AgentsMDReader) Enabled ¶
func (r *AgentsMDReader) Enabled() bool
Enabled reports whether agents.md integration is configured.
func (*AgentsMDReader) Name ¶
func (r *AgentsMDReader) Name() string
Name returns the integration identifier.
type AggregatedResult ¶
type AggregatedResult struct {
// Results by reader name.
Results map[string]*Result
// AllTasks from all sources.
AllTasks []TaskItem
// AllHints from all sources.
AllHints []Hint
// CombinedContext for agent prompts.
CombinedContext string
// Errors encountered (non-fatal).
Errors []ReaderError
}
AggregatedResult combines results from all integrations.
type ClaudeMDReader ¶
type ClaudeMDReader struct {
// contains filtered or unexported fields
}
ClaudeMDReader reads claude.md files for project context.
func NewClaudeMDReader ¶
func NewClaudeMDReader(cfg *config.Config) *ClaudeMDReader
NewClaudeMDReader creates a reader based on config.
func (*ClaudeMDReader) Enabled ¶
func (r *ClaudeMDReader) Enabled() bool
Enabled reports whether claude.md integration is configured.
func (*ClaudeMDReader) Name ¶
func (r *ClaudeMDReader) Name() string
Name returns the integration identifier.
type GitHubReader ¶
type GitHubReader struct {
// contains filtered or unexported fields
}
GitHubReader integrates with GitHub issues via gh CLI.
func NewGitHubReader ¶
func NewGitHubReader(cfg *config.Config) *GitHubReader
NewGitHubReader creates a reader based on config.
func (*GitHubReader) Comment ¶
func (r *GitHubReader) Comment(ctx context.Context, projectPath string, issueNumber int, body string) error
Comment adds a comment to an issue.
func (*GitHubReader) Enabled ¶
func (r *GitHubReader) Enabled() bool
Enabled reports whether GitHub issue integration is configured.
func (*GitHubReader) Name ¶
func (r *GitHubReader) Name() string
Name returns the integration identifier.
type Hint ¶
type Hint struct {
Type HintType // Type of hint
Content string // Hint content
Source string // Where the hint came from
}
Hint is a lightweight suggestion from a config file.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager coordinates multiple integration readers.
func NewManager ¶
NewManager creates a manager with the configured integrations.
type Reader ¶
type Reader interface {
// Name returns the integration identifier.
Name() string
// Enabled returns true if this integration is configured.
Enabled() bool
// Read loads data from the integration source.
// Returns nil if the source doesn't exist (not an error).
Read(ctx context.Context, projectPath string) (*Result, error)
}
Reader loads context and tasks from an integration source.
type ReaderError ¶
ReaderError records a failed reader.
func (ReaderError) Error ¶
func (e ReaderError) Error() string
Error returns a formatted error string identifying the failed reader.
type Result ¶
type Result struct {
// Context provides text to include in agent prompts.
Context string
// Tasks are work items from task sources (td, GitHub issues).
Tasks []TaskItem
// Hints are lightweight suggestions extracted from config files.
Hints []Hint
// Metadata holds source-specific data.
Metadata map[string]any
}
Result holds data loaded from an integration.
type TDReader ¶
type TDReader struct {
// contains filtered or unexported fields
}
TDReader integrates with the td task management CLI.
func NewTDReader ¶
NewTDReader creates a reader based on config.
type TaskItem ¶
type TaskItem struct {
ID string // Unique identifier (e.g., "td-abc123", "gh-42")
Title string // Task title
Description string // Full description/body
Priority int // Priority (higher = more important)
Labels []string // Tags/labels
Source string // Source name (e.g., "td", "github")
Metadata map[string]string // Source-specific fields
}
TaskItem represents a task from an external source.