agentic-loop 3.9.0 → 3.10.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.
@@ -0,0 +1,353 @@
1
+ ---
2
+ description: Take an interactive tour of agentic-loop - the system for going from idea to shipped code with AI.
3
+ ---
4
+
5
+ # Vibe & Thrive Tour
6
+
7
+ ## Step 1: Check & Fix Setup
8
+
9
+ Print this exactly:
10
+
11
+ ```
12
+ ╦ ╦╦╔╗ ╔═╗ ┬ ╔╦╗╦ ╦╦═╗╦╦ ╦╔═╗
13
+ ╚╗╔╝║╠╩╗║╣ ┌┼─ ║ ╠═╣╠╦╝║╚╗╔╝║╣
14
+ ╚╝ ╩╚═╝╚═╝ └┘ ╩ ╩ ╩╩╚═╩ ╚╝ ╚═╝
15
+
16
+ Checking setup...
17
+ ```
18
+
19
+ **Check each item and FIX if missing:**
20
+
21
+ 1. **Check jq installed:**
22
+ ```bash
23
+ command -v jq
24
+ ```
25
+ - If missing: Say "⚠️ jq not found. Install it: `brew install jq` (macOS) or `apt install jq` (Linux)"
26
+ - If found: ✓ jq installed
27
+
28
+ 2. **Check slash commands:**
29
+ ```bash
30
+ test -d .claude/commands && ls .claude/commands/*.md 2>/dev/null | wc -l
31
+ ```
32
+ - If missing or count is 0: Copy from node_modules:
33
+ ```bash
34
+ mkdir -p .claude/commands && cp -r node_modules/agentic-loop/.claude/commands/* .claude/commands/
35
+ ```
36
+ - Then: ✓ Slash commands installed
37
+
38
+ 3. **Check Ralph initialized:**
39
+ ```bash
40
+ test -f .ralph/config.json
41
+ ```
42
+ - If missing: Run `npx ralph init`
43
+ - Then: ✓ Ralph initialized
44
+
45
+ 4. **Check CLAUDE.md:**
46
+ ```bash
47
+ test -f CLAUDE.md
48
+ ```
49
+ - If missing: Create a basic one:
50
+ ```bash
51
+ echo "# Project Guide for Claude" > CLAUDE.md
52
+ ```
53
+ - Then: ✓ CLAUDE.md created
54
+
55
+ 5. **Check Claude Code hooks:**
56
+ ```bash
57
+ test -f .claude/settings.json && jq -e '.hooks' .claude/settings.json > /dev/null 2>&1
58
+ ```
59
+ - If missing: Install hooks:
60
+ ```bash
61
+ npx ralph hooks
62
+ ```
63
+ - Then: ✓ Claude Code hooks installed
64
+
65
+ 6. **Check Docker:**
66
+ ```bash
67
+ test -f docker-compose.yml || test -f docker-compose.yaml || test -f compose.yml
68
+ ```
69
+ - If found:
70
+ - Update config: `jq '.docker.enabled = true' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json`
71
+ - Say: "✓ Docker detected - Ralph will run commands inside containers"
72
+ - **Skip Playwright check** (browser verification uses curl in Docker mode)
73
+
74
+ 7. **Check & Install Playwright (if not Docker):**
75
+
76
+ Check BOTH the npm package AND browser binaries:
77
+ ```bash
78
+ # Check npm package
79
+ npm list playwright 2>/dev/null
80
+
81
+ # Check browser binaries exist (macOS or Linux path)
82
+ ls ~/Library/Caches/ms-playwright/chromium-* 2>/dev/null || ls ~/.cache/ms-playwright/chromium-* 2>/dev/null
83
+ ```
84
+
85
+ - If BOTH exist: Say "✓ Playwright available"
86
+ - If either is missing:
87
+ Say: "Installing Playwright for browser verification (~150MB)..."
88
+ ```bash
89
+ npm install playwright && npx playwright install chromium
90
+ ```
91
+ - If successful: Say "✓ Playwright installed"
92
+ - If failed: Say "⚠️ Playwright installation failed. Browser verification will use basic HTTP checks. You can try manually: `npm install playwright && npx playwright install chromium`"
93
+
94
+ Say: "Setup verified! Let me configure Ralph for your project..."
95
+
96
+ ---
97
+
98
+ ## Step 2: Auto-Configure Ralph
99
+
100
+ **Auto-detect and configure project settings:**
101
+
102
+ ### 2a. Detect Project Structure
103
+
104
+ Check these directories and set `paths` in config:
105
+
106
+ ```bash
107
+ # Check what exists
108
+ test -d frontend && echo "frontend exists"
109
+ test -d client && echo "client exists"
110
+ test -d backend && echo "backend exists"
111
+ test -d core && echo "core exists"
112
+ test -d src && echo "src exists"
113
+ ```
114
+
115
+ Based on results, update config:
116
+ - `frontend/` exists → set `paths.frontend` to `"frontend"`
117
+ - `client/` exists → set `paths.frontend` to `"client"`
118
+ - `backend/` exists → set `paths.backend` to `"backend"`
119
+ - `core/` exists → set `paths.backend` to `"core"`
120
+ - Only `src/` exists → set `paths.frontend` to `"."`
121
+
122
+ ### 2b. Detect URLs
123
+
124
+ Check `.env`, `.env.example`, or `docker-compose.yml` for port numbers:
125
+
126
+ ```bash
127
+ grep -h "PORT\|URL\|localhost" .env .env.example docker-compose.yml 2>/dev/null | head -5
128
+ ```
129
+
130
+ Also check `package.json` for port in dev script:
131
+ ```bash
132
+ cat package.json 2>/dev/null | jq -r '.scripts.dev // empty'
133
+ ```
134
+
135
+ Set URLs based on findings (defaults: frontend=3000, backend=8000):
136
+ ```bash
137
+ jq '.urls.frontend = "http://localhost:3000" | .urls.backend = "http://localhost:8000"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
138
+ ```
139
+
140
+ ### 2c. Detect Commands
141
+
142
+ Read package.json scripts and update config:
143
+
144
+ ```bash
145
+ # Get scripts from package.json (check root and frontend/)
146
+ cat package.json 2>/dev/null | jq -r '.scripts | to_entries[] | "\(.key): \(.value)"' | head -10
147
+ ```
148
+
149
+ Update config with detected commands:
150
+ ```bash
151
+ # Example: if package.json has "dev": "next dev"
152
+ jq '.commands.dev = "npm run dev"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
153
+ ```
154
+
155
+ For fullstack projects with separate frontend:
156
+ ```bash
157
+ jq '.commands.dev = "cd frontend && npm run dev"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
158
+ ```
159
+
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
209
+
210
+ Check for build script in package.json:
211
+ ```bash
212
+ cat package.json 2>/dev/null | jq -r '.scripts.build // empty'
213
+ cat frontend/package.json 2>/dev/null | jq -r '.scripts.build // empty'
214
+ ```
215
+
216
+ Update config with build command:
217
+ ```bash
218
+ # If build script exists in root
219
+ jq '.checks.build = "npm run build"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
220
+
221
+ # If build script exists in frontend/
222
+ jq '.checks.build = "cd frontend && npm run build"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
223
+ ```
224
+
225
+ Detect test framework:
226
+ ```bash
227
+ test -f playwright.config.ts && echo "playwright"
228
+ test -f vitest.config.ts && echo "vitest"
229
+ test -f jest.config.js && echo "jest"
230
+ test -f manage.py && echo "django"
231
+ test -f pytest.ini && echo "pytest"
232
+ test -f pyproject.toml && grep -q "pytest" pyproject.toml && echo "pytest"
233
+ test -f mix.exs && echo "exunit"
234
+ ```
235
+
236
+ Update config:
237
+ ```bash
238
+ # If playwright found
239
+ jq '.playwright.enabled = true' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
240
+
241
+ # If Django found (NO --parallel - it hides errors)
242
+ jq '.checks.test = "python manage.py test --keepdb"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
243
+
244
+ # If Django + Docker
245
+ jq '.checks.test = "docker compose exec -T web python manage.py test --keepdb"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
246
+
247
+ # If pytest found
248
+ jq '.checks.test = "pytest"' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
249
+
250
+ # If vitest/jest found
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
255
+ ```
256
+
257
+ ### 2f. Show Results
258
+
259
+ After updating, read the config and show user:
260
+
261
+ ```bash
262
+ cat .ralph/config.json | jq '{paths, urls, commands, checks, tests}'
263
+ ```
264
+
265
+ Say: "I've auto-configured Ralph:
266
+
267
+ [Show the detected settings in a nice format]
268
+
269
+ Edit `.ralph/config.json` if anything needs adjusting."
270
+
271
+ ### 2g. Test Credentials (Optional)
272
+
273
+ ```bash
274
+ cat .ralph/config.json | jq -r '.auth.testUser // empty'
275
+ ```
276
+
277
+ **If empty**, use AskUserQuestion:
278
+ - **Question:** "Add test credentials? Ralph needs these for authenticated endpoints."
279
+ - **Header:** "Test auth"
280
+ - **Options:**
281
+ - **Yes** - "I'll ask for email and password"
282
+ - **Skip** - "Edit .ralph/config.json later"
283
+
284
+ If "Yes":
285
+ - Ask for email, then password
286
+ - Update config:
287
+ ```bash
288
+ jq --arg u "$EMAIL" --arg p "$PASSWORD" '.auth.testUser = $u | .auth.testPassword = $p' .ralph/config.json > .ralph/config.tmp && mv .ralph/config.tmp .ralph/config.json
289
+ ```
290
+ - Say: "✓ Test credentials saved"
291
+
292
+ If "Skip":
293
+ - Say: "No problem! Add credentials to `.ralph/config.json` when needed."
294
+
295
+ **If already set:**
296
+ - Say: "✓ Test credentials configured"
297
+
298
+ ---
299
+
300
+ ## Step 3: Check for DNA
301
+
302
+ Check if `~/.claude/DNA.md` exists.
303
+
304
+ **If DNA.md does NOT exist:**
305
+
306
+ Use AskUserQuestion:
307
+ - **Question:** "Want to set up your personal preferences? This teaches me how you like to work."
308
+ - **Header:** "DNA setup"
309
+ - **Options:**
310
+ - **Yes, set up my DNA** - "Takes ~2 minutes, makes our collaboration better"
311
+ - **Skip for now** - "You can run /my-dna anytime"
312
+
313
+ If user selects "Yes, set up my DNA":
314
+ - Run the `/my-dna` command inline (execute its full flow)
315
+ - After completing, continue to Step 4
316
+
317
+ If user selects "Skip for now":
318
+ - Say: "No problem! Run `/my-dna` anytime."
319
+ - Continue to Step 4
320
+
321
+ **If DNA.md EXISTS:**
322
+
323
+ Skip this step entirely. Move to Step 4.
324
+
325
+ ---
326
+
327
+ ## Step 4: Quick Reference
328
+
329
+ Print this:
330
+
331
+ ```
332
+ Quick Reference
333
+ ───────────────
334
+
335
+ Workflow:
336
+ /idea [feature] Brainstorm → PRD
337
+ npx ralph run Execute autonomously
338
+ npx ralph status Check progress
339
+ npx ralph stop Stop after current story
340
+
341
+ Quality:
342
+ /vibe-check Audit code quality
343
+ /review Review changes
344
+ npx ralph check Run verification
345
+
346
+ Other:
347
+ /my-dna Set preferences
348
+ /explain Understand code
349
+ /styleguide Generate design system
350
+ /vibe-help Full cheatsheet
351
+ ```
352
+
353
+ Say: "You're all set! Run `/idea [your next feature]` to get started."
@@ -0,0 +1,116 @@
1
+ ---
2
+ description: Run a comprehensive code quality check looking for common patterns that AI coding agents introduce.
3
+ ---
4
+
5
+ # Vibe Check
6
+
7
+ Run a comprehensive code quality check on the current codebase, looking for common patterns that AI coding agents introduce.
8
+
9
+ ## Instructions
10
+
11
+ Analyze the codebase for the following issues. For each category, search the relevant file types and report what you find.
12
+
13
+ ### 1. Debug Statements
14
+ Search for debug statements that shouldn't go to production:
15
+ - Python: `print()`, `breakpoint()`, `pdb.set_trace()`, `ipdb`
16
+ - JS/TS: `console.log()`, `console.debug()`, `console.info()`, `debugger`
17
+
18
+ Ignore: `console.error()`, `console.warn()`, `logger.*` calls, and lines with `// noqa: debug` or `# noqa: debug`
19
+
20
+ ### 2. TODO/FIXME Comments
21
+ Search for unfinished work markers:
22
+ - `TODO`, `FIXME`, `XXX`, `HACK`, `BUG`
23
+
24
+ Skip markdown files and dedicated TODO files.
25
+
26
+ ### 3. Empty Catch Blocks
27
+ Search for error handling that silently swallows errors:
28
+ - Python: `except: pass` or `except Exception: pass`
29
+ - JS/TS: `catch (e) {}` or `.catch(() => {})`
30
+
31
+ ### 4. Hardcoded URLs
32
+ Search for localhost/development URLs:
33
+ - `http://localhost:`
34
+ - `http://127.0.0.1:`
35
+
36
+ Skip test files and config files.
37
+
38
+ ### 5. snake_case in TypeScript
39
+ Search TypeScript interface/type definitions for snake_case property names that should be camelCase.
40
+
41
+ ### 6. Magic Numbers
42
+ In Python files, look for hardcoded numbers > 10 that aren't in constants files.
43
+
44
+ ### 7. Potential Secrets
45
+ Search for patterns that look like hardcoded secrets:
46
+ - `AKIA` (AWS keys)
47
+ - `sk-` followed by long strings (OpenAI/Stripe)
48
+ - `ghp_` (GitHub tokens)
49
+ - Connection strings with passwords
50
+
51
+ Skip `.env.example` files.
52
+
53
+ ### 8. DRY Violations
54
+ Look for obvious code duplication:
55
+ - Very similar functions
56
+ - Repeated string literals (same long string 3+ times)
57
+ - Copy-pasted code blocks
58
+
59
+ ## Output Format
60
+
61
+ Provide a summary report like this:
62
+
63
+ ```
64
+ ## Vibe Check Report
65
+
66
+ ### Summary
67
+ - X issues found across Y files
68
+ - Z high priority (secrets, hardcoded URLs)
69
+ - W low priority (TODOs, debug statements)
70
+
71
+ ### High Priority (fix before committing)
72
+
73
+ #### Potential Secrets
74
+ - file.py:42 - Looks like an API key
75
+
76
+ #### Hardcoded URLs
77
+ - api.ts:15 - localhost URL should use env var
78
+
79
+ ### Medium Priority (fix soon)
80
+
81
+ #### Empty Catch Blocks
82
+ - service.py:88 - except: pass (silently swallows errors)
83
+
84
+ #### snake_case in TypeScript
85
+ - types.ts:12 - `user_id` should be `userId`
86
+
87
+ ### Low Priority (nice to fix)
88
+
89
+ #### Debug Statements
90
+ - utils.py:23 - print() statement
91
+ - component.tsx:45 - console.log()
92
+
93
+ #### TODO/FIXME
94
+ - auth.py:67 - TODO: implement refresh token
95
+
96
+ ### Clean Areas
97
+ - No magic numbers found
98
+ - No DRY violations detected
99
+ ```
100
+
101
+ If everything looks good:
102
+
103
+ ```
104
+ ## Vibe Check Report
105
+
106
+ ✨ Looking good! No issues found.
107
+
108
+ Your code is clean and ready to ship.
109
+ ```
110
+
111
+ ## Notes
112
+
113
+ - Focus on **actionable** findings, not nitpicks
114
+ - Group by severity to help prioritize
115
+ - If a file has many issues, summarize rather than listing every line
116
+ - Be encouraging - the goal is to help, not shame
@@ -0,0 +1,47 @@
1
+ ---
2
+ description: Quick reference cheatsheet for all agentic-loop commands including Ralph.
3
+ ---
4
+
5
+ # Vibe & Thrive Cheatsheet
6
+
7
+ Print this cheatsheet for the user. Do not add any commentary or explanation.
8
+
9
+ ---
10
+
11
+ ## The Loop
12
+
13
+ ```
14
+ /idea [feature] brainstorm & generate PRD
15
+ npx ralph run autonomous coding loop
16
+ npx ralph status check progress
17
+ npx ralph stop stop after current story
18
+ ```
19
+
20
+ ---
21
+
22
+ Run `/vibe-list` to see all commands.
23
+
24
+ ---
25
+
26
+ ## Quality
27
+
28
+ ```
29
+ /vibe-check audit code quality
30
+ /review security-focused review
31
+ npx ralph check run verification only
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Setup & Learning
37
+
38
+ ```
39
+ /tour guided setup
40
+ /my-dna set preferences
41
+ /sign teach Ralph a pattern
42
+ npx ralph signs view learned patterns
43
+ ```
44
+
45
+ ---
46
+
47
+ *https://github.com/allierays/agentic-loop*