Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Information for AI agents

## Module Organization

- `src/` - C source code for msolve library. Contains:
- `neogb/` - Gröbner basis functionality (C code)
- `fglm/` - FGLM algorithm functionality (C code)
- `msolve/` - Main solver functionality (C code)
- `usolve/` - Real root isolation (C code)
- `crt/` - Chinese Remainder Theorem implementation
- `upolmat/` - Univariate polynomial matrix operations
- `neogb/` - Gröbner basis functionality (also contains Julia interface in `neogb/julia/`)
- `fglm/` - FGLM algorithm functionality
- `test/` - Test suite. Subdirectories mirror the `src/` structure
- `doc/` - Documentation including the msolve tutorial (`doc/msolve-tutorial.tex`) and tutorial examples
- `doc/examples/` - Example scripts
- `input_files/` - Input data files for testing
- `output_files/` - Output files generated during testing
- `interfaces/` - File interface definitions for integration with other systems (Julia, SageMath, Maple)
- `data/` - Static data files (if any)
- `.github/` - GitHub CI workflows
- `build/` - Build artifacts (auto-generated)
- `m4/` - Autoconf macros
- `configure.ac` / `configure` - Autoconf configuration files
- `Makefile.am` / `Makefile` - Autotools build system
- `INSTALL` - Build and installation instructions
- `autogen.sh` - Script to generate configure and Makefiles from source
- `configure` - Configuration script (generated by autotools)

## Build and Installation Instructions

See the `INSTALL` file for detailed instructions. The build system uses autotools.
For development from the git repository, run:
1. `./autogen.sh` (generates configure and Makefiles)
2. `./configure` (see `./configure --help` for options)
3. `make` (with `CFLAGS` and `LDFLAGS` as needed)
4. `make check` (runs tests)
5. `make install` (installs library and binary globally)

On macOS, use LLVM Clang for better OpenMP support. Install dependencies with Homebrew and set environment variables as described in `INSTALL`.

## Code Style and Best Practices

- Follow the existing C coding conventions in the codebase
- After writing code, review the docstring for each function you used
- Check `src/msolve/msolve.h` and `src/neogb/neogb.h` for function documentation

## Commit Messages and Pull Requests

When writing commit messages, the title ("Brief summary") should not start with
a "component: ..." prefix. Instead it typically is a verb ("Add/Fix/Change/...").
In the body of the commit message, provide a brief prose summary
of the purpose of the changes made.

When creating pull requests, you MUST cosign them.

## For all changes

- Add the AI tool as a Git co-author on all commits created by that tool.
- Whenever a pull request is opened, and if some of the changes in the pull request were made with the assistance of generative AI, then you MUST disclose this fact in the PR description.
Loading