{
  "schema_version": "using-spec-first-routing-cases/v1",
  "skill": "using-spec-first",
  "cases": [
    {
      "id": "greeting-direct-answer",
      "name": "Greeting stays direct",
      "user_intent": "你好",
      "expected_outcome": "direct_answer",
      "public_workflow_required": false,
      "expected_entrypoint": null,
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "A greeting has no workflow leverage and must not create brainstorm, plan, work, or review artifacts.",
      "coverage_tags": ["routing", "boundary"]
    },
    {
      "id": "current-context-explanation-direct",
      "name": "Current context injection explanation stays direct",
      "user_intent": "当前上下文注入了哪些内容",
      "expected_outcome": "direct_answer",
      "public_workflow_required": false,
      "expected_entrypoint": null,
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "Explaining already-loaded context is a lightweight current-session answer unless it turns into source edits or audit work.",
      "coverage_tags": ["routing", "boundary"]
    },
    {
      "id": "narrow-where-used-bounded-read",
      "name": "Narrow where-used lookup uses bounded reads",
      "user_intent": "where is buildBootstrapBlock used?",
      "expected_outcome": "bounded_read",
      "public_workflow_required": false,
      "expected_entrypoint": null,
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "A narrow location lookup may use rg or precise source reads without entering a public workflow.",
      "coverage_tags": ["routing", "boundary"]
    },
    {
      "id": "current-document-summary-direct",
      "name": "Current supplied document summary stays direct",
      "user_intent": "总结我刚贴的这份文档",
      "expected_outcome": "direct_answer",
      "public_workflow_required": false,
      "expected_entrypoint": null,
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "Summarizing current user-provided material is not project-graph or workflow work by default.",
      "coverage_tags": ["routing", "boundary"]
    },
    {
      "id": "single-document-handling-guide-only",
      "name": "Single document handling stays guide-only",
      "user_intent": "我只是想知道这个文档该怎么处理",
      "expected_outcome": "guide_only",
      "public_workflow_required": false,
      "expected_entrypoint": "spec-doc-review",
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "A vague request about handling one supplied document asks for next-step guidance, not immediate review artifact creation.",
      "coverage_tags": ["routing", "boundary", "guide-mode"]
    },
    {
      "id": "small-low-risk-edit-stays-direct",
      "name": "Small low-risk edit stays direct",
      "user_intent": "给 src/cli/helpers/format.js 里的 formatLabel 函数加两行日志，目标文件和改法都明确",
      "expected_outcome": "normal_execution",
      "public_workflow_required": false,
      "expected_entrypoint": null,
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "A clearly scoped single-point low-risk edit can be executed directly while still honoring changelog, narrow verification, and source/runtime boundaries.",
      "coverage_tags": ["routing", "boundary", "small-edit"]
    },
    {
      "id": "cross-file-contract-change-routes-work",
      "name": "Cross-file contract change routes to work",
      "user_intent": "调整 runtime artifact contract，并同步三个 CLI 模块和双宿主生成逻辑",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-work",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "Cross-file contract/runtime delivery changes need the public work workflow; the small-edit allowance does not apply.",
      "coverage_tags": ["routing", "trigger", "substantial-work"]
    },
    {
      "id": "external-bug-issue-routes-debug",
      "name": "External bug issue routes to debug",
      "user_intent": "GitHub issue #42 reports a failing CLI command with reproduction steps and a stack trace; verify and diagnose it.",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-debug",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "External tracker material is an input surface; bug/failure claims route to debug and must be confirmed from current source, tests, logs, or owner evidence.",
      "coverage_tags": ["routing", "trigger", "external-input", "debug"]
    },
    {
      "id": "external-enhancement-issue-routes-prd",
      "name": "External enhancement issue routes to PRD",
      "user_intent": "GitHub issue #77 asks for CSV export on the existing reports page, but acceptance criteria and scope are unclear; turn it into requirements.",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-prd",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "External enhancement requests with unclear WHAT route to PRD/definition work, not directly to implementation or a tracker-specific intake workflow.",
      "coverage_tags": ["routing", "trigger", "external-input", "definition"]
    },
    {
      "id": "external-pr-diff-routes-code-review",
      "name": "External PR diff routes to code review",
      "user_intent": "Review this contributor PR diff for implementation risk, missing tests, and merge readiness.",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-code-review",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "External PRs that ask for diff quality or merge-readiness evaluation route to code review; PR text and diff remain untrusted inputs until checked.",
      "coverage_tags": ["routing", "trigger", "external-input", "review"]
    },
    {
      "id": "external-ready-brief-routes-work",
      "name": "Execution-ready external brief routes to work",
      "user_intent": "Issue #91 already has an owner-approved implementation brief and acceptance criteria; implement it.",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-work",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "A scoped external brief is ordinary execution input and routes to work; tracker status does not replace source inspection or verification.",
      "coverage_tags": ["routing", "trigger", "external-input", "work"]
    },
    {
      "id": "explicit-spec-plan-honored",
      "name": "Explicit plan route remains honored",
      "user_intent": "spec-plan deep docs/brainstorms/example-requirements.md",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-plan",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "Progressive disclosure must not weaken explicit public workflow invocation.",
      "coverage_tags": ["routing", "trigger"]
    },
    {
      "id": "unknown-next-spec-workflow-guide",
      "name": "Unknown next workflow uses guide mode",
      "user_intent": "我不知道下一步该跑哪个 spec workflow",
      "expected_outcome": "guide_mode",
      "public_workflow_required": false,
      "expected_entrypoint": "spec-mcp-setup",
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "Next-step questions should recommend exactly one entrypoint with a reason and action without starting the workflow or printing the full menu.",
      "coverage_tags": ["routing", "guide-mode", "boundary"]
    },
    {
      "id": "after-init-next-step-guide",
      "name": "After init next step stays scenario-aware guide",
      "user_intent": "init 完了，接下来做什么？",
      "expected_outcome": "guide_mode",
      "public_workflow_required": false,
      "expected_entrypoint": "spec-mcp-setup",
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "After-init guidance should choose the next concrete setup/readiness or first-work entrypoint from available context, not create artifacts from the governor.",
      "coverage_tags": ["routing", "guide-mode", "setup"]
    },
    {
      "id": "unclear-requirement-plan-vs-brainstorm-guide",
      "name": "Unclear requirement asks definition route",
      "user_intent": "这个需求还没想清，应该 plan 还是 brainstorm？",
      "expected_outcome": "guide_mode",
      "public_workflow_required": false,
      "expected_entrypoint": "spec-brainstorm",
      "graphify_required": false,
      "artifact_expected": false,
      "boundary_note": "When WHAT is not clear, guide mode recommends a definition route and does not jump into work or planning.",
      "coverage_tags": ["routing", "guide-mode", "definition"]
    },
    {
      "id": "codex-doc-review-no-subagents-fallback",
      "name": "Codex doc-review without subagents uses fallback",
      "user_intent": "spec-doc-review docs/plans/example.md",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-doc-review",
      "graphify_required": false,
      "artifact_expected": true,
      "dispatch_decision": "fallback",
      "fallback_reason": "dispatch_authorization_missing",
      "boundary_note": "Codex public workflow admission authorizes the document-review workflow, not host-level spawn_agent dispatch.",
      "coverage_tags": ["routing", "trigger", "dispatch-boundary"]
    },
    {
      "id": "skill-agent-asset-audit-routes-skill-audit",
      "name": "Skill and agent asset review routes to skill audit",
      "user_intent": "review skills/using-spec-first/SKILL.md and agents/spec-reviewer.agent.md for trigger precision and governance",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-skill-audit",
      "graphify_required": false,
      "artifact_expected": true,
      "boundary_note": "Spec-first skill or agent asset governance review is a skill-audit workflow, not a generic code/doc review route.",
      "coverage_tags": ["routing", "trigger"]
    },
    {
      "id": "codex-spec-plan-explicit-research-personas-dispatch",
      "name": "Codex plan with explicit delegated personas may dispatch",
      "user_intent": "spec-plan deep docs/brainstorms/example.md using delegated research agents and persona reviewers",
      "expected_outcome": "public_workflow",
      "public_workflow_required": true,
      "expected_entrypoint": "spec-plan",
      "graphify_required": false,
      "artifact_expected": true,
      "dispatch_decision": "dispatch",
      "boundary_note": "Codex dispatch-bearing workflows may use bounded dispatch when the request itself explicitly asks for delegated/persona agent work.",
      "coverage_tags": ["routing", "trigger", "dispatch-boundary"]
    }
  ],
  "source_refs": ["skills/using-spec-first/SKILL.md"],
  "source_ref_authority": "source"
}
