feat(claude-md-progressive-disclosurer): hotspot-first profiling + scripted section sink + compression-fidelity audit (Case 19) - #277
Merged
Conversation
…下沉脚本化 + 压缩保真审计(案例 19) 真实 168KB 全局 CLAUDE.md 优化 session 反哺:热点排序缺位被用户当场打断、 Codex project_doc_max_bytes 静默截断 41% 数周、压缩重述丢限定词(/forks) 被独立审计抓出。新增 scripts/profile_claude_md.py(分节字节表=工作顺序、 fence 假节守卫、CJK token 比率)与 scripts/sink_sections.py(verbatim 下沉 事务:提取→追加→自底向上替换→整串验证→回滚,拒写 symlink 目标)。 载体表补官方 ~/.claude/rules/ paths 机制与 <200 行目标。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvNKng24noMLREHpRmpTWN
…ard 补目录级盲区(HIGH) + 6 LOW HIGH-1: 文件级 islink 被父目录 symlink 静默穿透(审阅实测打穿),改 realpath≠abspath 判定 + --allow-symlinked-target 显式放行;四条路径双向标定 (dir-symlink ABORT / flag 放行 / EOF 末节 / 重名标题 abort)。LOW: EOF 末节 支持、重名唯一性检查、snippet 保留标题行入文档、父节含子节提示、案例 19 size 数字加"非通过条件"注记、164/168KB 时点澄清、分隔线。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NvNKng24noMLREHpRmpTWN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Feeds a real 168KB-global-CLAUDE.md optimization session back into the methodology (suite
daymade-claude-code1.41.0 → 1.42.0):/contextshare, per-section byte table (descending order = work order, same-level comparison caveat), line-length distribution, and consumer truncation caps (Codexproject_doc_max_bytessilently hid 41% of the file for weeks). Instrument pitfalls encoded: fence-unaware heading regex fabricates phantom sections; chars/4 underestimates CJK >2x.scripts/sink_sections.py— fence-aware extraction → verbatim append with dated provenance → bottom-up splice → whole-string verification → rollback; refuses targets whose path crosses a symlink at any component (file OR parent dir) with--allow-symlinked-targetescape.~/.claude/rules/+paths:frontmatter (file-trigger boundary stated), <200-line target,/doctortrim check, HTML-comment maintainer notes.scripts/profile_claude_md.py(new), references Case 19, CHANGELOG entry, description +2 trigger phrases (1011/1024).Verification
islinkcheck was bypassed by a symlinked parent directory in live testing; fixed viarealpath != abspathand calibrated in both directions (dir-symlink ABORT / flag allow / EOF section / duplicate-heading abort), plus 6 LOW fixes.🤖 Generated with Claude Code
https://claude.ai/code/session_01NvNKng24noMLREHpRmpTWN