oorty plan
ProAnalyze your codebase and generate a comprehensive test plan using AI.
Usage
Terminal
npx oorty planOorty API key required
Pro uses the Oorty hosted API only. Set
OORTY_API_KEY from Dashboard → API Keys. An active subscription is required. Code analysis runs locally; prompts are sent to Oorty's API for model completion.Options
| Option | Default | Description |
|---|---|---|
| --output, -o | .oorty/plans/test-plan.md | Output path for the test plan |
| --format | markdown | Output format: markdown or json |
| --max-tokens | 16000 | Max output tokens per AI request |
| --focus | - | Only analyze files matching a path |
| --limit | - | Cap analyzed files for quick/cost test runs |
| --force | false | Overwrite existing plan files without prompt |
| --yes, -y | false | Skip prompts and use default confirmations |
| --verbose | false | Show detailed analysis output |
| --cwd | . | Working directory |
What It Does
The plan command performs these steps:
- Scans your codebase - Identifies components, utilities, hooks, pages, and API routes
- Analyzes code structure - Understands exports, props, dependencies, and complexity
- Detects existing tests- Finds what's already covered to avoid duplication
- Generates test plan - Creates a prioritized markdown document with specific test recommendations
Example Output
Terminal
npx oorty planAnalyzing codebase...Scanning src/ directory...Found 47 components, 12 utilities, 8 pagesChecking existing test coverage...Found 3 existing test filesGenerating test plan...Created: .oorty/plans/test-plan.mdTest Plan Summary: Priority 1 (Critical): 8 tests Priority 2 (Important): 21 tests Priority 3 (Nice to have): 15 tests Unit tests: 23 Component tests: 15 E2E tests: 6Run 'oorty generate' to create these tests.Test Plan Format
The generated test plan is a markdown file with structured test recommendations:
.oorty/plans/test-plan.md
1# Test Plan23Generated: 2024-01-154Framework: Next.js 145Total recommendations: 4467## Priority 1: Critical Path89### Unit Tests1011#### utils/formatCurrency.ts12- **Type:** Unit13- **Priority:** 114- **Rationale:** Pure function used in 12 components15- **Test cases:**16 - Formats USD correctly17 - Handles zero values18 - Handles negative values19 - Handles large numbers2021#### hooks/useCart.ts 22- **Type:** Unit23- **Priority:** 124- **Rationale:** Core business logic for cart operations25- **Test cases:**26 - Adds items to cart27 - Removes items from cart28 - Updates quantities29 - Calculates totals correctly3031### Component Tests3233#### components/ProductCard.tsx34- **Type:** Component35- **Priority:** 136- **Rationale:** Key conversion component37- **Test cases:**38 - Renders product information39 - Handles add to cart click40 - Shows loading state41 - Displays sale price when applicable4243## Priority 2: Important4445...Pro Tip
Review the generated test plan before running
oorty generate. You can edit the markdown file to add, remove, or reprioritize tests before generation.Next Steps
After generating your test plan, run oorty generate to create all the test files automatically.