diff --git a/AGENTS.md b/AGENTS.md
index ad98c40..07325e0 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -8,6 +8,8 @@ They capture what was done, decisions & rationale, gotchas & fixes, and next ste
| Date | Type | File | Summary |
|------|------|------|---------|
+| 2026-06-04 | issue | [20260604-issue23-wire-xdg-resolution-into-cli_log.md](docs/devlog/20260604-issue23-wire-xdg-resolution-into-cli_log.md) | **Issue #23 Complete:** Wire XDG resolution into CLI — history path XDG default, verbose resolved paths, searched-paths message. **7 new tests, 188 total** · **10/10 AC** |
+| 2026-06-04 | issue | [20260604-issue22-xdg-config-path-resolution-with-cwd-fallback_log.md](docs/devlog/20260604-issue22-xdg-config-path-resolution-with-cwd-fallback_log.md) | **Issue #22 Complete:** XDG→CWD path resolution, `load_config(None, None)` search, missing-config notice, OS→domain error wrapping. **9 new tests, 181 total** · **8/8 AC** |
| 2026-06-03 | issue | [20260603-issue10-documentation-site-and-readme_log.md](docs/devlog/20260603-issue10-documentation-site-and-readme_log.md) | **Issue #10 Complete:** MkDocs site (8 pages) + polished README. Material theme, flat URLs. **11/11 AC** · **172 tests pass** |
| 2026-06-03 | slice | [20260603-slice-6b-summary-exit-codes-and-integration-tests-issue9_log.md](docs/devlog/20260603-slice-6b-summary-exit-codes-and-integration-tests-issue9_log.md) | **Issue #9 Complete:** Enhanced summary (failed/skipped book details) + graceful Ctrl+C (exit 130) + 3 integration tests. **12 new tests, 168 total** · **15/15 AC** |
| 2026-06-03 | issue | [20260603-output-polish-progress-bars-and-failure-isolation-issue8_log.md](docs/devlog/20260603-output-polish-progress-bars-and-failure-isolation-issue8_log.md) | **Issue #8 Complete:** TTY-aware download reporting — rich progress bars (interactive) + plain log lines (cron). Per-book failure isolation. Content-Length → live %/ETA/speed. **18 new tests, 156 total** · **8/8 AC** |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 995c5d6..16d05af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [Unreleased]
+## [1.1.0] - 2026-06-04
+
+### Added
+- **config (closes #22):** XDG config path resolution with CWD fallback.
+ `_resolve_config_file()` searches `~/.config/librofm-downloader/` then CWD.
+ `load_config(None, None)` triggers search; missing config.yaml is non-fatal
+ (prints notice, uses built-in defaults); missing secrets.yaml raises
+ domain error listing searched paths. All OS exceptions wrapped as
+ `ConfigError`. XDG directory auto-created on demand.
+- **cli (closes #23):** Wire XDG path resolution into CLI layer.
+ History path defaults to `None` (resolves XDG → CWD, falls back to XDG
+ location). Missing config message now lists searched paths. `--verbose`
+ shows resolved file paths for config, secrets, and history. Explicit
+ `--config`/`--secrets`/`--history` flags bypass search. Clean exit 1
+ with no traceback when secrets missing from all locations.
+
+### Documentation
+- **docs (closes #24):** Update all documentation for XDG path resolution.
+ configuration.md: new "Default file locations" section with search order,
+ auto-creation, missing-config vs missing-secrets behavior, CLI flag
+ overrides, validation error table with "not found" messages, and
+ history default location. quickstart.md, cli-usage.md, troubleshooting.md,
+ and README.md updated to reference XDG-first search.
+
+## [1.0.0] - 2026-06-03
### Documentation
- **docs site (closes #10):** MkDocs documentation with 8 pages — Quickstart,
diff --git a/README.md b/README.md
index 67ee9be..2f86056 100644
--- a/README.md
+++ b/README.md
@@ -24,8 +24,11 @@ No Docker. No JVM. Just `pip install` and go.
# 1. Install
pip install librofm-downloader
-# 2. Configure
-cat > config.yaml << 'EOF'
+# 2. Create XDG config directory
+mkdir -p ~/.config/librofm-downloader
+
+# 3. Configure
+cat > ~/.config/librofm-downloader/config.yaml << 'EOF'
librofm:
format: m4b_mp3_fallback
output_dir: ./audiobooks
@@ -33,13 +36,13 @@ librofm:
download_covers: true
EOF
-cat > secrets.yaml << 'EOF'
+cat > ~/.config/librofm-downloader/secrets.yaml << 'EOF'
librofm:
username: your-email@example.com
password: your-password
EOF
-# 3. Run
+# 4. Run
librofm-downloader
```
diff --git a/docs/devlog/20260604-issue22-xdg-config-path-resolution-with-cwd-fallback_log.md b/docs/devlog/20260604-issue22-xdg-config-path-resolution-with-cwd-fallback_log.md
new file mode 100644
index 0000000..b872bf3
--- /dev/null
+++ b/docs/devlog/20260604-issue22-xdg-config-path-resolution-with-cwd-fallback_log.md
@@ -0,0 +1,63 @@
+# Issue #22: XDG config path resolution with CWD fallback
+
+> **Date:** 2026-06-04
+> **Type:** issue
+> **Reference:** [GitHub #22](https://github.com/AlexKucera/librofm-downloader/issues/22) · Parent [#21](https://github.com/AlexKucera/librofm-downloader/issues/21)
+
+## Goal
+
+Build a path resolution engine for config files that searches `~/.config/librofm-downloader/` (XDG) first, then falls back to CWD. Wire it into `load_config()` so passing `None` for either path triggers search. Missing `config.yaml` is non-fatal (defaulted Config). Missing `secrets.yaml` is fatal (domain error listing searched paths). All OS exceptions caught internally → domain errors only. CLI should print a notice when running on built-in defaults.
+
+## What Was Done
+
+- Added `_resolve_config_file(filename)` to `config.py` — searches XDG (`~/.config/librofm-downloader/`) then CWD, auto-creates XDG dir, returns `Path | None`
+- Modified `load_config()` signature to accept `Path | str | None` for both params; `None` triggers resolver
+- Missing `config.yaml` path → `config_yaml = {}` (all fields get built-in defaults from `.get()` calls)
+- Missing `secrets.yaml` path → raises `ConfigError` listing both searched locations in order
+- All `FileNotFoundError`/`OSError` from file I/O caught and re-raised as `ConfigError`
+- Added `_config_path: Path | None = None` field to `Config` dataclass — sentinel for "used defaults"
+- CLI `run()` and argparse defaults changed from `"config.yaml"`/`"secrets.yaml"` to `None` so resolver activates
+- CLI prints `[yellow]config.yaml not found. Using built-in defaults.[/yellow]` when `_config_path is None`
+- 9 new tests across `TestResolveConfigFile` (5) and `TestLoadConfigWithResolution` (4)
+- **181 total tests pass** (was 172)
+
+## Decisions & Rationale
+
+| Decision | Rationale |
+|----------|-----------|
+| `_config_path` private field on `Config` for defaults signal | Non-breaking: existing code ignores it, CLI can check it. Frozen dataclass prevents mutation. Alternatives: return tuple (breaks signature), raise warning (invisible). |
+| `ConfigError` for missing secrets (not `FileNotFoundError`) | AC requires no OS exceptions leak to callers. Domain error lists searched paths so user knows where to put the file. |
+| Missing config → empty dict, not exception | AC says non-fatal. All `Config` fields have sensible defaults via `.get()`. Credentials come from secrets only. |
+| CLI defaults to `None` (not filename strings) | Original defaults of `"config.yaml"` bypassed the resolver entirely — `load_config` only searches when it receives `None`. |
+| XDG dir auto-created on every resolution call | AC requires it. `mkdir(parents=True, exist_ok=True)` is idempotent and cheap. Ensures the dir exists for users to drop files into. |
+
+## Gotchas & Fixes
+
+| Problem | Root Cause | Fix |
+|---------|------------|-----|
+| `ConfigError` not imported in test file | New test class used `ConfigError` but only subclasses were imported | Added `ConfigError` to the import block |
+| Test created `config/` instead of `.config/` | Test XDG path used `"config"` without leading dot, but implementation uses `.config` | Fixed test to use `tmp_path / ".config" / "librofm-downloader"` |
+| `environ.get("HOME", "~").expanduser()` — `AttributeError` | Called `.expanduser()` on a `str`, not `Path` | Changed to `Path(environ.get("HOME", "~")).expanduser()` |
+| `mkdir()` called after `chdir()` in test | Test ordered `monkeypatch.chdir()` before creating the CWD directory | Reordered: `mkdir()` first, then `chdir()` |
+| CLI showed `Config error: Cannot read config file 'config.yaml': [Errno 2]` | CLI argparse defaults were `"config.yaml"` strings — `load_config` received a path, not `None`, so resolver never ran | Changed CLI and argparse defaults to `None` |
+| Duplicate `InvalidFormatError` class + orphaned docstring | Edit operation merged old code into new location | Removed duplicate, kept single definition |
+| Extra `"` in docstring → `SyntaxError` | Corrupted edit left 4 closing quotes instead of 3 | Fixed to `"""Invalid audio format value."""` |
+
+## Files Changed
+
+| File | Change Summary |
+|------|---------------|
+| `librofm_downloader/config.py` | Added `_resolve_config_file()`, modified `load_config()` to accept `None`, added `_config_path` field to `Config`, wrapped I/O in try/except for domain errors |
+| `librofm_downloader/cli.py` | Changed `run()` and argparse defaults from `"config.yaml"`/`"secrets.yaml"` to `None`, added "using built-in defaults" notice |
+| `tests/test_config.py` | Added `ConfigError` + `_resolve_config_file` imports, 9 new tests in `TestResolveConfigFile` and `TestLoadConfigWithResolution` |
+
+## Open Items & Next Steps
+
+- [ ] Update CLI `--help` text to mention XDG search behavior
+- [ ] Consider adding `XDG_CONFIG_HOME` override (currently hardcoded to `~/.config`)
+- [ ] Update README/docs to document XDG config location and CWD fallback
+- [ ] GitNexus index needs rebuild (`npx gitnexus analyze`) after these changes
+
+---
+
+*Log written by write-log skill*
diff --git a/docs/devlog/20260604-issue23-wire-xdg-resolution-into-cli_log.md b/docs/devlog/20260604-issue23-wire-xdg-resolution-into-cli_log.md
new file mode 100644
index 0000000..50f2393
--- /dev/null
+++ b/docs/devlog/20260604-issue23-wire-xdg-resolution-into-cli_log.md
@@ -0,0 +1,52 @@
+# Issue #23: Wire XDG Path Resolution into CLI Layer
+
+> **Date:** 2026-06-04
+> **Type:** issue
+> **Reference:** [GitHub #23](https://github.com/AlexKucera/librofm-downloader/issues/23) · Parent [#21](https://github.com/AlexKucera/librofm-downloader/issues/21)
+
+## Goal
+
+Wire the path resolver from Issue #22 into the CLI layer so that running `librofm-downloader` with no flags finds config/secrets/history via XDG→CWD search. History path defaults to XDG location. Missing config prints searched paths. Verbose mode shows resolved file locations. Explicit CLI flags bypass search entirely.
+
+## What Was Done
+
+- Changed `run()` parameter `history_path` default from `"download_history.json"` to `None` so the resolver activates
+- Added history path resolution block in `run()`: calls `_resolve_config_file("download_history.json")` (XDG→CWD search); falls back to `~/.config/librofm-downloader/download_history.json` if not found anywhere
+- Imported `_resolve_config_file` from `config.py` into `cli.py`
+- Enhanced missing-config message to list searched paths: `"config.yaml not found in ~/.config/librofm-downloader/config.yaml → ./config.yaml. Using built-in defaults."`
+- Added verbose resolved-paths display after config load showing `config`, `secrets`, `history` with actual resolved filesystem paths (not input args)
+- Changed argparse `--history` default from `"download_history.json"` to `None` with updated help text
+- 7 new tests across 3 test classes: `TestCLIHistoryResolution` (3), `TestCLIConfigResolutionMessages` (2), `TestCLIMissingFilesErrors` (2)
+- **188 tests pass** (was 181 → +7 new)
+- **All 10 acceptance criteria met**
+
+## Decisions & Rationale
+
+| Decision | Rationale |
+|----------|-----------|
+| History resolves before config load | History path is needed by `DownloadHistory.__init__()`, which happens before downloads; resolving early avoids expanding `load_config`'s responsibility |
+| History defaults to XDG location (not CWD) when not found | Consistent with XDG-first resolution strategy; CWD is only a read fallback, not a default-write location |
+| Verbose block moved to after config load | The actual resolved paths aren't known until after `load_config` runs and `_resolve_config_file` has been called; showing paths before resolution would display `None` |
+| `_resolve_config_file` reused for history | Same XDG→CWD search logic; no need for a separate history resolver |
+| Verbose re-calls `_resolve_config_file` for secrets display | At that point `secrets_path` is already consumed by `load_config`; re-resolving is cheap (two `is_file()` checks) and avoids threading the resolved path through |
+
+## Gotchas & Fixes
+
+*None* — all 7 vertical slices passed cleanly on first implementation attempt. No test failures requiring iteration.
+
+## Files Changed
+
+| File | Change Summary |
+|------|---------------|
+| `librofm_downloader/cli.py` | `history_path` default → `None`; XDG resolution for history path; verbose resolved-paths display; argparse `--history` default → `None`; enhanced missing-config message with searched paths; imported `_resolve_config_file` |
+| `tests/test_cli.py` | 7 new tests: `TestCLIHistoryResolution` (3), `TestCLIConfigResolutionMessages` (2), `TestCLIMissingFilesErrors` (2) |
+
+## Open Items & Next Steps
+
+- [ ] Update CLI `--help` text to mention XDG search behavior for `--history`
+- [ ] Update README/docs to document XDG config location and history defaults
+- [ ] GitNexus index needs rebuild (`npx gitnexus analyze`) after these changes
+
+---
+
+*Log written by write-log skill*
diff --git a/docs/html/404.html b/docs/html/404.html
index 3817eb5..40038dc 100644
--- a/docs/html/404.html
+++ b/docs/html/404.html
@@ -19,7 +19,7 @@
-
+
@@ -27,7 +27,7 @@
-
+
@@ -740,10 +740,10 @@
-
+
-
+