Documentation
¶
Overview ¶
Package thtsfiles provides embedded agent integration files for thts. This package exists at the repo root to enable go:embed access to the embedded/ directory containing all agent integration assets.
Template files in embedded/ are rendered at copy time with agent-specific data.
Index ¶
- Variables
- func GetAvailableAgents() []string
- func GetAvailableCommands() []string
- func GetAvailableHooks() []string
- func GetAvailableSkills() []string
- func GetDefaultReadme(data ReadmeData) (string, error)
- func GetDefaultSettings(templateName string) string
- func GetInstructions(data InstructionsData) (string, error)
- func RenderAgent(agentType agents.AgentType, agentName string) (string, error)
- func RenderCommand(agentType agents.AgentType, cmdName string) (string, error)
- func RenderHook(agentType agents.AgentType, hookName string) (string, error)
- func RenderSkill(agentType agents.AgentType, skillName string) (string, error)
- type CategoryRow
- type InstructionsData
- type ReadmeData
Constants ¶
This section is empty.
Variables ¶
var Defaults embed.FS
Defaults contains embedded default files for the thoughts repository. Currently includes the root README.md created during setup.
var EmbeddedTemplates embed.FS
EmbeddedTemplates contains the consolidated template files for all agents. Templates are rendered at copy time with agent-specific data.
var Instructions embed.FS
Instructions contains the shared thts-instructions.md file.
var OpenCodePlugins embed.FS
OpenCodePlugins contains embedded plugin files for OpenCode.
var PiExtensions embed.FS
PiExtensions contains embedded extension files for Pi.
var Settings embed.FS
Settings contains embedded default settings files for agents. Files are named by agent type: codex.toml, opencode.json, etc. Claude settings are built dynamically and not embedded.
var Templates embed.FS
Templates contains embedded template files for thoughts/ documents. These are copied to thoughts/.templates/ during init.
Functions ¶
func GetAvailableAgents ¶ added in v0.3.0
func GetAvailableAgents() []string
GetAvailableAgents returns the list of available agent template names.
func GetAvailableCommands ¶ added in v0.3.0
func GetAvailableCommands() []string
GetAvailableCommands returns the list of available command template names.
func GetAvailableHooks ¶ added in v0.3.0
func GetAvailableHooks() []string
GetAvailableHooks returns the list of available hook template names.
func GetAvailableSkills ¶ added in v0.3.0
func GetAvailableSkills() []string
GetAvailableSkills returns the list of available skill template names.
func GetDefaultReadme ¶ added in v0.3.0
func GetDefaultReadme(data ReadmeData) (string, error)
GetDefaultReadme returns the default README.md content for the thoughts repository. It uses Go templates to replace placeholders with the provided values.
func GetDefaultSettings ¶ added in v0.2.0
GetDefaultSettings returns the default settings content for a template identity. Returns empty string if no default settings exist (e.g., Claude builds dynamically).
func GetInstructions ¶ added in v0.3.0
func GetInstructions(data InstructionsData) (string, error)
GetInstructions returns the rendered thts-instructions.md content. It executes the embedded template with the provided data.
func RenderAgent ¶ added in v0.3.0
RenderAgent renders an agent template for a specific agent type. Returns the rendered markdown content.
func RenderCommand ¶ added in v0.3.0
RenderCommand renders a command template for a specific agent type. Returns the rendered markdown content, or TOML for Gemini.
func RenderHook ¶ added in v0.3.0
RenderHook renders a hook template for a specific agent type. Returns the rendered shell script content.
Types ¶
type CategoryRow ¶ added in v0.3.0
type CategoryRow struct {
Name string // Category name, e.g., "research" or "plans/complete"
Description string // Human-readable description
Location string // Path like "thoughts/shared/research/"
Trigger string // Optional auto-save trigger description
Template string // Template filename, e.g., "research.md"
}
CategoryRow represents a category for template rendering in instructions.
type InstructionsData ¶ added in v0.3.0
type InstructionsData struct {
User string // Username from config
Categories []CategoryRow // Flattened list including sub-categories
}
InstructionsData holds all data for rendering thts-instructions.md.
type ReadmeData ¶ added in v0.3.0
ReadmeData holds the template data for the thoughts repo README.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
thts
command
|
|
|
internal
|
|
|
agents
Package agents provides multi-agent tool support for thts.
|
Package agents provides multi-agent tool support for thts. |
|
ui
Package ui provides consistent terminal output styling for the thts CLI.
|
Package ui provides consistent terminal output styling for the thts CLI. |