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 ¶
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 ¶
AgentDirs returns sorted names of subdirectories that contain a CLAUDE.md file. Used both for scaffold metadata and workspace agent discovery.
func EnsureCache ¶
EnsureCache clones or updates the ttal-cli repo cache and returns the path to its templates/ subdirectory.
func FindTemplatesDir ¶
FindTemplatesDir locates the templates/ directory. Priority:
- templates/ relative to cwd
- templates/ relative to git root (user may be in a subdirectory)
- 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.