andy-stack_vaultkeeper-ai/AIClasses/ToolDefinitions/Tools/SkipStep.ts
Andrew Beal d18f5ef655 refactor: replace Replan with granular orchestration tools
Replace the single Replan tool with three targeted alternatives:
ReviseStep, RevisePlan, and SkipStep. This gives the orchestration
agent more precise control over plan recovery — revising only the
current step, replacing all remaining steps, or skipping a step
entirely — rather than triggering a full replan each time.

Also give the orchestration agent read access to vault files so it
can resolve execution failures without routing back to the planning
agent, and update the execution agent prompt to stop it from
attempting self-recovery (gap resolution is now the orchestrator's
responsibility).
2026-02-19 20:48:59 +00:00

29 lines
No EOL
1.2 KiB
TypeScript

import { AITool } from "Enums/AITool";
import type { IAIToolDefinition } from "../IAIToolDefinition";
export const SkipStep: IAIToolDefinition = {
name: AITool.SkipStep,
description: `Skips the current step and advances to the next one without retrying.
Use this when the step is no longer necessary or when its failure is acceptable and execution should continue.
Call this when:
- The user has explicitly asked to not perform the step
- The step is no longer relevant given what previous steps revealed
- The failure is non-critical and the remaining plan can succeed without this step
Do NOT call this when:
- The step's objective is already satisfied (complete the step instead)
- The step failed and you think a revised instruction would fix it (revise the step instead)
- The failure means the goal cannot be achieved (cancel the plan instead)`,
parameters: {
type: "object",
properties: {
user_message: {
type: "string",
description: "A short message to be displayed to the user explaining why the step is being skipped. Example: 'Skipping step as requested by user' or 'Skipping non critical step'"
}
},
required: ["user_message"]
}
};