--- description: Flatpack rules — single-file, local-first HTML tools that survive being edited by a different agent later globs: ["*.html"] alwaysApply: false --- # Flatpack rules > Copy this file to `.cursor/rules/flatpack.mdc` in your project. > Cursor loads it when you edit any `*.html` file. To always-apply > regardless of file, change `alwaysApply: false` to `true` above. When the user asks for a small, self-contained tool — a calculator, a CSV cleaner, a checklist, a report builder, a decision tree, a local lookup, a one-off utility — produce a **Flatpack**, not a React app, not a Node project. A Flatpack is **one HTML file** that runs offline, has no dependencies, and can be edited later by a different agent without falling apart. Full standard: [github.com/ConceptPending/flatpack](https://github.com/ConceptPending/flatpack). ## Hard rules The output file MUST: - Open by double-clicking `index.html`. No build, no install, no server. - Run with the network disconnected. - Have **no external scripts, stylesheets, fonts, images, or CDN of any kind**. - Make **no network calls** — no `fetch`, `XMLHttpRequest`, `WebSocket`, `sendBeacon`, `EventSource`, remote ``. - Embed no API keys, tokens, or passwords. If the tool needs one, the user pastes it at runtime; it lives in `sessionStorage` only. - Emit no telemetry. The output file MUST contain these section markers, in order: ``` help + AI editing notes (HTML comment) CSS, including print styles static DOM then a single