Documentation
¶
Overview ¶
Package update implements the `aiwf update ` verb (per-verb subpackage of M-0116; cmd/aiwf/main.go's newRootCmd wires it via NewCmd).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶
NewCmd builds `aiwf update`: refreshes every marker-managed framework artifact the consumer is opted into. The pipeline is the same one `aiwf init` runs after first-time scaffolding — `initrepo.RefreshArtifacts` — so init and update converge to the same state for a given binary version + aiwf.yaml.
Concretely the verb refreshes:
- the embedded skills under .claude/skills/aiwf-*
- the .gitignore patterns covering them
- the marker-managed pre-push hook
- the marker-managed pre-commit hook (gated by aiwf.yaml's status_md.auto_update; default-on)
Hook conflicts (a non-marker hook already in place) are reported in the per-step ledger and surface a remediation block, mirroring `aiwf init`'s conflict path.
func Run ¶
func Run(root string, statusline bool, scope string, wireSettings, allowUntagged, remove, force bool, enableHooks []string, hooks []skills.HookDef) int
Run executes `aiwf update`. Returns one of the cliutil.Exit* codes. When `statusline` is true, also runs the shared statusline scaffold (scope-appropriate destination, byte-refreshed on every update). When `remove` is true, instead removes the --scope statusline's script + settings key (G-0354); `statusline` and `remove` are mutually exclusive. The statusline action runs after the artifact refresh succeeds.
hooks is the shipped hook registry (ADR-0032); the production call site passes skills.ShippedHooks, and tests inject a synthetic registry to exercise the sync step independent of the real registry's current contents. Every registry hook absent from the existing aiwf.yaml's hooks: map is gated (enableHooks bypasses the interactive prompt for the named ones); every already-decided hook syncs forward unchanged, with no re-prompt (M-0235/AC-3).
Types ¶
This section is empty.