temp

package
v0.0.0-...-f9a56e6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package temp handles temporary file and directory management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGitignore

func CheckGitignore(workingDir string) bool

CheckGitignore checks if .start/temp is in .gitignore. Returns true if it appears to be ignored.

Types

type Manager

type Manager struct {
	// BaseDir is the base directory for temp files.
	// For dry-run: /tmp
	// For UTD: .start/temp
	BaseDir string
}

Manager handles temporary file creation and management.

func NewDryRunManager

func NewDryRunManager() *Manager

NewDryRunManager creates a manager for dry-run output files. Files are written to /tmp/start-YYYYMMDDHHmmss/

func NewUTDManager

func NewUTDManager(workingDir string) *Manager

NewUTDManager creates a manager for UTD temp files. Files are written to .start/temp/

func (*Manager) Clean

func (m *Manager) Clean() error

Clean removes all files from the UTD temp directory.

func (*Manager) DryRunDir

func (m *Manager) DryRunDir() (string, error)

DryRunDir creates a timestamped directory for dry-run output. Returns the directory path.

func (*Manager) EnsureUTDDir

func (m *Manager) EnsureUTDDir() error

EnsureUTDDir ensures the UTD temp directory exists.

func (*Manager) WriteDryRunFiles

func (m *Manager) WriteDryRunFiles(dir string, role, prompt, command string) error

WriteDryRunFiles writes the dry-run output files.

func (*Manager) WriteUTDFile

func (m *Manager) WriteUTDFile(entityType, name, content string) (string, error)

WriteUTDFile writes a temp file with a path-derived name. entityType is "role", "context", or "task". name is the entity name (e.g., "code-reviewer"). Returns the path to the written file.

Jump to

Keyboard shortcuts

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