Skip to main content

Module init

Module init 

Source
Expand description

haz init per AUX-001..AUX-008.

Two invocation shapes are normative:

  • haz init (bare): the interactive scaffold flow (AUX-003..AUX-005). The pure state-machine layer of the interactive tree lives in model, the AUX-005 / AUX-006 commit pass in commit, and the ratatui driver in tui. On confirmation, commit::apply_commit writes the planned files; declines exit 0 without changes per AUX-005 step 4; Ctrl+C aborts with the EXEC-021 signal-interrupt code.
  • haz init --yes: writes a minimal <cwd>/.haz/workspace.yml containing exactly projects: [] per AUX-007. The body is constructed as an empty commit::CommitPlan and shipped through the same commit::apply_commit code path the interactive arm uses, so both shapes share the rename-into-place pattern (AUX-006).

Both shapes refuse to overlay an existing .haz/ per AUX-002.

Modules§

commit
Commit pass for haz init per AUX-005..AUX-006.
model
Interactive-tree state machine for haz init per AUX-003..AUX-005.
tui
Interactive scaffold TUI for haz init per AUX-003..AUX-005.

Functions§

execute
Execute haz init against cwd.