vibe-and-thrive 1.7.4 → 1.8.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.
@@ -102,6 +102,27 @@ install_ralph() {
102
102
  if [[ ! -f "PROMPT.md" ]] && [[ -f "$PKG_ROOT/templates/PROMPT.md" ]]; then
103
103
  cp "$PKG_ROOT/templates/PROMPT.md" "PROMPT.md"
104
104
  fi
105
+
106
+ # Install CLAUDE.md if missing (project-specific AI instructions)
107
+ if [[ ! -f "CLAUDE.md" ]]; then
108
+ local claude_template=""
109
+ # Select template based on project type
110
+ if [[ -f "manage.py" ]]; then
111
+ claude_template="$PKG_ROOT/templates/examples/CLAUDE-django.md"
112
+ elif [[ -f "pyproject.toml" ]] && grep -q "fastapi" pyproject.toml 2>/dev/null; then
113
+ claude_template="$PKG_ROOT/templates/examples/CLAUDE-fastapi.md"
114
+ elif [[ -d "frontend" ]] && [[ -d "backend" || -d "api" ]]; then
115
+ claude_template="$PKG_ROOT/templates/examples/CLAUDE-fullstack.md"
116
+ elif [[ -f "package.json" ]] && grep -q '"react"' package.json 2>/dev/null; then
117
+ claude_template="$PKG_ROOT/templates/examples/CLAUDE-react.md"
118
+ elif [[ -f "package.json" ]]; then
119
+ claude_template="$PKG_ROOT/templates/examples/CLAUDE-node.md"
120
+ fi
121
+
122
+ if [[ -n "$claude_template" ]] && [[ -f "$claude_template" ]]; then
123
+ cp "$claude_template" "CLAUDE.md"
124
+ fi
125
+ fi
105
126
  }
106
127
 
107
128
  configure_mcp() {
package/bin/ralph.sh CHANGED
@@ -126,8 +126,10 @@ main() {
126
126
  ralph_help
127
127
  ;;
128
128
  version|-v|--version)
129
- echo "ralph 2.0.0 (bash)"
130
- echo "Part of vibe-and-thrive"
129
+ # Read version from package.json
130
+ local version
131
+ version=$(jq -r '.version // "unknown"' "$SCRIPT_DIR/../package.json" 2>/dev/null || echo "unknown")
132
+ echo "ralph $version (vibe-and-thrive)"
131
133
  ;;
132
134
  *)
133
135
  print_error "Unknown command: $cmd"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-and-thrive",
3
- "version": "1.7.4",
3
+ "version": "1.8.0",
4
4
  "description": "Ship quality code faster with AI - RALPH autonomous loop, Claude Code hooks, and pre-commit checks",
5
5
  "author": "Allie Jones <allie@allthrive.ai>",
6
6
  "license": "MIT",
@@ -20,13 +20,14 @@ run_code_review() {
20
20
  return 0
21
21
  fi
22
22
 
23
- # Get the diff of uncommitted changes
23
+ # Get the diff of uncommitted changes (limit size to prevent memory issues)
24
24
  local diff
25
- diff=$(git diff HEAD 2>/dev/null)
25
+ local max_diff_lines=2000
26
+ diff=$(git diff HEAD 2>/dev/null | head -n "$max_diff_lines")
26
27
 
27
28
  if [[ -z "$diff" ]]; then
28
29
  # No uncommitted changes, check staged
29
- diff=$(git diff --cached 2>/dev/null)
30
+ diff=$(git diff --cached 2>/dev/null | head -n "$max_diff_lines")
30
31
  fi
31
32
 
32
33
  if [[ -z "$diff" ]]; then
@@ -34,6 +35,13 @@ run_code_review() {
34
35
  return 0
35
36
  fi
36
37
 
38
+ # Check if diff was truncated
39
+ local full_diff_lines
40
+ full_diff_lines=$(git diff HEAD 2>/dev/null | wc -l)
41
+ if [[ "$full_diff_lines" -gt "$max_diff_lines" ]]; then
42
+ echo " (diff truncated from $full_diff_lines to $max_diff_lines lines)"
43
+ fi
44
+
37
45
  # Get story context for the review
38
46
  local story_json
39
47
  story_json=$(jq --arg id "$story" '.stories[] | select(.id==$id)' "$RALPH_DIR/prd.json" 2>/dev/null)
@@ -1,5 +1,14 @@
1
1
  # Project Instructions for AI Coding Agents
2
2
 
3
+ ## Naming Conventions
4
+ - **Files**: `snake_case.py` — e.g., `user_views.py`, `auth_serializers.py`
5
+ - **Functions/Variables**: `snake_case` — e.g., `get_user_by_id`, `is_authenticated`
6
+ - **Classes**: `PascalCase` — e.g., `UserViewSet`, `AuthSerializer`
7
+ - **Models**: `PascalCase` singular — e.g., `User`, `BlogPost` (Django pluralizes table names)
8
+ - **Constants**: `SCREAMING_SNAKE` — e.g., `MAX_UPLOAD_SIZE`, `DEFAULT_PAGE_SIZE`
9
+ - **URL patterns**: `kebab-case` — e.g., `/api/user-profile/`, `/api/blog-posts/`
10
+ - **Template files**: `snake_case.html` — e.g., `user_detail.html`
11
+
3
12
  ## Tech Stack
4
13
  - **Backend**: Django 5, Django REST Framework
5
14
  - **Database**: PostgreSQL
@@ -1,5 +1,14 @@
1
1
  # CLAUDE.md - FastAPI Project
2
2
 
3
+ ## Naming Conventions
4
+ - **Files**: `snake_case.py` — e.g., `user_service.py`, `auth_router.py`
5
+ - **Functions/Variables**: `snake_case` — e.g., `get_user_by_id`, `is_valid`
6
+ - **Classes**: `PascalCase` — e.g., `UserService`, `AuthRouter`
7
+ - **Pydantic Models**: `PascalCase` — e.g., `UserCreate`, `UserResponse`
8
+ - **Constants**: `SCREAMING_SNAKE` — e.g., `MAX_RETRIES`, `DEFAULT_LIMIT`
9
+ - **Database tables**: `snake_case` — e.g., `user_sessions`, `api_keys`
10
+ - **API endpoints**: `kebab-case` — e.g., `/api/user-profile`, `/api/v1/auth`
11
+
3
12
  ## Project Overview
4
13
 
5
14
  This is a FastAPI backend application with async SQLAlchemy and Pydantic.
@@ -1,5 +1,13 @@
1
1
  # CLAUDE.md - FastMCP Server
2
2
 
3
+ ## Naming Conventions
4
+ - **Files**: `snake_case.py` — e.g., `search_tool.py`, `db_resource.py`
5
+ - **Functions/Variables**: `snake_case` — e.g., `search_files`, `is_valid`
6
+ - **Classes**: `PascalCase` — e.g., `SearchResult`, `FileResource`
7
+ - **Tool names**: `snake_case` — e.g., `search_files`, `read_database`
8
+ - **Resource URIs**: `kebab-case` — e.g., `file://project-files`, `db://user-data`
9
+ - **Constants**: `SCREAMING_SNAKE` — e.g., `MAX_RESULTS`, `DEFAULT_TIMEOUT`
10
+
3
11
  ## Project Overview
4
12
 
5
13
  This is an MCP (Model Context Protocol) server built with FastMCP. It exposes tools, resources, and prompts to LLM clients.
@@ -1,5 +1,23 @@
1
1
  # Project Instructions for AI Coding Agents
2
2
 
3
+ ## Naming Conventions
4
+
5
+ ### Frontend (React/TypeScript)
6
+ - **Files**: `PascalCase.tsx` for components, `camelCase.ts` for utilities
7
+ - **Components**: `PascalCase` — e.g., `UserProfile`, `AuthProvider`
8
+ - **Hooks**: `useCamelCase` — e.g., `useAuth`, `useUserData`
9
+ - **Functions/Variables**: `camelCase` — e.g., `handleSubmit`, `isLoading`
10
+
11
+ ### Backend (Django/Python)
12
+ - **Files**: `snake_case.py` — e.g., `user_views.py`
13
+ - **Functions/Variables**: `snake_case` — e.g., `get_user_by_id`
14
+ - **Classes**: `PascalCase` — e.g., `UserViewSet`, `UserSerializer`
15
+
16
+ ### Shared
17
+ - **API endpoints**: `kebab-case` — e.g., `/api/user-profile/`
18
+ - **Database tables**: `snake_case` — e.g., `user_sessions`
19
+ - **Constants**: `SCREAMING_SNAKE` — e.g., `MAX_RETRIES`
20
+
3
21
  ## Tech Stack
4
22
  - **Frontend**: React 18, TypeScript, Vite, TailwindCSS
5
23
  - **Backend**: Django 5, Django REST Framework
@@ -1,5 +1,13 @@
1
1
  # Project Instructions for AI Coding Agents
2
2
 
3
+ ## Naming Conventions
4
+ - **Files**: `kebab-case.ts` — e.g., `user-service.ts`, `auth-middleware.ts`
5
+ - **Functions/Variables**: `camelCase` — e.g., `getUserById`, `isValid`
6
+ - **Classes/Interfaces/Types**: `PascalCase` — e.g., `UserService`, `CreateUserInput`
7
+ - **Constants**: `SCREAMING_SNAKE` — e.g., `MAX_RETRIES`, `DEFAULT_PORT`
8
+ - **Database tables**: `snake_case` — e.g., `user_sessions` (Prisma converts to camelCase)
9
+ - **API endpoints**: `kebab-case` — e.g., `/api/user-profile`, `/api/auth/sign-in`
10
+
3
11
  ## Tech Stack
4
12
  - **Runtime**: Node.js 20+
5
13
  - **Framework**: Express.js / Fastify
@@ -1,5 +1,14 @@
1
1
  # Project Instructions for AI Coding Agents
2
2
 
3
+ ## Naming Conventions
4
+ - **Files**: `PascalCase.tsx` for components, `camelCase.ts` for utilities — e.g., `UserProfile.tsx`, `useAuth.ts`
5
+ - **Components**: `PascalCase` — e.g., `UserProfile`, `AuthProvider`
6
+ - **Hooks**: `useCamelCase` — e.g., `useAuth`, `useUserData`
7
+ - **Functions/Variables**: `camelCase` — e.g., `handleSubmit`, `isLoading`
8
+ - **Types/Interfaces**: `PascalCase` — e.g., `UserProps`, `AuthState`
9
+ - **Constants**: `SCREAMING_SNAKE` — e.g., `API_BASE_URL`, `MAX_RETRIES`
10
+ - **CSS classes**: `kebab-case` (TailwindCSS utility classes are standard)
11
+
3
12
  ## Tech Stack
4
13
  - **Frontend**: React 18, TypeScript, Vite
5
14
  - **Styling**: TailwindCSS