scaffold

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package scaffold applies workspace templates to bootstrap new agent workspaces.

Templates live in the templates/ directory of the ttal-cli repo. When running from a cloned repo, FindTemplatesDir resolves templates locally — no network needed. For brew-installed users, it falls back to a cached clone of the remote templates repo. Used by the CLI's init/onboard commands.

Plane: shared

Index

Constants

View Source
const TemplatesRepo = "https://github.com/tta-lab/ttal-cli.git"

TemplatesRepo is the remote fallback for brew-installed users who don't have a local templates/ directory. FindTemplatesDir prefers local templates/ first.

Variables

This section is empty.

Functions

func AgentDirs

func AgentDirs(dir string) []string

AgentDirs returns sorted names of subdirectories that contain a CLAUDE.md file. Used both for scaffold metadata and workspace agent discovery.

func Apply

func Apply(repoDir, scaffoldName, workspace string) error

Apply copies a scaffold and the shared docs/ directory into the workspace.

func EnsureCache

func EnsureCache() (string, error)

EnsureCache clones or updates the ttal-cli repo cache and returns the path to its templates/ subdirectory.

func FindTemplatesDir

func FindTemplatesDir() (string, error)

FindTemplatesDir locates the templates/ directory. Priority:

  1. templates/ relative to cwd
  2. templates/ relative to git root (user may be in a subdirectory)
  3. Fallback: EnsureCache (remote clone, for brew install users)

Types

type ScaffoldInfo

type ScaffoldInfo struct {
	Dir         string // directory name (e.g. "basic", "full-markdown")
	Name        string // display name from README heading
	Description string // first paragraph after heading
	Agents      string // comma-separated agent names (from subdirectories)
	InstallHint string // optional install instructions (from frontmatter)
}

ScaffoldInfo holds metadata parsed from a scaffold's README.md.

func List

func List(repoDir string) ([]ScaffoldInfo, error)

List returns available scaffolds with metadata parsed from README.md. A scaffold is a directory containing config.toml.

Jump to

Keyboard shortcuts

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