Documentation
¶
Overview ¶
Package synthesize owns OpenUdon's deterministic artifact pipeline.
Synthesize starts from a project brief and optional existing intent, then discovers OpenAPI inputs, renders intent, workflow HCL, UWS YAML, expected plans, review evidence, handoff manifests, refinement evidence, and quality reports. Build, Promote, and Assess expose narrower entry points over the same artifact set for repair loops after hand edits. The package is intentionally validation-first: generated artifacts are treated as untrusted until quality checks and review handoff gates pass.
Index ¶
- Constants
- func PackageFromIntent(ctx context.Context, opts Options) (*Result, *QualityReport, error)
- type BindingHint
- type FunctionContract
- type InputDecl
- type Options
- type OutputDecl
- type PlanBinding
- type PlanGap
- type PlanParam
- type PlanResult
- type PlanStep
- type QualityCheck
- type QualityReport
- type RefinementAttempt
- type RefinementReport
- type Result
- type SymphonyApprovalState
- type SymphonyCredentialBindings
- type SymphonyExecutionPolicy
- type SymphonyHandoff
- type SymphonyHandoffInput
- type SymphonyOwnerSplit
- type SymphonyTrustedRunner
- type WorkflowPlan
Constants ¶
const ( QualityFailureArtifact = "artifact" QualityFailureInfrastructure = "infrastructure" )
Variables ¶
This section is empty.
Functions ¶
func PackageFromIntent ¶
PackageFromIntent builds the normal OpenUdon review package artifacts from an already-authored intent.hcl without resolving an LLM provider. It writes the same workflow, UWS, plan, discovery, review, handoff, refinement, and quality artifacts used by synthesize/build, but returns quality failures in the report instead of treating them as infrastructure errors.
Types ¶
type BindingHint ¶
type FunctionContract ¶
type Options ¶
type Options struct {
ExampleDir string
Provider string
Model string
Timeout time.Duration
MaxAttempts int
IntentTemperature *float64
Discoverer *openapidisco.Discoverer
LLMClient rollout.LLMClient
ChatClient rollout.ChatClient
SchemaPath string
}
type OutputDecl ¶
type PlanBinding ¶
type PlanParam ¶
type PlanParam struct {
Name string `json:"name"`
In string `json:"in,omitempty"`
Required bool `json:"required,omitempty"`
Credential bool `json:"credential,omitempty"`
SourceKind string `json:"source_kind,omitempty"`
ExpectedSource string `json:"expected_source,omitempty"`
ExpectedCredential string `json:"expected_credential,omitempty"`
}
type PlanResult ¶
type PlanStep ¶
type PlanStep struct {
Name string `json:"name"`
Type string `json:"type,omitempty"`
Parent string `json:"parent,omitempty"`
Branch string `json:"branch,omitempty"`
BranchWhen string `json:"branch_when,omitempty"`
Inferred bool `json:"inferred,omitempty"`
OpenAPI string `json:"openapi,omitempty"`
Operation string `json:"operation,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
Runtime string `json:"runtime,omitempty"`
When string `json:"when,omitempty"`
ForEach string `json:"for_each,omitempty"`
Items string `json:"items,omitempty"`
Mode string `json:"mode,omitempty"`
BatchSize string `json:"batch_size,omitempty"`
DependsOn []string `json:"depends_on,omitempty"`
RequiredParams []string `json:"required_params,omitempty"`
RequestParams []PlanParam `json:"request_params,omitempty"`
Bindings []PlanBinding `json:"bindings,omitempty"`
Credentials []string `json:"credentials,omitempty"`
SuccessCriteria []*uws1.Criterion `json:"successCriteria,omitempty"`
OnFailure []*uws1.FailureAction `json:"onFailure,omitempty"`
OnSuccess []*uws1.SuccessAction `json:"onSuccess,omitempty"`
}
type QualityCheck ¶
type QualityCheck struct {
Code string `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
Detail string `json:"detail,omitempty"`
FailureKind string `json:"failure_kind,omitempty"`
}
func LintProjectMarkdown ¶
func LintProjectMarkdown(text string) []QualityCheck
type QualityReport ¶
type QualityReport struct {
Status string `json:"status"`
Example string `json:"example"`
Artifacts Result `json:"artifacts"`
Checks []QualityCheck `json:"checks"`
}
func Assess ¶
func Assess(opts Options) (*QualityReport, error)
func AssessContext ¶
func AssessContext(ctx context.Context, opts Options) (*QualityReport, error)
func AssessCurrent ¶
func AssessCurrent(ctx context.Context, opts Options) (*QualityReport, error)
func (*QualityReport) Passed ¶
func (r *QualityReport) Passed() bool
type RefinementAttempt ¶
type RefinementAttempt struct {
Number int `json:"number"`
Action string `json:"action"`
Mode string `json:"mode,omitempty"`
Status string `json:"status"`
FailureClass string `json:"failure_class,omitempty"`
FailingChecks []string `json:"failing_checks,omitempty"`
Detail string `json:"detail,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
}
type RefinementReport ¶
type RefinementReport struct {
Status string `json:"status"`
Example string `json:"example"`
MaxAttempts int `json:"max_attempts"`
PromptVersion string `json:"prompt_version"`
PromptSnapshot string `json:"prompt_snapshot,omitempty"`
Attempts []RefinementAttempt `json:"attempts"`
StopReason string `json:"stop_reason,omitempty"`
}
type Result ¶
type Result struct {
ExampleDir string
ProjectPath string
IntentPath string
WorkflowPath string
UWSPath string
PlanJSONPath string
PlanMDPath string
DiscoveryJSONPath string
RefinementJSONPath string
RefinementMDPath string
ReviewPath string
SymphonyHandoffPath string
QualityJSONPath string
QualityMDPath string
PrimaryOpenAPI string
OpenAPICandidates []openapidisco.Candidate
DiscoveryReport openapidisco.DiscoveryReport
}
type SymphonyApprovalState ¶
type SymphonyApprovalState = authoring.ReviewApprovalState
type SymphonyCredentialBindings ¶
type SymphonyCredentialBindings = authoring.ReviewCredentialBindings
type SymphonyExecutionPolicy ¶
type SymphonyExecutionPolicy = authoring.ReviewExecutionPolicy
type SymphonyHandoff ¶
type SymphonyHandoff = authoring.ReviewHandoff
type SymphonyHandoffInput ¶
type SymphonyHandoffInput = authoring.ReviewHandoffInput
type SymphonyOwnerSplit ¶
type SymphonyOwnerSplit = authoring.ReviewOwnerSplit
type SymphonyTrustedRunner ¶
type SymphonyTrustedRunner = authoring.ReviewTrustedRunner
type WorkflowPlan ¶
type WorkflowPlan struct {
Version string `json:"version"`
Example string `json:"example,omitempty"`
Workflow string `json:"workflow,omitempty"`
Summary string `json:"summary,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
Idempotency *uws1.Idempotency `json:"idempotency,omitempty"`
Steps []PlanStep `json:"steps"`
Results []PlanResult `json:"results,omitempty"`
Gaps []PlanGap `json:"gaps,omitempty"`
}