Purpose
-------
Write structured JSON command logs to the project's log directory.
Responsibilities
----------------
- Resolve the log directory via :func:`oct.core.option_c_dir.resolve_logs_dir`.
- Create the directory if it does not exist.
- Write JSON with a deterministic filename convention.
Diagnostics
-----------
Domain: OCT-CORE
Levels:
L3 — log write events
Contracts
---------
- Always writes JSON (``indent=2``, UTF-8).
- Filename: ``oct-{command}-{YYYYMMDD-HHMMSS}.json``.
- Returns the written :class:`~pathlib.Path`.