qubinode_navigator / rules
Cursor rule1 starsChanged 11 months agoMITView on GitHub
@-mention this rule when debugging issues. When troubleshooting deployment or runtime issues: Before looking at ANY code, check these environmental factors: REMEMBER: 90% of deployment issues are environmental. Fix the environment first!
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/adr-reference.mdcCursor rule
- .cursor/rules/dag-development.mdcCursor rule
- .cursor/rules/diagnostics.mdcCursor rule
- .cursor/rules/infrastructure-services.mdcCursor rule
- .cursor/rules/qubinode-overview.mdcCursor rule
- .cursor/rules/rag-knowledge.mdcCursor rule
- .cursor/rules/system-operations.mdcCursor rule
- .cursor/rules/vm-operations.mdcCursor rule
- github-issue-resolverSkill
The file
We split this troubleshooting.mdc into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
If you find a code bug, PROPOSE A GITHUB ISSUE: instead of fixing it
- Distinctive: line 21
Before looking at ANY code, check these environmental factors:
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
globs:
alwaysApply: false
---
# Troubleshooting Guide (SRE Mode)
@-mention this rule when debugging issues.
## CRITICAL SRE RULES
**When troubleshooting deployment or runtime issues:**
1. **PRIORITIZE environmental diagnostics over source code inspection**
2. **DO NOT refactor or rewrite deployment scripts during troubleshooting**
3. **FIX the environment** (DNS, disk, permissions, packages), not the code
4. **If you find a code bug, PROPOSE A GITHUB ISSUE** instead of fixing it
## Step 1: Environmental Diagnosis First
Before looking at ANY code, check these environmental factors:
| Check | Command | Common Fix |
| ----------- | ---------------------------------- | ----------------------------- |
| Services | `systemctl status libvirtd podman` | `systemctl restart <service>` |
| Disk Space | `df -h / /var/lib/libvirt` | Clean up old images/VMs |
| Memory | `free -h` | Stop unused containers |
| DNS | `nslookup $(hostname)` | Check /etc/resolv.conf |
| Firewall | `firewall-cmd --list-all` | Open required ports |
| SELinux | `getenforce; ausearch -m avc` | Set correct contexts |
| Permissions | `ls -la <path>` | chown/chmod as needed |
## DAG Issues
### DAG not appearing in UI
```bash
# Check for import errors
podman-compose exec -T airflow-scheduler airflow dags list-import-errors
# Clear DAG cache
cd ${QUBINODE_HOME:-$HOME/qubinode_navigator}/airflow && make clear-dag-cache
# Check file permissions
ls -la airflow/dags/
```
### DAG validation failing
```bash
# Run validation
./airflow/scripts/validate-dag.sh
# Check Python syntax
python3 -m py_compile airflow/dags/your_dag.py
```
## Service Issues
### Airflow not responding
```bash
# Check container status
cd ${QUBINODE_HOME:-$HOME/qubinode_navigator}/airflow
podman-compose ps
# View logs
podman-compose logs airflow-webserver
podman-compose logs airflow-scheduler
# Restart services
podman-compose restart
```
### PostgreSQL connection failed
```bash
# Check if running
pg_isready -h localhost -p 5432
# Check container
podman-compose logs postgres
```
### MCP Server issues
```bash
# Check health
curl http://localhost:8889/health
# View logs
podman-compose logs airflow-mcp-server
```
## VM Issues
### VM won't start
```bash
# Check libvirt
systemctl status libvirtd
virsh list --all
# Check resources
free -h
df -h /var/lib/libvirt
```
### VM no network
```bash
# Check networks
virsh net-list --all
# Check DHCP leases
virsh net-dhcp-leases default
```
## SRE Mode Rules
| Action | Allowed | Forbidden |
| ------------------------------ | ------- | --------- |
| Check journalctl/systemctl | ✓ | |
| Diagnose DNS/firewall/SELinux | ✓ | |
| Suggest dnf/yum install | ✓ | |
| Fix permissions/disk space | ✓ | |
| Propose GitHub Issues for bugs | ✓ | |
| Refactor deploy-qubinode.sh | | ✗ |
| Rewrite core Python files | | ✗ |
| Add new features during debug | | ✗ |
## Quick Health Check
```bash
# All-in-one status check
echo "=== Containers ===" && podman-compose ps
echo "=== Airflow ===" && curl -s http://localhost:8888/health
echo "=== MCP ===" && curl -s http://localhost:8889/health
echo "=== Libvirt ===" && virsh list --all | head -5
echo "=== Recent Errors ===" && journalctl -p err --since "30 minutes ago" | tail -10
```
**REMEMBER:** 90% of deployment issues are environmental. Fix the environment first!
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

