Skip to content

Commit 6dbfae5

Browse files
committed
docs: Update contribution, agent instructions (#1819)
2 parents 2e9b3f5 + 478bf42 commit 6dbfae5

4 files changed

Lines changed: 37 additions & 27 deletions

File tree

AGENTS.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ gh pr list --repo nvidia/garak --state open --search "<short area keywords>"
2323
- If an open PR already addresses the same fix, do not open another.
2424
- If your approach is materially different, explain the difference in the issue.
2525

26-
### No low-value busywork PRs
26+
### Issues to avoid
2727

28-
Do not open one-off PRs for tiny edits (single typo, isolated style change, one mutable default, etc.). Mechanical cleanups are acceptable only when bundled with substantive work.
28+
If an issue description is short (e.g. three or fewer sentences), ask for clarification in the issue comments before proceeding.
2929

30-
### Cohesive PRs
30+
Avoid issues labelled "preliminary" or "needs more information".
3131

32-
Each PR should have a clear focus. Only update files related to the topic of that PR.
32+
Avoid bug issues that have no assignment or are not labelled `bug-verified`, unless you can build a working test case confirming the bug that does not conflict with project tests.
3333

3434
### Accountability
3535

@@ -39,14 +39,32 @@ Each PR should have a clear focus. Only update files related to the topic of tha
3939
- Why this is not duplicating an existing PR.
4040
- Test commands run and results.
4141
- Clear statement that AI assistance was used.
42+
- Only add an SPDX header when directly importing code from elsewhere under license that permits this and is compatible with the project.
43+
44+
### PR style
45+
46+
Don't add issue numbers in PR titles; it's OK to include these in the description.
47+
48+
### No low-value busywork PRs
49+
50+
Do not open one-off PRs for tiny edits (single typo, isolated style change, one mutable default, etc.). Mechanical cleanups are acceptable only when bundled with substantive work.
51+
52+
### Cohesive PRs
53+
54+
Each PR should have a clear focus. Only update files related to the topic of that PR.
4255

4356
### Fail-closed behavior
4457

4558
If work is duplicate/trivial busywork, **do not proceed**. Return a short explanation of what is missing.
4659

4760
### Project Guides
4861

49-
Check the docs on "Contributing" and "Extending", in `docs/source`, and follow these.
62+
Follow the documentation on contributing too and extending garak. See:
63+
64+
* For selecting contributions: `docs/source/contributing.rst`
65+
* For writing code: `docs/source/extending.rst`
66+
* When writing a probe: `docs/source/extending.probe.rst`
67+
* When writing a generator: `docs/source/extending.generator.rst`
5068

5169
### Commit messages
5270

@@ -65,6 +83,7 @@ Signed-off-by: Your Name <your.email@example.com>
6583
## Development requirements
6684

6785
### Coding guide
86+
- Follow the project guide docs linked above.
6887
- Always avoid adding new dependencies. Use the `extra_dependency_names` functionality if essential.
6988
- Keep documentation of garak architecture in the docs/ dir up to date - though use docstrings in the first instance if possible.
7089
- When working on probes, detectors, or buffs, be sure to check the content of the relevant `doc_uri` to understand the code's intent and the underlying technique.
@@ -88,6 +107,7 @@ Signed-off-by: Your Name <your.email@example.com>
88107
- Don't add tests for functionality already covered by tests of parent classes.
89108
- Add descriptive strings to asserts, explaining the expect underlying behaviour; be terse.
90109
- Check that tests work. If `pytest` or other project dependencies are not available, the environment has not been set up correctly; give the user this problem.
110+
- Re-use/parametrize tests where appropriate.
91111

92112
### Code primitives
93113
- Avoid updating `attempt` or any base classes (`probes.base.*`, `generators.base.*`, `detectors.base.*`) frivolously.

CONTRIBUTING.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
77

88
And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
99
- Star the project
10-
- Post about it on LinkedIn
10+
- Post about it on your favorite social media platform
1111
- Tweet about it
1212
- Refer this project in your project's readme
1313
- Mention the project at local meetups and tell your friends/colleagues
@@ -121,26 +121,6 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/NVIDIA
121121
So you'd like to send us some code? Wonderful! Check out our [guide to contributing garak code](https://reference.garak.ai/en/latest/contributing.html).
122122

123123
Please be mindful of the risk of harm involved in publishing exploits. Only responsibly disclosed vulnerabilities are welcome in garak. OWASP maintain a great guide to [vulnerability disclosure](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html), which you should check out when contributing probes or data.
124-
<!-- TODO
125-
include Setup of env, IDE and typical getting started instructions?
126124

127-
-->
128-
129-
<!-- ### Improving The Documentation -->
130-
<!-- TODO
131-
Updating, improving and correcting the documentation
132-
133-
-->
134-
135-
<!-- ## Styleguides -->
136-
<!-- ### Commit Messages -->
137-
<!-- TODO
138-
139-
-->
140-
141-
<!-- ## Join The Project Team -->
142-
<!-- TODO -->
143-
144-
<!-- omit in toc -->
145125
## Attribution
146126
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!

docs/source/contributing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ If you're going to contribute, it's a really good idea to reach out, so you have
2626
There are a number of ways you can reach out to us:
2727

2828
* GitHub discussions: `<https://github.com/NVIDIA/garak/discussions>`_
29-
* Twitter: `<https://twitter.com/garak_llm>`_
3029
* Discord: `<https://discord.gg/uVch4puUCs>`_
30+
* LinkedIn: `<https://www.linkedin.com/company/garakllm/>`_
31+
* X: `<https://x.com/garak_llm>`_
3132

3233
We'd love to help, and we're always interested to hear how you're using garak.
3334

docs/source/extending.probe.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ This document covers the key points of how to develop a new probe.
66

77
For information on how to contribute to garak, and how we build and manage our code, see :doc:`extending`.
88

9+
Scope
10+
*****
11+
12+
Garak targets can be attacked in many different ways. That makes for an almost unlimited number of possible probes. However, each probe the garak maintainers accept takes time, through careful review and continuous code management; and impacts garak users in inference time and cost every time they run it. Therefore, care needs to be applied when selecting new probes.
13+
14+
Probes that offer novel, demonstrated, substantial function are in scope.
15+
16+
Novelty is defined by how similar a probe is to garak's existing probes. For a probe to be demonstrated, there should be a research article or experiments showing that the probe works and unlocks something somewhere that wasn't unlocked without it. For substance, the probe should generate a reasonable number of prompts; see `Substance` below.
17+
918
Naming
1019
******
1120

0 commit comments

Comments
 (0)