You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+25-5Lines changed: 25 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,13 +23,13 @@ gh pr list --repo nvidia/garak --state open --search "<short area keywords>"
23
23
- If an open PR already addresses the same fix, do not open another.
24
24
- If your approach is materially different, explain the difference in the issue.
25
25
26
-
### No low-value busywork PRs
26
+
### Issues to avoid
27
27
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.
29
29
30
-
### Cohesive PRs
30
+
Avoid issues labelled "preliminary" or "needs more information".
31
31
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.
33
33
34
34
### Accountability
35
35
@@ -39,14 +39,32 @@ Each PR should have a clear focus. Only update files related to the topic of tha
39
39
- Why this is not duplicating an existing PR.
40
40
- Test commands run and results.
41
41
- 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.
42
55
43
56
### Fail-closed behavior
44
57
45
58
If work is duplicate/trivial busywork, **do not proceed**. Return a short explanation of what is missing.
46
59
47
60
### Project Guides
48
61
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`
50
68
51
69
### Commit messages
52
70
@@ -65,6 +83,7 @@ Signed-off-by: Your Name <your.email@example.com>
65
83
## Development requirements
66
84
67
85
### Coding guide
86
+
- Follow the project guide docs linked above.
68
87
- Always avoid adding new dependencies. Use the `extra_dependency_names` functionality if essential.
69
88
- Keep documentation of garak architecture in the docs/ dir up to date - though use docstrings in the first instance if possible.
70
89
- 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>
88
107
- Don't add tests for functionality already covered by tests of parent classes.
89
108
- Add descriptive strings to asserts, explaining the expect underlying behaviour; be terse.
90
109
- 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.
91
111
92
112
### Code primitives
93
113
- Avoid updating `attempt` or any base classes (`probes.base.*`, `generators.base.*`, `detectors.base.*`) frivolously.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-21Lines changed: 1 addition & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
7
7
8
8
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:
9
9
- Star the project
10
-
- Post about it on LinkedIn
10
+
- Post about it on your favorite social media platform
11
11
- Tweet about it
12
12
- Refer this project in your project's readme
13
13
- 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
121
121
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).
122
122
123
123
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?
126
124
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 -->
145
125
## Attribution
146
126
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
Copy file name to clipboardExpand all lines: docs/source/extending.probe.rst
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,15 @@ This document covers the key points of how to develop a new probe.
6
6
7
7
For information on how to contribute to garak, and how we build and manage our code, see :doc:`extending`.
8
8
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.
0 commit comments