Skip to content

Commit 53bcc04

Browse files
committed
docs: add CLAUDE.md for project guidance and development instructions
1 parent a6baec4 commit 53bcc04

File tree

1 file changed

+150
-0
lines changed

1 file changed

+150
-0
lines changed

CLAUDE.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
RobotCode is a comprehensive Robot Framework toolkit that provides IDE extensions, CLI tools, and Language Server Protocol implementation. It consists of:
8+
9+
- **VS Code Extension** (TypeScript) - Main IDE integration with debugging, testing, and language features
10+
- **IntelliJ Plugin** (Kotlin) - IntelliJ/PyCharm support via LSP4IJ bridge
11+
- **Python Packages** - Modular architecture with 12 specialized packages
12+
- **Multi-language Support** - Robot Framework integration across platforms
13+
14+
## Development Commands
15+
16+
### Python/Backend Development
17+
```bash
18+
# Setup development environment
19+
hatch env create devel
20+
21+
# Install all packages in development mode
22+
hatch run install-packages
23+
24+
# Run tests
25+
hatch run test:test
26+
hatch run test:test-reset # Reset regression test snapshots
27+
28+
# Linting and formatting
29+
hatch run lint:all # Run mypy and ruff checks
30+
hatch run lint:fix # Auto-fix formatting and linting issues
31+
hatch run lint:typing # Type checking only
32+
hatch run lint:style # Code style checks only
33+
34+
# Build and packaging
35+
hatch run build:package # Build packages
36+
hatch run build:publish # Publish to PyPI
37+
```
38+
39+
### VS Code Extension Development
40+
```bash
41+
# Install dependencies
42+
npm install --include=dev
43+
44+
# Build extension
45+
npm run compile # Development build
46+
npm run package # Production build
47+
48+
# Testing
49+
npm run test
50+
```
51+
52+
### IntelliJ Plugin Development
53+
```bash
54+
cd intellij-client
55+
56+
# Build plugin
57+
./gradlew build
58+
59+
# Run development instance
60+
./gradlew runIde
61+
```
62+
63+
## Architecture and Package Structure
64+
65+
### Core Python Packages (`packages/`)
66+
- **core/**: Shared utilities, type definitions, document management, event system
67+
- **language_server/**: LSP implementation with common protocol parts and Robot Framework-specific features
68+
- **debugger/**: Debug Adapter Protocol implementation with Robot Framework debugging
69+
- **runner/**: Enhanced Robot Framework execution with CLI tools (robot, rebot, libdoc, testdoc)
70+
- **analyze/**: Static code analysis and validation tools
71+
- **jsonrpc2/**: JSON-RPC protocol implementation for client-server communication
72+
- **plugin/**: Plugin system foundation with click helpers and manager
73+
- **robot/**: Robot Framework integration utilities (config, diagnostics, AST helpers)
74+
- **repl/** & **repl_server/**: Interactive Robot Framework shell and server
75+
- **modifiers/**: Code transformation and diagnostic modification tools
76+
77+
### Extension Structure
78+
- **vscode-client/extension/**: VS Code extension with manager-based lifecycle pattern
79+
- **vscode-client/rendererLog/**: Notebook log rendering components
80+
- **intellij-client/**: Kotlin plugin using LSP4IJ for Language Server communication
81+
82+
### Key Architectural Patterns
83+
- **Modular Design**: Each package has specific responsibilities with minimal dependencies
84+
- **Protocol-Based**: Uses LSP/DAP for consistent IDE integration across platforms
85+
- **Manager Pattern**: VS Code extension uses managers for lifecycle management
86+
- **Native Parser**: Built on Robot Framework's native parser for full compatibility
87+
- **Multi-workspace Support**: Handles complex project structures with different Python environments
88+
89+
## Testing Strategy
90+
91+
### Test Matrix
92+
- **Python Versions**: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
93+
- **Robot Framework Versions**: 5.0, 6.0, 6.1, 7.0, 7.1, 7.2, 7.3
94+
95+
### Running Tests
96+
```bash
97+
# Run full test suite
98+
hatch run test
99+
100+
# Test specific environment
101+
hatch run devel.py312-rf73:test
102+
103+
# Coverage reporting
104+
hatch run cov
105+
```
106+
107+
### Test Configuration
108+
- Uses pytest with asyncio support
109+
- Regression testing with regtest2 for snapshot testing
110+
- HTML reporting for coverage analysis
111+
- Test data in `tests/` directory with Robot Framework fixtures
112+
113+
## Configuration Files
114+
115+
### Build System
116+
- **hatch.toml**: Package management, environments, and build scripts
117+
- **pyproject.toml**: Python project configuration with tool settings (ruff, mypy, pytest)
118+
119+
### Code Quality
120+
- **ruff**: Python linting and formatting (configured in pyproject.toml)
121+
- **mypy**: Static type checking with strict mode
122+
- **eslint.config.mjs**: TypeScript/JavaScript linting for VS Code extension
123+
124+
### Robot Framework
125+
- **robot.toml**: Robot Framework configuration for testing
126+
- **Language Server**: Supports robot.toml configuration files with JSON schema validation
127+
128+
## Important Development Notes
129+
130+
### Version Management
131+
- Uses semantic versioning across all packages
132+
- Version synchronization handled by scripts in `scripts/` directory
133+
- Release automation through GitHub Actions
134+
135+
### Multi-Platform Considerations
136+
- Python packages support Windows, macOS, Linux
137+
- VS Code extension requires Node.js environment
138+
- IntelliJ plugin requires Java/Kotlin environment
139+
140+
### Key Integration Points
141+
- Language Server Protocol bridges Python backend to IDE frontends
142+
- Debug Adapter Protocol enables Robot Framework debugging
143+
- Native Robot Framework parser ensures full compatibility
144+
- Plugin system allows extensibility through hooks
145+
146+
### Dependencies
147+
- **Python**: Robot Framework, asyncio, typing extensions, click, platformdirs
148+
- **VS Code**: TypeScript, vscode-languageclient, esbuild
149+
- **IntelliJ**: Kotlin, LSP4IJ plugin
150+
- **Build**: Hatch for Python packaging, npm for Node.js, Gradle for Kotlin

0 commit comments

Comments
 (0)