{
  "schema": "csl-context.query-cases/v1",
  "cases": [
    {
      "id": "session-start",
      "event": "A session starts without a concrete task.",
      "expected_action": "LoadCore"
    },
    {
      "id": "resume-active-task",
      "event": "A session resumes with an active concrete task.",
      "expected_action": "LoadCoreThenQuery"
    },
    {
      "id": "after-compaction",
      "event": "Context was compacted while a concrete task remains active.",
      "expected_action": "LoadCoreThenQuery"
    },
    {
      "id": "concrete-task",
      "event": "The Agent has formed a Task Fingerprint for a concrete task.",
      "expected_action": "QueryRelevantPacks"
    },
    {
      "id": "ordinary-follow-up",
      "event": "An ordinary follow-up does not change the active task fingerprint.",
      "expected_action": "ReuseSelectedPacks"
    },
    {
      "id": "durable-pack-change",
      "event": "Current work changes a source-backed fact in a selected ordinary Pack.",
      "expected_action": "MaintainPackThenValidate"
    },
    {
      "id": "project-core-change",
      "event": "A valid Project Core would be persistently changed.",
      "expected_action": "ShowDiffAndConfirm"
    },
    {
      "id": "existing-nonstandard-context",
      "event": "An existing tasks/context.md has no valid Project Core.",
      "expected_action": "RewriteThenLoadCore"
    },
    {
      "id": "existing-context-rewrite-failed",
      "event": "Existing Context Rewrite lacks authoritative evidence, finds a source conflict, or fails validation.",
      "expected_action": "RestoreAndDisclose"
    },
    {
      "id": "missing-context",
      "event": "The workspace has no tasks/context.md.",
      "expected_action": "AnalyzeProposeAndConfirm"
    },
    {
      "id": "missing-context-confirmed",
      "event": "The user confirms the exact minimal Context proposal for a missing tasks/context.md.",
      "expected_action": "CreateThenLoadCore"
    },
    {
      "id": "duplicate-relevant-id",
      "event": "A relevant Context Pack ID is duplicated.",
      "expected_action": "DoNotApply"
    }
  ]
}
