Skip to content

Cursor Installation

mark7766 edited this page Jul 14, 2026 · 2 revisions

Cursor Installation

Install ai-coding-ok in a Cursor project. Cursor auto-loads the PDCA rules via .cursor/rules/ai-coding-ok.mdc with alwaysApply: true.


Prerequisites

  • Cursor installed
  • Git installed
  • Bash (macOS/Linux/Git Bash) or Python 3 (Windows)

Step 1: Clone ai-coding-ok

git clone https://github.com/Mark7766/ai-coding-ok ~/tools/ai-coding-ok

Step 2: Run the install script

cd your-project

# macOS / Linux / Git Bash
bash ~/tools/ai-coding-ok/install.sh --cursor

# Windows (PowerShell)
python $env:USERPROFILE\tools\ai-coding-ok\install.py --cursor

This installs:

  • All standard ai-coding-ok files (AGENTS.md, CLAUDE.md, .github/agent/, etc.)
  • .cursor/rules/ai-coding-ok.mdc — Cursor-specific rule file with alwaysApply: true

Step 3: Initialize in Cursor

Open your project in Cursor, then in the Agent panel:

install ai-coding-ok

Cursor will:

  1. Detect the templates
  2. Ask what you're building
  3. Infer your tech stack and fill all placeholders
  4. Bootstrap the first memory entries

How Cursor auto-loads the rules

The .cursor/rules/ai-coding-ok.mdc file has alwaysApply: true in its frontmatter:

---
alwaysApply: true
---

This means every Cursor session automatically loads the PDCA enforcement rules — no slash command, no manual trigger needed. It's equivalent to Claude Code's CLAUDE.md auto-load mechanism.

What the rule enforces

Plan (before coding):
  1. Read AGENTS.md
  2. Read .github/agent/system-prompt.md
  3. Read .github/agent/workflows.md
  4. Read .github/agent/coding-standards.md
  5. Read .github/agent/memory/project-memory.md
  6. Read .github/agent/memory/decisions-log.md
  7. Read .github/agent/memory/task-history.md

Act (after coding):
  1. Update task-history.md (always)
  2. Update decisions-log.md (if architecture changed)
  3. Update project-memory.md (if facts changed)

Step 4: Verify

bash ~/tools/ai-coding-ok/scripts/verify.sh .

See Installation Verification for detailed exit code meanings.


Step 5: Commit

git add AGENTS.md CLAUDE.md .cursor/ .github/
git commit -m "chore: install ai-coding-ok framework"

Cursor vs other tools

Feature Cursor Claude Code Copilot
Auto-load mechanism .cursor/rules/*.mdc CLAUDE.md .github/copilot-instructions.md
alwaysApply ✅ Yes ✅ Implicit ✅ Implicit
Manual trigger needed No No No
Hooks support ✅ (Layer 4-5)

Cursor doesn't support Claude Code-style hooks, but the first 3 layers of the Five-Layer Defense still apply.


Common issues

"Cursor doesn't seem to read the rules"

Check that .cursor/rules/ai-coding-ok.mdc exists and has alwaysApply: true in its frontmatter. If the file is missing, re-run the install script.

"I use both Cursor and Claude Code"

Install ai-coding-ok once — both tools share the same .github/agent/ memory files. Run install.sh --cursor to add the Cursor rule file on top of the base installation.


Next steps

Clone this wiki locally