analyze-2-func-specs
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAnalyze Two Functional Specs
分析两个功能规格
Always use the skill to retrieve the ***plain syntax rules — but only if you haven't done so yet.
load-plain-reference请始终使用skill 来获取***plain语法规则——但仅在尚未获取过的情况下执行此操作。
load-plain-referenceInput
输入
Two functional specs from a file (or across modules). The user provides them directly or points to them by location in a file.
.plainrequires来自文件(或跨模块)的两个功能规格。用户会直接提供这些规格,或通过文件中的位置指向它们。
.plainrequiresWorkflow
工作流程
- Read both functional specs and the section so all referenced
***definitions***are understood.:Concepts: - Determine chronological order — which spec comes first? The earlier spec was rendered first and the later spec was rendered with the earlier one in context.
- Run the conflict analysis using the checklist below.
- Output the verdict and nothing else — either or
COMPATIBLE. No reasoning, no category labels, no resolution suggestions.CONFLICTING
- 读取两个功能规格及部分,以理解所有引用的
***definitions***。:Concepts: - 确定时间顺序——哪个规格更早?较早的规格会先被渲染,较晚的规格会在考虑较早规格的上下文后渲染。
- 使用下方的检查清单进行冲突分析。
- 仅输出判定结果——要么是,要么是
COMPATIBLE。无需解释、分类标签或解决方案建议。CONFLICTING
Conflict Analysis Checklist
冲突分析检查清单
Work through each question. If any answer is "yes", the specs likely conflict.
逐一回答以下问题。若任何问题的答案为“是”,则规格很可能存在冲突。
1. Direct Contradiction
1. 直接矛盾
Do the two specs make mutually exclusive assertions about the same behavior?
Spec A: The system should return :Resource: items sorted by name in ascending order.
Spec B: The system should return :Resource: items sorted by creation date in descending order.
Verdict: CONFLICTING — both define the sort order for the same response,
but specify different fields and directions. A single implementation cannot
satisfy both unless scoped to different contexts.两个规格是否对同一行为做出了互斥的断言?
Spec A: 系统应返回按名称升序排序的:Resource:项。
Spec B: 系统应返回按创建日期降序排序的:Resource:项。
Verdict: CONFLICTING — 两者都定义了同一响应的排序规则,但指定了不同的字段和排序方向。除非限定在不同的上下文场景中,否则单一实现无法同时满足两者要求。2. State or Data Conflict
2. 状态或数据冲突
Does one spec set a state or value that the other spec assumes is different?
Spec A: :TaskList: should initially be empty.
Spec B: :TaskList: should contain a default "Welcome" :Task: on first load.
Verdict: CONFLICTING — both define the initial state of :TaskList: differently.其中一个规格设置的状态或值是否与另一个规格假设的状态或值不同?
Spec A: :TaskList:初始应为空。
Spec B: :TaskList:在首次加载时应包含一个默认的“Welcome”:Task:。
Verdict: CONFLICTING — 两者对:TaskList:的初始状态定义不同。3. Behavioral Override
3. 行为覆盖
Does the later spec silently replace behavior established by the earlier spec without acknowledging it?
Spec A: The system should validate :User: credentials using an API key.
Spec B: The system should validate :User: credentials using OAuth 2.0.
Verdict: CONFLICTING — both define the authentication mechanism but pick
different approaches. The later spec overrides the earlier one.较晚的规格是否在未明确说明的情况下,替换了较早规格确立的行为?
Spec A: 系统应使用API密钥验证:User:凭证。
Spec B: 系统应使用OAuth 2.0验证:User:凭证。
Verdict: CONFLICTING — 两者都定义了身份验证机制,但选择了不同的实现方式。较晚的规格覆盖了较早的规格。4. Scope Ambiguity
4. 范围模糊
Are the two specs ambiguous enough that a renderer could interpret them as conflicting, even if the user intends them to be complementary?
Spec A: The system should return all :Resource: items.
Spec B: The system should return only active :Resource: items.
Verdict: CONFLICTING (ambiguous) — "all" vs "only active" appear contradictory.
Could be resolved by scoping each to different conditions (e.g., filtered vs unfiltered).两个规格是否模糊到足以让渲染器将其解读为冲突,即便用户意图是让它们互补?
Spec A: 系统应返回所有:Resource:项。
Spec B: 系统应仅返回活跃的:Resource:项。
Verdict: CONFLICTING (ambiguous) — “所有”与“仅活跃”看似矛盾。可通过为每个规格限定不同条件(如过滤与未过滤)来解决。5. Shared Concept, Different Constraints
5. 共享概念,不同约束
Do both specs impose constraints on the same that cannot coexist?
:Concept:Spec A: :BatchSize: should be 100 items.
Spec B: :BatchSize: should be 50 items for :Resource: types with attachments.
Verdict: COMPATIBLE — Spec B adds a conditional refinement, not a contradiction.两个规格是否对同一施加了无法共存的约束?
:Concept:Spec A: :BatchSize:应为100项。
Spec B: 对于带有附件的:Resource:类型,:BatchSize:应为50项。
Verdict: COMPATIBLE — Spec B添加了一个条件细化,而非矛盾。Output Format
输出格式
The skill emits exactly one of these two strings, with no surrounding text, explanation, category label, or resolution suggestion:
COMPATIBLEor
CONFLICTINGThe internal analysis (checklist, chronological reasoning) informs the verdict but must not appear in the output. The caller decides what to do with the result — typically: act on by proceeding, or invoke on to produce the actual fix.
COMPATIBLEresolve-spec-conflictCONFLICTING该skill仅输出以下两个字符串之一,无任何周围文本、解释、分类标签或解决方案建议:
COMPATIBLE或
CONFLICTING内部分析(检查清单、时间顺序推理)用于得出判定结果,但不得出现在输出中。调用方决定如何处理结果——通常是:若结果为则继续执行,若为则调用来生成实际的修复方案。
COMPATIBLECONFLICTINGresolve-spec-conflict