@clipboard-health/ai-rules 2.18.7 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -34,6 +34,7 @@ When a bug traces into a `@clipboard-health/*` library, read the source code in
|
|
|
34
34
|
- **playwright-reporter-llm**: Playwright reporter that outputs structured JSON for LLM agents. Minimal console output, flat schema, easy to filter to failures.
|
|
35
35
|
- **rules-engine**: A pure functional rules engine to keep logic-dense code simple, reliable, understandable, and explainable.
|
|
36
36
|
- **testing-core**: TypeScript-friendly testing utilities.
|
|
37
|
+
- **tribunal**: Structured second opinions from advocate, skeptic, analyst, and deliberator LLM perspectives.
|
|
37
38
|
- **util-ts**: TypeScript utilities.
|
|
38
39
|
|
|
39
40
|
<!-- END: Auto-generated by ./populateLibraries.ts -->
|
|
@@ -28,22 +28,12 @@ When removing a usage of a function, constant, type, or other symbol, check whet
|
|
|
28
28
|
|
|
29
29
|
## Null/Undefined Checks
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
In TypeScript code that has access to `@clipboard-health/util-ts`, prefer the named helpers over raw null/undefined comparisons:
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (shiftId && workplaceId) {
|
|
36
|
-
}
|
|
37
|
-
// Bad: use utility instead
|
|
38
|
-
if (shift === null) {
|
|
39
|
-
}
|
|
40
|
-
if (workplace === undefined) {
|
|
41
|
-
}
|
|
33
|
+
- Replace `x === undefined`, `x === null`, or `!x` (when used as a presence check) with `isNil(x)`.
|
|
34
|
+
- Replace `x !== undefined`, `x !== null`, or `x` (as a truthy presence check) with `isDefined(x)`.
|
|
42
35
|
|
|
43
|
-
|
|
44
|
-
if (isDefined(shiftId) && isDefined(workplaceId)) {
|
|
45
|
-
}
|
|
46
|
-
```
|
|
36
|
+
Import from `@clipboard-health/util-ts`.
|
|
47
37
|
|
|
48
38
|
## Types
|
|
49
39
|
|