Skip to main content

Module state

Module state 

Source
Expand description

Runtime state directory resolution for plan-issue.

plan-issue writes its canonical artefacts under <state-dir>/out/plan-issue-delivery/.... The state directory is resolved (in order) from:

  1. CLI override set via set_state_dir_override (driven by the --state-dir global flag).
  2. PLAN_ISSUE_HOME environment variable (fallback for adapters that pin a workspace via env, such as the CLI’s own integration tests).
  3. ${XDG_STATE_HOME:-$HOME/.local/state}/plan-issue default.

Callers must read the resolved path through state_dir; the helper is the single entry point for runtime-layout math elsewhere in the crate (see runtime_layout::runtime_root, task_spec, render, execute).

Constants§

PLAN_ISSUE_STATE_HOME_ENV
Environment variable consulted when no --state-dir flag is passed.

Functions§

set_state_dir_override
Set or clear the CLI-level --state-dir override.
state_dir
Resolve the active state directory using the documented chain.