|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Project Structure & Module Organization |
| 4 | +- `index.html`: Single-page app entry point (tabs, layout). |
| 5 | +- `styles.css`: Theme and component styles (dark/light toggle). |
| 6 | +- `app.js`: Vanilla JS for routing, filters, dialog, study tools. |
| 7 | +- `data/controls.json`: Source of truth for CIS v8 controls (IDs, text, checklists). |
| 8 | +- `cis_v8_infographic.svg` and `cis_v8_infographic.html`: Infographic assets. |
| 9 | +- `CIS Controls V8/`: Upstream reference docs (PDF/XLSX). Do not edit. |
| 10 | + |
| 11 | +## Build, Test, and Development Commands |
| 12 | +- Run locally (no build step): |
| 13 | + - `open index.html` (macOS) or double‑click in Explorer/Finder. |
| 14 | + - `python3 -m http.server 8000` then visit `http://localhost:8000`. |
| 15 | +- Lint (optional if you add tooling): |
| 16 | + - `npx eslint app.js` and `npx prettier -w .` (if configured). |
| 17 | + |
| 18 | +## Coding Style & Naming Conventions |
| 19 | +- HTML/JS/CSS with 2‑space indentation; wrap at ~100 chars where sensible. |
| 20 | +- Filenames: kebab‑case (`cis_v8_infographic.svg`, `styles.css`). |
| 21 | +- JS: lowerCamelCase for variables/functions, PascalCase for classes, no one‑letter names. |
| 22 | +- Keep logic framework‑free, modular, and accessible (ARIA roles, semantic tags). |
| 23 | + |
| 24 | +## Testing Guidelines |
| 25 | +- No automated tests configured. For manual QA: |
| 26 | + - Verify search/filter/sort in Controls tab. |
| 27 | + - Open a card: dialog shows Why/How/Metrics; add to Study. |
| 28 | + - Study tab: flashcard flip, checklist persistence (localStorage), reset. |
| 29 | + - Light/dark toggle persists across refresh. |
| 30 | +- If adding tests, place under `tests/` and prefer lightweight browser tests (Playwright). Document commands in this section. |
| 31 | + |
| 32 | +## Commit & Pull Request Guidelines |
| 33 | +- Messages: imperative, concise. Prefer Conventional Commits, e.g., `feat: add IG filters`, `fix: dialog close on ESC`. |
| 34 | +- PRs: include summary, screenshots/GIFs for UI, and reference any issue IDs. Limit scope; avoid unrelated refactors. |
| 35 | + |
| 36 | +## Security & Configuration Tips |
| 37 | +- Do not commit large binaries (e.g., the included video). Keep external assets out of `data/`. |
| 38 | +- Local file links to PDFs/XLSX rely on hosting from the project root or a static server. |
| 39 | +- Treat `data/controls.json` as the canonical content; validate JSON before commit. |
0 commit comments