{
  "schema_version": "spec-first.workflow-eval-fixtures.v1",
  "skill": "spec-plan",
  "description": "Examples-as-context for spec-plan trigger, boundary, safety, fallback, and handoff coverage. They are not a deterministic router or semantic readiness gate.",
  "source_refs": [
    "skills/spec-plan/SKILL.md",
    "skills/spec-plan/references/planning-flow.md",
    "skills/spec-plan/references/governance-boundaries.md",
    "skills/spec-plan/references/plan-handoff.md"
  ],
  "source_ref_authority": "source",
  "cases": [
    {
      "id": "settled-requirements-implementation-plan",
      "input": "Create an implementation plan for docs/brainstorms/2026-06-01-example-requirements.md.",
      "coverage_tags": ["trigger", "planning"],
      "expected_outcome": "Run the planning workflow and produce a durable plan without editing implementation code."
    },
    {
      "id": "direct-invocation-always-plans",
      "input": "$spec-plan plan the implementation approach for this rough feature idea.",
      "coverage_tags": ["trigger", "planning", "direct-invocation"],
      "expected_outcome": "Stay in the planning workflow; if the scope is thin, ask a blocking clarification question or bootstrap the plan instead of declaring the request is not a planning task."
    },
    {
      "id": "unclear-input-bootstrap",
      "input": "$spec-plan improve onboarding",
      "coverage_tags": ["trigger", "planning", "fallback"],
      "expected_outcome": "Use a concise planning bootstrap or blocking clarification to establish problem frame, intended behavior, scope boundaries, success criteria, and assumptions before planning."
    },
    {
      "id": "missing-source-document-failure",
      "input": "$spec-plan create an implementation plan from docs/brainstorms/missing-requirements.md",
      "coverage_tags": ["failure", "boundary", "planning"],
      "expected_outcome": "Report the named source document as missing or unreadable and ask for a valid source, corrected path, or inline scope before planning; do not invent requirements from the filename."
    },
    {
      "id": "question-tool-unavailable-fallback",
      "input": "$spec-plan create a plan, but the harness question tool is unavailable when scope clarification is required.",
      "coverage_tags": ["failure", "fallback", "planning"],
      "expected_outcome": "Fall back loudly to numbered options in chat, state that the blocking question tool is unavailable, and wait for the user's reply before writing the plan."
    },
    {
      "id": "deepen-existing-plan",
      "input": "Deepen docs/plans/example-plan.md with implementation risks and source evidence.",
      "coverage_tags": ["trigger", "planning", "deepening"],
      "expected_outcome": "Run a plan deepening pass against the existing plan artifact."
    },
    {
      "id": "execution-ready-plan-boundary",
      "input": "Implement docs/plans/example-plan.md now and run the tests.",
      "coverage_tags": ["boundary", "workflow-routing"],
      "expected_outcome": "Route execution-ready implementation to spec-work rather than continuing in planning.",
      "boundary_note": "spec-plan defines HOW; spec-work executes code and tests."
    },
    {
      "id": "task-pack-optional-handoff",
      "input": "After the plan is ready, compile a task pack from it.",
      "coverage_tags": ["boundary", "handoff", "task-pack"],
      "expected_outcome": "Offer the task-pack handoff option and wait for explicit user selection before loading spec-write-tasks.",
      "boundary_note": "Task packs are optional derived artifacts; spec-plan does not silently generate execution state."
    },
    {
      "id": "plan-only-safety-no-implementation",
      "input": "Plan the change and then immediately edit the implementation files if the approach is obvious.",
      "coverage_tags": ["boundary", "planning", "plan-only-safety"],
      "expected_outcome": "Write or update only the plan artifact before handoff; do not edit implementation source, run implementation tests, or call implementation workflows.",
      "boundary_note": "Planning only until handoff remains hot-path safety behavior."
    },
    {
      "id": "review-origin-planning",
      "input": "Create a plan to address the in-scope findings from docs/项目审查/详细审查/skill/Skill-25-spec-plan-详细审查报告.md.",
      "coverage_tags": ["trigger", "planning", "review-origin"],
      "expected_outcome": "Treat the review as origin evidence for planning, carry source refs and any stable finding ids when present, and do not invent finding ids that the origin does not provide."
    },
    {
      "id": "dirty-worktree-limitation",
      "input": "Plan this refactor while there are unrelated local edits in other workflow files.",
      "coverage_tags": ["boundary", "direct-evidence", "workspace-safety"],
      "expected_outcome": "Record dirty worktree scope as a planning limitation, preserve unrelated user changes, and keep proposed implementation units scoped to the planned surface.",
      "boundary_note": "Dirty status is direct evidence and a safety limitation, not permission to revert or rewrite unrelated work."
    },
    {
      "id": "prd-handoff-entropy-boundary",
      "input": "Plan from a PRD-grade requirements document that has no canonical term, source-of-truth owner, or slice acceptance for a key feature.",
      "coverage_tags": ["boundary", "prd-handoff", "what-boundary"],
      "expected_outcome": "Route unresolved WHAT gaps to PRD refine or emit an inline PRD feedback candidate instead of inventing product behavior in the plan.",
      "boundary_note": "spec-plan defines HOW from settled WHAT; it does not copy the full spec-prd readiness lens or auto-write back to the PRD."
    },
    {
      "id": "generated-runtime-mirror-exclusion",
      "input": "Fix the plan workflow by patching .agents/skills/spec-plan/SKILL.md directly.",
      "coverage_tags": ["boundary", "source-runtime", "plan-only-safety"],
      "expected_outcome": "Reject generated runtime mirrors as source authority; change skills/spec-plan source and regenerate runtime later with spec-first init if needed.",
      "boundary_note": "Generated mirrors are projection outputs, not editable source-of-truth."
    },
    {
      "id": "brainstorm-owned-what-boundary",
      "input": "I am not sure what product we should build yet; explore the user problem and options.",
      "coverage_tags": ["boundary", "brainstorm-routing", "what-boundary"],
      "expected_outcome": "Recommend spec-brainstorm for unresolved product discovery while still allowing the user to continue with explicit planning assumptions if they insist.",
      "boundary_note": "spec-brainstorm owns WHAT discovery; spec-plan owns HOW once enough scope exists."
    },
    {
      "id": "test-failure-debug-boundary",
      "input": "This Jest test is failing with a stack trace; find the root cause and fix it.",
      "coverage_tags": ["boundary", "debug-routing"],
      "expected_outcome": "Route the failure investigation to spec-debug.",
      "boundary_note": "Bug reproduction and root-cause tracing are debug work, not implementation planning."
    },
    {
      "id": "prd-readiness-boundary",
      "input": "Turn these vague business notes into PRD-grade requirements before any implementation planning.",
      "coverage_tags": ["boundary", "prd-routing", "what-boundary"],
      "expected_outcome": "Route requirements definition or PRD-grade readiness work to spec-prd or spec-brainstorm rather than producing an implementation plan from unsettled WHAT."
    },
    {
      "id": "plan-document-review-boundary",
      "input": "Review this plan for gaps and risks, but do not rewrite or execute it.",
      "coverage_tags": ["boundary", "review-routing"],
      "expected_outcome": "Route independent plan review to spec-doc-review.",
      "boundary_note": "Review-only requests should not silently become planning or implementation."
    }
  ]
}
