Conversation
- Add database specific tickets (DB-XXX) to US-001, US-002, US-003, US-005, US-006 - Complete Section 5 (User Stories) in README.md with Gherkin scenarios - Complete Section 6 (Work Tickets) in README.md with detailed tech specs for Backend, Frontend and DB tasks
📝 WalkthroughWalkthroughComprehensive documentation suite added for the TRACÉ MVP platform covering system architecture, technical module specifications, database/infrastructure design, and detailed user stories. Introduces a monorepo structure with worker-based asynchronous processing, REST API contracts, database schema, and seven feature specifications spanning authentication, project management, file upload/processing, interactive viewing, guest access, collaboration, and layer comparison. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🤖 Fix all issues with AI agents
In `@docs/architecture_proposal.md`:
- Around line 24-31: In the Worker Service section (heading "Worker Service
(Node.js - Rol Procesador)"), correct the misspelled word in the responsibility
bullet "Generación de miniaturas (tumbnails)" by replacing "tumbnails" with
"thumbnails" so the line reads "Generación de miniaturas (thumbnails)"; update
only that word in the bullet to preserve surrounding wording and punctuation.
In `@docs/modules/worker_service.md`:
- Around line 64-71: Replace the two typos in the markdown: change the string
"mensajejob" (the trigger description containing `plan-processing`) to "mensaje
job" for readability, and change "Sateless" in the scalability section to the
correct "Stateless"; update those exact words in the document so the phrasing
reads "mensaje job `plan-processing`" and "This service is **Stateless**."
In `@docs/user-stories/US-001-RegistroAutenticacion.md`:
- Line 71: Fix the typo in the user story description: replace "bcyrpt" with the
correct spelling "bcrypt" in the POST /auth/register line so the text reads that
the password is hashed using bcrypt (or argon2) before saving to the DB; update
the string "`POST /auth/register`: Recibe email, password, name. Valida, hashea
password (bcrypt/argon2), guarda en DB." referencing the POST /auth/register
description.
In `@docs/user-stories/US-002-GestionProyectos.md`:
- Around line 57-82: Unify the Project schema between DB-002 and BACK-002 by
adopting the DB-002 enum-based model and updating BACK-002 to match: rename
`name` to `title`, rename `user_id` to `architect_id` (or vice-choose if you
prefer a generic name—but be consistent across both docs), replace `active`
boolean with `status` enum (values ACTIVE/ARCHIVED), and add standard timestamp
fields (`created_at`, `deleted_at`) so both the DB model `Project` and the API
spec (`POST /projects`, `GET /projects`, `DELETE /projects/:id`) reference the
same field names and semantics; ensure ProjectMember remains as specified
(project_id, user_id, role) and update acceptance criteria to reflect the chosen
field names.
In `@docs/user-stories/US-003-CargaPlanos.md`:
- Around line 63-71: The endpoint naming is inconsistent: the diff uses POST
/projects/:id/layers while OpenAPI/README use POST /projects/{projectId}/plans;
pick the canonical route (align to OpenAPI: POST /projects/{projectId}/plans),
and update all related code and docs accordingly — rename the Express route
handler and any route constants from "/projects/:id/layers" to
"/projects/:projectId/plans", update the README/OpenAPI to match, change
producer/consumer queue usage and job naming that reference "layer" to "plan"
(ensure Redis queue "plan-processing" is used consistently), and update the
model/DB record creation code that currently creates a Layer with status
PROCESSING to create the Plan record with status PROCESSING so route, docs, job
queue, and model names are all consistent.
In `@docs/user-stories/US-004-VisorInteractivo.md`:
- Around line 8-38: Update the Spanish diacritics: change the header string
"Titulo breve:" to "Título breve:" and in the Gherkin Scenario 2 replace "se
amplia suavemente" with "se amplía suavemente" (ensure the accented í in
"amplía"); search for these exact phrases ("Titulo breve" and "se amplia
suavemente") and apply the corrections consistently in the document.
In `@docs/user-stories/US-005-AccesoInvitado.md`:
- Around line 45-66: Clarify and resolve the token storage inconsistency by
explicitly stating whether both the Invitation model and a project.share_token
field are required or selecting one approach: if both are needed, document
distinct use cases (e.g., Invitation model with fields id, project_id, email,
token, expires_at, status for email-based, expiring invites; project.share_token
on Project for persistent anonymous public share links) and update BACK-004 to
reference the correct storage for POST /projects/:id/share and GET
/public/projects/:token; if only one is needed, remove the conflicting reference
and make DB-004 and BACK-004 consistently reference the chosen symbol
(Invitation or project.share_token) and describe token lifecycle, uniqueness,
indexing and validation rules accordingly.
In `@docs/user-stories/US-006-Colaboracion.md`:
- Around line 54-75: Unificar la propiedad y endpoints de Pin: actualizar DB-005
y BACK-005 para usar oficialmente plan-level ownership (reemplazar Pin.plan_id →
Pin.plan_id como la FK canónica) y hacer layer_id un campo opcional en el
esquema; cambiar el endpoint en BACK-005 de POST /layers/:id/pins a POST
/plans/:planId/pins (mantener soporte opcional para layer context en el
payload), y asegurarse de que los nombres de campo en la especificación del
esquema (Pin: plan_id, layer_id?, x, y, status; Comment: pin_id, content,
user_id) y el endpoint POST /pins/:id/comments reflejen esta decisión para
evitar divergencias entre DB-005 y BACK-005.
♻️ Duplicate comments (2)
docs/modules/backend_api_express.md (1)
445-505: Align other docs to these endpoint paths to avoid spec drift.This OpenAPI defines
/projects/{projectId}/plansand/plans/{planId}/pins, while other docs use/projects/:id/layersand/layers/:id/pins. Please align the rest of the documentation to this canonical contract to avoid divergent implementations.readme.md (1)
313-323: Ensure user-story tickets use these canonical endpoints.The README aligns with OpenAPI (
/projects/{projectId}/plans,/plans/{planId}/pins), but US-003/US-006 still reference/layersendpoints. Please sync those docs to this contract.
🧹 Nitpick comments (5)
docs/modules/worker_service.md (1)
15-17: Fix list indentation to satisfy markdownlint (MD007).The nested list under “Image Processing” uses 4-space indentation; markdownlint expects 2 here.
♻️ Suggested edit
- - `Sharp` (Optimización y recorte de imágenes). - - `Ghostscript` / `PDF-Poppler` (Rasterización de vectores). + - `Sharp` (Optimización y recorte de imágenes). + - `Ghostscript` / `PDF-Poppler` (Rasterización de vectores).docs/modules/database_infrastructure.md (1)
116-140: Normalize nested list indentation (MD007) for entity details.Several nested bullets under “Usuarios y Accesos” / “Planos y Capas” are indented 4 spaces; markdownlint expects 2.
♻️ Suggested edit (example pattern)
-* **User:** - * `id` (UUID), `email`, `role`, `subscription_tier` (gestión manual para MVP). +* **User:** + * `id` (UUID), `email`, `role`, `subscription_tier` (gestión manual para MVP).prompts.md (1)
62-66: Use a heading instead of bold text (MD036).“Identidad seleccionada: TRACÉ” is formatted as bold but reads as a section header.
♻️ Suggested edit
-**Identidad seleccionada: TRACÉ** +#### Identidad seleccionada: TRACÉdocs/mvp_specification.md (2)
10-13: Normalize nested list indentation for palette bullets (MD007).The sub-bullets under “Paleta de Colores” are indented with 4 spaces; markdownlint expects 2.
♻️ Suggested edit
-- **Paleta de Colores:** - - **Principal:** Negro Tinta (`#000000`) - Elegancia y contraste. - - **Acento:** Amarillo Ocre "Papel Cebolla" (`#F2E8C9`) - Calidez y referencia al material clásico. - - **Secundario:** Gris Cemento (`#95A5A6`) - Neutralidad estructural. +- **Paleta de Colores:** + - **Principal:** Negro Tinta (`#000000`) - Elegancia y contraste. + - **Acento:** Amarillo Ocre "Papel Cebolla" (`#F2E8C9`) - Calidez y referencia al material clásico. + - **Secundario:** Gris Cemento (`#95A5A6`) - Neutralidad estructural.
23-47: Fix subsection numbering to match section 5.Section “## 5. Funcionalidades Core (MVP)” uses “### 4.1/4.2/4.3/4.4”, which is inconsistent.
♻️ Suggested edit
-### 4.1. Gestión de Proyectos y Accesos +### 5.1. Gestión de Proyectos y Accesos ... -### 4.2. Visor Interactivo y Capas (La funcionalidad clave) +### 5.2. Visor Interactivo y Capas (La funcionalidad clave) ... -### 4.3. Comunicación Contextual ("Pin & Comment") +### 5.3. Comunicación Contextual ("Pin & Comment") ... -### 4.4. Control de Versiones Simple +### 5.4. Control de Versiones Simple
| ### 2.3. Worker Service (Node.js - Rol Procesador) | ||
| * **Rol:** Procesador de tareas en segundo plano. | ||
| * **Responsabilidad:** | ||
| * Escuchar la cola de trabajos en Redis. | ||
| * Conversión de formatos (PDF a PNG/JPG). | ||
| * Generación de miniaturas (tumbnails). | ||
| * Actualización de estado en la Base de Datos. | ||
| * **Escalabilidad:** Se pueden desplegar múltiples instancias de este contenedor si la carga de trabajo aumenta, sin tocar la API. |
There was a problem hiding this comment.
Fix typo: “tumbnails” → “thumbnails”.
✏️ Proposed fix
- * Generación de miniaturas (tumbnails).
+ * Generación de miniaturas (thumbnails).📝 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.
| ### 2.3. Worker Service (Node.js - Rol Procesador) | |
| * **Rol:** Procesador de tareas en segundo plano. | |
| * **Responsabilidad:** | |
| * Escuchar la cola de trabajos en Redis. | |
| * Conversión de formatos (PDF a PNG/JPG). | |
| * Generación de miniaturas (tumbnails). | |
| * Actualización de estado en la Base de Datos. | |
| * **Escalabilidad:** Se pueden desplegar múltiples instancias de este contenedor si la carga de trabajo aumenta, sin tocar la API. | |
| ### 2.3. Worker Service (Node.js - Rol Procesador) | |
| * **Rol:** Procesador de tareas en segundo plano. | |
| * **Responsabilidad:** | |
| * Escuchar la cola de trabajos en Redis. | |
| * Conversión de formatos (PDF a PNG/JPG). | |
| * Generación de miniaturas (thumbnails). | |
| * Actualización de estado en la Base de Datos. | |
| * **Escalabilidad:** Se pueden desplegar múltiples instancias de este contenedor si la carga de trabajo aumenta, sin tocar la API. |
🧰 Tools
🪛 LanguageTool
[grammar] ~24-~24: Aquí puede haber un error.
Context: ...orker Service (Node.js - Rol Procesador) * Rol: Procesador de tareas en segundo plano...
(QB_NEW_ES)
[grammar] ~25-~25: Agrega un espacio.
Context: ... (Node.js - Rol Procesador) * Rol: Procesador de tareas en segundo plano. *...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~29-~29: Corrige el error ortográfico.
Context: ...JPG). * Generación de miniaturas (tumbnails). * Actualización de estado en la...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[grammar] ~30-~30: Corrige la mayúscula.
Context: .... * Actualización de estado en la Base de Datos. * Escalabilidad: Se pue...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~30-~30: Corrige la mayúscula.
Context: ... Actualización de estado en la Base de Datos. * Escalabilidad: Se pueden despl...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
🤖 Prompt for AI Agents
In `@docs/architecture_proposal.md` around lines 24 - 31, In the Worker Service
section (heading "Worker Service (Node.js - Rol Procesador)"), correct the
misspelled word in the responsibility bullet "Generación de miniaturas
(tumbnails)" by replacing "tumbnails" with "thumbnails" so the line reads
"Generación de miniaturas (thumbnails)"; update only that word in the bullet to
preserve surrounding wording and punctuation.
| 1. **Trigger:** BullMQ recibe un mensajejob `plan-processing`. | ||
| 2. **Adaptador (Processor):** `PlanProcessingJob.ts` extrae el `planId` y el `fileKey`. | ||
| 3. **Bootstrapping:** Se instancia `ProcessPlanUseCase` inyectándole los adaptadores reales (`S3Storage`, `Ghostscript`, `PrismaRepo`). | ||
| 4. **Ejecución:** El Caso de Uso orquesta el dominio. | ||
| 5. **Resultado:** Si falla, el Worker maneja el reintento (backoff) o marca el Job como fallido (Dead Letter Queue). | ||
|
|
||
| ## 6. Escalabilidad | ||
| - Este servicio es **Sateless**. |
There was a problem hiding this comment.
Fix typos for clarity (“mensaje job”, “Stateless”).
Line 64 has “mensajejob” and Line 71 has “Sateless”.
✏️ Suggested edit
-1. **Trigger:** BullMQ recibe un mensajejob `plan-processing`.
+1. **Trigger:** BullMQ recibe un mensaje job `plan-processing`.
-- Este servicio es **Sateless**.
+- Este servicio es **Stateless**.📝 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.
| 1. **Trigger:** BullMQ recibe un mensajejob `plan-processing`. | |
| 2. **Adaptador (Processor):** `PlanProcessingJob.ts` extrae el `planId` y el `fileKey`. | |
| 3. **Bootstrapping:** Se instancia `ProcessPlanUseCase` inyectándole los adaptadores reales (`S3Storage`, `Ghostscript`, `PrismaRepo`). | |
| 4. **Ejecución:** El Caso de Uso orquesta el dominio. | |
| 5. **Resultado:** Si falla, el Worker maneja el reintento (backoff) o marca el Job como fallido (Dead Letter Queue). | |
| ## 6. Escalabilidad | |
| - Este servicio es **Sateless**. | |
| 1. **Trigger:** BullMQ recibe un mensaje job `plan-processing`. | |
| 2. **Adaptador (Processor):** `PlanProcessingJob.ts` extrae el `planId` y el `fileKey`. | |
| 3. **Bootstrapping:** Se instancia `ProcessPlanUseCase` inyectándole los adaptadores reales (`S3Storage`, `Ghostscript`, `PrismaRepo`). | |
| 4. **Ejecución:** El Caso de Uso orquesta el dominio. | |
| 5. **Resultado:** Si falla, el Worker maneja el reintento (backoff) o marca el Job como fallido (Dead Letter Queue). | |
| ## 6. Escalabilidad | |
| - Este servicio es **Stateless**. |
🧰 Tools
🪛 LanguageTool
[grammar] ~64-~64: Agrega un espacio.
Context: ...de Ejecución (Pipeline) 1. Trigger: BullMQ recibe un mensajejob `plan-proces...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~64-~64: Agrega un espacio.
Context: ...line) 1. Trigger: BullMQ recibe un mensajejob plan-processing. 2. **Adaptador (Pro...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~65-~65: Agrega un espacio.
Context: ...-processing. 2. **Adaptador (Processor):** PlanProcessingJob.tsextrae elpla...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~65-~65: Elimina el espacio
Context: ...cessing. 2. **Adaptador (Processor):** PlanProcessingJob.tsextrae elplanId...
(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_ORTHOGRAPHY_SPACE)
[grammar] ~65-~65: Agrega una palabra o signo.
Context: ...essing. 2. **Adaptador (Processor):** PlanProcessingJob.tsextrae elplanIdy elfileKey`. 3. ...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_OTHER)
[grammar] ~70-~70: Cambia la palabra o signo.
Context: ...omo fallido (Dead Letter Queue). ## 6. Escalabilidad - Este servicio es Sateless. - Al es...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~71-~71: Corrige el error ortográfico.
Context: ...6. Escalabilidad - Este servicio es Sateless. - Al estar desacoplado de la API H...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)
🤖 Prompt for AI Agents
In `@docs/modules/worker_service.md` around lines 64 - 71, Replace the two typos
in the markdown: change the string "mensajejob" (the trigger description
containing `plan-processing`) to "mensaje job" for readability, and change
"Sateless" in the scalability section to the correct "Stateless"; update those
exact words in the document so the phrasing reads "mensaje job
`plan-processing`" and "This service is **Stateless**."
| - **Tipo:** Backend Feature | ||
| - **Propósito:** Implementar la lógica de registro, login y generación de tokens JWT. | ||
| - **Especificaciones Técnicas:** | ||
| - `POST /auth/register`: Recibe email, password, name. Valida, hashea password (bcyrpt/argon2), guarda en DB. |
There was a problem hiding this comment.
Fix typo: "bcyrpt" should be "bcrypt".
✏️ Proposed fix
- - `POST /auth/register`: Recibe email, password, name. Valida, hashea password (bcyrpt/argon2), guarda en DB.
+ - `POST /auth/register`: Recibe email, password, name. Valida, hashea password (bcrypt/argon2), guarda en DB.📝 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.
| - `POST /auth/register`: Recibe email, password, name. Valida, hashea password (bcyrpt/argon2), guarda en DB. | |
| - `POST /auth/register`: Recibe email, password, name. Valida, hashea password (bcrypt/argon2), guarda en DB. |
🧰 Tools
🪛 LanguageTool
[grammar] ~71-~71: Corrige la mayúscula.
Context: ... Técnicas:** - POST /auth/register: Recibe email, password, name. Valida, hashea p...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~71-~71: Cambia la palabra según la sugerencia.
Context: ...e email, password, name. Valida, hashea password (bcyrpt/argon2), guarda en DB. - `POS...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_CONFUSION)
[grammar] ~71-~71: Corrige el error ortográfico.
Context: ...assword, name. Valida, hashea password (bcyrpt/argon2), guarda en DB. - `POST /auth/...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)
🤖 Prompt for AI Agents
In `@docs/user-stories/US-001-RegistroAutenticacion.md` at line 71, Fix the typo
in the user story description: replace "bcyrpt" with the correct spelling
"bcrypt" in the POST /auth/register line so the text reads that the password is
hashed using bcrypt (or argon2) before saving to the DB; update the string
"`POST /auth/register`: Recibe email, password, name. Valida, hashea password
(bcrypt/argon2), guarda en DB." referencing the POST /auth/register description.
| ### [DB-002] Esquema Base de Datos: Proyectos y Miembros | ||
| - **Tipo:** Database | ||
| - **Propósito:** Estructura para almacenar proyectos y relaciones de usuarios. | ||
| - **Especificaciones Técnicas:** | ||
| - Definir modelo `Project`: `id` (UUID), `title`, `architect_id` (FK -> User), `status` (ACTIVE/ARCHIVED), `deleted_at`. | ||
| - Definir modelo `ProjectMember` (Tabla pivote): `project_id`, `user_id`, `role` (OWNER/EDITOR/VIEWER). | ||
| - Configurar relaciones en Prisma. | ||
| - **Criterios de Aceptación:** | ||
| - Migración ejecutada exitosamente. | ||
| - Integridad referencial (FK) configurada correctamente. | ||
| - **Equipo Asignado:** Backend/DBA | ||
| - **Esfuerzo:** 3 pts | ||
|
|
||
| ### [BACK-002] API Endpoints: Gestión de Proyectos | ||
| - **Tipo:** Backend Feature | ||
| - **Propósito:** CRUD de proyectos y control de límites de plan. | ||
| - **Especificaciones Técnicas:** | ||
| - `POST /projects`: Crea proyecto. Check `COUNT(projects) < 3`. | ||
| - `GET /projects`: Lista proyectos del usuario. | ||
| - `DELETE /projects/:id`: Borra lógico o físico. | ||
| - Schema DB: `Project` (id, user_id, name, created_at, active). | ||
| - **Criterios de Aceptación:** | ||
| - No permite crear el 4º proyecto. | ||
| - Eliminar proyecto actualiza el conteo. | ||
| - **Equipo Asignado:** Backend | ||
| - **Esfuerzo:** 5 pts |
There was a problem hiding this comment.
Align Project model schema between DB-002 and BACK-002.
There's an inconsistency in the Project model definition:
- DB-002 (line 61):
id,title,architect_id,status(ACTIVE/ARCHIVED),deleted_at - BACK-002 (line 77):
id,user_id,name,created_at,active
Please reconcile these field names:
titlevs.name→ choose onearchitect_idvs.user_id→ align (recommendarchitect_idfor clarity oruser_idif more generic roles are planned)status(enum) vs.active(boolean) → the enum approach in DB-002 is more extensible- Ensure both include necessary timestamp fields
🧰 Tools
🪛 LanguageTool
[grammar] ~57-~57: Cambia la palabra o signo.
Context: ...uema Base de Datos: Proyectos y Miembros - Tipo: Database - Propósito: Estruc...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~58-~58: Cambia la palabra o signo.
Context: ...royectos y Miembros - Tipo: Database - Propósito: Estructura para almacenar p...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~60-~60: Corrige la mayúscula.
Context: ...iones de usuarios. - Especificaciones Técnicas: - Definir modelo Project: id (UUID), `...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~62-~62: Corrige la mayúscula.
Context: ...t. - Definir modelo ProjectMember(Tabla pivote):project_id, user_id, role...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~64-~64: Corrige la mayúscula.
Context: ... relaciones en Prisma. - Criterios de Aceptación: - Migración ejecutada exitosamente. - In...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~67-~67: Corrige la mayúscula.
Context: ...) configurada correctamente. - Equipo Asignado: Backend/DBA - Esfuerzo: 3 pts ##...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~67-~67: Cambia la palabra o signo.
Context: ...ente. - Equipo Asignado: Backend/DBA - Esfuerzo: 3 pts ### [BACK-002] API En...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~70-~70: Cambia la palabra o signo.
Context: ...002] API Endpoints: Gestión de Proyectos - Tipo: Backend Feature - Propósito:...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~71-~71: Cambia la palabra o signo.
Context: ...de Proyectos - Tipo: Backend Feature - Propósito: CRUD de proyectos y control...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~73-~73: Cambia la palabra o signo.
Context: ...e límites de plan. - Especificaciones Técnicas: - POST /projects: Crea proyecto. Check `COUNT(projects) <...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~76-~76: Cambia la forma del sustantivo.
Context: ...el usuario. - DELETE /projects/:id: Borra lógico o físico. - Schema DB: `Projec...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_NOUN_FORM)
[grammar] ~78-~78: Corrige la mayúscula.
Context: ..., created_at, active). - Criterios de Aceptación: - No permite crear el 4º proyecto. - Eli...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~79-~79: Agrega un signo de puntuación.
Context: ...e Aceptación:** - No permite crear el 4º proyecto. - Eliminar proyecto actuali...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_PUNCTUATION)
[grammar] ~81-~81: Corrige la mayúscula.
Context: ...royecto actualiza el conteo. - Equipo Asignado: Backend - Esfuerzo: 5 pts ### [F...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~81-~81: Cambia la palabra o signo.
Context: ...l conteo. - Equipo Asignado: Backend - Esfuerzo: 5 pts ### [FRONT-002] Dashb...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
🤖 Prompt for AI Agents
In `@docs/user-stories/US-002-GestionProyectos.md` around lines 57 - 82, Unify the
Project schema between DB-002 and BACK-002 by adopting the DB-002 enum-based
model and updating BACK-002 to match: rename `name` to `title`, rename `user_id`
to `architect_id` (or vice-choose if you prefer a generic name—but be consistent
across both docs), replace `active` boolean with `status` enum (values
ACTIVE/ARCHIVED), and add standard timestamp fields (`created_at`, `deleted_at`)
so both the DB model `Project` and the API spec (`POST /projects`, `GET
/projects`, `DELETE /projects/:id`) reference the same field names and
semantics; ensure ProjectMember remains as specified (project_id, user_id, role)
and update acceptance criteria to reflect the chosen field names.
| ### [BACK-003] API Endpoints & Queue Producer | ||
| - **Tipo:** Backend Feature | ||
| - **Propósito:** Endpoint de subida y encolamiento de tareas. | ||
| - **Especificaciones Técnicas:** | ||
| - `POST /projects/:id/layers`: Upload file (S3/Multer). | ||
| - Validar extensión y tamaño máximo (20MB). | ||
| - Añadir job a cola Redis `plan-processing`. | ||
| - Crear registro `Layer` con status `PROCESSING`. | ||
| - **Criterios de Aceptación:** |
There was a problem hiding this comment.
Endpoint naming drift: /layers vs /plans.
This ticket specifies POST /projects/:id/layers, while the OpenAPI and README describe POST /projects/{projectId}/plans. Please align on a single canonical endpoint to prevent backend/frontend/worker divergence.
💡 Suggested alignment to OpenAPI
- - `POST /projects/:id/layers`: Upload file (S3/Multer).
+ - `POST /projects/{projectId}/plans`: Upload file (S3/Multer).📝 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.
| ### [BACK-003] API Endpoints & Queue Producer | |
| - **Tipo:** Backend Feature | |
| - **Propósito:** Endpoint de subida y encolamiento de tareas. | |
| - **Especificaciones Técnicas:** | |
| - `POST /projects/:id/layers`: Upload file (S3/Multer). | |
| - Validar extensión y tamaño máximo (20MB). | |
| - Añadir job a cola Redis `plan-processing`. | |
| - Crear registro `Layer` con status `PROCESSING`. | |
| - **Criterios de Aceptación:** | |
| ### [BACK-003] API Endpoints & Queue Producer | |
| - **Tipo:** Backend Feature | |
| - **Propósito:** Endpoint de subida y encolamiento de tareas. | |
| - **Especificaciones Técnicas:** | |
| - `POST /projects/{projectId}/plans`: Upload file (S3/Multer). | |
| - Validar extensión y tamaño máximo (20MB). | |
| - Añadir job a cola Redis `plan-processing`. | |
| - Crear registro `Layer` con status `PROCESSING`. | |
| - **Criterios de Aceptación:** |
🧰 Tools
🪛 LanguageTool
[grammar] ~63-~63: Cambia la palabra o signo.
Context: ...BACK-003] API Endpoints & Queue Producer - Tipo: Backend Feature - Propósito:...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~64-~64: Cambia la palabra o signo.
Context: ...eue Producer - Tipo: Backend Feature - Propósito: Endpoint de subida y encola...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~66-~66: Cambia la palabra o signo.
Context: ...amiento de tareas. - Especificaciones Técnicas: - POST /projects/:id/layers: Upload file (S3/Multer). - Validar ex...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~68-~68: Aquí puede haber un error.
Context: ... - Validar extensión y tamaño máximo (20MB). - Añadir job a cola Redis `plan-pro...
(QB_NEW_ES)
[grammar] ~71-~71: Corrige la mayúscula.
Context: ...n status PROCESSING. - Criterios de Aceptación: - Archivo guardado, respuesta 202 Accepted...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
🤖 Prompt for AI Agents
In `@docs/user-stories/US-003-CargaPlanos.md` around lines 63 - 71, The endpoint
naming is inconsistent: the diff uses POST /projects/:id/layers while
OpenAPI/README use POST /projects/{projectId}/plans; pick the canonical route
(align to OpenAPI: POST /projects/{projectId}/plans), and update all related
code and docs accordingly — rename the Express route handler and any route
constants from "/projects/:id/layers" to "/projects/:projectId/plans", update
the README/OpenAPI to match, change producer/consumer queue usage and job naming
that reference "layer" to "plan" (ensure Redis queue "plan-processing" is used
consistently), and update the model/DB record creation code that currently
creates a Layer with status PROCESSING to create the Plan record with status
PROCESSING so route, docs, job queue, and model names are all consistent.
| - **Titulo breve:** Navegación en Visor | ||
| - **Prioridad:** Alta (P1) | ||
| - **Estimación:** 5 Puntos | ||
| - **Dependencias:** US-003 | ||
| - **Orden de ejecución:** 4 | ||
| - **Estado:** Pending | ||
|
|
||
| ## Diseño de Pantallas y UI | ||
|
|
||
| ### 1. Lienzo del Visor (Canvas) | ||
| - **Área Principal:** Ocupa el 100% de la pantalla menos el header. | ||
| - **Imagen:** Renderizado de la imagen del plano. | ||
| - **Comportamiento:** El cursor cambia a "Mano" (grab) para indicar capacidad de panning. | ||
|
|
||
| ### 2. Controles de Navegación (Overlay) | ||
| - **Ubicación:** Esquina inferior derecha o flotante. | ||
| - **Botones:** Zoom In (+), Zoom Out (-), Reset View (ajustar a pantalla). | ||
| - **Indicador:** Nivel de zoom actual (ej. 150%). | ||
|
|
||
| ## Criterios de Aceptación (Gherkin) | ||
|
|
||
| ### Escenario 1: Visualización inicial | ||
| **Dado** un plano cargado correctamente | ||
| **Cuando** entro al visor del proyecto | ||
| **Entonces** la imagen se ajusta para verse completa en la pantalla (Fit to screen) | ||
|
|
||
| ### Escenario 2: Zoom profundo | ||
| **Dado** que estoy visualizando un plano | ||
| **Cuando** uso la rueda del ratón o el gesto de "pinch" en tablet | ||
| **Entonces** la imagen se amplia suavemente sin perder su posición relativa | ||
| **Y** la calidad se mantiene aceptable (dependiendo de la resolución original) |
There was a problem hiding this comment.
Fix Spanish diacritics for clarity (“Título”, “se amplía”).
✏️ Suggested edit
-- **Titulo breve:** Navegación en Visor
+- **Título breve:** Navegación en Visor
...
-- **Entonces** la imagen se amplia suavemente sin perder su posición relativa
+- **Entonces** la imagen se amplía suavemente sin perder su posición relativa📝 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.
| - **Titulo breve:** Navegación en Visor | |
| - **Prioridad:** Alta (P1) | |
| - **Estimación:** 5 Puntos | |
| - **Dependencias:** US-003 | |
| - **Orden de ejecución:** 4 | |
| - **Estado:** Pending | |
| ## Diseño de Pantallas y UI | |
| ### 1. Lienzo del Visor (Canvas) | |
| - **Área Principal:** Ocupa el 100% de la pantalla menos el header. | |
| - **Imagen:** Renderizado de la imagen del plano. | |
| - **Comportamiento:** El cursor cambia a "Mano" (grab) para indicar capacidad de panning. | |
| ### 2. Controles de Navegación (Overlay) | |
| - **Ubicación:** Esquina inferior derecha o flotante. | |
| - **Botones:** Zoom In (+), Zoom Out (-), Reset View (ajustar a pantalla). | |
| - **Indicador:** Nivel de zoom actual (ej. 150%). | |
| ## Criterios de Aceptación (Gherkin) | |
| ### Escenario 1: Visualización inicial | |
| **Dado** un plano cargado correctamente | |
| **Cuando** entro al visor del proyecto | |
| **Entonces** la imagen se ajusta para verse completa en la pantalla (Fit to screen) | |
| ### Escenario 2: Zoom profundo | |
| **Dado** que estoy visualizando un plano | |
| **Cuando** uso la rueda del ratón o el gesto de "pinch" en tablet | |
| **Entonces** la imagen se amplia suavemente sin perder su posición relativa | |
| **Y** la calidad se mantiene aceptable (dependiendo de la resolución original) | |
| - **Título breve:** Navegación en Visor | |
| - **Prioridad:** Alta (P1) | |
| - **Estimación:** 5 Puntos | |
| - **Dependencias:** US-003 | |
| - **Orden de ejecución:** 4 | |
| - **Estado:** Pending | |
| ## Diseño de Pantallas y UI | |
| ### 1. Lienzo del Visor (Canvas) | |
| - **Área Principal:** Ocupa el 100% de la pantalla menos el header. | |
| - **Imagen:** Renderizado de la imagen del plano. | |
| - **Comportamiento:** El cursor cambia a "Mano" (grab) para indicar capacidad de panning. | |
| ### 2. Controles de Navegación (Overlay) | |
| - **Ubicación:** Esquina inferior derecha o flotante. | |
| - **Botones:** Zoom In (+), Zoom Out (-), Reset View (ajustar a pantalla). | |
| - **Indicador:** Nivel de zoom actual (ej. 150%). | |
| ## Criterios de Aceptación (Gherkin) | |
| ### Escenario 1: Visualización inicial | |
| **Dado** un plano cargado correctamente | |
| **Cuando** entro al visor del proyecto | |
| **Entonces** la imagen se ajusta para verse completa en la pantalla (Fit to screen) | |
| ### Escenario 2: Zoom profundo | |
| **Dado** que estoy visualizando un plano | |
| **Cuando** uso la rueda del ratón o el gesto de "pinch" en tablet | |
| **Entonces** la imagen se amplía suavemente sin perder su posición relativa | |
| **Y** la calidad se mantiene aceptable (dependiendo de la resolución original) |
🧰 Tools
🪛 LanguageTool
[grammar] ~8-~8: Oración con errores
Context: ...alles - Titulo breve: Navegación en Visor - Prioridad: Alta (P1) - Estimación:...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~9-~9: Cambia la palabra o signo.
Context: ...ción en Visor - Prioridad: Alta (P1) - Estimación: 5 Puntos - **Dependencias:...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~10-~10: Oración con errores
Context: ...oridad:** Alta (P1) - Estimación: 5 Puntos - Dependencias: US-003 - **Orden de ejec...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~11-~11: Cambia la palabra o signo.
Context: ...n:** 5 Puntos - Dependencias: US-003 - Orden de ejecución: 4 - Estado: Pe...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~12-~12: Cambia la palabra o signo.
Context: ...as:** US-003 - Orden de ejecución: 4 - Estado: Pending ## Diseño de Pantalla...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~15-~15: Corrige la mayúscula.
Context: ...* 4 - Estado: Pending ## Diseño de Pantallas y UI ### 1. Lienzo del Visor (Canvas) ...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~17-~17: Corrige la mayúscula.
Context: ...ño de Pantallas y UI ### 1. Lienzo del Visor (Canvas) - Área Principal: Ocupa el...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~17-~17: Oración con errores
Context: ...antallas y UI ### 1. Lienzo del Visor (Canvas) - Área Principal: Ocupa el 100% de...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~17-~17: Oración con errores
Context: ...s y UI ### 1. Lienzo del Visor (Canvas) - Área Principal: Ocupa el 100% de la pa...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~18-~18: Elimina el espacio
Context: ...# 1. Lienzo del Visor (Canvas) - Área Principal: Ocupa el 100% de la pantalla menos el...
(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_ORTHOGRAPHY_SPACE)
[grammar] ~22-~22: Corrige la mayúscula.
Context: ...acidad de panning. ### 2. Controles de Navegación (Overlay) - Ubicación: Esquina infe...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~22-~22: Oración con errores
Context: ...nning. ### 2. Controles de Navegación (Overlay) - Ubicación: Esquina inferior dere...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~22-~22: Oración con errores
Context: ...### 2. Controles de Navegación (Overlay) - Ubicación: Esquina inferior derecha o ...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~24-~24: Aquí puede haber un error.
Context: ...squina inferior derecha o flotante. - Botones: Zoom In (+), Zoom Out (-), Reset View...
(QB_NEW_ES)
[grammar] ~24-~24: Agrega un espacio.
Context: ...erior derecha o flotante. - Botones: Zoom In (+), Zoom Out (-), Reset View (a...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~25-~25: Aquí puede haber un error.
Context: ...), Reset View (ajustar a pantalla). - Indicador: Nivel de zoom actual (ej. 150%). ## ...
(QB_NEW_ES)
[grammar] ~27-~27: Corrige la mayúscula.
Context: ...oom actual (ej. 150%). ## Criterios de Aceptación (Gherkin) ### Escenario 1: Visualizaci...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~29-~29: Cambia la palabra o signo.
Context: ... ### Escenario 1: Visualización inicial Dado un plano cargado correctamente **...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~30-~30: Cambia la palabra o signo.
Context: ... Dado un plano cargado correctamente Cuando entro al visor del proyecto *...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~31-~31: Cambia la palabra o signo.
Context: ...e Cuando entro al visor del proyecto Entonces la imagen se ajusta para ve...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~32-~32: Aquí puede haber un error.
Context: ... completa en la pantalla (Fit to screen) ### Escenario 2: Zoom profundo Dado que ...
(QB_NEW_ES)
[grammar] ~34-~34: Cambia la palabra o signo.
Context: ... screen) ### Escenario 2: Zoom profundo Dado que estoy visualizando un plano *...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~35-~35: Cambia la palabra o signo.
Context: ...Dado que estoy visualizando un plano Cuando uso la rueda del ratón o el g...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~36-~36: Cambia la palabra o signo.
Context: ...el ratón o el gesto de "pinch" en tablet Entonces la imagen se amplia suaveme...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~37-~37: Cambia la palabra o signo.
Context: ...avemente sin perder su posición relativa Y la calidad se mantiene aceptable (...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~38-~38: Aquí puede haber un error.
Context: ... (dependiendo de la resolución original) ### Escenario 3: Panning (Desplazamiento) **...
(QB_NEW_ES)
🤖 Prompt for AI Agents
In `@docs/user-stories/US-004-VisorInteractivo.md` around lines 8 - 38, Update the
Spanish diacritics: change the header string "Titulo breve:" to "Título breve:"
and in the Gherkin Scenario 2 replace "se amplia suavemente" with "se amplía
suavemente" (ensure the accented í in "amplía"); search for these exact phrases
("Titulo breve" and "se amplia suavemente") and apply the corrections
consistently in the document.
| ### [DB-004] Esquema Base de Datos: Invitaciones | ||
| - **Tipo:** Database | ||
| - **Propósito:** Gestión de tokens temporales de acceso. | ||
| - **Especificaciones Técnicas:** | ||
| - Definir modelo `Invitation`: `id`, `project_id` (FK), `email`, `token` (Unique), `expires_at`, `status`. | ||
| - Índice en columna `token` para búsqueda rápida. | ||
| - **Criterios de Aceptación:** | ||
| - Tabla creada con restricciones de unicidad. | ||
| - Relación con Project establecida. | ||
| - **Equipo Asignado:** Backend/DBA | ||
| - **Esfuerzo:** 2 pts | ||
|
|
||
| ### [BACK-004] Lógica de Tokens de Invitación | ||
| - **Tipo:** Backend Feature | ||
| - **Propósito:** Generar y validar enlaces de acceso público. | ||
| - **Especificaciones Técnicas:** | ||
| - Endpoint `POST /projects/:id/share`: Generar UUID único y guardar en DB `project.share_token`. | ||
| - Endpoint `GET /public/projects/:token`: Validar y devolver info básica del proyecto (read-only). | ||
| - **Criterios de Aceptación:** | ||
| - Token permite acceso a endpoints GET específicos sin cookie de sesión. | ||
| - **Equipo Asignado:** Backend | ||
| - **Esfuerzo:** 3 pts |
There was a problem hiding this comment.
Clarify the token storage model: Invitation table vs. project.share_token.
There's an inconsistency between DB-004 and BACK-004:
- DB-004 (lines 45-55) defines an
Invitationtable withproject_id,email,token,expires_at, andstatusfields. - BACK-004 (line 61) states "guardar en DB
project.share_token", implying the token is stored directly on the Project table.
These represent two different architectural approaches. Please clarify:
- Are both needed? (e.g., Invitation for email-based invites with expiration, and project.share_token for public anonymous sharing)
- Or should one approach be chosen?
If both are needed, the documentation should explicitly describe each use case. If only one is needed, remove the conflicting reference.
🧰 Tools
🪛 LanguageTool
[grammar] ~45-~45: Cambia la palabra o signo.
Context: ...004] Esquema Base de Datos: Invitaciones - Tipo: Database - Propósito: Gestió...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~46-~46: Cambia la palabra o signo.
Context: ...Datos: Invitaciones - Tipo: Database - Propósito: Gestión de tokens temporale...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~48-~48: Corrige la mayúscula.
Context: ...porales de acceso. - Especificaciones Técnicas: - Definir modelo Invitation: id, `proj...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~49-~49: Corrige la mayúscula.
Context: ..., project_id(FK),email, token(Unique),expires_at, status`. - Índice en...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~51-~51: Corrige la mayúscula.
Context: ... para búsqueda rápida. - Criterios de Aceptación: - Tabla creada con restricciones de unicid...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~54-~54: Cambia la palabra o signo.
Context: ...cida. - Equipo Asignado: Backend/DBA - Esfuerzo: 2 pts ### [BACK-004] Lógica...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~57-~57: Corrige la mayúscula.
Context: ...erzo:** 2 pts ### [BACK-004] Lógica de Tokens de Invitación - Tipo: Backend Featu...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~57-~57: Oración con errores
Context: ...pts ### [BACK-004] Lógica de Tokens de Invitación - Tipo: Backend Feature - Propósito:...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~58-~58: Agrega un espacio.
Context: ...gica de Tokens de Invitación - Tipo: Backend Feature - Propósito: Generar...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~58-~58: Cambia la palabra o signo.
Context: ...e Invitación - Tipo: Backend Feature - Propósito: Generar y validar enlaces de acceso p...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~59-~59: Agrega un espacio.
Context: ...Tipo: Backend Feature - Propósito: Generar y validar enlaces de acceso púb...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~60-~60: Corrige la mayúscula.
Context: ...de acceso público. - Especificaciones Técnicas: - Endpoint POST /projects/:id/share: Gen...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[style] ~61-~61: Considere alternativas para este anglicismo (recomendable sobre todo en contextos más formales).
Context: ...pecificaciones Técnicas:** - Endpoint POST /projects/:id/share: Generar UUID únic...
(POST)
[grammar] ~63-~63: Corrige la mayúscula.
Context: ... proyecto (read-only). - Criterios de Aceptación: - Token permite acceso a endpoints GET esp...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~65-~65: Corrige la mayúscula.
Context: ...íficos sin cookie de sesión. - Equipo Asignado: Backend - Esfuerzo: 3 pts ### [F...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~65-~65: Cambia la palabra o signo.
Context: ...e sesión. - Equipo Asignado: Backend - Esfuerzo: 3 pts ### [FRONT-005] Layou...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
🤖 Prompt for AI Agents
In `@docs/user-stories/US-005-AccesoInvitado.md` around lines 45 - 66, Clarify and
resolve the token storage inconsistency by explicitly stating whether both the
Invitation model and a project.share_token field are required or selecting one
approach: if both are needed, document distinct use cases (e.g., Invitation
model with fields id, project_id, email, token, expires_at, status for
email-based, expiring invites; project.share_token on Project for persistent
anonymous public share links) and update BACK-004 to reference the correct
storage for POST /projects/:id/share and GET /public/projects/:token; if only
one is needed, remove the conflicting reference and make DB-004 and BACK-004
consistently reference the chosen symbol (Invitation or project.share_token) and
describe token lifecycle, uniqueness, indexing and validation rules accordingly.
| ### [DB-005] Esquema Base de Datos: Colaboración | ||
| - **Tipo:** Database | ||
| - **Propósito:** Persistencia de elementos interactivos (Pines y Comentarios). | ||
| - **Especificaciones Técnicas:** | ||
| - Modelo `Pin`: `id`, `plan_id` (FK), `x_coord`, `y_coord`, `status` (OPEN/RESOLVED). | ||
| - Modelo `Comment`: `id`, `pin_id` (FK), `author_id` (FK), `content`, `created_at`. | ||
| - **Criterios de Aceptación:** | ||
| - Estructura soporta coordinadas (float/decimal). | ||
| - Relación 1:N entre Pin y Comment. | ||
| - **Equipo Asignado:** Backend/DBA | ||
| - **Esfuerzo:** 3 pts | ||
|
|
||
| ### [BACK-005] API Endpoints: Pines y Comentarios | ||
| - **Tipo:** Backend Feature | ||
| - **Propósito:** Persistencia de coordenadas y mensajes. | ||
| - **Especificaciones Técnicas:** | ||
| - `POST /layers/:id/pins`: { x, y, content }. | ||
| - `POST /pins/:id/comments`: { content }. | ||
| - Schema `Pin` (layer_id, x, y, status) y `Comment` (pin_id, content, user_id). | ||
| - **Criterios de Aceptación:** | ||
| - Pines se guardan ligados a un plano (Layer). | ||
| - Comentarios anidados al pin. |
There was a problem hiding this comment.
Unify Pin ownership and endpoints (plan vs layer).
Within this doc, DB-005 defines Pin.plan_id, but BACK-005 specifies /layers/:id/pins and layer_id. That conflicts with the API spec (/plans/{planId}/pins) and risks divergent backend/frontend/DB implementations. Please pick one canonical association (recommend plan-level with optional layer_id context) and update the ticket accordingly.
💡 Suggested documentation fix (plan-level pins with optional layer context)
- - `POST /layers/:id/pins`: { x, y, content }.
+ - `POST /plans/:planId/pins`: { x, y, content, layerId? }.
- - Schema `Pin` (layer_id, x, y, status) y `Comment` (pin_id, content, user_id).
+ - Schema `Pin` (plan_id, layer_id?, x, y, status) y `Comment` (pin_id, content, user_id).🧰 Tools
🪛 LanguageTool
[grammar] ~54-~54: Cambia la palabra o signo.
Context: ...005] Esquema Base de Datos: Colaboración - Tipo: Database - Propósito: Persis...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~55-~55: Cambia la palabra o signo.
Context: ...Datos: Colaboración - Tipo: Database - Propósito: Persistencia de elementos i...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~56-~56: Corrige la mayúscula.
Context: ...Persistencia de elementos interactivos (Pines y Comentarios). - **Especificaciones Té...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~56-~56: Corrige la mayúscula.
Context: ...ncia de elementos interactivos (Pines y Comentarios). - Especificaciones Técnicas: - ...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~57-~57: Corrige la mayúscula.
Context: ...es y Comentarios). - Especificaciones Técnicas: - Modelo Pin: id, plan_id (FK), `x_c...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~60-~60: Corrige la mayúscula.
Context: ...ontent, created_at`. - Criterios de Aceptación: - Estructura soporta coordinadas (float/de...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~61-~61: Cambia el adjetivo.
Context: ...de Aceptación:** - Estructura soporta coordinadas (float/decimal). - Relación 1:N entre...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ADJECTIVE)
[grammar] ~63-~63: Corrige la mayúscula.
Context: ...ión 1:N entre Pin y Comment. - Equipo Asignado: Backend/DBA - Esfuerzo: 3 pts ##...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
[grammar] ~63-~63: Cambia la palabra o signo.
Context: ...ment. - Equipo Asignado: Backend/DBA - Esfuerzo: 3 pts ### [BACK-005] API En...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_SPACE)
[grammar] ~66-~66: Oración con errores
Context: ... ### [BACK-005] API Endpoints: Pines y Comentarios - Tipo: Backend Feature - Propósito:...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_MULTITOKEN)
[grammar] ~67-~67: Agrega un espacio.
Context: ...dpoints: Pines y Comentarios - Tipo: Backend Feature - Propósito: Persist...
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~67-~67: Cambia la palabra o signo.
Context: ... Comentarios - Tipo: Backend Feature - Propósito: Persistencia de coordenadas y mensaje...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~68-~68: Agrega un espacio.
Context: ...Tipo: Backend Feature - Propósito: Persistencia de coordenadas y mensajes....
(QB_NEW_ES_OTHER_ERROR_IDS_MISSING_ORTHOGRAPHY_SPACE)
[grammar] ~69-~69: Cambia la palabra o signo.
Context: ...enadas y mensajes. - Especificaciones Técnicas: - POST /layers/:id/pins: { x, y, content }. - `POST /pins/:id/...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_OTHER)
[grammar] ~70-~70: Elimina el espacio
Context: ...cnicas:** - POST /layers/:id/pins: { x, y, content }. - `POST /pins/:id/com...
(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_ORTHOGRAPHY_SPACE)
[grammar] ~70-~70: Elimina el espacio
Context: ...POST /layers/:id/pins: { x, y, content }. - POST /pins/:id/comments: { cont...
(QB_NEW_ES_OTHER_ERROR_IDS_UNNECESSARY_ORTHOGRAPHY_SPACE)
[grammar] ~72-~72: Corrige el error ortográfico.
Context: ...T /pins/:id/comments: { content }. - Schema Pin(layer_id, x, y, status) yComme...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_SPELLING)
[grammar] ~73-~73: Corrige la mayúscula.
Context: ...id, content, user_id). - Criterios de Aceptación: - Pines se guardan ligados a un plano (Lay...
(QB_NEW_ES_OTHER_ERROR_IDS_REPLACEMENT_ORTHOGRAPHY_UPPERCASE)
🤖 Prompt for AI Agents
In `@docs/user-stories/US-006-Colaboracion.md` around lines 54 - 75, Unificar la
propiedad y endpoints de Pin: actualizar DB-005 y BACK-005 para usar
oficialmente plan-level ownership (reemplazar Pin.plan_id → Pin.plan_id como la
FK canónica) y hacer layer_id un campo opcional en el esquema; cambiar el
endpoint en BACK-005 de POST /layers/:id/pins a POST /plans/:planId/pins
(mantener soporte opcional para layer context en el payload), y asegurarse de
que los nombres de campo en la especificación del esquema (Pin: plan_id,
layer_id?, x, y, status; Comment: pin_id, content, user_id) y el endpoint POST
/pins/:id/comments reflejen esta decisión para evitar divergencias entre DB-005
y BACK-005.
Se añade documentación técnica que incluye:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.