diff --git a/.claude/agents/mao-implementer.md b/.claude/agents/mao-implementer.md index 3f1ad64..7b40e5e 100644 --- a/.claude/agents/mao-implementer.md +++ b/.claude/agents/mao-implementer.md @@ -2,7 +2,7 @@ name: mao-implementer description: Sonnet implementation agent. Use to implement a designed, scoped task, run the relevant checks, and self-review the diff. Escalates to mao-designer (Opus) after 3 failed attempts. model: sonnet -effort: max +effort: xhigh --- You are **mao-implementer**, the implementation agent in this repository's diff --git a/CLAUDE.md b/CLAUDE.md index e0022d0..d94533a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,23 +2,46 @@ ## Repository overview -NixOS flake for the `desktop` host (user `faumaray`): flakes, home-manager, -agenix (secrets + SSH keys), disko (NVMe system disk + SATA SSD data disk), -lanzaboote (Secure Boot), Hyprland (from its flake, applied through its own -overlay), Noctalia shell, WezTerm, Neovim, Steam + Proton, full AMD -CPU/GPU support. +NixOS flake for the `desktop` host (user `faumaray`) in the dendritic layout: +every `.nix` file under `modules/` is a flake-parts module, imported by +import-tree. Features ("aspects") are `flake.modules.nixos.` and +`flake.modules.homeManager.`; a host imports the aspects it wants. +Stack: flake-parts, home-manager (NixOS module), agenix, disko, lanzaboote +(Secure Boot), Hyprland (own flake and overlay) + Noctalia, Stylix theming, +WezTerm, Neovim, Steam + Proton, proxy-suite, Docker and a Gitea runner, +Claude Code with MCP servers, full AMD support. -- `flake.nix`: inputs and outputs (`nixosConfigurations`, `apps`, `packages.iso`, `devShells`, `formatter`). -- `lib/`: helpers (`mkHost`). -- `overlays/`: custom overlays plus the upstream Hyprland overlay. -- `modules/nixos/`: NixOS modules, with custom options under `my.*`. -- `modules/home/`: home-manager modules, with custom options under `my.home.*`. -- `hosts//`: per-host config, `disko.nix`, `hardware-configuration.nix`. -- `secrets/`: `secrets.nix` (recipients) and encrypted `*.age` files. Never commit plaintext or `keys/`. -- `apps/`: install, key and secret helper scripts exposed as `nix run .#`. +The canonical remote is Gitea (https://git.faumaray.com/faumaray/NixOsConfig); +GitHub is a secondary remote. Pull requests and issues are handled through the +Gitea MCP tools. -Conventions: format with `nix fmt` (nixfmt). New behaviour goes behind a -`my.*` option with an `enable` flag. Keep host files declarative and small. +- `flake.nix`: inputs and `nixConfig`; `outputs` is flake-parts over import-tree + of `modules/`. +- `modules/flake/`: glue: systems, `meta` (shared data), host construction + (`configurations.nixos`), overlays, packages, apps, dev shell, formatter, checks. +- `modules/users/`: `meta.owner`, the user identity every aspect reads. +- `modules/core/`: the `core` aspect every host imports (nix, nixpkgs, boot, + locale, networking, users, home-manager, facts for install-system; agenix + joins it from `modules/security/secrets.nix`). +- `modules//`: aspects (`boot`, `hardware`, `security`, `network`, `dev`, + `desktop`, `theme`, `cli`, `ai`, `gaming`); one file can define the NixOS and + the home-manager half of a feature. +- `modules/hosts//`: a host: aspect lists and host-only values + (`modules/hosts/desktop/host.nix`, plus `hardware.nix` and `disks.nix`). +- `modules/installer/`: the installer ISO. +- `hosts//`: files install-system writes (`hardware-configuration.nix`, + `disk-ids.json`); not modules. +- `pkgs/`: install, key and secret helpers (`nix run .#`; the apps are + declared in `modules/flake/apps.nix`). +- `secrets/`: `secrets.nix` (recipients) and encrypted `*.age` files, all + optional (login password, SSH keys, `secrets/gitea-runner-token.age`, + `secrets/tg-ws-proxy-secret.age`). Never commit plaintext or `keys/`. + +Conventions: format with `nix fmt` (nixfmt). New behaviour is a new aspect, +not an `enable` option: importing an aspect enables it. Shared values come from +`config.meta`, bound in a `let` before any NixOS/home-manager module; +home-manager halves read the system through `osConfig`. Theming goes through +`modules/theme/stylix.nix`. Keep host files small. Checks: `nix flake check --no-build` and `nix eval .#nixosConfigurations.desktop.config.system.build.toplevel.drvPath`. @@ -34,7 +57,7 @@ re-delegate it or act as orchestrators. |---|---|---| | main session | `fable` / `max` (see `.claude/settings.json`) | Orchestrator | | `mao-designer` | opus / max | Designs, acceptance criteria, escalations | -| `mao-implementer` | sonnet / max | Implements, tests, self-reviews | +| `mao-implementer` | sonnet / xhigh | Implements, tests, self-reviews | | `mao-sonnet-reviewer` | sonnet / max | Independent implementation review | | `mao-opus-reviewer` | opus / max | Final independent review | | `mao-helper` | haiku | Searches, summaries, routine git |