forked from compozy/compozy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompozy.go
More file actions
89 lines (69 loc) · 2.65 KB
/
compozy.go
File metadata and controls
89 lines (69 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Package compozy provides a reusable API for preparing and executing
// markdown-driven AI work loops plus a public Cobra wrapper in package command.
package compozy
import (
"context"
core "github.com/compozy/compozy/internal/core"
)
// ErrNoWork indicates that no unresolved issues or pending PRD tasks were found.
var ErrNoWork = core.ErrNoWork
// Mode identifies the execution flow used by compozy.
type Mode = core.Mode
const (
// ModePRReview processes PR review issue markdown files.
ModePRReview = core.ModePRReview
// ModePRDTasks processes PRD task markdown files.
ModePRDTasks = core.ModePRDTasks
)
// IDE identifies the downstream coding tool that compozy should invoke.
type IDE = core.IDE
const (
// IDECodex runs Codex jobs.
IDECodex = core.IDECodex
// IDEClaude runs Claude Code jobs.
IDEClaude = core.IDEClaude
// IDEDroid runs Droid jobs.
IDEDroid = core.IDEDroid
// IDECursor runs Cursor Agent jobs.
IDECursor = core.IDECursor
// IDEOpenCode runs OpenCode jobs.
IDEOpenCode = core.IDEOpenCode
// IDEPi runs Pi jobs.
IDEPi = core.IDEPi
)
// Config configures compozy preparation and execution.
type Config = core.Config
// Preparation contains the resolved execution plan for a compozy run.
type Preparation = core.Preparation
// FetchResult contains the output of a fetch-reviews operation.
type FetchResult = core.FetchResult
// MigrationConfig configures a repository artifact migration run.
type MigrationConfig = core.MigrationConfig
// MigrationResult contains the output of a migration run.
type MigrationResult = core.MigrationResult
// SyncConfig configures a task metadata sync run.
type SyncConfig = core.SyncConfig
// SyncResult contains the output of a task metadata sync run.
type SyncResult = core.SyncResult
// Job is a prepared execution unit with its generated artifacts.
type Job = core.Job
// Prepare resolves inputs, validates the environment, and generates batch artifacts.
func Prepare(ctx context.Context, cfg Config) (*Preparation, error) {
return core.Prepare(ctx, cfg)
}
// Run executes compozy end to end for the provided configuration.
func Run(ctx context.Context, cfg Config) error {
return core.Run(ctx, cfg)
}
// FetchReviews fetches provider review comments into a PRD review round.
func FetchReviews(ctx context.Context, cfg Config) (*FetchResult, error) {
return core.FetchReviews(ctx, cfg)
}
// Migrate converts legacy workflow artifacts to frontmatter.
func Migrate(ctx context.Context, cfg MigrationConfig) (*MigrationResult, error) {
return core.Migrate(ctx, cfg)
}
// Sync refreshes task workflow metadata files.
func Sync(ctx context.Context, cfg SyncConfig) (*SyncResult, error) {
return core.Sync(ctx, cfg)
}