Repository navigation
fix(cursor-do): close 4 initial-use friction points (Issue #193) - #194
Conversation
Issue #193 で報告された /cursor:do 初回利用の摩擦 4 点を埋める: 1. Composer 無 commit による Step 7 空振り — cursor-companion task --write は exit 0 を返すが worktree に commit を作らないため、 Step 6 の git log BASE_REF..HEAD が空、Step 7 の cherry-pick が 対象 0 で no-op になり、ユーザーから見て「完了したのに main に 何も入らない」状態だった。Step 6 冒頭で dirty なら Lead 側で 1 commit にまとめる。TASK_SUMMARY env で commit message 制御可能。 commit は worktree 内の中間 commit 扱い、cherry-pick 後の main 側 commit で R01-R13 と pre-commit hook を正規通過する設計。 2. HARNESS_PLUGIN_ROOT 未設定時の scripts 見失い — `:-.` fallback が consumer repo の cwd に解決し scripts が見えず起動不能だった。 hooks.json と同じ valid_root パターンを cursor-do Step 3 と cursor-ask Step 2 に inline 化。CLAUDE_PLUGIN_ROOT → HARNESS_PLUGIN_ROOT → CLAUDE_PROJECT_DIR → PWD → marketplace dir → cache dir の順に探索、解決できなければ exit 2。 3. 4.13.2 active 版 scripts/ から cursor 系欠落 — .gitattributes で scripts/ は export-ignore 対象外、cursor 系は git-tracked で release tarball に含まれる前提。将来の release 工程ミスで再発しないよう tests/validate-plugin.sh にゲートを追加。 4. Step 4 worktree 相対パス vs companion 絶対パス要求の衝突 — 相対 WT_DIR は agent shell の cwd が repo root でないと別階層に ネスト生成され、Step 5 の --workspace が companion の workspace guard で exit 2 になる。Step 4 冒頭で REPO_ROOT 取得 → cd → 絶対 パス WT_DIR で組む。 Mirror (codex/.codex/skills, opencode/skills) 同期。 tests/validate-plugin.sh 102/102 PASS (新ゲート +1)。 scripts/ci/check-consistency.sh 全 14 section PASS。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review Walkthroughこのプルリクエストは、Issue ChangesIssue
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0663524acd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for c in "${CLAUDE_PROJECT_DIR:-}" "$PWD" \ | ||
| "$HOME/.claude/plugins/marketplaces/claude-code-harness-marketplace" \ | ||
| "$HOME/.claude/plugins/cache/claude-code-harness-marketplace/claude-code-harness/"*; do |
There was a problem hiding this comment.
Include the native install roots in resolver
When the Codex-native package is installed with setup-codex.sh, the installer copies only skills/rules (scripts/setup-codex.sh:589-590), so scripts/cursor-companion.sh and .claude-plugin/plugin.json do not exist under the consumer repo or $CODEX_HOME. This new fallback only searches the consumer repo and Claude plugin marketplace/cache roots, so /cursor:do still exits 2 for a first-time Codex install unless the separate Claude plugin is also installed; add/copy a runtime script root for Codex/OpenCode installs or include those paths here.
Useful? React with 👍 / 👎.
Promote [Unreleased] to [4.13.3] - 2026-06-01 and bump all version surfaces from 4.13.2 to 4.13.3 (patch). - Cursor 初回利用の摩擦 4 点を解消 (Chachamaru127#193, Chachamaru127#194) - breezing 起動ナレーションを計画明示型に緩和 (Chachamaru127#190) - WorktreeCreate hook の出力修正 (Chachamaru127#188, lands Chachamaru127#168) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes #193
What's Changed
/cursor:do初回利用の摩擦 4 点を 1 PR で埋める。Composer 無 commit による空振り / plugin-root 未設定時の起動不能 / release tarball ゲート不在 / worktree 相対パス衝突。Before / After
cursor-companion task --write後に Step 7 cherry-pick が no-op で「完了したのに main に何も入らない」HARNESS_PLUGIN_ROOT未設定 →:-.が cwd に解決 → scripts 不在で起動不能valid_rootパターンを inline 化、6 候補 dir を探索validate-plugin.shに git-tracked + export-ignore 不在ゲート追加WT_DIRで agent cwd 依存、--workspaceが exit 2git rev-parse --show-toplevel→ 絶対パスWT_DIRFixed
1. Composer 無 commit による Step 7 空振り (Issue #193 §1)
今まで:
cursor-companion task --writeは exit 0 + 結果 text を返すが、worktree には commit が無く未コミット変更だけ。Step 6 のgit log BASE_REF..HEADは空、Step 7 cherry-pick は対象 0 で no-op。ユーザー視点で「完了したのに main に何も入らない」。今後:
skills/cursor-do/SKILL.mdStep 6 冒頭で worktree が dirty なら Lead 側で 1 commit にまとめる (git add -A→git commit、pre-commit hook は skip)。worktree 内の中間 commit 扱い、cherry-pick 後の main 側 commit で R01-R13 と pre-commit hook を正規通過する設計。TASK_SUMMARYenv で commit message 制御可能。2.
HARNESS_PLUGIN_ROOT未設定時の scripts 見失い (Issue #193 §2)今まで:
bash "${HARNESS_PLUGIN_ROOT:-.}/scripts/cursor-companion.sh"の:-.fallback が consumer repo の cwd に解決し、scripts/cursor-companion.shが見えず exit していた。今後:
cursor-doStep 3 とcursor-askStep 2 で hooks.json と同じvalid_rootパターンを inline 化。候補解決順:CLAUDE_PLUGIN_ROOT→HARNESS_PLUGIN_ROOT→CLAUDE_PROJECT_DIR→$PWD→ marketplace dir → cache dir。解決できなければ exit 2 で早期失敗。cursor-doはPLUGIN_ROOTを Step 3 で export し Step 5 で再利用、cursor-askは 1 bash 内で完結。3. release tarball から cursor scripts 欠落の早期検知 (Issue #193 §3)
今まで: 4.13.2 active 版の cache に
cursor-companion.sh/resolve-impl-backend.sh/model-routing.shが欠落しており、ユーザーが scripts を見つけられず起動不能になっていた (#2 と複合)。今後:
.gitattributes確認でscripts/は export-ignore 対象外、cursor 系 4 scripts は git-tracked で release tarball に含まれる前提。将来 release 工程の手違いで再発しないようtests/validate-plugin.shにゲートを追加: 4 scripts をgit ls-files --error-unmatchとgit check-attr export-ignoreで検証。4. worktree 相対パス vs companion 絶対パス要求 (Issue #193 §4)
今まで:
WT_DIR=".claude/worktrees/cursor-do-${ID}"(相対) で worktree を切り、agent shell の cwd が repo root でないと別階層にネスト生成され、Step 5 の--workspaceが companion のis not a directoryガードで exit 2。今後: Step 4 冒頭で
REPO_ROOT="$(git rev-parse --show-toplevel)"→cd "$REPO_ROOT"してからWT_DIR="$REPO_ROOT/.claude/worktrees/cursor-do-${ID}"を絶対パスで組む。Test plan
bash tests/validate-plugin.sh102 PASS / 0 WARN / 0 FAIL (新ゲート +1)bash scripts/ci/check-consistency.sh全 14 section PASS[Unreleased]Fixed セクションに 4 点を Before/After 形式で記載/cursor:do再走で 4 点すべて解消することを Issue reporter が確認🤖 Generated with Claude Code
Summary by CodeRabbit
リリースノート
Bug Fixes
/cursor:askおよび/cursor:doコマンドのパス解決の信頼性を向上させました。環境変数が未設定の場合の自動検出機能を追加し、予期しないパス参照エラーを削減しました。Documentation
Tests