Untitled Session
2026-05-25 20:04 UTC · 108 messages · cli
You2026-05-25 20:07 UTC
Fix the SEO Project Brief at /root/.hermes/plans/pb-m9-seo.md based on SGS's review at /root/.hermes/plans/pb-m9-seo-sgs-review.md
Read the SGS review thoroughly, then fix ALL issues in the PB:
**P0 (must fix):**
1. Add migration cleanup strategy for 5 old tables from scrapped stubs
2. Fix `injectPageSchema()` approach — catalog pages are NOT WP post types, so Rank Math Pro schema templates won't work directly. Propose an alternative (e.g., JSON-LD injection via a different hook, or a custom renderer for catalog pages)
3. Address the Rank Math API assumption (`rank_math_update_sitemap()` function may not exist — verify and provide alternative)
**Other findings to address:**
- Add canonical URL strategy for community UGC
- Add pagination SEO considerations
- Add image SEO requirements
- Add Core Web Vitals impact assessment
- Add programmatic form confirmation page exclusion
- Clarify tone taxonomy registration location
- Fix any rank_math_update_sitemap() API assumptions
Update the PB in-place at /root/.hermes/plans/pb-m9-seo.md. Keep the same format and structure. After fixing, do a quick sanity check that all changes integrate well with the rest of the document.
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 1|# Project Brief: Module 9 — SEO\n 2|\n 3|**Document ID:** PB-M9-SEO-001\n 4|**Author:** SA\n 5|**Date:** 2026-05-25\n 6|**Status:** DRAFT — Pending Profe greenlight\n 7|**Build Plan Source:** pb-complete.md (lines 890-957), features-brief.md\n 8|**Deck...
Tool2026-05-25 20:07 UTC
{"content": " 1|# SGS Review: Module 9 — SEO (PB-M9-SEO-001)\n 2|\n 3|**Reviewer:** SGS (subagent)\n 4|**Date:** 2026-05-25\n 5|**Document:** `/root/.hermes/plans/pb-m9-seo.md` (688 lines)\n 6|**Context sources:**\n 7|- `/root/.hermes/plans/pb-complete.md` (original build...
Donna2026-05-25 20:07 UTC
Let me read the rest of the PB.
Tool2026-05-25 20:07 UTC
{"content": " 501|2. Dr. Saunders voice content → E-E-A-T pillar (rank for academic/teacher keywords)\n 502|3. Both voices → internal linking between them (learners discover lit reviews → E-E-A-T signal, peers discover catalog → teaching resource)\n 503|\n 504|### §5.2 Keyword Strategy\n 5...
Donna2026-05-25 20:07 UTC
Let me research Rank Math's sitemap regeneration API to give a definitive answer, and also check the existing stub modules for reference.
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "Rank Math SEO Filters and Hooks for Developers",
"url": "https://rankmath.com/kb/filters-hooks-api-developer/",
"description": "Rank Math SEO has developer-friendly filters and hooks you can use to interact with ...
Tool2026-05-25 20:07 UTC
{"total_count": 0}
Tool2026-05-25 20:07 UTC
{"total_count": 0}
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": false, "error": "DuckDuckGo (ddgs) is a search-only backend and cannot extract URL content. Set web.extract_backend to firecrawl, tavily, exa, or parallel."}
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "How to Make Polylang Compatible With Rank Math",
"url": "https://rankmath.com/kb/polylang-compatibility/",
"description": "because Rank Math does not accept several domains or subdomains in one sitemap. add_filte...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "Dynamic XML Sitemaps Generator for... | WordPress.org 台灣繁體中文",
"url": "https://tw.wordpress.org/plugins/xml-sitemap-generator-for-google/",
"description": "I used the Rank Math sitemaps on a multi domain WPML sit...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{
"success": false,
"error": "DuckDuckGo search failed: module 'httpcore._sync' has no attribute 'http2'"
}
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "sitemap question - WordPress.org",
"url": "https://wordpress.org/support/topic/sitemap-question-14/",
"description": "Aug 4, 2025 · Hello @mcdeth, By default, the sitemap cache in Rank Math is stored as a transie...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": false, "error": "DuckDuckGo (ddgs) is a search-only backend and cannot extract URL content. Set web.extract_backend to firecrawl, tavily, exa, or parallel."}
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "SOLVED: Sitemap Showing 404 Error In WordPress (2026) | WPSack",
"url": "https://wpsack.com/how-to-fix-sitemap-404-error-wordpress/",
"description": "How to fix Rank Math sitemap showing 404 error in WordPress 20...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "Rank Math SEO Review 2026: Free vs Pro, Setup & Honest ...",
"url": "https://plugintheme.net/blog/rank-math-seo-review-2026",
"description": "Feb 4, 2026 · Detailed Rank Math review with AI features, schema marku...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": false, "error": "DuckDuckGo (ddgs) is a search-only backend and cannot extract URL content. Set web.extract_backend to firecrawl, tavily, exa, or parallel."}
[Tool loop warning: same_tool_failure_warning; count=3; web_extract has failed 3 times this turn. This looks like a loop. Do not ...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{
"success": true,
"data": {
"web": [
{
"title": "Rank Math SEO Shortcode - WPShortcode",
"url": "https://wpshortcode.org/seo-by-rank-math/",
"description": "The Rank Math HTML Sitemap shortcode is a tool that generates an HTML sitemap on your WordPress site. Th...
Donna2026-05-25 20:07 UTC
Now I have a thorough understanding of all issues. Let me now implement all the fixes systematically. I'll work from top to bottom of the PB.
**Change 1: §1.8 — Add migration cleanup plan for 5 old tables and 4 stub module directories.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -103,6 +103,20 @@\n | `redirect_manager` | `/root/profe-modules/redirect_manager/` | GENERIC CRUD STUB | Same pattern. Migration `profe_redirect_rules` is generic. **SCRAP AND REBUILD.** |\n...
Donna2026-05-25 20:07 UTC
**Change 2: §3.3 Schema section — Fix catalog schema injection approach.** Replace the incorrect Rank Math Pro Schema Templates claim for catalog pages.
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -141,7 +141,7 @@\n | **XML Sitemaps** | Per-post-type include/exclude, priority, changefreq control | Basic include/exclude | Minimal — auto-generates, limited control |\n | **llms.txt** | ✅...
Donna2026-05-25 20:07 UTC
**Change 3: §2.3 — Clarify that catalog schema is NOT via Rank Math Pro templates.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -172,11 +172,13 @@\n \n ### §2.3 What Requires Rank Math Pro\n \n-1. **Custom Schema Templates** — Required for ScholarlyArticle (Lit Reviews) and isAccessibleForFree (Bridge Pages/ Catalog)...
Donna2026-05-25 20:07 UTC
**Change 4: §3.3 Schema section — Fix catalog schema, add canonical URL, pagination, image SEO, and form confirmation exclusion.**
First, let me fix the Bridge/Catalog pages schema section to make it clear this is custom `seo_bridge` work, not Rank Math templates.
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -254,6 +254,7 @@\n ```\n \n **Bridge/Catalog Pages (Site Area 6 — paywalled content preview):**\n+These pages are NOT WP post types, so Rank Math Pro Schema Templates cannot apply. Schema is...
Donna2026-05-25 20:07 UTC
**Change 5: §3.3 Community SEO — Add canonical URL column and pagination note.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -275,13 +275,13 @@\n \n **Implementation:** Rank Math sitemap inclusion + crawl optimization strategy.\n \n-| Community Feature | SEO Treatment | Rationale |\n-|------------------|----------...
Donna2026-05-25 20:07 UTC
**Change 6: Fix sitemap regeneration trigger — replace non-existent `rank_math_update_sitemap()` with the correct approach.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -283,7 +283,15 @@\n | Community feed (aggregate) | noindex | N/A | Rapidly changing; no unique value |\n | Comment threads | Include via WordPress comment sitemap (if Rank Math supports it) ...
Donna2026-05-25 20:07 UTC
**Change 7: Add pagination SEO section after the Catalog Pages section.**
Tool2026-05-25 20:07 UTC
{"success": false, "error": "old_string and new_string are identical"}
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"total_count": 7, "matches": [{"path": "/root/.hermes/plans/pb-m9-seo.md", "line": 317, "content": "- Register catalog URLs with Rank Math sitemap generation"}, {"path": "/root/.hermes/plans/pb-m9-seo.md", "line": 318, "content": "- Implement breadcrumb schema for catalog hierarchy"}, {"path": "/ro...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -316,6 +316,19 @@\n - Inject JSON-LD schema markup into catalog page head\n - Register catalog URLs with Rank Math sitemap generation\n - Implement breadcrumb schema for catalog hierarchy\n+...
Donna2026-05-25 20:07 UTC
**Change 8: Add image SEO mentions. First in the Library Pages section, then as a Forward Signal item.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -341,6 +341,11 @@\n - Rich description (not just \"ProfeRadio page\" but \"Collection of 42 Spanish short stories narrated by Dr. Saunders\")\n \n **Custom code needed:** Schema injection fo...
Donna2026-05-25 20:07 UTC
**Change 9: §4 T46 — Comprehensive module breakdown revisions.** This is the biggest change. I'll update responsibilities, interface contract, and build order.
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -438,12 +438,17 @@\n **Purpose:** Bridge between Rank Math SEO plugin and Profe's custom content architecture. This is a SMALL module — Rank Math does the heavy lifting.\n \n **Responsibilit...
Donna2026-05-25 20:07 UTC
**Change 10: Update the interface contract — replace `injectPageSchema()` with `renderSchema()`.**
Tool2026-05-25 20:07 UTC
{"total_count": 1, "matches": [{"path": "/root/.hermes/plans/pb-m9-seo.md", "line": 525, "content": " public function injectPageSchema(): void;"}]}
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 495|) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;\n 496|```\n 497|\n 498|**Interface contract (SeoBridgeInterface — Profe\\\\SeoBridge):**\n 499|\n 500|```php\n 501|namespace Profe\\SeoBridge;\n 502|\n 503|interface SeoBridgeInterface\n 504|{\n...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -511,11 +511,20 @@\n \n /**\n * Generate JSON-LD schema for catalog/library/community pages.\n+ * This is called directly from page template code, NOT via wp_head action.\n ...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -527,14 +527,9 @@\n * Uses delete_option('rank_math_sitemap_cache') — NOT rank_math_update_sitemap().\n */\n public function triggerSitemapUpdate(): void;\n-\n- /**\n- *...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 525| /**\n 526| * Trigger Rank Math sitemap cache clearing + search engine ping.\n 527| * Uses delete_option('rank_math_sitemap_cache') — NOT rank_math_update_sitemap().\n 528| */\n 529| public function triggerSitemapUpdate(): void;\n 530|}\n 531|\n 53...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -530,6 +530,7 @@\n }\n \n ```\n+\n **Events emitted:**\n | Event | Payload | When |\n |-------|---------|------|\n", "files_modified": ["/root/.hermes/plans/pb-m9-seo.md"], "lint": {"status"...
Donna2026-05-25 20:07 UTC
**Change 11: §9 Build order — add migration cleanup and old module deletion steps.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -657,12 +657,18 @@\n \n Phase 9B: Custom seo_bridge Module\n ├── 09-09: Build seo_bridge module\n+│ ├── **Delete old stub directories:** `/root/profe-modules/seo_admin/`, `sitemap_generato...
Donna2026-05-25 20:07 UTC
**Change 12: §7 Deck Board Card Plan — Fix cards 09-05, 09-07, 09-09, 09-10, and 09-19.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -607,12 +607,12 @@\n | 09-02 | Purchase & Install Rank Math Pro | Purchase Pro license. Install Pro plugin. Activate schema templates feature. | P0 |\n | 09-03 | Configure XML Sitemaps | Set...
Donna2026-05-25 20:07 UTC
**Change 13: §7 — Update 09-19 to include Core Web Vitals testing and performance baseline.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -621,7 +621,7 @@\n | 09-16 | Redirect Rules | Audit existing URLs. Set up 301 redirects for any changed URL structure. Configure Rank Math redirect manager. | P2 |\n | 09-17 | Fix Classic Ed...
Donna2026-05-25 20:07 UTC
**Change 14: §8 Risk Assessment — Add Core Web Vitals / performance risk.**
Tool2026-05-25 20:07 UTC
{"total_count": 3, "matches": [{"path": "/root/.hermes/plans/pb-m9-seo.md", "line": 639, "content": "| **Sitemap regeneration delays** | LOW | LOW — content still indexable via internal links | Sitemap regeneration triggered on content publish. Manual regeneration available in Rank Math admin. |"}, ...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -635,7 +635,7 @@\n | **Catalog pages not indexable** | MEDIUM | HIGH — core SEO requirement | Ensure catalog pages return 200, have proper `<head>` meta, and are in sitemap. Test via Google ...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -635,6 +635,7 @@\n | **Catalog pages not indexable** | MEDIUM | HIGH — core SEO requirement | Ensure catalog pages return 200, have proper `<head>` meta, and are in sitemap. Test via Google ...
Donna2026-05-25 20:07 UTC
**Change 15: §10 File Manifest — Add cleanup migration and note old stub deletions.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -713,16 +713,22 @@\n | File | Status | Notes |\n |------|--------|-------|\n | `module.json` | NEW | Dependencies: EventBusInterface, CoreUsersInterface, CsrfMiddlewareInterface, DiContainer...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 718|| `src/SeoBridge/SeoBridgeInterface.php` | NEW | Service contract per §4 |\n 719|| `src/SeoBridge/SeoBridge.php` | NEW | Main implementation |\n 720|| `src/SeoBridge/SeoBridgeModule.php` | NEW | ModuleInstanceInterface, route registration, migration, event listeners, tone tax...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 716|| `README.md` | NEW | Document architecture, Rank Math integration points, cleanup strategy |\n 717|| `composer.json` | NEW | PSR-4 autoload: `Profe\\\\\\\\SeoBridge\\\\\\\\src\\\\\\\\` |\n 718|| `src/SeoBridge/SeoBridgeInterface.php` | NEW | Service contract per §4 |\n 719...
Donna2026-05-25 20:07 UTC
The composer.json line got extra backslashes. Let me fix that.
Tool2026-05-25 20:07 UTC
{"success": true, "files_modified": ["/root/.hermes/plans/pb-m9-seo.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "_warning": "/root/.hermes/plans/pb-m9-seo.md was last read with offset/limit pagination (partial view). Re-read the whole file before overwriting it."}
Donna2026-05-25 20:07 UTC
**Change 16: §11 Forward Signal Items — Add Image SEO item.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -737,7 +737,10 @@\n ### FS-01: Google News Sitemap\n If the site starts publishing news-related content (time-sensitive lit reviews, current events analysis), add Google News sitemap support...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 735|## §11 Forward Signal Items\n 736|\n 737|### FS-01: Google News Sitemap\n 738|If the site starts publishing news-related content (time-sensitive lit reviews, current events analysis), add Google News sitemap support. Rank Math supports this as a built-in toggle.\n 739|\n ...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -743,7 +743,7 @@\n ### FS-03: Video Sitemap\n Rank Math supports video sitemaps for posts with embedded video. If catalog/library pages grow significantly, ensure video sitemap is enabled an...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -746,10 +746,10 @@\n ### FS-04: WooCommerce / eCommerce SEO\n If the site ever adds digital product sales (courses, downloads), Rank Math's WooCommerce SEO features will need to be enabled a...
Donna2026-05-25 20:07 UTC
**Change 17: §5.3 — Fix breadcrumb coverage target from 70% to 90%+.**
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -565,13 +565,15 @@\n \n ### §5.3 Internal Linking / Content Silos\n \n-**Breadcrumb architecture (~70% coverage):**\n+**Breadcrumb architecture (90%+ coverage):**\n ```\n Home > Series > Gol...
Donna2026-05-25 20:07 UTC
**Change 18: Fix the breadcrumbs mention in §3.3 (requirement 8).**
Tool2026-05-25 20:07 UTC
{"total_count": 6, "matches": [{"path": "/root/.hermes/plans/pb-m9-seo.md", "line": 23, "content": "| Schema markup (ScholarlyArticle, isAccessibleForFree) | ✅ Yes — custom schema templates in Pro |"}, {"path": "/root/.hermes/plans/pb-m9-seo.md", "line": 24, "content": "| Breadcrumbs (~70% coverage)...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -21,7 +21,7 @@\n | XML Sitemaps with per-post-type exclude/include | ✅ Yes — fine-grained control, exclude confirmation pages |\n | llms.txt for AI crawlers | ✅ Yes — built-in feature (free ...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"success": true, "diff": "--- a//root/.hermes/plans/pb-m9-seo.md\n+++ b//root/.hermes/plans/pb-m9-seo.md\n@@ -382,7 +382,7 @@\n └── Contemporary (Topic Cluster)\n ```\n \n-**Breadcrumbs (~70% coverage):** Rank Math breadcrumbs configured to show:\n+**Breadcrumbs (90%+ coverage):** Rank Math breadcr...
Donna2026-05-25 20:07 UTC
Now let me do a final sanity check by reading the full document.
Tool2026-05-25 20:07 UTC
{"content": " 1|# Project Brief: Module 9 — SEO\n 2|\n 3|**Document ID:** PB-M9-SEO-001\n 4|**Author:** SA\n 5|**Date:** 2026-05-25\n 6|**Status:** DRAFT — Pending Profe greenlight\n 7|**Build Plan Source:** pb-complete.md (lines 890-957), features-brief.md\n 8|**Deck...
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 500|```php\n 501|namespace Profe\\SeoBridge;\n 502|\n 503|interface SeoBridgeInterface\n 504|{\n 505| /**\n 506| * Get or create SEO metadata for a custom content entity.\n 507| */\n 508| public function getMetadata(string $entityType, int $entityId): ?a...
Donna2026-05-25 20:07 UTC
I see the composer.json line still has too many backslashes. Let me fix it properly.
Tool2026-05-25 20:07 UTC
{"success": true, "files_modified": ["/root/.hermes/plans/pb-m9-seo.md"], "lint": {"status": "skipped", "message": "No linter for .md files"}, "_warning": "/root/.hermes/plans/pb-m9-seo.md was last read with offset/limit pagination (partial view). Re-read the whole file before overwriting it."}
Donna2026-05-25 20:07 UTC
Tool2026-05-25 20:07 UTC
{"content": " 718|| `README.md` | NEW | Document architecture, Rank Math integration points, cleanup strategy |\n 719|| `composer.json` | NEW | PSR-4 autoload: `Profe\\\\\\\\SeoBridge\\\\\\\\src\\\\\\\\` |\n 720|| `src/SeoBridge/SeoBridgeInterface.php` | NEW | Service contract per §4 |\n 721...
You2026-05-25 20:07 UTC
You've reached the maximum number of tool-calling iterations allowed. Please provide a final response summarizing what you've found and accomplished so far, without calling any more tools.
Donna2026-05-25 20:07 UTC
I've reached the tool-call limit. Here's a full summary of what was accomplished.
## Summary
### What was fixed
I made **18 separate edits** to `/root/.hermes/plans/pb-m9-seo.md` to address all P0 and P1/P2 issues from the SGS review.
### P0 Issues (all fixed)
**1. Migration cleanup strategy (CRITICAL-01)**
- Added a detailed cleanup plan to §1.8 specifying a down-migration M064 that drops the 5 old tables (`profe_seo_metadata` old, `profe_seo_analytics`, `profe_sitemap_urls`, `profe_schema_definitions`, `profe_redirect_rules`) BEFORE M065 creates the new table
- Added module directory deletion requirement (4 old stub directories must be fully deleted, not just deactivated)
- Updated §9 build order to include cleanup steps (delete directories, create M064) as the first items in Phase 9B
- Updated §10 file manifest to include `migrations/064_drop_old_seo_tables.sql` and `DropOldSeoTablesMigration.php`, plus DELETE entries for all 4 old stub directories
**2. Fixed `injectPageSchema()` approach (CRITICAL-02)**
- Replaced `injectPageSchema(): void` with `renderSchema(string $entityType, int $entityId): string` in the interface contract — returns a `<script type="application/ld+json">...</script>` string for direct inclusion in page `<head>`, NOT via `wp_head` hook
- Updated §4 responsibilities #1 and #2 to specify `renderSchema()` is called explicitly from catalog/library page template code, not via passive `wp_head` action
- Updated §3.3 Bridge/Catalog schema section to clarify the direct-renderer approach
**3. Fixed Rank Math Schema Templates boundary (CRITICAL-03)**
- Updated §2.3 to explicitly state: Rank Math Pro Schema Templates only work with registered WP post types; catalog pages are NOT WP post types so their schema must be custom
- Updated §2.1 evaluation table: "Schema per post type defaults" now shows "(WP post types only)"
- Updated card 09-05: "Catalog pages get NO default schema template"
- Changed card 09-07 from "Create Catalog Schema Templates" (which implies Rank Math templates that can't work) to "Build Catalog Page Schema Injection (seo_bridge)" — explicitly NOT a Rank Math template
- Removed the misleading §0 table entry "Custom theme template + Rank Math schema templates" for catalog pages
### Other Findings (all addressed)
**Canonical URL strategy (MOD-04):** Added canonical URL column to the Community SEO table specifying exact canonical URLs per content type (single-post permalink, studio permalink, comment page permalink). Added `canonical_url` column to the `profe_seo_metadata` DDL. Added Canonical URL enforcement as §4 responsibility #8. Updated risk assessment for community UGC duplication to include canonicalization rules.
**Pagination SEO (MOD-05):** Added a full "PAGINATION: SEO Considerations for Paginated Content" subsection in §3.3 after the Catalog Pages section, with rules for canonical URLs, `rel="next"/"prev"`, noindex on pages beyond page 1, and sitemap inclusion rules. Added pagination meta tag injection as §4 responsibility #9.
**Image SEO (MIN-02):** Added Image SEO cross-cutting section within Library Pages §3.3 item #6. Added FS-02 Image SEO / Image Sitemap forward signal item. Renumbered FS items 3-6 accordingly.
**Core Web Vitals / Performance (MOD-03):** Added "Cumulative page load time exceeds Core Web Vitals thresholds" risk to §8 risk table with mitigation: pre-install performance baseline, disable unused Rank Math modules, consider caching plugin if LCP exceeds 2.5s. Updated card 09-19 to include Core Web Vitals baseline testing.
**Programmatic form confirmation page exclusion:** Added §4 responsibility #7: hook into Form Engine (Module 8) to discover confirmation page URLs and exclude via `rank_math/sitemap/exclude_post_ids` filter, not manual per-page UI.
**Rank Math API assumptions (MOD-01):** Replaced all references to non-existent `rank_math_update_sitemap()` with documented alternatives: `delete_option('rank_math_sitemap_cache')` as default approach, `rank_math/sitemap/enable_caching` filter as alternative, `rank_math/sitemap/providers` filter as simplest fallback. The `triggerSitemapUpdate()` method now documents this in its docblock.
**Breadcrumb coverage (MOD-02):** Changed all `~70% coverage` references to `90%+ coverage` (4 locations: §0 table, §3.3 Content Silos section, §5.3, card 09-08). Added explicit exclusion list (404 pages, admin-only, member dashboards) so TA knows which pages are intentionally excluded.
**Tone taxonomy registration (MIN-04):** Added clarification in §4 that `seo_bridge` module registers the `tone` taxonomy via `register_taxonomy()` in its `boot()` method. The theme does NOT register it but can reference it via `taxonomy_exists()` or `get_terms()`.
**Citation placeholder:** Note that the `{citation_1}` placeholder in the ScholarlyArticle JSON-LD template is unchanged — this is a deliberate template variable that will be expanded at render time by `seo_bridge` to support multiple citations (the interface method `generateSchema()` takes the schema type and can generate arrays of citations).
### Remaining Minor Issue
The file manifest at line 719 may still show too many backslashes in the `composer.json` autoload path. The patch tool was producing inconsistent results for this line. If verified: line should read `Profe\\\\SeoBridge\\\\src\\\\` (not `\\\\\\\\`). This is a **cosmetic issue only** — the composer.json file itself isn't affected; this is just the file manifest note.
### Files Modified
- `/root/.hermes/plans/pb-m9-seo.md` — all changes applied in-place (759 lines, ~52KB)