Memory Wiki

Untitled Session

2026-05-24 08:29 UTC · 43 messages · cli

You2026-05-24 08:32 UTC
Write build plans for T25-T29 (Module 5 — CRM). All fault rules enforced.
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"content": " 1|# Past Faults Log — Profe Core Modules\n 2|\n 3|> **Purpose:** Every bug, design miss, and edge case discovered during development is recorded here.\n 4|> Future modules (and future TBs) MUST read this log before writing code.\n 5|\n 6|---\n 7|\n 8|## ...
Tool2026-05-24 08:32 UTC
{"content": " 1|# Build Plan V3: Profe Core — Modules 2-10 (COMPLETE)\n 2|\n 3|**Document ID:** BUILD-PLAN-SA-003-V3-COMPLETE \n 4|**Author:** SA (Super Architect) \n 5|**Date:** 2026-05-24 \n 6|**Status:** AUTHORITATIVE \n 7|**Phase 1 Status:** ✅ COMPLETE & LOCKED (P...
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"content": " 501|- ⚠️ **Idempotency guards** — `profe_webhook_events.event_id` UNIQUE KEY. `isDuplicate()` check before processing.\n 502|- ⚠️ **Webhook exempt route** — Register `'stripe-webhook'` via `CsrfMiddlewareInterface::addExemptRoute()`.\n 503|- ⚠️ **Rate limiter** — Redis-backed tok...
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"content": " 1001| - Module management interface\n 1002| - User management\n 1003| - System configuration\n 1004|\n 1005|**Critical Design Decisions:**\n 1006|- ⚠️ **Trigger loop prevention** — Automator tracks execution depth. Halts at depth > 3.\n 1007|- ⚠️ **admin_app architecture** — ...
Donna2026-05-24 08:32 UTC
Let me look at existing reference build plans and module structure to understand proper patterns.
Tool2026-05-24 08:32 UTC
{"total_count": 14, "files": ["/root/.hermes/plans/task-t24-build-plan.md", "/root/.hermes/plans/task-t23-build-plan.md", "/root/.hermes/plans/task-t22-build-plan.md", "/root/.hermes/plans/task-t21-build-plan.md", "/root/.hermes/plans/task-t18-build-plan.md", "/root/.hermes/plans/task-t20-build-plan...
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"content": " 1|# Build Plan — T21: BrevoService (Module 4 — Email)\n 2|\n 3|## 1. Overview\n 4|\n 5|**Module Name:** `brevo_service`\n 6|**Namespace:** `Profe\\BrevoService`\n 7|**Responsibility:** Brevo API v3 wrapper — transactional email sending, campaign management, ...
Tool2026-05-24 08:32 UTC
{"content": " 1|# Build Plan: T14 — member_admin (Member Management Admin API)\n 2|\n 3|**Module:** Module 2 — Membership\n 4|**Build Order:** 4 of 4 (Module 2)\n 5|**Depends On:** T11 (mem_levels), T12 (mem_data), T13 (access_control)\n 6|**Status:** PLANNED\n 7|**Consum...
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"content": " 1|# Build Plan — T22: MailQueue (Module 4 — Email)\n 2|\n 3|## 1. Overview\n 4|\n 5|**Module Name:** `mail_queue`\n 6|**Namespace:** `Profe\\MailQueue`\n 7|**Responsibility:** Structured email queuing with idempotency keys, exponential backoff retry, and cro...
Tool2026-05-24 08:32 UTC
{"content": " 1|# Build Plan — T24: EmailAdmin (Module 4 — Email)\n 2|\n 3|## 1. Overview\n 4|\n 5|**Module Name:** `email_admin`\n 6|**Namespace:** `Profe\\EmailAdmin`\n 7|**Responsibility:** Email administration API — email log viewer, test email sender, template previe...
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"total_count": 0}
Tool2026-05-24 08:32 UTC
{"output": "access_control\nbilling_admin\ncheckout_service\nmem_data\nmem_levels\nmember_admin\nmigrations\norder_management\nrate_limiter\nstripe_service\nwebhook_handler", "exit_code": 0, "error": null}
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"output": "", "exit_code": 2, "error": null}
Tool2026-05-24 08:32 UTC
{"output": "", "exit_code": 2, "error": null}
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"output": "/root/profe-modules\n/root/profe-modules/access_control\n/root/profe-modules/access_control/src\n/root/profe-modules/access_control/tests\n/root/profe-modules/billing_admin\n/root/profe-modules/billing_admin/src\n/root/profe-modules/billing_admin/tests\n/root/profe-modules/checkout_servi...
Tool2026-05-24 08:32 UTC
{"output": "total 32\ndrwxr-xr-x 2 root root 4096 May 24 08:25 .\ndrwxr-xr-x 13 root root 4096 May 24 08:24 ..\n-rw-r--r-- 1 root root 2955 May 24 06:21 003_create_profe_mem_levels.sql\n-rw-r--r-- 1 root root 1786 May 24 06:21 004_create_profe_mem_history.sql\n-rw-r--r-- 1 root root 2487 May 24 ...
Donna2026-05-24 08:32 UTC
Let me look at an existing module with both PHP migration and tests for patterns.
Tool2026-05-24 08:32 UTC
{"output": "/root/profe-modules/mem_levels/README.md\n/root/profe-modules/mem_levels/composer.json\n/root/profe-modules/mem_levels/module.json\n/root/profe-modules/mem_levels/src/MemLevels/Exception/MemLevelsException.php\n/root/profe-modules/mem_levels/src/MemLevels/MemLevelsInterface.php\n/root/pr...
Tool2026-05-24 08:32 UTC
{"content": " 1|{\n 2| \"name\": \"mem_levels\",\n 3| \"version\": \"1.0.0\",\n 4| \"description\": \"Membership tier definitions, pricing configuration, and feature flags\",\n 5| \"dependencies\": [\n 6| \"Profe\\\\CoreUsers\\\\CoreUsersInterface\",\n ...
Donna2026-05-24 08:32 UTC
Now I have a thorough understanding of the patterns. Let me create all 5 build plans.
Tool2026-05-24 08:32 UTC
{"bytes_written": 14596, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"bytes_written": 14370, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"bytes_written": 16395, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"bytes_written": 12899, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-24 08:32 UTC
Tool2026-05-24 08:32 UTC
{"bytes_written": 14852, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-24 08:32 UTC
Let me verify all 5 files were created successfully.
Tool2026-05-24 08:32 UTC
{"output": "=== task-t25-build-plan.md ===\n319 /root/.hermes/plans/task-t25-build-plan.md\n# Build Plan — T25: CrmContacts (Module 5 — CRM)\n\n## 1. Overview\n\n=== task-t26-build-plan.md ===\n363 /root/.hermes/plans/task-t26-build-plan.md\n# Build Plan — T26: CrmTags (Module 5 — CRM)\n\n## 1. Over...
Donna2026-05-24 08:32 UTC
Now let me do a final FAULT compliance check across all 5 plans.
Tool2026-05-24 08:32 UTC
{"output": "=== FAULT-004: CSRF on POST/DELETE ===\n/root/.hermes/plans/task-t25-build-plan.md:1\n/root/.hermes/plans/task-t26-build-plan.md:1\n/root/.hermes/plans/task-t27-build-plan.md:1\n/root/.hermes/plans/task-t28-build-plan.md:1\n/root/.hermes/plans/task-t29-build-plan.md:1\n\n=== FAULT-005/00...
Donna2026-05-24 08:32 UTC
All 5 build plans are verified. Here's the summary: --- ## Summary ### What I Did Created 5 detailed build plans for Module 5 (CRM) — T25 through T29 — under `/root/.hermes/plans/`. ### Files Created | File | Lines | Modules | |---|---|---| | `/root/.hermes/plans/task-t25-build-plan.md` | 319 | `crm_contacts` | | `/root/.hermes/plans/task-t26-build-plan.md` | 363 | `crm_tags` | | `/root/.hermes/plans/task-t27-build-plan.md` | 373 | `crm_sync` | | `/root/.hermes/plans/task-t28-build-plan.md` | 306 | `crm_import_export` | | `/root/.hermes/plans/task-t29-build-plan.md` | 344 | `crm_admin` | ### Fault Rules Compliance | Fault | Rule | Status | |---|---|---| | **FAULT-004** | CSRF on POST/DELETE/PUT | ✅ All 5 plans: mutation endpoints use `checkAdminAccessWithCsrf()` calling `requireValidNonce()` | | **FAULT-005/009** | ≥12 tests per module | ✅ T25: 14 tests, T26: 15 tests, T27: 15 tests, T28: 13 tests, T29: 14 tests | | **FAULT-006** | PHP migration classes | ✅ T25: `CreateCrmContactsMigration.php`, T26: `CreateCrmTagsMigration.php` + `CreateCrmUserTagsMigration.php`, T27: `CreateCrmSyncQueueMigration.php`. T28/T29 correctly have **no migrations** (no new tables per task spec) | | **FAULT-008** | Declared deps injected | ✅ All 5 plans: constructor receives all declared dependencies, verified via `testConstructStoresAllDependencies()` test | | **FAULT-002/007** | Document direct `profe_users` queries | ✅ All 5 plans have dedicated FAULT-002 Workaround sections with commented code blocks explaining each bypass | ### Key Design Decisions 1. **T25 (crm_contacts)**: Reconciled PB ("None (uses profe_users)") with task spec ("Table: profe_crm_contacts") — added a **companion table** `profe_crm_contacts` for CRM-specific metadata (notes, opt-in status, segmentation, Brevo sync fields) that does not belong on the locked `profe_users` identity hub. 2. **T26 (crm_tags)**: Two tables (`profe_crm_tags`, `profe_crm_user_tags`) with FK CASCADE. Tag deletion auto-emits event for sync queue (per PB critical design decision). 3. **T27 (crm_sync)**: Queue-based with dedup (checks for existing pending job before INSERT), exponential backoff, Brevo rate limit pause after 100 requests, status machine: `pending → processing → completed/failed`. 4. **T28 (crm_import_export)**: No new tables. CSV import validates via `InputSanitizerInterface`, supports dry-run validation, partial success, and auto-tag creation. 5. **T29 (crm_admin)**: Orchestration layer — no new tables. DELETE is soft (marks cancelled + enqueues Brevo delete). All mutations delegate to underlying CRM interfaces.