MY PREVENTION PLAN / DESIGN EVIDENCE

R1 UML model checks

14 October 2026. These diagrams model the implemented R1 subset. Import, participation lifecycle and aggregates remain in the reference POC.

Plan and proposal states

Loading diagram. Scroll horizontally to see wide diagrams.

Diagram source
stateDiagram-v2
  [*] --> Proposed: member requests matching template
  Proposed --> Declined: member declines
  Proposed --> ActiveV1: member accepts with current ETag
  Declined --> [*]
  ActiveV1 --> PendingChange: assigned authorized coach proposes
  PendingChange --> ActiveV1: member declines
  PendingChange --> ActiveV1: sharing revoked, change cancelled
  PendingChange --> ActiveV2: member accepts with ETag and current base
  ActiveV2 --> [*]
  note right of PendingChange
    Plan remains active at v1.
    PendingChange is a separate entity state.
    Stale acceptance changes nothing.
  end note

Authorized review and support handoff

Loading diagram. Scroll horizontally to see wide diagrams.

Diagram source
sequenceDiagram
  actor Member
  participant API
  participant Session
  participant Rules
  participant PostgreSQL
  actor Coach
  actor Analyst
  Member->>API: Save check-in / calculate review
  API->>PostgreSQL: BEGIN, lock visitor session
  API->>Session: Verify actor, generation and revision
  API->>Rules: Fixed-week activities and categorical check-in
  Rules-->>API: BR06 support offered plus completeness
  API->>PostgreSQL: Persist immutable review snapshot, COMMIT
  API-->>Member: Explanation, no automatic support request
  Member->>API: Explicit support request with sharing enabled
  API->>PostgreSQL: Lock and recheck sharing, enforce unresolved uniqueness
  API-->>Member: Committed support reference
  Coach->>API: Propose slots and rationale against base v1
  API->>PostgreSQL: Lock, check assignment/sharing, save proposal
  API-->>Coach: Proposed change, active v1 unchanged
  Member->>API: Accept proposal with plan ETag
  API->>PostgreSQL: Lock, check ETag/base/sharing, insert v2, COMMIT
  API-->>Member: Active v2, preserved v1 and earlier snapshot
  Analyst->>API: Inspect decisions
  API->>Session: Verify analyst actor
  API-->>Analyst: Pseudonymous categories, rule and version references

Checks: proposal and active plan are separate; no implicit support creation; every protected transaction shares the session lock with revocation/reset; analyst response uses a dedicated projection. Session isolation and version preservation have executable tests. A production concurrency/identity model remains future work.