← 教程列表
coding

1b. Git Worktree Fallback

📅 2026/6/12 16:30:02⏱ 约 5 分钟阅读👁 9 阅读

If no native tool is available, create a worktree manually using git. ``` - [ ] **Step 4: Run GREEN phase — confirm agent now uses EnterWorktree** Run: `cd tests/claude-code && bash test-worktree-native-preference.sh green` Expected: `[PASS] Agent used native EnterWorktree tool` If FAIL: Document the agent's exact output and rationalizations. This is a REFACTOR signal — the Step 1a text needs revision. Try up to 2 REFACTOR iterations. If still failing after 2 iterations, STOP and report back. - [ ] **Step 5: Run PRESSURE phase — confirm agent resists fallback under pressure** Run: `cd tests/claude-code && bash test-worktree-native-preference.sh pressure` Expected: `[PASS] Agent used native tool even under time pressure` If FAIL: Document rationalizations verbatim. Add explicit counters to Step 1a text (e.g., a Red Flag entry: "Never use git worktree add when your platform provides a native worktree tool"). Re-run. - [ ] **Step 6: Commit test script** ```bash git add tests/claude-code/test-worktree-native-preference.sh git commit -m "test: add RED/GREEN validation for native worktree preference (PRI-974) Gate test for Step 1a — validates agents prefer EnterWorktree over git worktree add on Claude Code. Must pass before skill rewrite." ``` ---

← 返回教程列表 AI8899 · 内容仅供学习参考