Skip to content

Entrega 1 finalproject jfvg#176

Open
fredyvizcarra wants to merge 1 commit into
LIDR-academy:mainfrom
fredyvizcarra:feature-entrega1-jfvg
Open

Entrega 1 finalproject jfvg#176
fredyvizcarra wants to merge 1 commit into
LIDR-academy:mainfrom
fredyvizcarra:feature-entrega1-jfvg

Conversation

@fredyvizcarra

@fredyvizcarra fredyvizcarra commented Jun 8, 2026

Copy link
Copy Markdown

Documentación completa de la Entrega 1 del proyecto Lexio: Master PRD, arquitectura del sistema
(diagrama C4 + BFF), modelo de datos en Firestore, especificación OpenAPI de los 3 endpoints
principales, 3 historias de usuario con criterios BDD y 3 tickets de trabajo detallados
(DB + Backend + Frontend). Se actualizan también readme.md y prompts.md.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive product documentation for Lexio, including product overview, system architecture, and data model specifications
    • Included API specification and three core user stories with acceptance criteria
    • Added work tickets for database, backend, and frontend implementation phases
    • Updated README with feature summary and deployment details

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR establishes complete product and technical documentation for Lexio, a personalized vocabulary learning app MVP. It defines the problem (vocabulary learning friction), value proposition (AI-assisted capture and daily adaptive practice), and the prioritized E2E flow: word capture with AI-generated definitions and images → daily 10-exercise session → streak tracking. All nine documentation files are specifications and guides with no executable code changes.

Changes

Lexio MVP Specification Suite

Layer / File(s) Summary
Product Vision & Definition
master-prd.md, 1-descripcion-general-del-producto.md
Master PRD v1.0 (Jun 2026) establishes problem, vision, success metrics (streak north star), MVP scope (email/password auth, manual capture with IA definition/image suggestions, 10 daily exercises, manual learning marks, bilingual UI, online-only). Product description elaborates problem statement, features (persistent dictionary by user, state transitions, unicoduplicate rules), UX flows (login, home, add word, daily practice, summary), and installation steps for backend/Firebase/mobile app.
System Architecture & Data Model
2-arquitectura-del-sistema.md, 3-modelo-de-datos.md
Client-server architecture with BFF (Node.js/Express), Firebase Auth/Firestore, and external integrations (Claude for definitions/MCQs, Unsplash for images). Layered monolith with presentation, services, domain, and infrastructure layers. Data model defines five entities—User (identity via Firebase UID), WordCard (unique per normalized term + user), DailySession (exactly 10 exercises per day), Exercise (embedded type: image_match or mcq), Streak (1:1 with User)—with Firestore collections, composite indexes, Security Rules, and state diagram for WordCard lifecycle (active → learned).
API Specification
4-especificaciones-de-la-api.md
OpenAPI 3.0.3 contract for three MVP endpoints: POST /words (capture with IA enrichment), POST /sessions/daily (generate 10 exercises, block if ≤3 words), POST /sessions/{sessionId}/complete (evaluate and update streak). Includes request/response schemas, 409/422/500 error codes, full examples, and E2E sequence flow from capture through practice completion.
User Stories & BDD Scenarios
5-historias-de-usuario.md
Three stories (LEX-7, LEX-12, LEX-15) covering the E2E flow: capture vocabularyterm with IA definition and selectable images; daily session generation with vocabulary minimum enforcement and same-day uniqueness; session completion with automatic streak increment/reset. Each includes BDD acceptance criteria, screen flows, and technical notes on API contracts and business rule validation.
Implementation Tickets
6-tickets-de-trabajo.md
Three detailed work tickets: DB-01 (Firestore collections, indexes, Security Rules per user, development seed); BE-01 (Node.js/Express POST /words endpoint with normalized term deduplication, Claude/Unsplash integration, Firestore persistence, unit/integration tests); FE-01 (React Native/Expo "Add Word" screen with editable definition preview, image picker, bilingual i18n, loading/error states, Save/Generate handlers, component tests).
Supporting Documentation
prompts.md, readme.md
AI prompts documenting the generation steps for product vision, architecture, data model, API spec, user stories, and work tickets. README updated with project name (Lexio), author, detailed product objective, core features list, and inline summaries of the three user stories and work tickets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The PR is substantial documentation (2,796 lines added across nine files) covering a complete MVP specification. Review complexity is moderate: each document is self-contained and builds on prior ones (vision → architecture → API → stories → tickets), but they reference each other and contain dense technical content (OpenAPI schemas, Firestore rules, BDD scenarios, sequence diagrams). No code logic to execute, but careful verification of schema consistency, error codes, and E2E flow alignment across docs is required.

Poem

🐰 A rabbit hops through pages bright,
Where Lexio words dance day and night.
From capture's spark to practice true,
And streaks that grow with morning dew! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and does not clearly describe the main change; it uses a generic delivery format (project code + author) without conveying meaningful information about the actual deliverables or content added. Consider using a more descriptive title that reflects the primary content, such as 'Add Lexio MVP documentation (PRD, architecture, data model, API spec, and user stories)' to make the changeset intent immediately clear.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
readme.md (2)

208-212: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Las 3 Pull Requests requeridas no están documentadas.

La sección lista Pull Request 1/2/3, pero no incluye enlaces ni descripción. Esto deja incompleto el apartado de trazabilidad del trabajo realizado.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@readme.md` around lines 208 - 212, La sección que muestra los títulos "Pull
Request 1/2/3" en el README está incompleta; reemplaza cada entrada "Pull
Request 1", "Pull Request 2" y "Pull Request 3" por una línea con el número de
PR, un enlace al PR y una breve descripción de los cambios (objetivo y
archivos/funcionalidad afectados) para que quede trazabilidad clara; actualiza
las tres entradas bajo ese encabezado en readme.md asegurándote de usar formato
de enlace Markdown y 1–2 frases descriptivas por PR.

61-67: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Falta completar UX evidence e instrucciones de instalación.

Las secciones 1.3 y 1.4 siguen en modo plantilla (sin contenido ejecutable para reproducir el entorno ni evidencia del flujo UX). Para una entrega “completa”, esta parte debería venir cerrada.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@readme.md` around lines 61 - 67, The README sections "1.3. Diseño y
experiencia de usuario" and "1.4. Instrucciones de instalación" are still
placeholders; replace them with concrete, reproducible content: under the "1.3.
Diseño y experiencia de usuario" heading add linked screenshots and/or a short
embedded videotutorial URL plus brief captions that show each main user flow
(landing, auth, key features) and note expected UI state for each image/video;
under the "1.4. Instrucciones de instalación" heading provide step‑by‑step shell
commands and required environment variables to reproduce the project locally
(install deps, start backend service, start frontend dev server, database setup
commands, run migrations and seeders, ports used), include example .env values,
and add verification steps (e.g., API healthcheck URL or test user credentials)
so a reviewer can follow and confirm the environment boots successfully.
prompts.md (1)

131-138: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

La sección de prompts de Pull Requests quedó vacía.

En este archivo se documentan los prompts principales del ciclo completo, pero Prompt 1/2/3 en “Pull Requests” están sin contenido. Esto deja incompleta la trazabilidad del proceso de creación.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prompts.md` around lines 131 - 138, La sección "### 7. Pull Requests"
contiene solo los marcadores "Prompt 1/Prompt 2/Prompt 3" sin contenido; rellena
esos tres prompts con los textos descriptivos y ejemplos necesarios para cubrir
el flujo de creación, revisión y merge de PRs. Específicamente, dentro de la
sección "### 7. Pull Requests" complete los bloques etiquetados "Prompt 1",
"Prompt 2" y "Prompt 3" con: (1) el propósito del prompt, (2) la plantilla
exacta a usar por el autor del PR, y (3) un ejemplo de salida esperado;
asegúrate de mantener el formato y estilo del resto del documento y usa lenguaje
consistente con otras secciones para trazabilidad.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@1-descripcion-general-del-producto.md`:
- Around line 102-142: The fenced ASCII diagram blocks (the triple-backtick
blocks that render the flowchart starting with
"┌─────────────────────────────────────────────┐" and the later block around
lines 203–208) are missing a language tag; update each opening fence from ``` to
```text (or another appropriate language identifier) so markdown linters stop
flagging MD040 and tooling preserves formatting; ensure both the diagram block
and the second fenced block use the same language tag.

In `@2-arquitectura-del-sistema.md`:
- Around line 215-223: The fenced code blocks that list the HTTP endpoints
(e.g., the block containing lines like "POST /words → captura + sugerencias IA +
Unsplash", "PUT /words/:id → editar definición / imagen / marcar aprendida",
"GET /words → diccionario del usuario", and the other block spanning lines
231-264) are missing a language marker; add an appropriate fenced-block language
specifier (for example ```http or ```text) to each of those code fences so the
MD linter rule MD040 is satisfied and tooling can syntax-highlight the HTTP
endpoint listings.

In `@3-modelo-de-datos.md`:
- Around line 116-119: Hay ambigüedad en la regla de desbloqueo entre contar
tarjetas "active" o el total; unifica la regla para que sea: el usuario debe
tener más de 3 wordCards activas (status = "active") — es decir mínimo 4 — y
aplica esa comprobación en la capa de aplicación (SessionService) usando conteo
de wordCards por userId; actualiza la línea con la tabla y la nota para eliminar
la alternativa y documentar explícitamente que SessionService valida
count(wordCards where status="active") >= 4 para desbloquear prácticas.

In `@4-especificaciones-de-la-api.md`:
- Around line 118-144: The OpenAPI example response violates the declared schema
for WordCard.imageUrl: imageUrl is required with format: uri but the 201 example
uses an empty string; update the 201 response example (and other examples at
lines referenced) to either provide a valid URI (e.g., a full https://... image
URL) for imageUrl or change the schema for property imageUrl to allow
null/optional (e.g., mark as nullable or remove required) so the example matches
the spec; reference the WordCard.imageUrl property and the 201 example block
when making the change.
- Around line 296-301: The session date default behavior is ambiguous; update
the API spec fields so the single source of truth is the client's IANA timezone:
change the "description" for the session date field to state that when date is
omitted the server will interpret "today" using the provided "timezone" field
(client IANA timezone), and mark or document that "timezone" must be supplied by
the client in the request; also clarify in the "timezone" field description
(example: America/Mexico_City) that this value is required for date resolution
so sessions/streaks are deterministic at day boundaries.
- Around line 207-246: The OpenAPI Exercise schema lists correctAnswer in the
required array but doesn't define it in properties; either remove correctAnswer
from the required list or (preferred) add a properties.correctAnswer entry —
e.g., define correctAnswer with type: string (or integer if you intend to store
an index), a brief description, and an example so the schema is consistent;
update the Exercise schema block where required includes "correctAnswer" and add
the new correctAnswer property definition next to options/orderIndex/question.

In `@5-historias-de-usuario.md`:
- Around line 29-35: The Gherkin-style scenario blocks (e.g., the block starting
with "Dado que estoy en la pantalla 'Añadir Palabra'..." and similar fenced
sections) lack language identifiers; update each fenced code block to include an
appropriate language tag (for example use ```gherkin for Given/When/Then
scenarios and ```text for plain text blocks) so the file complies with MD040;
search for all fenced blocks referenced in the review and add the proper tags
consistently throughout the document.

In `@6-tickets-de-trabajo.md`:
- Around line 35-40: The three fenced code blocks that contain path lists such
as the block with "users/{userId} wordCards/{wordCardId}
dailySessions/{sessionId} streaks/{userId}" (and the similar blocks around the
other occurrences) are missing language identifiers; update each triple-backtick
fence to include a language tag (for example "text" or "bash") so they comply
with MD040—locate the fences that contain those exact path lists and change ```
to ```text (or another appropriate language) for each occurrence.
- Around line 377-378: Replace the deprecated model identifier
'claude-3-5-haiku-20241022' used in the messages.create payload with the current
identifier 'claude-haiku-4-5-20251001' (or the alias 'claude-haiku-4-5')
wherever the model field is set in the Claude client code (look for the
messages.create call or the model constant in claudeClient.ts), and also update
the MVP note text that currently says "Usar claude-3-5-haiku-20241022" to
reference the new model name; ensure no other references to the retired
identifier remain.
- Around line 171-176: The dailySessions security rules are missing owner delete
permission. Update the match /dailySessions/{sessionId} block so the owner check
that currently applies to read, update also includes delete, using
resource.data.userId for existing documents, while keeping the create rule tied
to request.resource.data.userId.

In `@master-prd.md`:
- Around line 139-143: The fenced code block containing the flow "Login →
Captura palabra/frase → Editar definición + elegir imagen → Guardar tarjeta → (≥
4 palabras) → Sesión diaria 10 ejercicios → Completar → Racha +1 → (opcional)
Marcar palabra como aprendida" is missing a language identifier (violates
MD040); update the opening fence to include an appropriate language token (for
example use ```text or ```plain or ```none) so the block is explicitly labeled
for the renderer/linter while leaving the block content unchanged.

In `@prompts.md`:
- Around line 35-67: Fix the typos and normalize wording in prompts.md by
correcting the misspelled tokens ('pbligatoria' → 'obligatoria', 'espa;ol' →
'español', 'aliatorias' → 'aleatorias', 'ejerciocio' → 'ejercicio', 'A;ade' →
'Añade' or 'Añadir' as appropriate) and scan the rest of the list for similar
mistakes, ensuring bilingual consistency and proper accents; apply the same
corrections to the duplicate section referenced (lines 123-128) so both
occurrences match the normalized, typo-free phrasing.

---

Outside diff comments:
In `@prompts.md`:
- Around line 131-138: La sección "### 7. Pull Requests" contiene solo los
marcadores "Prompt 1/Prompt 2/Prompt 3" sin contenido; rellena esos tres prompts
con los textos descriptivos y ejemplos necesarios para cubrir el flujo de
creación, revisión y merge de PRs. Específicamente, dentro de la sección "### 7.
Pull Requests" complete los bloques etiquetados "Prompt 1", "Prompt 2" y "Prompt
3" con: (1) el propósito del prompt, (2) la plantilla exacta a usar por el autor
del PR, y (3) un ejemplo de salida esperado; asegúrate de mantener el formato y
estilo del resto del documento y usa lenguaje consistente con otras secciones
para trazabilidad.

In `@readme.md`:
- Around line 208-212: La sección que muestra los títulos "Pull Request 1/2/3"
en el README está incompleta; reemplaza cada entrada "Pull Request 1", "Pull
Request 2" y "Pull Request 3" por una línea con el número de PR, un enlace al PR
y una breve descripción de los cambios (objetivo y archivos/funcionalidad
afectados) para que quede trazabilidad clara; actualiza las tres entradas bajo
ese encabezado en readme.md asegurándote de usar formato de enlace Markdown y
1–2 frases descriptivas por PR.
- Around line 61-67: The README sections "1.3. Diseño y experiencia de usuario"
and "1.4. Instrucciones de instalación" are still placeholders; replace them
with concrete, reproducible content: under the "1.3. Diseño y experiencia de
usuario" heading add linked screenshots and/or a short embedded videotutorial
URL plus brief captions that show each main user flow (landing, auth, key
features) and note expected UI state for each image/video; under the "1.4.
Instrucciones de instalación" heading provide step‑by‑step shell commands and
required environment variables to reproduce the project locally (install deps,
start backend service, start frontend dev server, database setup commands, run
migrations and seeders, ports used), include example .env values, and add
verification steps (e.g., API healthcheck URL or test user credentials) so a
reviewer can follow and confirm the environment boots successfully.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b07ae53-950e-45be-8723-d368a3eda11f

📥 Commits

Reviewing files that changed from the base of the PR and between bcde5c4 and f3761df.

📒 Files selected for processing (9)
  • 1-descripcion-general-del-producto.md
  • 2-arquitectura-del-sistema.md
  • 3-modelo-de-datos.md
  • 4-especificaciones-de-la-api.md
  • 5-historias-de-usuario.md
  • 6-tickets-de-trabajo.md
  • master-prd.md
  • prompts.md
  • readme.md

Comment on lines +102 to +142
```
┌─────────────────────────────────────────────┐
│ Login / Registro │
│ • Email + contraseña │
│ • Firebase Auth │
└──────────────┬──────────────────────────────┘
┌─────────────────────────────────────────────┐
│ Home │
│ • Racha actual (prominente) │
│ • CTA «Practicar hoy» (si ≥ 4 palabras) │
│ • Acceso rápido al diccionario │
└──────┬──────────────────┬───────────────────┘
│ │
▼ ▼
┌─────────────┐ ┌──────────────────────────┐
│ Diccionario│ │ Añadir palabra │
│ • Lista │ │ 1. Input término │
│ tarjetas │ │ 2. Preview definición IA │
│ • Filtros │ │ 3. Editar definición │
│ activa / │ │ 4. Elegir idioma ES/EN │
│ aprendida│ │ 5. Seleccionar imagen │
│ • Detalle │ │ 6. Guardar tarjeta │
│ tarjeta │ └──────────────────────────┘
└─────────────┘
┌─────────────────────────────────────────────┐
│ Práctica diaria │
│ • 10 ejercicios secuenciales │
│ • image_match + mcq mezclados │
└──────────────────┬──────────────────────────┘
┌─────────────────────────────────────────────┐
│ Resumen de sesión │
│ • Aciertos / 10 │
│ • Racha actualizada │
└─────────────────────────────────────────────┘
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Label fenced code blocks with a language.

Lines 102 and 203 start fenced blocks without language tags, triggering MD040 and reducing tooling compatibility.

Also applies to: 203-208

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 102-102: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@1-descripcion-general-del-producto.md` around lines 102 - 142, The fenced
ASCII diagram blocks (the triple-backtick blocks that render the flowchart
starting with "┌─────────────────────────────────────────────┐" and the later
block around lines 203–208) are missing a language tag; update each opening
fence from ``` to ```text (or another appropriate language identifier) so
markdown linters stop flagging MD040 and tooling preserves formatting; ensure
both the diagram block and the second fenced block use the same language tag.

Source: Linters/SAST tools

Comment on lines +215 to +223
```
POST /words → captura + sugerencias IA + Unsplash
PUT /words/:id → editar definición / imagen / marcar aprendida
GET /words → diccionario del usuario
POST /sessions/daily → crear sesión (10 ejercicios) o bloquear
POST /sessions/:id/complete → cerrar sesión + actualizar racha
GET /streak → racha actual
GET /health → health check
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Specify language for fenced blocks.

The fenced blocks starting at Line 215 and Line 231 have no language marker (MD040).

Also applies to: 231-264

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 215-215: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@2-arquitectura-del-sistema.md` around lines 215 - 223, The fenced code blocks
that list the HTTP endpoints (e.g., the block containing lines like "POST /words
→ captura + sugerencias IA + Unsplash", "PUT /words/:id → editar definición /
imagen / marcar aprendida", "GET /words → diccionario del usuario", and the
other block spanning lines 231-264) are missing a language marker; add an
appropriate fenced-block language specifier (for example ```http or ```text) to
each of those code fences so the MD linter rule MD040 is satisfied and tooling
can syntax-highlight the HTTP endpoint listings.

Source: Linters/SAST tools

Comment thread 3-modelo-de-datos.md
Comment on lines +116 to +119
| **Regla de negocio** | Práctica diaria | Bloqueo si el usuario tiene ≤ 3 `wordCards` con `status = active` o total ≤ 3 (según implementación; ver nota abajo) |

> **Nota sobre bloqueo de práctica:** El PRD exige más de 3 palabras para desbloquear ejercicios (mínimo 4 tarjetas). Esta regla se aplica en la capa de aplicación (`SessionService`) mediante conteo de `wordCards` por `userId`; no requiere un campo persistido adicional.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Resolve ambiguity in unlock rule (active vs total cards).

Line 116 leaves two possible implementations for practice unlock, which breaks the single business contract across PRD/API/stories. Please pick one canonical rule and align all docs to it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@3-modelo-de-datos.md` around lines 116 - 119, Hay ambigüedad en la regla de
desbloqueo entre contar tarjetas "active" o el total; unifica la regla para que
sea: el usuario debe tener más de 3 wordCards activas (status = "active") — es
decir mínimo 4 — y aplica esa comprobación en la capa de aplicación
(SessionService) usando conteo de wordCards por userId; actualiza la línea con
la tabla y la nota para eliminar la alternativa y documentar explícitamente que
SessionService valida count(wordCards where status="active") >= 4 para
desbloquear prácticas.

Comment on lines +118 to +144
- imageUrl
- status
- createdAt
properties:
id:
type: string
example: wc_001
userId:
type: string
example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
term:
type: string
example: serendipity
normalizedTerm:
type: string
example: serendipity
definition:
type: string
example: Hallazgo afortunado e inesperado de algo valioso.
definitionLanguage:
type: string
enum: [es, en]
example: es
imageUrl:
type: string
format: uri
unsplashPhotoId:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Example response violates declared URI schema.

WordCard.imageUrl is required and typed as format: uri, but the 201 example sets imageUrl: "" (Line 542). Use either a valid URI example or mark the field nullable/optional during draft creation.

Also applies to: 533-548

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@4-especificaciones-de-la-api.md` around lines 118 - 144, The OpenAPI example
response violates the declared schema for WordCard.imageUrl: imageUrl is
required with format: uri but the 201 example uses an empty string; update the
201 response example (and other examples at lines referenced) to either provide
a valid URI (e.g., a full https://... image URL) for imageUrl or change the
schema for property imageUrl to allow null/optional (e.g., mark as nullable or
remove required) so the example matches the spec; reference the
WordCard.imageUrl property and the 201 example block when making the change.

Comment on lines +207 to +246
required:
- id
- wordCardId
- type
- options
- correctAnswer
- orderIndex
properties:
id:
type: string
example: ex_003
wordCardId:
type: string
example: wc_001
type:
type: string
enum: [image_match, mcq]
example: mcq
question:
type: string
nullable: true
example: ¿Cuál palabra describe un hallazgo afortunado e inesperado?
imageUrl:
type: string
format: uri
nullable: true
description: Presente cuando type = image_match
options:
type: array
items:
type: string
minItems: 4
maxItems: 4
example: [serendipity, misfortune, routine, deadline]
orderIndex:
type: integer
minimum: 0
maximum: 9
example: 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

OpenAPI schema bug: correctAnswer is required but undefined.

Exercise.required includes correctAnswer (Line 212), but the property is missing in properties. This makes the schema internally inconsistent for codegen/validation.

Proposed fix
     Exercise:
       type: object
       required:
         - id
         - wordCardId
         - type
         - options
         - correctAnswer
         - orderIndex
       properties:
@@
         options:
           type: array
           items:
             type: string
           minItems: 4
           maxItems: 4
           example: [serendipity, misfortune, routine, deadline]
+        correctAnswer:
+          type: string
+          description: Respuesta válida del ejercicio
+          example: serendipity
         orderIndex:
           type: integer
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@4-especificaciones-de-la-api.md` around lines 207 - 246, The OpenAPI Exercise
schema lists correctAnswer in the required array but doesn't define it in
properties; either remove correctAnswer from the required list or (preferred)
add a properties.correctAnswer entry — e.g., define correctAnswer with type:
string (or integer if you intend to store an index), a brief description, and an
example so the schema is consistent; update the Exercise schema block where
required includes "correctAnswer" and add the new correctAnswer property
definition next to options/orderIndex/question.

Comment thread 6-tickets-de-trabajo.md
Comment on lines +35 to +40
```
users/{userId}
wordCards/{wordCardId}
dailySessions/{sessionId}
streaks/{userId}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifiers to fenced blocks.

The fenced blocks starting at Lines 35, 291, and 494 are missing language tags (MD040).

Also applies to: 291-296, 494-527

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 35-35: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@6-tickets-de-trabajo.md` around lines 35 - 40, The three fenced code blocks
that contain path lists such as the block with "users/{userId}
wordCards/{wordCardId} dailySessions/{sessionId} streaks/{userId}" (and the
similar blocks around the other occurrences) are missing language identifiers;
update each triple-backtick fence to include a language tag (for example "text"
or "bash") so they comply with MD040—locate the fences that contain those exact
path lists and change ``` to ```text (or another appropriate language) for each
occurrence.

Source: Linters/SAST tools

Comment thread 6-tickets-de-trabajo.md
Comment on lines +171 to +176
match /dailySessions/{sessionId} {
allow read, update: if request.auth != null
&& request.auth.uid == resource.data.userId;
allow create: if request.auth != null
&& request.auth.uid == request.resource.data.userId;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

dailySessions rules block owner delete operations.

Line 172 allows only read, update for owners; delete is missing. This will prevent account cleanup/cascade flows from removing user sessions.

Proposed fix
     match /dailySessions/{sessionId} {
-      allow read, update: if request.auth != null
+      allow read, update, delete: if request.auth != null
         && request.auth.uid == resource.data.userId;
       allow create: if request.auth != null
         && request.auth.uid == request.resource.data.userId;
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
match /dailySessions/{sessionId} {
allow read, update: if request.auth != null
&& request.auth.uid == resource.data.userId;
allow create: if request.auth != null
&& request.auth.uid == request.resource.data.userId;
}
match /dailySessions/{sessionId} {
allow read, update, delete: if request.auth != null
&& request.auth.uid == resource.data.userId;
allow create: if request.auth != null
&& request.auth.uid == request.resource.data.userId;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@6-tickets-de-trabajo.md` around lines 171 - 176, The dailySessions security
rules are missing owner delete permission. Update the match
/dailySessions/{sessionId} block so the owner check that currently applies to
read, update also includes delete, using resource.data.userId for existing
documents, while keeping the create rule tied to request.resource.data.userId.

Comment thread 6-tickets-de-trabajo.md
Comment on lines +377 to +378
model: 'claude-3-5-haiku-20241022',
max_tokens: 200,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Anthropic API (JavaScript SDK): Is model identifier claude-3-5-haiku-20241022currently valid formessages.create, and what is the recommended replacement if deprecated?

💡 Result:

The model identifier claude-3-5-haiku-20241022 is not valid for messages.create [1][2]. It was officially retired on February 19, 2026 [1][3][4]. Any API requests using this identifier will return a 404 Not Found error [2][4]. The recommended replacement is the current Haiku generation model, claude-haiku-4-5-20251001 [1][5]. In many implementations, you can also use the shorter, more stable alias claude-haiku-4-5, which maps to the latest available snapshot [5]. It is recommended to update any hardcoded references in your JavaScript SDK code to use these current identifiers to maintain service continuity [3][2][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="6-tickets-de-trabajo.md"

echo "== Context around lines 360-390 =="
nl -ba "$file" | sed -n '360,390p'

echo
echo "== Context around lines 450-480 =="
nl -ba "$file" | sed -n '450,480p'

Repository: LIDR-academy/AI4Devs-finalproject

Length of output: 173


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="6-tickets-de-trabajo.md"

echo "== Context around lines 360-390 =="
awk 'NR>=360 && NR<=390 {printf "%d\t%s\n", NR, $0}' "$file"

echo
echo "== Context around lines 450-480 =="
awk 'NR>=450 && NR<=480 {printf "%d\t%s\n", NR, $0}' "$file"

Repository: LIDR-academy/AI4Devs-finalproject

Length of output: 2845


Update deprecated Anthropic model identifier to avoid BE-01 runtime failures.

backend/src/integrations/claudeClient.ts hardcodes claude-3-5-haiku-20241022 (lines 377-378), which is retired and not valid for messages.create—requests will fail with 404 Not Found. Replace it with claude-haiku-4-5-20251001 (or the alias claude-haiku-4-5) and update the related MVP note Usar claude-3-5-haiku-20241022... (lines 465-466).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@6-tickets-de-trabajo.md` around lines 377 - 378, Replace the deprecated model
identifier 'claude-3-5-haiku-20241022' used in the messages.create payload with
the current identifier 'claude-haiku-4-5-20251001' (or the alias
'claude-haiku-4-5') wherever the model field is set in the Claude client code
(look for the messages.create call or the model constant in claudeClient.ts),
and also update the MVP note text that currently says "Usar
claude-3-5-haiku-20241022" to reference the new model name; ensure no other
references to the retired identifier remain.

Comment thread master-prd.md
Comment on lines +139 to +143
```
Login → Captura palabra/frase → Editar definición + elegir imagen → Guardar tarjeta
→ (≥ 4 palabras) → Sesión diaria 10 ejercicios → Completar → Racha +1
→ (opcional) Marcar palabra como aprendida
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language identifier to fenced block.

Line 139 uses a fenced code block without language, which violates MD040 and hurts renderer/linter consistency.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 139-139: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@master-prd.md` around lines 139 - 143, The fenced code block containing the
flow "Login → Captura palabra/frase → Editar definición + elegir imagen →
Guardar tarjeta → (≥ 4 palabras) → Sesión diaria 10 ejercicios → Completar →
Racha +1 → (opcional) Marcar palabra como aprendida" is missing a language
identifier (violates MD040); update the opening fence to include an appropriate
language token (for example use ```text or ```plain or ```none) so the block is
explicitly labeled for the renderer/linter while leaving the block content
unchanged.

Source: Linters/SAST tools

Comment thread prompts.md
Comment on lines +35 to 67
1. que el usuario realmente aprenda las palabras, no solo busque el significado en un navegador y despues se olvida.
2.Cualquier persona interesada en mejorar su vocabulario en ingles.
3.las dos
4.racha media
5.solo entrada manual palabra o frase.
6.la palabra o frase inicial es pbligatoria, la descripcion la puede sugerir la ai pero el user la puede modificar.
7.API de imágenes (Unsplash)
8.que el user seleccione si lo quiere en espa;ol o en ingles
9.una tarjeta por palabra
10. marcada manualmente por el usuario.
11.los dos
12.10 para que sea rapido
13.aliatorias
14.bloqueo hasta tener mas de 3 palabras
15.un ejerciocio al dia basta
16.sin recordatorios
17.solo racha
18.no
19.por el momento solo sera de muestra no pongas limite
20.solo es academico
21.con expo
22.bilingue
23.solo con conexion
24.email y pass
25.para esta version omitamos esto
26.para esta version omitamos esto
27.cualquier palabra que el usuario elija
28.google translate
29.Contexto real + IA + hábito diario
30.solo full-stack
31.si prd
32.No, solo busco que sea claro

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Corrige errores tipográficos en prompts críticos.

Hay varios typos que pueden confundir o degradar la reutilización de los prompts (pbligatoria, espa;ol, aliatorias, ejerciocio, A;ade). Conviene normalizarlos antes de cerrar la entrega.

Also applies to: 123-128

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@prompts.md` around lines 35 - 67, Fix the typos and normalize wording in
prompts.md by correcting the misspelled tokens ('pbligatoria' → 'obligatoria',
'espa;ol' → 'español', 'aliatorias' → 'aleatorias', 'ejerciocio' → 'ejercicio',
'A;ade' → 'Añade' or 'Añadir' as appropriate) and scan the rest of the list for
similar mistakes, ensuring bilingual consistency and proper accents; apply the
same corrections to the duplicate section referenced (lines 123-128) so both
occurrences match the normalized, typo-free phrasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant