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
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ When running Ruby directly (e.g. `ruby -e ...`, `gem`, profiling tools), never u
27
27
### Development Flow
28
28
29
29
- Write new code (using Sorbet `sig` type signatures and `typed: strict` for new files).
30
-
- Write new tests (avoid more than one `:integration_test` per file for speed). Try `typed: true` as a baseline but revert to `typed: false` if there are not easily fixable errors.
30
+
- Write new tests (avoid more than one `:integration_test` per command for speed; add another only for essential core functionality in essential non-developer commands). Try `typed: true` as a baseline but revert to `typed: false` if there are not easily fixable errors.
31
31
Write fast tests by preferring a single `expect` per unit test and combine expectations in a single test when it is an integration test or has non-trivial `before` for test setup.
32
32
- When adding or tightening tests, verify them with a red/green cycle using the exact `--only=file:line` target for the example you changed.
33
33
- Formula classes created in specs may be frozen; avoid stubbing class methods on them with RSpec mocks and prefer instance-level stubs or test setup that does not require class-method stubbing.
@@ -59,3 +59,4 @@ When running Ruby directly (e.g. `ruby -e ...`, `gem`, profiling tools), never u
59
59
9. Inline new or existing methods as methods or local variables unless they are reused 2+ times or needed for unit tests.
60
60
10. Avoid `T.must`; prefer explicit nil checks or APIs that return non-nil values.
61
61
11. Keep `extend/os/*` prepends as thin as possible; put the `prepend` in the OS-specific `linux` or `macos` file rather than the shared `extend/os/*` loader with an inline `if`, and prefer putting substantive logic in shared code outside `extend/` when practical so it can be tested on all platforms instead of relying on `:needs_linux` or `:needs_macos` specs.
62
+
12. When Bash logic mirrors Ruby logic, keep both implementations in sync and add two-way comments naming the matching Ruby and Bash locations; keep matching helper filenames aligned where practical.
0 commit comments