diff --git a/.github/instructions/README.md b/.github/instructions/README.md new file mode 100644 index 0000000..9057349 --- /dev/null +++ b/.github/instructions/README.md @@ -0,0 +1,19 @@ +# AI Assistant Instructions Directory + +This directory contains specific instructions for different AI assistants working on the Onchain Test Kit project. + +## Files + +- `claude.instructions.md` - Specific guidelines for Claude AI +- `gemini.instructions.md` - Specific guidelines for Gemini AI +- `general.instructions.md` - General guidelines for any AI assistant + +## Purpose + +These instruction files help AI assistants understand: +- Project-specific coding patterns and conventions +- Architecture and design principles +- Testing requirements and best practices +- Development workflow and quality standards + +Each file is tailored to the specific strengths and capabilities of different AI assistants while maintaining consistency in the core technical guidance. \ No newline at end of file diff --git a/.github/instructions/claude.instructions.md b/.github/instructions/claude.instructions.md new file mode 100644 index 0000000..861fa0c --- /dev/null +++ b/.github/instructions/claude.instructions.md @@ -0,0 +1,47 @@ +# Claude Development Instructions + +Instructions specifically for Claude AI when contributing to the Onchain Test Kit. + +## Claude's Analytical Strengths + +Use your systematic analysis capabilities to: + +### Code Architecture Analysis +- Trace through the builder pattern implementation in `configBuilder.ts` +- Understand the relationship between configuration, fixtures, and test execution +- Analyze error propagation through async/await chains +- Identify coupling between wallet implementations and shared interfaces + +### Problem-Solving Methodology +1. **Comprehensive Analysis**: Before making changes, understand the full impact +2. **Root Cause Focus**: Address underlying issues rather than symptoms +3. **Systematic Testing**: Create test cases that cover edge conditions +4. **Documentation Completeness**: Ensure all changes are properly documented + +### Code Quality Focus +- Leverage TypeScript's type system for compile-time error prevention +- Implement comprehensive error handling with contextual messages +- Follow established patterns for consistency +- Consider performance implications of all changes + +## Recommended Approach + +### For Feature Development +1. Study existing implementations thoroughly +2. Design solutions that integrate seamlessly +3. Create comprehensive test coverage +4. Document both API and implementation details + +### For Bug Fixes +1. Reproduce the issue reliably +2. Understand the root cause completely +3. Fix at the appropriate architectural level +4. Add regression tests to prevent recurrence + +### For Code Reviews +1. Analyze both immediate and long-term implications +2. Verify architectural consistency +3. Ensure proper error handling +4. Check for performance impacts + +Remember: Your strength lies in thorough analysis and systematic problem-solving. Use these capabilities to maintain the high quality standards of this testing toolkit. \ No newline at end of file diff --git a/.github/instructions/gemini.instructions.md b/.github/instructions/gemini.instructions.md new file mode 100644 index 0000000..8f7424a --- /dev/null +++ b/.github/instructions/gemini.instructions.md @@ -0,0 +1,67 @@ +# Gemini Development Instructions + +Instructions specifically for Gemini AI when contributing to the Onchain Test Kit. + +## Gemini's Multimodal Strengths + +Leverage your ability to process multiple information types: + +### Pattern Recognition +- Identify common patterns across wallet implementations +- Recognize opportunities for code consolidation +- Spot inconsistencies in API design +- Find optimization opportunities across the codebase + +### Holistic Understanding +- Consider the entire flow from configuration to test execution +- Understand relationships between browser automation, wallet extensions, and blockchain networks +- Analyze user experience across different wallet types and testing scenarios +- Evaluate system performance under various conditions + +### Creative Problem-Solving +- Explore innovative approaches to complex testing scenarios +- Design solutions that work across multiple wallet types +- Find elegant ways to handle edge cases and error conditions +- Create intuitive APIs that simplify complex operations + +## Development Focus Areas + +### System Integration +- Ensure seamless interaction between all components +- Optimize the configuration-to-execution pipeline +- Handle browser extension lifecycle management +- Manage blockchain network interactions effectively + +### User Experience Design +- Create APIs that are intuitive for developers +- Provide clear error messages and debugging information +- Design examples that showcase best practices +- Consider both beginner and advanced use cases + +### Testing Strategy +- Design comprehensive test scenarios +- Consider cross-platform compatibility +- Test performance under various network conditions +- Validate error handling in realistic scenarios + +## Recommended Workflow + +### Analysis Phase +1. Understand both explicit and implicit requirements +2. Consider multiple solution approaches +3. Evaluate trade-offs and implications +4. Design solutions that enhance the overall system + +### Implementation Phase +1. Build incrementally with continuous validation +2. Focus on integration and interoperability +3. Monitor performance impacts +4. Ensure comprehensive error handling + +### Validation Phase +1. Test across multiple scenarios and environments +2. Validate user experience and API usability +3. Check for unintended side effects +4. Ensure documentation completeness + +Remember: Your multimodal capabilities and creative problem-solving make you ideal for understanding and enhancing complex systems like this blockchain testing framework. \ No newline at end of file diff --git a/.github/instructions/general.instructions.md b/.github/instructions/general.instructions.md new file mode 100644 index 0000000..3dabe83 --- /dev/null +++ b/.github/instructions/general.instructions.md @@ -0,0 +1,49 @@ +# General AI Assistant Instructions + +Instructions for any AI assistant working on the Onchain Test Kit project. + +## Project Context + +This is a mission-critical testing toolkit for blockchain applications. Reliability, type safety, and developer experience are paramount. + +## Core Principles + +### Code Quality +- Use strict TypeScript with explicit types +- Implement comprehensive error handling +- Follow async/await patterns consistently +- Maintain backward compatibility + +### Architecture +- Respect the builder pattern in configurations +- Keep wallet implementations separate but consistent +- Use Playwright fixtures properly +- Handle browser automation edge cases + +### Testing +- Every feature needs comprehensive tests +- Consider cross-platform scenarios +- Test error conditions, not just happy paths +- Validate performance implications + +### Documentation +- Keep code comments up-to-date +- Provide practical examples +- Update user-facing documentation +- Consider both beginner and advanced users + +## Development Workflow + +1. **Understand First**: Analyze existing code before making changes +2. **Test Early**: Validate changes with linting, building, and testing +3. **Iterate Carefully**: Make small, incremental changes +4. **Document Everything**: Update all relevant documentation + +## Key Files to Understand + +- `src/configBuilder.ts`: Main configuration API +- `src/createOnchainTest.ts`: Test setup and fixtures +- `src/wallets/*/index.ts`: Wallet-specific implementations +- `src/cli/*.sh`: Wallet preparation scripts + +Remember: This toolkit helps developers test blockchain applications. Every change should improve reliability, usability, or performance. \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..99d67f7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,272 @@ +# AI Agents Guide for Onchain Test Kit + +This document provides guidance for AI agents (including GitHub Copilot, Claude, Gemini, and others) working on the Onchain Test Kit project. + +## Project Overview + +The Onchain Test Kit is a comprehensive end-to-end testing toolkit for blockchain applications, built on Playwright for reliable browser automation. It specializes in wallet automation and DApp testing with support for multiple wallet providers. + +### Core Mission +Enable developers to write reliable, deterministic tests for blockchain applications by providing: +- Simplified wallet automation +- Fork mode testing against real blockchain data +- Type-safe configuration APIs +- Cross-platform compatibility + +## Universal Guidelines for All AI Agents + +### Code Quality Standards +1. **TypeScript First**: Always use strict TypeScript with explicit typing +2. **Async/Await**: Use modern async patterns consistently +3. **Error Handling**: Implement comprehensive error messages and proper exception handling +4. **Testing**: Every change should include appropriate tests +5. **Documentation**: Keep code comments and user documentation up-to-date + +### Architectural Principles +1. **Builder Pattern**: Use fluent interfaces for configuration APIs +2. **Separation of Concerns**: Keep wallet logic, configuration, and testing separate +3. **Extensibility**: Design for easy addition of new wallets and features +4. **Backward Compatibility**: Avoid breaking changes to public APIs +5. **Performance**: Optimize for test execution speed and developer experience + +### Development Workflow +1. **Analysis First**: Understand the existing codebase before making changes +2. **Incremental Changes**: Make small, testable modifications +3. **Validation**: Use linting, building, and testing to validate changes +4. **Documentation**: Update all relevant documentation + +## Technical Architecture + +### Core Components + +``` +src/ +├── configBuilder.ts # Fluent API for test configuration +├── createOnchainTest.ts # Test creation and fixture management +├── wallets/ # Wallet-specific implementations +│ ├── MetaMask/ # MetaMask automation +│ ├── Coinbase/ # Coinbase Wallet automation +│ └── Phantom/ # Phantom Wallet automation +├── node/ # Local blockchain node management +├── contracts/ # Smart contract utilities +└── cli/ # Wallet preparation scripts +``` + +### Key Technologies +- **Playwright**: Browser automation and testing framework +- **TypeScript**: Type-safe development +- **Viem**: Ethereum TypeScript interface +- **Biome**: Code formatting and linting +- **Anvil**: Local blockchain simulation + +## Common Patterns and APIs + +### Configuration Pattern +```typescript +const config = configure() + .withMetaMask() + .withSeedPhrase({ + seedPhrase: process.env.E2E_TEST_SEED_PHRASE!, + password: 'PASSWORD', + }) + .withNetwork({ + name: 'Base Sepolia', + rpcUrl: 'https://sepolia.base.org', + chainId: 84532, + symbol: 'ETH', + }) + .build(); +``` + +### Test Structure +```typescript +import { createOnchainTest } from '@coinbase/onchaintestkit'; + +const test = createOnchainTest(config); + +test('wallet connection test', async ({ page, metamask, node }) => { + await page.goto('http://localhost:3000'); + await page.click('[data-testid="connect-wallet"]'); + await metamask.handleAction('connect', { shouldApprove: true }); +}); +``` + +### Wallet Actions +```typescript +// Connect to DApp +await metamask.handleAction('connect', { shouldApprove: true }); + +// Handle transaction +await metamask.handleAction('transaction', { shouldApprove: true }); + +// Token approval +await metamask.handleAction('tokenApproval', { + shouldApprove: true, + amount: '1000000000000000000' +}); + +// Network switching +await metamask.handleAction('switchNetwork', { chainId: 1 }); +``` + +## Agent-Specific Considerations + +### For Code Generation Agents +- Follow existing code patterns and naming conventions +- Use the established TypeScript types and interfaces +- Implement proper error handling with descriptive messages +- Add JSDoc comments for public APIs + +### For Code Analysis Agents +- Pay attention to the builder pattern in configuration +- Understand the fixture system used with Playwright +- Consider the lifecycle of wallet extensions and browser contexts +- Analyze error propagation through async operations + +### for Testing Agents +- Focus on both unit tests and integration tests +- Consider edge cases like network failures and wallet errors +- Test cross-browser compatibility when relevant +- Validate fork mode functionality with different blockchain states + +### For Documentation Agents +- Keep technical accuracy as the highest priority +- Provide practical examples for all features +- Maintain consistency with existing documentation style +- Consider both beginner and advanced user scenarios + +## Development Environment Setup + +### Required Tools +```bash +# Node.js version 14 or higher +node --version + +# Package installation +npm install + +# Playwright browsers (automatically installed) +npx playwright install +``` + +### Available Commands +```bash +npm run build # Compile TypeScript +npm run lint # Check code quality +npm run lint:fix # Auto-fix linting issues +npm run format # Format code +npm run test # Run tests +npm run clean # Remove build artifacts + +# Wallet preparation +npm run prepare-metamask +npm run prepare-coinbase +npm run prepare-phantom +``` + +### Environment Variables +```env +E2E_TEST_SEED_PHRASE="test wallet seed phrase (never use real funds)" +ETHEREUM_RPC_URL="https://eth-mainnet.g.alchemy.com/v2/your-api-key" +BASE_RPC_URL="https://mainnet.base.org" +``` + +## Common Development Scenarios + +### Adding New Wallet Support +1. Create wallet directory: `src/wallets/NewWallet/` +2. Implement wallet class extending `BaseWallet` +3. Create Playwright fixtures for the wallet +4. Add configuration builder method +5. Create CLI preparation scripts +6. Update type definitions and exports +7. Add comprehensive tests +8. Update documentation + +### Adding New Action Types +1. Define action type in wallet-specific enum +2. Implement action handler in wallet class +3. Add type definitions and validation +4. Create tests for all supported wallets +5. Update documentation with examples + +### Fork Mode Enhancements +1. Understand existing node management in `src/node/` +2. Consider RPC provider compatibility +3. Handle network switching and block number management +4. Test with different fork scenarios +5. Document performance implications + +### Bug Fixes and Maintenance +1. Reproduce the issue with a minimal test case +2. Trace the issue through the codebase +3. Fix at the root cause level +4. Add regression tests +5. Verify no breaking changes to public APIs + +## Testing Philosophy + +### Reliability First +- Tests should be deterministic and repeatable +- Handle timing issues and race conditions +- Clean up browser state between tests +- Use proper waiting mechanisms + +### Real-World Scenarios +- Test with actual DApp interfaces when possible +- Use fork mode for realistic blockchain interactions +- Consider gas price fluctuations and network congestion +- Validate error handling with real failure scenarios + +### Developer Experience +- Provide clear error messages for configuration issues +- Optimize for fast feedback cycles +- Support parallel test execution +- Make debugging straightforward + +## Security Considerations + +### Test Environment Safety +- Never use real private keys or seed phrases with actual funds +- Isolate test wallets from production environments +- Use environment variables for sensitive configuration +- Validate that fork mode doesn't expose sensitive data + +### Extension Security +- Download wallet extensions from official sources +- Validate extension integrity when possible +- Handle extension updates gracefully +- Consider security implications of automated wallet actions + +## Performance Optimization + +### Test Execution Speed +- Minimize browser startup time +- Reuse contexts when possible +- Optimize network requests in fork mode +- Use parallel execution for independent tests + +### Memory Management +- Clean up browser contexts properly +- Manage local node processes efficiently +- Handle large blockchain state downloads +- Monitor resource usage in CI environments + +## Contributing Guidelines + +### Pull Request Process +1. Ensure all tests pass locally +2. Run linting and formatting +3. Update documentation as needed +4. Provide clear commit messages +5. Include examples for new features + +### Code Review Checklist +- TypeScript compilation without errors +- All tests passing +- Documentation updated +- No breaking changes (or properly versioned) +- Performance impact considered +- Security implications reviewed + +Remember: This toolkit serves the blockchain development community. Prioritize reliability, clear APIs, and comprehensive error handling to help developers build robust DApps with confidence. \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..1a8609b --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,141 @@ +# Claude Instructions for Onchain Test Kit + +This document provides specific context and guidelines for Claude when working on the Onchain Test Kit project. + +## Project Overview + +The Onchain Test Kit is an end-to-end testing toolkit for blockchain applications, powered by Playwright. It provides comprehensive wallet automation and testing capabilities for DApps with support for MetaMask, Coinbase Wallet, and Phantom wallets. + +### Key Technologies +- **TypeScript**: Primary language for type-safe development +- **Playwright**: Browser automation and testing framework +- **Viem**: TypeScript interface for Ethereum with multi-chain support +- **Biome**: Fast formatter and linter (replaces ESLint/Prettier) +- **Node.js**: Runtime environment (minimum version 14.0.0) + +## Claude-Specific Guidelines + +### Code Analysis Approach +Claude excels at understanding complex codebases and architectural patterns. When working with this project: + +1. **Architectural Understanding**: Focus on the builder pattern in `src/configBuilder.ts` and how it creates fluent APIs +2. **Type Safety**: Leverage TypeScript's type system to understand relationships between components +3. **Error Handling**: Pay special attention to async/await patterns and proper error propagation +4. **Testing Patterns**: Understand how Playwright fixtures work with wallet automation + +### Recommended Working Style + +1. **Thorough Analysis**: Before making changes, analyze the entire flow from configuration to test execution +2. **Incremental Changes**: Make small, well-tested changes that maintain backward compatibility +3. **Documentation**: Update both code comments and user-facing documentation +4. **Testing**: Always consider edge cases and error scenarios + +## Core Architecture Components + +### Configuration Builder Pattern +```typescript +// The fluent API allows method chaining for intuitive configuration +const config = configure() + .withMetaMask() + .withSeedPhrase({ seedPhrase: '...', password: '...' }) + .withNetwork({ name: '...', rpcUrl: '...', chainId: 1 }) + .build(); +``` + +### Wallet Integration +- Each wallet (MetaMask, Coinbase, Phantom) has its own directory in `src/wallets/` +- Wallet actions are handled through a common interface with specific implementations +- Browser automation is achieved through Playwright's extension loading capabilities + +### Node Management +- Local Anvil nodes for testing +- Fork mode support for testing against real blockchain data +- Network configuration and lifecycle management + +## Development Workflow + +### Building and Testing +```bash +npm run build # Compile TypeScript +npm run lint # Check code quality with Biome +npm run test # Run Playwright tests +npm run format # Format code +``` + +### Wallet Preparation +```bash +npm run prepare-metamask # Setup MetaMask extension +npm run prepare-coinbase # Setup Coinbase Wallet extension +npm run prepare-phantom # Setup Phantom extension +``` + +## Common Patterns for Claude + +### When Adding New Features +1. **Understand the Context**: Study existing implementations before creating new ones +2. **Follow Patterns**: Use the established builder pattern for configurations +3. **Type Safety**: Ensure all new code is properly typed +4. **Error Handling**: Implement comprehensive error messages and proper exception handling +5. **Testing**: Create both unit tests and integration tests + +### When Debugging Issues +1. **Trace the Flow**: Follow the execution path from configuration through test setup to wallet actions +2. **Check Types**: Verify TypeScript compilation and type compatibility +3. **Test Isolation**: Ensure tests don't interfere with each other +4. **Browser State**: Consider browser extension state and cleanup + +### Code Review Considerations +1. **API Consistency**: Ensure new methods follow existing naming conventions +2. **Backward Compatibility**: Avoid breaking changes to public APIs +3. **Performance**: Consider the impact of changes on test execution time +4. **Documentation**: Update README.md and inline documentation as needed + +## File-Specific Guidelines + +### `src/configBuilder.ts` +- Central configuration API - changes here affect all users +- Maintain fluent interface patterns +- Validate all configuration options +- Provide clear error messages for invalid configurations + +### `src/wallets/*/index.ts` +- Implement wallet-specific action handlers +- Follow the BaseWallet interface consistently +- Handle browser automation edge cases +- Provide comprehensive logging for debugging + +### `src/createOnchainTest.ts` +- Core test setup and fixture management +- Handle initialization errors gracefully +- Support multiple wallet configurations +- Clean up resources properly + +### CLI Scripts (`src/cli/`) +- Cross-platform compatibility is essential +- Provide clear progress indicators +- Handle download failures gracefully +- Support offline development when possible + +## Testing Philosophy + +This is a testing toolkit, so reliability is paramount: +- **Deterministic**: Tests should be reproducible across environments +- **Isolated**: Each test should be independent +- **Fast**: Optimize for quick feedback cycles +- **Comprehensive**: Cover happy path, error cases, and edge conditions + +## Environment Considerations + +### Development Environment +- Node.js >= 14.0.0 +- Playwright browsers installed +- Proper environment variables configured +- RPC endpoints available for fork mode testing + +### CI/CD Considerations +- Browser installation in containerized environments +- Secrets management for test wallets +- Parallel test execution +- Artifact cleanup + +Remember: Claude's strength lies in understanding complex systems and relationships. Use this to provide thorough analysis and well-architected solutions that fit seamlessly into the existing codebase. \ No newline at end of file diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 0000000..4f1027f --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,200 @@ +# Gemini Instructions for Onchain Test Kit + +This document provides specific context and guidelines for Gemini when working on the Onchain Test Kit project. + +## Project Overview + +The Onchain Test Kit is an end-to-end testing toolkit for blockchain applications, powered by Playwright. It provides comprehensive wallet automation and testing capabilities for DApps with support for MetaMask, Coinbase Wallet, and Phantom wallets. + +### Key Technologies +- **TypeScript**: Primary language for type-safe development +- **Playwright**: Browser automation and testing framework +- **Viem**: TypeScript interface for Ethereum with multi-chain support +- **Biome**: Fast formatter and linter (replaces ESLint/Prettier) +- **Node.js**: Runtime environment (minimum version 14.0.0) + +## Gemini-Specific Guidelines + +### Multimodal Understanding +Gemini's strength in processing multiple types of information can be leveraged for: + +1. **Code and Documentation**: Simultaneously analyze code structure and documentation to understand intent +2. **Visual Testing**: When working with UI components and browser automation, consider visual elements +3. **Pattern Recognition**: Identify patterns across different wallet implementations and testing scenarios +4. **Cross-Reference Analysis**: Connect configuration options with their implementation and testing + +### Problem-Solving Approach + +1. **Holistic View**: Consider the entire ecosystem from configuration to execution +2. **Multiple Perspectives**: Think about developer experience, testing reliability, and maintenance +3. **Creative Solutions**: Explore innovative approaches to complex testing scenarios +4. **Integration Focus**: Ensure all components work harmoniously together + +## Architecture Deep Dive + +### Configuration Builder System +The fluent API design allows for intuitive test configuration: + +```typescript +const config = configure() + .withMetaMask() + .withSeedPhrase({ + seedPhrase: process.env.E2E_TEST_SEED_PHRASE!, + password: 'PASSWORD', + }) + .withNetwork({ + name: 'Base Sepolia', + rpcUrl: 'https://sepolia.base.org', + chainId: 84532, + symbol: 'ETH', + }) + .build(); +``` + +### Wallet Automation Framework +Each wallet has specific automation needs: +- **MetaMask**: Extension-based with popup handling +- **Coinbase Wallet**: Similar to MetaMask but different UI patterns +- **Phantom**: Solana-focused with unique transaction flows + +### Testing Infrastructure +- **Playwright Integration**: Browser automation and test execution +- **Local Node Management**: Anvil for blockchain simulation +- **Fork Mode**: Real blockchain data testing +- **Fixture System**: Test setup and teardown + +## Development Best Practices for Gemini + +### Code Quality +1. **Type Safety**: Utilize TypeScript's full potential for error prevention +2. **Async Patterns**: Properly handle asynchronous operations with async/await +3. **Error Handling**: Implement comprehensive error catching and reporting +4. **Code Reuse**: Identify and extract common patterns into utilities + +### Testing Strategy +1. **Comprehensive Coverage**: Test happy paths, edge cases, and error conditions +2. **Isolation**: Ensure tests don't depend on each other +3. **Reproducibility**: Make tests deterministic and environment-independent +4. **Performance**: Optimize for fast feedback cycles + +### Documentation +1. **Code Comments**: Explain complex logic and business rules +2. **API Documentation**: Keep public interfaces well-documented +3. **Examples**: Provide clear usage examples for common scenarios +4. **Migration Guides**: Help users upgrade between versions + +## Gemini's Analytical Strengths + +### Pattern Analysis +When working on this project, use pattern recognition to: +- Identify common wallet interaction patterns +- Spot inconsistencies across different implementations +- Find opportunities for code consolidation +- Recognize testing patterns that can be generalized + +### System Integration +Consider how components interact: +- Configuration → Test Setup → Wallet Actions → Verification +- Browser Extensions ↔ Web Applications ↔ Blockchain Networks +- Development Tools ↔ CI/CD ↔ Production Testing + +### Problem Decomposition +Break down complex issues: +1. **Root Cause Analysis**: Trace problems to their source +2. **Impact Assessment**: Understand how changes affect the entire system +3. **Solution Design**: Create comprehensive solutions that address all aspects +4. **Risk Evaluation**: Consider potential side effects and mitigation strategies + +## Advanced Features and Considerations + +### Fork Mode Testing +```typescript +const config = configure() + .withLocalNode({ + fork: 'https://eth-mainnet.g.alchemy.com/v2/your-api-key', + forkBlockNumber: 18500000, // Specific block for reproducibility + chainId: 1, + }) + .withMetaMask() + .build(); +``` + +Benefits: +- Test against real contract state +- Validate with actual liquidity and market conditions +- Ensure compatibility with production environments + +### Multi-Wallet Scenarios +Consider testing scenarios that involve: +- Wallet switching within a single test +- Different wallets for different user roles +- Cross-wallet compatibility testing +- Performance comparison between wallets + +### Network Management +- Dynamic network configuration +- Chain switching during tests +- Gas optimization testing +- Network failure simulation + +## Gemini-Specific Development Workflow + +### Analysis Phase +1. **Understand Requirements**: Analyze both explicit and implicit needs +2. **Study Existing Code**: Examine patterns and architectural decisions +3. **Identify Constraints**: Consider technical and business limitations +4. **Plan Architecture**: Design solutions that fit the existing system + +### Implementation Phase +1. **Incremental Development**: Build features step by step +2. **Continuous Testing**: Validate changes at each step +3. **Integration Focus**: Ensure new code works with existing systems +4. **Performance Monitoring**: Watch for impacts on test execution time + +### Validation Phase +1. **Comprehensive Testing**: Test all affected functionality +2. **Documentation Updates**: Ensure all changes are documented +3. **Example Creation**: Provide usage examples for new features +4. **Migration Support**: Help users adapt to changes + +## Special Considerations + +### Browser Automation Complexity +- Extension loading and initialization +- Popup window management +- iframe and context switching +- Timing and synchronization issues + +### Blockchain-Specific Challenges +- Network connectivity and reliability +- Transaction confirmation times +- Gas price fluctuations +- Contract interaction complexity + +### Cross-Platform Compatibility +- Operating system differences +- Browser version variations +- Node.js environment differences +- CI/CD pipeline considerations + +## Contributing Guidelines for Gemini + +### Code Review Process +1. **Holistic Review**: Consider code quality, architecture, and user impact +2. **Testing Verification**: Ensure adequate test coverage +3. **Documentation Check**: Verify documentation completeness +4. **Performance Assessment**: Evaluate impact on execution time + +### Feature Development +1. **Requirements Analysis**: Understand the complete picture +2. **Design Discussion**: Collaborate on architectural decisions +3. **Implementation Strategy**: Plan incremental development +4. **Testing Strategy**: Design comprehensive test scenarios + +### Maintenance Tasks +1. **Dependency Updates**: Handle version upgrades carefully +2. **Bug Fixes**: Address root causes, not just symptoms +3. **Performance Optimization**: Improve without breaking functionality +4. **Security Updates**: Maintain security best practices + +Remember: Gemini's multimodal capabilities and analytical strength make it ideal for understanding complex systems like this testing framework. Use these capabilities to provide comprehensive, well-reasoned solutions that consider all aspects of the system. \ No newline at end of file