Filesystem conventions for Pixir.
Two roots (ADR 0002 / 0003):
- Global
~/.pixir/— cross-project, user-level state:auth.json,config.json. Created lazily,0700. - Project
.pixir/— per-Workspace state, rooted at the current working directory. Sessions live in.pixir/sessions/<id>.ndjsonand are the source of truth for the Log. Session Resources live next to the Log under.pixir/sessions/<id>/resources/. This subtree is gitignored.
All helpers return absolute paths. ensure_* variants create the directory
(idempotently) before returning it.
Summary
Functions
Global auth.json path (OAuth credentials).
Global config.json path.
Ensure the global root exists (mode 0700) and return it.
Ensure the Session Resources dir exists and return it.
Ensure the project sessions dir exists and return it.
Global root: ~/.pixir (override with PIXIR_HOME).
Pixir-global Skills root: ~/.pixir/skills (respects PIXIR_HOME).
Project root: <workspace>/.pixir (workspace defaults to cwd).
NDJSON Log path for a given session id.
Directory for durable Session Resources attached to a Session.
Project sessions directory: <workspace>/.pixir/sessions.
Functions
@spec auth_file() :: String.t()
Global auth.json path (OAuth credentials).
@spec config_file() :: String.t()
Global config.json path.
@spec ensure_global_root() :: String.t()
Ensure the global root exists (mode 0700) and return it.
Ensure the Session Resources dir exists and return it.
Ensure the project sessions dir exists and return it.
@spec global_root() :: String.t()
Global root: ~/.pixir (override with PIXIR_HOME).
@spec global_skills_dir() :: String.t()
Pixir-global Skills root: ~/.pixir/skills (respects PIXIR_HOME).
Project root: <workspace>/.pixir (workspace defaults to cwd).
NDJSON Log path for a given session id.
Directory for durable Session Resources attached to a Session.
Project sessions directory: <workspace>/.pixir/sessions.