MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / isPlanningToolCall

Function isPlanningToolCall

src/agent/preflight-gate.ts:87–97  ·  view source on GitHub ↗
(name: string, args: any)

Source from the content-addressed store, hash-verified

85 * present_plan / todo_write, or writing a PLAN/DESIGN/ARCHITECTURE/ADR/RFC document.
86 */
87export function isPlanningToolCall(name: string, args: any): boolean {
88 if (name === 'present_plan' || name === 'todo_write') return true;
89 if (name === 'write_file' || name === 'create_file' || name === 'edit_text') {
90 const path =
91 typeof args?.path === 'string' ? args.path :
92 typeof args?.file === 'string' ? args.file :
93 typeof args?.filename === 'string' ? args.filename : '';
94 return PLAN_FILE_RE.test(path);
95 }
96 return false;
97}
98
99export const PREFLIGHT_MESSAGE =
100 '[ARCHITECTURE_GATE] This looks like a build/refactor task and no plan exists yet. ' +

Callers 2

executeToolCallMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected