This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Neo is a QA automation platform that combines LLM intelligence with Playwright browser automation to create AI-powered testing workflows. It uses a pnpm workspace monorepo structure with TypeScript and ESM modules.
pnpm build # Build all packages sequentially
pnpm lint # Run Biome linter with auto-fix
pnpm format # Format code with Biomepnpm start:explore # Explore scenarios using LLM/MCP
pnpm start:explore-file # Explore using YAML configuration file
pnpm start:record # Record user actions and generate test code
pnpm report:test # Run Playwright tests in report directory
pnpm report:show # Show Playwright test report on port 9999# Run specific test by name
pnpm --filter explorer report:test -- --grep "test name"
# Run package-specific scripts
pnpm --filter <package-name> <script>
# Start Electron client
pnpm start:client
# Start MCP server (from playwright-mcp package)
pnpm --filter playwright-mcp start- packages/explorer: Core LLM-powered test scenario exploration and code generation engine
- packages/playwright-mcp: MCP server providing Playwright browser automation tools
- packages/test-runner: Converts test scenarios to Playwright test files and executes them
- packages/client-electron: Electron-based desktop GUI with tRPC communication
-
LLM Abstraction Layer (
src/llm/): Plugin-based architecture for multiple LLM providersLLMClientbase class with provider-specific adaptersGeminiAdapterandClaudeAdapterimplementations- Message system with user/assistant/tool result types
-
MCP Integration (
src/mcp/): Protocol-based browser automationMCPClientinterface for tool discovery and executionPlaywrightMcpClientfor Playwright-specific operations- Stdio transport communication with MCP server
-
Code Generation Engine (
src/codegen/): Context-driven test generationPlaywrightCodegen: Orchestrates LLM queries and MCP tool executionExecutionContext: Manages scenario state and execution historyUserInput: Handles test data and user interactions
-
Test Execution Flow:
- Parse scenario configuration (YAML or CLI input)
- Initialize execution context with scenario details
- Connect to MCP server for browser automation tools
- Iteratively generate and execute test steps using LLM
- Generate Playwright test code from execution results
- Save test files and execution reports
- Async/Await: All external operations use promises
- TypeScript Strict Mode: ESNext target with NodeNext module resolution
- Zod Validation: Runtime type validation for configurations
- Workspace Protocol: Internal packages referenced via
workspace:* - Plugin Architecture: Extensible LLM provider system
- Target: ESNext with NodeNext module resolution
- Strict mode enabled (except
noImplicitAny) - Experimental decorators enabled
- Source maps generated for debugging
- Indent: 2 spaces
- Line width: 120 characters
- Quote style: Single quotes
- Auto-organize imports enabled
- Test directory:
./report(explorer),./tests(test-runner) - Reporter: HTML with traces and videos
- Default browser: Chromium
Required environment variables for LLM providers:
GEMINI_API_KEY: For Google Gemini integrationANTHROPIC_API_KEY: For Claude integration
Optional configurations:
- Storage state files for authentication
- Custom trace directories for debugging
- Browser selection (chromium, firefox, webkit)