DriftReminder counts voice tags toward the closer cap; FormatGate strips them
Maintainer thường phản hồi trong vòng 5 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bun, typescript
- Lĩnh vực
- ai-infra-agents
Hướng nghiên cứu
Bắt đầu với closerSpokenChars trong hooks/DriftReminder.hook.ts và so sánh với cách FormatGate sử dụng stripVoiceTags từ LIFEOS/TOOLS/VoiceTags.ts. Chạy probe.ts được cung cấp đối với hook để tái hiện số ký tự không chính xác. Thay đổi hoàn tất khi các closer có thẻ chỉ báo độ dài theo số ký tự được nói và không còn tạo cảnh báo giới hạn 110 ký tự sai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version
LifeOS 8.761.0 · attestation: 9 system file(s) differ from danielmiessler/[email protected]:
- hooks/lib/lane-rules.ts
- hooks/DriftReminder.hook.ts
- skills/LifeOS/SKILL.md
- agents/Sonnet.md
- agents/Sol.md
- LIFEOS/TOOLS/vendor-pricing.json
- LIFEOS/TOOLS/models.ts
- LIFEOS/DOCUMENTATION/Notifications/NotificationSystem.md
- LIFEOS/DOCUMENTATION/ARCHITECTURE_SUMMARY.md
What is broken
The per-turn FORMAT CONTRACT line reports a closer as over the 110-character spoken cap when its spoken words are well under it. closerSpokenChars in DriftReminder counts Fish voice tags ([direction], <emphasis>) toward the cap, while FormatGate strips them with stripVoiceTags before measuring, and the system prompt says the length cap sees only the spoken words. The two hooks disagree on any tagged closer, and the false warning is fed to the model on the next turn.
Where (file:line)
hooks/DriftReminder.hook.ts:188
Repro on a clean tree
1. End a reply with a tagged closer: `🗣️ Nova: [casual, chatting with a friend] Okay, no more stage directions about being chill. [curious] How's <emphasis>this</emphasis> one?`
2. Submit the next prompt and read the FORMAT CONTRACT line.
3. It says `closer 129 chars (spoken cap 110)`. The spoken words are 65 characters.
Negative control
Probe: bun /tmp/claude-1000/-home-<name>-Work/4d3f9697-7e30-43e7-8a1a-285ff614679e/scratchpad/report/probe.ts skills/LifeOS/install/hooks/DriftReminder.hook.ts · exit 1 · captured 2026-11-29T00:14:55.730Z
Red looks like: counts 129, spoken words are 65
DriftReminder counts 129, spoken words are 65, cap 110
Suggested fix
Pass the line through stripVoiceTags (already used by FormatGate) before taking its length.
--- a/hooks/DriftReminder.hook.ts
+++ b/hooks/DriftReminder.hook.ts
@@ -40,6 +40,7 @@
import { dirname, join } from "node:path";
import { firstBannedHit } from "./lib/banned-vocab";
import { getLifeosDir, getSettingsPath } from "./lib/paths";
+import { stripVoiceTags } from "../LIFEOS/TOOLS/VoiceTags";
import { hookDrawn, hookCovers } from "./lib/function-hooks"; // public issue #1974 @sabo961, PR #1918 @PigLardLord
import { EM_DASH_MAX, packedBulletPairs } from "./lib/format-caps"; // public issue #2166, @IvanLeontev-stack
@@ -188,7 +189,7 @@
function closerSpokenChars(text: string): number {
const closers = text.split("\n").filter((l) => l.includes("🗣️"));
if (closers.length === 0) return 0;
- return closers[closers.length - 1].replace(/^\s*🗣️\s*[^:]{0,24}:\s*/u, "").trim().length;
+ return stripVoiceTags(closers[closers.length - 1].replace(/^\s*🗣️\s*[^:]{0,24}:\s*/u, "")).length;
}
function measure(text: string): FormatMeasure {
Environment
- OS: (x64)
- Harness: claude-code
- bun: 1.4.5 · git: 2.56.0
- Doctor broken: none
- Ngôn ngữ chính
- TypeScript
- Star
- 20k
- Fork
- 2.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của danielmiessler/LifeOS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
danielmiessler/LifeOS#3028 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#3023 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
danielmiessler/LifeOS#3020 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 78/100
danielmiessler/LifeOS#3018 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
danielmiessler/LifeOS#3017 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của danielmiessler/LifeOS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Koenkk/zigbee2mqtt#33855 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
yavorsky/unbuilt.app#65 ·