1- # web-hacker Development Guide
1+ # bluebox-sdk Development Guide
22
3- This file provides context and guidelines for working with the web-hacker codebase.
3+ This file provides context and guidelines for working with the bluebox-sdk codebase.
44
55## Bash Commands
66
77### Development Setup
88
9- - ` uv venv web-hacker- env && source web-hacker -env/bin/activate ` - Create and activate virtual environment (recommended)
10- - ` python3 -m venv web-hacker- env && source web-hacker -env/bin/activate ` - Alternative venv creation
9+ - ` uv venv bluebox- env && source bluebox -env/bin/activate ` - Create and activate virtual environment (recommended)
10+ - ` python3 -m venv bluebox- env && source bluebox -env/bin/activate ` - Alternative venv creation
1111- ` uv pip install -e . ` - Install package in editable mode (faster with uv)
1212- ` pip install -e . ` - Install package in editable mode (standard)
1313
@@ -16,14 +16,14 @@ This file provides context and guidelines for working with the web-hacker codeba
1616- ` pytest tests/ -v ` - Run all tests with verbose output
1717- ` pytest tests/unit/test_js_utils.py -v ` - Run specific test file
1818- ` pytest tests/unit/test_js_utils.py::test_function_name -v ` - Run specific test
19- - ` python web_hacker /scripts/run_benchmarks.py ` - Run routine discovery benchmarks
20- - ` python web_hacker /scripts/run_benchmarks.py -v ` - Run benchmarks with verbose output
19+ - ` python bluebox /scripts/run_benchmarks.py ` - Run routine discovery benchmarks
20+ - ` python bluebox /scripts/run_benchmarks.py -v ` - Run benchmarks with verbose output
2121
2222### CLI Tools
2323
24- - ` web-hacker -monitor --host 127.0.0.1 --port 9222 --output-dir ./cdp_captures --url about:blank --incognito` - Start browser monitoring
25- - ` web-hacker -discover --task "your task description" --cdp-captures-dir ./cdp_captures --output-dir ./routine_discovery_output --llm-model gpt-5.1` - Discover routines from captures
26- - ` web-hacker -execute --routine-path example_routines/amtrak_one_way_train_search_routine.json --parameters-path example_routines/amtrak_one_way_train_search_input.json` - Execute a routine
24+ - ` bluebox -monitor --host 127.0.0.1 --port 9222 --output-dir ./cdp_captures --url about:blank --incognito` - Start browser monitoring
25+ - ` bluebox -discover --task "your task description" --cdp-captures-dir ./cdp_captures --output-dir ./routine_discovery_output --llm-model gpt-5.1` - Discover routines from captures
26+ - ` bluebox -execute --routine-path example_routines/amtrak_one_way_train_search_routine.json --parameters-path example_routines/amtrak_one_way_train_search_input.json` - Execute a routine
2727
2828### Chrome Debug Mode
2929
@@ -32,7 +32,7 @@ This file provides context and guidelines for working with the web-hacker codeba
3232
3333### Type Checking & Linting
3434
35- - ` pylint web_hacker / ` - Run pylint (uses .pylintrc config)
35+ - ` pylint bluebox / ` - Run pylint (uses .pylintrc config)
3636
3737## Code Style
3838
@@ -47,7 +47,7 @@ This file provides context and guidelines for working with the web-hacker codeba
4747### Imports
4848
4949- ** IMPORTANT** : NO lazy imports! All imports must be at the top of the file
50- - Use absolute imports from ` web_hacker .*`
50+ - Use absolute imports from ` bluebox .*`
5151- Group imports: stdlib, third-party, local (with blank lines between groups)
5252
5353### Python Version
@@ -57,20 +57,20 @@ This file provides context and guidelines for working with the web-hacker codeba
5757
5858### Data Models
5959
60- - Use Pydantic ` BaseModel ` for all data models (see ` web_hacker /data_models/` )
60+ - Use Pydantic ` BaseModel ` for all data models (see ` bluebox /data_models/` )
6161- Use ` Field() ` for field descriptions and defaults
6262- Use ` model_validator ` for custom validation logic
63- - All models should be in ` web_hacker /data_models/` directory
63+ - All models should be in ` bluebox /data_models/` directory
6464
6565### Error Handling
6666
67- - Use custom exceptions from ` web_hacker .utils.exceptions`
67+ - Use custom exceptions from ` bluebox .utils.exceptions`
6868- Return ` RoutineExecutionResult ` for routine execution results
69- - Log errors using ` web_hacker .utils.logger.get_logger()`
69+ - Log errors using ` bluebox .utils.logger.get_logger()`
7070
7171### JavaScript Code Generation
7272
73- - All JavaScript code should be generated through functions in ` web_hacker /utils/js_utils.py`
73+ - All JavaScript code should be generated through functions in ` bluebox /utils/js_utils.py`
7474- JavaScript code must be wrapped in IIFE format: ` (function() { ... })() `
7575- Use helper functions from ` _get_placeholder_resolution_js_helpers() ` for placeholder resolution
7676
@@ -87,24 +87,24 @@ This file provides context and guidelines for working with the web-hacker codeba
8787### Routine Development Workflow
8888
89891 . Launch Chrome in debug mode (or use quickstart.py)
90- 2 . Run ` web-hacker -monitor` and perform actions manually
91- 3 . Run ` web-hacker -discover` with task description
90+ 2 . Run ` bluebox -monitor` and perform actions manually
91+ 3 . Run ` bluebox -discover` with task description
92924 . Review generated ` routine.json `
93- 5 . Test with ` web-hacker -execute`
93+ 5 . Test with ` bluebox -execute`
94946 . Fix any placeholder escaping issues (string params need ` \"{{param}}\" ` )
9595
9696## Core Files and Utilities
9797
9898### Key Modules
9999
100- - ` web_hacker /data_models/routine/routine.py` - Main Routine model
101- - ` web_hacker /data_models/routine/operation.py` - Operation types and execution
102- - ` web_hacker /data_models/routine/parameter.py` - Parameter definitions
103- - ` web_hacker /data_models/routine/placeholder.py` - Placeholder resolution
104- - ` web_hacker /cdp/connection.py` - Chrome DevTools Protocol connection
105- - ` web_hacker /utils/js_utils.py` - JavaScript code generation
106- - ` web_hacker /utils/web_socket_utils.py` - WebSocket utilities for CDP
107- - ` web_hacker /sdk/client.py` - Main SDK client
100+ - ` bluebox /data_models/routine/routine.py` - Main Routine model
101+ - ` bluebox /data_models/routine/operation.py` - Operation types and execution
102+ - ` bluebox /data_models/routine/parameter.py` - Parameter definitions
103+ - ` bluebox /data_models/routine/placeholder.py` - Placeholder resolution
104+ - ` bluebox /cdp/connection.py` - Chrome DevTools Protocol connection
105+ - ` bluebox /utils/js_utils.py` - JavaScript code generation
106+ - ` bluebox /utils/web_socket_utils.py` - WebSocket utilities for CDP
107+ - ` bluebox /sdk/client.py` - Main SDK client
108108
109109### Important Patterns
110110
@@ -141,7 +141,7 @@ This file provides context and guidelines for working with the web-hacker codeba
141141
142142- Prefer running single tests or test files for faster iteration
143143- Run full test suite before committing: ` pytest tests/ -v `
144- - Benchmarks validate routine discovery pipeline: ` python web_hacker /scripts/run_benchmarks.py `
144+ - Benchmarks validate routine discovery pipeline: ` python bluebox /scripts/run_benchmarks.py `
145145
146146## Environment Setup
147147
@@ -155,7 +155,7 @@ This file provides context and guidelines for working with the web-hacker codeba
155155### Virtual Environment
156156
157157- Always use a virtual environment
158- - Activate before working: ` source web-hacker -env/bin/activate `
158+ - Activate before working: ` source bluebox -env/bin/activate `
159159- Install dependencies: ` uv pip install -e . ` or ` pip install -e . `
160160
161161### Environment Variables
0 commit comments