{
  "schema_version": "spec-first.spec-write-skill-trigger-cases.v1",
  "skill": "spec-write-skill",
  "source_refs": [
    "skills/spec-write-skill/SKILL.md",
    "skills/spec-write-skill/references/authoring-method.md",
    "skills/spec-write-skill/references/delivery-gates.md",
    "skills/spec-write-skill/references/skill-quality-vocabulary.md"
  ],
  "source_ref_authority": "source",
  "cases": [
    {
      "id": "new-skill-authoring",
      "case_id": "WRITE-SKILL-TRIGGER-001",
      "case_type": "should-trigger",
      "input": "新增一个 spec-first skill，用来把安全审计 findings 转成可复用修复流程。",
      "prompt": "新增一个 spec-first skill，用来把安全审计 findings 转成可复用修复流程。",
      "coverage_tags": ["trigger"],
      "expected_outcome": "should-trigger",
      "expected_result": "should-trigger",
      "expected_mode": "new-skill",
      "reason_code": "new-source-skill-authoring"
    },
    {
      "id": "revise-existing-skill",
      "case_id": "WRITE-SKILL-TRIGGER-002",
      "case_type": "should-trigger",
      "input": "优化 skills/spec-debug/SKILL.md 的触发描述和 references 渐进披露。",
      "prompt": "优化 skills/spec-debug/SKILL.md 的触发描述和 references 渐进披露。",
      "coverage_tags": ["trigger"],
      "expected_outcome": "should-trigger",
      "expected_result": "should-trigger",
      "expected_mode": "revise-skill",
      "reason_code": "existing-skill-revision"
    },
    {
      "id": "audit-only-neighbor",
      "case_id": "WRITE-SKILL-NEAR-001",
      "case_type": "near-neighbor",
      "input": "审查 skills/spec-prd/SKILL.md 有没有边界和治理问题，不要修改文件。",
      "prompt": "审查 skills/spec-prd/SKILL.md 有没有边界和治理问题，不要修改文件。",
      "coverage_tags": ["trigger", "boundary"],
      "expected_outcome": "near-neighbor",
      "expected_result": "near-neighbor",
      "expected_mode": "spec-skill-audit",
      "boundary_note": "Audit-only requests should route to spec-skill-audit instead of write-skill source mutation.",
      "reason_code": "audit-not-authoring"
    },
    {
      "id": "runtime-repair-boundary",
      "case_id": "WRITE-SKILL-BOUNDARY-001",
      "case_type": "boundary",
      "input": "直接修改 .agents/skills/spec-prd/SKILL.md 让当前 Codex runtime 生效。",
      "prompt": "直接修改 .agents/skills/spec-prd/SKILL.md 让当前 Codex runtime 生效。",
      "coverage_tags": ["boundary"],
      "expected_outcome": "boundary",
      "expected_result": "boundary",
      "expected_mode": "refuse-runtime-mirror-patch",
      "boundary_note": "Generated runtime mirrors are evidence only; source fixes must edit skills/ and regenerate runtime.",
      "forbidden_signals": ["edit .agents/skills directly", "patch generated runtime mirror"],
      "reason_code": "generated-runtime-not-source"
    },
    {
      "id": "one-off-answer-not-skill",
      "case_id": "WRITE-SKILL-NEG-001",
      "case_type": "should-not-trigger",
      "input": "帮我写一个一次性的提示词回答这个客户问题，不要创建 skill。",
      "prompt": "帮我写一个一次性的提示词回答这个客户问题，不要创建 skill。",
      "coverage_tags": ["trigger", "boundary"],
      "expected_outcome": "should-not-trigger",
      "expected_result": "should-not-trigger",
      "expected_mode": "do-not-create-skill",
      "boundary_note": "One-off answer or prompt creation is not reusable skill authoring.",
      "reason_code": "one-off-vs-reusable"
    },
    {
      "id": "explain-only-not-package",
      "case_id": "WRITE-SKILL-NEG-002",
      "case_type": "should-not-trigger",
      "input": "解释一下这段 workflow notes 是什么意思，不要包装成可复用能力。",
      "prompt": "解释一下这段 workflow notes 是什么意思，不要包装成可复用能力。",
      "coverage_tags": ["trigger", "boundary"],
      "expected_outcome": "should-not-trigger",
      "expected_result": "should-not-trigger",
      "expected_mode": "direct-explanation",
      "boundary_note": "Explanation, summary, and translation requests require positive reusable-packaging intent before authoring.",
      "reason_code": "explain-not-package"
    },
    {
      "id": "document-export-not-agent-skill",
      "case_id": "WRITE-SKILL-NEG-003",
      "case_type": "near-neighbor",
      "input": "把这份方法论整理成 Markdown 文档，不要做成 agent skill。",
      "prompt": "把这份方法论整理成 Markdown 文档，不要做成 agent skill。",
      "coverage_tags": ["trigger", "boundary"],
      "expected_outcome": "near-neighbor",
      "expected_result": "near-neighbor",
      "expected_mode": "document-editing-or-direct-write",
      "boundary_note": "Document export is a document task unless reusable agent execution is explicitly requested.",
      "reason_code": "document-export-vs-agent-skill"
    },
    {
      "id": "future-outline-not-build",
      "case_id": "WRITE-SKILL-NEG-004",
      "case_type": "boundary",
      "input": "先帮我构思一个未来可能要做的 skill 大纲，暂时不要创建任何文件。",
      "prompt": "先帮我构思一个未来可能要做的 skill 大纲，暂时不要创建任何文件。",
      "coverage_tags": ["trigger", "boundary"],
      "expected_outcome": "boundary",
      "expected_result": "boundary",
      "expected_mode": "idea-outline-only",
      "boundary_note": "Future outline requests are pre-build design, not source mutation.",
      "forbidden_signals": ["create skills/", "write SKILL.md"],
      "reason_code": "future-outline-vs-build"
    },
    {
      "id": "weak-context-pointer-failure",
      "case_id": "WRITE-SKILL-FAIL-001",
      "case_type": "failure",
      "input": "把长规则下沉到 references/rubric.md，但 SKILL.md 只写“详见参考文件”，不说明何时读取。",
      "prompt": "把长规则下沉到 references/rubric.md，但 SKILL.md 只写“详见参考文件”，不说明何时读取。",
      "coverage_tags": ["failure", "boundary"],
      "expected_outcome": "requires-pointer-sharpening",
      "expected_result": "requires-pointer-sharpening",
      "expected_mode": "revise-skill",
      "boundary_note": "Must-have references need context pointer wording that states when to read and what judgment it supports.",
      "forbidden_signals": ["hide must-have reference behind vague pointer", "create unreferenced reference"],
      "reason_code": "weak-context-pointer"
    },
    {
      "id": "branch-first-resource-allocation",
      "case_id": "WRITE-SKILL-EXPECTED-001",
      "case_type": "expected",
      "input": "迁移一个 skill，同时支持 new-skill、revise-skill 和 package-readiness 三种路径，要求保持 SKILL.md 精简。",
      "prompt": "迁移一个 skill，同时支持 new-skill、revise-skill 和 package-readiness 三种路径，要求保持 SKILL.md 精简。",
      "coverage_tags": ["expected", "boundary"],
      "expected_outcome": "branch-first-resource-allocation",
      "expected_result": "branch-first-resource-allocation",
      "expected_mode": "migrate-skill",
      "boundary_note": "The authoring flow should list real branches before deciding what stays in SKILL.md and what moves to references/evals.",
      "reason_code": "branch-first-information-hierarchy"
    },
    {
      "id": "vague-completion-criterion-failure",
      "case_id": "WRITE-SKILL-FAIL-002",
      "case_type": "failure",
      "input": "新增写入脚本步骤，完成条件只写“检查脚本可以工作”。",
      "prompt": "新增写入脚本步骤，完成条件只写“检查脚本可以工作”。",
      "coverage_tags": ["failure", "expected"],
      "expected_outcome": "requires-clarity-and-demand",
      "expected_result": "requires-clarity-and-demand",
      "expected_mode": "revise-skill",
      "boundary_note": "High-risk write or shell steps need completion criteria with clarity and demand, not just an action label.",
      "forbidden_signals": ["accept vague completion criterion", "done when checked"],
      "reason_code": "vague-completion-criterion"
    },
    {
      "id": "over-split-granularity-failure",
      "case_id": "WRITE-SKILL-FAIL-003",
      "case_type": "failure",
      "input": "为了模块化，把同一个 source skill 的两个同义触发表达拆成两个 standalone skills。",
      "prompt": "为了模块化，把同一个 source skill 的两个同义触发表达拆成两个 standalone skills。",
      "coverage_tags": ["failure", "boundary"],
      "expected_outcome": "do-not-split",
      "expected_result": "do-not-split",
      "expected_mode": "revise-skill",
      "boundary_note": "Granularity changes need independent invocation or sequence-risk evidence; synonym splitting increases governance and cognitive load.",
      "forbidden_signals": ["split for modularity only", "duplicate same branch as separate skill"],
      "reason_code": "over-split-granularity"
    },
    {
      "id": "sentence-level-no-op-pruning",
      "case_id": "WRITE-SKILL-EXPECTED-002",
      "case_type": "expected",
      "input": "优化一个 skill 的 prose，发现多句“要认真、要清晰、要全面”没有改变触发、读取、写入、判断、验证或 handoff。",
      "prompt": "优化一个 skill 的 prose，发现多句“要认真、要清晰、要全面”没有改变触发、读取、写入、判断、验证或 handoff。",
      "coverage_tags": ["expected", "failure"],
      "expected_outcome": "delete-no-op-sentences",
      "expected_result": "delete-no-op-sentences",
      "expected_mode": "revise-skill",
      "boundary_note": "No-op pruning happens sentence by sentence; weak leading words should be deleted or replaced with project vocabulary that changes behavior.",
      "forbidden_signals": ["polish no-op sentence", "keep weak leading word"],
      "reason_code": "leading-word-no-op"
    }
  ]
}
