Memory Wiki

Untitled Session

2026-05-25 03:57 UTC · 43 messages · cli

You2026-05-25 04:00 UTC
Write TA build briefs for ALL 7 tasks of Module 7 (Community). Each brief should be a detailed technical implementation plan written to /root/.hermes/plans/. ## Sources - **Project Brief:** /root/.hermes/plans/pb-m7-community.md (authoritative spec) - **Build Plan V3:** /root/.hermes/plans/pb-complete.md (lines 746-833 for Module 7) - **Past Faults Log:** /root/.hermes/plans/past-faults-log.md - **Locked interfaces:** From past modules - CoreUsersInterface, ConfigManagerInterface, EventBusInterface, CsrfMiddlewareInterface, InputSanitizerInterface, ProfeDB, DbMigrationInterface ## Tasks to write briefs for ### T36 — Community Spaces - Status: Keep existing code (REAL implementation) - Tables: profe_community_spaces, profe_community_members (already exist) - Build order priority: 1 (first, no dependencies) - Dependency input: profe_users.uuid, CoreUsersInterface, EventBusInterface, InputSanitizerInterface ### T37 — Content Engine - Status: Pivot existing code (content-focused → post-focused) - Tables: profe_content_items, profe_content_versions (exist, may need schema tweaks) - Build order priority: 2 (depends on T36) - Key changes: rename createContent→createPost, add publishPost(), inject community_spaces dependency ### T38 — Comment System - Status: Scrap and rebuild from scratch - Tables: profe_comments (NEEDS NEW SCHEMA with post_id, body, parent_id, status, displayed_nickname) - Build order priority: 3 (depends on T37) ### T39 — Badge System - Status: Scrap and rebuild - Tables: profe_badges (NEW), profe_user_badges (NEW) - needs badge_key, icon, criteria, point_value - Build order priority: 4 (depends on EventBus for activity listening) ### T40 — Leaderboard - Status: Scrap and rebuild - Table: profe_leaderboard_entries (NEW SCHEMA - computed data) - Build order priority: 5 (depends on T39 badges) ### T41 — Document Library - Status: Scrap and rebuild - Tables: profe_documents, profe_document_categories (NEW SCHEMAS) - Build order priority: 6 (depends on bunny_storage from Module 6) - Dependency: bunny_storage dependency MUST be injected ### T42 — Moderation Handler - Status: Scrap and rebuild - Tables: profe_moderation_queue, profe_moderation_actions (NEW SCHEMAS) - Build order priority: 7 (depends on T37 content + T38 comments) - Note: Namespace should be Profe\ModerationHandler (not Profe\Moderation) ## Brief template Write each brief as /root/.hermes/plans/task-tXX-build-plan.md: ``` # Task Build Plan: TXX — Name **Source:** PB-M7-COMMUNITY-001 §2.X **Author:** TA **Date:** 2026-05-25 ## 1. Task Overview ## 2. Interface Contract (exact PHP interface) ## 3. Database Schema (full DDL) ## 4. REST Routes ## 5. Dependencies & Injection ## 6. Events (emitted + consumed) ## 7. Implementation Plan ## 8. Test Plan (≥12 tests) ``` Write ALL 7 briefs. Make them implementation-ready - TB should be able to code from them directly.
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"content": " 1|# Project Brief: Module 7 — Community\n 2|\n 3|**Document ID:** PB-M7-COMMUNITY-001\n 4|**Author:** SA\n 5|**Date:** 2026-05-25\n 6|**Status:** DRAFT\n 7|**Build Plan Source:** pb-complete.md (lines 746-833)\n 8|\n 9|---\n 10|\n 11|## §0 Exec...
Tool2026-05-25 04:00 UTC
{"content": " 746|### Module Module 7 — Community (Site Areas: 9, 10, 11)\n 747|\n 748|**Goal:** Community spaces with content, comments, gamification.\n 749|\n 750|**Modules (7):** T36-T42\n 751|\n 752|| # | Module | Responsibility | New Tables | Depends On (Locked) |\n 753||---|---...
Tool2026-05-25 04:00 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|## ...
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"content": " 501| `status` ENUM('draft','published','archived','scheduled') NOT NULL DEFAULT 'draft',\n 502| `displayed_nickname` VARCHAR(250) NOT NULL COMMENT 'Snapshot from profe_users.display_name',\n 503| `publish_at` DATETIME NULL COMMEN...
Donna2026-05-25 04:00 UTC
Let me also check the existing code structure and migration naming conventions.
Tool2026-05-25 04:00 UTC
{"total_count": 20, "files": ["./profe-modules/csrf_middleware/src/CsrfMiddleware/CsrfMiddlewareInterface.php", "./profe-modules/input_sanitizer/src/InputSanitizer/InputSanitizerInterface.php", "./profe-modules/event_bus/src/EventBus/EventBusInterface.php", "./profe-modules/config_manager/src/Config...
Tool2026-05-25 04:00 UTC
{"total_count": 5, "files": ["./profe-modules/migrations/044_create_profe_email_templates.sql", "./profe-modules/migrations/043_create_profe_mail_queue.sql", "./profe-modules/migrations/042_create_profe_brevo_webhook_events.sql", "./profe-modules/email_templates/migrations/V002__seed_email_templates...
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"total_count": 2, "files": ["/root/profe-modules/migrations/017_create_profe_community_spaces.sql", "/root/profe-modules/migrations/018_create_profe_community_members.sql"]}
Tool2026-05-25 04:00 UTC
{"total_count": 2, "files": ["/root/profe-modules/migrations/020_create_profe_content_versions.sql", "/root/profe-modules/migrations/019_create_profe_content_items.sql"]}
Tool2026-05-25 04:00 UTC
{"total_count": 0}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"total_count": 30, "files": ["/root/profe-modules/migrations/044_create_profe_email_templates.sql", "/root/profe-modules/migrations/043_create_profe_mail_queue.sql", "/root/profe-modules/migrations/042_create_profe_brevo_webhook_events.sql", "/root/profe-modules/migrations/006_create_profe_webhook_...
Tool2026-05-25 04:00 UTC
{"total_count": 10, "files": ["/root/profe-modules/community_spaces/tests/Unit/CommunitySpacesRepositoryTest.php", "/root/profe-modules/community_spaces/tests/Unit/CommunitySpacesServiceTest.php", "/root/profe-modules/community_spaces/tests/Fixture/CommunitySpacesFixtures.php", "/root/profe-modules/...
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"content": " 1|<?php\n 2|/**\n 3| * CommunitySpacesService — Community Spaces Service Implementation\n 4| *\n 5| * @package Profe\\CommunitySpaces\n 6| */\n 7|\n 8|declare(strict_types=1);\n 9|\n 10|namespace Profe\\CommunitySpaces;\n 11|\n 12|use Profe\...
Tool2026-05-25 04:00 UTC
{"total_count": 1, "files": ["/root/profe-modules/community_spaces/src/CommunitySpaces/CommunitySpacesInterface.php"]}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"content": " 1|<?php\n 2|/**\n 3| * CommunitySpacesInterface — Community Spaces Service Contract\n 4| *\n 5| * @package Profe\\CommunitySpaces\n 6| */\n 7|\n 8|declare(strict_types=1);\n 9|\n 10|namespace Profe\\CommunitySpaces;\n 11|\n 12|interface Comm...
Tool2026-05-25 04:00 UTC
{"total_count": 7, "files": ["/root/profe-modules/content_engine/src/ContentEngine/Migration/CreateContentItemsMigration.php", "/root/profe-modules/content_engine/src/ContentEngine/ContentEngineModule.php", "/root/profe-modules/content_engine/src/ContentEngine/Migration/CreateContentVersionsMigratio...
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"content": " 1|<?php\n 2|/**\n 3| * ContentEngineInterface — Content Engine Service Contract\n 4| *\n 5| * @package Profe\\ContentEngine\n 6| */\n 7|\n 8|declare(strict_types=1);\n 9|\n 10|namespace Profe\\ContentEngine;\n 11|\n 12|interface ContentEngin...
Tool2026-05-25 04:00 UTC
{"content": " 1|<?php\n 2|/**\n 3| * ContentEngineService — Content Engine Service Implementation\n 4| *\n 5| * @package Profe\\ContentEngine\n 6| */\n 7|\n 8|declare(strict_types=1);\n 9|\n 10|namespace Profe\\ContentEngine;\n 11|\n 12|use Profe\\Content...
Donna2026-05-25 04:00 UTC
Now I have comprehensive context. Let me write all 7 build briefs.
Tool2026-05-25 04:00 UTC
{"bytes_written": 12513, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"bytes_written": 15159, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"bytes_written": 11464, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"bytes_written": 12090, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"bytes_written": 9826, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"bytes_written": 12776, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Tool2026-05-25 04:00 UTC
{"bytes_written": 12169, "dirs_created": true, "lint": {"status": "skipped", "message": "No linter for .md files"}}
Donna2026-05-25 04:00 UTC
Let me verify all 7 files were created successfully.
Tool2026-05-25 04:00 UTC
{"output": "-rw-r--r-- 1 root root 14587 May 24 08:42 /root/.hermes/plans/task-t30-build-plan.md\n-rw-r--r-- 1 root root 12125 May 24 08:43 /root/.hermes/plans/task-t31-build-plan.md\n-rw-r--r-- 1 root root 12804 May 24 08:43 /root/.hermes/plans/task-t32-build-plan.md\n-rw-r--r-- 1 root root 13152 M...
Donna2026-05-25 04:00 UTC
All 7 TA build briefs have been written successfully. Here's the summary: ## What I Did Wrote **7 detailed TA build briefs** for Module 7 (Community) of the Profe membership site, each following the prescribed template (Overview, Interface Contract, DB Schema, REST Routes, Dependencies, Events, Implementation Plan, Test Plan). ## Files Created | File | Task | Lines | Status | |------|------|-------|--------| | `/root/.hermes/plans/task-t36-build-plan.md` | T36 — Community Spaces | 289 | KEEP (verification-only) | | `/root/.hermes/plans/task-t37-build-plan.md` | T37 — Content Engine | 315 | PIVOT | | `/root/.hermes/plans/task-t38-build-plan.md` | T38 — Comment System | 253 | REBUILD | | `/root/.hermes/plans/task-t39-build-plan.md` | T39 — Badge System | 269 | REBUILD | | `/root/.hermes/plans/task-t40-build-plan.md` | T40 — Leaderboard | 250 | REBUILD | | `/root/.hermes/plans/task-t41-build-plan.md` | T41 — Document Library | 294 | REBUILD | | `/root/.hermes/plans/task-t42-build-plan.md` | T42 — Moderation Handler | 250 | REBUILD | **Total: 1,920 lines** across all 7 briefs. ## Key Details Captured - **T36 (Keep):** Documents existing interface, schema, routes, events. Verification checklist for FAULT-004 (CSRF), FAULT-006 (migration classes), FAULT-009 (≥12 tests), FAULT-011 (backslash correctness), FAULT-017 (single exception class). - **T37 (Pivot):** Rewrites interface from generic `listContent/getContent/createContent/updateContent/deleteContent` to post-focused `createPost/updatePost/publishPost/getPosts/getPost`. Adds `CommunitySpacesInterface` injection. Creates new `profe_com_posts` table (keeps old `profe_content_items` untouched). Adds slug and `displayed_nickname` columns. Retires old event names. - **T38 (Rebuild):** Deletes duplicate CommunitySpaces code. Creates `profe_com_comments` with `post_id, body, parent_id, status ENUM, displayed_nickname`. Threading depth max 3 enforced in app layer. Post-scope validation via `ContentEngineInterface`. - **T39 (Rebuild):** Creates `profe_com_badges` + `profe_com_user_badges` with UNIQUE `(user_id, badge_key)`. Event-driven badge awarding via listeners on `post_published` and `comment_created`. Seeded badge set defined (first_post, centurion, etc.). - **T40 (Rebuild):** No new tables — computed from aggregation queries against `profe_com_posts`, `profe_com_comments`, `profe_com_user_badges`. In-memory cache with TTL (5 min). Metrics: posts, comments, badges, points. - **T41 (Rebuild):** Creates `profe_com_documents` + `profe_com_document_categories`. Bunny Storage integration with signed URLs. Space membership check enforced on upload/download. Upload flow: local temp → Bunny Storage → DB metadata. - **T42 (Rebuild):** Renames directory `moderation` → `moderation_handler`. Renames namespace to `Profe\ModerationHandler`. Creates `profe_com_moderation_flags` with polymorphic `(content_type, content_id)` pattern. Flag/resolve/dismiss workflow. Dependencies include T37 + T38 for boot ordering. All briefs are implementation-ready — a TB can code directly from them, with exact PHP interfaces, DDL, route definitions, constructor signatures, event payloads, and test case descriptions included.