service

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryManager

type DirectoryManager interface {
	CreateDir(path string, perm os.FileMode) error
	Exists(path string) (bool, error)
}

DirectoryManager defines the interface for managing directories. Implementations should handle creating parent directories if necessary and checking existence.

type FileWriter

type FileWriter interface {
	WriteFile(path string, content []byte, perm os.FileMode) error
}

FileWriter defines the interface for writing files. Implementations should handle creating parent directories if necessary.

type GeneratedFile

type GeneratedFile struct {
	Name    string // "AGENTS.md", "CONTEXT.md", etc.
	Content string
}

GeneratedFile represents a single file generated by the LLM.

type GenerationRequest

type GenerationRequest struct {
	ProjectDescription string
	TemplateGuides     []TemplateGuide
	Language           string
	ProjectType        string
	Architecture       string
	Locale             string // Output language: "en", "es", etc.
	ExistingContext    string // For spec mode: content of existing CONTEXT.md + AGENTS.md
	Mode               string // "generate" (default), "spec", or "skills"
	Target             string // For skills mode: target ecosystem ("claude", "codex", "antigravity")
}

GenerationRequest represents a request to generate context files via LLM.

type GenerationResponse

type GenerationResponse struct {
	Files     []GeneratedFile
	Model     string
	TokensIn  int
	TokensOut int
}

GenerationResponse represents the LLM's response with generated files and metadata.

type LLMProvider

type LLMProvider interface {
	GenerateContext(ctx context.Context, request GenerationRequest) (*GenerationResponse, error)
}

LLMProvider defines the interface for LLM-based content generation.

type ProjectGenerator

type ProjectGenerator struct {
	// contains filtered or unexported fields
}

ProjectGenerator provides domain operations for managing projects

func NewProjectGenerator

func NewProjectGenerator(
	projectRepo project.Repository,
	fileWriter FileWriter,
	directoryManager DirectoryManager,
) *ProjectGenerator

NewProjectGenerator creates a new project generator service

func (*ProjectGenerator) CreateProject

func (s *ProjectGenerator) CreateProject(
	id string,
	name shared.ProjectName,
	language shared.Language,
	projectType shared.ProjectType,
	architecture shared.Architecture,
	outputPath string,
	capabilities []string,
) (*project.Project, error)

CreateProject creates a new project with validation

func (*ProjectGenerator) DeleteProject

func (s *ProjectGenerator) DeleteProject(id string) error

DeleteProject deletes a project by ID

func (*ProjectGenerator) GetProject

func (s *ProjectGenerator) GetProject(id string) (*project.Project, error)

GetProject retrieves a project by ID

func (*ProjectGenerator) GetProjectByName

func (s *ProjectGenerator) GetProjectByName(name string) (*project.Project, error)

GetProjectByName retrieves a project by name

func (*ProjectGenerator) ListProjects

func (s *ProjectGenerator) ListProjects() ([]*project.Project, error)

ListProjects retrieves all projects

type TemplateGuide

type TemplateGuide struct {
	Name    string // "agents", "context", "interactions", "constitution", "spec", "plan", "tasks"
	Content string
}

TemplateGuide represents a structural template used as a guide for the LLM.

type TemplateLoader

type TemplateLoader interface {
	LoadAll() ([]TemplateGuide, error)
}

TemplateLoader defines the interface for loading template guides from disk.

Jump to

Keyboard shortcuts

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