| name | planning-code-goal-error-handling |
| description | Sub-skill of planning-code-goal: Error Handling. |
| version | 1.0.0 |
| category | development |
| type | reference |
| scripts_exempt | true |
Error Handling
Error Handling
Goal Infeasibility
if (!canAchieveGoal(currentState, goalState, constraints)) {
const achievableGoal = findMaximalAchievableSubset(goalState);
console.log(`Full goal not achievable. Suggested: ${achievableGoal}`);
const blockers = identifyBlockers(goalState);
console.log(`Blocked by: ${blockers}`);
}
Phase Failures
if (phaseResult.failed) {
const failures = phaseResult.failedCriteria;
if (canRetry(failures)) {
await retryPhase(phase, adjustedConfig);
} else {
await replanFromPhase(phase);
}
}