alien
AGENTS.md5.6k starsChanged 29 days agoBSD-3-ClauseView on GitHub
ALIEN is an artificial life simulation built on a 2D CUDA particle engine for soft bodies and fluids. Mainly C++23 and CUDA, built with CMake + vcpkg (manifest mode). An NVIDIA CUDA GPU is required for engine functionality and the engine tests. The GUI uses Dear ImGui. Converse in the language the user used, but everything that is committed, pushed, or created on GitHub must be in English: commit messages, branch slugs, PR titles and bodies, code comments, identifiers. Keep…
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Avoid unnecessary comments.
- Very specific: line 23
Prefer .at() over [] for std::vector access unless there is a strong local reason
- Very specific: line 27
Do not run CodeQL / codeql_checker / any CodeQL security scanning
- Distinctive: line 28
Do not run git submodule update
- Distinctive: line 31
Do not cancel long-running builds or tests.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ALIEN — Repository Instructions
ALIEN is an artificial life simulation built on a 2D CUDA particle engine for soft bodies and fluids. Mainly C++23 and CUDA, built with CMake + vcpkg (manifest mode). An NVIDIA CUDA GPU is required for engine functionality and the engine tests. The GUI uses Dear ImGui.
Language
Converse in the language the user used, but everything that is committed, pushed, or created on GitHub must be in English: commit messages, branch slugs, PR titles and bodies, code comments, identifiers. Keep commit messages short and imperative.
Code style
- 4 spaces, no tabs
- Allman braces
- camelCase for variables and functions
- PascalCase for classes
- UPPER_SNAKE_CASE for constants
.hfor C++ headers,.cuhfor CUDA headers,.cpp/.cufor implementations- Avoid unnecessary comments; prefer self-documenting code
- Prefer
.at()over[]forstd::vectoraccess unless there is a strong local reason
Hard rules
- Do not run CodeQL /
codeql_checker/ any CodeQL security scanning - Do not run
git submodule update external/vcpkgis a pinned submodule — never modify or commit it. If it shows as modified, restore withgit restore external/vcpkg. Nevergit add external/vcpkg.- Do not cancel long-running builds or tests; they can take several minutes.
build-ninja/build-ninja-hipbelong to the IDE. Never configure into them, build into them or delete them — Visual Studio may be open on this folder and only recovers by deleting.vsand restarting. Agents build intobuild-agent(see below); a clean rebuild means deletingbuild-agent.
Build (Windows)
Build with the repo-root script, not the default Visual Studio generator. Agents
always pass agent:
build-windows-ninja.bat agent # Release (default)
build-windows-ninja.bat agent Debug # DebugIt sets up MSVC via vcvars64 and uses the "Ninja Multi-Config" CMake preset, compiling the CUDA translation units in parallel.
There are two separate build trees:
| Caller | Preset | Output |
| Visual Studio, or the script run by hand | ninja | build-ninja\Release\ |
Agents (agent argument) | ninja-agent | build-agent\Release\ |
Visual Studio configures the ninja preset into build-ninja and caches its model
of that tree under .vs. An outside build regenerates the tree, invalidates that
cache and breaks the next build in the IDE until .vs is deleted — hence the second
tree. Without an argument the script uses the IDE tree. Only Claude Code (CLAUDECODE
is set) and ALIEN_BUILD_TREE=agent switch to the agent tree automatically, so every
other agent needs the explicit agent argument.
Executables (alien.exe, alien-cli.exe, EngineTests.exe) land under the Release\
subdirectory of the respective tree — not the older build\Release\.
A struct / constant-memory / kernel .cuh change needs a clean rebuild, otherwise
stale kernels linger and weak tests can pass against old code.
Tests
Executables under build-agent\Release\ (build-ninja\Release\ for a manual build):
BaseTests.exe (<1s)
DataTests.exe (<1s)
EngineInterfaceTests.exe (<1s)
McpToolsTests.exe (<1s)
NetworkTests.exe (<1s)
PersisterTests.exe (~1.4s)
EngineTests.exe (~150s — needs the GPU; do not cancel)GUI-only changes under source/Gui/ that do not touch engine, network, persistence,
CLI, or shared code do not strictly need tests, but still build. For a targeted CUDA
failure: EngineTests.exe -d --gtest_filter=Suite.Test (debug mode is much slower —
use it for single tests only, not the full suite).
Build and tests on Linux
On Linux, for example in the GitHub Copilot cloud agent environment that
.github/workflows/copilot-setup-steps.yml prepares, the build tree is build and
the executables land directly in it:
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=external/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
cmake --build build -j32
cd build && ./BaseTests && ./DataTests && ./EngineInterfaceTests && ./McpToolsTests && ./NetworkTests && ./PersisterTests && ./EngineTestsThe setup workflow already runs the configure step. The GUI (./alien) needs an X11
display and cannot run in a headless environment.
Formatting
The clang-format version matters: format with 19.1.5 (bundled with Visual
Studio 2022 Community — bare clang-format on PATH resolves to it). Do not use the
VS Insiders v22 binary — same source/_clang-format config, but it reflows lines
differently and creates churn. Format only the files you modified, and only if they are
already clean at HEAD:
clang-format --style=file:source/_clang-format --dry-run --Werror <file>Several committed files are not clang-format-clean, so running a whole-file format on them reflows unrelated lines. ColumnLimit is 160; clang-format does not always wrap long builder-chain assignments beyond 160, and that is accepted.
Layout
Each component lives in source/<Component>/. A component with a separate implementation
splits into Interface, which holds its API, and Impl, which holds the implementation
behind the facade. A component without one keeps its whole library directly in
source/<Component>/. Tests always sit in a Tests directory below the directory whose
code they test. Includes are relative to source/, for example
#include <Engine/Interface/SimulationFacade.h>. Only the applications in source/Apps/
and the test suites include *FacadeImpl.h headers, to register the facade
implementations.
source/Apps/Alien/ GUI application, composition root of the facades
source/Apps/Alien-cli/ Command-line interface
source/Base/ Common utilities, math, logging, Markdown parsing
source/Base/Tests/ Base unit tests
source/ConsoleUi/ Console widgets of the CLI and the console mode of the GUI
source/Data/ Descriptions, genomes, simulation parameters and their services
source/Data/Tests/ Data unit tests
source/Engine/Impl/ CPU-side engine implementation
source/Engine/Impl/Kernels/ CUDA kernels
source/Engine/Impl/Tests/ CUDA engine integration tests
source/Engine/Interface/ Abstract simulation APIs
source/Engine/Interface/TestData/ Test data shared by the test suites
source/Engine/Interface/Tests/ Engine interface unit tests
source/Gui/Impl/ Dear ImGui GUI, free of graphics API code
source/Gui/Interface/ Abstract GUI API that manages the main window
source/McpTools/Impl/ MCP tools operating on the simulation
source/McpTools/Impl/Tests/ MCP tools unit tests
source/McpTools/Interface/ Abstract MCP tools API
source/Network/ HTTP / cloud features, MCP server
source/Network/Tests/ Network unit tests
source/Persister/Impl/ Worker thread processing the persister requests
source/Persister/Interface/ Abstract persistence APIs, file I/O and serialization
source/Persister/Interface/Tests/ Serialization tests
source/Rendering/Impl/ Vulkan rendering of the simulation and the user interface
source/Rendering/Impl/Shaders/ GLSL shader sources
source/Rendering/Interface/ Abstract rendering APIs, free of graphics API code
source/Server/ Python (FastAPI) server behind the cloud features
external/ Third-party dependencies incl. the pinned vcpkg submodule
resources/ Runtime assetsTrending
Quiet since May.thin dataabout the whole repository
Who's talking about chrxh/alien
- A Hacker News story“Alien – CUDA-powered artificial life simulation program”Hacker News · Aug 17, 2024 · 295 points
- A Hacker News story“ALiEn – Artificial Life Simulation”Hacker News · Dec 19, 2021 · 6 points
- @chrxh.bsky.social“ALIEN version 4.11 has been released. Alongside numerous smaller improvements it provides advanced autosave …”Bluesky · Nov 25, 2024 · 3 likes
- A Hacker News story“Alien – Explore worlds of artificial life”Hacker News · May 6, 2023 · 2 points
- @paulguinnessy.bsky.social“My first major story for New Scientist in the 90s was about #DigitalLife simulations suggesting that life …”Bluesky · Aug 26, 2024 · 1 likes
The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 12
Talked about on Hacker News, GitHub and Bluesky (12 times).
On Hacker News · 4
- Aug 17, 2024Alien – CUDA-powered artificial life simulation program295 points · 24 comments
- Dec 19, 2021ALiEn – Artificial Life Simulation6 points
- May 6, 2023Alien – Explore worlds of artificial life2 points
- Jul 5, 2022Alien – Artificial life simulation tool1 point
On GitHub · 4
- Aug 4, 2024alien@4.9.1: hash check failed — ScoopInstaller/Extras0 reactions · 1 comment
- Nov 15, 2023ALIEN: Add version 4.4.1 — ScoopInstaller/Extras0 reactions · 2 comments
- Nov 15, 2023[Request]: ALIEN — ScoopInstaller/Extras0 reactions
- Nov 15, 2023ALIEN: Add version 4.4.1 — ScoopInstaller/Main0 reactions · 4 comments
On Bluesky · 4
- Nov 25, 2024ALIEN version 4.11 has been released. Alongside numerous smaller improvements it provides advanced autosave functions and an improved user… — @chrxh.bsky.social3 likes and reposts
- Aug 26, 2024My first major story for New Scientist in the 90s was about #DigitalLife simulations suggesting that life might be more easily created than… — @paulguinnessy.bsky.social1 likes and repost
- May 9, 2026And then imagine you could see all the programs right now as a sea filled with these little organisms floating around, touching each other… — @artiombn.bsky.social0 likes and reposts · 1 reply
- Aug 18, 2024Alien – CUDA-powered artificial life simulation program Alien - CUDAを使った人工生命シミュレーションプログラム 🔺 248 💬 12 🔗 HN Post | Article — @hacker-news-jp.bsky.social0 likes and reposts · 1 reply
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

