Update `AGENTS.md`
84f528bcda1a85ac6d14195e12c1b6471a1e713990b3fc6b734196b5f787ab98
Change-Id: Iecc2a56be0f546444b46308462b86012adcdd0db
1 parent
e267dfe9
AGENTS.md
+15 -5
| 37 | 37 | ||
| 38 | 38 | ## Git |
|
| 39 | 39 | ||
| 40 | 40 | - Read-only inspection is allowed. Git operations that change repository state |
|
| 41 | 41 | require an explicit request. Leave changes uncommitted unless asked to commit. |
|
| 42 | - | - Sign every commit. Create a new commit unless explicitly asked to amend. |
|
| 43 | - | Include documentation and other non-source files only when asked. |
|
| 42 | + | - Sign every commit. Include documentation and other non-source files only |
|
| 43 | + | when asked, unless it's edits to already checked-in documentation; in that |
|
| 44 | + | case include the changes. |
|
| 44 | 45 | - Large features require a new worktree under `../worktrees/`. If its creation |
|
| 45 | 46 | is not authorized, ask before implementation and continue read-only research. |
|
| 47 | + | - When doing work in Git worktrees, always commit your work. Don't leave |
|
| 48 | + | uncommitted files lying around in worktrees, unless they are temporary files |
|
| 49 | + | not intended to be committed; in that case delete them when the work |
|
| 50 | + | is complete. |
|
| 51 | + | - When fixing or changing work done in a feature branch, always amend the |
|
| 52 | + | commit that introduced the code being fixed. Don't create new commits unless |
|
| 53 | + | asked. |
|
| 46 | 54 | - Read `CONTRIBUTING` before writing commit messages. |
|
| 47 | 55 | ||
| 48 | 56 | ## Radiance implementation |
|
| 49 | 57 | ||
| 50 | 58 | Radiance is a self-hosted systems language compiler targeting RV64. It runs in |
| 81 | 89 | - Cover affected branches, boundaries, errors, and relevant language interactions |
|
| 82 | 90 | such as guards, `if-let`, `let-else`, and `while-let`. Include adversarial |
|
| 83 | 91 | executable cases for safety changes where applicable. |
|
| 84 | 92 | - Use `assert` for expected values. Nonzero exit expectations are for tests of |
|
| 85 | 93 | failure or exit behavior. Remove tests for functionality the user asks to remove. |
|
| 86 | - | - Run focused tests during development and `make test` after the final source, |
|
| 87 | - | test, or build change. Repeat successful checks only after further changes or |
|
| 88 | - | to investigate an unresolved concern. |
|
| 94 | + | - Run focused tests during development. Only run kernel tests when changing the |
|
| 95 | + | kernel source code or making a change that targets the kernel. |
|
| 89 | 96 | - For documentation-only changes, verify content, paths, commands, and formatting; |
|
| 90 | 97 | no compiler tests are needed. Distinguish checks performed from untested claims. |
|
| 98 | + | - Do *not* add tests for changes that are not bug fixes or new features. Tests |
|
| 99 | + | should only be added when we are missing test coverage for something we |
|
| 100 | + | changed or added. |
|
| 91 | 101 | ||
| 92 | 102 | ## Build and test entry points |
|
| 93 | 103 | ||
| 94 | 104 | Use Make to compile: its recipes supply required memory and stack settings. |
|
| 95 | 105 | Use timeouts for builds, tests, scripts, and emulator runs. These limits are |