Completes v0.1: documentation, build/install path, and version stamping. - cli/VERSION (v0.1.0) stamped into the binary via ldflags. - cli/README.md rewritten as the homelab overview (verbs + tiers, manifest, build, the preserved legacy webhook use-cases). - docs/adr/0004-0006: why homelab exists (grown in place from infra/cli, not a separate repo), v0.1 scope + everything-allowed/tiers-recorded, and the work/tf behaviour (native worktree entry, verification-gated auto-land, presence-coupled apply). - setup-devvm.sh builds cli/ -> /usr/local/bin/homelab each provisioning run (t3-dispatch pattern), so every devvm user gets the current binary. - AGENTS.md: discovery pointer under Common Operations. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.8 KiB
homelab work/tf behaviour: native worktree entry, gated auto-land, presence-coupled apply
Four behaviours of the infra-loop verbs are surprising enough to record:
-
workowns worktree create/land/clean, but session entry delegates to the native harness worktree tool. A CLI is a child process and cannot change the agent's working directory;EnterWorktreecan. Sohomelab work start <topic>creates the worktree + branch off<remote>/master(git-crypt-aware) and prints the path — the agent enters it with nativeEnterWorktree({path}). -
work landis auto-land, but gated on verification. It merges master in → runs verification → pushesHEAD:master(fetch+merge+retry on non-fast-forward) → falls back to pushing the feature branch for a PR when the direct push is rejected (branch protection). It refuses to push when it cannot verify (no--verify-cmdand no auto-detected suite) unless--no-verifyis passed — added after an accidental smoke-test land pushed unverified WIP to master (benign: the infra CI applied 0 stacks because the diff wascli/-only, but an unverified land must be deliberate, not default). -
tf applyis first-class despite GitOps, and mandatorily presence-coupled. Local applies are out-of-band (CI applies canonically on push) but happen constantly (~763× in the corpus).tf apply <stack>auto-claimsstack:<name>, delegates toscripts/tg apply --non-interactive, and always releases on exit (normal, error, or signal viasync.Once+ handler) — fixing the documented ~200-claim leak — and prints an out-of-band reminder. -
Known v0.1 limitation:
work landdoes not yet block on CI to green; that arrives with the ci/deploy watch verb-group. It prints a reminder to follow the pipeline manually.