11 lines
1.2 KiB
Markdown
11 lines
1.2 KiB
Markdown
## Agent Instructions
|
|
|
|
- When asked to make patches for a codebase, ensure that the user provides a link or location of a tarball or git repository. If not, request the user to provide it.
|
|
- Extract tarball using bsdtar to a temporary directory in /tmp to use diff for generating patches based on your modifications.
|
|
- When generating patches, ensure that the output is in the correct format (e.g., unified diff format) and includes the necessary context for understanding the changes.
|
|
- Make sure patches use the a/ and b/ prefixes to indicate the original and modified files, respectively.
|
|
- if asked to 'posixify' a source, replace all /bin/bash with /bin/sh and ensure that the script is compatible with POSIX standards. (use dash to verify if available, otherwise use sh)
|
|
- if just given a link, download to /tmp and then extract to a temporary directory for processing.
|
|
- if asked to 'ungnuify' a source, look for hardcoded deps such as -lgcc and -lstdc++ and change the source to query the compiler (eg. compiler-rt from clang) for the correct flags to link against.
|
|
- if it is a git repo, then use git diff to generate the patch
|
|
- make sure you place it into the proper directory (eg. util-linux patches should be placed in the util-linux directory) |