---
phase: 07-multilanguage
plan: 04
type: execute
wave: 3
depends_on:
  - "07-03"
files_modified: []
autonomous: false
requirements:
  - I18N-01
  - I18N-02
  - I18N-03
  - I18N-04
  - I18N-05
  - I18N-06

must_haves:
  truths:
    - "Portal renders correctly in English, Spanish, and Portuguese"
    - "Language switcher works in sidebar and on login page"
    - "Language preference persists across sessions"
    - "AI Employee responds in the user's language"
    - "Agent templates display in the selected language"
    - "Error messages and validation text are localized"
  artifacts: []
  key_links: []
---

<objective>
Human verification of the complete multilanguage implementation across all portal pages and AI Employee behavior.

Purpose: Verify that translations look correct, the language switcher works end-to-end, and AI Employees respond in the correct language. Automated builds confirm code compiles but cannot verify translation quality or visual correctness.
Output: Confirmation that all I18N requirements are met.
</objective>

<execution_context>
@/home/adelorenzo/.claude/get-shit-done/workflows/execute-plan.md
@/home/adelorenzo/.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/phases/07-multilanguage/07-CONTEXT.md
@.planning/phases/07-multilanguage/07-01-SUMMARY.md
@.planning/phases/07-multilanguage/07-02-SUMMARY.md
@.planning/phases/07-multilanguage/07-03-SUMMARY.md
</context>

<tasks>

<task type="checkpoint:human-verify" gate="blocking">
  <name>Task 1: Verify complete multilanguage implementation</name>
  <files></files>
  <action>
    Present the user with the verification checklist below. No code changes needed — this is a human review checkpoint.
  </action>
  <verify>
    <automated>cd /home/adelorenzo/repos/konstruct/packages/portal && npx next build 2>&1 | tail -5</automated>
  </verify>
  <done>User confirms all I18N requirements are met by typing "approved"</done>
  <what-built>
    Complete multilanguage support across the portal and AI Employee behavior:
    - All portal pages and components localized in English, Spanish, and Portuguese
    - Language switcher in sidebar (post-auth) and login page (pre-auth)
    - Language preference persisted to DB and JWT
    - Browser locale auto-detection on first visit
    - AI Employees respond in the user's language via system prompt instruction
    - Agent templates display translated names/descriptions in the selected language
    - Invitation emails sent in the inviting admin's language
  </what-built>
  <how-to-verify>
    Start the dev environment and open the portal:

    **1. Login page language detection (I18N-02)**
    - Open the login page in a fresh browser/incognito
    - If your browser is set to Spanish, the form should show Spanish labels
    - Click the ES / PT language buttons to verify the form changes language
    - Log in

    **2. Language switcher persistence (I18N-02)**
    - In the sidebar, find the EN / ES / PT switcher near your avatar
    - Click "ES" — all navigation labels and page content should switch to Spanish
    - Navigate to different pages (Dashboard, Employees, Chat, Billing) — all should be in Spanish
    - Click "PT" — verify Portuguese translations appear
    - Log out and log back in — verify the language preference persists (should still be Portuguese)

    **3. Portal pages in Spanish (I18N-01, I18N-04, I18N-05)**
    - Switch to Spanish and visit each major page:
      - Dashboard: verify title, stats labels, welcome message
      - Employees: verify page title, "New Employee" button, empty state text
      - New Employee options: verify template/wizard/advanced descriptions
      - Template gallery: verify template names and descriptions are in Spanish
      - Employee wizard: verify all 5 step labels and form fields
      - Chat: verify sidebar, message input placeholder, conversation labels
      - Billing: verify plan names, button labels, status badges
      - Usage: verify chart labels, time range options, budget text
      - API Keys: verify page title, add/delete labels
      - Users: verify invite form labels, role names, status badges
      - Onboarding: verify all 3 step titles and descriptions
    - Trigger a validation error (e.g., submit an empty form) — verify error message is in Spanish

    **4. Portal pages in Portuguese (I18N-01)**
    - Switch to Portuguese and spot-check 3-4 pages for correct translations

    **5. AI Employee language response (I18N-03)**
    - Open the Chat page
    - Start a conversation with any agent
    - Send a message in Spanish (e.g., "Hola, como puedo ayudarte?")
    - Verify the agent responds in Spanish
    - Send a message in Portuguese (e.g., "Ola, como posso ajudar?")
    - Verify the agent responds in Portuguese
    - Send a message in English — verify English response

    **6. Extensibility check (I18N-06)**
    - Verify that messages/en.json, messages/es.json, and messages/pt.json exist
    - Confirm the file structure means adding a 4th language is just a new JSON file
  </how-to-verify>
  <resume-signal>Type "approved" if all checks pass, or describe any issues found</resume-signal>
</task>

</tasks>

<verification>
Human verification covers all 6 I18N requirements through manual testing in the browser.
</verification>

<success_criteria>
- All 6 verification steps pass
- No untranslated strings visible when using Spanish or Portuguese
- Language preference persists across sessions
- AI Employee responds in the correct language
</success_criteria>

<output>
After completion, create `.planning/phases/07-multilanguage/07-04-SUMMARY.md`
</output>
