archive

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package archive implements the `aiwf archive ` 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

func NewCmd() *cobra.Command

NewCmd builds `aiwf archive [--apply] [--kind <kind>] [--root <path>]`.

Default invocation (no `--apply`) is dry-run: the verb computes a Plan and the dispatcher prints the planned moves. `--apply` runs verb.Apply against the same Plan, producing exactly one git commit per kernel principle #7 with trailer `aiwf-verb: archive` (no `aiwf-entity:` trailer — multi-entity sweep, same shape as `aiwf rewidth`).

Per ADR-0004:

  • The verb sweeps terminal-status entities into per-kind archive/ subdirectories.
  • There is no positional id argument — the verb sweeps by status, not by id (the rejected per-id housekeeping alternative).
  • Idempotent: re-runs on a clean tree are no-ops.
  • Reversal is deliberately not implemented (ADR-0004 §"Reversal"). If a closed entity needs revisiting, file a new entity that references the archived one.

func Run

func Run(actor, principal, root, kind string, apply bool) int

Run executes `aiwf archive`. Returns one of the cliutil.Exit* codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL