DriftReminder counts voice tags toward the closer cap; FormatGate strips them

オープン 初心者向け
#3,022 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, typescript

調査の方向性

hooks/DriftReminder.hook.ts の closerSpokenChars から始め、FormatGate による LIFEOS/TOOLS/VoiceTags.ts の stripVoiceTags の使用と比較します。提供されている probe.ts を hook に対して実行し、不正な文字数を再現します。タグ付き closer が発話文字数だけを報告し、110 文字の上限に関する誤った警告を生成しなくなった時点で変更は完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
20k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

danielmiessler/LifeOS のほかの issue

danielmiessler/LifeOS の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。