Documentation
¶
Overview ¶
Package initcmd implements the `aiwf init` verb (per-verb subpackage of M-0116; directory and package are `initcmd` because `init` is a special Go function name).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶
NewCmd builds `aiwf init`: writes aiwf.yaml, scaffolds entity directories, materializes skills, appends to .gitignore, writes a CLAUDE.md template, and installs the pre-push hook. No commit.
--dry-run reports the would-be ledger without touching disk. --skip-hook performs every other step but omits hook installation.
func Run ¶
func Run(root, actor string, dryRun, skipHook, statusline bool, scope string, wireSettings, allowUntagged bool, enableHooks []string, hooks []skills.HookDef) int
Run executes `aiwf init`. Returns one of the cliutil.Exit* codes. When `statusline` is true, also scaffolds the aiwf-aware Claude Code statusline (scope-appropriate destination; scaffold-if-absent, never clobbers a pre-existing copy). The scaffold action runs after the main init pipeline succeeds; a `--dry-run` init reports without scaffolding.
hooks is the shipped hook registry (ADR-0032); the production call site passes skills.ShippedHooks, and tests inject a synthetic registry to exercise the consent-gating step independent of the real registry's current contents. Every registry hook is gated (enableHooks bypasses the interactive prompt for the named ones) and the resulting decisions are baked into the freshly-written aiwf.yaml, after the main init pipeline succeeds — a `--dry-run` init skips gating entirely, same as the statusline scaffold.
Types ¶
This section is empty.