Commit 999edc1c1e1d
Changed files (4)
docs/superpowers/plans/2026-09-11-kyushu-nagoya-builder.md
@@ -0,0 +1,273 @@
+# Kyushu Nagoya ARM Builder Implementation Plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** Configure Kyushu to submit native `aarch64-linux` builds to Nagoya using a separate restricted SSH builder key.
+
+**Architecture:** The common Fedora host-artifact generator will identify both Aomi and Kyushu as Nagoya builder clients and generate the same local Nix builder wiring. A generic Nagoya authorization helper will add a supplied public key as a forced-command SSH identity. Kyushu receives its own private key outside Git.
+
+**Tech Stack:** Nix flakes, Nix-generated Fedora system artifacts, Bash, OpenSSH, Nix remote builders.
+
+## Global Constraints
+
+- Do not commit private key material, log it, or document it.
+- Kyushu and Aomi use distinct builder keypairs, although each local private key path is `/etc/nix/keys/nagoya-builder`.
+- Nagoya builder keys must be limited to `restrict,command="/nix/var/nix/profiles/default/bin/nix-daemon --stdio"`.
+- Do not add ARM emulation/binfmt or a general builder-inventory abstraction.
+- Do not deploy to Kyushu or Nagoya without a fresh explicit confirmation after showing the diff and successful build results.
+- Do not commit unless the user explicitly requests it.
+
+---
+
+### Task 1: Generalize generated Fedora Nagoya-builder configuration
+
+**Files:**
+- Modify: `systems/common/fedora-work/gen-configs.nix:7-107`
+- Modify: `systems/common/fedora-work/test-gen-configs.sh:8-15`
+
+**Interfaces:**
+- Consumes: `hostname`, `globals.machines.nagoya.ssh.hostKey`, and `lib.elem`.
+- Produces: `fedoraConfigs.aomi` and `fedoraConfigs.kyushu` artifacts containing `/etc/nix/machines` and `/etc/ssh/ssh_known_hosts`.
+
+- [ ] **Step 1: Extend the static generator test to require Kyushu support**
+
+Replace the Aomi-only build check in `systems/common/fedora-work/test-gen-configs.sh` with artifact-content checks for both clients:
+
+```bash
+for host in aomi kyushu; do
+ out=$(nix build --no-link --print-out-paths ".#fedoraConfigs.$host")
+ test -f "$out/etc/nix/machines"
+ test -f "$out/etc/ssh/ssh_known_hosts"
+done
+```
+
+Keep the existing static checks and change the comment to say that Aomi and Kyushu delegate native ARM builds to Nagoya.
+
+- [ ] **Step 2: Run the test and verify it fails for Kyushu before implementation**
+
+Run:
+
+```bash
+bash systems/common/fedora-work/test-gen-configs.sh
+```
+
+Expected: failure at `test -f "$out/etc/nix/machines"` for Kyushu, because its generated artifact does not yet include builder files.
+
+- [ ] **Step 3: Replace the Aomi-only condition with the two-host builder-client condition**
+
+In `gen-configs.nix`, define:
+
+```nix
+isNagoyaBuilderClient = builtins.elem hostname [ "aomi" "kyushu" ];
+```
+
+Use it for all conditional builder behavior: adding `builders-use-substitutes`, installing `/etc/nix/machines`, installing `/etc/ssh/ssh_known_hosts`, and copying those files into the generated output. Do not change the Nix machine endpoint, architecture, key path, speed factor, or parallelism:
+
+```text
+ssh-ng://vincent@nagoya.vpn aarch64-linux /etc/nix/keys/nagoya-builder 4 1
+```
+
+- [ ] **Step 4: Run generator verification**
+
+Run:
+
+```bash
+bash systems/common/fedora-work/test-gen-configs.sh
+nix build .#fedoraConfigs.kyushu --dry-run
+```
+
+Expected: both Fedora config artifacts evaluate/build dry-run successfully, and the static test passes.
+
+### Task 2: Generalize Nagoya builder-key authorization and register Kyushu's public identity
+
+**Files:**
+- Move: `imperative/nagoya/authorize-aomi-builder.sh` to `imperative/nagoya/authorize-builder.sh`
+- Modify: `imperative/nagoya/test-builder-key.sh:5-11`
+- Modify: `globals.nix` SSH keys set adjacent to `aomi-nagoya-builder`
+- Modify: `imperative/nagoya/README.md` authorization documentation, if it names Aomi as the only client
+
+**Interfaces:**
+- Consumes: `KEY_FILE` (default `/etc/nix/keys/nagoya-builder.pub`), `NAGOYA_HOST` (default `nagoya.vpn`), and `SSH_KEY` (default `$HOME/.ssh/id_homelab_sk`).
+- Produces: an idempotent constrained `authorized_keys` entry on `vincent@nagoya`.
+
+- [ ] **Step 1: Change the authorization test to require a generic helper**
+
+In `test-builder-key.sh`, set:
+
+```bash
+helper="$repo_root/imperative/nagoya/authorize-builder.sh"
+```
+
+Require the forced command and require both registered key identifiers:
+
+```bash
+grep -q 'aomi-nagoya-builder' "$repo_root/globals.nix"
+grep -q 'kyushu-nagoya-builder' "$repo_root/globals.nix"
+```
+
+- [ ] **Step 2: Run the test and verify it fails before implementation**
+
+Run:
+
+```bash
+bash imperative/nagoya/test-builder-key.sh
+```
+
+Expected: failure because the generic helper and the Kyushu registry entry do not yet exist.
+
+- [ ] **Step 3: Rename and generalize the authorizer without changing its security behavior**
+
+Move the helper to `authorize-builder.sh`; change its comment to describe a supplied dedicated Nix builder public key rather than Aomi. Keep the existing defaults, validation, `IdentitiesOnly=yes`, and idempotent remote append. The exact restricted entry must stay:
+
+```bash
+authorized_key="restrict,command=\"/nix/var/nix/profiles/default/bin/nix-daemon --stdio\" $public_key"
+```
+
+- [ ] **Step 4: Generate Kyushu's dedicated keypair and register only its public half**
+
+Create the key outside the repository, with an identifying comment:
+
+```bash
+ssh-keygen -t ed25519 -f /tmp/kyushu-nagoya-builder -C kyushu-nagoya-builder
+```
+
+Add the resulting public-key text to `globals.nix` under:
+
+```nix
+kyushu-nagoya-builder = {
+ key = "ssh-ed25519 … kyushu-nagoya-builder";
+ access.vincent.nagoya = "trusted";
+};
+```
+
+Do not add `/tmp/kyushu-nagoya-builder` or its private content anywhere in the repository.
+
+- [ ] **Step 5: Run local authorization and Nix evaluation checks**
+
+Run:
+
+```bash
+bash imperative/nagoya/test-builder-key.sh
+nix eval --raw '.#fedoraConfigs.kyushu.drvPath' >/dev/null
+```
+
+Expected: the script passes and the Kyushu Fedora artifact evaluates.
+
+### Task 3: Review changes, remove the temporary design spec, and prepare deployment evidence
+
+**Files:**
+- Delete: `docs/superpowers/specs/2026-09-11-kyushu-nagoya-builder-design.md`
+- Retain: `docs/superpowers/plans/2026-09-11-kyushu-nagoya-builder.md`
+
+**Interfaces:**
+- Consumes: completed Tasks 1 and 2.
+- Produces: a reviewed diff and local validation evidence for a user-approved live deployment.
+
+- [ ] **Step 1: Remove the temporary approved design spec**
+
+Run:
+
+```bash
+rm docs/superpowers/specs/2026-09-11-kyushu-nagoya-builder-design.md
+```
+
+- [ ] **Step 2: Run all repository-level checks**
+
+Run:
+
+```bash
+bash systems/common/fedora-work/test-gen-configs.sh
+bash imperative/nagoya/test-builder-key.sh
+nix build .#fedoraConfigs.kyushu --dry-run
+```
+
+Expected: all commands exit zero.
+
+- [ ] **Step 3: Inspect and present the exact change set**
+
+Run:
+
+```bash
+git diff --check
+git diff -- systems/common/fedora-work/gen-configs.nix systems/common/fedora-work/test-gen-configs.sh imperative/nagoya/authorize-builder.sh imperative/nagoya/test-builder-key.sh imperative/nagoya/README.md globals.nix docs/superpowers/specs/2026-09-11-kyushu-nagoya-builder-design.md
+git status --short
+```
+
+Expected: no whitespace errors; no private key files tracked or untracked in the repository.
+
+- [ ] **Step 4: Obtain explicit permission for live deployment**
+
+Show the user the diff and successful local check results. Ask permission to deploy the generated Kyushu artifact, install its root-only key, authorize the key on Nagoya, and run remote-build verification.
+
+### Task 4: Deploy and verify Kyushu's remote builder
+
+**Files:**
+- No repository files changed.
+- Create temporarily: `/tmp/kyushu-nagoya-builder` and `/tmp/kyushu-nagoya-builder.pub`, then delete both.
+- Install on Kyushu: `/etc/nix/keys/nagoya-builder` and `/etc/nix/keys/nagoya-builder.pub`.
+
+**Interfaces:**
+- Consumes: the generated `fedoraConfigs.kyushu` artifact and temporary keypair from Task 2.
+- Produces: Kyushu's root Nix daemon can connect to Nagoya and dispatch native ARM builds.
+
+- [ ] **Step 1: Activate the generated Kyushu system artifact**
+
+On Kyushu, run the Fedora system configuration workflow:
+
+```bash
+nix build .#fedoraConfigs.kyushu && sudo ./result/deploy
+```
+
+Expected: `/etc/nix/machines` and `/etc/ssh/ssh_known_hosts` are present, and `/etc/nix/nix.custom.conf` enables builder substitutes.
+
+- [ ] **Step 2: Install the distinct Kyushu key with restrictive permissions**
+
+On Kyushu, run:
+
+```bash
+sudo install -d -o root -g root -m 0700 /etc/nix/keys
+sudo install -o root -g root -m 0600 /tmp/kyushu-nagoya-builder /etc/nix/keys/nagoya-builder
+sudo install -o root -g root -m 0644 /tmp/kyushu-nagoya-builder.pub /etc/nix/keys/nagoya-builder.pub
+```
+
+Expected: only root can read the private key.
+
+- [ ] **Step 3: Authorize Kyushu's public key on Nagoya**
+
+On Kyushu, run:
+
+```bash
+bash imperative/nagoya/authorize-builder.sh
+```
+
+Expected: the restricted key is added once to `vincent@nagoya`'s `authorized_keys`; rerunning the command does not duplicate it.
+
+- [ ] **Step 4: Delete temporary secret files**
+
+Run:
+
+```bash
+rm -f /tmp/kyushu-nagoya-builder /tmp/kyushu-nagoya-builder.pub
+```
+
+Expected: the temporary keypair no longer exists.
+
+- [ ] **Step 5: Verify protocol access and reject interactive access**
+
+From Kyushu, test the restricted key without SSH connection sharing:
+
+```bash
+ssh -o ControlMaster=no -o ControlPath=none -i /etc/nix/keys/nagoya-builder -o IdentitiesOnly=yes vincent@nagoya.vpn true
+```
+
+Expected: the command is rejected because the key may only run the forced Nix-daemon command.
+
+- [ ] **Step 6: Force an uncached ARM remote build**
+
+From Kyushu, build a unique disposable ARM derivation with no local build slots:
+
+```bash
+nix build --option max-jobs 0 --expr 'with import <nixpkgs> { system = "aarch64-linux"; }; runCommand "kyushu-nagoya-builder-key-test" {} "echo aarch64 > $out"'
+```
+
+Expected: Nix reports `building ... on 'ssh-ng://vincent@nagoya.vpn'` and copies the result back; the output contains `aarch64`.
docs/superpowers/plans/2026-11-04-saint-germain-ccr-staged-router.md
@@ -0,0 +1,262 @@
+# Saint-Germain CCR Staged Router Implementation Plan
+
+> **For agentic workers:** Execute each task only after the preceding verification succeeds. The existing Freebox → hAP temporary network remains untouched until the final cutover.
+
+**Goal:** Build and test the CCR2004 LAN, VLAN, DHCP, firewall, and temporary Freebox WAN while retaining serial and `ether15` recovery access.
+
+**Architecture:** The CCR uses `ether1` as a disposable WAN that DHCPs from the Freebox while it remains a router. `sfp-sfpplus1` is reserved for the eventual bridge-mode Freebox WAN; `sfp-sfpplus2` is the VLAN trunk to CSS610. A VLAN-aware `br-lan` provides Savoie (10), Bauges (20), Aravis (30), and Haute-Savoie (40); `ether15` remains completely outside it at `192.168.88.1/24`. The CCR DNS resolver is a bootstrap service only; Athena and Demeter BIND become the authoritative and client-facing DNS pair after their Savoie migration.
+
+**Tech Stack:** MikroTik CCR2004-16G-2S+PC, RouterOS 7.15.2, CSS610-8G-2S+IN, hAP ax², Freebox Ultra.
+
+## Global Constraints
+
+- Configure only through the existing serial console until the test LAN proves reachable.
+- Do not connect the CCR to the active hAP temporary path or put the Freebox into bridge mode during this plan.
+- Do not put `ether15` in a bridge or remove `192.168.88.1/24`.
+- Never put credentials in the terminal transcript, plan, export, or chat.
+- Do not enable VLAN filtering until the bridge VLAN table has been fully installed and inspected.
+- Record the baseline and final CCR configuration with `/export hide-sensitive file=before-staging` and `/export hide-sensitive file=post-staging`.
+- During this staged-router plan, DHCP advertises the CCR bootstrap resolver at `192.168.10.1`; do not add router-local static records for the `home`, VPN, or internal `sbr.pm` zones.
+- A later Athena/Demeter migration changes DHCP to advertise those two BIND servers, updates the Nix-managed forward and reverse zones, and configures the CCR to use them for its own lookups.
+- CSS610 copper-port assignments: port 1 is living-room left (standby hAP port; its fixed run is presently 100 Mb/s); port 2 is living-room right (current living-room hAP); port 3 is office (office hAP); ports 4–6 serve parents' bedroom, kids' bedroom, and the future second office; ports 7–8 remain spare.
+
+---
+
+### Task 1: Preserve recovery and record baseline
+
+**Device:** CCR2004 serial console
+
+- [x] **Step 1: Confirm the current recovery address is isolated.**
+
+Run:
+```routeros
+/ip address print
+/interface bridge print
+/interface bridge port print
+```
+
+Expected: `192.168.88.1/24` appears only on `ether15`; no bridge exists.
+
+- [x] **Step 2: Save a redacted baseline export.**
+
+Run:
+```routeros
+/export hide-sensitive file=before-staging
+/file print where name~"before-staging"
+```
+
+Expected: the exported configuration file is listed and contains no credentials.
+
+```routeros
+[admin@MikroTik] > /file print where name~"before-staging"
+ # NAME TYPE SIZE CREATION-TIME
+ 0 before-staging.rsc script 358 1970-01-02 00:27:30
+```
+
+- [x] **Step 3: Confirm the serial recovery path.**
+
+Run:
+```routeros
+/system resource print
+```
+
+Expected: RouterOS returns the CCR2004 resource summary through serial.
+
+### Task 2: Create production interfaces without connecting production traffic
+
+**Device:** CCR2004 serial console
+
+**Interfaces produced:** `br-lan`, `vlan10-savoie`, `vlan20-bauges`, `vlan30-aravis`, `vlan40-haute-savoie`; `ether1` temporary WAN; `sfp-sfpplus1` final WAN reservation; `sfp-sfpplus2` CSS610 trunk reservation.
+
+- [x] **Step 1: Create the LAN bridge with VLAN filtering disabled.**
+
+Run:
+```routeros
+/interface bridge add name=br-lan protocol-mode=rstp vlan-filtering=no comment="Production LAN bridge; VLAN filtering enabled only after VLAN table verification"
+```
+
+Expected: `/interface bridge print` lists `br-lan` with `vlan-filtering=no`.
+
+- [x] **Step 2: Add only the intended production LAN ports.**
+
+Run:
+```routeros
+/interface bridge port add bridge=br-lan interface=sfp-sfpplus2 comment="CSS610 10Gb VLAN trunk"
+/interface bridge port add bridge=br-lan interface=ether2 pvid=10 comment="Savoie access/test port"
+/interface bridge port add bridge=br-lan interface=ether3 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether4 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether5 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether6 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether7 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether8 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether9 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether10 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether11 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether12 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether13 pvid=10 comment="Savoie access port"
+/interface bridge port add bridge=br-lan interface=ether14 pvid=10 comment="Savoie access port"
+```
+
+Expected: `ether1`, `ether15`, and `ether16` are absent from `/interface bridge port print`.
+
+- [x] **Step 3: Add VLAN interfaces and planned gateway addresses.**
+
+Run:
+```routeros
+/interface vlan add interface=br-lan name=vlan10-savoie vlan-id=10
+/interface vlan add interface=br-lan name=vlan20-bauges vlan-id=20
+/interface vlan add interface=br-lan name=vlan30-aravis vlan-id=30
+/interface vlan add interface=br-lan name=vlan40-haute-savoie vlan-id=40
+/ip address add address=192.168.10.1/24 interface=vlan10-savoie comment="Savoie gateway"
+/ip address add address=192.168.20.1/24 interface=vlan20-bauges comment="Bauges gateway"
+/ip address add address=192.168.30.1/24 interface=vlan30-aravis comment="Aravis gateway"
+/ip address add address=192.168.40.1/24 interface=vlan40-haute-savoie comment="Haute-Savoie gateway"
+```
+
+Expected: `/ip address print` shows all four planned gateway addresses plus unchanged `192.168.88.1/24` on `ether15`.
+
+- [x] **Step 4: Define the bridge VLAN table, then enable filtering.**
+
+Run:
+```routeros
+/interface bridge vlan add bridge=br-lan vlan-ids=10 tagged=br-lan,sfp-sfpplus2 untagged=ether2,ether3,ether4,ether5,ether6,ether7,ether8,ether9,ether10,ether11,ether12,ether13,ether14
+/interface bridge vlan add bridge=br-lan vlan-ids=20 tagged=br-lan,sfp-sfpplus2
+/interface bridge vlan add bridge=br-lan vlan-ids=30 tagged=br-lan,sfp-sfpplus2
+/interface bridge vlan add bridge=br-lan vlan-ids=40 tagged=br-lan,sfp-sfpplus2
+/interface bridge vlan print
+/interface bridge set br-lan vlan-filtering=yes
+```
+
+Expected: VLAN 10 has the listed access ports; VLANs 20, 30, and 40 are tagged only to `br-lan` and the CSS610 trunk. `ether15` remains unaffected.
+
+### Task 3: Provide DHCP, DNS, temporary WAN, NAT, and minimum firewall policy
+
+**Device:** CCR2004 serial console
+
+- [x] **Step 1: Create DHCP pools and servers.**
+
+Run:
+```routeros
+/ip pool add name=pool-savoie ranges=192.168.10.100-192.168.10.249
+/ip pool add name=pool-bauges ranges=192.168.20.100-192.168.20.249
+/ip pool add name=pool-aravis ranges=192.168.30.100-192.168.30.249
+/ip pool add name=pool-haute-savoie ranges=192.168.40.100-192.168.40.249
+/ip dhcp-server add name=dhcp-savoie interface=vlan10-savoie address-pool=pool-savoie lease-time=1d disabled=no
+/ip dhcp-server add name=dhcp-bauges interface=vlan20-bauges address-pool=pool-bauges lease-time=1d disabled=no
+/ip dhcp-server add name=dhcp-aravis interface=vlan30-aravis address-pool=pool-aravis lease-time=1d disabled=no
+/ip dhcp-server add name=dhcp-haute-savoie interface=vlan40-haute-savoie address-pool=pool-haute-savoie lease-time=1d disabled=no
+/ip dhcp-server network add address=192.168.10.0/24 gateway=192.168.10.1 dns-server=192.168.10.1
+/ip dhcp-server network add address=192.168.20.0/24 gateway=192.168.20.1 dns-server=192.168.20.1
+/ip dhcp-server network add address=192.168.30.0/24 gateway=192.168.30.1 dns-server=192.168.30.1
+/ip dhcp-server network add address=192.168.40.0/24 gateway=192.168.40.1 dns-server=192.168.40.1
+```
+
+Expected: `/ip dhcp-server print` lists four enabled servers.
+
+- [x] **Step 2: Configure bootstrap DNS and the temporary Freebox WAN.**
+
+Run:
+```routeros
+/ip dns set allow-remote-requests=yes servers=1.1.1.1,9.9.9.9
+/interface list add name=WAN
+/interface list add name=LAN
+/interface list member add list=WAN interface=ether1
+/interface list member add list=LAN interface=br-lan
+/ip dhcp-client add interface=ether1 add-default-route=yes use-peer-dns=no disabled=no comment="Temporary Freebox router-mode WAN"
+```
+
+The CCR resolver is bootstrap-only: DHCP clients initially receive `192.168.10.1` as DNS. Athena and Demeter replace it only after both BIND instances and their updated zones have been verified on Savoie.
+
+Expected after connecting `ether1` to an available Freebox LAN port: `/ip dhcp-client print detail` reports `status=bound` and a `192.168.1.x` address.
+
+- [x] **Step 3: Add NAT and explicit minimum firewall policy.**
+
+Run:
+```routeros
+/ip firewall nat add chain=srcnat out-interface-list=WAN action=masquerade comment="Temporary and final WAN NAT"
+/ip firewall filter add chain=input action=accept connection-state=established,related,untracked comment="Accept established input"
+/ip firewall filter add chain=input action=drop connection-state=invalid comment="Drop invalid input"
+/ip firewall filter add chain=input action=accept protocol=icmp comment="Allow diagnostic ICMP"
+/ip firewall filter add chain=input action=accept in-interface=vlan10-savoie comment="Allow Savoie router administration and DNS"
+/ip firewall filter add chain=input action=accept in-interface=vlan20-bauges protocol=udp dst-port=53,67,68,123 comment="Allow Bauges DHCP DNS NTP"
+/ip firewall filter add chain=input action=accept in-interface=vlan20-bauges protocol=tcp dst-port=53 comment="Allow Bauges TCP DNS"
+/ip firewall filter add chain=input action=accept in-interface=vlan30-aravis protocol=udp dst-port=53,67,68,123 comment="Allow Aravis DHCP DNS NTP"
+/ip firewall filter add chain=input action=accept in-interface=vlan30-aravis protocol=tcp dst-port=53 comment="Allow Aravis TCP DNS"
+/ip firewall filter add chain=input action=accept in-interface=vlan40-haute-savoie protocol=udp dst-port=53,67,68,123 comment="Allow guest DHCP DNS NTP"
+/ip firewall filter add chain=input action=accept in-interface=vlan40-haute-savoie protocol=tcp dst-port=53 comment="Allow guest TCP DNS"
+/ip firewall filter add chain=input action=drop comment="Drop all other router input"
+/ip firewall filter add chain=forward action=accept connection-state=established,related,untracked comment="Accept established forwarding"
+/ip firewall filter add chain=forward action=drop connection-state=invalid comment="Drop invalid forwarding"
+/ip firewall filter add chain=forward action=accept in-interface=vlan10-savoie out-interface-list=WAN comment="Allow Savoie internet"
+/ip firewall filter add chain=forward action=accept in-interface=vlan10-savoie out-interface=vlan20-bauges comment="Allow Savoie to Bauges"
+/ip firewall filter add chain=forward action=accept in-interface=vlan10-savoie out-interface=vlan30-aravis comment="Allow Savoie to Aravis"
+/ip firewall filter add chain=forward action=accept in-interface=vlan10-savoie out-interface=vlan40-haute-savoie comment="Allow Savoie to Haute-Savoie"
+/ip firewall filter add chain=forward action=accept in-interface=vlan40-haute-savoie out-interface-list=WAN comment="Allow Haute-Savoie internet only"
+/ip firewall filter add chain=forward action=drop comment="Drop inter-VLAN traffic not explicitly permitted"
+```
+
+Expected: a Savoie client can resolve DNS and reach the internet after the temporary WAN is connected; a Haute-Savoie client cannot reach `192.168.10.0/24`.
+
+### Task 4: Verify with one direct Savoie client before configuring the switch or APs
+
+**Device:** one laptop on CCR `ether2`; Freebox remains in router mode
+
+- [x] **Step 1: Connect the Freebox and test client.**
+
+Connect a spare Freebox LAN port to CCR `ether1`. Connect a laptop directly to CCR `ether2`; set it to DHCP.
+
+Expected: laptop receives `192.168.10.100-249/24`, gateway and DNS `192.168.10.1`; CCR DHCP client is bound on `ether1`.
+
+- [x] **Step 2: Test address, DNS, router access, and internet separately.**
+
+On the client:
+```bash
+ip route
+ping -c 3 192.168.10.1
+getent ahosts example.com
+ping -c 3 1.1.1.1
+```
+
+Expected: default route via `192.168.10.1`; router ping succeeds; DNS returns an address; internet ICMP succeeds.
+
+- [x] **Step 3: Confirm the temporary network remains untouched.**
+
+From a client still attached to the existing hAP, confirm it still has a `192.168.1.x` lease and reaches the internet. This test must pass before continuing.
+
+### Task 5: Stage CSS610/hAPs and prepare the final bridge-mode cutover
+
+**Devices:** CSS610, both hAP ax², CCR
+
+- [ ] **Step 1: Configure CSS610 uplink and room ports.**
+
+Connect CCR `sfp-sfpplus2` to CSS610 `sfp-sfpplus1`. Carry VLANs 10, 20, 30, and 40 tagged on that uplink. Configure CSS610 ports 1, 2, and 3 as hAP-capable hybrid ports: VLAN 10 untagged and VLAN 40 tagged; do not carry VLANs 20 or 30 to them initially. Port 2 serves the current living-room hAP and port 3 serves the office hAP. Port 1 remains hAP-capable so the living-room hAP can move there after its fixed run is repaired and proves 1000BASE-T. Configure ports 4–6 as untagged VLAN 10 access ports; leave ports 7–8 spare.
+
+Acceptance: a direct test client on CSS610 port 4, 5, or 6 receives a Savoie DHCP lease and internet access; the living-room hAP receives untagged VLAN 10 and tagged VLAN 40 on port 2.
+
+- [ ] **Step 2: Configure each hAP manually as an AP/switch, never as a router.**
+
+Disable its DHCP server, NAT, and WAN role. Map `Savoie` Wi-Fi to VLAN 10 and `Haute-Savoie` Wi-Fi to VLAN 40; use identical SSID/security material on both units. Keep `Bauges` and `Aravis` unbroadcast initially.
+
+Acceptance: a Savoie Wi-Fi client gets `192.168.10.0/24`; a Haute-Savoie client gets `192.168.40.0/24`, reaches the internet, and cannot reach `192.168.10.0/24`.
+
+- [ ] **Step 3: Create and test final-WAN migration commands without executing them.**
+
+The final cutover changes only WAN attachment:
+```routeros
+/ip dhcp-client disable [find interface=ether1]
+/interface list member remove [find list=WAN interface=ether1]
+/interface list member add list=WAN interface=sfp-sfpplus1
+/ip dhcp-client add interface=sfp-sfpplus1 add-default-route=yes use-peer-dns=no comment="Freebox bridge-mode WAN"
+```
+
+Acceptance: commands are present in a local cutover checklist; they are not executed until Freebox bridge mode is deliberately enabled on-site.
+
+- [ ] **Step 4: Save post-staging recovery artifact.**
+
+After all staging tests pass, run:
+```routeros
+/export hide-sensitive file=post-staging
+/file print where name~"staging"
+```
+
+Expected: baseline and post-staging exports exist. Download them to an encrypted local location before any final cutover.
docs/superpowers/plans/2026-11-05-bauges-roborock-onboarding.md
@@ -0,0 +1,334 @@
+# Bauges Roborock S6 Pure onboarding implementation plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** Add the Bauges IoT Wi-Fi and temporary WAN access for a Roborock S6 Pure, without introducing Aravis or weakening inter-VLAN isolation.
+
+**Architecture:** The CCR supplies VLAN 20, DHCP, DNS/NTP, NAT, and its temporary egress rule. The CSS610 extends VLAN 20 as a tagged VLAN to both hAP ax² uplinks, and each hAP publishes the 2.4 GHz WPA2 Bauges SSID. After joining the vacuum, its observed MAC address receives a fixed DHCP lease; a later Home Assistant validation replaces VLAN-wide egress with a device-specific rule.
+
+**Tech Stack:** MikroTik CCR2004-16G-2S+PC (RouterOS 7.15.2), CSS610-8G-2S+IN (SwOS), two MikroTik hAP ax² units, Freebox Ultra temporary WAN.
+
+## Global Constraints
+
+- Configure Savoie (10), Bauges (20), and Haute-Savoie (40) only; do not create or carry Aravis (30).
+- Bauges uses `192.168.20.0/24`, with CCR gateway/DNS `192.168.20.1` and DHCP pool `192.168.20.100-192.168.20.249`.
+- Bauges is 2.4 GHz and WPA2-Personal for S6 Pure compatibility.
+- Bauges may initiate WAN connections temporarily, but may not initiate traffic to Savoie or Haute-Savoie.
+- Preserve the existing recovery path and export a pre-change RouterOS configuration before modifying the CCR.
+- Do not commit unrelated existing untracked files.
+
+---
+
+### Task 1: Verify the live baseline and save recovery artifacts
+
+**Files:**
+- Create: encrypted local RouterOS export named `before-bauges`
+- Modify: none
+- Test: RouterOS inspection commands
+
+**Interfaces:**
+- Consumes: management access to the CCR, CSS610, and both hAP ax² units.
+- Produces: a verified baseline and recovery export before changing switching, Wi-Fi, or firewall configuration.
+
+- [ ] **Step 1: Use a persistent management path, not a client Wi-Fi path.**
+
+Connect through CCR serial console or its designated recovery access. Do not use the hAP that will be reconfigured as the sole management connection.
+
+- [x] **Step 2: Export the CCR configuration before making changes.**
+
+Run on the CCR:
+
+```routeros
+/export hide-sensitive file=before-bauges
+/file print where name~"before-bauges"
+/interface bridge vlan print detail
+/interface vlan print detail
+/ip dhcp-server print detail
+/ip firewall filter print detail
+```
+
+Expected: the export exists and the output identifies the actual bridge, VLAN interfaces, DHCP server, and firewall rule order.
+
+- [x] **Step 3: Confirm the intended existing VLANs and absence of Aravis.**
+
+Run on the CCR:
+
+```routeros
+/interface vlan print where name~"vlan(10|20|30|40)"
+/ip dhcp-server print where name~"dhcp-(savoie|bauges|aravis|haute-savoie)"
+```
+
+Expected: VLAN 10 and VLAN 40 are present if already deployed; VLAN 20 may be present from prior staging. Do not create, alter, or remove any Aravis objects during this task: Aravis is out of scope and may be retained harmlessly if prior staging already created it. Do not alter Savoie or Haute-Savoie.
+
+- [ ] **Step 4: Verify CSS610 and hAP management reachability.**
+
+From the management workstation, record the management IP and software version of the CSS610 and both hAP ax² units. Confirm that each device can be administered independently before modifying VLAN membership.
+
+Expected: all three devices are reachable through a non-changing management path.
+
+### Task 2: Configure or validate the Bauges VLAN and temporary egress on the CCR
+
+**Files:**
+- Create: none
+- Modify: live CCR VLAN, DHCP, and firewall configuration
+- Test: CCR RouterOS inspection commands and a Bauges client
+
+**Interfaces:**
+- Consumes: `br-lan` bridge, `sfp-sfpplus2` CSS610 trunk, `WAN` interface list, and RouterOS DNS resolver.
+- Produces: `vlan20-bauges`, `192.168.20.1/24`, `dhcp-bauges`, and a temporary Bauges-to-WAN forwarding rule.
+
+- [x] **Step 1: Add only missing Bauges L3 and DHCP objects.**
+
+On the CCR, inspect first:
+
+```routeros
+/interface vlan print where name="vlan20-bauges"
+/ip address print where address="192.168.20.1/24"
+/ip pool print where name="pool-bauges"
+/ip dhcp-server print where name="dhcp-bauges"
+/ip dhcp-server network print where address="192.168.20.0/24"
+```
+
+For each missing object only, add the corresponding command:
+
+```routeros
+/interface vlan add interface=br-lan name=vlan20-bauges vlan-id=20
+/ip address add address=192.168.20.1/24 interface=vlan20-bauges comment="Bauges IoT gateway"
+/ip pool add name=pool-bauges ranges=192.168.20.100-192.168.20.249
+/ip dhcp-server add name=dhcp-bauges interface=vlan20-bauges address-pool=pool-bauges lease-time=1d disabled=no
+/ip dhcp-server network add address=192.168.20.0/24 gateway=192.168.20.1 dns-server=192.168.20.1 comment="Bauges IoT DHCP"
+```
+
+Expected: exactly one enabled Bauges DHCP server serves the VLAN 20 subnet.
+
+- [x] **Step 2: Carry VLAN 20 between the CCR CPU/bridge and CSS610 trunk.**
+
+Inspect first:
+
+```routeros
+/interface bridge vlan print detail where bridge="br-lan"
+```
+
+If no VLAN 20 row exists, add it; if it exists, ensure it contains only the bridge CPU and CSS610 trunk at this stage:
+
+```routeros
+/interface bridge vlan add bridge=br-lan vlan-ids=20 tagged=br-lan,sfp-sfpplus2 comment="Bauges IoT tagged to CSS610"
+```
+
+Expected: VLAN 20 is tagged on `br-lan` and `sfp-sfpplus2`; it is not untagged on any CCR copper port.
+
+- [x] **Step 3: Add the minimal router-input allowance for Bauges DHCP, DNS, and NTP.**
+
+Before the terminal input-drop rule, add only rules that are absent:
+
+```routeros
+/ip firewall filter add chain=input action=accept in-interface=vlan20-bauges protocol=udp dst-port=53,67,68,123 place-before=[find chain=input action=drop comment="Drop all other router input"] comment="Allow Bauges DHCP DNS NTP"
+/ip firewall filter add chain=input action=accept in-interface=vlan20-bauges protocol=tcp dst-port=53 place-before=[find chain=input action=drop comment="Drop all other router input"] comment="Allow Bauges TCP DNS"
+```
+
+Expected: Bauges can use DHCP, the CCR resolver, and NTP but cannot administer the CCR.
+
+- [x] **Step 4: Add one temporary Bauges egress rule ahead of the terminal forward drop.**
+
+Run on the CCR:
+
+```routeros
+/ip firewall filter add chain=forward action=accept in-interface=vlan20-bauges out-interface-list=WAN place-before=[find chain=forward action=drop comment="Drop inter-VLAN traffic not explicitly permitted"] comment="TEMP 2026-11-05: Bauges WAN for Roborock S6 Pure onboarding; replace with reserved-IP policy after Home Assistant validation"
+```
+
+Expected: only traffic originating in VLAN 20 and leaving an interface in `WAN` bypasses the final forward drop. No rule permits Bauges to Savoie or Haute-Savoie.
+
+- [x] **Step 5: Inspect effective firewall ordering.**
+
+Run:
+
+```routeros
+/ip firewall filter print detail where chain=forward
+/ip firewall filter print detail where chain=input
+```
+
+Expected: established/related forwarding remains first, the temporary Bauges-to-WAN rule appears before the terminal forward drop, and no Bauges-to-LAN allow rule exists.
+
+### Task 3: Extend Bauges to both access-point uplinks and publish its Wi-Fi
+
+**Files:**
+- Create: none
+- Modify: CSS610 VLAN configuration and both hAP ax² bridge/Wi-Fi configurations
+- Test: DHCP and association from a 2.4 GHz Bauges client
+
+**Interfaces:**
+- Consumes: VLAN 20 tagged on CCR `sfp-sfpplus2` and CSS610 `sfp-sfpplus1`.
+- Produces: VLAN 20 tagged to CSS610 ports 2 and 3, and a `Bauges` WLAN mapped to VLAN 20 on each hAP.
+
+- [x] **Step 1: Configure CSS610 tagged VLAN 20 delivery to the hAP room ports.**
+
+In SwOS, preserve the current native VLAN 10 and tagged VLAN 40 configuration. Set VLAN 20 as tagged on:
+
+```text
+CSS610 `sfp-sfpplus1`: SFP+ uplink from CCR
+CSS610 copper port 2: living-room hAP room run (current patch-panel port 2)
+CSS610 copper port 3: office hAP room run (current patch-panel port 3)
+```
+
+Do not set VLAN 20 untagged on these ports. Do not add VLAN 20 to CSS610 copper ports 4–8 (the ordinary room access/spare ports). Confirm that each relevant port has admit-only-VLAN-tagged-or-untagged behavior appropriate to its existing hybrid profile and that native VLAN 10 remains unchanged.
+
+Expected: VLAN 10 remains native to each hAP; VLANs 20 and 40 traverse those ports as tags.
+
+- [x] **Step 2: Configure Bauges on the living-room hAP ax².**
+
+Using the hAP's existing bridge and wireless configuration, create a virtual/secondary 2.4 GHz WLAN with these settings:
+
+```text
+SSID: Bauges
+Security: WPA2-Personal using the chosen IoT passphrase
+Band: 2.4 GHz only
+VLAN mode: use-tag
+VLAN ID: 20
+Bridge: the hAP LAN bridge, not its WAN/NAT interface
+Client isolation: disabled for initial onboarding; reconsider after Roborock and Home Assistant control have been tested
+```
+
+**RouterOS terminal procedure (the hAP ax² RouterOS 7 `wifi-qcom` package):** inspect the live names before making changes. These commands must show `/interface wifi`; if the command is unknown, stop and use the UI procedure rather than applying these commands to a legacy `wireless` configuration.
+
+```routeros
+/interface wifi print detail
+/interface bridge print detail
+/interface wifi security print detail
+/interface wifi datapath print detail
+/interface wifi configuration print detail
+```
+
+Identify the existing **2.4 GHz** physical radio (normally `wifi1`) and the existing LAN bridge (normally `bridge`). The virtual Wi-Fi interface inherits its radio band from `master-interface`, so select the radio whose `channel.frequency` is 2.4 GHz. Replace `WIFI_2G`, `LAN_BRIDGE`, and `CHOOSE_A_LONG_UNIQUE_PASSPHRASE` below with the values observed above; leave the other names unchanged.
+
+```routeros
+/interface wifi security add name=bauges-wpa2 authentication-types=wpa2-psk passphrase="CHOOSE_A_LONG_UNIQUE_PASSPHRASE"
+/interface wifi datapath add name=bauges-vlan20 bridge=LAN_BRIDGE vlan-id=20 client-isolation=no
+/interface wifi configuration add name=bauges-2g ssid="Bauges" security=bauges-wpa2 datapath=bauges-vlan20
+/interface wifi add name=wifi-bauges master-interface=WIFI_2G configuration=bauges-2g disabled=no
+```
+
+Then confirm the virtual interface is running and has the intended parent/configuration:
+
+```routeros
+/interface wifi print detail where name="wifi-bauges"
+/interface wifi registration-table print detail
+```
+
+Do not create a DHCP server, NAT rule, or default route on the hAP. Client isolation is deliberately disabled for initial onboarding because the phone and Roborock may need direct local communication; the VLAN firewall still blocks all other LANs. Reconsider `client-isolation=yes` only after Roborock and Home Assistant control have been tested. Ensure the primary/management network remains native VLAN 10 and the existing Haute-Savoie SSID remains VLAN 40 tagged. If `wifi-bauges` already exists, inspect it with the first command and use `/interface wifi set` to correct its configuration instead of creating a duplicate.
+
+Expected: an associated Bauges client presents VLAN 20 upstream and receives DHCP from the CCR, not the hAP.
+
+- [ ] **Step 3: Configure identical Bauges settings on the office hAP ax².**
+
+Repeat the living-room configuration exactly on the office hAP: same `Bauges` SSID, WPA2-Personal credentials, 2.4 GHz radio, tagged VLAN ID 20, and client isolation setting. Do not add local DHCP or NAT.
+
+Expected: a client can roam or associate with either AP and keeps the VLAN 20 network identity.
+
+- [ ] **Step 4: Verify Bauges association and network isolation before onboarding the vacuum.**
+
+Connect a 2.4 GHz test device to `Bauges`. On the test device run:
+
+```bash
+ip route
+ping -c 3 192.168.20.1
+getent ahosts example.com
+ping -c 3 1.1.1.1
+ping -c 3 192.168.10.1
+ping -c 3 192.168.40.1
+```
+
+Expected: it receives `192.168.20.100-249/24`, reaches its gateway, resolves DNS, and reaches the internet. The last two pings must fail; a response demonstrates an unintended inter-VLAN path and must be fixed before onboarding the vacuum.
+
+### Task 4: Onboard the Roborock and reserve its DHCP lease
+
+**Files:**
+- Create: none
+- Modify: live CCR DHCP static lease
+- Test: lease inspection and Roborock application onboarding
+
+**Interfaces:**
+- Consumes: the active `Bauges` SSID and `dhcp-bauges` lease table.
+- Produces: a stable `192.168.20.x` reservation associated with the S6 Pure's observed MAC address.
+
+- [ ] **Step 1: Join the S6 Pure to Bauges using the Roborock application.**
+
+Use the phone application while the phone is associated with `Bauges` during the Wi-Fi provisioning process. Select the 2.4 GHz WPA2 `Bauges` SSID. Do not expose the Savoie credentials to the appliance.
+
+Expected: the app confirms that the S6 Pure is online.
+
+- [ ] **Step 2: Find the S6 Pure DHCP lease.**
+
+On the CCR, run:
+
+```routeros
+/ip dhcp-server lease print detail where server="dhcp-bauges"
+```
+
+Identify the lease whose MAC address and hostname correspond to the newly joined Roborock. Confirm its address is within `192.168.20.100-249` and it is bound.
+
+- [ ] **Step 3: Convert the observed lease to a static reservation.**
+
+On the matching lease, run:
+
+```routeros
+/ip dhcp-server lease make-static [find server="dhcp-bauges" mac-address="AA:BB:CC:DD:EE:FF"]
+/ip dhcp-server lease set [find server="dhcp-bauges" mac-address="AA:BB:CC:DD:EE:FF"] address=192.168.20.20 comment="Roborock S6 Pure; temporary Bauges WAN access pending Home Assistant validation"
+```
+
+Replace `AA:BB:CC:DD:EE:FF` with the MAC printed in Step 2. If `192.168.20.20` is already allocated, choose the first unused address in `192.168.20.20-99`; do not reserve an address in the dynamic pool.
+
+Expected: `192.168.20.20` (or the documented alternative) is a static Bauges lease for the Roborock.
+
+- [ ] **Step 4: Verify application reachability and firewall counters.**
+
+On the CCR, run:
+
+```routeros
+/ip dhcp-server lease print detail where comment~"Roborock S6 Pure"
+/ip firewall filter print stats where comment~"Roborock S6 Pure onboarding"
+/ip firewall filter print stats where comment~"TEMP 2026-11-05"
+```
+
+Expected: the lease is bound and the temporary WAN rule counter increases when the vacuum communicates. The app can show the device online and issue a harmless status query.
+
+### Task 5: Save the final recovery artifact and record deferred work
+
+**Files:**
+- Create: encrypted local RouterOS export named `after-bauges`
+- Modify: [docs/superpowers/specs/2026-11-05-bauges-roborock-onboarding-design.md](../specs/2026-11-05-bauges-roborock-onboarding-design.md)
+- Test: RouterOS exports and final configuration inspection
+
+**Interfaces:**
+- Consumes: working Bauges Wi-Fi, DHCP reservation, and temporary firewall rule.
+- Produces: a recoverable final-state export and documented next action.
+
+- [ ] **Step 1: Export final CCR state.**
+
+Run on the CCR:
+
+```routeros
+/export hide-sensitive file=after-bauges
+/file print where name~"(before|after)-bauges"
+```
+
+Download both exports to an encrypted local location reachable during recovery.
+
+Expected: both named configuration exports exist and can be retrieved.
+
+- [ ] **Step 2: Re-inspect the approved boundaries.**
+
+Run:
+
+```routeros
+/interface vlan print where name~"vlan(10|20|30|40)"
+/ip dhcp-server print detail
+/ip firewall filter print detail where comment~"Bauges|Roborock|Aravis|TEMP"
+```
+
+Expected: Bauges is present and documented; no Aravis configuration was created or modified by this work; only the dated temporary Bauges WAN rule permits Bauges egress.
+
+- [ ] **Step 3: Document the later narrowing trigger.**
+
+Append the actual Roborock reserved IP and MAC to the design document, together with the decision that the temporary rule must be replaced only after the selected Home Assistant Roborock integration has been tested from Savoie/HA to the reserved Bauges address.
+
+Expected: the future restriction task has the exact device identity required to write a narrow firewall rule.
docs/superpowers/specs/2026-11-05-bauges-roborock-onboarding-design.md
@@ -0,0 +1,44 @@
+# Bauges Wi-Fi and Roborock S6 Pure onboarding design
+
+**Project:** `home`
+**Date:** 2026-11-05
+**Status:** Approved design; implementation pending
+
+## Purpose
+
+Make the Roborock S6 Pure join a dedicated IoT network without granting it access to trusted or guest devices. Its address must remain stable so its temporary broad internet access can later be replaced with a device-specific rule after the Home Assistant control path is validated.
+
+## Scope
+
+Configure only the networks needed now:
+
+- **Savoie (VLAN 10):** existing trusted network; unchanged.
+- **Bauges (VLAN 20):** new IoT Wi-Fi for the Roborock.
+- **Haute-Savoie (VLAN 40):** existing guest network; unchanged.
+
+**Aravis (VLAN 30) is deferred completely.** Do not create its VLAN interface, DHCP scope, firewall rules, switch trunking, or Wi-Fi configuration until alarm or camera hardware requires it.
+
+## Network design
+
+1. The CCR provides VLAN 20 with gateway `192.168.20.1/24`, DHCP, and its existing bootstrap DNS/NTP services.
+2. The CSS610 uplink and the room ports serving the living-room and office hAP ax² units carry VLAN 20 as tagged traffic, alongside their existing native VLAN 10 and tagged VLAN 40 configuration.
+3. Both hAP ax² units broadcast `Bauges`:
+ - VLAN 20
+ - 2.4 GHz
+ - WPA2-Personal
+ - no WPA3-only requirement or 5 GHz-only provisioning path
+4. The CCR firewall permits Bauges clients to initiate connections to WAN temporarily, while its default inter-VLAN denial prevents Bauges-initiated access to Savoie and Haute-Savoie.
+5. The temporary WAN rule includes a dated, explicit comment describing why it exists and that it must be narrowed after Home Assistant integration is verified.
+6. Once the S6 Pure joins, reserve its observed MAC address to a stable `192.168.20.x` DHCP lease and annotate it as the Roborock S6 Pure.
+
+## Deferred tightening
+
+The standard Roborock app needs cloud connectivity for onboarding and may need it for normal operation. Home Assistant does not yet exist in the network, so no claimed local-only or cloud endpoint allow-list is assumed. After Home Assistant is deployed and the selected integration has been validated, replace the temporary VLAN-wide WAN allowance with the narrowest rule demonstrated to work for the Roborock's reserved IP.
+
+## Acceptance criteria
+
+- A 2.4 GHz WPA2 client can join `Bauges` on either hAP and receives a `192.168.20.0/24` DHCP lease.
+- The S6 Pure can complete its initial Roborock setup and reach required internet services.
+- A Bauges client cannot initiate a connection to Savoie or Haute-Savoie.
+- The S6 Pure has a reserved DHCP lease and the temporary egress rule is visibly documented in RouterOS.
+- No Aravis configuration is introduced.