CRUD: Care Agent Configuration
Property: ChurchWiseAI Category: Admin Dashboard
Tier:
pro-both
Persona: pastor-admin
Touchpoint: /admin/[token]/care-tab
Preconditions
- Pastor logged into admin dashboard
- Care Agent feature enabled (Pro tier or higher)
Steps
| # | Action | Expected Result |
|---|---|---|
| 1 | Navigate to Care tab | Care tab loads. Shows enabled/disabled toggle and Care Agent cards. |
| 2 | Create new Care Agent | Click 'Add Agent' button. Form appears with: agent name, personality, escalation rules, response style. Can save new agent. |
| 3 | Edit Care Agent personality | Click edit on existing agent. Text editor loads for personality description. Can modify tone, values, handling instructions. Changes saved. |
| 4 | Set escalation rules for Care Agent | Config section for escalation triggers: keywords (crisis, abuse, suicidal), response actions (email pastor, flag priority, handoff to human). Rules save immediately. |
| 5 | Test Care Agent response | Live preview or test widget shows how agent responds to sample scenarios. Can see personality reflected in responses. |
| 6 | Enable/disable Care Agent | Toggle switch works. When enabled, Care Agent active on chatbot/voice. When disabled, feature unavailable. |
| 7 | Assign Care Agent to specific channels | Can specify which agent handles: chatbot visitors, voice callers, prayer requests, etc. Assignment takes effect immediately. |
| 8 | Delete Care Agent | Can remove unused agent. Confirmation popup prevents accidental deletion. Once deleted, no longer appears in agent list. |
| 9 | Duplicate Care Agent configuration | Can clone existing agent to create variations (e.g., prayer-focused vs crisis-response). Faster than creating from scratch. |
Known Failure Modes
- Escalation rules not saving — care requests miss crisis triggers
- Live preview not showing changes — admin can't verify agent personality
- Toggle disables agent but requests still route to it — agent still active
- Deletion doesn't confirm — accidental loss of agent config
References
- Playwright spec:
e2e/crud-admin-care.spec.ts - Code files:
Notes
Tests full CRUD for Care Agent configuration. Care Agent is a specialized chatbot personality for handling sensitive pastoral situations (grief, crisis, prayer requests). Admins need to create, customize personality, set escalation rules, and manage multiple agents. Live preview is critical so admins can verify the agent's tone before deployment.