llm

package
v8.166.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plan added in v8.166.0

func Plan(ctx context.Context, root string, mode Mode, body string) (Changes, Report, error)

Plan plans the changes to the repository at root in mode, with body as the content of the devctl-managed block. A repository with findings gets no changes. All new content is prepared here, before anything is written.

Types

type Changes added in v8.166.0

type Changes struct {
	// contains filtered or unexported fields
}

Changes brings a repository's agent instructions to the devctl-managed block in AGENTS.md. In migration mode, it also moves existing instructions and skills: Claude instructions with no AGENTS.md to go with are the repository's instructions, so their content moves to AGENTS.md. A root CLAUDE.md is left as an import of AGENTS.md, a .claude/CLAUDE.md is deleted. Claude files that keep their own content import AGENTS.md.

func (Changes) Apply added in v8.166.0

func (m Changes) Apply(ctx context.Context) error

Apply makes the planned changes. It stops before the first write if a file it changes is no longer as planned, and writes AGENTS.md before it changes the file whose content moved there.

func (Changes) Steps added in v8.166.0

func (m Changes) Steps() []string

Steps describes the changes Apply makes.

type Config

type Config struct {
	Flavours gen.FlavourSlice
	Language string
}

type Finding added in v8.166.0

type Finding struct {
	// Path is relative to the repository root, with slashes.
	Path    string
	Problem string
	Fix     string
}

Finding is a reason to leave a repository unchanged.

type LLM

type LLM struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) (*LLM, error)

func (*LLM) BlockBody added in v8.166.0

func (l *LLM) BlockBody() (string, error)

BlockBody returns the content of the devctl-managed block in AGENTS.md.

type Mode added in v8.166.0

type Mode int

Mode selects what gen llm may change in a repository.

const (
	// DefaultMode handles repositories without instructions and repositories
	// whose AGENTS.md has a devctl-managed block. Alignment runs in this mode.
	DefaultMode Mode = iota
	// MigrationMode also moves existing instructions and skills.
	MigrationMode
)

type Report added in v8.166.0

type Report struct {
	Findings []Finding
}

Report lists the findings of a preflight. A repository with findings must not be changed.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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