expertGuidance
Expert agents return ExpertGuidance. Pass it through renderGuidance for a coding agent's context and use its checklist as acceptance criteria. guidanceOrEmpty turns a failed consultation into empty guidance.
Types
ExpertGuidance
Guidance for a solver: domain conventions in rules and checkable acceptance criteria in checklist. Empty lists mean the consult supplied no domain-specific guidance.
ts
/** Guidance for a solver: domain conventions in `rules` and checkable
acceptance criteria in `checklist`. Empty lists mean the consult supplied
no domain-specific guidance. */
export type ExpertGuidance = {
domain: string;
rules: string[];
checklist: string[]
}(source)
Constants
emptyGuidance
ts
export static const emptyGuidance: ExpertGuidance = {
domain: "",
rules: [],
checklist: []
}Type: ExpertGuidance
(source)
Functions
renderGuidance
ts
renderGuidance(guidance: ExpertGuidance): stringFold expert guidance into a context block the coding agent reads before it starts. Empty guidance yields an empty string.
Parameters:
| Name | Type | Default |
|---|---|---|
| guidance | ExpertGuidance |
Returns: string
(source)
guidanceOrEmpty
ts
guidanceOrEmpty(result: Result<ExpertGuidance>): ExpertGuidanceReturn expert guidance, or empty guidance if the consultation failed.
Parameters:
| Name | Type | Default |
|---|---|---|
| result | Result<ExpertGuidance> |
Returns: ExpertGuidance
(source)