agentleFS
hailo-aihailo-ai/hailo-apps/.cursor/rules/hailo-global.mdc

hailo-apps / rules

Cursor rule506 starsChanged 7 months agoMITView on GitHub

All skills, instructions, toolsets, knowledge bases, and memory live in .hailo/. Read .hailo/README.md for the complete master index. Always walk through key decisions with the user before building. Ask 2-3 targeted questions to confirm app type, features, and input source. This creates a collaborative workflow and catches misunderstandings early. Only skip questions if the user explicitly says "just build it" or "use defaults". Based on what the task involves, read only the matching rows: Persistent knowledge in .hailo/memory/. Read at…

We split this hailo-global.mdc into the rules it gives an agent

9 rules. About 0 are common, 0 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All skills, instructions, toolsets, knowledge bases, and memory live in .hailo/.

    line 7
  2. Very specific:

    Read .hailo/README.md for the complete master index.

    line 8
  3. Very specific:

    HEF resolution: Always use resolve_hef_path(path, app_name, arch)

    line 20
  4. Very specific:

    Device sharing: Always use SHARED_VDEVICE_GROUP_ID when creating VDevice

    line 21
  5. Very specific:

    CLI parsers: Use get_pipeline_parser() or get_standalone_parser()

    line 23
  6. Very specific:

    Architecture detection: Use detect_hailo_arch() or --arch flag

    line 24
  7. Very specific:

    USB camera: Always --input usb for auto-detection.

    line 25
  8. Very specific:

    SKILL.md is sufficient: Read SKILL.md + common_pitfalls.md only.

    line 26
  9. Very specific:

    Custom background: Use background.copy() — never blend camera feed with background.

    line 27

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
hailo-global.mdc
---
alwaysApply: true
---

# Hailo Apps — Global Rules

All skills, instructions, toolsets, knowledge bases, and memory live in `.hailo/`.
Read `.hailo/README.md` for the complete master index.

## Interactive Workflow (MUST FOLLOW)

**Always walk through key decisions with the user before building.** Ask 2-3 targeted
questions to confirm app type, features, and input source. This creates a collaborative
workflow and catches misunderstandings early. Only skip questions if the user explicitly
says "just build it" or "use defaults".

## Critical Conventions

1. **Imports are always absolute**: `from hailo_apps.python.core.common.xyz import ...`
2. **HEF resolution**: Always use `resolve_hef_path(path, app_name, arch)`
3. **Device sharing**: Always use `SHARED_VDEVICE_GROUP_ID` when creating VDevice
4. **Logging**: Use `get_logger(__name__)`
5. **CLI parsers**: Use `get_pipeline_parser()` or `get_standalone_parser()`
6. **Architecture detection**: Use `detect_hailo_arch()` or `--arch` flag
7. **USB camera**: Always `--input usb` for auto-detection. Never hardcode `/dev/video0`.
8. **SKILL.md is sufficient**: Read SKILL.md + common_pitfalls.md only. Do NOT read source code.
9. **Custom background**: Use `background.copy()` — never blend camera feed with background.


### Context Routing Table

Based on what the task involves, read **only** the matching rows:

| If the task mentions... | Read these files |
|---|---|
| **VLM, vision, image understanding** | `.hailo/skills/hl-build-vlm-app.md`, `.hailo/toolsets/vlm-backend-api.md`, `.hailo/memory/gen_ai_patterns.md` |
| **LLM, chat, text generation** | `.hailo/skills/hl-build-llm-app.md`, `.hailo/instructions/gen-ai-development.md`, `.hailo/toolsets/gen-ai-utilities.md`, `.hailo/memory/gen_ai_patterns.md` |
| **Agent, tools, function calling** | `.hailo/skills/hl-build-agent-app.md`, `.hailo/toolsets/gen-ai-utilities.md`, `.hailo/memory/gen_ai_patterns.md` |
| **Voice, STT, TTS, Whisper, speech** | `.hailo/skills/hl-build-voice-app.md`, `.hailo/toolsets/gen-ai-utilities.md` |
| **Pipeline, GStreamer, video, stream** | `.hailo/skills/hl-build-pipeline-app.md`, `.hailo/instructions/gstreamer-pipelines.md`, `.hailo/toolsets/gstreamer-elements.md`, `.hailo/memory/pipeline_optimization.md` |
| **Game, interactive, pose game** | `.hailo/skills/hl-build-pipeline-app.md`, `.hailo/toolsets/pose-keypoints.md`, `.hailo/toolsets/core-framework-api.md`, `.hailo/memory/common_pitfalls.md` |
| **Standalone, OpenCV, HailoInfer** | `.hailo/skills/hl-build-standalone-app.md`, `.hailo/toolsets/core-framework-api.md` |
| **Camera, USB, RPi, capture** | `.hailo/skills/hl-camera.md`, `.hailo/memory/camera_and_display.md` |
| **HEF, model, download, config** | `.hailo/skills/hl-model-management.md`, `.hailo/toolsets/hailort-api.md`, `.hailo/memory/hailo_platform_api.md` |
| **Monitoring, events, alerts** | `.hailo/skills/hl-monitoring.md`, `.hailo/skills/hl-event-detection.md` |
| **Testing, validation, pytest** | `.hailo/skills/hl-validate.md`, `.hailo/instructions/testing-patterns.md` |
| **ALWAYS read (every task)** | `.hailo/memory/common_pitfalls.md`, `.hailo/instructions/coding-standards.md` |

## Available Skills

| Skill | Doc |
|-------|-----|
| Build VLM App | `.hailo/skills/hl-build-vlm-app.md` |
| Build Pipeline App | `.hailo/skills/hl-build-pipeline-app.md` |
| Build Standalone App | `.hailo/skills/hl-build-standalone-app.md` |
| Build Agent App | `.hailo/skills/hl-build-agent-app.md` |
| Build LLM App | `.hailo/skills/hl-build-llm-app.md` |
| Build Voice App | `.hailo/skills/hl-build-voice-app.md` |

## Memory

Persistent knowledge in `.hailo/memory/`. Read at task start, update when learning.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.