# CODE STRUCTURE AUDIT — Spec vs Plugin

## REQUIRED CODE STRUCTURES (from your spec)

### 1. JSON-LD SCHEMAS (6 types required)
| Schema           | Status  | Notes                                      |
|------------------|---------|--------------------------------------------|
| Article          | ⚠️ WEAK | Exists but missing EEAT fields, publisher logo, mainEntityOfPage |
| BreadcrumbList   | ❌ MISSING | Home > Category > Post                    |
| FAQPage          | ❌ MISSING | Must mirror visible FAQ section word-for-word |
| HowTo            | ❌ MISSING | Steps from "What advisers check" section  |
| Speakable        | ❌ MISSING | Marks headline + excerpt for voice search |
| Place            | ❌ MISSING | Luxembourg office location                |

### 2. EEAT META CODE (hidden from frontend)
❌ MISSING — Needs hidden meta for Experience, Expertise, Authoritativeness, Trustworthiness

### 3. FAQ ACCORDION (visible, with CSS)
❌ MISSING — 20 FAQs per post, `<details>/<summary>` accordion, arrows, hidden by default
Required CSS block specified in spec

### 4. ARTICLE CSS (reduced vertical spacing)
❌ MISSING — `.damalion-article p { margin: 0.35em 0; }` etc.

### 5. RSS FEED ALTERNATE LINKS (Google Discover)
❌ MISSING — Contextual `<link rel="alternate" type="application/rss+xml">` per category

### 6. "LAST UPDATED" LINE
❌ MISSING — Visible timestamp for content freshness signal

### 7. GLOSSARY ACCORDION
❌ MISSING — WordPress-ready accordion glossary section per post

### 8. AIO / GEO / AEO optimization
❌ MISSING — Answer Intent Optimization, Generative Engine Opt, Answer Engine Opt signals

### 9. COMPANY LINKS → Official websites
❌ NOT ENFORCED — Each company name must link to official site

### 10. AUTHORITY LINKS (Czech example)
❌ NOT ENFORCED — Authority names must link to official .cz/.gov sites

---

## OPENAI PROMPT GAPS (content it should generate but doesn't ask for)

| Missing from prompt              | Impact                                    |
|----------------------------------|-------------------------------------------|
| 20 FAQ Q&As                      | No FAQPage schema possible                |
| Glossary section                 | No glossary accordion                     |
| "Last updated" date line         | No freshness signal                       |
| Numbered data / statistics       | Weak E-E-A-T numerical precision          |
| Industry examples with numbers   | Missing factual anchors                   |
| HowTo steps format               | No HowTo schema possible                 |
| Speakable excerpt                | No voice search optimization              |
| Company → official URL mapping   | Links to company sites missing            |

---

## WHAT NEEDS TO CHANGE

### A. OpenAI JSON schema — add these fields:
```json
{
  "faqs": [
    {"question": "...", "answer": "..."},
    // ... 20 items
  ],
  "glossary": [
    {"term": "...", "definition": "..."},
    // ... 10-15 items
  ],
  "howto_steps": [
    {"name": "...", "text": "..."},
    // ... from "What advisers check" section
  ],
  "speakable_text": "string (2-3 sentence summary for voice)",
  "last_updated": "2026-02-09",
  "breadcrumb_category": "string"
}
```

### B. Frontend class — generate ALL schemas:
- Article (enhanced with EEAT, publisher logo, mainEntityOfPage)
- BreadcrumbList (Home > Category > Post)
- FAQPage (mirroring visible FAQ accordion)
- HowTo (from howto_steps)
- Speakable (from speakable_text)
- Place (Luxembourg office — static)

### C. Frontend class — inject into content:
- FAQ accordion HTML (`<details>/<summary>`)
- Glossary accordion HTML
- "Last updated" line
- EEAT hidden meta
- Reduced-spacing CSS
- RSS alternate links for Google Discover

### D. Validator — add checks for:
- faqs array has 20 items
- glossary array has 10+ items
- howto_steps present
- speakable_text present
