core

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoWork = plan.ErrNoWork

ErrNoWork indicates that no unresolved issues or pending PRD tasks were found.

Functions

func NormalizeAddDirs

func NormalizeAddDirs(dirs []string) []string

NormalizeAddDirs trims, de-duplicates, and normalizes repeated add-dir values.

func Run

func Run(ctx context.Context, cfg Config) error

Run executes compozy end to end for the provided configuration.

Types

type ArchiveConfig added in v0.1.3

type ArchiveConfig struct {
	RootDir  string
	Name     string
	TasksDir string
}

type ArchiveResult added in v0.1.3

type ArchiveResult struct {
	Target           string
	ArchiveRoot      string
	WorkflowsScanned int
	Archived         int
	Skipped          int
	ArchivedPaths    []string
	SkippedReasons   map[string]string
}

func Archive added in v0.1.3

func Archive(ctx context.Context, cfg ArchiveConfig) (*ArchiveResult, error)

type Config

type Config struct {
	Name                   string
	Round                  int
	Provider               string
	PR                     string
	ReviewsDir             string
	TasksDir               string
	DryRun                 bool
	AutoCommit             bool
	Concurrent             int
	BatchSize              int
	IDE                    IDE
	Model                  string
	AddDirs                []string
	Grouped                bool
	TailLines              int
	ReasoningEffort        string
	Mode                   Mode
	IncludeCompleted       bool
	IncludeResolved        bool
	Timeout                time.Duration
	MaxRetries             int
	RetryBackoffMultiplier float64
}

Config configures compozy preparation and execution.

func (Config) Validate

func (cfg Config) Validate() error

Validate ensures the configuration is internally consistent.

type FetchResult

type FetchResult struct {
	Name       string
	Provider   string
	PR         string
	Round      int
	ReviewsDir string
	Total      int
}

func FetchReviews

func FetchReviews(ctx context.Context, cfg Config) (*FetchResult, error)

type IDE

type IDE string

IDE identifies the downstream coding tool that compozy should invoke.

const (
	// IDECodex runs Codex jobs.
	IDECodex IDE = model.IDECodex
	// IDEClaude runs Claude Code jobs.
	IDEClaude IDE = model.IDEClaude
	// IDEDroid runs Droid jobs.
	IDEDroid IDE = model.IDEDroid
	// IDECursor runs Cursor Agent jobs.
	IDECursor IDE = model.IDECursor
	// IDEOpenCode runs OpenCode jobs.
	IDEOpenCode IDE = model.IDEOpenCode
	// IDEPi runs Pi jobs.
	IDEPi IDE = model.IDEPi
	// IDEGemini runs Gemini jobs.
	IDEGemini IDE = model.IDEGemini
)

type Job

type Job struct {
	CodeFiles     []string
	SafeName      string
	Prompt        []byte
	PromptPath    string
	StdoutLogPath string
	StderrLogPath string
	IssueCount    int
	// contains filtered or unexported fields
}

Job is a prepared execution unit with its generated artifacts.

type MigrationConfig

type MigrationConfig struct {
	RootDir    string
	Name       string
	TasksDir   string
	ReviewsDir string
	DryRun     bool
}

type MigrationResult

type MigrationResult struct {
	Target                  string
	DryRun                  bool
	FilesScanned            int
	FilesMigrated           int
	FilesAlreadyFrontmatter int
	FilesSkipped            int
	FilesInvalid            int
	GroupedRegenerated      int
	MigratedPaths           []string
	InvalidPaths            []string
}

func Migrate

func Migrate(ctx context.Context, cfg MigrationConfig) (*MigrationResult, error)

type Mode

type Mode string

Mode identifies the execution flow used by compozy.

const (
	// ModePRReview processes PR review issue markdown files.
	ModePRReview Mode = model.ModeCodeReview
	// ModePRDTasks processes PRD task markdown files.
	ModePRDTasks Mode = model.ModePRDTasks
)

type Preparation

type Preparation struct {
	Jobs                    []Job
	InputDir                string
	ResolvedPR              string
	ResolvedName            string
	ResolvedProvider        string
	ResolvedRound           int
	InputDirPath            string
	GroupedSummariesWritten bool
}

Preparation contains the resolved execution plan for a compozy run.

func Prepare

func Prepare(ctx context.Context, cfg Config) (*Preparation, error)

Prepare resolves inputs, validates the environment, and generates batch artifacts.

type SyncConfig

type SyncConfig struct {
	RootDir  string
	Name     string
	TasksDir string
}

type SyncResult

type SyncResult struct {
	Target           string
	WorkflowsScanned int
	MetaCreated      int
	MetaUpdated      int
	SyncedPaths      []string
}

func Sync

func Sync(ctx context.Context, cfg SyncConfig) (*SyncResult, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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