@fro.bot/systematic 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/design/figma-design-sync.md +1 -1
- package/agents/document-review/coherence-reviewer.md +40 -0
- package/agents/document-review/design-lens-reviewer.md +46 -0
- package/agents/document-review/feasibility-reviewer.md +42 -0
- package/agents/document-review/product-lens-reviewer.md +50 -0
- package/agents/document-review/scope-guardian-reviewer.md +54 -0
- package/agents/document-review/security-lens-reviewer.md +38 -0
- package/agents/research/best-practices-researcher.md +2 -1
- package/agents/research/git-history-analyzer.md +1 -1
- package/agents/research/learnings-researcher.md +27 -26
- package/agents/research/repo-research-analyst.md +164 -9
- package/agents/review/api-contract-reviewer.md +49 -0
- package/agents/review/correctness-reviewer.md +49 -0
- package/agents/review/data-migrations-reviewer.md +53 -0
- package/agents/review/dhh-rails-reviewer.md +31 -52
- package/agents/review/julik-frontend-races-reviewer.md +27 -200
- package/agents/review/kieran-python-reviewer.md +29 -116
- package/agents/review/kieran-rails-reviewer.md +29 -98
- package/agents/review/kieran-typescript-reviewer.md +29 -107
- package/agents/review/maintainability-reviewer.md +49 -0
- package/agents/review/pattern-recognition-specialist.md +2 -1
- package/agents/review/performance-reviewer.md +51 -0
- package/agents/review/reliability-reviewer.md +49 -0
- package/agents/review/schema-drift-detector.md +12 -10
- package/agents/review/security-reviewer.md +51 -0
- package/agents/review/testing-reviewer.md +48 -0
- package/agents/workflow/pr-comment-resolver.md +99 -50
- package/agents/workflow/spec-flow-analyzer.md +60 -89
- package/dist/index.js +9 -0
- package/dist/lib/config-handler.d.ts +2 -0
- package/package.json +1 -1
- package/skills/agent-browser/SKILL.md +69 -48
- package/skills/ce-brainstorm/SKILL.md +2 -1
- package/skills/ce-compound/SKILL.md +126 -28
- package/skills/ce-compound-refresh/SKILL.md +181 -73
- package/skills/ce-ideate/SKILL.md +2 -1
- package/skills/ce-plan/SKILL.md +424 -414
- package/skills/ce-review/SKILL.md +379 -419
- package/skills/ce-review-beta/SKILL.md +506 -0
- package/skills/ce-review-beta/references/diff-scope.md +31 -0
- package/skills/ce-review-beta/references/findings-schema.json +128 -0
- package/skills/ce-review-beta/references/persona-catalog.md +50 -0
- package/skills/ce-review-beta/references/review-output-template.md +115 -0
- package/skills/ce-review-beta/references/subagent-template.md +56 -0
- package/skills/ce-work/SKILL.md +17 -8
- package/skills/ce-work-beta/SKILL.md +16 -9
- package/skills/claude-permissions-optimizer/SKILL.md +15 -14
- package/skills/claude-permissions-optimizer/scripts/extract-commands.mjs +9 -159
- package/skills/claude-permissions-optimizer/scripts/normalize.mjs +151 -0
- package/skills/deepen-plan/SKILL.md +348 -483
- package/skills/document-review/SKILL.md +160 -52
- package/skills/feature-video/SKILL.md +209 -178
- package/skills/file-todos/SKILL.md +72 -94
- package/skills/frontend-design/SKILL.md +243 -27
- package/skills/git-worktree/SKILL.md +37 -28
- package/skills/git-worktree/scripts/worktree-manager.sh +163 -0
- package/skills/lfg/SKILL.md +7 -7
- package/skills/orchestrating-swarms/SKILL.md +1 -1
- package/skills/reproduce-bug/SKILL.md +154 -60
- package/skills/resolve-pr-parallel/SKILL.md +19 -12
- package/skills/resolve-todo-parallel/SKILL.md +9 -6
- package/skills/setup/SKILL.md +8 -160
- package/skills/slfg/SKILL.md +11 -7
- package/skills/test-browser/SKILL.md +69 -145
- package/skills/test-xcode/SKILL.md +61 -183
- package/skills/triage/SKILL.md +10 -10
- package/skills/ce-plan-beta/SKILL.md +0 -571
- package/skills/deepen-plan-beta/SKILL.md +0 -323
|
@@ -16,6 +16,7 @@ This skill provides a unified interface for managing Git worktrees across your d
|
|
|
16
16
|
- **Interactive confirmations** at each step
|
|
17
17
|
- **Automatic .gitignore management** for worktree directory
|
|
18
18
|
- **Automatic .env file copying** from main repo to new worktrees
|
|
19
|
+
- **Automatic dev tool trusting** for mise and direnv configs with review-safe guardrails
|
|
19
20
|
|
|
20
21
|
## CRITICAL: Always Use the Manager Script
|
|
21
22
|
|
|
@@ -23,12 +24,15 @@ This skill provides a unified interface for managing Git worktrees across your d
|
|
|
23
24
|
|
|
24
25
|
The script handles critical setup that raw git commands don't:
|
|
25
26
|
1. Copies `.env`, `.env.local`, `.env.test`, etc. from main repo
|
|
26
|
-
2.
|
|
27
|
-
|
|
27
|
+
2. Trusts dev tool configs with branch-aware safety rules:
|
|
28
|
+
- mise: auto-trust only when unchanged from a trusted baseline branch
|
|
29
|
+
- direnv: auto-allow only for trusted base branches; review worktrees stay manual
|
|
30
|
+
3. Ensures `.worktrees` is in `.gitignore`
|
|
31
|
+
4. Creates consistent directory structure
|
|
28
32
|
|
|
29
33
|
```bash
|
|
30
34
|
# ✅ CORRECT - Always use the script
|
|
31
|
-
bash scripts/worktree-manager.sh create feature-name
|
|
35
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-name
|
|
32
36
|
|
|
33
37
|
# ❌ WRONG - Never do this directly
|
|
34
38
|
git worktree add .worktrees/feature-name -b feature-name main
|
|
@@ -38,8 +42,8 @@ git worktree add .worktrees/feature-name -b feature-name main
|
|
|
38
42
|
|
|
39
43
|
Use this skill in these scenarios:
|
|
40
44
|
|
|
41
|
-
1. **Code Review (`/
|
|
42
|
-
2. **Feature Work (`/
|
|
45
|
+
1. **Code Review (`/ce:review`)**: If NOT already on the target branch (PR branch or requested branch), offer worktree for isolated review
|
|
46
|
+
2. **Feature Work (`/ce:work`)**: Always ask if user wants parallel worktree or live branch work
|
|
43
47
|
3. **Parallel Development**: When working on multiple features simultaneously
|
|
44
48
|
4. **Cleanup**: After completing work in a worktree
|
|
45
49
|
|
|
@@ -47,7 +51,7 @@ Use this skill in these scenarios:
|
|
|
47
51
|
|
|
48
52
|
### In OpenCode Workflows
|
|
49
53
|
|
|
50
|
-
The skill is automatically called from `/
|
|
54
|
+
The skill is automatically called from `/ce:review` and `/ce:work` commands:
|
|
51
55
|
|
|
52
56
|
```
|
|
53
57
|
# For review: offers worktree if not on PR branch
|
|
@@ -60,19 +64,19 @@ You can also invoke the skill directly from bash:
|
|
|
60
64
|
|
|
61
65
|
```bash
|
|
62
66
|
# Create a new worktree (copies .env files automatically)
|
|
63
|
-
bash scripts/worktree-manager.sh create feature-login
|
|
67
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-login
|
|
64
68
|
|
|
65
69
|
# List all worktrees
|
|
66
|
-
bash scripts/worktree-manager.sh list
|
|
70
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh list
|
|
67
71
|
|
|
68
72
|
# Switch to a worktree
|
|
69
|
-
bash scripts/worktree-manager.sh switch feature-login
|
|
73
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
|
|
70
74
|
|
|
71
75
|
# Copy .env files to an existing worktree (if they weren't copied)
|
|
72
|
-
bash scripts/worktree-manager.sh copy-env feature-login
|
|
76
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh copy-env feature-login
|
|
73
77
|
|
|
74
78
|
# Clean up completed worktrees
|
|
75
|
-
bash scripts/worktree-manager.sh cleanup
|
|
79
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh cleanup
|
|
76
80
|
```
|
|
77
81
|
|
|
78
82
|
## Commands
|
|
@@ -87,7 +91,7 @@ Creates a new worktree with the given branch name.
|
|
|
87
91
|
|
|
88
92
|
**Example:**
|
|
89
93
|
```bash
|
|
90
|
-
bash scripts/worktree-manager.sh create feature-login
|
|
94
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-login
|
|
91
95
|
```
|
|
92
96
|
|
|
93
97
|
**What happens:**
|
|
@@ -95,7 +99,11 @@ bash scripts/worktree-manager.sh create feature-login
|
|
|
95
99
|
2. Updates the base branch from remote
|
|
96
100
|
3. Creates new worktree and branch
|
|
97
101
|
4. **Copies all .env files from main repo** (.env, .env.local, .env.test, etc.)
|
|
98
|
-
5.
|
|
102
|
+
5. **Trusts dev tool configs** with branch-aware safety rules:
|
|
103
|
+
- trusted bases (`main`, `develop`, `dev`, `trunk`, `staging`, `release/*`) compare against themselves
|
|
104
|
+
- other branches compare against the default branch
|
|
105
|
+
- direnv auto-allow is skipped on non-trusted bases because `.envrc` can source unchecked files
|
|
106
|
+
6. Shows path for cd-ing to the worktree
|
|
99
107
|
|
|
100
108
|
### `list` or `ls`
|
|
101
109
|
|
|
@@ -103,7 +111,7 @@ Lists all available worktrees with their branches and current status.
|
|
|
103
111
|
|
|
104
112
|
**Example:**
|
|
105
113
|
```bash
|
|
106
|
-
bash scripts/worktree-manager.sh list
|
|
114
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh list
|
|
107
115
|
```
|
|
108
116
|
|
|
109
117
|
**Output shows:**
|
|
@@ -118,7 +126,7 @@ Switches to an existing worktree and cd's into it.
|
|
|
118
126
|
|
|
119
127
|
**Example:**
|
|
120
128
|
```bash
|
|
121
|
-
bash scripts/worktree-manager.sh switch feature-login
|
|
129
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
|
|
122
130
|
```
|
|
123
131
|
|
|
124
132
|
**Optional:**
|
|
@@ -130,7 +138,7 @@ Interactively cleans up inactive worktrees with confirmation.
|
|
|
130
138
|
|
|
131
139
|
**Example:**
|
|
132
140
|
```bash
|
|
133
|
-
bash scripts/worktree-manager.sh cleanup
|
|
141
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh cleanup
|
|
134
142
|
```
|
|
135
143
|
|
|
136
144
|
**What happens:**
|
|
@@ -149,34 +157,34 @@ bash scripts/worktree-manager.sh cleanup
|
|
|
149
157
|
|
|
150
158
|
# You respond: yes
|
|
151
159
|
# Script runs (copies .env files automatically):
|
|
152
|
-
bash scripts/worktree-manager.sh create pr-123-feature-name
|
|
160
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create pr-123-feature-name
|
|
153
161
|
|
|
154
162
|
# You're now in isolated worktree for review with all env vars
|
|
155
163
|
cd .worktrees/pr-123-feature-name
|
|
156
164
|
|
|
157
165
|
# After review, return to main:
|
|
158
166
|
cd ../..
|
|
159
|
-
bash scripts/worktree-manager.sh cleanup
|
|
167
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh cleanup
|
|
160
168
|
```
|
|
161
169
|
|
|
162
170
|
### Parallel Feature Development
|
|
163
171
|
|
|
164
172
|
```bash
|
|
165
173
|
# For first feature (copies .env files):
|
|
166
|
-
bash scripts/worktree-manager.sh create feature-login
|
|
174
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-login
|
|
167
175
|
|
|
168
176
|
# Later, start second feature (also copies .env files):
|
|
169
|
-
bash scripts/worktree-manager.sh create feature-notifications
|
|
177
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-notifications
|
|
170
178
|
|
|
171
179
|
# List what you have:
|
|
172
|
-
bash scripts/worktree-manager.sh list
|
|
180
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh list
|
|
173
181
|
|
|
174
182
|
# Switch between them as needed:
|
|
175
|
-
bash scripts/worktree-manager.sh switch feature-login
|
|
183
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh switch feature-login
|
|
176
184
|
|
|
177
185
|
# Return to main and cleanup when done:
|
|
178
186
|
cd .
|
|
179
|
-
bash scripts/worktree-manager.sh cleanup
|
|
187
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh cleanup
|
|
180
188
|
```
|
|
181
189
|
|
|
182
190
|
## Key Design Principles
|
|
@@ -204,7 +212,7 @@ bash scripts/worktree-manager.sh cleanup
|
|
|
204
212
|
|
|
205
213
|
## Integration with Workflows
|
|
206
214
|
|
|
207
|
-
### `/
|
|
215
|
+
### `/ce:review`
|
|
208
216
|
|
|
209
217
|
Instead of always creating a worktree:
|
|
210
218
|
|
|
@@ -217,7 +225,7 @@ Instead of always creating a worktree:
|
|
|
217
225
|
- no → proceed with PR diff on current branch
|
|
218
226
|
```
|
|
219
227
|
|
|
220
|
-
### `/
|
|
228
|
+
### `/ce:work`
|
|
221
229
|
|
|
222
230
|
Always offer choice:
|
|
223
231
|
|
|
@@ -242,7 +250,7 @@ Switch out of the worktree first (to main repo), then cleanup:
|
|
|
242
250
|
|
|
243
251
|
```bash
|
|
244
252
|
cd $(git rev-parse --show-toplevel)
|
|
245
|
-
bash scripts/worktree-manager.sh cleanup
|
|
253
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh cleanup
|
|
246
254
|
```
|
|
247
255
|
|
|
248
256
|
### Lost in a worktree?
|
|
@@ -250,7 +258,7 @@ bash scripts/worktree-manager.sh cleanup
|
|
|
250
258
|
See where you are:
|
|
251
259
|
|
|
252
260
|
```bash
|
|
253
|
-
bash scripts/worktree-manager.sh list
|
|
261
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh list
|
|
254
262
|
```
|
|
255
263
|
|
|
256
264
|
### .env files missing in worktree?
|
|
@@ -258,7 +266,7 @@ bash scripts/worktree-manager.sh list
|
|
|
258
266
|
If a worktree was created without .env files (e.g., via raw `git worktree add`), copy them:
|
|
259
267
|
|
|
260
268
|
```bash
|
|
261
|
-
bash scripts/worktree-manager.sh copy-env feature-name
|
|
269
|
+
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh copy-env feature-name
|
|
262
270
|
```
|
|
263
271
|
|
|
264
272
|
Navigate back to main:
|
|
@@ -300,3 +308,4 @@ cd $(git rev-parse --show-toplevel)
|
|
|
300
308
|
- No repository duplication
|
|
301
309
|
- Shared git objects for efficiency
|
|
302
310
|
- Much faster than cloning or stashing/switching
|
|
311
|
+
|
|
@@ -65,6 +65,137 @@ copy_env_files() {
|
|
|
65
65
|
echo -e " ${GREEN}✓ Copied $copied environment file(s)${NC}"
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
# Resolve the repository default branch, falling back to main when origin/HEAD
|
|
69
|
+
# is unavailable (for example in single-branch clones).
|
|
70
|
+
get_default_branch() {
|
|
71
|
+
local head_ref
|
|
72
|
+
head_ref=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || true)
|
|
73
|
+
|
|
74
|
+
if [[ -n "$head_ref" ]]; then
|
|
75
|
+
echo "${head_ref#refs/remotes/origin/}"
|
|
76
|
+
else
|
|
77
|
+
echo "main"
|
|
78
|
+
fi
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Auto-trust is only safe when the worktree is created from a long-lived branch
|
|
82
|
+
# the developer already controls. Review/PR branches should fall back to the
|
|
83
|
+
# default branch baseline and require manual direnv approval.
|
|
84
|
+
is_trusted_base_branch() {
|
|
85
|
+
local branch="$1"
|
|
86
|
+
local default_branch="$2"
|
|
87
|
+
|
|
88
|
+
[[ "$branch" == "$default_branch" ]] && return 0
|
|
89
|
+
|
|
90
|
+
case "$branch" in
|
|
91
|
+
develop|dev|trunk|staging|release/*)
|
|
92
|
+
return 0
|
|
93
|
+
;;
|
|
94
|
+
*)
|
|
95
|
+
return 1
|
|
96
|
+
;;
|
|
97
|
+
esac
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
# Trust development tool configs in a new worktree.
|
|
101
|
+
# Worktrees get a new filesystem path that tools like mise and direnv
|
|
102
|
+
# have never seen. Without trusting, these tools block with interactive
|
|
103
|
+
# prompts or refuse to load configs, which breaks hooks and scripts.
|
|
104
|
+
#
|
|
105
|
+
# Safety: auto-trusts only configs unchanged from a trusted baseline branch.
|
|
106
|
+
# Review/PR branches fall back to the default-branch baseline, and direnv
|
|
107
|
+
# auto-allow is limited to trusted base branches because .envrc can source
|
|
108
|
+
# additional files that direnv does not validate.
|
|
109
|
+
#
|
|
110
|
+
# TOCTOU between hash-check and trust is acceptable for local dev use.
|
|
111
|
+
trust_dev_tools() {
|
|
112
|
+
local worktree_path="$1"
|
|
113
|
+
local base_ref="$2"
|
|
114
|
+
local allow_direnv_auto="$3"
|
|
115
|
+
local trusted=0
|
|
116
|
+
local skipped_messages=()
|
|
117
|
+
local manual_commands=()
|
|
118
|
+
|
|
119
|
+
# mise: trust the specific config file if present and unchanged
|
|
120
|
+
if command -v mise &>/dev/null; then
|
|
121
|
+
for f in .mise.toml mise.toml .tool-versions; do
|
|
122
|
+
if [[ -f "$worktree_path/$f" ]]; then
|
|
123
|
+
if _config_unchanged "$f" "$base_ref" "$worktree_path"; then
|
|
124
|
+
if (cd "$worktree_path" && mise trust "$f" --quiet); then
|
|
125
|
+
trusted=$((trusted + 1))
|
|
126
|
+
else
|
|
127
|
+
echo -e " ${YELLOW}Warning: 'mise trust $f' failed -- run manually in $worktree_path${NC}"
|
|
128
|
+
fi
|
|
129
|
+
else
|
|
130
|
+
skipped_messages+=("mise trust $f (config differs from $base_ref)")
|
|
131
|
+
manual_commands+=("mise trust $f")
|
|
132
|
+
fi
|
|
133
|
+
break
|
|
134
|
+
fi
|
|
135
|
+
done
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
# direnv: allow .envrc
|
|
139
|
+
if command -v direnv &>/dev/null; then
|
|
140
|
+
if [[ -f "$worktree_path/.envrc" ]]; then
|
|
141
|
+
if [[ "$allow_direnv_auto" != "true" ]]; then
|
|
142
|
+
skipped_messages+=("direnv allow (.envrc auto-allow is disabled for non-trusted base branches)")
|
|
143
|
+
manual_commands+=("direnv allow")
|
|
144
|
+
elif _config_unchanged ".envrc" "$base_ref" "$worktree_path"; then
|
|
145
|
+
if (cd "$worktree_path" && direnv allow); then
|
|
146
|
+
trusted=$((trusted + 1))
|
|
147
|
+
else
|
|
148
|
+
echo -e " ${YELLOW}Warning: 'direnv allow' failed -- run manually in $worktree_path${NC}"
|
|
149
|
+
fi
|
|
150
|
+
else
|
|
151
|
+
skipped_messages+=("direnv allow (.envrc differs from $base_ref)")
|
|
152
|
+
manual_commands+=("direnv allow")
|
|
153
|
+
fi
|
|
154
|
+
fi
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
if [[ $trusted -gt 0 ]]; then
|
|
158
|
+
echo -e " ${GREEN}✓ Trusted $trusted dev tool config(s)${NC}"
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
if [[ ${#skipped_messages[@]} -gt 0 ]]; then
|
|
162
|
+
echo -e " ${YELLOW}Skipped auto-trust for config(s) requiring manual review:${NC}"
|
|
163
|
+
for item in "${skipped_messages[@]}"; do
|
|
164
|
+
echo -e " - $item"
|
|
165
|
+
done
|
|
166
|
+
if [[ ${#manual_commands[@]} -gt 0 ]]; then
|
|
167
|
+
local joined
|
|
168
|
+
joined=$(printf ' && %s' "${manual_commands[@]}")
|
|
169
|
+
echo -e " ${BLUE}Review the diff, then run manually: cd $worktree_path${joined}${NC}"
|
|
170
|
+
fi
|
|
171
|
+
fi
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
# Check if a config file is unchanged from the base branch.
|
|
175
|
+
# Returns 0 (true) if the file is identical to the base branch version.
|
|
176
|
+
# Returns 1 (false) if the file was added or modified by this branch.
|
|
177
|
+
#
|
|
178
|
+
# Note: rev-parse returns the stored blob hash; hash-object on a path applies
|
|
179
|
+
# gitattributes filters. A mismatch causes a false negative (trust skipped),
|
|
180
|
+
# which is the safe direction.
|
|
181
|
+
_config_unchanged() {
|
|
182
|
+
local file="$1"
|
|
183
|
+
local base_ref="$2"
|
|
184
|
+
local worktree_path="$3"
|
|
185
|
+
|
|
186
|
+
# Reject symlinks -- trust only regular files with verifiable content
|
|
187
|
+
[[ -L "$worktree_path/$file" ]] && return 1
|
|
188
|
+
|
|
189
|
+
# Get the blob hash directly from git's object database via rev-parse
|
|
190
|
+
local base_hash
|
|
191
|
+
base_hash=$(git rev-parse "$base_ref:$file" 2>/dev/null) || return 1
|
|
192
|
+
|
|
193
|
+
local worktree_hash
|
|
194
|
+
worktree_hash=$(git hash-object "$worktree_path/$file") || return 1
|
|
195
|
+
|
|
196
|
+
[[ "$base_hash" == "$worktree_hash" ]]
|
|
197
|
+
}
|
|
198
|
+
|
|
68
199
|
# Create a new worktree
|
|
69
200
|
create_worktree() {
|
|
70
201
|
local branch_name="$1"
|
|
@@ -107,6 +238,29 @@ create_worktree() {
|
|
|
107
238
|
# Copy environment files
|
|
108
239
|
copy_env_files "$worktree_path"
|
|
109
240
|
|
|
241
|
+
# Trust dev tool configs (mise, direnv) so hooks and scripts work immediately.
|
|
242
|
+
# Long-lived integration branches can use themselves as the trust baseline,
|
|
243
|
+
# while review/PR branches fall back to the default branch and require manual
|
|
244
|
+
# direnv approval.
|
|
245
|
+
local default_branch
|
|
246
|
+
default_branch=$(get_default_branch)
|
|
247
|
+
local trust_branch="$default_branch"
|
|
248
|
+
local allow_direnv_auto="false"
|
|
249
|
+
if is_trusted_base_branch "$from_branch" "$default_branch"; then
|
|
250
|
+
trust_branch="$from_branch"
|
|
251
|
+
allow_direnv_auto="true"
|
|
252
|
+
fi
|
|
253
|
+
|
|
254
|
+
if ! git fetch origin "$trust_branch" --quiet; then
|
|
255
|
+
echo -e " ${YELLOW}Warning: could not fetch origin/$trust_branch -- trust check may use stale data${NC}"
|
|
256
|
+
fi
|
|
257
|
+
# Skip trust entirely if the baseline ref doesn't exist locally.
|
|
258
|
+
if git rev-parse --verify "origin/$trust_branch" &>/dev/null; then
|
|
259
|
+
trust_dev_tools "$worktree_path" "origin/$trust_branch" "$allow_direnv_auto"
|
|
260
|
+
else
|
|
261
|
+
echo -e " ${YELLOW}Skipping dev tool trust -- origin/$trust_branch not found locally${NC}"
|
|
262
|
+
fi
|
|
263
|
+
|
|
110
264
|
echo -e "${GREEN}✓ Worktree created successfully!${NC}"
|
|
111
265
|
echo ""
|
|
112
266
|
echo "To switch to this worktree:"
|
|
@@ -321,6 +475,15 @@ Environment Files:
|
|
|
321
475
|
- Creates .backup files if destination already exists
|
|
322
476
|
- Use 'copy-env' to refresh env files after main repo changes
|
|
323
477
|
|
|
478
|
+
Dev Tool Trust:
|
|
479
|
+
- Trusts mise config (.mise.toml, mise.toml, .tool-versions) and direnv (.envrc)
|
|
480
|
+
- Uses trusted base branches directly (main, develop, dev, trunk, staging, release/*)
|
|
481
|
+
- Other branches fall back to the default branch as the trust baseline
|
|
482
|
+
- direnv auto-allow is skipped on non-trusted base branches; review manually first
|
|
483
|
+
- Modified configs are flagged for manual review
|
|
484
|
+
- Only runs if the tool is installed and config exists
|
|
485
|
+
- Prevents hooks/scripts from hanging on interactive trust prompts
|
|
486
|
+
|
|
324
487
|
Examples:
|
|
325
488
|
worktree-manager.sh create feature-login
|
|
326
489
|
worktree-manager.sh create feature-auth develop
|
package/skills/lfg/SKILL.md
CHANGED
|
@@ -7,11 +7,11 @@ disable-model-invocation: true
|
|
|
7
7
|
|
|
8
8
|
CRITICAL: You MUST execute every step below IN ORDER. Do NOT skip any required step. Do NOT jump ahead to coding or implementation. The plan phase (step 2, and step 3 when warranted) MUST be completed and verified BEFORE any work begins. Violating this order produces bad output.
|
|
9
9
|
|
|
10
|
-
1. **Optional:** If the `ralph-
|
|
10
|
+
1. **Optional:** If the `ralph-loop` skill is available, run `/ralph-loop:ralph-loop "finish all slash commands" --completion-promise "DONE"`. If not available or it fails, skip and continue to step 2 immediately.
|
|
11
11
|
|
|
12
|
-
2. `/
|
|
12
|
+
2. `/ce:plan $ARGUMENTS`
|
|
13
13
|
|
|
14
|
-
GATE: STOP. Verify that the `ce:plan` workflow produced a plan file in `docs/plans/`. If no plan file was created, run `/
|
|
14
|
+
GATE: STOP. Verify that the `ce:plan` workflow produced a plan file in `docs/plans/`. If no plan file was created, run `/ce:plan $ARGUMENTS` again. Do NOT proceed to step 3 until a written plan exists.
|
|
15
15
|
|
|
16
16
|
3. **Conditionally** run `/systematic:deepen-plan`
|
|
17
17
|
|
|
@@ -19,13 +19,13 @@ CRITICAL: You MUST execute every step below IN ORDER. Do NOT skip any required s
|
|
|
19
19
|
|
|
20
20
|
GATE: STOP. If you ran the `deepen-plan` workflow, confirm the plan was deepened or explicitly judged sufficiently grounded. If you skipped it, briefly note why and proceed to step 4.
|
|
21
21
|
|
|
22
|
-
4. `/
|
|
22
|
+
4. `/ce:work`
|
|
23
23
|
|
|
24
24
|
GATE: STOP. Verify that implementation work was performed - files were created or modified beyond the plan. Do NOT proceed to step 5 if no code changes were made.
|
|
25
25
|
|
|
26
|
-
5. `/
|
|
26
|
+
5. `/ce:review mode:autofix`
|
|
27
27
|
|
|
28
|
-
6. `/systematic:
|
|
28
|
+
6. `/systematic:todo-resolve`
|
|
29
29
|
|
|
30
30
|
7. `/systematic:test-browser`
|
|
31
31
|
|
|
@@ -33,5 +33,5 @@ CRITICAL: You MUST execute every step below IN ORDER. Do NOT skip any required s
|
|
|
33
33
|
|
|
34
34
|
9. Output `<promise>DONE</promise>` when video is in PR
|
|
35
35
|
|
|
36
|
-
Start with step 2 now (or step 1 if ralph-
|
|
36
|
+
Start with step 2 now (or step 1 if ralph-loop is available). Remember: plan FIRST, then work. Never skip the plan.
|
|
37
37
|
|