diff --git a/AGENTS.md b/AGENTS.md index 42b33498cc..2591097c85 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,7 +28,7 @@ This means: | Rule | Explanation | |---|---| -| **Own your dependencies** | Every crate and library Red Bear uses must have its source accessible in `local/sources/` or `local/recipes/`. No depending on upstream crates that we cannot fix ourselves. | +| **Own your dependencies** | Every crate and library Red Bear uses must have its source accessible in `local/sources/` or `local/recipes/`. No dependiendo on upstream crates that we cannot fix ourselves. | | **No waiting for upstream** | If a dependency breaks, we fix it in our fork. We do not file issues and wait. | | **Frozen snapshots only** | Upstream Redox is a reference, not a live dependency. We baseline on frozen snapshots and never auto-pull. | | **Upstream gitlab URLs are temporary** | Any recipe pointing at `gitlab.redox-os.org` (91 currently) must eventually be forked to `local/sources/` or pinned to a frozen archive. Exceptions: unmodified upstream packages with pinned revisions. | @@ -37,10 +37,93 @@ This means: **Concretely:** - `local/recipes/drivers/redox-driver-sys/` is OUR fork. We fix compilation errors there. -- `local/sources/kernel/` is OUR kernel. We don't pull from `gitlab.redox-os.org/redox-os/kernel`. +- `local/sources/kernel/` is OUR kernel. We don't pull from `gitlab.redox-os.org/redox-oskernel`. - If a Cargo dependency breaks, we fork the dependency crate to `local/sources/` and pin our Cargo.toml to our fork. - The Linux kernel in `local/reference/` is read-only reference — never a dependency. +### NO OVERLAY-STYLE PATCHES — DIRECT EDITS ONLY + +**Hard policy. No exceptions. No "just this once." No "temporary until we fork."** + +The Red Bear build is a **full fork**, not an overlay on top of Redox. The +correct workflow for any change is: + +| Want to change | Where to do it (DIRECT EDIT) | +|---|---| +| Change a recipe's build config | Edit `local/recipes///recipe.toml` directly. If the recipe is in upstream `recipes///recipe.toml`, fork it: copy to `local/recipes///recipe.toml` and edit there. | +| Change a source file | Edit `local/sources//.rs` directly. | +| Add a new package | Create `local/recipes///recipe.toml` directly. | +| Change a build script | Edit `local/scripts/