|
1 | | -# MiOS .cursorrules — Engineering Standards (Day 0) |
| 1 | +# MiOS development agent rules — cursor/IDE AI assistant context. |
| 2 | +# Load /usr/share/mios/ai/system.md as the canonical system prompt. |
| 3 | +# Apply /etc/mios/ai/system-prompt.md as host-local override if present. |
| 4 | +# Apply ~/.config/mios/system-prompt.md as per-user override if present. |
| 5 | +# This file carries no tool-specific deltas — follow system.md verbatim. |
2 | 6 |
|
3 | | -You are assisting in the development of the **MiOS** repository. MiOS is an immutable, AI-native workstation. |
| 7 | +## Architectural laws (non-negotiable) |
4 | 8 |
|
5 | | -## ⚖️ Immutable Appliance Laws |
6 | | -1. **USR-OVER-ETC**: Static config goes in `/usr/lib/`. No `/etc` in build context. |
7 | | -2. **NO-MKDIR-IN-VAR**: Persistence via `tmpfiles.d`. No `/var` in build context. |
8 | | -3. **UNPRIVILEGED-QUADLETS**: sidecars MUST define `User=`/`Group=` and `Delegate=yes`. |
9 | | -4. **BOOTC-NATIVE**: Always ensure `bootc container lint` passes. |
| 9 | +1. USR-OVER-ETC: static config in /usr/lib/<component>.d/; /etc/ = admin overrides only |
| 10 | +2. NO-MKDIR-IN-VAR: every /var/ path declared via usr/lib/tmpfiles.d/*.conf |
| 11 | +3. BOUND-IMAGES: every Quadlet sidecar image symlinked in /usr/lib/bootc/bound-images.d/ |
| 12 | +4. BOOTC-CONTAINER-LINT: RUN bootc container lint is the final Containerfile instruction |
| 13 | +5. UNIFIED-AI-REDIRECTS: MIOS_AI_ENDPOINT/MODEL/KEY target http://localhost:8080/v1; zero vendor URLs |
| 14 | +6. UNPRIVILEGED-QUADLETS: every Quadlet defines User=, Group=, Delegate=yes |
10 | 15 |
|
11 | | -## 🛠 Coding Standards |
12 | | -- **Pure FOSS**: No proprietary cloud APIs or services. |
13 | | -- **Local AI**: Target the OpenAI-compatible proxy at `http://localhost:8080/v1`. |
14 | | -- **Bash**: `set -euo pipefail`. Use `VAR=$((VAR + 1))`. Quote all variables. |
15 | | -- **SSOT**: Consult `INDEX.md` for all architectural and API surface contracts. |
| 16 | +## Build standards |
16 | 17 |
|
17 | | -## 📂 Key Directories |
18 | | -- `usr/`: Immutable rootfs content. |
19 | | -- `etc/`: Persistence templates. |
20 | | -- `tools/`: Utility toolchain. |
21 | | -- `specs/`: Research and blueprints. |
| 18 | +- Packages: /usr/share/mios/PACKAGES.md only (fenced packages-<category> blocks) |
| 19 | +- Shell: set -euo pipefail; VAR=$((VAR+1)) not ((VAR++)); dnf5: install_weak_deps=False |
| 20 | +- kargs: flat kargs = [...] array; no [kargs] header; no delete key |
| 21 | +- Never upgrade kernel/kernel-core; only kernel-modules-extra, kernel-devel, kernel-headers |
| 22 | +- All version pins, ports, paths defined in /usr/share/mios/env.defaults (MIOS_* vars) |
| 23 | +- Deliverables: complete replacement files only; no diffs, no patches |
| 24 | + |
| 25 | +## AI artifact sanitization |
| 26 | + |
| 27 | +No vendor/corporate names in persisted artifacts. No chat metadata. No foreign sandbox paths. |
| 28 | +All AI endpoints target http://localhost:8080/v1. Direct declarative prose only. |
0 commit comments