target

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package target provides export adapters for different execution systems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() []string

Available returns all registered target names.

func Register

func Register(target Target)

Register adds a target to the registry.

func SyncableTargets added in v0.7.0

func SyncableTargets() []string

SyncableTargets returns names of targets that support sync.

Types

type AIDLCTarget added in v0.6.0

type AIDLCTarget struct{}

AIDLCTarget exports to AWS AI-DLC Workflows format. The target generates input documents for the AIDLC Inception phase: - vision-document.md (from MRD/Press/PRD) - technical-environment.md (from TRD/IRD/context) - imported-requirements.md (combined requirements)

func (*AIDLCTarget) Capabilities added in v0.6.0

func (t *AIDLCTarget) Capabilities() Capabilities

Capabilities returns what this target supports.

func (*AIDLCTarget) Description added in v0.6.0

func (t *AIDLCTarget) Description() string

Description returns a description of the target.

func (*AIDLCTarget) Export added in v0.6.0

func (t *AIDLCTarget) Export(spec string, config ExportConfig) (*ExportResult, error)

Export exports the spec to AIDLC format. The config.Options may include: - "mrd": MRD content for vision document - "prd": PRD content for vision document - "press": Press release content for vision document - "trd": TRD content for technical environment - "ird": IRD content for technical environment - "context": Codebase context for technical environment

func (*AIDLCTarget) Name added in v0.6.0

func (t *AIDLCTarget) Name() string

Name returns the target name.

func (*AIDLCTarget) Validate added in v0.6.0

func (t *AIDLCTarget) Validate(spec string) error

Validate checks if the spec can be exported to this target.

type Agent

type Agent struct {
	ID           string
	Name         string
	Role         string
	Capabilities []string
	Priority     int
}

Agent represents a GasCity agent.

type Bead

type Bead struct {
	ID          string
	Name        string
	Description string
	Status      string   // ready, blocked, done
	BlockedBy   []string // IDs of beads that must complete first
	Agent       string   // Which agent handles this
	Priority    int
}

Bead represents a GasTown bead (unit of work).

type Capabilities

type Capabilities struct {
	SequentialTasks   bool `json:"sequential_tasks"`
	ParallelExecution bool `json:"parallel_execution"`
	MultiAgent        bool `json:"multi_agent"`
	Verification      bool `json:"verification"`
	DependencyGraph   bool `json:"dependency_graph"`
}

Capabilities describes what a target supports.

type ExportConfig

type ExportConfig struct {
	ProjectName string         `json:"project_name"`
	OutputDir   string         `json:"output_dir"`
	Options     map[string]any `json:"options,omitempty"`
}

ExportConfig contains configuration for export.

func ProjectTargetConfig

func ProjectTargetConfig(project *types.Project, targetName string) *ExportConfig

ProjectTargetConfig returns the target config from a project.

type ExportResult

type ExportResult struct {
	Target    string   `json:"target"`
	OutputDir string   `json:"output_dir"`
	Files     []string `json:"files"`
	Success   bool     `json:"success"`
	Message   string   `json:"message,omitempty"`
}

ExportResult contains the result of an export.

type GSDTarget

type GSDTarget struct{}

GSDTarget exports to GSD (Get Shit Done) format. GSD uses PLAN.md with YAML frontmatter, STATE.md for tracking, and .planning/config.json for configuration.

func (*GSDTarget) CanSync added in v0.7.0

func (t *GSDTarget) CanSync(config ExportConfig) bool

CanSync returns whether this target supports syncing.

func (*GSDTarget) Capabilities

func (t *GSDTarget) Capabilities() Capabilities

Capabilities returns what this target supports.

func (*GSDTarget) Description

func (t *GSDTarget) Description() string

Description returns a description of the target.

func (*GSDTarget) Export

func (t *GSDTarget) Export(spec string, config ExportConfig) (*ExportResult, error)

Export exports the spec to GSD format.

func (*GSDTarget) Name

func (t *GSDTarget) Name() string

Name returns the target name.

func (*GSDTarget) Sync added in v0.7.0

func (t *GSDTarget) Sync(config ExportConfig) (*SyncResult, error)

Sync retrieves task state from the exported GSD target.

func (*GSDTarget) Validate

func (t *GSDTarget) Validate(spec string) error

Validate checks if the spec can be exported to this target.

type GasCityTarget

type GasCityTarget struct{}

GasCityTarget exports to GasCity multi-agent format. GasCity orchestrates multiple agents with city.toml, agent definitions, and orders.

func (*GasCityTarget) Capabilities

func (t *GasCityTarget) Capabilities() Capabilities

Capabilities returns what this target supports.

func (*GasCityTarget) Description

func (t *GasCityTarget) Description() string

Description returns a description of the target.

func (*GasCityTarget) Export

func (t *GasCityTarget) Export(spec string, config ExportConfig) (*ExportResult, error)

Export exports the spec to GasCity format.

func (*GasCityTarget) Name

func (t *GasCityTarget) Name() string

Name returns the target name.

func (*GasCityTarget) Validate

func (t *GasCityTarget) Validate(spec string) error

Validate checks if the spec can be exported to this target.

type GasTownTarget

type GasTownTarget struct{}

GasTownTarget exports to GasTown TOML formula format. GasTown uses convoy, workflow, and expansion formulas with Bead definitions.

func (*GasTownTarget) CanSync added in v0.7.0

func (t *GasTownTarget) CanSync(config ExportConfig) bool

CanSync returns whether this target supports syncing.

func (*GasTownTarget) Capabilities

func (t *GasTownTarget) Capabilities() Capabilities

Capabilities returns what this target supports.

func (*GasTownTarget) Description

func (t *GasTownTarget) Description() string

Description returns a description of the target.

func (*GasTownTarget) Export

func (t *GasTownTarget) Export(spec string, config ExportConfig) (*ExportResult, error)

Export exports the spec to GasTown format.

func (*GasTownTarget) Name

func (t *GasTownTarget) Name() string

Name returns the target name.

func (*GasTownTarget) Sync added in v0.7.0

func (t *GasTownTarget) Sync(config ExportConfig) (*SyncResult, error)

Sync retrieves task state from the exported GasTown target.

func (*GasTownTarget) Validate

func (t *GasTownTarget) Validate(spec string) error

Validate checks if the spec can be exported to this target.

type MustHaves

type MustHaves struct {
	Truths    []string `json:"truths"`
	Artifacts []string `json:"artifacts"`
	KeyLinks  []string `json:"key_links"`
}

MustHaves represents the GSD must_haves structure.

type Order

type Order struct {
	ID          string
	Description string
	AssignedTo  string   // Agent ID
	DependsOn   []string // Order IDs
	Status      string   // pending, in_progress, complete
	Priority    int
}

Order represents a GasCity order (task assignment).

type Phase

type Phase struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Tasks       []string `json:"tasks"`
	Wave        int      `json:"wave"`
}

Phase represents a GSD phase.

type SpecKitTarget

type SpecKitTarget struct{}

SpecKitTarget exports to GitHub Spec-Kit format.

func (*SpecKitTarget) CanSync added in v0.7.0

func (t *SpecKitTarget) CanSync(config ExportConfig) bool

CanSync returns whether this target supports syncing.

func (*SpecKitTarget) Capabilities

func (t *SpecKitTarget) Capabilities() Capabilities

Capabilities returns what this target supports.

func (*SpecKitTarget) Description

func (t *SpecKitTarget) Description() string

Description returns a description of the target.

func (*SpecKitTarget) Export

func (t *SpecKitTarget) Export(spec string, config ExportConfig) (*ExportResult, error)

Export exports the spec to SpecKit format.

func (*SpecKitTarget) Name

func (t *SpecKitTarget) Name() string

Name returns the target name.

func (*SpecKitTarget) Sync added in v0.7.0

func (t *SpecKitTarget) Sync(config ExportConfig) (*SyncResult, error)

Sync retrieves task state from the exported SpecKit target.

func (*SpecKitTarget) Validate

func (t *SpecKitTarget) Validate(spec string) error

Validate checks if the spec can be exported to this target.

type SyncResult added in v0.7.0

type SyncResult struct {
	Target   string      `json:"target"`
	SyncedAt time.Time   `json:"synced_at"`
	Tasks    []TaskState `json:"tasks"`
	Summary  SyncSummary `json:"summary"`
}

SyncResult contains the result of a sync operation.

type SyncSummary added in v0.7.0

type SyncSummary struct {
	TotalTasks int `json:"total_tasks"`
	TodoCount  int `json:"todo_count"`
	InProgress int `json:"in_progress"`
	DoneCount  int `json:"done_count"`
}

SyncSummary provides aggregate task statistics.

type Syncer added in v0.7.0

type Syncer interface {
	// CanSync returns whether this target supports syncing.
	CanSync(config ExportConfig) bool

	// Sync retrieves task state from the exported target.
	Sync(config ExportConfig) (*SyncResult, error)
}

Syncer defines the interface for targets that support bidirectional sync. This is an optional interface that targets can implement.

func GetSyncer added in v0.7.0

func GetSyncer(name string) (Syncer, error)

GetSyncer checks if a target implements Syncer and returns it.

type Target

type Target interface {
	// Name returns the target name.
	Name() string

	// Description returns a description of the target.
	Description() string

	// Capabilities returns what this target supports.
	Capabilities() Capabilities

	// Validate checks if the spec can be exported to this target.
	Validate(spec string) error

	// Export exports the spec to this target.
	Export(spec string, config ExportConfig) (*ExportResult, error)
}

Target defines the interface for export adapters.

func Get

func Get(name string) (Target, error)

Get retrieves a target by name.

type TargetInfo

type TargetInfo struct {
	Name         string       `json:"name"`
	Description  string       `json:"description"`
	Capabilities Capabilities `json:"capabilities"`
}

TargetInfo contains information about a target.

func ListTargets

func ListTargets() []TargetInfo

ListTargets returns information about all registered targets.

type Task

type Task struct {
	ID          string   `json:"id"`
	Description string   `json:"description"`
	Status      string   `json:"status"` // todo, in_progress, done
	Priority    string   `json:"priority"`
	DependsOn   []string `json:"depends_on,omitempty"`
}

Task represents a GSD task.

type TaskState added in v0.7.0

type TaskState struct {
	ID     string `json:"id"`
	Title  string `json:"title"`
	Status string `json:"status"` // todo, in_progress, done, blocked
}

TaskState represents the state of a single task.

Jump to

Keyboard shortcuts

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