skilllifecycle

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package skilllifecycle orchestrates one learned-skill candidate through validation, durable lifecycle transitions, evaluation, and live publication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	Draft     learning.SkillDraftInput
	Inventory []learning.SkillInventoryItem
	Mode      learning.Mode
	Automatic bool
}

type Pipeline

type Pipeline struct {
	Repository learning.SkillRepository
	Validator  learning.SkillValidator
	// Evaluator is trusted admission-control code supplied by the host. It must
	// evaluate host-issued immutable fixture IDs, keep baseline and treatment
	// independent, expose no tools/shell/network, fence candidate content, and
	// enforce deterministic time/token/output limits. Nil deliberately records
	// ABSTAIN. A returned error is durably marked ERROR and can never activate;
	// the engine deliberately provides no production keyword or model judge.
	Evaluator learning.SkillEvaluator
	// ActivationPolicy is the assurance required for Auto activation. The zero
	// value resolves to evaluated for source compatibility with existing embedders.
	ActivationPolicy learning.SkillActivationPolicy
	Publisher        Publisher
	Now              func() time.Time
}

func (Pipeline) Process

func (p Pipeline) Process(ctx context.Context, candidate Candidate) (Receipt, error)

Process idempotently resumes one candidate from its durable repository state. Publication follows committed activation with a cancel-detached bounded context; a publication failure is reported on the receipt without disguising the commit.

type Publisher

type Publisher interface{ Publish(context.Context) error }

type Quarantiner

type Quarantiner interface{ Quarantine(string) }

type Receipt

type Receipt struct {
	SkillID          learning.SkillID
	Name             string
	Version          learning.VersionID
	State            learning.SkillState
	Verdict          learning.EvaluationVerdict
	Evidence         int
	FixtureIDs       []string
	Baseline         string
	Treatment        string
	Inspect          bool
	Undo             bool
	Published        bool
	PublicationError string
}

Jump to

Keyboard shortcuts

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