target

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 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.

Types

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) 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) 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) 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) 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) 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) Validate

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

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

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.

Jump to

Keyboard shortcuts

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