SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Dev: Add cursor rules (#1063)
Kilian Lieret5a455b28cb5c
diff --git a/.cursor/rules/general.mdc b/.cursor/rules/general.mdcnew file mode 100644index 00000000..05b80b52--- /dev/null+++ b/.cursor/rules/general.mdc@@ -0,0 +1,14 @@+---+description:+globs:+alwaysApply: true+---++# Your rule content++- Use python with type annotations+- Target python 3.11 or higher+- Use `pathlib` instead of `os.path`. Also use `Path.read_text()` over `with ...open()` constructs+- Use `argparse` to add interfaces+- Keep code comments to a minimum and only highlight particularly logically challenging things+- Do not append to the README unless specifically requested\ No newline at end of filediff --git a/.cursor/rules/project-overview.mdc b/.cursor/rules/project-overview.mdcnew file mode 100644index 00000000..d5bb010f--- /dev/null+++ b/.cursor/rules/project-overview.mdc@@ -0,0 +1,15 @@+---+description:+globs:+alwaysApply: true+---+# SWE-agent overview++SWE-agent implements an AI agent that runs over github issues.+Here's what you need to know about the project structure:++- The main entry points to running are in the `sweagent/run`, in particular `run_single.py` and `run_batch.py`+- The main class that governs agent behavior is `sweagent/agent/agents.py`+- The AI agent proposes actions that are executed in sandboxed docker containers+- At the beginning of an agent class, we initialize a `SWEEnv` class from `sweagent/environment/swe_env.py`. This class interfaces with the SWE-ReX project to interface with the sandboxed docker containers+- Part of the SWE-agent project are tools in `tools/`. They are organized in bundles. These bundles are copied to the sandboxed container and made available in the $PATH variable.\ No newline at end of filediff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yamlindex cdb52473..7dd68b00 100644--- a/.github/workflows/pytest.yaml+++ b/.github/workflows/pytest.yaml@@ -10,6 +10,7 @@ on:- prepare-public2paths-ignore:- 'docs/**'+ - '.cursor/**'- 'README.md'- 'mkdocs.yml'pull_request: