fix: entire→trace rebrand, hook binary resolution, settings migration, README truth - #66
Merged
Conversation
NewRootCmd reported Use: "entire" / Short: "Entire CLI" and its
getting-started help pointed at docs.entire.io, which no longer exists.
The command tree is surfaced as 'hawk trace ...' and as a standalone
'trace' binary (cmd/trace), so the root name now matches the repo
identity:
- Use derives from the new agent.BinaryName constant ("trace")
- Short matches the README tagline
- getting-started help drops the dead docs.entire.io URL
- version banner reads 'Trace CLI'
- hidden-alias deprecation hints point at 'trace ...' commands
- agent-help drill-down pointer derives from the live root name
agent.BinaryName lives in the shared agent package because both the
strategy layer and agent integrations need it and cannot import package
cli without a cycle.
The default git-hook prefix (strategy/hookCmdPrefix) and every production
wrapper probe (agent.WrapProduction*) referenced a binary named entire,
which does not exist in hawk distributions. Hooks installed under hawk
probed 'command -v entire', silently exited 0, and disabled session
capture unless flags or PATH happened to provide the legacy binary.
Resolution now flows through agent.HookCommandPrefix in priority order:
1. an explicitly-configured prefix still wins (local-dev launcher and
--absolute-git-hook-path are checked first, unchanged);
2. the basename of the running executable when it is a known name:
trace, entire, or hawk — hawk embeds this CLI as 'hawk trace';
3. 'trace' when a binary of that name is reachable on PATH;
4. legacy 'entire' when only it is on PATH, and as the final fallback,
matching the historical baked default so existing installs and
already-installed hooks keep working (never worse than before).
The wrapper generators rewrite the leading legacy binary token of the
wrapped command to the resolved prefix ('hawk trace hooks ...'), and
wrapper recognition accepts every binary-name form so hooks installed
by older builds are still detected for removal and upgrade.
Tests pin resolution via SetHookBinaryResolutionForTesting /
PinLegacyHookBinaryForTesting because hosts may carry unrelated
binaries named trace or entire on PATH.
Follow-ups to the root-command rebrand: agent-help --json now emits 'trace trail'/'trace status' because CommandPath derives from the root Use field.
The README documents .trace/settings.json and .trace/settings.local.json, but the code still used the pre-rebrand .entire/ locations. The canonical settings files now live under .trace/, implemented as a lazy, read-only compat shim rather than a destructive migration: - reads (Load, LoadProjectRaw/LoadLocalRaw, IsSetUp, IsSetUpAny, and the worktree-root variants) fall back to the legacy .entire/ files when the canonical .trace/ file is absent, so existing repositories keep working with zero migration steps; - the first save to a settings file copies the legacy content to the canonical location before writing (lazy migration); the legacy file itself is never deleted or rewritten; - exported helper signatures are unchanged (only constant values moved); - .trace/ is treated as CLI infrastructure (excluded from checkpoints) and gets its own .gitignore for settings.local.json; - enable's local-vs-project target detection and uninstall's directory cleanup handle both locations. Session data keeps using .entire/metadata on the checkpoint branch; migrating stored data and installed .entire git hooks is deliberately out of scope.
…ointers - Quick Start claimed 'no separate trace binary to install' while cmd/trace/main.go provides a standalone entrypoint; the text now says Trace is a library first (embedded as 'hawk trace ...'), with a buildable-but-unreleased cmd/trace entrypoint for contributors. - The Typical Workflow / Commands examples use 'trace ...'; a note clarifies the same commands run as 'hawk trace ...' under Hawk. - Configuration documents the legacy .entire/ read compat. - 'See CLAUDE.md for architecture details' pointed at GitNexus boilerplate; now points at docs/architecture.md.
The //go:generate directive pinned ogen@v1.20.3 while go.mod requires v1.23.0, so a bare 'go generate' would regenerate with a different generator than the module builds against. Pin the directive to v1.23.0 and note that regenerating the oas_*.go files (large diff) is pending.
- cli/agent/hook_command.go, cli/setup.go: gofumpt reformat (CI fmt gate) - go.mod + CI: Go 1.26.6 — 1.26.5 stdlib has reachable vulns that fail govulncheck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
entiretotracewith accurate description.traceon PATH → legacyentirefallback. Wrappers never worse than today..trace/with lazy non-destructive read-compat from.entire/(first save migrates).Test plan
GOWORK=off go build ./...GOWORK=off go test ./cli/...— entire cli tree green