Documentation
¶
Index ¶
- Variables
- func CompleteNonTerminalTasks(tasksDir string) (int, error)
- func ExtractLegacyTaskBody(content string) (string, error)
- func ExtractTaskBodyTitle(body string) string
- func ExtractTaskNumber(filename string) int
- func FixPrompt(report Report, registry *TypeRegistry) string
- func IsTaskCompleted(task model.TaskEntry) bool
- func LooksLikeLegacyTaskFile(content string) bool
- func MarkTaskCompleted(tasksDir, taskFileName string) error
- func MetaPath(tasksDir string) string
- func ParseLegacyTaskFile(content string) (model.TaskEntry, error)
- func ParseTaskFile(content string) (model.TaskEntry, error)
- func ReadTaskEntries(tasksDir string, includeCompleted bool) ([]model.IssueEntry, error)
- func ReadTaskMeta(tasksDir string) (model.TaskMeta, error)
- func RefreshTaskMeta(tasksDir string) (model.TaskMeta, error)
- func RemapLegacyTaskType(raw string, registry *TypeRegistry) string
- func SnapshotTaskMeta(tasksDir string) (model.TaskMeta, error)
- func WrapParseError(path string, err error) error
- func WriteTaskMeta(tasksDir string, meta model.TaskMeta) error
- type ArtifactParseError
- type Issue
- type Report
- type TypeRegistry
Constants ¶
This section is empty.
Variables ¶
var ( ErrLegacyTaskMetadata = errors.New("legacy XML task metadata detected") ErrV1TaskMetadata = errors.New("v1 task front matter detected") )
var BuiltinTypes = []string{
"frontend",
"backend",
"docs",
"test",
"infra",
"refactor",
"chore",
"bugfix",
}
Functions ¶
func ExtractLegacyTaskBody ¶
func ExtractTaskBodyTitle ¶
ExtractTaskBodyTitle returns the first H1 title from the body with any leading "Task N:" or "Task N -" prefix removed.
func ExtractTaskNumber ¶
func FixPrompt ¶
func FixPrompt(report Report, registry *TypeRegistry) string
FixPrompt renders a deterministic LLM-ready remediation prompt for a validation report.
func IsTaskCompleted ¶
func LooksLikeLegacyTaskFile ¶
func MarkTaskCompleted ¶
func ReadTaskEntries ¶
func ReadTaskEntries(tasksDir string, includeCompleted bool) ([]model.IssueEntry, error)
func RemapLegacyTaskType ¶
func RemapLegacyTaskType(raw string, registry *TypeRegistry) string
RemapLegacyTaskType canonicalizes a legacy v1 task type into an allowed v2 registry value when possible. It returns the empty string when the legacy type requires manual selection or has no known mapping.
func WrapParseError ¶
Types ¶
type ArtifactParseError ¶
ArtifactParseError preserves the task artifact path and underlying parse failure so callers can classify invalid task content without losing context.
func (*ArtifactParseError) Error ¶
func (e *ArtifactParseError) Error() string
func (*ArtifactParseError) Unwrap ¶
func (e *ArtifactParseError) Unwrap() error
type Issue ¶
type Issue struct {
Path string `json:"path"`
Field string `json:"field"`
Message string `json:"message"`
}
Issue describes one validation problem found in a task file.
type Report ¶
type Report struct {
TasksDir string `json:"tasks_dir"`
Scanned int `json:"scanned"`
Issues []Issue `json:"issues"`
}
Report captures the outcome of validating a tasks directory.
type TypeRegistry ¶
type TypeRegistry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(configured []string) (*TypeRegistry, error)
func (*TypeRegistry) IsAllowed ¶
func (r *TypeRegistry) IsAllowed(slug string) bool
func (*TypeRegistry) Values ¶
func (r *TypeRegistry) Values() []string