init

package
v0.1.0-dev.20260128055833 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPlan

func FormatPlan(w io.Writer, plan *InitPlan, format string) error

FormatPlan writes the init plan in the specified format.

Types

type InitPlan

type InitPlan struct {
	System struct {
		Platform               string   `json:"platform" yaml:"platform"`
		Architecture           string   `json:"architecture" yaml:"architecture"`
		Shell                  string   `json:"shell" yaml:"shell"`
		PackageManagers        []string `json:"package_managers" yaml:"package_managers"`
		ExistingDotfileManager string   `json:"existing_dotfile_manager,omitempty" yaml:"existing_dotfile_manager,omitempty"`
	} `json:"system" yaml:"system"`

	Recommendation struct {
		Action        string `json:"action" yaml:"action"` // "init" or "migrate"
		Reason        string `json:"reason" yaml:"reason"`
		MigrateSource string `json:"migrate_source,omitempty" yaml:"migrate_source,omitempty"`
	} `json:"recommendation" yaml:"recommendation"`

	RepoSetup struct {
		Layer              RepoLayer `json:"layer" yaml:"layer"`
		LayerReason        string    `json:"layer_reason" yaml:"layer_reason"`
		SuggestedStructure []struct {
			Path        string `json:"path" yaml:"path"`
			Description string `json:"description" yaml:"description"`
		} `json:"suggested_structure" yaml:"suggested_structure"`
	} `json:"repo_setup" yaml:"repo_setup"`

	Packages     []PackageRecommendation `json:"packages" yaml:"packages"`
	Projects     []ProjectSuggestion     `json:"projects" yaml:"projects"`
	NextSteps    []NextStep              `json:"next_steps" yaml:"next_steps"`
	Observations []string                `json:"observations,omitempty" yaml:"observations,omitempty"`
	Warnings     []string                `json:"warnings,omitempty" yaml:"warnings,omitempty"`
}

InitPlan represents the complete initialization plan.

func BuildPlan

func BuildPlan(ctx context.Context, opts Options) (*InitPlan, error)

BuildPlan creates an initialization plan based on system detection and AI analysis.

type NextStep

type NextStep struct {
	Step    string `json:"step" yaml:"step"`
	Command string `json:"command" yaml:"command"`
	Note    string `json:"note,omitempty" yaml:"note,omitempty"`
}

NextStep represents a step in the initialization process.

type Options

type Options struct {
	Layer      string // user-specified layer preference
	Focus      string // development focus (web, backend, devops, etc.)
	Verbose    bool
	Format     string // "text", "yaml", "json"
	AIProvider ai.Provider
	RegClient  *registry.Client
}

Options controls init behavior.

type PackageRecommendation

type PackageRecommendation struct {
	Name             string `json:"name" yaml:"name"`
	Reason           string `json:"reason" yaml:"reason"`
	Category         string `json:"category" yaml:"category"` // essential, recommended, optional
	PlatformSpecific bool   `json:"platform_specific" yaml:"platform_specific"`
}

PackageRecommendation represents a recommended package.

type ProjectSuggestion

type ProjectSuggestion struct {
	Name        string   `json:"name" yaml:"name"`
	Description string   `json:"description" yaml:"description"`
	Files       []string `json:"files,omitempty" yaml:"files,omitempty"`
}

ProjectSuggestion represents a suggested project to create.

type RepoLayer

type RepoLayer string

RepoLayer indicates the precedence layer of a repo.

const (
	LayerBase     RepoLayer = "base"
	LayerTeam     RepoLayer = "team"
	LayerPersonal RepoLayer = "personal"
)

Jump to

Keyboard shortcuts

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