Sprint 24 — Task List【免费下载链接】caveman why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman项目地址: https://gitcode.com/GitHub_Trending/caveman1/cavemanHigh PriorityTF-456: Fix WebSocket reconnection race condition— RT collab fail reconnect after network drop. WS reconnect race JWT refresh. Client reconnect w/ expired token before refresh done. Alex Chen. Due Apr 11. Blocks enterprise demo Apr 14.TF-489: Optimize dashboard query for large projects— Dashboard 8s load when project 500 tasks. Missing composite index ontasks(project_id, status, updated_at) N1 query in task assignee resolution. Sam Rivera. Due Apr 9.TF-501: Implement chunked file upload— Attachments 10MB timeout on slow connections. Refactor upload endpoint: multipart chunked uploads w/ resume. Frontend: show progress, allow cancel. Jordan Kim. Due Apr 15.Medium PriorityTF-478: Add Slack notification integration— Notify Slack channel on task assign/status change. Webhook infra ready. Wire event handlers in task service Slack msg formatting. Jordan Kim. Due Apr 18.TF-492: Fix timezone display for due dates— Dates show UTC not user local tz. Fix API serialization (add tz to user profile response) frontend date utils.formatDateinsrc/lib/dates.tsneeds tz param. Maya Patel. Due Apr 16.TF-503: Add keyboard shortcuts for common actions— Users want shortcuts: new task (CtrlN), search (CtrlK), view nav. Use centralized shortcut manager, not individual listeners. Considertinykeys(700b gzipped). Maya Patel. Due Apr 20.Low PriorityTF-467: Update README with new architecture diagram— Diagram outdated, missing background job system Redis cache layer. Update before open-source community call Apr 25. Unassigned.TF-510: Investigate Playwright test flakiness— E2E drag-and-drop reorder fails ~1/5 CI runs. Timing issue w/ animation completion detection. Not blocking, but hurts test confidence. Unassigned.TF-498: Clean up deprecated API endpoints— v1 endpoints deprecated 3mo ago, safe to remove. Frontend on v2 exclusively. Remove:GET /api/v1/tasks,POST /api/v1/tasks,PUT /api/v1/tasks/:id. Unassigned.Completed This SprintTF-445: Migrate from Webpack to Vite— Maya, Apr 2. Build 45s→8s. HMR much faster.TF-451: Add rate limiting to public API endpoints— Alex, Apr 3.express-rate-limitw/ Redis. 100 req/min authed, 20 unauthed.TF-460: Fix CORS configuration for staging environment— Sam, Apr 1. Staging domain missing from allowed origins.对照原文 [todo-list.original.md](https://link.gitcode.com/i/5b2473d34ec7584fe751c2fdd2c5cbbe) 可以看到,压缩后文件保持了与原文完全一致的结构骨架: - **标题层级原样保留**:# Sprint 24 — Task List 及 ## High / Medium / Low Priority、## Completed This Sprint 四个二级标题,文本一字未改(校验器对标题文本变更是报错而非警告,见后文)。 - **12 个任务项全部保留**,编号(TF-445 ~ TF-510)、负责人姓名(Alex Chen、Sam Rivera、Jordan Kim、Maya Patel)、截止日期、优先级分组与原文一一对应。 - **12 处内联代码原样保留**:复合索引 tasks(project_id, status, updated_at)、src/lib/dates.ts、formatDate、tinykeys、GET /api/v1/tasks 等三个 API 端点、express-rate-limit 等,包括反引号本身。 - **所有数值保留**:8s、500 tasks、10MB、700b gzipped、45s→8s、100 req/min authed, 20 unauthed、~1/5 CI runs 等。 被压缩掉的只有连接句与语法填充成分。以 TF-456 为例,原文是一个三句完整叙述: The real-time collaboration feature fails to reconnect after network interruption because the WebSocket reconnection logic races with the JWT refresh flow. The client tries to reconnect with an expired token before the refresh completes. Assigned to Alex Chen. Due by April 11, 2026. This is blocking the enterprise demo scheduled for April 14. 压缩后变为电报式短句: RT collab fail reconnect after network drop. WS reconnect race JWT refresh. Client reconnect w/ expired token before refresh done. Alex Chen. Due Apr 11. Blocks enterprise demo Apr 14. 变化模式是统一的:删除冠词与助动词、The real-time collaboration feature 缩为 RT collab、because...races with 缩为 race、日期 April 11, 2026 缩为 Apr 11、去掉 Assigned to / Due by / This is blocking 这类框架语,只留下动作与事实。信息量(现象、根因、负责人、期限、阻塞关系)没有丢失,丢掉的只是英语语法外壳。 ## 压缩规则:产生这份文件的转换契约 这份 fixture 的生成规则定义在 [skills/caveman-compress/SKILL.md](https://link.gitcode.com/i/afa837a7bc565abca3aeb468f976731e),分为四类: **删除(Remove)** - 冠词:a, an, the - 填充词:just, really, basically, actually, simply, essentially, generally - 客套话:sure、certainly、of course、happy to、Id recommend - 模糊措辞:it might be worth、you could consider、it would be good to - 冗余短语:in order to → to、make sure to → ensure、the reason is because → because - 连接性赘词:however、furthermore、additionally **原样保留,绝不修改(Preserve EXACTLY)** - 代码块(fenced 与缩进代码块) - 内联代码(反引号内容) - URL 与链接、文件路径(/src/components/...、./config.yaml) - 命令(npm install、git commit、docker build) - 技术术语(库名、API 名、协议、算法)、专有名词(项目、人、公司) - 日期、版本号、数值、环境变量($HOME、NODE_ENV) **保留结构(Preserve Structure)** - 所有 Markdown 标题(标题文本保持精确,只压缩其下正文) - 项目符号层级、编号列表、表格(压单元格文本、保结构)、frontmatter **压缩手法(Compress)** - 短同义词:big 不用 extensive、fix 不用 implement a solution for - 允许句子碎片:Run tests before commit 而非 You should always run tests before committing - 合并表达相同内容的重复 bullet,多个同模式例子只留一个 其中被标为 CRITICAL RULE 的一条是: ... 内的内容必须逐字节复制,不许删注释、不许动空格、不许重排行、不许缩短命令;反引号内的内容同理。todo-list.md 的 12 处内联代码无一被改动,正是这条规则的执行结果。 ## 源码级实现:从文件类型检测到六道结构校验 **入口与类型检测。** 命令行入口在 [skills/caveman-compress/scripts/cli.py](https://link.gitcode.com/i/1f6e62dff8c6ce6ba2a4e094e9e37384):校验参数、确认文件存在且是文件、resolve() 成绝对路径后调用 detect_file_type() 与 should_compress(),再执行 compress_file()。检测逻辑在 [detect.py](https://link.gitcode.com/i/9e38470799fef49a067b8d5e843502d7):.md、.txt、.rst、.typ、.typst、.tex 归为可压缩的自然语言;.py/.js/.ts/.json/.yaml 等归为代码或配置直接跳过;无扩展名文件(如裸 TODO)则读前 50 行做启发式判断(shebang、JSON/YAML 形态、代码行占比 40%)。should_compress()([detect.py](https://link.gitcode.com/i/c21d1babd9dced5f699c66c9c5c6a253))额外硬性跳过 .original.md 备份文件——这对 tests/caveman-compress/ 目录很重要:原文与压缩版并存时,压缩器绝不会把备份再当输入。 **压缩流程与重试。** 按 [SKILL.md](https://link.gitcode.com/i/afa837a7bc565abca3aeb468f976731e) 的 Process 定义,实际调用链是:检测文件类型(不耗 token)→ 调用 Claude 压缩(一次调用)→ 本地 Python 校验(不耗 token)→ 若校验失败,只把**挑出来的问题项**交给 Claude 做定点修补(不重新压缩)→ 最多重试 2 次 → 仍失败则报错并**保持原文件不动**。整个流程中只有首次压缩和定点修补两件事消耗 token,其余全是本地运算。 **校验器的六道检查。** [validate.py](https://link.gitcode.com/i/8f422bb2a11a09ebf59c2434e3ccba35) 的 validate() 依次执行六项比对: 1. validate_headings:标题数量不等或**标题文本**变更是 error(改标题会静默打断所有指向 slug 的锚点链接);仅级别变化(如 ## 变 ###)降级为 warning,因为 slug 由文本决定,链接仍可解析([validate.py](https://link.gitcode.com/i/23f9682c440c0c0d4a5829cf99fd4687)); 2. validate_code_blocks:fenced 与缩进代码块列表逐一比对,任何差异即 error。注意 extract_indented_code_blocks 是刻意保守实现的——列表项内部的 4 空格缩进视为内容缩进而非代码,避免把嵌套 bullet 误判成代码块; 3. validate_urls:URL 集合双向比对,丢失或新增都报 error; 4. validate_paths:路径丢失只有被 DEFINITE_PATH_REGEX 判定为无歧义路径(以 ./、../、/、盘符开头,或末段带扩展名)时才升为 error,像 pros/cons 这种散文斜杠对只算 warning([validate.py](https://link.gitcode.com/i/938a3635ac0bc4df5d918eee316a8df7)); 5. validate_bullets:项目符号数量偏差超过 15% 报 warning(todo-list.md 原文与压缩后 bullet 数一致,该项恒过); 6. validate_inline_codes:内联代码用 Counter 计数比对,丢失是 error、新增是 warning;提取前会先剔除 fenced 块并抹平裸露的 fence 标记行,防止缩进 fence 里的反引号打乱 span 配对。 README 中All fixture validations passed: headings, code blocks, URLs, and file paths were preserved exactly一句,就是这组校验器对 tests/caveman-compress/ 全部 5 个 fixture(含 todo-list 对)跑通后的结论。仓库根 tests/ 下还有 test_compress_safety.py、test_compress_concurrency.py、test_validate_inline.py 等针对压缩管线安全性、并发锁与内联校验的测试脚本。 ## 备份机制:压缩版覆盖原文,原文退到树外 运行成功后,压缩内容**原地覆盖**目标文件,而人类可读的备份写作 filename.original.md,但它**不放在源文件旁边**,而是放入树外数据目录:macOS/Linux 为 $XDG_DATA_HOME/caveman-compress/backups/父目录名/,Windows 为 %LOCALAPPDATA%\caveman-compress\backups\父目录名\([skills/caveman-compress/SKILL.md](https://link.gitcode.com/i/afa837a7bc565abca3aeb468f976731e))。这样设计的原因是避免技能的自动加载器把备份当成第二份活动文件重复摄入;修改记忆时应当编辑树外的 .original.md,再重新运行压缩。cli.py 在成功时会同时打印两个路径([cli.py](https://link.gitcode.com/i/9cb2cb96a449e630f8d5d3bb765aabea)):Compressed: 目标文件 Original: 备份目录/ .original.md## 复现:如何压缩你自己的任务清单 前置要求:Python 3.10,且该技能随 caveman 插件内置,安装 caveman 后即可用。 **方式一:斜杠命令(在 Claude Code 会话中)**/caveman-compress示例:/caveman-compress CLAUDE.md、/caveman-compress docs/preferences.md、/caveman-compress todos.md。技能会定位到 SKILL.md 相邻的 scripts/__main__.py 并执行之。 **方式二:直接调用脚本(查看/运行方式,不修改本仓库)** bash # 在 skills/caveman-compress/ 目录下 python3 -m scripts /absolute/path/to/todos.md方式三:单独跑结构校验器,对比任意两份文件(例如本仓库的原文与压缩版 fixture):python3 skills/caveman-compress/scripts/validate.py tests/caveman-compress/todo-list.original.md tests/caveman-compress/todo-list.md【免费下载链接】caveman why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman项目地址: https://gitcode.com/GitHub_Trending/caveman1/caveman创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考