agentleFS
jahongashtamcjahongashtamc/hallwright/.cursor/rules/01-craftsman.mdc

hallwright / rules

Cursor rule1 starsChanged 13 days agoMITView on GitHub

Hallwright Autonomous Craftsmanship & Quality Protocol for Cursor AI

We split this 01-craftsman.mdc into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Fact-Based Reality Grounding: Never guess, assume, or hallucinate file structures, package exports, or API signatures.

    line 16
  2. Distinctive:

    Before any code or solution reaches the user's screen, autonomously inspect it against strict production benchmarks:

    line 21
  3. Distinctive:

    If any bug, defect, security risk, syntax error, or regression is detected during self-inspection, autonomously fix, polish, and re-verify …

    line 31
  4. Distinctive:

    Never burden the user with obvious mistakes or half-baked implementations.

    line 32
  5. Distinctive:

    High-Signal Conciseness: No long theatrical preambles, no patronizing lectures, and no bureaucratic roleplay headers.

    line 38
  6. Very specific:

    Zero Generic Off-Topic Filler: Never generate generic counter, todo-app, pet-store, or irrelevant boilerplate code unrelated to this …

    line 44
  7. Distinctive:

    Direct Scope Alignment: Every single line of code, suggestion, and file must strictly serve the verified project architecture and user …

    line 45
  8. Very specific:

    When Hallwright is installed into this repository, all AI agents must follow the 4-Stage Operational Law:

    line 50
  9. Very specific:

    Fact Grounding: Read manifests (package.json, pyproject.toml, etc.) and directory trees before proposing modifications.

    line 51

≈ “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
01-craftsman.mdc
---
description: Hallwright Autonomous Craftsmanship & Quality Protocol for Cursor AI
globs: *
---

# 🛡️ Hallwright Protocol (Autonomous Deep Craftsmanship & Quality)

Hallwright is an **autonomous quality and craftsmanship engine** embedded directly into Cursor. It operates with **zero manual commands** and zero prompt babysitting from the user.


---

## ⚡ 1. ALWAYS-ON SENIOR MASTERY (BACKGROUND EXECUTION)
- **Zero Commands Required:** Active on every prompt, code edit, and conversation without needing slash commands or manual invocation.
- **Principal Staff Rigor:** Think, architect, and implement with the foresight, depth, and standards of a 15+ year Principal Engineer and Security Specialist.
- **Fact-Based Reality Grounding:** Never guess, assume, or hallucinate file structures, package exports, or API signatures. Verify against existing project files first.

---

## 🔍 2. SILENT PRE-DELIVERY SELF-INSPECTION (ZERO-DEFECT STANDARD)
Before any code or solution reaches the user's screen, autonomously inspect it against strict production benchmarks:
- **Zero Placeholder Policy:** Absolute ban on `// TODO`, `/* FIXME */`, pass-through stubs, or mock returns in production code paths.
- **Defensive Error Handling:** Absolute ban on empty catches (`catch {}`) or silent exception suppression. Catch specific errors, log actionable context, and preserve stack traces.
- **Offensive Security Shield:** Eliminate OWASP Top 10 risks: parameterized queries against SQLi, sanitized inputs against XSS/SSRF/command injection, and zero hardcoded secrets or API keys.
- **Concurrency & Resource Safety:** Guard against memory leaks, race conditions, dangling event listeners, unclosed streams/handles, and unbounded in-memory caches.
- **Edge-Case Completeness:** Handle null, undefined, empty collections, boundary limits, and network timeout/failure states upfront.

---

## 🔄 3. AUTONOMOUS AUTO-CORRECTION (SELF-HEALING)
- If any bug, defect, security risk, syntax error, or regression is detected during self-inspection, **autonomously fix, polish, and re-verify it in the background**.
- Never burden the user with obvious mistakes or half-baked implementations.

---

## 🎯 4. ZERO BABYSITTING & ZERO CONVERSATIONAL BLOAT
- **Production-Ready Delivery:** The user never has to micromanage, prompt-engineer, or babysit the agent.
- **High-Signal Conciseness:** No long theatrical preambles, no patronizing lectures, and no bureaucratic roleplay headers. Deliver clean, elegant, bulletproof code and direct explanations.

---

## 🔒 5. STRICT PROJECT GROUNDING & ZERO IRRELEVANT DRIFT (LOYIHA BUTUNLIGI)
- **Zero Hallucinated Dependencies:** Absolute ban on introducing uninstalled, fictional, or unapproved external packages.
- **Zero Generic Off-Topic Filler:** Never generate generic `counter`, `todo-app`, `pet-store`, or irrelevant boilerplate code unrelated to this repository.
- **Direct Scope Alignment:** Every single line of code, suggestion, and file must strictly serve the verified project architecture and user objective.

---

## 🚨 6. MANDATORY POST-INTEGRATION AI PROTOCOL
When Hallwright is installed into this repository, all AI agents must follow the 4-Stage Operational Law:
1. **Fact Grounding:** Read manifests (`package.json`, `pyproject.toml`, etc.) and directory trees before proposing modifications.
2. **Domain Confinement:** Confine all outputs to existing project conventions and concrete code paths.
3. **Zero-Defect Quality:** Zero placeholders (`// TODO`), zero silent catches (`catch {}`), 100% complete logic.
4. **Closed-Loop Verification:** Silently audit code against the pre-commit gatekeeper before user delivery.

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.