Skip to content

Commit e41cf01

Browse files
LarsEckartAmp
andcommitted
Update Agent.md with comprehensive project documentation
- Add development server commands and web/CLI mode instructions - Include detailed testing conventions and patterns - Document hexagonal architecture and key dependencies - Add environment variables and configuration details - Fix co-author attribution to use Amp instead of Claude Co-authored-by: Amp <amp@sourcegraph.com>
1 parent 59dee32 commit e41cf01

1 file changed

Lines changed: 41 additions & 4 deletions

File tree

Agent.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Code Editing Agent Java
22

33
## Commands
4-
- **Build**: `./gradlew build` (includes fatJar)
5-
- **Test**: `./gradlew test`
4+
- **Build**: `./gradlew build` (includes fatJar creation)
5+
- **Test**: `./run_tests.sh` (runs tests with formatted output)
66
- **Single test**: `./gradlew test --tests "ClassName"`
7-
- **Run**: `./gradlew run`
7+
- **Run CLI mode**: `./gradlew run` (default)
8+
- **Run Web mode**: `./gradlew run -Dapp.mode=web`
89
- **Clean**: `./gradlew clean`
910

11+
## Development Server
12+
- **Start dev server**: `./dev-server.sh start` (web mode with hot reloading)
13+
- **Stop dev server**: `./dev-server.sh stop`
14+
- **Check status**: `./dev-server.sh status`
15+
- **View logs**: `./dev-server.sh logs`
16+
1017
## Code Style Guidelines
1118
- **Package**: Use `com.larseckart` root package
1219
- **Imports**: Group imports (standard library, third-party, then local), alphabetically within groups
@@ -18,4 +25,34 @@
1825
- **Testing**: Use JUnit 5 (`@Test`, no public methods needed)
1926
- **Dependencies**: Add to `gradle/libs.versions.toml` first, reference in build.gradle.kts
2027
- **Main class**: `com.larseckart.App`
21-
- **Java version**: 21 (configured in toolchain)
28+
- **Java version**: 24 (configured in toolchain)
29+
30+
## Testing Conventions
31+
- **Test classes**: End with `Test` suffix (e.g., `ReadFileToolTest`)
32+
- **Display names**: Use `@DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)`
33+
- **Test methods**: Use snake_case format (e.g., `should_handle_empty_file()`)
34+
- **Error tests**: Use `should_throw_exception_for_*` pattern
35+
- **Validation tests**: Use `should_validate_required_parameters()` pattern
36+
- **Platform-specific**: Use `@DisabledOnOs(OS.WINDOWS)` instead of manual OS detection
37+
38+
## Architecture
39+
- **Core**: Business logic in `core/` package (services, domain, ports)
40+
- **Adapters**: I/O implementations in `adapters/` (cli, web)
41+
- **Tools**: File operations in `core/tools/` (ReadFileTool, EditFileTool, ListFilesTool)
42+
- **Hexagonal Architecture**: Clear separation between business logic and I/O
43+
44+
## Key Dependencies
45+
- **Anthropic Java SDK**: `com.anthropic:anthropic-java:2.0.0`
46+
- **Spring Boot**: `3.5.0` (for web mode)
47+
- **JUnit 5**: For testing
48+
- **Jackson**: For JSON handling
49+
50+
## Environment Variables
51+
- **API Key**: `code_editing_agent_api_key` - Required for Claude API access
52+
- **App Mode**: `app.mode=web` - Optional, defaults to CLI mode
53+
54+
## Git Commits
55+
- **Co-author**: Add yourself as co-author to all commits we make using:
56+
```
57+
Co-authored-by: Amp <amp@sourcegraph.com>
58+
```

0 commit comments

Comments
 (0)