agentleFS
chrxhchrxh/alien/AGENTS.md

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
  1. Distinctive:

    Avoid unnecessary comments.

    line 22
  2. Very specific:

    Prefer .at() over [] for std::vector access unless there is a strong local reason

    line 23
  3. Very specific:

    Do not run CodeQL / codeql_checker / any CodeQL security scanning

    line 27
  4. Distinctive:

    Do not run git submodule update

    line 28
  5. Distinctive:

    Do not cancel long-running builds or tests.

    line 31

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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
  • .h for C++ headers, .cuh for CUDA headers, .cpp / .cu for implementations
  • Avoid unnecessary comments; prefer self-documenting code
  • Prefer .at() over [] for std::vector access 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/vcpkg is a pinned submodule — never modify or commit it. If it shows as modified, restore with git restore external/vcpkg. Never git add external/vcpkg.
  • Do not cancel long-running builds or tests; they can take several minutes.
  • build-ninja / build-ninja-hip belong 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 .vs and restarting. Agents build into build-agent (see below); a clean rebuild means deleting build-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    # Debug

It 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:

CallerPresetOutput
Visual Studio, or the script run by handninjabuild-ninja\Release\
Agents (agent argument)ninja-agentbuild-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 && ./EngineTests

The 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 assets

Download now (ZIP)

Trending

Quiet since May.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the chrxh/alien repository that our weekly crawl found: only 12 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about chrxh/alien

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 GitHub · 4

On Bluesky · 4

  • 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.