Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/flomenco-inc/flo-plugin/root-cause-before-fixgit clone --depth 1 https://github.com/Flomenco-Inc/flo-pluginWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00958 | $0.00958 |
| Opus 5 | $0.00479 | $0.00479 |
| Sonnet 5 | $0.00192 | $0.00192 |
| Haiku 4.5 | $0.00096 | $0.00096 |
Grade A, and why
root-cause-before-fix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Root Cause Before Fix
Before writing any code to fix a bug or address a "not working" report, you MUST state the root cause and evidence. Do not skip this step. Do not say "let me try this" without first saying "the cause is X because of Y."
The problem this prevents
The #1 failure pattern: user reports a bug → agent makes a plausible-looking code change → user tests → still broken → agent makes another guess → still broken → 5 rounds later, a whole day is wasted. The fix is to diagnose before treating.
Required format
Before writing any fix, present this to the user:
**Root cause:** <one sentence — what is actually wrong>
**Evidence:** <the specific log, API response, DB query, code path, or trace that proves it>
**Why this fix:** <how the proposed change addresses the root cause, not just the symptom>
How to gather evidence
For API errors (4xx/5xx)
# Check CloudWatch logs for the Lambda
aws logs filter-log-events \
--log-group-name /aws/lambda/flo-dev-<service>-<function> \
--start-time $(date -v-30M +%s000) \
--profile 469128505698_FlomencoSuperAdmin --region us-east-1 \
--filter-pattern "ERROR" \
--query 'events[*].message' --output text | tail -20
For 403 errors specifically
Check whether the route exists in openapi.yaml — API Gateway returns 403 (not 404) for undeclared routes. Also check service_config.yaml for the Lambda mapping. See flo-system-architecture.mdc § "Debugging 403 errors".
For "deployed but not working"
# Verify the Lambda is actually running the new code
aws lambda get-function --function-name flo-dev-<service>-<function> \
--profile 469128505698_FlomencoSuperAdmin --region us-east-1 \
--query 'Configuration.{LastModified:LastModified,CodeSha256:CodeSha256}'
For frontend rendering issues
playwright > navigate to https://dev.floapp.co/<page>
playwright > evaluate: document.querySelector('<selector>') !== null
playwright > evaluate: JSON.stringify(window.__REACT_DEVTOOLS_GLOBAL_HOOK__ ? 'devtools' : 'no devtools')
# Check network tab for failed API calls
playwright > evaluate: fetch('https://api.dev.floapp.co/v1/<endpoint>', {headers: {'Authorization': 'Bearer ...'}}).then(r => r.status + ' ' + r.statusText)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 91 lines · 958 tokens per session scan A 3226b0210295
root-cause-before-fix is a cursor rule published in the GitHub repository Flomenco-Inc/flo-plugin (0 stars, last pushed 2d ago), licensed MIT. It adds 958 tokens to every session, about $0.0048 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.