AI-powered development assistant for Browser4, a lightning-fast coroutine-safe browser framework. Handles Maven builds, Kotlin/Java code, browser automation, and testing workflows.
AI-powered development assistant for the Browser4 project, a lightning-fast, coroutine-safe browser framework built with Kotlin and Maven.
This skill provides comprehensive guidance for AI-assisted development on the Browser4 multi-module Maven project. It enforces repository conventions, build workflows, testing standards, and code quality principles.
**Project Type**: Multi-module Maven project
**Primary Language**: Kotlin (with Java interop)
**Build Tool**: Maven wrapper (`./mvnw` or `mvnw.cmd`)
**Default Port**: 8182
Follow these guiding principles for all code changes:
1. **最小改动 (Minimal changes)** - Make the smallest change that achieves the goal
2. **保持风格 (Maintain existing style)** - Match the existing code style and patterns
3. **清晰日志 (Clear logging)** - Use structured logging with placeholders, not string concatenation
4. **自动校验与测试 (Automated validation and testing)** - Ensure builds and tests pass
**Linux/macOS**:
```bash
./mvnw -q -DskipTests
```
**Windows (cmd)**:
```cmd
mvnw.cmd -q -DskipTests
```
**Build Scripts**:
**Test Core Module** (Linux/macOS):
```bash
./mvnw -pl pulsar-core -am test -Dsurefire.failIfNoSpecifiedTests=false
```
**Test Core Module** (Windows):
```cmd
mvnw.cmd -pl pulsar-core -am test -D"surefire.failIfNoSpecifiedTests=false"
```
**Important**: Windows requires quoting `-D` parameters with dots: `-D"key.with.dots=value"`
The project consists of these key modules:
**Format**: See `docs/log-format.md`
**Best Practice** - Use placeholders:
```kotlin
logger.info("Task {} finished in {} ms", taskId, cost)
```
**Avoid** - String concatenation:
```kotlin
// DON'T DO THIS
logger.info("Task " + taskId + " finished in " + cost + " ms")
```
1. **Use immutable data classes** where possible
2. **Explicit return types** for public functions
3. **Null safety**: Use `require()`, `check()`, and `?:` operator
4. **KDoc comments** for all public APIs:
- Summary
- `@param` for parameters
- `@return` for return values
- `@throws` for exceptions
Before marking any task complete, ensure:
1. ✅ **Build passes**: All relevant tests pass with no new high-noise logs/warnings
2. ✅ **Test coverage**: New/changed logic has main path + at least 1 edge case
3. ✅ **Security**: No committed secrets/private endpoints; inputs are validated
4. ✅ **Dependencies**: No arbitrary version drift (follow parent BOM)
5. ✅ **Documentation**: Public behavior/config changes are documented
6. ✅ **Performance**: Provide assessment or benchmark for potential impacts (>≈5%)
**Linux/macOS - mvnw permission denied**:
```bash
chmod +x mvnw
```
**JDK version mismatch**: Ensure you're using the JDK version specified in the repository
**Windows parameter escaping**: Use quotes for dotted properties:
```cmd
-D"key.with.dots=value"
```
**Port conflict (default 8182)**: Override with `server.port` config
When working on Browser4, consult these key documents:
When implementing changes:
1. **Understand the requirement** - Review related docs and existing code
2. **Make minimal changes** - Follow the 最小改动 principle
3. **Maintain style** - Match existing Kotlin/Java patterns
4. **Add tests** - Cover main path + edge cases
5. **Check build** - Run relevant Maven commands
6. **Verify logs** - Ensure structured logging with placeholders
7. **Update docs** - If public APIs or configs changed
8. **Review checklist** - Confirm all Definition of Done items
When Aider asks "What would you like to change?", you can request:
This skill will ensure all changes follow Browser4's conventions, build correctly, and maintain quality standards.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/browser4-aider-development-assistant/raw