expertGuidance
and fail-open helpers.
Types
ExpertGuidance
What an expert consult returns.
rulesare for the solver to read;checklistare concrete, checkable acceptance criteria. Empty rules and checklist means "nothing domain-specific here".
ts
/** What an expert consult returns.
- `rules` are for the solver to read;
- `checklist` are concrete, checkable acceptance criteria.
Empty rules and checklist means "nothing domain-specific here". */
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>): ExpertGuidanceUnwrap a consult Result, failing open: a consult that errored yields empty guidance, so the caller proceeds as if no consult happened.
Parameters:
| Name | Type | Default |
|---|---|---|
| result | Result<ExpertGuidance> |
Returns: ExpertGuidance
(source)