Add `CONTRIBUTING` file

2e8d96a32f2294abe4c28c48a557ec86bc126a56
Alexis Sellier committed ago 1 parent 08734825
AGENTS.md +3 -6
9 9
Fix any warnings or errors surfaced by these tools.
10 10
11 11
When modifying only documentation files, such as Markdown or plain text files,
12 12
do not run the check.
13 13
14 +
If asked to commit, check the `CONTRIBUTING` file. In general, don't commit
15 +
on the `master` branch, but feel free to commit on other branches.
16 +
14 17
When modifying code, keep these things in mind:
15 18
16 19
1. Adding lots of new code to fix an issue is almost always wrong.
17 20
2. Removing code to fix an issue is almost always right.
18 21
3. Code has a cost of maintenance and prefer changing existing
29 32
  (`Table`, `VStack`, `HStack`, `Line`, labels, and related renderable types)
30 33
  instead of hand-aligning text with ad hoc spacing.
31 34
* Always do things the proper, idiomatic, robust way. NO HACKS.
32 35
* After the tests pass, run the benchmarks for the crate to ensure no regressions.
33 36
34 -
When committing code:
35 -
36 -
* Always include a short description of the change in the commit message body,
37 -
  explaining why the change was made.
38 -
* In the commit summary, prefix the affected crate name minus `rustik-`.
39 -
40 37
When modifying tests:
41 38
42 39
* NEVER add assertions whose purpose is to reject a previous implementation's
43 40
  output or behavior. Tests should assert the current required behavior and
44 41
  externally meaningful invariants, not historical states.
CONTRIBUTING added +53 -0
1 +
============
2 +
CONTRIBUTING
3 +
============
4 +
5 +
When contributing code, please follow these simple guidelines.
6 +
7 +
WRITING COMMITS
8 +
9 +
1. Always include a short description of the change in the commit message body,
10 +
  explaining why the change was made.
11 +
2. In the commit summary, prefix the affected crate name minus `rustik-`.
12 +
3. If assisted by a coding agent, affix a commit trailer like:
13 +
14 +
        Assisted-by: Codex:gpt-5.5
15 +
16 +
A properly formed git commit subject line should always be able to complete the
17 +
following sentence:
18 +
19 +
     If applied, this commit will _____
20 +
21 +
For example, the following message is well formed:
22 +
23 +
     ui: Add support for .gif files
24 +
25 +
In addition, it should be capitalized and *must not* include a period.
26 +
27 +
When it comes to formatting, here's a model git commit message[1]:
28 +
29 +
     Capitalized, short (50 chars or less) summary
30 +
31 +
     More detailed explanatory text, if necessary.  Wrap it to about 72
32 +
     characters or so.  In some contexts, the first line is treated as the
33 +
     subject of an email and the rest of the text as the body.  The blank
34 +
     line separating the summary from the body is critical (unless you omit
35 +
     the body entirely); tools like rebase can get confused if you run the
36 +
     two together.
37 +
38 +
     Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
39 +
     or "Fixes bug."  This convention matches up with commit messages generated
40 +
     by commands like git merge and git revert.
41 +
42 +
     Further paragraphs come after blank lines.
43 +
44 +
     - Bullet points are okay, too.
45 +
46 +
     - Typically a hyphen or asterisk is used for the bullet, followed by a
47 +
       single space, with blank lines in between, but conventions vary here.
48 +
49 +
     - Use a hanging indent.
50 +
51 +
---
52 +
53 +
[1]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html