pi-fluency 0.1.1 → 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 +2 -4
- package/extensions/pi-fluency/analytics.ts +7 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,9 +66,9 @@ 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
|
|
|
73
73
|
```text
|
|
74
74
|
📥 12 💡 6 ▆▄▃▂▁▂▂ 8.4/k
|
|
@@ -81,8 +81,6 @@ README toolbar example uses portable emojis instead of Nerd Font glyphs:
|
|
|
81
81
|
| `▆▄▃▂▁▂▂` | Seven rolling accepted-mistake rates |
|
|
82
82
|
| `8.4/k` | Latest accepted mistakes per 1,000 English words |
|
|
83
83
|
|
|
84
|
-
Actual Pi toolbar currently uses Nerd Font icons. Counts and rates remain readable when those glyphs are unavailable.
|
|
85
|
-
|
|
86
84
|
## Data and limitations
|
|
87
85
|
|
|
88
86
|
Pi already sends your prompts to selected main model. When enabled, Pi Fluency additionally sends eligible, filtered prompt prose to analysis model you choose during setup. It excludes assistant messages, tool output, slash commands, injected extension input, and code; it also redacts common credentials before analysis.
|
|
@@ -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[] => {
|