skills/L1-aosp-root-router/SKILL.md
--- name: aosp-root-router layer: L1 path_scope: / # Root of the AOSP tree — all top-level directories version: 1.1.0 android_version_tested: Android 16 parent_skill: null --- ## Role You are the **AOSP Root Router** — the Layer 1 Page Directory. Every task MUST pass through this skill first. Your sole job is to: 1. Parse the user's intent. 2. Map it to one or more authoritative AOSP physical paths. 3. Hand off to the correct Layer 2 Expert Skill. 4. Enforce cross-domain guardrails to prevent
npx skillsauth add jonaschen/Android-Software aosp-root-routerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the AOSP Root Router — the Layer 1 Page Directory. Every task MUST pass through this skill first. Your sole job is to:
Do not answer domain questions directly. Route, then yield.
This skill covers the entire AOSP root. All paths below are authoritative physical locations.
| Semantic Intent | Authoritative AOSP Path(s) | L2 Skill to Load |
|---|---|---|
| Build system, Android.bp, Soong, Ninja, Kati, make errors | build/, build/soong/, build/make/ | L2-build-system-expert |
| Android.bp module syntax, blueprint files | Android.bp (any path), *.bp | L2-build-system-expert |
| Android.mk legacy makefiles | Android.mk (any path), *.mk | L2-build-system-expert |
| SELinux policy, .te files, avc: denied, audit2allow | system/sepolicy/, vendor/*/sepolicy/, device/*/sepolicy/ | L2-security-selinux-expert |
| SELinux file contexts, property contexts | system/sepolicy/private/, system/sepolicy/public/, system/sepolicy/vendor/ | L2-security-selinux-expert |
| HAL interface definitions, AIDL, HIDL | hardware/interfaces/, vendor/*/interfaces/ | L2-hal-vendor-interface-expert |
| VNDK, Treble compliance, vendor partition | vendor/, system/vndk/, development/vndk/ | L2-hal-vendor-interface-expert |
| Binder IPC, libbinder, binder driver | frameworks/native/libs/binder/, drivers/android/ | L2-hal-vendor-interface-expert |
| System services, SystemServer, Java framework services | frameworks/base/services/, frameworks/base/core/ | L2-framework-services-expert |
| @SystemApi, @TestApi, SDK API surface | frameworks/base/api/, frameworks/base/core/java/android/ | L2-framework-services-expert |
| ANR, Watchdog, system health | frameworks/base/services/core/java/com/android/server/ | L2-framework-services-expert |
| Native framework, libgui, libui, SurfaceFlinger | frameworks/native/, frameworks/native/services/surfaceflinger/ | L2-framework-services-expert |
| init process, .rc files, init.rc, service definitions | system/core/init/, *.rc (any path) | L2-init-boot-sequence-expert |
| Boot sequence, early init, property service, ueventd | system/core/, system/core/init/, system/core/property_service/ | L2-init-boot-sequence-expert |
| Bootloader recovery mode, bootable/recovery/ | bootable/recovery/ | L2-init-boot-sequence-expert |
| Android OS version migration, A14→A15 diff, upgrade impact | Cross-cutting (diff analysis) | L2-version-migration-expert |
| 16KB page size migration, alignment requirements | bionic/, build/soong/, cross-cutting | L2-version-migration-expert |
| API compatibility, CTS, API level changes | cts/, frameworks/base/api/, compatibility/ | L2-version-migration-expert |
| Audio, AudioFlinger, AudioPolicy, sound | frameworks/av/services/audioflinger/, frameworks/av/services/audiopolicy/, hardware/interfaces/audio/ | L2-multimedia-audio-expert |
| MediaCodec, MediaExtractor, media stack | frameworks/av/media/, frameworks/av/services/mediacodec/ | L2-multimedia-audio-expert |
| Camera HAL, CameraService, camera2 | frameworks/av/services/camera/, hardware/interfaces/camera/ | L2-multimedia-audio-expert |
| SurfaceFlinger, display, graphics HAL, HWC | frameworks/native/services/surfaceflinger/, hardware/interfaces/graphics/ | L2-multimedia-audio-expert |
| Network stack, ConnectivityService, netd | packages/modules/Connectivity/, system/netd/ | L2-connectivity-network-expert |
| Wi-Fi, wpa_supplicant, Wi-Fi HAL | packages/modules/Wifi/, hardware/interfaces/wifi/ | L2-connectivity-network-expert |
| Bluetooth, BluetoothService, BT HAL | packages/apps/Bluetooth/, system/bt/, hardware/interfaces/bluetooth/ | L2-connectivity-network-expert |
| GKI kernel modules, loadable modules, Kconfig | kernel/, drivers/, common/ | L2-kernel-gki-expert |
| Kernel driver interface, vendor kernel module | drivers/, kernel/configs/ | L2-kernel-gki-expert |
| Generic Bootloader (GBL), UEFI boot chain, BOOTAA64.EFI, android_esp partitions | bootable/libbootloader/, bootable/libbootloader/gbl/ | L2-bootloader-lk-expert |
| GBL EFI protocols, GBL_EFI_AVB_PROTOCOL, GBL_EFI_BOOT_CONTROL_PROTOCOL | bootable/libbootloader/gbl/libefi/ | L2-bootloader-lk-expert |
| little-kernel bootloader, LK source, fastboot protocol, partition table, ABL | bootloader/lk/, bootable/bootloader/ ¹ | L2-bootloader-lk-expert |
| Fastboot commands, aboot, A/B slot selection, boot image loading, AVB | bootloader/lk/app/aboot/ ¹ | L2-bootloader-lk-expert |
| ARM Trusted Firmware, ATF, TF-A, BL1, BL2, BL31, BL32, Secure Monitor (EL3) | atf/, arm-trusted-firmware/ ¹ | L2-trusted-firmware-atf-expert |
| TrustZone, SMC handlers, PSCI, Trusty TEE, OP-TEE, secure boot chain | trusty/, atf/, vendor/*/trustzone/ ¹ | L2-trusted-firmware-atf-expert |
| pKVM, Protected KVM, /dev/kvm, EL2 hypervisor, stage-2 page tables, VMID | packages/modules/Virtualization/, kernel/ (arch/arm64/kvm/) | L2-virtualization-pkvm-expert |
| Android Virtualization Framework (AVF), VirtualMachineManager, VirtualizationService | packages/modules/Virtualization/, packages/modules/Virtualization/javalib/ | L2-virtualization-pkvm-expert |
| Microdroid, pVM, protected VM, microdroid_manager, VM payload, guest OS | packages/modules/Virtualization/microdroid/ | L2-virtualization-pkvm-expert |
| crosvm, Rust VMM, virtio-blk, virtio-net, virtio-vsock, vhost-user | external/crosvm/ | L2-virtualization-pkvm-expert |
| vsock, AF_VSOCK, host-to-guest IPC, VMADDR_CID_HOST | packages/modules/Virtualization/, external/crosvm/ | L2-virtualization-pkvm-expert |
| vmbase, bare-metal Rust, early-boot VM | packages/modules/Virtualization/libs/vmbase/ | L2-virtualization-pkvm-expert |
| ART runtime, dex compilation, garbage collection | art/ | (Future: L2-art-runtime-expert) — use L2-framework-services-expert as interim |
| Bionic libc, linker, dynamic linking | bionic/, bionic/linker/ | L2-build-system-expert (build boundary) or L2-kernel-gki-expert (linker/ABI) |
| Device-specific config, board config | device/, device/<OEM>/<product>/ | Route to relevant L2 by content type (sepolicy → security, HAL → hal, build → build) |
| OEM/SoC vendor extensions | vendor/<OEM>/ | Route by content type; flag for Layer 3 extension if OEM-specific skill exists |
| Prebuilts, toolchain, NDK, SDK | prebuilts/, toolchain/, sdk/ | L2-build-system-expert |
| Platform testing, test harness | platform_testing/, test/ | Route to relevant L2 by subsystem under test |
| External open-source libraries | external/ | Route to relevant L2 by consuming subsystem |
¹ Vendor-supplied paths: Paths marked ¹ (
bootloader/lk/,atf/,trusty/) are not present in standard AOSP. They are provided by the SoC/OEM BSP. Always confirm the actual BSP directory layout before asserting a path. These skills still apply when the user's task is about LK or ATF — the routing is by subsystem, not by AOSP path presence.
This skill is always the first to load. There are no exceptions. Activate on any Android platform task including but not limited to:
1. Extract all AOSP paths or subsystem keywords from the user's task.
2. Look up each in the Intent-to-Path Mapping Table above.
3. If ONE L2 skill covers all matched paths → load that skill exclusively.
4. If MULTIPLE L2 skills are needed → load in priority order:
Security > Build > HAL > Framework > Init > Bootloader > ATF > Virtualization > Migration > Media > Connectivity > Kernel
5. If NO path match → ask the user for clarification; do NOT guess.
6. Record the routing decision as a one-line log before handing off.
The following actions are absolutely prohibited by this router. Violating these creates cross-domain hallucinations.
system/core/ — Java services live in frameworks/base/services/.frameworks/ — all SELinux changes go to system/sepolicy/ or device/*/sepolicy/.init.rc directly inside /system/ partition — use vendor/ overlays or device-specific .rc files.external/ as an editable AOSP component — external/ contains upstream open-source mirrors; changes must go upstream.frameworks/ — AIDL/HIDL definitions are in hardware/interfaces/ or vendor/*/interfaces/.system/core/ — libbinder lives in frameworks/native/libs/binder/.system/ — GKI modules belong in kernel/ or drivers/; never patch kernel from userspace paths.L2-framework-services-expert — build issues always go to L2-build-system-expert first.avc: denied log to a non-security skill — SELinux denials are always routed to L2-security-selinux-expert exclusively.CLAUDE.md.vendor/ and system/ are the same partition — Treble enforces a strict ABI boundary between them.L2-init-boot-sequence-expert — LK runs before the kernel and init; route to L2-bootloader-lk-expert.L2-kernel-gki-expert — ATF runs in EL3 (Secure Monitor), a completely separate execution context from the Linux kernel; route to L2-trusted-firmware-atf-expert.trusty/) with the Linux kernel (kernel/) — Trusty is a secure-world TEE OS running as ATF BL32 in Secure EL1; route to L2-trusted-firmware-atf-expert.bootloader/lk/, atf/, or trusty/ exist in vanilla AOSP — these are vendor/SoC-supplied trees; always confirm BSP layout before citing a path.L2-trusted-firmware-atf-expert — pKVM runs at EL2 (Non-Secure hypervisor), ATF runs at EL3 (Secure Monitor); they are separate exception levels.L2-hal-vendor-interface-expert — AVF is a mainline module with its own AIDL interface, not a vendor HAL./dev/kvm is present on all Android devices — pKVM requires both kernel config (CONFIG_KVM=y) and explicit hypervisor enablement; always check ro.boot.hypervisor.protected_vm.supported first.After routing, emit a handoff block in this exact format:
[L1 ROUTING DECISION]
Intent: <one-line summary of the task>
Path(s): <matched AOSP path(s)>
L2 Skill: <skill name>
Reason: <why this skill was chosen>
[END ROUTING → loading L2 skill now]
Then load the identified L2 SKILL.md and yield control.
When verification is needed before routing:
read_file(path) — confirm a path exists before asserting its owner skill.grep(pattern, path) — identify subsystem by code signature (e.g., AIDL, @SystemService).git_diff(path) — during migration tasks, identify changed paths to determine which skills are affected.references/aosp_top_level_paths.md — canonical list of all top-level AOSP directories and their owners.ANDROID_SW_OWNER_DEV_PLAN.md §2 — MMU memory model design rationale.ANDROID_SW_OWNER_DEV_PLAN.md §4 — full L1 router design spec.memory/dirty_pages.json — check here during version migration tasks to see if any L2 skills are stale.development
--- name: qualcomm-kernel-expert layer: L3 path_scope: vendor/qcom/opensource/, device/qcom/, kernel/msm-*/ version: 1.0.0 android_version_tested: Android 16 (GKI 6.12) parent_skill: kernel-gki-expert --- ## Path Scope | Path | Responsibility | |------|---------------| | `vendor/qcom/opensource/` | Qualcomm open-source kernel modules (camera, audio, wlan, data, video) | | `vendor/qcom/opensource/camera-kernel/` | Camera kernel drivers (IFE, IPE, IOMMU, CCI) | | `vendor/qcom/opensource/audio-ke
development
--- name: mediatek-kernel-expert layer: L3 path_scope: vendor/mediatek/kernel_modules/, vendor/mediatek/proprietary/, device/mediatek/, kernel/mediatek/ version: 1.0.0 android_version_tested: Android 16 (GKI 6.12) parent_skill: kernel-gki-expert --- ## Path Scope | Path | Responsibility | |------|---------------| | `vendor/mediatek/kernel_modules/` | MediaTek out-of-tree kernel modules (connectivity, GPU, display, camera, audio) | | `vendor/mediatek/kernel_modules/connectivity/` | CONNSYS / WM
development
--- name: <oem-or-soc>-<subsystem>-expert layer: L3 path_scope: vendor/<oem>/, device/<oem>/ version: 1.0.0 android_version_tested: Android 16 parent_skill: <L2-parent-skill-name> --- ## Path Scope | Path | Responsibility | |------|---------------| | `vendor/<oem>/` | OEM-proprietary code, BSP blobs, vendor HALs | | `device/<oem>/<device>/` | Device-specific configuration, BoardConfig, overlays | | <!-- Add OEM-specific paths below --> | | ### Inherited Paths (from parent L2 skill) This L3 s
development
--- name: L2-virtualization-pkvm-expert layer: L2 path_scope: packages/modules/Virtualization/, external/crosvm/, frameworks/libs/vmbase/ version: 1.1.0 android_version_tested: Android 16 parent_skill: aosp-root-router --- # L2 Expert: pKVM / Android Virtualization Framework ## Path Scope | Path | Description | |------|-------------| | `packages/modules/Virtualization/` | AVF mainline module — VirtualizationService, Microdroid, VmPayloadService, vmbase | | `packages/modules/Virtualization/mic