Repository navigation
fix: 门禁豁免技术记法 / step_01 如实改名 ingest / README 门禁与 runner 说法纠正 / TAB 损坏路径修复 - #2
Merged
Merged
Conversation
…d paths Three first-principles user-facing defects, each verified against the suite (57 passed) and the repo self-check (All checks passed): 1. check_prose.py: exempt technical punctuation from the colon/dash ban. "16:9 横版 / 封面 4:3 和 3:4 / 12:30 / 2024–2026" are unavoidable notation for this content genre but were hard-failing the gate (exit 1). The fix is narrow: only "digit : digit" and "digit – digit" (no spaces, ASCII-side) pass as a warning; ":", "——" and prose-colon enumeration still fail as before. Verified: tech.md exit 0, bad.md (三点: / ——) exit 1. 2. step_01_optimize.py -> step_01_ingest.py. The step copied the input verbatim yet was named "optimize" and told the user to "Review draft.md" as if it were polished. Renamed; docstring, argparse help, the pass-through comment and the "ACTION REQUIRED" output now say plainly: this is a verbatim copy, the agent must optimize + sanitise per SKILL.md, then run step 02. Three test_runner.py assertions updated from the old name to "ingest". step_02 hint updated too. 3. TAB-corruption: skills/tryworld-koubo/SKILL.md:21 and skills/tryworld-topics/SKILL.md:12 had "tryworld-paper" / "topic_sources" / "topic_rules" mangled by a lost backslash-t (a literal TAB mid-word), so the path/field references were never resolvable on any install. Repaired in the git blob (verified: tab count 1 and 3 -> 0).
…st usage, 8 exemption tests
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.
背景
从第一性原理用户视角审查本仓库(克隆、跑通 57 项测试、实测门禁与 runner)后,修几类「文档说法与代码行为不一致 / 首次使用必踩坑」的问题。不改变任何硬门禁语义(确认闸门、sha256 绑定、交付核验退出码不变)。
改动
1. 标点豁免技术记法(实测 16:9 曾被 exit 1)
check_prose.py新增窄豁免:只放行数字间的16:9、4:3、12:30、2024–2026(降为可见提示)。提示性冒号、——破折号、带空格12 :30、词间–照旧拦截。视频做成 16:9 横版,封面用 4:3 和 3:4。发布时间 12:30 与 19:30。→ exit 0(豁免提示)请注意以下三点:第一,带身份证。→ exit 1(不变)价格降了一半——这个降幅很少见。→ exit 1(不变)2. step_01_optimize → step_01_ingest(诚实改名)
该步骤一直逐字复制输入(原注释:
For now, pass through. In production, Agent would optimize here.),README 却写01 optimize并演示--steps 1,2,用户会误以为 draft 已被润色。改名 + docstring/argparse/输出全部如实(这是逐字副本,优化与净化是 agent 按 SKILL.md 的活)。test_runner 三处断言同步。3. README「禁的是修辞动作不是字面」改为如实描述(中英)
实测:换词表达同一动作可过(
其实是统计,而非理解→ exit 0),而平实因果会误杀(不是因为原料贵,而是……→ exit 1)。实现是字面正则+词表,不是语义分析。新文案如实分层:5 类可拦截(标点/硬停词/绝对黑话/模型路标/翻案句式)· 约 17 类仅提示 · 换词可漏网 · 活人感本体在 workflow.md §1.2.1 七遍改稿指令。workflow.md§1.2.1 第 5 条与titles.md同步口径,防散文与代码漂移。4. 修复 TAB 损坏的路径引用(自 6f81f86 / 2026-09-01 起影响所有安装)
koubo/SKILL.md:21、topics/SKILL.md:12的\tryworld-paper/...、\topic_sources、\topic_rules(真实制表符吞掉路径与字段名,导致这些引用在任何安装环境都无法解析),已在 git blob 层修复。本地~/.agents/skills的安装副本同样带此损坏。5.
--whitelist接入流水线并写明可见性脚本一直支持该参数,但全部 .md 零提及、step_02/runner 也不转发。现已接入(路径按调用方 cwd 解析为绝对路径)。豁免=删除文本不再检查,运行会打印
NOTE:行;README 写明只宜具体词条(过宽模式清空全文则 exit 2)。测试
python -m pytest tests/ -q→ 65 passed(57 旧 + 8 新:豁免边界、拦截保持、白名单行为含非法正则不崩溃)python -X utf8 scripts/check_skills.py→ All checks passedgit diff --check干净;提交 blob 全部 LF(git show <ref>:<file> | tr -cd '\r' | wc -c= 0)--steps 1输出如实提示;--dry-run --whitelist正确转发说明(刻意不做)
E:\Codex口播视频等默认值保留:字段已参数化(content theme JSON 的topic_dedup_dir可改);文档中 21 处$env:USERPROFILE在本机 PowerShell 5.1/7 均实测有效,不做无收益的大范围替换验证方法