Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/en/skills/sopify/develop/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: Develop phase entry; routes task execution, state updates, KB sync,

- Long rules: `references/develop-rules.md`
- Shared writing standards: `../references/shared-writing-dna.md` (apply to all output)
- Output contract: `../references/output-contract.md` (required sections, conditional enhancement, self-check)
- Output contract: `../references/output-contract.md` (required sections, density gradient, symbol discipline, desensitization)
- Output templates: `assets/*.md`
- Task extraction script: `scripts/extract_pending_tasks.py`

Expand Down
18 changes: 18 additions & 0 deletions skills/en/skills/sopify/references/output-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,31 @@ Do not force structure on every scenario. Decide whether and how to enhance base

Constraint: use at most one primary structure per reply; avoid stacking table + tree + flow.

### 3.1 Output Density Gradient

Select output density based on scenario complexity. Avoid heavy output for simple tasks:

| Density Level | Applicable Scenarios | Verification Summary |
|--------------|---------------------|---------------------|
| Minimal | quick-fix, single-file change, Q&A | Simplified table (≤3 columns), omit review conclusion |
| Standard | 3-5 task regular develop | Table, omit zero-info columns |
| Full | 6+ tasks or cross-module delivery | Full table + phased review conclusions |

Density level is auto-inferred from task count and change scope; no user specification needed.

**DO:**
- Use a comparison table when multi-option tradeoffs are present — make differences visible at a glance
- Simplify verification summary on success when all passed — omit columns with no information
- Keep plain text when information shape does not match any structure
- Trim output by density gradient: quick-fix should not produce a full verification table
- Group by deliverable when completing 3+ independent tasks; merge same conclusions into one line
- No decorative emoji in body text (verification summaries, review conclusions, Changes section)

**DON'T:**
- Multi-option tradeoffs without comparison structure = missed enhancement
- Forcing tables on simple Q&A = over-enhancement
- Mixing two or more primary structures in one reply = cognitive overload
- Expanding 5 identical `passed` conclusions item-by-item = information dilution

## 4. Pre-output Self-check

Expand All @@ -54,3 +70,5 @@ Before outputting the final reply, verify:
2. Status symbol correct: `✓` only when all verifications passed with no degradation or skips; otherwise `!`.
3. Footer complete: `Changes:` + `Next:` must be present.
4. Conditional enhancement applied: if the reply meets a §3 trigger condition, use the corresponding structured format.
5. Density level matched: quick-fix should not produce a full verification table; complex delivery should not lack review conclusions.
6. Desensitization: rewrite raw `root_cause` enums as human descriptions; do not expose internal scoring weights; do not display gate/handoff JSON fields (`resolution_id`, `run_stage`, etc.).
2 changes: 1 addition & 1 deletion skills/zh/skills/sopify/develop/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: 开发实施阶段入口;聚合任务执行、状态更新、知

- 长规则:`references/develop-rules.md`
- 共享写作规范:`../references/shared-writing-dna.md`(所有输出遵循)
- 输出契约:`../references/output-contract.md`(必需 section、条件增强、自检
- 输出契约:`../references/output-contract.md`(必需 section、密度梯度、符号纪律、脱敏规则
- 输出模板:`assets/*.md`
- 任务提取脚本:`scripts/extract_pending_tasks.py`

Expand Down
20 changes: 19 additions & 1 deletion skills/zh/skills/sopify/references/output-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

表格列约束:只展示当前场景有信息量的列。列省略只影响最终展示,不影响内部验证判断。`reason_code` 是内部验证字段,不在用户面输出中展示。

## 3. Conditional Enhancement & Format Selection
## 3. 条件增强与格式选择

不强制所有场景结构化。按信息形状和触发条件决定是否增强、用什么结构:

Expand All @@ -36,15 +36,31 @@

约束:同一回复最多选一种主结构,避免表格 + 树 + 流程叠加。

### 3.1 输出密度梯度

按场景复杂度选择输出密度,避免简单任务输出过重:

| 密度级别 | 适用场景 | 验证摘要形式 |
|---------|---------|------------|
| 精简 | quick-fix、单文件修改、咨询问答 | 简化表格(≤3 列),省略复审结论 |
| 标准 | 3-5 任务的常规 develop | 表格,省略无信息量列 |
| 完整 | 6+ 任务或跨模块交付 | 完整表格 + 分阶段复审结论 |

密度级别由任务数和改动范围自动推断,不需要用户指定。

**DO:**
- 满足多方案取舍时用对比表,让差异一目了然
- success 全部 passed 时简化验证摘要,省略无信息量列
- 信息形状不匹配任何结构时保持纯文本
- 按密度梯度裁剪输出:quick-fix 不输出完整验证表
- 3+ 独立任务时按交付物分组输出,同类结论合并为一行
- 正文(验证摘要、复审结论、Changes 区)不使用装饰性 emoji

**DON'T:**
- 满足多方案取舍却无对比结构 = 漏增强
- 强制在简单问答上叠加表格 = 过度增强
- 同一回复混用两种以上主结构 = 认知过载
- 5 个任务结果逐项展开相同 `passed` 结论 = 信息稀释

## 4. 输出前自检

Expand All @@ -54,3 +70,5 @@
2. 状态符是否正确:`✓` 仅当全部验证通过且无降级/跳过;否则必须 `!`。
3. footer 是否完整:`Changes:` + `Next:` 必须存在。
4. 条件增强是否触发:如当前回复满足 §3 增强触发条件,应使用对应结构化表达。
5. 密度级别是否匹配:quick-fix 不应输出完整验证表;复杂交付不应缺少复审结论。
6. 脱敏:`root_cause` 枚举值转人话描述;内部评分权重不外露;gate/handoff JSON 字段(`resolution_id`、`run_stage` 等)不展示。
8 changes: 4 additions & 4 deletions tests/golden-snapshots.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"codex:en-US:header": "789299f71faacb3048bdb2a8711222944ff0ae0179f54e18d4905447c5260572",
"claude:zh-CN:header": "f72499e5610b2bace68943492b0c7009ce4872753f2e7f22fa48b4a7c84214b6",
"claude:en-US:header": "587e94999456710421bf8711b7e7ba11a231bf8fcd0658043ccad1612a9289f8",
"copilot:zh-CN:managed_block_payload": "9475403cd2e0331c39bc546ca781ca839720500d70d403551d334eda0fe4ac83",
"skills:zh-CN:tree": "67a9cdf1f5ddad2e20b67f6ec0caa49f55774b3b52725f25cb7bf4c788331b3f",
"copilot:en-US:managed_block_payload": "c88d863ccea43f4a54dafc9ec7652b5d8e3c48c2764a0e9ec04fdd1c26536df8",
"skills:en-US:tree": "6f21bbf6c5756698921af9a41c9505f42a4ffe922cb7d0bd4ddcdc8f9a96422b"
"copilot:zh-CN:managed_block_payload": "e21c2d7148be0f95a67c760a778f0b30e489abac5b07d8e2ab57b71896ef24e6",
"skills:zh-CN:tree": "84f417998dcc6a3ad4434c7d295f6efcfd58b88780ad41c9c0c890e98c60aedb",
"copilot:en-US:managed_block_payload": "0aba55bd3b8349212b40a6c2084fbad4296efa5c441841e46e19d1b21a2e8f78",
"skills:en-US:tree": "7ac05bbb4c50b2aefa5a5bb7df270ff6ee1c46ca71cc7513d84dfb347e124128"
}
}
2 changes: 1 addition & 1 deletion tests/test_golden_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _render_full(adapter: HostAdapter, lang_dir: str) -> str:
return render_single_file(header_source, skills_source, adapter)


_OUTPUT_CONTRACT_ZH_MARKERS = ["输出契约", "必需 section", "Conditional Enhancement & Format Selection"]
_OUTPUT_CONTRACT_ZH_MARKERS = ["输出契约", "必需 section", "条件增强与格式选择"]
_OUTPUT_CONTRACT_EN_MARKERS = ["Output Contract", "Required Sections", "Conditional Enhancement & Format Selection"]


Expand Down
Loading