The `.brain` directory path is defined and resolved through two key locations: Definition: In `config.py`, line 1-2, there's a constant that defines the base name for the brain directory [config.py:1]: DB_PATH = '.brain/' BRAIN_DIR = Path(DB_PATH) Resolution: In `main.py`, lines 120-145, within the `init_workspace` function, this path is resolved by joining it with the workspace's absolute path [main.py:130]: path = Path(workspace_path).resolve() db_path = path / DB_PATH db_path.mkdir(parents=True, exist_ok=True) The resolution process: 1. Takes the provided `workspace_path` parameter 2. Resolves it to an absolute path using `.resolve()` 3. Joins it with the `.brain/` directory constant 4. Creates the full directory structure if it doesn't exist