lightspeed/tooling/ai_workflow
AI-native workflow contracts and guardrails for M44.
Types
Generated artifact emitted by workflow execution.
pub type Artifact {
Artifact(path: String, content: String)
}
Constructors
-
Artifact(path: String, content: String)
Stable workflow evidence entry.
pub type Evidence {
Evidence(label: String, value: String)
}
Constructors
-
Evidence(label: String, value: String)
Guardrail controls applied to generated output.
pub type Guardrail {
TestsRequired
RfcAdrRequired
DeterministicEvidenceRequired
HumanReviewRequiredForRefactor
ForbiddenTokenBan
}
Constructors
-
TestsRequired -
RfcAdrRequired -
DeterministicEvidenceRequired -
HumanReviewRequiredForRefactor -
ForbiddenTokenBan
AI workflow request plan.
pub type Plan {
Plan(
id: String,
kind: WorkflowKind,
prompt: String,
command_args: List(String),
review_boundaries: List(ReviewBoundary),
)
}
Constructors
-
Plan( id: String, kind: WorkflowKind, prompt: String, command_args: List(String), review_boundaries: List(ReviewBoundary), )
Human-in-the-loop review boundary.
pub type ReviewBoundary {
ReviewBoundary(
stage: String,
approval_required: Bool,
owner_role: String,
rationale: String,
)
}
Constructors
-
ReviewBoundary( stage: String, approval_required: Bool, owner_role: String, rationale: String, )
Verification track for M44 integration checks.
pub type VerificationTrack {
GeneratorTrack
TemplateTrack
}
Constructors
-
GeneratorTrack -
TemplateTrack
AI workflow category.
pub type WorkflowKind {
ScaffoldGeneration
RefactorGeneration
TemplateRefinement
}
Constructors
-
ScaffoldGeneration -
RefactorGeneration -
TemplateRefinement
Values
pub fn evaluate(plan: Plan) -> Evaluation
Evaluate one AI workflow plan against deterministic guardrails.
pub fn quality_score(evaluation: Evaluation) -> Int
Evaluation quality score accessor.
pub fn refactor_plan(
module_path: String,
change_summary: String,
) -> Plan
Build one refactor-focused AI plan.
pub fn required_evidence(
track: VerificationTrack,
) -> List(String)
Required evidence labels for one verification track.
pub fn satisfies_track_requirements(
evaluation: Evaluation,
track: VerificationTrack,
external_signature: String,
) -> Bool
True when one evaluation satisfies required evidence and external signature.
pub fn scaffold_plan(app_name: String, resource: String) -> Plan
Build one scaffolding-focused AI plan.
pub fn template_plan(
component_name: String,
change_summary: String,
) -> Plan
Build one template-refinement AI plan.
pub fn violations(evaluation: Evaluation) -> List(String)
Evaluation violations accessor.