Documentation
¶
Overview ¶
Package analyze implements AI-powered codebase bootstrapping for cloop. It scans an existing project directory, collects contextual signals (git history, README, directory layout, TODOs, manifest files), and asks the configured AI provider to propose a 5-10 task cloop plan.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPrompt ¶
BuildPrompt constructs the AI prompt from a collected Context.
func ProposalToPlan ¶
ProposalToPlan converts a Proposal into a pm.Plan ready to persist.
Types ¶
type Context ¶
type Context struct {
GitLog string
Readme string
Changelog string
DirTree string
Todos string
Manifest string // content of go.mod / package.json / Cargo.toml (first found)
}
Context holds the raw signals collected from the target directory.
type Proposal ¶
type Proposal struct {
Goal string `json:"goal"`
Tasks []ProposedTask `json:"tasks"`
}
Proposal is the AI's full plan proposal for an analysed project.
func Analyze ¶
func Analyze(ctx context.Context, p provider.Provider, opts provider.Options, dir, goal string) (*Proposal, error)
Analyze runs the full analysis pipeline: collect → prompt → call AI → parse.
func ParseProposal ¶
ParseProposal extracts the Proposal from an AI response string.
type ProposedTask ¶
type ProposedTask struct {
Title string `json:"title"`
Description string `json:"description"`
Priority int `json:"priority"`
Role string `json:"role"`
EstimatedMinutes int `json:"estimated_minutes"`
Tags []string `json:"tags"`
}
ProposedTask is a single task returned by the AI analysis.