workshop

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPending  = "pending"
	StatusApplied  = "applied"
	StatusRejected = "rejected"

	KindCreate = "create"
	KindUpdate = "update"
)

Variables

This section is empty.

Functions

func DraftSkillBody

func DraftSkillBody(name, description, procedure string) string

DraftSkillBody builds a minimal SKILL.md from session notes.

func FormatList

func FormatList(proposals []Proposal) string

FormatList renders pending proposals for CLI.

func FormatProposal

func FormatProposal(p Proposal) string

FormatProposal shows one proposal.

func SuggestSkillName

func SuggestSkillName(focus, fallback string) string

SuggestSkillName derives a skill name from focus or session text.

Types

type Config

type Config struct {
	Mode       string `json:"mode"` // off, propose, auto
	MaxPending int    `json:"maxPending"`
	SkillsDir  string `json:"skillsDir"` // workspace-relative, default local:skills
}

Config controls Skill Workshop behavior.

func Defaults

func Defaults() Config

func (Config) AutoApply

func (c Config) AutoApply() bool

func (Config) Enabled

func (c Config) Enabled() bool

func (Config) Normalized

func (c Config) Normalized() Config

type Meta

type Meta struct {
	ID           string    `json:"id"`
	Kind         string    `json:"kind"`
	SkillName    string    `json:"skillName"`
	Status       string    `json:"status"`
	Source       string    `json:"source"`
	SessionID    string    `json:"sessionId,omitempty"`
	Focus        string    `json:"focus,omitempty"`
	Autonomous   bool      `json:"autonomous,omitempty"`
	CreatedAt    time.Time `json:"createdAt"`
	AppliedAt    time.Time `json:"appliedAt,omitempty"`
	RejectedAt   time.Time `json:"rejectedAt,omitempty"`
	ScanCritical []string  `json:"scanCritical,omitempty"`
}

Meta describes one workshop proposal.

type Proposal

type Proposal struct {
	Meta Meta
	Body string
	Dir  string
}

Proposal is meta + markdown body.

func (*Proposal) Apply

func (p *Proposal) Apply(targetDir string) error

Apply writes SKILL.md to targetDir and marks proposal applied.

func (*Proposal) Reject

func (p *Proposal) Reject() error

Reject marks a proposal rejected.

type ScanResult

type ScanResult struct {
	OK       bool
	Critical []string
	Warn     []string
}

ScanResult is the outcome of a proposal safety scan.

func Scan

func Scan(name, body string) ScanResult

Scan checks proposal content before apply.

type Store

type Store struct {
	Root string
}

Store manages proposals under work/skills/.workshop/.

func (*Store) Create

func (s *Store) Create(skillName, body, source, sessionID, focus string, autonomous bool) (Proposal, error)

Create stores a new pending proposal.

func (*Store) List

func (s *Store) List() ([]Proposal, error)

func (*Store) Load

func (s *Store) Load(id string) (Proposal, error)

func (*Store) PendingCount

func (s *Store) PendingCount() (int, error)

Jump to

Keyboard shortcuts

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