agentleFS
hoansdzhoansdz/Autolang/AGENTS.md

Autolang

AGENTS.md9 starsChanged 59 days agoMITView on GitHub

This document guides AI Coding Agents (Cursor, Copilot, Antigravity, Claude Code, Windsurf) on how to understand, build, modify, and integrate AutoLangC.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,691 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.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Memory Allocation: Always use ANotifier for object creation (createInt, createString, createMemberObject) to ensure correct reference …

    line 15
  2. Very specific:

    Nullability Checks: Verify nullable flags in generic types (allGenericTypeNullable, allMemberNullable) before unwrapping AObject*.

    line 16
  3. Very specific:

    C++ Standard: Use modern C++17 constructs (std::string_view, auto structured bindings).

    line 17
  4. Very specific:

    Native Library Registration: Use compiler.registerBuiltInLibrary(name, headerSource, config, implementations).

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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

AGENTS.md - Developer & Agent Guide for AutoLangC

This document guides AI Coding Agents (Cursor, Copilot, Antigravity, Claude Code, Windsurf) on how to understand, build, modify, and integrate AutoLangC.

Project Context

  • Language Standard: C++17 (set(CMAKE_CXX_STANDARD 17) required).
  • Core Architecture:
    • ACompiler: Parses source text into AST and emits VM bytecode instructions.
    • AVM: Stack-based execution engine with register frame support.
    • ANotifier: Handles VM exceptions, memory allocations, and Python interop runtime state.
    • AObject: Unified tagged union representing primitive types (int64_t, double, std::string, bool), generic objects (Array, Map, Set), and Python PyObject references.
  • Dependencies: pybind11 (Python interop), libcurl (HTTP requests, fetched via CMake FetchContent), nlohmann_json (JSON parsing).

Code Style & Rules

  1. Memory Allocation: Always use ANotifier for object creation (createInt, createString, createMemberObject) to ensure correct reference counting and GC tracking.
  2. Nullability Checks: Verify nullable flags in generic types (allGenericTypeNullable, allMemberNullable) before unwrapping AObject*.
  3. C++ Standard: Use modern C++17 constructs (std::string_view, auto structured bindings).
  4. Header Directives: Include headers relative to src/ (e.g., #include "shared/PYFunction.hpp").

Building & Testing Commands

  • Configure: cmake -B build -S .
  • Build: cmake --build build --config Release
  • Run Tests: ./build/autolang (or build\Release\autolang.exe on Windows).

TypeScript / JS Integration Rules (autolang-compiler)

  1. Native Library Registration: Use compiler.registerBuiltInLibrary(name, headerSource, config, implementations).
  2. Object Wrapper (@js_object): Annotate host wrapper classes with @js_object. Native implementation methods MUST use standard ES6 method shorthand or function syntax (not arrow functions () => {}) so the VM can bind this to the native JS object instance.
  3. Parameter Order: Native JS functions receive Autolang arguments sequentially. Instance methods receive the bound instance via this.

Python & Native Library Interop Rules

  1. Parameter Binding: Parameter mapping in native libraries mirrors TypeScript/JavaScript bindings. Non-static method calls pass the target instance as the 1st argument.
  2. Python self Convention: In Python interop (via pybind11), non-static member functions or standalone native callbacks acting on objects MUST accept self as the first argument (def my_func(self, *args)), enabling the VM to bind the caller instance correctly.

Download now (ZIP)

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.