optimization

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package optimization compiles checked optimize_signature declarations into deterministic metadata plans for external optimization tooling.

Index

Constants

View Source
const FormatV1 = "howlframe.optimization_plan/v1"

FormatV1 identifies the serialized optimization plan schema.

Variables

This section is empty.

Functions

This section is empty.

Types

type CandidatePlan

type CandidatePlan struct {
	Label   string `json:"label"`
	Payload string `json:"payload"`
}

CandidatePlan is one labeled prompt or program variant.

type ProgramPlan

type ProgramPlan struct {
	Format     string          `json:"format"`
	Signatures []SignaturePlan `json:"signatures"`
}

ProgramPlan contains all checked optimization signatures in source order.

func CompileAnalysis

func CompileAnalysis(analysis *checker.Analysis) ProgramPlan

CompileAnalysis creates a deterministic, side-effect-free optimization plan.

type SignaturePlan

type SignaturePlan struct {
	Name       string          `json:"name"`
	Metric     string          `json:"metric"`
	Tests      []string        `json:"tests"`
	Candidates []CandidatePlan `json:"candidates"`
	Line       int             `json:"line"`
	Column     int             `json:"column"`
	BodyType   ast.ValueKind   `json:"body_type"`
}

SignaturePlan describes optimization intent without executing any command or changing source code.

Jump to

Keyboard shortcuts

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