pi-fluency 0.1.2 → 0.1.3
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/README.md +1 -1
- package/extensions/pi-fluency/analytics.ts +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Pi Fluency counts only findings you accept. Every analyzer-classified English pr
|
|
|
66
66
|
accepted mistake rate = accepted occurrences / English words × 1000
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Stats covers trailing 30 local calendar days. It shows accepted rate, review coverage, one-off total, recurring patterns, and trends. Pattern list is sorted by accepted occurrence count. Pattern becomes recurring after at least two
|
|
69
|
+
Stats covers trailing 30 local calendar days. It shows accepted rate, review coverage, one-off total, recurring patterns, and trends. Pattern list is sorted by accepted occurrence count. Pattern becomes recurring after accepted findings appear in at least two distinct prompts across retained history; one-offs remain in overall accepted totals and rate but stay out of recurring-pattern list and toolbar count.
|
|
70
70
|
|
|
71
71
|
Toolbar summarizes current activity and accepted-mistake trends:
|
|
72
72
|
|
|
@@ -186,12 +186,15 @@ export function computeFluencyAnalytics(input: AnalyticsInput): FluencyAnalytics
|
|
|
186
186
|
&& within(occurrence.localDate, start, end)).length;
|
|
187
187
|
};
|
|
188
188
|
|
|
189
|
-
const
|
|
190
|
-
|
|
189
|
+
const acceptedPromptHashesForGroup = (group: RuleGroup): Set<string> => new Set(
|
|
190
|
+
occurrences
|
|
191
|
+
.filter((occurrence) => occurrence.decision === "accepted" && group.patternIds.has(occurrence.patternId))
|
|
192
|
+
.map((occurrence) => occurrence.promptHash),
|
|
193
|
+
);
|
|
191
194
|
const recurringGroups = [...groupsByExplanation.values()].filter((group) =>
|
|
192
|
-
|
|
195
|
+
acceptedPromptHashesForGroup(group).size >= 2);
|
|
193
196
|
const oneOffAccepted = [...groupsByExplanation.values()]
|
|
194
|
-
.filter((group) =>
|
|
197
|
+
.filter((group) => acceptedPromptHashesForGroup(group).size === 1)
|
|
195
198
|
.reduce((sum, group) => sum + acceptedForGroup(group, today, TREND_DAYS), 0);
|
|
196
199
|
|
|
197
200
|
const rules = recurringGroups.flatMap((group): RuleAnalytics[] => {
|