Jules Weekly Gap Analysis Prompt¶
What it is¶
The "Jules Weekly Gap Analysis" is a structured LLM prompt used to analyze failure patterns in n8n automation logs and propose concrete improvements to the repository's documentation or workflows.
What problem it solves¶
Automation stacks often suffer from "silent decay" where small API changes or unhandled edge cases lead to recurring failures. This prompt automates the root cause analysis and suggests specific fixes, ensuring the system remains resilient and well-documented.
Where it fits in the stack¶
This prompt is part of the Maintenance & Governance layer. It consumes data from the n8n Log Aggregator and generates actionable PRs for the DevOps (Jules) layer.
Typical use cases¶
- Weekly Reliability Review: Running the analysis every Sunday to identify top bottlenecks.
- Post-Migration Audit: Analyzing logs after a major service update (e.g., migrating to Prowlarr) to catch integration gaps.
- Documentation Backfill: Automatically identifying when a "401 Unauthorized" or "404 Not Found" error indicates a gap in the setup instructions for a service.
Strengths¶
- Data-Driven: Improvements are based on actual execution logs, not just theoretical gaps.
- Actionable: Output is designed to be fed directly into an Automation Improvement PR.
- Proactive: Identifies patterns before they become critical failures.
Limitations¶
- Log Dependency: Relies on the quality of error messages provided by n8n nodes.
- Volume Sensitivity: Requires a representative sample of logs (ideally 24h-168h) to identify meaningful patterns.
- Manual Verification: AI-suggested workflow fixes still require human verification before deployment in high-risk environments.
When to use it¶
- When you have more than 5 active n8n workflows and want to maintain a "High Confidence" stack.
- After integrating a new service or API to monitor for "teething" problems.
- As part of a regular maintenance sprint (Ralph-loop).
When not to use it¶
- For trivial stacks with only 1-2 simple workflows.
- If you don't have API access to your n8n instance's execution logs.
Related tools / concepts¶
- n8n: The automation platform being monitored.
- n8n Log Aggregator: The data source for this prompt.
- Automation PR Template: The output format for improvements.
- KnowledgeOps: The broader framework for repository-driven automation maintenance.
- Error Handling Patterns: The foundational n8n patterns this analysis helps enforce.
- Jules: The AI agent persona executing the analysis.
- Claude Code: The environment where Jules executes these tasks.
Prompt Template¶
Role: Senior Automation Engineer (Jules)
Task: Analyze n8n failure patterns and propose improvements.
Data provided:
{{LOG_AGGREGATOR_OUTPUT}}
Analyze the top 3 failure patterns:
1. For each pattern, identify the likely root cause (API change, timeout, data validation error, credential expiry).
2. Propose a specific "Action A" (Do the work) or "Action C" (Decompose) for this repository.
3. If the fix involves documentation, specify which file in `docs/` needs updating and what content to add.
4. If the fix involves a workflow change, describe the node-level adjustment needed.
Response Format:
- **Pattern 1**: [Description]
- **Root Cause**: [Analysis]
- **Proposed Fix**: [Specific steps]
- **Affected Files**: [File paths]
- **Pattern 2**: ...
...
- **General Recommendation**: [One meta-improvement for the automation stack]
How to use¶
- Run
python3 scripts/n8n_log_aggregator.py --hours 168 > logs_summary.txt. - Feed the contents of
logs_summary.txtinto this prompt. - Execute the proposed PRs using the Automation PR Template.
Sources / References¶
Contribution Metadata¶
- Last reviewed: 2026-05-13
- Confidence: high