Skip to content

Commit 71c021b

Browse files
Kabuki94claude
andcommitted
agent/tmpfiles: fix agent bootstrap chain; create all missing resolution paths
- .gitignore: whitelist CLAUDE.md, GEMINI.md, system-prompt.md (tracked but not whitelisted -- would be silently lost on gitignore resets) - system-prompt.md: new symlink -> usr/share/mios/ai/system.md; satisfies fallback path referenced in GEMINI.md and AGENTS.md for off-host agents - tmpfiles.d/mios-infra.conf: declare /etc/mios/ai and /etc/mios/env.d so the directories exist at first boot before the bootstrap installer runs; any agent following the 3-layer system prompt cascade can now resolve all paths without 'no such file' failures - .cursorrules, .clinerules: rewrite to OpenAI-standard redirector format; remove emoji and wrong file references, add full load order, architectural laws, and sanitization rules consistent with GEMINI.md / AGENTS.md stubs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eaa4a12 commit 71c021b

5 files changed

Lines changed: 55 additions & 25 deletions

File tree

.clinerules

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1-
# MiOS Architectural Purity Rules
2-
# MANDATE: Enforce AI-native surface contract without conversational artifacts.
3-
4-
- **System Integrity:** Maintain absolute FHS compliance and immutable root purity.
5-
- **Declarative Hardware:** All hardware delegation must be in /usr/lib/bootc/kargs.d/.
6-
- **Zero-Trust:** Deny-by-default for execution (fapolicyd) and networking (firewalld).
7-
- **Automation:** Use "set -euo pipefail" for all shell logic.
8-
- **Surface:** /v1/ endpoints are pure relational schemas for local LLM discovery.
1+
# MiOS development agent rules — Cline/AI extension 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.
6+
7+
## Architectural laws (non-negotiable)
8+
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
15+
16+
## Repo structure
17+
18+
The working directory is the OS root /. File paths are FHS paths, not repo-relative.
19+
System overlay (mios.git): /Containerfile, /Justfile, /automation/, /usr/share/mios/, /usr/lib/
20+
User overlay (mios-bootstrap.git): /etc/mios/, /usr/share/mios/ai/, /usr/share/mios/knowledge/
21+
22+
## AI artifact sanitization
23+
24+
No vendor/corporate names in persisted artifacts. No chat metadata. No foreign sandbox paths.
25+
All AI endpoints target http://localhost:8080/v1. Direct declarative prose only.

.cursorrules

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
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.
26

3-
You are assisting in the development of the **MiOS** repository. MiOS is an immutable, AI-native workstation.
7+
## Architectural laws (non-negotiable)
48

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
1015

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
1617

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.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
!/.github/**
2727
!/AGENTS.md
2828
!/AI.md
29+
!/CLAUDE.md
30+
!/GEMINI.md
31+
!/system-prompt.md
2932
!/ARCHITECTURE.md
3033
!/CONTRIBUTING.md
3134
!/Containerfile

system-prompt.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/share/mios/ai/system.md

usr/lib/tmpfiles.d/mios-infra.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ d /etc/ceph 0755 root root -
2929

3030
# ── MiOS Component Skeletons ──────────────────────────────────────────────
3131
d /etc/mios 0755 root root -
32+
d /etc/mios/ai 0755 root root -
33+
d /etc/mios/env.d 0755 root root -
3234
# Seed role.conf from the image-baked example if admin has not overridden it
3335
C /etc/mios/role.conf 0644 root root - /usr/share/mios/role.conf.example
3436

0 commit comments

Comments
 (0)