gen

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gen writes a skill bundle — SKILL.md plus scripts/, references/, and assets/ — from an approved spec.SkillSpec. Four model passes (outline, body, resources, description) draft the content; a final, deterministic assembly step writes it to disk under the same rules the quality linter enforces, so a generated bundle passes its own lint by construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RobustnessRules

func RobustnessRules() string

RobustnessRules returns the rule text the body pass is written under.

Types

type Bundle

type Bundle struct {
	// Dir is the bundle's root directory (outDir/spec.DirName()).
	Dir string
	// Files lists every path written, relative to Dir, sorted.
	Files []string
}

Bundle describes a skill bundle written to disk.

func Generate

func Generate(ctx context.Context, g llm.Gateway, s *spec.SkillSpec, outDir string) (*Bundle, error)

Generate writes a skill bundle for s into outDir. It runs four gateway passes in order — outline, body, resources, description — then assembles the result deterministically with no further model call.

Resource paths in the resources pass come from the model and are untrusted input: assemble refuses any path that is absolute or escapes the bundle directory, rather than silently cleaning it.

Jump to

Keyboard shortcuts

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