diff --git a/internal/chat/agent.go b/internal/chat/agent.go index 58df61c..8a900cc 100644 --- a/internal/chat/agent.go +++ b/internal/chat/agent.go @@ -28,29 +28,78 @@ func NewAgent(llm model.LLM, dataCache *cache.DataCache) (agent.Agent, error) { Name: "cv_assistant", Model: llm, Description: "Answers questions about Juan Andrés Moreno Rubio's CV and professional experience.", - Instruction: `You are a helpful assistant embedded in a professional CV website. -You answer questions about the CV owner's experience, projects, skills, education, and career. + Instruction: `You are a helpful, professional assistant embedded in Juan Andrés Moreno Rubio's CV website. +You are an expert on his entire professional profile: experience, projects, skills, education, certifications, courses, awards, and career trajectory. -RULES: -- Use the query_cv tool to look up CV data before answering. Never make up information. -- For technology questions (e.g. "Java", "Go", "React"), ALWAYS use section="search" — this searches across experience, projects, courses, and skills simultaneously. Do NOT search only projects or only experience. Always report ALL matches from every section. -- When reporting results, be EXHAUSTIVE. If the search returns matches in experience AND projects AND skills, mention ALL of them. Never truncate or summarize away matches. +CORE RULES: +- ALWAYS use the query_cv tool to look up CV data before answering. NEVER make up or assume information. - Answer in the SAME LANGUAGE the user writes in. If they ask in Spanish, answer in Spanish. -- Be concise but complete — list every relevant item found, don't skip any. -- When listing items (projects, technologies, companies), use bullet points. -- If the query_cv tool returns no results for a question, say so honestly and suggest the visitor check a related section. -- IMPORTANT: This CV website itself is built with Go + HTMX — you can mention this as context when discussing Go expertise if relevant. -- You may reference sections of the CV to guide the visitor. -- Never reveal personal contact details (email, phone) — just point them to the contact form. +- Be concise but EXHAUSTIVE — list every relevant item found, never skip or summarize away matches. +- When listing items (projects, technologies, companies), use bullet points for clarity. +- If the query_cv tool returns no results, say so honestly and suggest the visitor check a related section. +- Never reveal personal contact details (email, phone) — point them to the contact form on the website. - You represent the CV owner professionally — be friendly but not overly casual. -EXAMPLES of questions you might receive: +QUERY STRATEGY BY QUESTION TYPE: + +1. TECHNOLOGY QUESTIONS (e.g. "Java", "Go", "React", "Docker", "CI/CD"): + - ALWAYS use section="search" with the technology name as query. + - This searches across experience, projects, skills, AND courses simultaneously. + - NEVER search only projects or only experience — always use cross-section search. + - Report ALL matches from EVERY section: if the search returns matches in experience AND projects AND skills AND courses, mention ALL of them. + - If a technology appears in skills but NOT in experience or projects, mention the skill category and proficiency level. + - If a technology appears in experience, name the company, role, and what it was used for. + +2. COMPANY / EMPLOYER QUESTIONS (e.g. "What companies?", "Tell me about SAP"): + - For "list all companies" → use section="experience" with NO query filter to get ALL companies. + - For a specific company → use section="search" with the company name as query. + - Always mention the role title, dates, and a brief description of responsibilities. + +3. YEARS OF EXPERIENCE / CAREER OVERVIEW: + - Use section="summary" — this returns the professional summary AND calculated years of experience. + - You can also use section="all" for a high-level overview of the entire CV. + +4. PROJECT QUESTIONS: + - For "list all projects" → use section="projects" with no query. + - For a specific project → use section="search" with the project name. + - IMPORTANT: "Projects" in this CV includes both personal/open-source projects AND professional experience at companies. When asked about projects involving a technology, also check experience roles where that technology was used. + - For technology-specific project questions, use section="search" to find matches in BOTH projects and experience. + +5. EDUCATION & CERTIFICATIONS: + - For certifications → section="certifications" + - For formal education → section="education" + - For courses and training → section="courses" + - For a specific certification/course topic → use section="search" with the topic. + +6. SKILLS QUESTIONS: + - For "main skills" or "technical skills" → section="skills" with no query to get all skill categories. + - For a specific skill → use section="search" to find it across skills, experience, projects, and courses. + - Always report the skill category (e.g. "Languages", "Frameworks", "DevOps") when available. + +7. AWARDS & RECOGNITION: + - Use section="awards" to list all awards. + +8. LANGUAGE PROFICIENCY: + - Use section="languages" to list spoken/written language proficiencies. + +BONUS CONTEXT: +- This CV website itself is built with Go, HTMX, Hyperscript, and vanilla CSS — it's a real-world showcase of Juan's Go and frontend skills. Mention this when discussing Go or HTMX expertise. +- The chat assistant you ARE is powered by Google ADK Go 1.0 and Gemini AI — another demonstration of Go expertise. +- When the user asks general questions like "tell me about Juan" or "summarize the CV", use section="summary" first, then section="all" to give a comprehensive overview. + +EXAMPLES: - "How many years of experience does Juan have?" → section="summary" - "What Java experience does he have?" → section="search", query="java" - "Has he worked with React?" → section="search", query="react" - "Tell me about his time at Olympic Broadcasting" → section="search", query="olympic" +- "What did he do at SAP?" → section="search", query="sap" - "What certifications does he have?" → section="certifications" -- "List all his projects" → section="projects"`, +- "List all his projects" → section="projects" +- "What companies has he worked at?" → section="experience" (no query) +- "Does he know Docker?" → section="search", query="docker" +- "What programming languages does he know?" → section="search", query="language" AND section="skills" +- "Where did he study?" → section="education" +- "What courses has he completed?" → section="courses"`, Tools: []tool.Tool{queryTool}, }) } diff --git a/static/css/04-interactive/_chat.css b/static/css/04-interactive/_chat.css index 2bee29c..640fd9a 100644 --- a/static/css/04-interactive/_chat.css +++ b/static/css/04-interactive/_chat.css @@ -117,63 +117,6 @@ color: #fff; } -/* ========================================================================== - Help / Onboarding Card - ========================================================================== */ - -.chat-help-card { - display: none; - flex-direction: column; - align-items: center; - gap: 8px; - padding: 14px 16px; - margin: 10px; - background: var(--paper-secondary-bg, #f5f5f5); - border: 1px solid var(--border-light, #e0e0e0); - border-radius: 6px; - text-align: center; - animation: helpFadeIn 0.2s ease; -} - -.chat-help-card.visible { - display: flex; -} - -@keyframes helpFadeIn { - from { opacity: 0; transform: translateY(-4px); } - to { opacity: 1; transform: translateY(0); } -} - -.chat-help-icon { - font-size: 1.6rem; - color: var(--accent-blue, #0066cc); - line-height: 1; -} - -.chat-help-text { - font-size: 0.78rem; - line-height: 1.5; - color: var(--text-muted, #666666); - margin: 0; -} - -.chat-help-dismiss { - background: var(--black-bar, #2b2b2b); - color: #fff; - border: none; - border-radius: 4px; - padding: 4px 14px; - font-size: 0.72rem; - font-weight: 600; - cursor: pointer; - transition: background 0.2s; - font-family: 'Quicksand', sans-serif; -} - -.chat-help-dismiss:hover { - background: var(--accent-blue, #0066cc); -} - /* ========================================================================== Messages Area ========================================================================== */ @@ -418,15 +361,6 @@ color: #d0d0d0; } -.theme-clean .chat-help-card { - background: #2a2a2a; - border-color: #333333; -} - -.theme-clean .chat-help-text { - color: #999999; -} - .theme-clean .chat-suggestions { border-top-color: #333333; } diff --git a/static/css/main.css b/static/css/main.css index f50449a..0265532 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -36,7 +36,7 @@ @import './04-interactive/_zoom-control.css'; @import './04-interactive/_contact-form.css'; @import './04-interactive/_sprites.css'; -@import './04-interactive/_chat.css'; +/* Chat CSS loaded separately via head-styles.html (only when ChatEnabled) */ /* 05 - Responsive */ @import './05-responsive/_breakpoints.css'; diff --git a/templates/index.html b/templates/index.html index fe18a56..ec30d09 100644 --- a/templates/index.html +++ b/templates/index.html @@ -57,6 +57,7 @@ {{template "info-modal" .}} {{template "shortcuts-modal" .}} + {{template "chat-help-modal" .}} {{template "pdf-modal" .}} {{template "contact-modal" .}} {{template "zoom-control" .}} diff --git a/templates/partials/modals/chat-help-modal.html b/templates/partials/modals/chat-help-modal.html new file mode 100644 index 0000000..9b3c2a8 --- /dev/null +++ b/templates/partials/modals/chat-help-modal.html @@ -0,0 +1,143 @@ +{{define "chat-help-modal"}} + + +
+ + +
+

{{if eq .Lang "es"}}Asistente del CV{{else}}CV Assistant{{end}}

+
+ + + + {{if eq .Lang "es"}}Asistente inteligente con IA{{else}}AI-powered assistant{{end}} +
+
+ +
+

+ {{if eq .Lang "es"}}Un asistente con inteligencia artificial que puede responder preguntas sobre este CV. Consulta experiencia profesional, proyectos, habilidades, formación y más — todo basado en datos reales del CV.{{else}}An AI-powered assistant that can answer questions about this CV. Query professional experience, projects, skills, education, and more — all based on actual CV data.{{end}} +

+ + +
+

+ + {{if eq .Lang "es"}}Sobre Experiencia{{else}}About Experience{{end}} +

+
+
+ {{if eq .Lang "es"}}¿Cuántos años de experiencia tiene Juan?{{else}}How many years of experience does Juan have?{{end}} +
+
+ {{if eq .Lang "es"}}¿En qué empresas ha trabajado?{{else}}What companies has he worked at?{{end}} +
+
+ {{if eq .Lang "es"}}Cuéntame sobre su paso por Olympic Broadcasting{{else}}Tell me about his time at Olympic Broadcasting{{end}} +
+
+ {{if eq .Lang "es"}}¿Qué hacía en SAP?{{else}}What did he do at SAP?{{end}} +
+
+
+ + +
+

+ + {{if eq .Lang "es"}}Sobre Tecnologías{{else}}About Technologies{{end}} +

+
+
+ {{if eq .Lang "es"}}¿Qué lenguajes de programación conoce?{{else}}What programming languages does he know?{{end}} +
+
+ {{if eq .Lang "es"}}¿Ha trabajado con React? ¿Dónde?{{else}}Has he worked with React? Where?{{end}} +
+
+ {{if eq .Lang "es"}}¿Cuál es su experiencia con Go?{{else}}What's his Go experience?{{end}} +
+
+ {{if eq .Lang "es"}}¿Conoce Node.js?{{else}}Does he know Node.js?{{end}} +
+
+
+ + +
+

+ + {{if eq .Lang "es"}}Sobre Proyectos{{else}}About Projects{{end}} +

+
+
+ {{if eq .Lang "es"}}¿Qué proyectos personales ha creado?{{else}}What personal projects has he built?{{end}} +
+
+ {{if eq .Lang "es"}}Cuéntame sobre Immich Photo Manager{{else}}Tell me about the Immich Photo Manager{{end}} +
+
+ {{if eq .Lang "es"}}¿Qué proyectos open-source mantiene?{{else}}What open-source projects does he maintain?{{end}} +
+
+
+ + +
+

+ + {{if eq .Lang "es"}}Formación y Certificaciones{{else}}Education & Certifications{{end}} +

+
+
+ {{if eq .Lang "es"}}¿Qué certificaciones tiene?{{else}}What certifications does he have?{{end}} +
+
+ {{if eq .Lang "es"}}¿Dónde estudió?{{else}}Where did he study?{{end}} +
+
+ {{if eq .Lang "es"}}¿Qué cursos ha completado?{{else}}What courses has he completed?{{end}} +
+
+
+ + +
+

+ + {{if eq .Lang "es"}}Sobre Habilidades{{else}}About Skills{{end}} +

+
+
+ {{if eq .Lang "es"}}¿Cuáles son sus principales habilidades técnicas?{{else}}What are his main technical skills?{{end}} +
+
+ {{if eq .Lang "es"}}¿Tiene experiencia con Docker?{{else}}Does he have experience with Docker?{{end}} +
+
+ {{if eq .Lang "es"}}¿Qué hay de CI/CD?{{else}}What about CI/CD?{{end}} +
+
+
+ + +
+

+ + {{if eq .Lang "es"}}Cómo funciona{{else}}How it works{{end}} +

+
+
+ + {{if eq .Lang "es"}}Impulsado por Google ADK Go 1.0 y Gemini AI. Las preguntas se responden consultando los datos reales del CV — sin alucinaciones, siempre preciso.{{else}}Powered by Google ADK Go 1.0 and Gemini AI. Questions are answered by querying the actual CV data — no hallucination, always accurate.{{end}} + +
+
+
+
+
+
+{{end}} diff --git a/templates/partials/widgets/chat-widget.html b/templates/partials/widgets/chat-widget.html index 3bc8672..223977a 100644 --- a/templates/partials/widgets/chat-widget.html +++ b/templates/partials/widgets/chat-widget.html @@ -24,25 +24,12 @@ {{if eq .Lang "es"}}Asistente del CV{{else}}CV Assistant{{end}} - -
-
- -
-

- {{if eq .Lang "es"}}¡Soy el Asistente del CV! Puedo responder preguntas sobre la experiencia profesional, proyectos, habilidades y formación de Juan. Prueba a hacer clic en una sugerencia o escribe tu propia pregunta.{{else}}I'm the CV Assistant! I can answer questions about Juan's professional experience, projects, skills, and education. Try clicking a suggestion or type your own question.{{end}} -

- -
-
{{if eq .Lang "es"}}¡Hola! Pregúntame lo que quieras sobre este CV.{{else}}Hi! Ask me anything about this CV.{{end}}