instructions

package
v0.79.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClaudeCode

func InitClaudeCode(ctx context.Context, repo drivers.RepoStore, force bool) error

InitClaudeCode generates Claude Code instruction files from Rill instruction files. The main instructions are written to .claude/CLAUDE.md. Resource-specific instructions are written as skills to .claude/skills/<name>/SKILL.md. Skills are loaded on-demand when invoked, keeping the context lean. If force is false, it skips files that already exist. If force is true, it overwrites any existing files.

func InitCursorRules

func InitCursorRules(ctx context.Context, repo drivers.RepoStore, force bool) error

InitCursorRules generates Cursor rules files from Rill instruction files. The rules are written to .cursor/rules/ in the repository. If force is false, it skips generation if .cursor/rules/ already exists. If force is true, it overwrites any existing files.

func LoadAll

func LoadAll(opts Options) (map[string]*Instruction, error)

LoadAll loads all instruction files from the data directory recursively. Returns a map of file paths (relative to data directory) to their parsed instructions.

Types

type Instruction

type Instruction struct {
	Name        string
	Description string
	Body        string
}

Instruction represents a parsed instruction file with front matter and body.

func Load

func Load(path string, opts Options) (*Instruction, error)

Load loads a single instruction file by path (relative to the data directory). The path should include the file extension, e.g., "development.md" or "resources/model.md".

type Options

type Options struct {
	// External indicates whether the instructions are being loaded for external use (e.g., Claude Skills or Cursor rules) or internal use (e.g., Rill's own agents).
	External bool
}

Options configures how instruction files are loaded and rendered.

Jump to

Keyboard shortcuts

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