DriftReminder counts voice tags toward the closer cap; FormatGate strips them
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- bun, typescript
- Ambito
- ai-infra-agents
Direzione di ricerca
Inizia con closerSpokenChars in hooks/DriftReminder.hook.ts e confrontalo con l’uso di stripVoiceTags da LIFEOS/TOOLS/VoiceTags.ts effettuato da FormatGate. Esegui il probe.ts fornito contro l’hook per riprodurre il conteggio errato dei caratteri. La modifica è completata quando i closing con tag riportano solo la propria lunghezza in caratteri parlati e non producono più un falso avviso sul limite di 110 caratteri.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 20k
- Fork
- 2.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di danielmiessler/LifeOS
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
danielmiessler/LifeOS#3028 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
danielmiessler/LifeOS#3023 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
danielmiessler/LifeOS#3020 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
danielmiessler/LifeOS#3018 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
danielmiessler/LifeOS#3017 ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di danielmiessler/LifeOS
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Koenkk/zigbee2mqtt#33855 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
yavorsky/unbuilt.app#65 ·