Documentation
¶
Overview ¶
Package tpl provides embedded template files for initializing .context/ directories.
Index ¶
- Variables
- func ClaudeHookByFileName(name string) ([]byte, error)
- func Entry(name string) ([]byte, error)
- func List() ([]string, error)
- func ListEntry() ([]string, error)
- func ListSkills() ([]string, error)
- func ListTools() ([]string, error)
- func MakefileCtx() ([]byte, error)
- func RalphTemplate(name string) ([]byte, error)
- func SkillContent(name string) ([]byte, error)
- func Template(name string) ([]byte, error)
- func Tool(name string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
var FS embed.FS
Functions ¶
func ClaudeHookByFileName ¶
ClaudeHookByFileName reads a Claude Code hook script by name.
Parameters:
- name: Hook script filename (e.g., "session-end-auto-save.sh")
Returns:
- []byte: Hook script content from claude/hooks/
- error: Non-nil if the file is not found or read fails
func Entry ¶
Entry reads an entry template by name.
Parameters:
- name: Template filename (e.g., "decision.md")
Returns:
- []byte: Template content from entry-templates/
- error: Non-nil if the file is not found or read fails
func List ¶
List returns all available template file names.
Returns:
- []string: List of template filenames in the root templates directory
- error: Non-nil if directory read fails
func ListEntry ¶
ListEntry returns available entry template file names.
Returns:
- []string: List of template filenames in entry-templates/
- error: Non-nil if directory read fails
func ListSkills ¶ added in v0.3.0
ListSkills returns available skill directory names.
Each skill is a directory containing a SKILL.md file following the Agent Skills specification (https://agentskills.io/specification).
Returns:
- []string: List of skill directory names in claude/skills/
- error: Non-nil if directory read fails
func ListTools ¶ added in v0.3.0
ListTools returns available tool script filenames.
Returns:
- []string: List of tool filenames in tools/
- error: Non-nil if directory read fails
func MakefileCtx ¶ added in v0.3.0
MakefileCtx reads the ctx-owned Makefile include template.
Returns:
- []byte: Makefile.ctx content
- error: Non-nil if the file is not found or read fails
func RalphTemplate ¶ added in v0.3.0
RalphTemplate reads a Ralph-mode template file by name.
Ralph mode templates are designed for autonomous loop operation, with instructions for one-task-per-iteration, completion signals, and no clarifying questions.
Parameters:
- name: Template filename (e.g., "PROMPT.md")
Returns:
- []byte: Template content from ralph/
- error: Non-nil if the file is not found or read fails
func SkillContent ¶ added in v0.3.0
SkillContent reads a skill's SKILL.md file by skill name.
Parameters:
- name: Skill directory name (e.g., "ctx-save")
Returns:
- []byte: SKILL.md content from claude/skills/<name>/
- error: Non-nil if the file not found or read fails
Types ¶
This section is empty.