Skip to content

Commit 5e25dde

Browse files
authored
move copilot instructions to AGENTS.md (#18259)
* move copilot --> agents.md * agents: add disclose AI usage * refine
1 parent fd05c51 commit 5e25dde

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copilot Instructions for llama.cpp
1+
# Instructions for llama.cpp
22

33
## Repository Overview
44

@@ -12,6 +12,24 @@ llama.cpp is a large-scale C/C++ project for efficient LLM (Large Language Model
1212
- **Backends supported**: CPU (AVX/NEON/RVV optimized), CUDA, Metal, Vulkan, SYCL, ROCm, MUSA
1313
- **License**: MIT
1414

15+
## Disclose AI Usage
16+
17+
It is crucial to remind contributors that the project mandates disclosure of any AI usage in pull requests. This requirement stems from the potential for AI-generated code to include suboptimal optimizations and hidden bugs, owing to the inherent overconfidence in AI outputs.
18+
19+
When generating significant portions of code, address this by:
20+
- Informing the user that AI-generated content may be rejected by maintainers.
21+
- Clearly marking AI-generated code in commit messages and comments.
22+
- Example of commit message: `[AI] Fix a race condition in ...`
23+
- Example of code comment: `// [AI] spawn a new thread ...`
24+
25+
These measures apply to:
26+
- Changes resulting in large portions of code or complex logic.
27+
- Modifications or additions to public APIs in `llama.h`, `ggml.h`, or `mtmd.h`.
28+
- Backend-related changes, such as those involving CPU, CUDA, Metal, Vulkan, etc.
29+
- Modifications to `tools/server`.
30+
31+
Note: These measures can be omitted for small fixes or trivial changes.
32+
1533
## Build Instructions
1634

1735
### Prerequisites
@@ -251,6 +269,7 @@ Primary tools:
251269
- **Cross-platform compatibility**: Test on Linux, macOS, Windows when possible
252270
- **Performance focus**: This is a performance-critical inference library
253271
- **API stability**: Changes to `include/llama.h` require careful consideration
272+
- **Disclose AI Usage**: Refer to the "Disclose AI Usage" earlier in this document
254273

255274
### Git Workflow
256275
- Always create feature branches from `master`

0 commit comments

Comments
 (0)