agentic-loop 3.9.0 → 3.9.1
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/.claude/commands/tour.md +56 -4
- package/package.json +1 -1
package/.claude/commands/tour.md
CHANGED
|
@@ -157,7 +157,55 @@ For fullstack projects with separate frontend:
|
|
|
157
157
|
jq '.commands.dev = "cd frontend && npm run dev"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
### 2d. Detect
|
|
160
|
+
### 2d. Detect Test Directory and Patterns
|
|
161
|
+
|
|
162
|
+
Check for test directories and files:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Check common test directories
|
|
166
|
+
for dir in tests test __tests__ spec src/__tests__; do
|
|
167
|
+
test -d "$dir" && echo "Found test directory: $dir"
|
|
168
|
+
done
|
|
169
|
+
|
|
170
|
+
# Check for test files (colocated pattern)
|
|
171
|
+
find . -type f \( -name "*.test.ts" -o -name "*.spec.ts" -o -name "*_test.py" -o -name "test_*.py" -o -name "*_test.exs" -o -name "*_test.go" \) \
|
|
172
|
+
-not -path "*/node_modules/*" -not -path "*/.venv/*" 2>/dev/null | head -3
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Update config based on findings:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# If tests/ directory found
|
|
179
|
+
jq '.tests.directory = "tests"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
180
|
+
|
|
181
|
+
# If test/ directory found (Elixir convention)
|
|
182
|
+
jq '.tests.directory = "test"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
183
|
+
|
|
184
|
+
# If colocated tests found (no test directory, but *.test.ts files exist)
|
|
185
|
+
jq '.tests.directory = "src"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Set test patterns based on project type:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Node/TypeScript projects
|
|
192
|
+
jq '.tests.patterns = "*.test.ts,*.test.tsx,*.spec.ts,*.spec.tsx,*.test.js,*.spec.js"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
193
|
+
|
|
194
|
+
# Python projects
|
|
195
|
+
jq '.tests.patterns = "*_test.py,test_*.py"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
196
|
+
|
|
197
|
+
# Elixir projects
|
|
198
|
+
jq '.tests.patterns = "*_test.exs"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
199
|
+
|
|
200
|
+
# Go projects
|
|
201
|
+
jq '.tests.patterns = "*_test.go"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**If NO tests found:**
|
|
205
|
+
- Say: "⚠️ No test directory found. Ralph can only verify syntax and API responses."
|
|
206
|
+
- Say: "Add tests, or set `checks.requireTests: false` in config to silence this warning."
|
|
207
|
+
|
|
208
|
+
### 2e. Detect Build & Test Commands
|
|
161
209
|
|
|
162
210
|
Check for build script in package.json:
|
|
163
211
|
```bash
|
|
@@ -182,6 +230,7 @@ test -f jest.config.js && echo "jest"
|
|
|
182
230
|
test -f manage.py && echo "django"
|
|
183
231
|
test -f pytest.ini && echo "pytest"
|
|
184
232
|
test -f pyproject.toml && grep -q "pytest" pyproject.toml && echo "pytest"
|
|
233
|
+
test -f mix.exs && echo "exunit"
|
|
185
234
|
```
|
|
186
235
|
|
|
187
236
|
Update config:
|
|
@@ -200,14 +249,17 @@ jq '.checks.test = "pytest"' .ralph/config.json > .ralph/config.tmp && mv .ralph
|
|
|
200
249
|
|
|
201
250
|
# If vitest/jest found
|
|
202
251
|
jq '.checks.test = "npm test"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
252
|
+
|
|
253
|
+
# If ExUnit found (Elixir)
|
|
254
|
+
jq '.checks.test = "mix test"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
|
|
203
255
|
```
|
|
204
256
|
|
|
205
|
-
###
|
|
257
|
+
### 2f. Show Results
|
|
206
258
|
|
|
207
259
|
After updating, read the config and show user:
|
|
208
260
|
|
|
209
261
|
```bash
|
|
210
|
-
cat .ralph/config.json | jq '{paths, urls, commands, checks}'
|
|
262
|
+
cat .ralph/config.json | jq '{paths, urls, commands, checks, tests}'
|
|
211
263
|
```
|
|
212
264
|
|
|
213
265
|
Say: "I've auto-configured Ralph:
|
|
@@ -216,7 +268,7 @@ Say: "I've auto-configured Ralph:
|
|
|
216
268
|
|
|
217
269
|
Edit `.ralph/config.json` if anything needs adjusting."
|
|
218
270
|
|
|
219
|
-
###
|
|
271
|
+
### 2g. Test Credentials (Optional)
|
|
220
272
|
|
|
221
273
|
```bash
|
|
222
274
|
cat .ralph/config.json | jq -r '.auth.testUser // empty'
|