Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions Agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Agents.md

> AI-friendly project context for `cvictory/tools`. Include this file when using AI coding assistants.

## Project Overview

`cvictory/tools` is a personal Java monorepo for learning, experimenting, and collecting reusable utilities. It contains algorithm exercises, Java language feature studies, small web services, and dev-tool snippets.

- **Owner**: cvictory
- **Primary language**: Java 8
- **Build tool**: Maven (multi-module)
- **Group ID**: `com.cvictory.javatest` (parent), submodules vary

## Module Structure

| Module | Path | Purpose |
|--------|------|---------|
| `algorithm` | `algorithm/` | Algorithm exercises, mainly dynamic programming (stock problems, LIS, edit distance, min path, etc.) |
| `jersey-web` | `jersey-web/` | Minimal Jersey (JAX-RS) REST web service with embedded server |
| `spring.boot` | `spring.boot/` | Spring Boot experiments |
| `study` | `study/` | Java language deep-dive: lambda, concurrent programming, JVM bytecode, classloader |
| `tools` | `tools/` | Small utilities: Unicode conversion, XML formatting |
| `victory-spring-boot-docker` | `victory-spring-boot-docker/` | Spring Boot 2.1.9 demo with Docker support (Spotify docker-maven-plugin) |

## Tech Stack

- **JDK**: 1.8
- **Maven**: 3.x (parent POM at root)
- **Spring Boot**: 2.1.9.RELEASE (in `victory-spring-boot-docker`)
- **JAX-RS / Jersey**: 2.x (in `jersey-web`)
- **Docker**: `docker-maven-plugin` 1.2.1
- **IDE**: IntelliJ IDEA (`.idea/` committed)

## Build & Run

```bash
# Build all modules
mvn clean install

# Build Docker image in victory-spring-boot-docker
mvn clean package docker:build

# Build and push Docker image
mvn clean package docker:build -DpushImage
```

## Package Conventions

- Study / algorithm code: `com.cvictory.javatest.*`
- Tools: `com.alibaba.cvictory.tools.*`
- Jersey web: `com.cvictory.test.jersey`
- Docker demo: `com.cvictory.docker.victoryspringbootdocker`

## Key Files for Context

- `pom.xml` — root parent POM (modules list, compiler plugin)
- `victory-spring-boot-docker/pom.xml` — Spring Boot + Docker plugin config
- `victory-spring-boot-docker/Dockerfile` — Docker image definition
- `.idea/` — IntelliJ project settings (checkstyle-idea, encodings, etc.)

## Notes for AI Assistants

1. **Java 8 only** — do not introduce Java 9+ features (e.g., `var`, `List.of`, new `Optional` methods).
2. **Maven modules are independent** — changes in `study/` or `algorithm/` usually do not affect `victory-spring-boot-docker/`.
3. **`.idea/` is tracked** — if modifying IDE configs, keep them compatible with IntelliJ and match existing style.
4. **Tests are sparse** — many modules have minimal or no tests. When adding code, prefer adding a small test or main-method runner over nothing.
5. **No framework enforcement across modules** — each module uses its own stack. Do not assume Spring Boot exists in `algorithm/` or `study/`.
6. **Keep it simple** — this is a learning / tool repo. Avoid over-engineering (no need for full DDD, complex abstractions, or heavy frameworks in small utilities).