com um clique
vaibhav-init
Scans a project and sets up vaibhav ralph loop configuration. Use when asked to initialize vaibhav, set up ralph, configure a project for AI-driven development, or run vaibhav ralph init.
Menu
Scans a project and sets up vaibhav ralph loop configuration. Use when asked to initialize vaibhav, set up ralph, configure a project for AI-driven development, or run vaibhav ralph init.
Converts PRD markdown files to prd.json format for the Ralph autonomous agent loop. Use when asked to convert a PRD, create prd.json, or turn a PRD into Ralph format.
Executing a single iteration of the ralph autonomous coding loop. Use when ralph invokes the agent to implement the next user story from the PRD.
Generates structured Product Requirements Documents from feature descriptions. Use when asked to create a PRD, write requirements, plan a feature, or draft a spec.
| name | vaibhav-init |
| description | Scans a project and sets up vaibhav ralph loop configuration. Use when asked to initialize vaibhav, set up ralph, configure a project for AI-driven development, or run vaibhav ralph init. |
Agentically scan a project to detect its language, framework, commands, and conventions, then generate all configuration needed for the vaibhav ralph loop.
| File | Purpose |
|---|---|
.vaibhav/config.yaml | Ralph loop configuration (commands, rules, engine) |
AGENTS.md (+ CLAUDE.md symlink for Claude) | Project conventions for the AI engine |
prek.toml or .git/hooks/pre-commit | Pre-commit hook running vaibhav ralph check |
.gitignore updates | Ignore ralph working files |
Follow these steps in order. Be conversational — confirm findings with the user before writing files.
Read these files to understand the project (skip any that don't exist):
Project overview:
README.md, README.rst, README.txt, or similarPackage manifests (detect language):
package.json → Node.js / TypeScript / JavaScriptCargo.toml → Rustgo.mod → Gopyproject.toml, setup.py, requirements.txt → PythonGemfile → Rubypom.xml → Java (Maven)build.gradle, build.gradle.kts → Java/Kotlin (Gradle)Build and quality configs:
tsconfig.json, .eslintrc*, vitest.config.*, jest.config.*ruff.toml, mypy.ini, .flake8golangci.yml, .golangci.ymlclippy.toml, rustfmt.toml.prettierrc*, .editorconfigCI configuration:
.github/workflows/ directory listing.gitlab-ci.ymlExisting agent guidance:
AGENTS.mdCLAUDE.md, claude.md.cursorrules, .windsurfrulesDirectory structure:
src/ listing (if it exists)If no package manifest is found, ask the user: "I couldn't detect a package manifest. What language and framework is this project using?"
Based on the package manifest, detect the commands for test, lint, build, and typecheck.
Read package.json and examine the scripts section:
check:all, check, validate, ci). Read what it actually runs — if it combines test + lint + build, prefer it.test, test:unit, test:alllint, lint:fix, lint:checkbuild, compiletypecheck, type-check, tsc, or if none exists and TypeScript is present, use npx tsc --noEmittest that runs echo "no tests" is not a real test command.Read pyproject.toml for tool configurations:
pytest (if pytest is in dependencies or [tool.pytest] exists)ruff check . (if ruff configured), else flake8 .mypy . (if mypy is in dependencies or [tool.mypy] exists)black . or ruff format .go test ./...golangci-lint run (if .golangci.yml exists)go build ./...cargo testcargo clippycargo buildcargo fmt --checkbundle exec rspec or bundle exec rails testbundle exec rubocopmvn test, mvn package./gradlew test, ./gradlew buildshellcheck <script-files>Analyze the codebase to discover conventions:
AGENTS.md if present. If only CLAUDE.md exists, extract key rules from it and plan to alias files in Step 6.strict: true in tsconfig? Is mypy in strict mode?Compile 3-8 concise rules. Each rule should be a single actionable sentence.
Show the user what was detected in a clear format:
## Detected Configuration
**Project:** my-project
**Language:** TypeScript
**Framework:** Next.js
### Commands
✓ test: npm run test
✓ lint: npm run lint
✓ build: npm run build
✓ typecheck: npm run type-check
### Proposed Rules
1. Use vitest for testing
2. Follow existing patterns in src/
3. Use strict TypeScript (strict: true)
### Engine
Which AI engine should be the default?
1) amp
2) claude
3) opencode
4) pi
Ask the user to:
.vaibhav/config.yamlCreate the config file with this structure:
# vaibhav ralph configuration
# Auto-generated — edit as needed
project:
name: "project-name"
language: "TypeScript"
framework: "Next.js"
commands:
test: "npm run test"
lint: "npm run lint"
build: "npm run build"
typecheck: "npm run type-check"
rules:
- "use vitest for testing"
- "follow existing patterns"
boundaries:
never_touch:
- "*.lock"
- ".env*"
engine: "amp"
max_retries: 3
Notes:
project.name should be the directory name (kebab-case)framework if one was detectedengine is what the user choseboundaries.never_touch always includes *.lock and .env*AGENTS.md (canonical) and Claude alias if neededUse AGENTS.md as the canonical guidance file for all engines (amp, claude, opencode, pi).
Before writing: Check if AGENTS.md already exists. If it does, show the user the existing content and ask whether to overwrite, merge, or skip.
If the selected engine is claude, ensure CLAUDE.md is available as an alias:
AGENTS.md exists and CLAUDE.md is missing, create symlink: ln -s AGENTS.md CLAUDE.mdCLAUDE.md exists and AGENTS.md is missing, create symlink: ln -s CLAUDE.md AGENTS.mdAlways write/merge content into AGENTS.md; CLAUDE.md should only be a compatibility alias when needed.
The file should contain:
Keep it concise and practical. This file is read by AI agents, not humans — focus on actionable instructions, not prose.
Example structure:
# Project Name
Brief description of what this project does.
## Commands
After ANY code change, run:
\`\`\`bash
npm run check:all
\`\`\`
Individual commands:
- `npm run test` — Run tests
- `npm run lint` — Lint code
- `npm run build` — Build (includes type checking)
## Conventions
- Use vitest for testing
- Follow existing patterns in src/
- ...
## Directory Structure
\`\`\`
project/
├── src/ # Source code
├── tests/ # Test files
└── ...
\`\`\`
The pre-commit hook should run vaibhav ralph check, which executes the quality commands from the config.
Option A — prek (preferred):
Generate prek.toml at the project root:
[[repos]]
repo = "local"
hooks = [
{
id = "vaibhav-check",
name = "vaibhav ralph check",
language = "system",
entry = "vaibhav ralph check",
always_run = true,
pass_filenames = false,
},
]
Then check if prek is available by running command -v prek. If available, run prek install.
Option B — Direct git hook (fallback):
If prek is not available, create .git/hooks/pre-commit:
#!/usr/bin/env bash
set -euo pipefail
vaibhav ralph check
Make it executable with chmod +x .git/hooks/pre-commit.
Important: If .git/hooks/pre-commit already exists, ask the user before overwriting.
.gitignoreAppend the following entries to .gitignore if they're not already present:
# vaibhav ralph
prd.json
progress.txt
.last-branch
Read the existing .gitignore first and only add entries that are missing. Do not duplicate entries.
vaibhav ralph check is the command that runs quality checks from the config. It is called by the pre-commit hook to ensure code quality before commits..agents/skills/.vaibhav ralph add-rule "rule text".