Conversation
Trails are now always active — the ability to disable them via `entire trail enable`/`entire trail disable` commands and the `strategy_options.trails` setting has been removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 5ba1abd32f4d
When run without flags, presents a form with status (select), title (input), and description (text area) pre-filled with current values. Excludes "done" and "closed" from the status select since those are set by merge and permissions respectively. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 65a3b4ef75ef
Introduces the trail store (CRUD on entire/trails orphan branch), trail types, and registers `entire trail` in the root command. Updates IsShadowBranch and integration tests to recognize the trails branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 87bbe8c4adc7
After each condensation (manual-commit) or save (auto-commit), the checkpoint is appended to the trail's checkpoints list. On first condensation, generates an AI-powered trail title and description from the transcript. Both strategies now push the trails branch on pre-push. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 0cbe6f215a22
Adds TextGenerator interface for agents supporting non-interactive text generation (e.g., claude --print). Implements it for Claude Code and adds summarize.GenerateTrailTitle for AI-powered trail title/description generation from transcripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: f96123e0ece4
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 710851ce13d8
`entire trail create` now creates the git branch if it doesn't exist. When on the default branch without --branch, prompts for a branch name. The branch is created without checkout by default. Use --checkout flag or answer the interactive prompt to switch to the new branch after creation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: fc76ba4ab962
Previously, `trail create` on a non-default branch would default to the current branch and short-circuit if a trail already existed. Now it always prompts for a branch name (with current branch as placeholder), allowing users to create trails for new branches from any branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 0c1e138e4ae0
The interactive flow now asks for the trail title first, then derives a branch name from it (slugified). The user can accept the suggested branch or type a different one. Non-interactive `--title` without `--branch` also derives the branch automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: ff63e394e0c2
The interactive flow now prompts for all fields: 1. Title + description 2. Branch (derived from title) + status (select) 3. Checkout confirmation (if new branch created) Excludes "done" and "closed" from the status select. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 73308b5a6ad8
After creating a trail, pushes the new branch to origin (with -u for tracking) and syncs the trails metadata branch. Push failures are non-blocking warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 18e798499438
Trail author is now resolved via `gh api user` to get the GitHub login. Falls back to git user.name if gh CLI is unavailable or not authenticated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: 6dd269f0a910
`entire trail list` now fetches the remote trails branch before listing, so trails created by collaborators are visible. The fetch is best-effort with a 10s timeout — failures are silent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: a170e94303e0
PR SummaryMedium Risk Overview Hooks/strategies now auto-create a trail on Adds optional agent-driven text generation via Written by Cursor Bugbot for commit 85f50b7. Configure here. |
There was a problem hiding this comment.
Pull request overview
Adds “trails” as a branch-centric work tracking layer stored on an entire/trails orphan branch, integrating it into lifecycle hooks and checkpoint strategies so work intent can be recorded and linked to checkpoints.
Changes:
- Introduces
entire trailcommand family (show/list/create/update) plus supportingtrailtypes and git-backed store. - Hooks trail auto-creation on TurnStart and links checkpoints to trails for both manual-commit and auto-commit strategies.
- Adds optional agent text generation (
TextGenerator) and a summarizer helper to generate trail titles/descriptions from transcripts.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/trail_cmd.go | Adds Cobra commands and helpers for trail CRUD, display, remote fetch, branch creation, and auto-create helper. |
| cmd/entire/cli/trail/trail.go | Defines trail domain types (ID/status/metadata/checkpoints) and helpers like branch humanization. |
| cmd/entire/cli/trail/trail_test.go | Unit tests for IDs, status validation, and branch humanization. |
| cmd/entire/cli/trail/store.go | Implements git-backed trail storage on entire/trails (CRUD + checkpoint linking). |
| cmd/entire/cli/trail/store_test.go | Tests Store behavior against a temp git repo using git CLI. |
| cmd/entire/cli/summarize/trail_title.go | Adds LLM-based trail title/description generation from condensed transcripts. |
| cmd/entire/cli/strategy/push_common.go | Adds PushTrailsBranch() wrapper to push/sync entire/trails. |
| cmd/entire/cli/strategy/manual_commit_types.go | Extends condensation result to include prompts and raw transcript bytes for downstream trail features. |
| cmd/entire/cli/strategy/manual_commit_push.go | Pushes trails branch alongside metadata branch in pre-push hook. |
| cmd/entire/cli/strategy/manual_commit_hooks.go | Links checkpoints to trails and (best-effort) generates trail title/description after condensation. |
| cmd/entire/cli/strategy/manual_commit_condensation.go | Plumbs prompts/transcript into CondenseResult. |
| cmd/entire/cli/strategy/cleanup.go | Excludes entire/trails from shadow-branch cleanup logic. |
| cmd/entire/cli/strategy/auto_commit.go | Links checkpoints to trails and (best-effort) generates title/description from transcript on SaveStep; pushes trails in pre-push. |
| cmd/entire/cli/root.go | Registers the new trail command. |
| cmd/entire/cli/paths/paths.go | Adds TrailsBranchName constant. |
| cmd/entire/cli/lifecycle.go | Auto-creates trails on TurnStart for non-default branches. |
| cmd/entire/cli/integration_test/mid_session_commit_test.go | Updates shadow-branch expectations to ignore entire/trails. |
| cmd/entire/cli/integration_test/deferred_finalization_test.go | Updates shadow-branch expectations to ignore entire/trails. |
| cmd/entire/cli/agent/claudecode/generate.go | Implements GenerateText() for Claude Code via claude --print. |
| cmd/entire/cli/agent/agent.go | Adds TextGenerator optional interface for agents. |
| CLAUDE.md | Documents trails package, commands, storage format, and linkage behavior. |
| .entire/settings.json | Updates repo settings (wingman enabled, telemetry enabled). |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
- Fix FindByBranch comment to match actual (nil, nil) return contract - Use in-place shift for AddCheckpoint prepend to avoid full slice realloc - Set cmd.Stdin=nil and GIT_TERMINAL_PROMPT=0 on fetchTrailsBranch - Use logging package instead of fmt.Fprintf(os.Stderr) for auto-create trail - Revert accidental .entire/settings.json changes (wingman, telemetry) - Return (nil, nil) when agent doesn't support TextGenerator (non-fatal) - Remove raw LLM response from JSON parse error (privacy) - Decouple PushTrailsBranch from push_sessions setting - Fix interactive update silently resetting done/closed status to draft Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: f4d9b8a4c6b4
Aligns with updated spec: the trail's long-form content field is now "body" (JSON key, struct field, CLI flag, and interactive form label). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: c33d8f528b3d
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: dfe58c8924e7
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: b91a1b7a3dc6
# Conflicts: # CLAUDE.md
# Conflicts: # cmd/entire/cli/strategy/auto_commit.go
# Conflicts: # cmd/entire/cli/strategy/manual_commit_push.go # cmd/entire/cli/strategy/push_common.go
Trails are now purely manual — created, updated, and deleted only via `entire trail` subcommands. Removes autoCreateTrailOnTurnStart(), AutoCreateTrail(), and titleFromPrompt(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: c71f63ac5806
The trail command is still fully functional via `entire trail` but no longer appears in `entire help` output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: a52b774246db
Summary
Trails are branch-centric work tracking abstractions stored on the
entire/trailsorphan branch. They capture the why/what of a developer's work (human intent), while checkpoints capture the how/when (machine snapshots). Think of them as lightweight, git-native pull request metadata that exist before any PR is opened.New:
entire trailcommand familyentire trail— show the current branch's trail, or list all trails if none existsentire trail list— list all trails with--statusfilter and--jsonoutputentire trail create— create a trail interactively or via flags (--title,--body,--branch,--status,--checkout)entire trail update— update trail metadata interactively or via flags (--status,--title,--body,--add-label,--remove-label)Interactive trail creation flow
SetReference, no checkout by default)--checkoutflag or interactive confirm)Interactive trail update
When
entire trail updateis run without flags, an interactive form is shown pre-filled with current values (status select, title input, body textarea).Checkpoint linking
After each condensation (manual-commit PostCommit), the checkpoint is appended to the trail's
checkpoints.json(newest first). This links every checkpoint to the trail for the branch.AI-powered trail title generation
When
summarize.enabledis configured and the agent supportsTextGenerator(currently Claude Code viaclaude --print), the trail title and body are generated from the session transcript after the first condensation. Uses Haiku for fast, cheap generation.Trail author from GitHub
Trail author is resolved via
gh api user -q .login(GitHub username), with a fallback togit config user.name.Remote trail sync
entire trail listfetches the remoteentire/trailsbranch before listing, so trails created by collaborators are visible. Pre-push hooks push theentire/trailsbranch alongsideentire/checkpoints/v1.New packages & files
cmd/entire/cli/trail/trail.goID,Status,Metadata,Discussion,CheckpointRef),ValidStatuses(),HumanizeBranchName()cmd/entire/cli/trail/store.goStorewith full CRUD onentire/trailsorphan branch (sharded storage)cmd/entire/cli/trail/trail_test.gocmd/entire/cli/trail/store_test.gocmd/entire/cli/trail_cmd.gocmd/entire/cli/summarize/trail_title.goGenerateTrailTitle()— LLM-based title/body from transcriptcmd/entire/cli/agent/claudecode/generate.goGenerateText()implementation for Claude Code (claude --print)cmd/entire/cli/agent/agent.goTextGeneratorinterface for agents supporting text generationModified files
cmd/entire/cli/strategy/manual_commit_hooks.goappendCheckpointToTrail()andgenerateTrailTitleFromTranscript()after condensationcmd/entire/cli/strategy/manual_commit_condensation.goTranscriptandPromptsinCondenseResultfor trail linkingcmd/entire/cli/strategy/push_common.goPushTrailsBranch()for pushingentire/trailsbranch (independent ofpush_sessionssetting)cmd/entire/cli/strategy/manual_commit_push.goPushTrailsBranch()alongside sessions branch pushcmd/entire/cli/settings/settings.goIsTrailsDisabled()methodscmd/entire/cli/paths/paths.goTrailsBranchNameconstantcmd/entire/cli/root.gotrailcommandStorage format
Trails are stored on the
entire/trailsorphan branch with sharded paths:Status lifecycle:
draft → open → in_progress → in_review → done → closedTest plan
mise run fmt && mise run lint && mise run test:cipassesentire trail create— interactive flow creates branch, trail, and pushes bothentire trail create --title "..." --branch "..."— non-interactive flag modeentire trail update— interactive form pre-fills current valuesentire trail update --status in_review --title "New title"— flag modeentire trail list— shows trails from both local and remoteentire trail list --status in_progress --json— filtering and JSON output🤖 Generated with Claude Code