Reduce only against a closed set: what the text must cover is in hand and nothing unseen is coming. This runs inside one turn — nothing waits on the user.
Set the old wording aside. Take what the text must cover and derive the shortest statement that covers all of it — deleting sentences keeps whichever ones happened to be there, which is not the shortest way to cover the set. Try a tree or a table as a candidate where the covered cases nest, run in order or stand side by side; it wins only by being shorter.
If what it must cover has moved since the text was written — cases now in hand it was not derived on, an objective it was not written for — derive from the coverage as it stands today. What comes out is a new derivation of the current set, standing on its own. Between candidate statements, prefer the shortest one that covers everything over the one that keeps the original's shape.
Push the derived statement shorter, pass by pass. When a pass makes it stop covering something, it went too far — back off by the minimum that recovers it. The floor is where every remaining cut costs coverage; a clause that survives every pass is load-bearing.
Hand back the reduced statement alone.
What it must cover can't be stated or recovered → every cut is blind. Something unseen will meet it — a class no rule yet decides, or a rule that decides only the cases it came from → use widen skill.
仅针对封闭集合进行精简:文本必须覆盖的内容已全部掌握,且不存在尚未纳入的新内容。整个过程在单轮内完成——无需等待用户输入。
先将旧表述搁置。依据文本必须覆盖的内容,推导出能够覆盖全部内容的最短陈述——删除句子只会保留碰巧存在的句子,这并不是覆盖该集合的最短方式。可以尝试以树状结构或表格作为候选方案,前提是被覆盖的用例能够嵌套、按顺序排列或并列呈现;只有当它更短时,这种方案才胜出。
如果文本必须覆盖的内容自撰写以来发生了变化——例如,现在掌握了原文推导时未包含的用例,或出现了原文并非为之而写的新目标——则应根据当前实际覆盖范围重新推导。所得结果是对当前集合的一次全新推导,能够独立成立。在候选陈述之间,应优先选择覆盖全部内容的最短版本,而不是保留原文结构的版本。
逐轮继续压缩推导后的陈述。如果某一轮压缩导致它无法再覆盖某些内容,说明压缩过度——只需回退到能够恢复覆盖范围的最小幅度。压缩下限在于,再做任何删减都会损失覆盖范围;经过每一轮压缩仍然保留的子句,就是不可或缺的核心内容。
仅返回精简后的陈述。
如果文本必须覆盖的内容无法陈述或无法恢复,那么每次删减都是盲目的。将来会出现未预料到的内容——例如,某个尚无规则能够判定的类别,或某条只能判定其来源用例的规则——请使用 widen skill。