@clipboard-health/ai-rules 2.20.8 → 2.20.10

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.20.8",
3
+ "version": "2.20.10",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
@@ -51,6 +51,8 @@ If no existing fix is found, proceed to Phase 2.
51
51
 
52
52
  Follow [`references/plan.md`](./references/plan.md). It walks investigation, diagnosis, evidence gathering, and the fix decision tree, and produces a structured plan with confidence score.
53
53
 
54
+ If the plan's confidence is less than 5/5, it must include the frontend and/or backend observability changes needed to reach 5/5 confidence next time. The plan may request changes across multiple repositories; assume we have access to all code.
55
+
54
56
  If you are in plan mode, present the plan and stop here.
55
57
 
56
58
  ## Phase 3: Apply the plan (fix mode only)
@@ -50,6 +50,8 @@ Before proposing a fix, gather:
50
50
  - A brief **explanation** of why the flake is intermittent (what timing or state condition triggers it)
51
51
  - A **confidence score** (1-5, see [Confidence Score](#confidence-score))
52
52
 
53
+ If confidence is less than 5/5, the plan must include the frontend and/or backend observability changes that would provide enough evidence for 5/5 confidence next time. Do not limit that recommendation to the current repository -- the plan may request changes in multiple repositories because we have access to all code.
54
+
53
55
  If confidence is 2 or below, the plan is to gather more data: recommend specific reproduction steps or instrumentation rather than a code fix.
54
56
 
55
57
  If >2, continue to [Decide Fix Approach](#decide-fix-approach).
@@ -169,6 +171,8 @@ Do not propose a fix without concrete artifacts. At minimum, include:
169
171
  - When available: **Datadog trace** via `attempts[].network.instances[].traceId` showing backend behavior for the failing request
170
172
  - A **confidence score** from 1 to 5 rating how certain you are in the root cause diagnosis
171
173
 
174
+ If confidence is less than 5/5, identify the missing evidence and propose concrete frontend and/or backend observability changes that would make the next occurrence diagnosable at 5/5 confidence. These changes may span multiple repositories.
175
+
172
176
  If confidence is 2 or below, do not propose a code fix. Instead, recommend specific instrumentation or reproduction steps to raise confidence.
173
177
 
174
178
  If >2, continue to [Decide Fix Approach](#decide-fix-approach).
@@ -220,6 +224,7 @@ Produce the plan with these fields:
220
224
  - **Root cause:** concise technical explanation
221
225
  - **Evidence:** artifacts supporting the diagnosis (traces, network, error messages, screenshots as applicable)
222
226
  - **Proposed fix:** test harness, product, or both — with the specific file(s) and the change you would make
227
+ - **Observability to reach 5/5:** required when confidence is less than 5/5. List the frontend and/or backend telemetry, logging, tracing, reporter, or metric changes that would make this flake diagnosable with 5/5 confidence next time, including any repositories that should change. Use "N/A -- confidence is 5/5" only for a 5/5 plan.
223
228
  - **Sibling candidates:** files that appear to share the same anti-pattern, for the reviewer (or fix.md) to confirm. Or "N/A -- fix is test-specific" if the issue is one-off (see [`fix.md`](./fix.md) for what counts as a structural anti-pattern worth searching for).
224
229
  - **Validation plan:** lint/typecheck commands and test commands to run after applying the fix
225
230
  - **Open questions:** anything that needs human input before fixing