autodeps

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package autodeps provides AI-powered automatic dependency inference for task plans. It analyses all pending/in-progress task titles and descriptions and suggests which tasks naturally depend on which others.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(plan *pm.Plan, deps map[int][]int) (added int, skipped []string)

Apply merges the suggested dependency map into the plan, skipping deps that already exist, pointing to non-existent tasks, or would create cycles. It returns the number of new dependencies actually added.

The plan is mutated in-place; the caller is responsible for saving state.

func Infer

func Infer(ctx context.Context, prov provider.Provider, opts provider.Options, plan *pm.Plan) (map[int][]int, error)

Infer calls the AI provider with the plan and returns the suggested dependency map. The returned map keys are task IDs; values are slices of dependency IDs.

func InferPrompt

func InferPrompt(plan *pm.Plan) string

InferPrompt builds the AI prompt that asks the model to return a JSON map of {task_id: [dependency_ids]} for the active (pending/in-progress) tasks in the plan. Completed, skipped, failed, and timed-out tasks are included as context but the model is told not to suggest new deps for them.

Types

type Suggestion

type Suggestion struct {
	TaskID int
	DepIDs []int
}

Suggestion holds the inferred dependencies for a single task.

Jump to

Keyboard shortcuts

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