Skip to content

feat(worktree): drive autonomous pipelines with the claude CLI - #644

Merged
c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
feature/627-worktree-claude-cli
Jun 23, 2026
Merged

c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
feature/627-worktree-claude-cli

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements C2 (#627): replaces the cursor-agent CLI with the claude CLI throughout the worktree pipelines. This is a functional change — the recipes now drive claude end-to-end.

Changes

  • justfile.worktree (+ synced template assets/workspace/.devcontainer/justfile.worktree, regenerated via sync-manifest):
    • Prereq check command -v agent → command -v claude (install hint → npm install -g @anthropic-ai/claude-code).
    • Auth block agent status/agent login/CURSOR_API_KEY → claude auth status/claude auth login/ANTHROPIC_API_KEY.
    • tmux launches agent chat --yolo --approve-mcps "$PROMPT" (and no-prompt agent chat --approve-mcps) → claude --dangerously-skip-permissions "$PROMPT" / claude --dangerously-skip-permissions, in all three sites (existing-worktree, new-worktree, attach-restart).
    • Removed the cursor-specific _wt_ensure_trust helper + calls and the tmux send-keys "a" approval trigger (no longer needed — see decisions).
  • scripts/requirements.yaml: agent (cursor.com installer) entry → claude entry (command -v claude, claude --version, npm install -g @anthropic-ai/claude-code).
  • Docs: README.md / CONTRIBUTE.md recipe help regenerated; docs/templates/SKILL_PIPELINE.md.j2 (and generated docs/SKILL_PIPELINE.md) updated to describe the claude runtime.
  • tests/bats/worktree-claude-cli.bats: lightweight recipe-grep tests (no cursor-agent/agent chat survives; claude is driven; prereq checks claude). The full worktree.bats functional rewrite is C5's (C5 — Adapt Cursor-coupled tests & keep the AI blocklist #630) — not done here.
  • CHANGELOG.md Unreleased / Changed entry.

Decisions (flag-mapping)

  • --yolo (auto-approve shell commands) and --approve-mcps (auto-approve MCP servers) both map onto claude --dangerously-skip-permissions, which bypasses all permission and MCP approval prompts — the autonomous, no-human-at-terminal equivalent.
  • tmux pattern kept: the detached tmux new-session driving is retained (so worktree-attach, list/stop/clean lifecycle and idle/dashboard features still work). The prompt is now passed as a positional arg to claude at launch instead of via the interactive session, so the post-launch send-keys "a" accept-trigger (which dismissed cursor-agent's trust prompt) is removed — --dangerously-skip-permissions means there is no prompt to accept.
  • Trust helper removed: _wt_ensure_trust wrote ~/.cursor/cli-config.json trustedDirectories, which is cursor-agent-only and unread by claude; with --dangerously-skip-permissions directory trust is moot, so it is dead code and was dropped. jq requirement stays (still used for issue-metadata parsing).
  • Did not touch _read_model/.cursor/agent-models.toml or .cursor/rules paths (W1/C1's domain).

Verification

  • grep -n 'cursor-agent\|agent chat' justfile.worktree assets/workspace/.devcontainer/justfile.worktree → empty.
  • scripts/requirements.yaml lists claude, not agent.
  • just precommit → all hooks green (including sync-manifest, generate-docs, shellcheck, just format).
  • just --list parses the worktree recipes; help text shows "launch the claude CLI".

Refs: #627

c-vigo added 2 commits June 23, 2026 09:22
Replace the cursor-agent invocations in the worktree recipes with the
claude CLI. worktree-start/worktree-attach now launch
'claude --dangerously-skip-permissions' in the tmux session, mapping
'agent chat --yolo --approve-mcps' (autonomous, auto-approve shell and
MCP prompts) onto claude's permission-bypass flag. The cursor-specific
directory-trust helper and the 'tmux send-keys a' approval trigger are no
longer needed and are removed. Prerequisite, auth (claude auth
status/login, ANTHROPIC_API_KEY), requirements.yaml, and the generated
docs now reference the claude CLI.

Refs: #627
@c-vigo
c-vigo marked this pull request as ready for review June 23, 2026 08:17
@c-vigo
c-vigo requested a review from gerchowl as a code owner June 23, 2026 08:17
…' into feature/627-worktree-claude-cli

# Conflicts:
#	CHANGELOG.md
#	assets/workspace/.devcontainer/CHANGELOG.md
@c-vigo
c-vigo merged commit bc14fd2 into feature/625-nix-claude-migration Jun 23, 2026
2 checks passed
@c-vigo
c-vigo deleted the feature/627-worktree-claude-cli branch June 23, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant