Documentation
¶
Overview ¶
Package opencode renders canonical skills into OpenCode's plain-markdown SKILL.md format.
Output layout: .opencode/skill/<id>/SKILL.md with optional sidecars. No YAML frontmatter; the renderer emits a `# <id>` heading followed by the description and the skill body.
Index ¶
- func Spec() adept.HarnessSpec
- type Adapter
- func (a *Adapter) Aggregate(_ context.Context, parts []adept.RenderOutput, _ int) ([]adept.RenderOutput, error)
- func (a *Adapter) Detect(projectRoot string) (bool, error)
- func (a *Adapter) Import(_ context.Context, projectRoot string) ([]adept.ImportedSkill, error)
- func (a *Adapter) Renderer() adept.Renderer
- func (a *Adapter) Spec() adept.HarnessSpec
- func (a *Adapter) Validate(projectRoot string, expected []adept.RenderOutput) (adept.DriftReport, error)
- type Renderer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter wires the OpenCode Renderer with filesystem helpers for Detect/Validate.
func NewAdapter ¶
NewAdapter constructs an Adapter.
func (*Adapter) Aggregate ¶
func (a *Adapter) Aggregate(_ context.Context, parts []adept.RenderOutput, _ int) ([]adept.RenderOutput, error)
Aggregate is a no-op for per-skill harnesses.
func (*Adapter) Detect ¶
Detect reports whether projectRoot looks like an OpenCode project. True if .opencode/ or .opencode/skill/ exists.
func (*Adapter) Import ¶
Import walks .opencode/skill/<id>/SKILL.md. OpenCode emits plain markdown with no required frontmatter, so we treat the first `# <id>` heading and optional one-line description as the skill metadata; everything else is body.
func (*Adapter) Spec ¶
func (a *Adapter) Spec() adept.HarnessSpec
Spec returns the static harness description.
func (*Adapter) Validate ¶
func (a *Adapter) Validate(projectRoot string, expected []adept.RenderOutput) (adept.DriftReport, error)
Validate computes drift between expected outputs and the on-disk state.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer is the OpenCode Renderer implementation.
func (*Renderer) Render ¶
func (r *Renderer) Render(ctx context.Context, in adept.RenderInput) (adept.RenderOutput, error)
Render produces a plain-markdown SKILL.md plus any sidecars. Activation is ignored — OpenCode discovers skills through the directory layout alone.