# Specification: 028-text-marketing-removal

## Status

| Field | Value |
|-------|-------|
| **Created** | 2025-01-13 |
| **Current Phase** | Ready for Implementation |
| **Last Updated** | 2026-01-13 |

## Documents

| Document | Status | Notes |
|----------|--------|-------|
| product-requirements.md | completed | Full PRD with validation checklist passed |
| solution-design.md | completed | All 4 ADRs confirmed, validation checklist passed |
| implementation-plan.md | completed | 6 phases, 95+ tasks, 8 parallel groups (reviewed 2026-01-14) |

**Status values**: `pending` | `in_progress` | `completed` | `skipped`

## Decisions Log

| Date | Decision | Rationale |
|------|----------|-----------|
| 2025-01-13 | Start with PRD | User selected recommended path - document what/why before technical design |
| 2025-01-13 | ADR-1: DROP tables directly | Feature never reached production - no data to preserve |
| 2025-01-13 | ADR-2: Throw exception for SMS integration | Clear error message helps debugging |
| 2025-01-13 | ADR-3: Return 404 for old URLs | Simple implementation, no active users |
| 2025-01-13 | ADR-4: Single deployment | Feature never went live, lower risk |
| 2026-01-13 | PLAN completed | 6 phases with TDD structure, ready for implementation |
| 2026-01-14 | Plan review completed with Codex | 9 findings addressed, 3 blockers fixed, tracking events deferred |
| 2026-01-14 | Defer tracking events | PRD tracking events out-of-scope for cleanup task - no active users |
| 2026-01-14 | Multi-store migrations automatic | Conductor handles all store DBs - no per-store steps needed |

## Plan Review Summary (2026-01-14)

**Reviewer**: Codex MCP (read-only sandbox)

### Findings Addressed

| Category | Count | Status |
|----------|-------|--------|
| Blockers | 3 | ✅ All fixed |
| Important | 4 | ✅ All fixed |
| Enhancements | 2 | ⚡ Partially addressed |

### Key Changes Made

1. **Phase 1**: Added Jobby scheduler (`jobby-sms.php`) removal and cron/launchd audit
2. **Phase 3**: Added `tasker/model/types/smsTask.php` deletion (security - hardcoded credentials)
3. **Phase 3**: Expanded orphan link search to global codebase sweep
4. **Phase 4**: Added test for existing SMS integrations edge case
5. **Phase 4**: Added event reporting validation task
6. **All Phases**: Added explicit Definition of Done checklists

### Deferred Items

- **PRD Tracking Events**: `marketing_route_404`, `transactional_sms_sent`, `background_job_skip` - deferred as out-of-scope for cleanup task

## Context

**Project**: Remove Text Message Marketing System

The company has discontinued the Text Message marketing functionality, which includes:
- **Text Blast**: Bulk SMS marketing campaigns
- **Trigger-based Marketing**: Automated SMS messages based on customer events

This is a **deprecation/removal task** - not a feature addition. The goal is to safely remove these modules while:
- Preserving all other SMS functionality (transactional messages, two-way chat, etc.)
- Maintaining database integrity
- Not breaking any dependent systems
- Cleaning up orphaned UI elements, routes, and backend code

**Key Constraints**:
- Must NOT affect transactional SMS (appointment reminders, order notifications, etc.)
- Must NOT affect two-way SMS chat functionality
- Must preserve customer opt-in/opt-out preferences for future use

---
*This file is managed by the specification-management skill.*
