Skip to content
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9711ce8
chore(gradle): remove xmlpull and document update issues
xeruf May 24, 2022
ad02e05
chore(gradle): update to gradle 7
xeruf May 6, 2021
1f83f6e
build: some fixes
xeruf Sep 24, 2025
29351f4
build(gradle): update gradle, kotlin, dokka
xeruf Feb 4, 2026
367bc9c
docs: suppress companion objects in javadoc
xeruf Feb 4, 2026
976ae1a
docs(gradle): proper module naming
xeruf Feb 4, 2026
b521dbb
docs(gradle): also generate dokka html
xeruf Feb 5, 2026
12b0102
docs(plugin26): add and translate user documentation
xeruf Feb 5, 2026
6f6421f
build(gradle): simplify custom dokka publication config
xeruf Feb 5, 2026
1582ab3
docs(gradle): fix dokka sidebar links and standardize output directories
xeruf Feb 5, 2026
88382aa
docs(plugin26): document all classes and methods
xeruf Feb 5, 2026
7dbfe73
docs(plugin26): document all enums
xeruf Feb 5, 2026
7dfa541
refactor: create consistent plugins folder structure as games
xeruf Feb 5, 2026
6dc5e8b
build(gradle): extract shared test-config module
xeruf Feb 17, 2026
3ff416b
build(gradle): use runtimeClasspath and task inputs
xeruf Feb 17, 2026
19b43a2
test(server): handle mixed messages in listener
xeruf Feb 17, 2026
f964cb9
fix(plugin26): avoid transient hash checks for observers
xeruf Feb 17, 2026
a3fcfd8
build: fix sdk javadoc publish and assert java+kotlin docs
xeruf Feb 17, 2026
73e6417
build: split integration and release workflows into gradle scripts
xeruf Feb 17, 2026
3ab73e7
docs(contributing): Add AGENTS cleanup planning and ignore plans dire…
xeruf Feb 17, 2026
b5cd7f5
docs(contributing): restore agent formatting and maintenance policies
xeruf Feb 17, 2026
536bd2c
build: move jvm conventions to separate gradle script
xeruf Feb 17, 2026
d72a7ce
build: eliminate gradle and kotlin warning sources
xeruf Feb 17, 2026
467c137
test: deduplicate await helpers and restore fibonacci backoff
xeruf Feb 17, 2026
afa8a4b
build(ci): update github actions gradle workflow
Feb 21, 2026
add7020
docs(agents): clarify gradle home and commit hook rules
Feb 21, 2026
598090c
build(ci): restore matrix and upload diagnostics artifacts
Feb 21, 2026
5353232
build(gradle): rename and simplify docs aggregation tasks
Feb 21, 2026
ed3dc70
build(gradle): align integration outputs with build/reports
Feb 21, 2026
fa5b5ad
docs(gradle): add kotlin dsl alternative and maintenance comparison
Feb 21, 2026
c00ec0b
build(server): move test-client flag handling to configuration phase
Feb 21, 2026
9a35172
build(gradle): migrate jvm conventions to kotlin dsl
Feb 21, 2026
4989429
docs(readme): update markdown docs for current layout
Feb 21, 2026
93668b0
fix(server): avoid eager cross-project task lookup in bundle
Feb 21, 2026
1ed7e62
fix(gradle): enforce kotlin jdk release for runtime compatibility
Feb 22, 2026
29263ad
build(gradle): simplify jdk target config
Feb 22, 2026
3f39b09
docs: fix tiny leftover artifacts
Feb 22, 2026
48f20a6
fix(server): stabilize network tests on windows
Feb 22, 2026
48cd09d
fix(gradle): redirect testTestClient process logs
Feb 22, 2026
aea2df7
fix(server): allow longer async message waits
Feb 22, 2026
ba2a1a8
fix(plugin24): reset violations before regular result assertion
Feb 22, 2026
648358e
refactor(server): centralize admin auth wait in test helper
Feb 22, 2026
c390729
build(gradle): revert to gradle 8 to preserve jdk 8 support
Mar 2, 2026
186accd
build(gradle): fix gradle config for gradle 8
Mar 2, 2026
87b8715
build(gradle): fix task output collisions
Mar 3, 2026
e4214d4
style: fix code warnings
Mar 3, 2026
9985618
build(ci): use highest supported jdk 24
Mar 3, 2026
d5ae974
build(gradle): upgrade logback to 1.5
Mar 3, 2026
a328c41
build(player): downgrade player shadow plugin to 8.3.10
Mar 19, 2026
1167bbd
build(ci): run pipeline with supported lts jdk versions
Mar 19, 2026
4727126
refactor: correct folder name for old hive from blokus
Mar 19, 2026
d41ec23
build(gradle): small dependency version unifications
Mar 31, 2026
8ab0c05
fix(server): correctly assert violation if a player did not join
Apr 2, 2026
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
3 changes: 2 additions & 1 deletion .dev/scopes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# docs
readme
contributing
agents
# chore
git
gradle
Expand All @@ -25,4 +26,4 @@ network
logging

Game
Board
Board
104 changes: 63 additions & 41 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,76 @@
on: [push, pull_request, create]
name: CI

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
os: [ubuntu-latest] #, windows-latest, macos-latest]
jdk: [8]
os: [ubuntu-latest, windows-latest, macos-latest]
jdk: [11, 24]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
cache: 'gradle'
#- name: Cache Gradle packages
# uses: actions/cache@v4
# with:
# path: [~/.gradle/caches, ~/.gradle/wrapper]
# key: ${{ matrix.os }}-gradle-jdk${{ matrix.jdk }}-${{ hashFiles('**/*.gradle.kts') }}
# restore-keys: ${{ matrix.os }}-gradle-jdk${{ matrix.jdk }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: List Files
run: find -maxdepth 1 -type d
- name: Execute tests
run: ./gradlew clean check || ( exitcode=$?; find build/tests -name '*.log' -type f | while read f; do echo -e "\033[4m$f\033[0m"; cat $f; done && exit $exitcode; )
- name: Bundle Artifacts
run: ./gradlew bundle
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: software-challenge-backend-${{ github.sha }}
path: |
build/bundle/*.zip
build/bundle/*.jar
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build, verify and bundle
run: ./gradlew --no-daemon clean check bundle
- name: Prepare CI diagnostics artifact
if: always()
shell: bash
run: |
{
echo "Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo "Job: ${{ github.job }}"
echo "OS: ${{ matrix.os }}"
echo "JDK: ${{ matrix.jdk }}"
echo "SHA: ${{ github.sha }}"
} > ./build/reports/ci-info.txt
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.os }}-jdk${{ matrix.jdk }}-${{ github.sha }}
if-no-files-found: warn
path: |
./build/reports/ci-info.txt
**/build/reports/**/*
**/build/test-results/**/*
- name: Upload bundle artifacts
uses: actions/upload-artifact@v4
with:
name: software-challenge-backend-${{ matrix.os }}-jdk${{ matrix.jdk }}-${{ github.sha }}
path: |
build/bundle/*.zip
build/bundle/*.jar

release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4 # https://github.com/actions/download-artifact
with:
name: software-challenge-backend-${{ github.sha }}
path: artifacts
- name: Release ${{ github.ref }}
uses: softprops/action-gh-release@v1 # https://github.com/softprops/action-gh-release
with:
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
with:
pattern: software-challenge-backend-*-${{ github.sha }}
path: artifacts
merge-multiple: true
- name: Release ${{ github.ref }}
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ out/
# Artifacts from test runs
logs/
log/
replays/
replays/
plans/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was ist in plans?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

das ist für agentic coding

1 change: 1 addition & 0 deletions .old-plugins/blokus_2020/Board.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ data class Board(

fun getFieldsOwnedBy(owner: PlayerColor): List<Field> = fields.filter { it.owner == owner }

/** @suppress */
companion object {
private const val SHIFT = (Constants.BOARD_SIZE - 1) / 2

Expand Down
1 change: 1 addition & 0 deletions .old-plugins/blokus_2020/GameState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class GameState @JvmOverloads constructor(
return result
}

/** @suppress */
companion object {
fun parsePiecesString(s: String, p: PlayerColor): ArrayList<Piece> {
val l = ArrayList<Piece>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum class FieldState {
else -> ' '
}

/** @suppress */
companion object {
@JvmStatic
fun from(color: PlayerColor): FieldState {
Expand Down
168 changes: 168 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Repository Guidelines

## Project Specifics
### Structure & Modules
This repository is a multi-module Gradle project for the Software Challenge backend.

- `sdk/`: shared protocol, framework, networking, and player/server API classes.
- `server/`: game server application (`sc.server.Application`).
- `player/`: default player template and packaging tasks.
- `games/`: yearly plugins mapped as modules (`plugin2023`..`plugin2026`).
- `helpers/test-client` and `helpers/test-config`: integration tooling and shared test setup.
- `gradle/` and `gradlew`: build logic and wrapper.

### Build, Test & Development Commands
Use the Gradle wrapper from repo root.
Always use the default Gradle user home from the environment; do not pass a custom home (no `-g ...`, no overridden `GRADLE_USER_HOME`).

- `./gradlew build`: compile, test, and create distribution bundles.
- `./gradlew check`: run verification tasks across modules.
- `./gradlew test`: run unit tests.
- `./gradlew integrationTest`: run end-to-end game/test-client checks.
- `./gradlew :server:run`: start server from source.
- `./gradlew :player:run`: start default player.
- `./gradlew bundle`: assemble release ZIP artifacts.

For module-scoped work, use qualified tasks (example: `./gradlew :plugin2026:test`).

### Coding Style & Naming
Primary languages are Kotlin and Java, but all new code must be written in Kotlin.

- Follow existing module style and keep changes consistent with surrounding code.
- Use clear domain names (`GameState`, `Move`, `...Request`, `...Response`).
- Keep package naming aligned with module/year conventions (example: `sc.plugin2026`).
- Prefer descriptive test names ending in `Test` (example: `GameRuleLogicTest.kt`).
- No repository-wide formatter is enforced in Gradle; run IDE reformat with project defaults.

## General Workflow Policies
- Follow commit/changelog/test/lint/refactor/process rules in this file for all AI-assisted changes.
- Keep edits focused, reviewable, and behavior-safe unless intentional behavioral changes are requested.

### Testing & Verification
- Tests are mainly Kotest (`WordSpec` preferred, `FunSpec` for algorithmic cases) on JUnit 5; some legacy JUnit 5 tests remain.
- Place new tests under `src/test/kotlin`.
- Name test files `*Test.kt`.
- Write tests before each change except minor cosmetic-only changes.
- Verify tests after each change.
- For server-player interaction or protocol changes, run `./gradlew integrationTest`.
- Before adjusting failing tests, evaluate whether failures indicate regressions versus intentional behavior changes.
- Prefer behavior/outcome tests over implementation-detail tests.

### Commit & PR Discipline
- Always commit every completed change.
- Use commit messages in format `type(scope): summary` (example: `fix(plugin26): avoid transient hash checks for observers`).
- Enable local hooks: `git config core.hooksPath .dev/githooks`.
- Commit format is enforced by hook: `type(scope): summary`.
- Allowed types are: `fix`, `feat`, `enhance`, `docs`, `style`, `refactor`, `test`, `build`, `rework`, `release`, `revert`.
- Prefer branch names like `feat/server/login` or `chore/gradle/release-fix`.
- For PRs, include: concise description, linked issue(s), test evidence (commands/results), and logs/screenshots when behavior/output changed.
- Use rebase merge when commits are independently valid; otherwise squash merge with PR title matching final commit message.
- Make atomic commits; if a commit only fixes the previous local commit, squash before handoff.

### Changelog & Refactoring
- Keep `CHANGELOG.md` updated for notable user-visible behavior changes.
- Keep an `Unreleased` section at top; move entries into versioned section on release.
- Use semantic version sections and ISO dates (`YYYY-MM-DD`).
- After major milestones, run a focused refactor pass for duplication, consistency, and complexity.
- Prefer separate `refactor:` commits for cleanup when functionality does not depend on refactor changes.

## Agent-Specific Instructions
### Machine-Readable Policy
```yaml
agent_policy:
source_of_truth:
- CONTRIBUTING.md
- GUIDELINES.md
- settings.gradle.kts
setup:
git_hooks: "git config core.hooksPath .dev/githooks"
project:
build_system: gradle
new_code_language: kotlin
modules:
- sdk
- server
- player
- plugin2023
- plugin2024
- plugin2025
- plugin2026
- test-client
- test-config
verification:
default: "./gradlew test"
interaction_or_protocol: "./gradlew integrationTest"
test_file_patterns:
- "src/test/kotlin/**/*Test.kt"
commit:
format: "type(scope): summary"
scopes_file: ".dev/scopes.txt"
merge:
rebase_if_independent: true
squash_if_experimental: true
constraints:
- "Do not create new Java source files."
- "Do not create new Java test files."
```

### Prompt Effort Modes
```yaml
prompt_effort:
quick:
- "Minimize testing/refactoring; run focused checks only."
- "Defer broader cleanup unless explicitly requested."
long:
- "Run thorough workflow with broader verification and edge-case checks."
- "Include refactor/debt review where appropriate."
default:
- "Choose balanced effort based on task complexity and risk."
```

### Special Commands
```yaml
special_commands:
squash:
- "Inspect recent commits and propose sensible squashes for repetitive fixups."
- "Do not squash unrelated functional changes."
- "Rewrite only unpushed local history unless explicitly instructed."
push:
- "List unpushed commits: git log origin/<branch>..HEAD --oneline"
- "Provide one high-level summary across unpushed commits."
- "Update changelog/version/tag only when explicitly requested."
- "Ask explicit confirmation before pushing branch or tags."
```

### Assistant Response Formatting
```yaml
assistant_response_formatting:
summary:
- "Keep summaries compact and scannable."
- "Prefer single-line status items when content fits."
- "Avoid repetitive progress boilerplate."
commit_reporting_format: "✅ <hash> <type>: <message>"
status_indicators:
success: "✅"
warning: "⚠️"
failure: "❌"
diagnostics: "🔍"
verification: "🧪"
style:
- "Prefer concise bullets over verbose prose."
- "Use status indicators consistently."
```

### Plans & Artifacts
```yaml
planning:
when_user_requests_plan:
- "Write plan files to plans/ at repo root."
- "Use descriptive kebab-case filenames."
- "Do not commit plan files unless explicitly requested."
after_implementation:
- "Delete the corresponding plan file after implementation is complete."
- "Before deleting untracked text artifacts (for example files in plans/), run git add on them once without committing so they are recoverable via index/reflog if deletion was a mistake."
```

### AGENTS Maintenance
- When the user gives new standing workflow/process instructions, update `AGENTS.md` in the same session.
- Keep updates concise and place them in the most relevant existing section (create a new section only when needed).
20 changes: 14 additions & 6 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This document captures development standards and architecture decisions of this project as a point of reference.

## Gradle

We build everything with Gradle, nesting projects if needed.
Current toolchain: Gradle 9.3, Java 25 toolchain (bytecode target 8), Kotlin 2.3, Dokka 2.1.

Dokka v2 generates Javadoc per project (Javadoc is still alpha and does not support multi-project aggregation),
so we generate per-module docs and collect them during bundling.

## Testing

Unsere Unittests nutzen das [Kotest-Framework](https://kotest.io)
Expand Down Expand Up @@ -58,7 +66,7 @@ annotate the serialized fields with a concrete type instead.
Ideally these fields should then be private with generically typed getters
as to not expose the implementation details internally.

## Cloning
## Object Cloning

Relevant discussion: https://github.com/software-challenge/backend/pull/148

Expand All @@ -80,10 +88,11 @@ We recently introduced the use of the
to make some year-specific implementations from the plugin accessible in the sdk and server.

Currently there are two interfaces,
[IGamePlugin](sdk/src/server-api/sc/api/plugins/IGamePlugin.java)
and [XStreamProvider]( sdk/src/server-api/sc/networking/XStreamProvider.kt),
which are implemented in the plugin and then loaded through a ServiceLoader.
The information which implementations to use resides in [resources/META-INF/services](plugin/src/resources/META-INF/services).
[IGamePlugin](sdk/src/server-api/sc/api/plugins/IGamePlugin.java)
and [XStreamProvider](sdk/src/server-api/sc/networking/XStreamProvider.kt),
which are implemented in the yearly game plugin and then loaded through a ServiceLoader.
The information which implementations to use resides in each plugin module under
`src/main/resources/META-INF/services` (for example `games/piranhas/src/main/resources/META-INF/services`).

## Networking Protocol Classes

Expand All @@ -109,4 +118,3 @@ and is then wrapped in a [RoomPacket](sdk/src/server-api/sc/protocol/room/RoomPa

The package contains a few standard messages,
but most will be implemented in the corresponding plugin.

Loading
Loading