{
  "$schema": "./use-case-examples.schema.json",
  "schemaVersion": "1.0.0",
  "packId": "equipment_lending_use_cases",
  "reviewedAt": "2026-08-01",
  "fictional": true,
  "system": {
    "id": "equipment_lending_system",
    "name": "Fictional equipment lending system",
    "boundary": "The system records equipment requests, review decisions, returns, and member-visible history for one lending program.",
    "excluded": [
      "Physical equipment safety inspection and maintenance policy remain outside the software boundary.",
      "Identity proofing, payment collection, legal agreements, and organization-wide inventory accounting are not modeled."
    ]
  },
  "actors": [
    {
      "id": "library_member",
      "name": "Library member",
      "kind": "person-role",
      "responsibility": "Requests eligible equipment and reviews the recorded outcome for their own membership."
    },
    {
      "id": "lending_coordinator",
      "name": "Lending coordinator",
      "kind": "person-role",
      "responsibility": "Reviews requests and records equipment handoff or return against current lending policy."
    },
    {
      "id": "inventory_registry",
      "name": "Inventory registry",
      "kind": "external-system",
      "responsibility": "Provides the current item identity, availability version, and lending-condition reference."
    },
    {
      "id": "notification_service",
      "name": "Notification service",
      "kind": "external-system",
      "responsibility": "Accepts a delivery request and returns an attempt identifier without proving recipient delivery."
    }
  ],
  "businessRules": [
    {
      "id": "BR-LEND-001",
      "statement": "A member may hold no more than two active equipment loans at the same time.",
      "ownerRole": "Lending policy owner"
    },
    {
      "id": "BR-LEND-002",
      "statement": "A request decision must use the current inventory version and preserve any rejected version reference.",
      "ownerRole": "Lending operations owner"
    },
    {
      "id": "BR-LEND-003",
      "statement": "Only a lending coordinator may record an equipment handoff, decline, or completed return.",
      "ownerRole": "Access policy owner"
    },
    {
      "id": "BR-LEND-004",
      "statement": "A history export may include only records belonging to the requesting member account.",
      "ownerRole": "Privacy owner"
    }
  ],
  "requirements": [
    {
      "id": "REQ-LEND-001",
      "statement": "The system records one stable request identity before a coordinator reviews the request.",
      "ownerRole": "Product owner"
    },
    {
      "id": "REQ-LEND-002",
      "statement": "The system exposes an availability conflict without silently replacing the member selection.",
      "ownerRole": "Product owner"
    },
    {
      "id": "REQ-LEND-003",
      "statement": "The system records the coordinator role, decision, reason, and inventory version together.",
      "ownerRole": "Lending operations owner"
    },
    {
      "id": "REQ-LEND-004",
      "statement": "The system records a return against an active loan and rejects an unknown or already returned loan.",
      "ownerRole": "Lending operations owner"
    },
    {
      "id": "REQ-LEND-005",
      "statement": "The system produces a member-scoped history export or an explicit terminal failure record.",
      "ownerRole": "Privacy owner"
    },
    {
      "id": "REQ-LEND-006",
      "statement": "The system keeps notification attempts separate from the underlying request or export outcome.",
      "ownerRole": "Operations owner"
    }
  ],
  "useCases": [
    {
      "id": "UC-001",
      "title": "Request an equipment loan",
      "goal": "A library member asks to borrow one eligible item for an allowed lending period.",
      "scope": "system",
      "level": "user-goal",
      "status": "review-ready",
      "primaryActorId": "library_member",
      "supportingActorIds": ["inventory_registry", "lending_coordinator"],
      "stakeholderInterests": [
        {
          "stakeholder": "Library member",
          "interest": "Receives one stable request identity and a clear recorded outcome without duplicate requests."
        },
        {
          "stakeholder": "Lending program",
          "interest": "Applies current availability and lending-limit policy before accepting the request."
        }
      ],
      "preconditions": [
        "The member account is active and the equipment catalog has a current inventory version."
      ],
      "trigger": "The member chooses to request one listed equipment item.",
      "minimumGuarantees": [
        "No active loan is created and any rejected inventory version remains reviewable."
      ],
      "successGuarantees": [
        "One pending request with a stable identity, member, item, period, and inventory version is recorded."
      ],
      "mainScenario": [
        {
          "id": "request_start",
          "order": 1,
          "performerType": "actor",
          "performerId": "library_member",
          "action": "The member asks to request one equipment item.",
          "observableResponse": "The request intent is accepted for an eligibility check."
        },
        {
          "id": "request_inventory",
          "order": 2,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system obtains the current item and availability version from the registry.",
          "observableResponse": "The eligible item, allowed period, and version are available for review."
        },
        {
          "id": "request_submit",
          "order": 3,
          "performerType": "actor",
          "performerId": "library_member",
          "action": "The member supplies the requested item and lending period.",
          "observableResponse": "The proposed request values are available for policy evaluation."
        },
        {
          "id": "request_evaluate",
          "order": 4,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system checks the lending limit, period, and current inventory version.",
          "observableResponse": "The request has one explicit eligible or ineligible evaluation result."
        },
        {
          "id": "request_record",
          "order": 5,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system records one pending request for coordinator review.",
          "observableResponse": "A stable request identity and pending review state are returned to the member."
        }
      ],
      "extensions": [
        {
          "id": "request_item_unavailable",
          "atStepId": "request_inventory",
          "condition": "The inventory registry reports that the item is no longer requestable.",
          "steps": [
            {
              "id": "unavailable_explain",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system records the unavailable result and current inventory version.",
              "observableResponse": "The member receives the item status without a pending request identity."
            }
          ],
          "resumeAtStepId": null,
          "terminalOutcome": "The use case ends with no loan request recorded."
        },
        {
          "id": "request_period_adjusted",
          "atStepId": "request_evaluate",
          "condition": "The requested period exceeds the allowed period but a shorter period is available.",
          "steps": [
            {
              "id": "period_offer",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system records the rejected period and offers the allowed end date.",
              "observableResponse": "The member can accept or leave without a silent date replacement."
            },
            {
              "id": "period_accept",
              "order": 2,
              "performerType": "actor",
              "performerId": "library_member",
              "action": "The member accepts the shorter lending period.",
              "observableResponse": "The adjusted period is ready to be recorded with the request."
            }
          ],
          "resumeAtStepId": "request_record",
          "terminalOutcome": null
        }
      ],
      "specialRequirements": [
        "The request identity and inventory version must remain stable in every generated review view."
      ],
      "businessRuleIds": ["BR-LEND-001", "BR-LEND-002"],
      "requirementIds": ["REQ-LEND-001", "REQ-LEND-002"],
      "ownerRole": "Product owner",
      "reviewBy": "2026-11-01",
      "scopeBoundary": "This use case owns the member-system request interaction, not catalog page design, coordinator workflow states, implementation stories, tests, or release approval."
    },
    {
      "id": "UC-002",
      "title": "Review an equipment request",
      "goal": "A lending coordinator records one review decision against the current request and inventory versions.",
      "scope": "system",
      "level": "user-goal",
      "status": "review-ready",
      "primaryActorId": "lending_coordinator",
      "supportingActorIds": ["inventory_registry", "notification_service"],
      "stakeholderInterests": [
        {
          "stakeholder": "Lending coordinator",
          "interest": "Reviews a current request and receives an explicit conflict instead of overwriting another decision."
        },
        {
          "stakeholder": "Library member",
          "interest": "Receives a decision tied to the request that was actually reviewed."
        }
      ],
      "preconditions": [
        "One pending request exists and the coordinator has current review authority."
      ],
      "trigger": "The coordinator selects a pending request for review.",
      "minimumGuarantees": [
        "The prior request decision and inventory version remain unchanged after a conflict or denial."
      ],
      "successGuarantees": [
        "One approved or declined decision is recorded with coordinator role, reason, request version, and inventory version."
      ],
      "mainScenario": [
        {
          "id": "review_open",
          "order": 1,
          "performerType": "actor",
          "performerId": "lending_coordinator",
          "action": "The coordinator asks to review one pending request.",
          "observableResponse": "The request identity and expected version are supplied to the system."
        },
        {
          "id": "review_load",
          "order": 2,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system loads the current request, member limit, and inventory version.",
          "observableResponse": "The current review facts and allowed decisions are available."
        },
        {
          "id": "review_decide",
          "order": 3,
          "performerType": "actor",
          "performerId": "lending_coordinator",
          "action": "The coordinator records approve or decline with a reviewed reason.",
          "observableResponse": "The proposed decision is available for version and authority checks."
        },
        {
          "id": "review_validate",
          "order": 4,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system checks authority and compares the expected request and inventory versions.",
          "observableResponse": "The decision has one explicit accepted, denied, or conflict result."
        },
        {
          "id": "review_record",
          "order": 5,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system records the decision and creates a separate notification attempt request.",
          "observableResponse": "The recorded decision is returned independently of notification delivery."
        }
      ],
      "extensions": [
        {
          "id": "review_version_conflict",
          "atStepId": "review_validate",
          "condition": "The request or inventory version differs from the version the coordinator reviewed.",
          "steps": [
            {
              "id": "conflict_preserve",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system rejects the write and preserves both expected and current versions.",
              "observableResponse": "The coordinator receives a conflict result with no overwritten decision."
            }
          ],
          "resumeAtStepId": null,
          "terminalOutcome": "The use case ends pending a fresh review of current facts."
        },
        {
          "id": "review_notification_unavailable",
          "atStepId": "review_record",
          "condition": "The notification service does not accept the first delivery request.",
          "steps": [
            {
              "id": "notification_queue",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system records a retryable notification attempt separate from the decision.",
              "observableResponse": "The coordinator sees the recorded decision and pending communication state."
            }
          ],
          "resumeAtStepId": null,
          "terminalOutcome": "The decision remains recorded while notification recovery continues separately."
        }
      ],
      "specialRequirements": [
        "A communication failure must not reverse or duplicate the recorded review decision."
      ],
      "businessRuleIds": ["BR-LEND-002", "BR-LEND-003"],
      "requirementIds": ["REQ-LEND-003", "REQ-LEND-006"],
      "ownerRole": "Lending operations owner",
      "reviewBy": "2026-11-01",
      "scopeBoundary": "This use case owns the coordinator-system decision interaction, not the full request lifecycle state machine, staff interface layout, test run, notification delivery, or release gate."
    },
    {
      "id": "UC-003",
      "title": "Record an equipment return",
      "goal": "A lending coordinator records that one active loaned item was returned for inventory review.",
      "scope": "system",
      "level": "user-goal",
      "status": "review-ready",
      "primaryActorId": "lending_coordinator",
      "supportingActorIds": ["inventory_registry"],
      "stakeholderInterests": [
        {
          "stakeholder": "Lending coordinator",
          "interest": "Records the return against the correct active loan without inventing an item condition."
        },
        {
          "stakeholder": "Inventory owner",
          "interest": "Receives a return reference that remains separate from physical inspection and maintenance."
        }
      ],
      "preconditions": [
        "An active loan identity exists and the coordinator has return-recording authority."
      ],
      "trigger": "The coordinator identifies an item presented for return.",
      "minimumGuarantees": [
        "An unknown, duplicate, or unauthorized return does not change the active loan record."
      ],
      "successGuarantees": [
        "The active loan is marked returned once with time, coordinator role, and inventory handoff reference."
      ],
      "mainScenario": [
        {
          "id": "return_identify",
          "order": 1,
          "performerType": "actor",
          "performerId": "lending_coordinator",
          "action": "The coordinator supplies the loan and item identities for the return.",
          "observableResponse": "The proposed return identities are ready for current-record lookup."
        },
        {
          "id": "return_lookup",
          "order": 2,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system loads the active loan and compares the item identity.",
          "observableResponse": "The current loan state and identity match result are available."
        },
        {
          "id": "return_confirm",
          "order": 3,
          "performerType": "actor",
          "performerId": "lending_coordinator",
          "action": "The coordinator confirms the observed handoff without declaring physical condition.",
          "observableResponse": "The return confirmation is ready for authority and duplicate checks."
        },
        {
          "id": "return_validate",
          "order": 4,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system checks coordinator authority and whether a return already exists.",
          "observableResponse": "The return has one explicit accepted, denied, or duplicate result."
        },
        {
          "id": "return_record",
          "order": 5,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system records the return and inventory handoff reference once.",
          "observableResponse": "The completed return identity is returned for later inventory review."
        }
      ],
      "extensions": [
        {
          "id": "return_unknown_loan",
          "atStepId": "return_lookup",
          "condition": "The loan does not exist, is not active, or belongs to a different item.",
          "steps": [
            {
              "id": "unknown_return_explain",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system rejects the return mutation and records the lookup result.",
              "observableResponse": "The coordinator receives an explicit identity or state mismatch."
            }
          ],
          "resumeAtStepId": null,
          "terminalOutcome": "The use case ends without changing a loan or inventory record."
        },
        {
          "id": "return_duplicate",
          "atStepId": "return_validate",
          "condition": "The same active loan already has a completed return identity.",
          "steps": [
            {
              "id": "duplicate_return_show",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system returns the prior completed return without creating another record.",
              "observableResponse": "The coordinator receives the stable prior return identity and time."
            }
          ],
          "resumeAtStepId": null,
          "terminalOutcome": "The prior return remains authoritative and no duplicate is created."
        }
      ],
      "specialRequirements": [
        "The software return record must not claim physical inspection, safety approval, or renewed availability."
      ],
      "businessRuleIds": ["BR-LEND-003"],
      "requirementIds": ["REQ-LEND-004"],
      "ownerRole": "Lending operations owner",
      "reviewBy": "2026-11-01",
      "scopeBoundary": "This use case owns the coordinator-system return recording interaction, not inspection procedure, maintenance workflow, interface path, test evidence, or inventory accounting."
    },
    {
      "id": "UC-004",
      "title": "Export member loan history",
      "goal": "A library member obtains a member-scoped export of recorded requests, decisions, loans, and returns.",
      "scope": "system",
      "level": "user-goal",
      "status": "review-ready",
      "primaryActorId": "library_member",
      "supportingActorIds": ["notification_service"],
      "stakeholderInterests": [
        {
          "stakeholder": "Library member",
          "interest": "Receives a traceable export containing only their own current recorded lending history."
        },
        {
          "stakeholder": "Privacy owner",
          "interest": "Prevents cross-member disclosure and keeps export delivery separate from export generation."
        }
      ],
      "preconditions": [
        "The member has an active authenticated session and an exportable history boundary."
      ],
      "trigger": "The member requests an export of their equipment lending history.",
      "minimumGuarantees": [
        "No cross-member record is included and a failed export does not expose a partial public file."
      ],
      "successGuarantees": [
        "One member-scoped export identity, covered period, record count, and retrieval boundary are recorded."
      ],
      "mainScenario": [
        {
          "id": "export_request",
          "order": 1,
          "performerType": "actor",
          "performerId": "library_member",
          "action": "The member requests an export for an allowed history period.",
          "observableResponse": "The requested period and member identity are ready for authorization."
        },
        {
          "id": "export_authorize",
          "order": 2,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system checks the member identity and normalizes the allowed history period.",
          "observableResponse": "The export boundary has one explicit authorized or denied result."
        },
        {
          "id": "export_confirm",
          "order": 3,
          "performerType": "actor",
          "performerId": "library_member",
          "action": "The member confirms the normalized export period.",
          "observableResponse": "The bounded export request is ready for generation."
        },
        {
          "id": "export_generate",
          "order": 4,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system generates the export from member-scoped records and counts included rows.",
          "observableResponse": "A private export identity, covered period, and record count are available."
        },
        {
          "id": "export_record",
          "order": 5,
          "performerType": "system",
          "performerId": "equipment_lending_system",
          "action": "The system records the retrieval boundary and a separate notification attempt.",
          "observableResponse": "The member receives the export status without a claim of notification delivery."
        }
      ],
      "extensions": [
        {
          "id": "export_period_invalid",
          "atStepId": "export_authorize",
          "condition": "The requested period exceeds the allowed history boundary.",
          "steps": [
            {
              "id": "export_period_offer",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system records the rejected boundary and offers the allowed period.",
              "observableResponse": "The member can confirm the narrower period or leave safely."
            }
          ],
          "resumeAtStepId": "export_confirm",
          "terminalOutcome": null
        },
        {
          "id": "export_generation_failed",
          "atStepId": "export_generate",
          "condition": "The export cannot be completed without exposing an incomplete file.",
          "steps": [
            {
              "id": "export_failure_record",
              "order": 1,
              "performerType": "system",
              "performerId": "equipment_lending_system",
              "action": "The system records a terminal failure and removes the incomplete retrieval artifact.",
              "observableResponse": "The member receives a failed export status with no partial public file."
            }
          ],
          "resumeAtStepId": null,
          "terminalOutcome": "The use case ends with a failed export record and no retrievable file."
        }
      ],
      "specialRequirements": [
        "Every exported row must trace to the requesting member and the recorded covered period."
      ],
      "businessRuleIds": ["BR-LEND-004"],
      "requirementIds": ["REQ-LEND-005", "REQ-LEND-006"],
      "ownerRole": "Privacy owner",
      "reviewBy": "2026-11-01",
      "scopeBoundary": "This use case owns the member-system export interaction, not report page layout, retention policy, notification delivery, privacy approval, executable tests, or production monitoring."
    }
  ]
}
