Skip to content

feat(claude-code-history-files-finder): extract-user-messages script (Core Operation 5, v1.39.0) - #274

Merged
daymade merged 1 commit into
mainfrom
feat/hff-extract-user-messages
Aug 6, 2026
Merged

feat(claude-code-history-files-finder): extract-user-messages script (Core Operation 5, v1.39.0)#274
daymade merged 1 commit into
mainfrom
feat/hff-extract-user-messages

Conversation

@daymade

@daymade daymade commented Aug 6, 2026

Copy link
Copy Markdown
Owner

把 v1.38.0 写进 references 的污染分类法变成可执行能力:scripts/extract_user_messages.py 一条命令产出「用户原话」阅读页(HTML+MD)。

过滤栈(全部经过真实 7 天多 profile 语料验证):命令信封(XML + 裸 /cmd,保留 args)→ 附录;hook/loop 注入 boilerplate 频率泛化检测(同文长文本 ≥ min-dup,零硬编码模式,独立成条 + 尾部混排两种形态都收)→ 附录;[Image #N] 剥除;长文粘贴(≥2000 字符且 ASCII≥60%,实测不误伤中文语音长输入)→ 附录;agent 腔回灌只对更早的 assistant 语料做同文/包含减法(后来的复述不吃用户原话);attachment.queued_command 中途输入回收 + 与正式投递记录 120s 去重。

验证:10 个新单测(含 agent 减法的时间方向双向标定、boilerplate 两种形态、queued list 变种);skill 全量 78 测试绿;回归审计 0 候选/613 保留;quick_validate ✅;security_scan ✅;真实语料跑出 1100 条主区,与手工基准逐条对账,全部差异可归因(窗口滑动 + 一条只有用户能确认的 agent 腔条目)。

显式排除analyze_sessions.py + session_file_format.md 当前工作区改动是另一 session 未提交的 triage WIP,不在本 PR。

🤖 Generated with Claude Code

…(Core Operation 5, v1.39.0)

New scripts/extract_user_messages.py: verbatim user-message extraction across
all homes + archives, operationalizing the v1.38.0 contamination taxonomy —
command envelopes, frequency-detected injected boilerplate (both shapes),
image placeholders, document pastes, agent-voiced re-injection (earlier-texts
only) — plus attachment.queued_command recovery with delivered-record dedupe.
10 unit tests; real-corpus run matches the hand-built reference extraction.

Excluded from this commit: analyze_sessions.py + session_file_format.md carry
a parallel session's uncommitted triage work-in-progress.

Co-Authored-By: Claude <noreply@anthropic.com>
@daymade
daymade merged commit ba95c35 into main Aug 6, 2026
4 checks passed
@daymade
daymade deleted the feat/hff-extract-user-messages branch August 6, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant