resilient-document-pipeline
Unified document generation with tool failure detection, domain knowledge fallback, progressive conversion, and Unicode safety
Unified document generation with tool failure detection, domain knowledge fallback, progressive conversion, and Unicode safety
Handle tool failures when researching regulatory/government content by using fallback methods and domain knowledge
Handle web research failures by pivoting to internal knowledge for content generation
Heuristic for detecting search tool failures and pivoting to domain knowledge for document generation
Safely update Excel workbooks by first locating candidate files, verifying workbook structure before editing, and running post-write validation against required sheets, populated columns, and sample counts.
Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval
Safely append CSS styles from one file to another, with per-selector grep verification after every append to catch silent truncation that tail or wc-l alone would miss
Reliably run TypeScript type-checking (npx tsc --noEmit) by using shell_agent as a fallback when run_shell fails due to environment or timeout issues.
How to reliably write files containing multi-byte Unicode (emoji, special symbols) when write_file fails with 'unknown error' by falling back to run_shell with a heredoc.
Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of /tmp helper scripts.
Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.
Fallback pattern for reliable file creation when code execution tools fail
Retry PDF generation with alternative engines when pandoc fails
Fallback pattern for PDF/document generation when execute_code_sandbox fails with opaque errors
Use shell Python heredoc as fallback when code sandbox fails
Delegate file generation to shell_agent when direct tools fail, with systematic file location and retrieval
Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift
Debug Python code execution failures by capturing partial traces, isolating failing functions, and incrementally verifying outputs
Report tool failures transparently and attempt minimal viable output with disclaimers
Debug Python script execution failures by capturing full tracebacks and verifying working directory