Capablio

Prompt 13 — Survey campaign, rater, notification, and release lifecycle

Implement a human-readable campaign lifecycle that replaces raw state and rater JSON with safe operational workflows.

Updated

Required context

  • Program builder and question assembly engine
  • Rater relationship and anonymity policies
  • HR and manager workspaces
  • Current survey lifecycle screen

Prompt

Implement a human-readable campaign lifecycle that replaces raw state and rater JSON with safe operational workflows.

1. Campaign model and state machine

Document and implement approved states such as:

draft → nomination → review → scheduled → inviting → collecting → closing
→ processing → threshold_wait → ready_for_release → released → archived

Include paused, cancelled, failed, reopened, and expired paths where valid. Do not expose internal job states as primary user language.

Every transition defines:

  • Allowed actor/permission
  • Preconditions
  • Side effects/jobs
  • Idempotency
  • Notification behavior
  • Audit event
  • Reversal/compensating action
  • User-visible status

2. Campaign overview

Show:

  • Program and version
  • Population/scope
  • Observation and collection periods
  • State stepper
  • Participants and exclusions
  • Rater-group readiness
  • Completion funnel
  • Threshold readiness
  • Delivery/job errors
  • Next recommended action
  • Activity history

3. Participant and rater management

Provide named, filterable tables for authorized users:

  • Subject
  • Manager
  • Proposed/approved raters by relationship
  • Internal/external status
  • Invitation status
  • Completion state shown only within anonymity policy
  • Conflicts, duplicates, missing groups
  • Exceptions and reasons

Use people names and relationship labels, not user IDs or JSON.

4. Nomination and approval

Support tenant-configured patterns:

  • System proposal
  • Subject nomination
  • Manager approval
  • HR exception
  • External raters
  • Replacement before/after invitation according to policy

Preview group size and anonymity impact. Audit overrides.

5. Notifications and reminders

Implement templates and jobs for:

  • Invitation
  • Reminder
  • Deadline change
  • Completion confirmation
  • Report ready/released
  • Recovery/error where appropriate

Provide schedule, channel, localization, send status, failure, retry, suppression, and tenant branding. Ensure idempotency and no duplicate reminders.

6. Closing, processing, and release

  • Validate threshold and completeness.
  • Explain pending/suppressed groups.
  • Run report/import/AI processing through observable jobs.
  • Allow authorized preview of aggregate output without breaking privacy.
  • Release to subject according to policy.
  • Notify and route to reflection/PDP.
  • Support archival and retention.

7. External-rater experience

Use a secure, mobile-first token/auth flow with privacy notice, estimated time, save/resume policy, and completion. Guest raters do not require paid subject seats.

8. Tests

  • Every state transition and invalid transition
  • Concurrent actions/idempotency
  • Invitation token expiry/replay
  • Notification retry and duplicate prevention
  • Rater replacement
  • Threshold and suppression
  • Scope/role access
  • Cancellation/reopen
  • Timezone/deadline behavior

Acceptance gates

  • No raw JSON is shown in normal campaign operations.
  • HR can identify the next action and failure reason.
  • Relationship completion and thresholds do not enable re-identification.
  • Notification and transition side effects are idempotent and audited.