Documentation
¶
Index ¶
- Constants
- Variables
- func CompleteNonTerminalTasks(tasksDir string) (int, error)
- func ExtractLegacyTaskBody(content string) (string, error)
- func ExtractTaskBodyTitle(body string) string
- func ExtractTaskIdentityNumber(name string) int
- func ExtractTaskNumber(filename string) int
- func FixPrompt(report Report, registry *TypeRegistry) string
- func IsTaskCompleted(task model.TaskEntry) bool
- func LoadValidatedTaskGraphManifest(ctx context.Context, tasksDir string, workflowSlug string) (TaskGraphManifest, []TaskGraphTaskFile, error)
- func LooksLikeLegacyTaskFile(content string) bool
- func MarkTaskCompleted(tasksDir, taskFileName string) error
- func MetaPath(tasksDir string) string
- func ParseCommaSeparatedSlugs(input string) ([]string, error)
- func ParseLegacyTaskFile(content string) (model.TaskEntry, error)
- func ParseTaskFile(content string) (model.TaskEntry, error)
- func ReadTaskEntries(tasksDir string, includeCompleted bool) ([]model.IssueEntry, error)
- func ReadTaskEntriesRecursive(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 TaskIdentityFromName(name string) string
- func ValidateTaskGraphManifest(ctx context.Context, tasksDir string, workflowSlug string, ...) ([]TaskGraphTaskFile, []Issue, error)
- func WrapParseError(path string, err error) error
- func WriteTaskMeta(tasksDir string, meta model.TaskMeta) error
- type ArtifactParseError
- type Issue
- type Report
- type TaskGraphEdge
- type TaskGraphManifest
- type TaskGraphManifestValidationError
- type TaskGraphNode
- type TaskGraphSpec
- type TaskGraphTaskFile
- type TypeRegistry
- type ValidateOptions
Constants ¶
const ( TaskGraphManifestFileName = "_tasks.md" TaskGraphManifestVersion = "compozy.tasks/v2" )
Variables ¶
var ( ErrTaskGraphManifestMissing = errors.New("task graph manifest missing") ErrTaskGraphManifestInvalid = errors.New("task graph manifest invalid") )
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 CompleteNonTerminalTasks ¶ added in v0.2.2
func ExtractLegacyTaskBody ¶ added in v0.1.10
func ExtractTaskBodyTitle ¶ added in v0.1.7
ExtractTaskBodyTitle returns the first H1 title from the body with any leading "Task N:" or "Task N -" prefix removed.
func ExtractTaskIdentityNumber ¶ added in v0.2.10
ExtractTaskIdentityNumber accepts either a canonical task filename (task_N.md) or the extensionless task identity used by prepared jobs (task_N). Other artifact names, including hashed safe names, return 0.
func ExtractTaskNumber ¶ added in v0.1.10
func FixPrompt ¶ added in v0.1.7
func FixPrompt(report Report, registry *TypeRegistry) string
FixPrompt renders a deterministic LLM-ready remediation prompt for a validation report.
func IsTaskCompleted ¶ added in v0.1.10
func LoadValidatedTaskGraphManifest ¶ added in v0.2.11
func LoadValidatedTaskGraphManifest( ctx context.Context, tasksDir string, workflowSlug string, ) (TaskGraphManifest, []TaskGraphTaskFile, error)
func LooksLikeLegacyTaskFile ¶ added in v0.1.10
func MarkTaskCompleted ¶ added in v0.1.1
func ParseCommaSeparatedSlugs ¶ added in v0.2.7
func ParseLegacyTaskFile ¶ added in v0.1.10
func ReadTaskEntries ¶ added in v0.1.10
func ReadTaskEntries(tasksDir string, includeCompleted bool) ([]model.IssueEntry, error)
func ReadTaskEntriesRecursive ¶ added in v0.2.5
func ReadTaskEntriesRecursive(tasksDir string, includeCompleted bool) ([]model.IssueEntry, error)
func RemapLegacyTaskType ¶ added in v0.1.7
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 SnapshotTaskMeta ¶ added in v0.2.0
func TaskIdentityFromName ¶ added in v0.2.11
TaskIdentityFromName returns the extensionless task identity for a task path.
func ValidateTaskGraphManifest ¶ added in v0.2.11
func ValidateTaskGraphManifest( ctx context.Context, tasksDir string, workflowSlug string, manifest TaskGraphManifest, ) ([]TaskGraphTaskFile, []Issue, error)
func WrapParseError ¶ added in v0.1.10
Types ¶
type ArtifactParseError ¶ added in v0.2.0
ArtifactParseError preserves the task artifact path and underlying parse failure so callers can classify invalid task content without losing context.
func (*ArtifactParseError) Error ¶ added in v0.2.0
func (e *ArtifactParseError) Error() string
func (*ArtifactParseError) Unwrap ¶ added in v0.2.0
func (e *ArtifactParseError) Unwrap() error
type Report ¶ added in v0.1.7
type Report struct {
TasksDir string `json:"tasks_dir"`
Scanned int `json:"scanned"`
Issues []Issue `json:"issues"`
}
func ValidateWithOptions ¶ added in v0.2.5
func ValidateWithOptions( ctx context.Context, tasksDir string, registry *TypeRegistry, options ValidateOptions, ) (Report, error)
type TaskGraphEdge ¶ added in v0.2.11
type TaskGraphManifest ¶ added in v0.2.11
type TaskGraphManifest struct {
SchemaVersion string `yaml:"schema_version"`
Workflow string `yaml:"workflow"`
Graph TaskGraphSpec `yaml:"graph"`
Path string `yaml:"-"`
Body string `yaml:"-"`
}
func ReadTaskGraphManifest ¶ added in v0.2.11
func ReadTaskGraphManifest(tasksDir string) (TaskGraphManifest, error)
type TaskGraphManifestValidationError ¶ added in v0.2.11
type TaskGraphManifestValidationError struct {
Issues []Issue
}
func (*TaskGraphManifestValidationError) Error ¶ added in v0.2.11
func (e *TaskGraphManifestValidationError) Error() string
func (*TaskGraphManifestValidationError) Unwrap ¶ added in v0.2.11
func (e *TaskGraphManifestValidationError) Unwrap() error
type TaskGraphNode ¶ added in v0.2.11
type TaskGraphSpec ¶ added in v0.2.11
type TaskGraphSpec struct {
Nodes []TaskGraphNode `yaml:"nodes"`
Edges []TaskGraphEdge `yaml:"edges"`
}
type TaskGraphTaskFile ¶ added in v0.2.11
type TypeRegistry ¶ added in v0.1.7
type TypeRegistry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶ added in v0.1.7
func NewRegistry(configured []string) (*TypeRegistry, error)
func (*TypeRegistry) IsAllowed ¶ added in v0.1.7
func (r *TypeRegistry) IsAllowed(slug string) bool
func (*TypeRegistry) Values ¶ added in v0.1.7
func (r *TypeRegistry) Values() []string
type ValidateOptions ¶ added in v0.2.5
type ValidateOptions struct {
Recursive bool
}