Phase 2 references for the host-agent Dune adapter, moved out of volatile /tmp
into docs/reference-repos/ (per Commander). Three upstream projects, .git +
node_modules + compiled binaries stripped (16MB source). Nested AI-instruction
files (.claude/, CLAUDE.md) removed so they don't pollute Corrosion sessions.
- icehunter/ dune-admin (Go+React) — 4 control planes; SETUP_DOCKER.md is the
closest analog to our agent's Dune docker control plane (compose
lifecycle, docker logs, RabbitMQ-via-exec, dune Postgres schema)
- adainrivers/ Rust/Tauri desktop — SSH+k8s BattleGroup control, maintenance
daemon, in-game admin console (Rust idiom reference)
- the4rchangel/ Node web UI replacing battlegroup.bat — matches the Commander's
Hyper-V self-host path + game-config schema
See docs/reference-repos/README.md for the full index + how we use each.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.4 KiB
ADR 0001 — Adopt standard Go project layout
Status: Accepted
Date: 2025-05-27
Context
All Go source files currently live in the repository root alongside go.mod, the Makefile, Dockerfile, and deployment config. As the project grows (adding internal/marketbot/, potentially other sub-packages), the flat layout makes it hard to:
- Distinguish entry-point code from library code
- Prevent external import of internal helpers
- Keep deployment artifacts clearly separated from source
The Go community's de-facto standard layout places main packages under cmd/<name>/ and shared/internal code under internal/<pkg>/. The go toolchain enforces the internal/ import restriction natively.
Decision
Move all root-level *.go files into cmd/dune-admin/ (package declaration stays package main). New shared code goes into internal/. Deployment artifacts (Dockerfile, docker-compose.yml, k8s manifests) move into deploy/.
The go.mod module name remains dune-admin. Build target changes from ./ to ./cmd/dune-admin.
Consequences
make build,make test, allgo toolinvocations must be updated to use./cmd/dune-adminor./...- The existing Dockerfile
COPYandWORKDIRpaths need updating internal/enforces thatmarketbotcan only be imported by this module — prevents accidental external re-use- One-time migration commit with no behaviour change; straightforward to review