Candidate Ranking 1.4.0
Local AI may reorder policy candidates; it cannot propose, validate, or apply a new action.
Candidate contract
{
id: 'candidate-…',
intent: { type, target, value, attribute? },
reason: '…',
constraints: ['allowlist', 'guardrails']
}Ranker output
{ ranked: [ { id: 'candidate-…', score: 0.0 } ] }Resolution
Unknown IDs, duplicate IDs, and invalid scores are dropped. Surviving IDs map back to the original policy intents before validator and guardrails run.
Fallback order
- AI disabled: use Phase-2 policy order.
- Provider unavailable or ranking empty: retain policy order.
- Valid ranking: resolve IDs, then validate and apply normally.
Security property
The output vocabulary is closed over existing IDs. A ranker cannot emit HTML, CSS, JavaScript, selectors, or a new intent type.