# TEMPORARY DELIVERY TRUTH TEST FIXTURE.
# Remove this file together with jira-mapping.yaml and
# delivery-truth-manual.yaml after Forge app testing is complete.
initiative:
  id: notes-mention-user
  name: Mention User in CDP Notes

requirements:
  - id: REQ-NOTES-001
    title: Compose, persist, and render mentions in web CDP notes
    type: functional
    source:
      document: prds/prd-notes-mention-user.md
      section: NOTE-MENTION-S01
    acceptance_criteria:
      - Typing @ opens a company-user picker and selecting a user inserts an SSO-backed mention.
      - Saving a note persists the mention and its mentioned user identifiers.
      - Saved mentions render as readable mention chips.
    expected_repositories:
      required: [contact-service, qontak-customer-fe]
      optional: []

  - id: REQ-NOTES-002
    title: Normalize supported web and mobile mention anchors
    type: technical
    source:
      document: prds/prd-notes-mention-user.md
      section: NOTE-MENTION-S02
    acceptance_criteria:
      - Web and mobile anchor forms resolve to the same SSO user identifier.
      - Unsupported or malformed anchors do not produce raw or broken mention output.
    expected_repositories:
      required: [contact-service]
      optional: [qontak-customer-fe]

  - id: REQ-NOTES-003
    title: Validate company users and sanitize mention markup
    type: non_functional
    source:
      document: prds/prd-notes-mention-user.md
      section: NOTE-MENTION-S04
    acceptance_criteria:
      - Only active users in the note's company are retained as mentions.
      - Crafted or unsafe mention markup is sanitized server-side.
      - Invalid or cross-company users are never notified.
    expected_repositories:
      required: [contact-service]
      optional: [qontak-customer-fe]

  - id: REQ-NOTES-004
    title: Notify newly mentioned users at most once per note
    type: functional
    source:
      document: prds/prd-notes-mention-user.md
      section: NOTE-MENTION-S03
    acceptance_criteria:
      - Notification dispatch is asynchronous and does not block saving a note.
      - A user is notified at most once for a note, including after edits.
      - Self mentions do not create notifications.
    expected_repositories:
      required: [contact-service]
      optional: [qontak-customer-fe]

  - id: REQ-NOTES-005
    title: Resolve real company users in the web mention composer
    type: functional
    source:
      document: prds/prd-notes-mention-user.md
      section: NOTE-MENTION-S01
    acceptance_criteria:
      - The picker queries active company users and shows names and avatars.
      - Empty and unavailable directory results have explicit, non-blocking states.
    expected_repositories:
      required: [qontak-customer-fe]
      optional: [contact-service]

  - id: REQ-NOTES-006
    title: Preview mentioned user identity with graceful fallback
    type: functional
    source:
      document: prds/prd-notes-mention-user.md
      section: NOTE-MENTION-S05
    acceptance_criteria:
      - Hovering a mention displays available identity details for active users.
      - Inactive, missing, and failed lookups retain a readable note and show a fallback.
    expected_repositories:
      required: [qontak-customer-fe]
      optional: [contact-service]
