Planner sampling, scoring, and debugging

Planner runs score and debug each outline candidate before execution. Use these controls to understand scoring and inspect alternatives.

Sampling controls

The normalized candidate is scored before selection to ensure the highest-quality plan is chosen, even when early samples look promising.

Scoring rules

Planner scoring rewards concise, compliant plans and penalizes risky or invalid suggestions:

See src/lib/planning/scoring.sh for the exact heuristics applied to each candidate.

Debugging planner output

Every candidate plan is normalized and appended to PLANNER_DEBUG_LOG (default ${TMPDIR:-/tmp}/okso_planner_candidates.log) as a JSON object containing:

The log is truncated at the start of each planner invocation to keep runs isolated. Use the file to audit why the winning plan beat the alternatives or to reproduce scoring decisions during development.