Project Structure
This map describes ownership boundaries, not line counts.
text
N.E.K.O/
├── app/
│ ├── main_server/ # Main Web/API entrypoint
│ ├── memory_server/ # Memory API/runtime
│ └── agent_server/ # Agent API; hosts NekoPower
├── launcher.py # Thin public launcher entrypoint
├── launcher_core/ # Bootstrap, ports, process lifecycle
├── config/ # Defaults, prompts, provider/network data
├── main_logic/ # Conversation, clients, TTS, buses
├── main_routers/ # Main FastAPI route packages/modules
├── memory/ # Facts, recall, persona, reflection, event/outbox
├── nekopower/
│ ├── host/ # Task brain, ledger, capability gateway, permissions
│ ├── runtime/ # Agent runtime in which task agents run
│ └── builtin/ # Keyboard-and-mouse and browser tools
├── plugin/ # SDK, host/server, built-ins, tooling
├── services/ # Domain services: chat sync, theater runtime, public knowledge (services/knowledge, Memory Server)
├── utils/
│ └── config_manager/ # Writable config/storage package
├── frontend/
│ ├── react-neko-chat/ # Shared React chat implementation
│ └── plugin-manager/ # Vue plugin-manager UI
├── static/ # Runtime assets and eight JSON locales
├── templates/ # Main/chat/subtitle/settings/feature pages
├── docker/ # Dockerfiles, Compose, entrypoint
├── scripts/ # CI, validation, packaging, assets
├── tests/ # Unit/integration/frontend/e2e/contracts
├── docs/ # VitePress site
├── pyproject.toml # Python metadata/dependency groups
└── uv.lock # Reproducible dependency lockImportant boundaries
launcher.pydelegates tolauncher_core/.utils/config_manager/owns writable config/storage;config/owns bundled defaults.frontend/react-neko-chat/is the only real chat UI.index.htmlandchat.htmlmount it; legacy#chat-containeris deprecated.main_logic/core/is a package/facade protected by structural CI checks.main_logic/voice_turn/owns provider-neutral voice contracts; local Silero/Smart Turn code and model assets live undermain_logic/asr_client/endpointing/.services/is an L2 package next tomain_logic/andmemory/:main_logic/,main_routers/andapp/may import it, but it never importsmain_logic/,main_routers/or anything above L2. What it needs from those layers (saved community session, live session manager, character rename) is registered intoservices/chat_sync/host.pyby the owning module when that module is imported.- Where a new module goes: unlike
utils/(generic helpers that know nothing about the product) andmain_logic/(logic tied to the live chat session), a package belongs inservices/only if it meets all three conditions: (1) it owns concrete domain state, a protocol or a lifecycle, beyond a generic helper; (2) it never importsmain_logic/,main_routers/orapp/, and gets host capabilities throughhost.pyhooks; (3) it is a standalone subsystem or shared by several subsystems/routers.services/theater_workshop/is a source-only author SDK and is not shipped in the desktop bundle. services/knowledge/runs inside the Memory Server.check_module_layering.pytreats it as its ownknowledgenode, so Main-side code, otherservices/packages included, reaches it over HTTP only.scripts/check_module_layering.pyenforces these layers. A new top-level directory with Python code must be added to itsLAYERS, or CI fails.- Docker files are under
docker/, not the repository root. pyproject.tomlanduv.lockare the dependency contract;requirements.txtis not the recommended installation entrypoint.
Use rg, imports, and routes to find the current owner before editing. A file named in an old issue may now be a package.
