From fa01583199fe0fcbd02d2b10e1d4e37bd5d278d2 Mon Sep 17 00:00:00 2001 From: Cairn Date: Fri, 22 May 2026 16:13:04 +0200 Subject: [PATCH] meta: CODEOWNERS, PR template, issue forms, SECURITY.md, CONTRIBUTING.md --- .github/CODEOWNERS | 2 + .github/ISSUE_TEMPLATE/bug_report.yml | 43 ++++++++++ .github/ISSUE_TEMPLATE/feature_request.yml | 23 +++++ .github/PULL_REQUEST_TEMPLATE.md | 11 +++ CONTRIBUTING.md | 98 ++++++++++++++++++++++ SECURITY.md | 15 ++++ 6 files changed, 192 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..7be36f4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# All files — Benjamin is the default reviewer for every PR +* @benjamineckstein diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..0f4915c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,43 @@ +name: Bug Report +description: Something broke or behaves unexpectedly +labels: ["bug"] +body: + - type: textarea + id: what_happened + attributes: + label: What happened? + description: Describe the bug clearly. + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: How can we reproduce the issue? + placeholder: | + 1. Open the game + 2. Place a residential zone + 3. ... + + - type: textarea + id: expected + attributes: + label: Expected behaviour + description: What should have happened instead? + + - type: dropdown + id: where + attributes: + label: Where did it happen? + options: + - Godot game window + - Headless runner / CLI + - Simulation logic (Core) + - Other + + - type: input + id: version + attributes: + label: Loopolis version / commit + placeholder: "e.g. main@abc1234" diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..872e678 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: Feature Request +description: Suggest a new mechanic or improvement +labels: ["enhancement"] +body: + - type: textarea + id: feature + attributes: + label: What would you like to see? + description: Describe the feature or improvement you have in mind. + validations: + required: true + + - type: textarea + id: why + attributes: + label: Why would this improve the game? + description: What problem does it solve or what fun does it add? + + - type: textarea + id: implementation + attributes: + label: Any implementation ideas? + description: Optional — sketches, references, prior art welcome. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..fef37f0 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +## What does this PR do? + + + +## Checklist + +- [ ] `dotnet test` passes locally +- [ ] New systems have NUnit tests +- [ ] No Godot imports in `Loopolis.Core` +- [ ] Godot scripts compile (`cd godot && dotnet build`) +- [ ] Balance checked (ran a scenario via headless runner if touching simulation math) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..99f345d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,98 @@ +# Contributing to Loopolis + +Thanks for your interest in contributing! Loopolis is a solo indie project open to community improvements. Keep PRs small and focused — that makes review fast and merges easy. + +Website: https://www.codewithagents.de + +--- + +## Getting Started + +**Prerequisites** + +- [.NET 10 SDK](https://dotnet.microsoft.com/download) +- [Godot 4.4.1 .NET edition](https://godotengine.org/download) — install to `/Applications/Godot_mono.app` on macOS or adjust paths accordingly + +**Clone and build** + +```bash +git clone https://github.com/codewithagents/loopolis-city-builder.git +cd loopolis-city-builder +dotnet build src/ +``` + +--- + +## Run Tests + +All simulation logic lives in `src/Loopolis.Core/` and is covered by NUnit tests. Run them with: + +```bash +dotnet test +``` + +Tests complete in under 5 seconds — no Godot startup required. + +--- + +## Run the Game + +### Standalone mode (Godot runs its own simulation) + +```bash +DOTNET_ROOT=/opt/homebrew/opt/dotnet/libexec \ + /Applications/Godot_mono.app/Contents/MacOS/Godot \ + --path /path/to/loopolis/godot/ \ + --editor +# Open scenes/World.tscn and press F5 +``` + +### Server + viewer mode (headless simulation + Godot viewer) + +```bash +# Terminal 1 — start simulation server +export DOTNET_ROOT="/opt/homebrew/opt/dotnet/libexec" +dotnet run --project src/Loopolis.Runner -- server default --speed 2 + +# Terminal 2 — launch Godot viewer +DOTNET_ROOT=/opt/homebrew/opt/dotnet/libexec \ + /Applications/Godot_mono.app/Contents/MacOS/Godot \ + --path /path/to/loopolis/godot/ \ + --editor +# Open scenes/World.tscn and press F5 +``` + +### Headless balance checks + +```bash +dotnet run --project src/Loopolis.Runner -- 500 default +dotnet run --project src/Loopolis.Runner -- 1000 powered_start +``` + +Output is JSON — useful for verifying simulation balance without opening Godot. + +--- + +## How to Contribute + +1. **Fork** the repository +2. **Create a branch** — `git checkout -b feat/my-feature` +3. **Implement** Core changes first (if any), then Godot presentation +4. **Test** — `dotnet test` must be green; Godot must compile (`cd godot && dotnet build`) +5. **Open a PR** — fill in the PR template + +--- + +## Rules + +- **No Godot imports in `Loopolis.Core/`** — ever. Core is pure C# with zero engine dependencies. +- **Every new system needs NUnit tests** — test files mirror source paths (e.g. `Simulation/MySystem.cs` → `tests/.../Simulation/MySystemTests.cs`). +- **No business logic in `Program.cs` or `World.cs`** — wiring only. +- **Keep PRs small and focused** — one feature or fix per PR makes review much easier. +- **Balance check** — if you touch simulation math, run a headless scenario and include the output (or a summary) in the PR description. + +--- + +## Questions? + +Open a [GitHub Discussion](https://github.com/codewithagents/loopolis-city-builder/discussions) or reach out via the website: https://www.codewithagents.de diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..dfa6274 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +## Reporting a Vulnerability + +Please do **not** file a public GitHub issue for security vulnerabilities. + +Instead, send an email to **umingo@gmail.com** with the subject line: + +> Loopolis Security + +We will respond within **72 hours** and coordinate a fix before any public disclosure. + +## Non-Security Bugs + +For ordinary bugs and unexpected behaviour, please use [GitHub Issues](https://github.com/codewithagents/loopolis-city-builder/issues).