@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/ai-rules",
3
- "version": "2.18.7",
3
+ "version": "2.20.1",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -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
- Use `isDefined` helper from `@clipboard-health/util-ts` for `null` and `undefined` checks:
31
+ In TypeScript code that has access to `@clipboard-health/util-ts`, prefer the named helpers over raw null/undefined comparisons:
32
32
 
33
- ```typescript
34
- // Bad: truthy check fails for 0, "", false
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
- // Good: explicit defined check
44
- if (isDefined(shiftId) && isDefined(workplaceId)) {
45
- }
46
- ```
36
+ Import from `@clipboard-health/util-ts`.
47
37
 
48
38
  ## Types
49
39