|
| 1 | +# AI Usage Policy |
| 2 | + |
| 3 | +> [!IMPORTANT] |
| 4 | +> Chilli does not accept fully AI-generated pull requests. |
| 5 | +> AI tools may be used only for assistance. |
| 6 | +> You must understand and take responsibility for every change you submit. |
| 7 | +> |
| 8 | +> Read and follow [AGENTS.md](./AGENTS.md), [CONTRIBUTING.md](./CONTRIBUTING.md), and [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md). |
| 9 | +
|
| 10 | +## Our Rule |
| 11 | + |
| 12 | +All contributions must come from humans who understand and can take full responsibility for their code. LLMs make mistakes and cannot be held |
| 13 | +accountable. |
| 14 | +Chilli is a CLI framework, so its users trust it to parse their arguments correctly, dispatch to the right command, and emit help text that matches |
| 15 | +reality. Subtle issues in the parser, command-tree teardown, or help generator silently corrupt every downstream CLI that depends on Chilli, so human |
| 16 | +ownership matters. |
| 17 | + |
| 18 | +> [!WARNING] |
| 19 | +> Maintainers may close PRs that appear to be fully or largely AI-generated. |
| 20 | +
|
| 21 | +## Getting Help |
| 22 | + |
| 23 | +Before asking an AI, please open or comment on an issue on the [Chilli issue tracker](https://github.com/CogitatorTech/chilli/issues). There are |
| 24 | +no silly questions, and CLI-parsing topics (POSIX vs GNU flag conventions, grouped short flags, subcommand dispatch, environment-variable fallback, |
| 25 | +and allocator and lifetime management across the command tree) are an area where LLMs often give confident but incorrect answers. |
| 26 | + |
| 27 | +If you do use AI tools, use them for assistance (like a reference or tutor), not generatively (to fully write code for you). |
| 28 | + |
| 29 | +## Guidelines for Using AI Tools |
| 30 | + |
| 31 | +1. Complete understanding of every line of code you submit. |
| 32 | +2. Local review and testing before submission, including `make test` and `make lint`. |
| 33 | +3. Personal responsibility for bugs, regressions, and cross-platform issues in your contribution. |
| 34 | +4. Disclosure of which AI tools you used in your PR description. |
| 35 | +5. Compliance with all rules in [AGENTS.md](./AGENTS.md) and [CONTRIBUTING.md](./CONTRIBUTING.md). |
| 36 | + |
| 37 | +### Example Disclosure |
| 38 | + |
| 39 | +> I used Claude to help understand a parsing regression in `src/chilli/parser.zig`. |
| 40 | +> I reviewed the suggested fix, ran `make test` and `make run` locally against the relevant examples, and verified the `--help` output is unchanged. |
| 41 | +
|
| 42 | +## Allowed (Assistive Use) |
| 43 | + |
| 44 | +- Explanations of existing code in `src/lib.zig`, `src/chilli/`, and `examples/`. |
| 45 | +- Suggestions for debugging failing inline `test` blocks or help-output mismatches. |
| 46 | +- Help understanding Zig compiler errors, allocator lifetimes, or prior-art conventions from other CLI frameworks. |
| 47 | +- Review of your own code for correctness, clarity, and style. |
| 48 | + |
| 49 | +## Not Allowed (Generative Use) |
| 50 | + |
| 51 | +- Generation of entire PRs or large code blocks, including new parser branches in `src/chilli/parser.zig`, new flag or argument types in |
| 52 | + `src/chilli/types.zig`, new command-tree logic in `src/chilli/command.zig`, or new example programs under `examples/`. |
| 53 | +- Delegation of implementation or API decisions to the tool, especially for the shape of the public API re-exported from `src/lib.zig` or for help |
| 54 | + and error output that users will see. |
| 55 | +- Submission of code you do not understand. |
| 56 | +- Generation of documentation, README content, or doc comments without your own review. |
| 57 | +- Automated or bulk submission of changes produced by agents. |
| 58 | + |
| 59 | +## About AGENTS.md |
| 60 | + |
| 61 | +[AGENTS.md](./AGENTS.md) encodes project rules about architecture, testing, and conventions, and is structured so that LLMs can better comply with |
| 62 | +them. Agents may still ignore or be talked out of it; it is a best effort, not a guarantee. |
| 63 | +Its presence does not imply endorsement of any specific AI tool or service. |
| 64 | + |
| 65 | +## Licensing Note |
| 66 | + |
| 67 | +Chilli is licensed under the MIT License and has no external Zig or C dependencies, so all source in this repository is expected to be originally |
| 68 | +authored by contributors. AI-generated code of unclear provenance would muddy that boundary, which is another reason to keep contributions |
| 69 | +human-authored. |
| 70 | + |
| 71 | +## AI Disclosure |
| 72 | + |
| 73 | +This policy was adapted, with the assistance of AI tools, from a similar policy used by other open-source projects, and was reviewed and edited by |
| 74 | +human contributors to fit Chilli. |
0 commit comments