(name: string, args: any)
| 85 | * present_plan / todo_write, or writing a PLAN/DESIGN/ARCHITECTURE/ADR/RFC document. |
| 86 | */ |
| 87 | export 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 | |
| 99 | export const PREFLIGHT_MESSAGE = |
| 100 | '[ARCHITECTURE_GATE] This looks like a build/refactor task and no plan exists yet. ' + |
no outgoing calls
no test coverage detected