Skip to content

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): string

Fold expert guidance into a context block the coding agent reads before it starts. Empty guidance yields an empty string.

Parameters:

NameTypeDefault
guidanceExpertGuidance

Returns: string

(source)

guidanceOrEmpty ​

ts
guidanceOrEmpty(result: Result<ExpertGuidance>): ExpertGuidance

Return expert guidance, or empty guidance if the consultation failed.

Parameters:

NameTypeDefault
resultResult<ExpertGuidance>

Returns: ExpertGuidance

(source)