Generic code review that auto-detects tech stack and delegates to appropriate framework-specific orchestrator
Performs automated code review by detecting tech stack and delegating to framework-specific reviewers.
/plugin marketplace add majesticlabs-dev/majestic-marketplace/plugin install majestic-engineer@majestic-marketplace[PR #/URL | --staged | --branch | files...]workflows/Generic code review command that detects your project's tech stack and delegates to the appropriate framework-specific review orchestrator.
Read config values:
claude -p "/majestic:config tech_stack generic"claude -p "/majestic:config default_branch main"<input_arguments> $ARGUMENTS </input_arguments>
Scope modes:
#123 or GitHub URL → PR changes--staged → staged changes only--branch → current branch vs default branchpath/to/file ... → specific filesUse "Tech stack" from Context above. If empty, auto-detect from project files:
If not configured in .agents.yml, detect from project files:
| Detection | Tech Stack |
|---|---|
Gemfile exists | rails |
pyproject.toml or requirements.txt exists | python |
package.json exists (no Gemfile) | javascript |
| None of the above | generic |
# Detection commands
[ -f Gemfile ] && echo "rails"
[ -f pyproject.toml ] || [ -f requirements.txt ] && echo "python"
[ -f package.json ] && echo "javascript"
Based on scope from arguments:
# Default (unstaged changes)
git diff --name-only --diff-filter=d
# Staged mode
git diff --cached --name-only --diff-filter=d
# Branch mode (use "Default branch" from Context)
git diff <default_branch>...HEAD --name-only --diff-filter=d
# PR mode
gh pr diff <PR_NUMBER> --name-only
Based on detected tech stack, invoke the appropriate orchestrator agent via Task tool:
Task: majestic-rails:review/code-review-orchestrator
Prompt: "Review these Rails files. Scope: [scope mode]
Changed files:
[file list]"
Task: majestic-python:review/code-review-orchestrator
Prompt: "Review these Python files. Scope: [scope mode]
Changed files:
[file list]"
**Tech Stack:** JavaScript
JavaScript code review orchestrator is not yet available.
For now, you can run the generic simplicity reviewer:
`/majestic-engineer:review/simplicity-reviewer [files]`
Or configure `tech_stack: generic` in AGENTS.md to use generic reviewers.
For unknown or generic tech stacks, run minimal reviewers directly:
# Run these tasks in parallel:
Task 1: majestic-engineer:review/simplicity-reviewer
Prompt: "Review these files for YAGNI violations, unnecessary complexity: [file list]"
Task 2: majestic-engineer:review/project-topics-reviewer (if topics exist)
Prompt: "Review these files against project topics: [file list]
Topics:
[topics content]"
The orchestrator will return a synthesized report. Present it to the user with:
To explicitly set your tech stack (recommended for multi-language projects), add to AGENTS.md:
## Project Configuration
tech_stack: rails # rails | python | javascript | generic
# Review unstaged changes (auto-detect tech stack)
/majestic:code-review
# Review staged changes
/majestic:code-review --staged
# Review current branch vs main
/majestic:code-review --branch
# Review a PR
/majestic:code-review #123
# Review specific files
/majestic:code-review app/models/user.rb app/controllers/users_controller.rb