feat: MVP-2 completion - search, quick add, backlinks, guided forms
## Search & Retrieval - Improved search ranking with scoring (title match, favorites, recency) - Highlight matches with excerpt extraction - Fuzzy search with string-similarity - Unified noteQuery function ## Quick Capture - Quick Add API (POST /api/notes/quick) with type prefixes - Quick add parser with tag extraction - Global Quick Add UI (Ctrl+N shortcut) - Tag autocomplete in forms ## Note Relations - Automatic backlinks with sync on create/update/delete - Backlinks API (GET /api/notes/[id]/backlinks) - Related notes with scoring and reasons ## Guided Forms - Type-specific form fields (command, snippet, decision, recipe, procedure, inventory) - Serialization to/from markdown - Tag suggestions based on content (GET /api/tags/suggest) ## UX by Type - Command: Copy button for code blocks - Snippet: Syntax highlighting with react-syntax-highlighter - Procedure: Interactive checkboxes ## Quality - Standardized error handling across all APIs - Integration tests (28 tests passing) - Unit tests for search, tags, quick-add Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
268
backlog/recall_mvp_2_backlog.md
Normal file
268
backlog/recall_mvp_2_backlog.md
Normal file
@@ -0,0 +1,268 @@
|
||||
# 📌 Recall — Backlog MVP-2
|
||||
|
||||
## 🎯 Objetivo
|
||||
Convertir el MVP actual en una herramienta que permita **capturar rápido y recuperar conocimiento en segundos**.
|
||||
|
||||
---
|
||||
|
||||
# 🧩 EPIC 1 — Búsqueda y recuperación
|
||||
|
||||
## [P1] Mejorar ranking de búsqueda
|
||||
**Objetivo:** resultados relevantes ordenados inteligentemente
|
||||
|
||||
**Alcance**
|
||||
- Crear `src/lib/search.ts`
|
||||
- Implementar scoring:
|
||||
- match título exacto/parcial
|
||||
- match contenido
|
||||
- favoritos/pin
|
||||
- recencia
|
||||
- Aplicar en `/api/search` y `/api/notes`
|
||||
|
||||
**Criterios de aceptación**
|
||||
- Coincidencias en título aparecen primero
|
||||
- Favoritos/pin influyen en ranking
|
||||
- Resultados ordenados por score
|
||||
|
||||
**Archivos**
|
||||
- `src/lib/search.ts`
|
||||
- `src/app/api/search/route.ts`
|
||||
- `src/app/api/notes/route.ts`
|
||||
|
||||
---
|
||||
|
||||
## [P1] Resaltado de términos
|
||||
**Objetivo:** mejorar lectura de resultados
|
||||
|
||||
**Alcance**
|
||||
- Helper `highlightMatches`
|
||||
- Mostrar extracto con contexto
|
||||
|
||||
**Criterios**
|
||||
- Términos resaltados correctamente
|
||||
- Extracto relevante
|
||||
|
||||
---
|
||||
|
||||
## [P1] Búsqueda fuzzy básica
|
||||
**Objetivo:** tolerar errores de escritura
|
||||
|
||||
**Alcance**
|
||||
- Matching parcial y aproximado en título/tags
|
||||
|
||||
**Criterios**
|
||||
- "dokcer" encuentra "docker"
|
||||
- No degrada rendimiento
|
||||
|
||||
---
|
||||
|
||||
## [P1] Unificar lógica de búsqueda
|
||||
**Objetivo:** evitar duplicación
|
||||
|
||||
**Alcance**
|
||||
- Extraer lógica a `note-query.ts`
|
||||
|
||||
**Criterios**
|
||||
- Mismo resultado en ambos endpoints
|
||||
|
||||
---
|
||||
|
||||
# ⚡ EPIC 2 — Captura rápida
|
||||
|
||||
## [P1] Quick Add API
|
||||
**Objetivo:** crear notas desde texto único
|
||||
|
||||
**Alcance**
|
||||
- Endpoint `POST /api/notes/quick`
|
||||
- Parsear tipo y tags
|
||||
|
||||
**Criterios**
|
||||
- Prefijos funcionan (`cmd:` etc)
|
||||
- Tags se crean automáticamente
|
||||
|
||||
---
|
||||
|
||||
## [P1] Parser Quick Add
|
||||
**Objetivo:** separar lógica de parsing
|
||||
|
||||
**Alcance**
|
||||
- `src/lib/quick-add.ts`
|
||||
|
||||
**Criterios**
|
||||
- Tests unitarios
|
||||
- Normalización de tags
|
||||
|
||||
---
|
||||
|
||||
## [P1] UI Quick Add global
|
||||
**Objetivo:** captura instantánea
|
||||
|
||||
**Alcance**
|
||||
- Componente global input
|
||||
- Submit con Enter
|
||||
|
||||
**Criterios**
|
||||
- Disponible en toda la app
|
||||
- Feedback visual
|
||||
|
||||
---
|
||||
|
||||
## [P1] Autocomplete de tags
|
||||
**Objetivo:** evitar duplicados
|
||||
|
||||
**Alcance**
|
||||
- Endpoint `/api/tags`
|
||||
- Sugerencias en formulario
|
||||
|
||||
**Criterios**
|
||||
- Tags sugeridos correctamente
|
||||
- No duplicación
|
||||
|
||||
---
|
||||
|
||||
# 🧠 EPIC 3 — Relación entre notas
|
||||
|
||||
## [P1] Notas relacionadas 2.0
|
||||
**Objetivo:** relaciones útiles
|
||||
|
||||
**Alcance**
|
||||
- Mejorar `related.ts`
|
||||
- Score por tags, tipo, texto
|
||||
|
||||
**Criterios**
|
||||
- Mostrar razón de relación
|
||||
- Top resultados relevantes
|
||||
|
||||
---
|
||||
|
||||
## [P1] Backlinks automáticos
|
||||
**Objetivo:** navegación entre notas
|
||||
|
||||
**Alcance**
|
||||
- Detectar menciones
|
||||
- Endpoint backlinks
|
||||
|
||||
**Criterios**
|
||||
- Relación bidireccional
|
||||
|
||||
---
|
||||
|
||||
## [P1] Links [[nota]]
|
||||
**Objetivo:** crear conocimiento conectado
|
||||
|
||||
**Alcance**
|
||||
- Autocomplete en editor
|
||||
- Render como enlace
|
||||
|
||||
**Criterios**
|
||||
- Navegación funcional
|
||||
|
||||
---
|
||||
|
||||
# 🧩 EPIC 4 — Plantillas
|
||||
|
||||
## [P2] Plantillas inteligentes
|
||||
**Objetivo:** acelerar creación
|
||||
|
||||
**Alcance**
|
||||
- Expandir `templates.ts`
|
||||
|
||||
**Criterios**
|
||||
- Template por tipo
|
||||
- No sobrescribe contenido
|
||||
|
||||
---
|
||||
|
||||
## [P2] Campos asistidos
|
||||
**Objetivo:** mejorar UX
|
||||
|
||||
**Alcance**
|
||||
- Inputs guiados por tipo
|
||||
|
||||
**Criterios**
|
||||
- Serialización a markdown
|
||||
|
||||
---
|
||||
|
||||
# 🧪 EPIC 5 — UX por tipo
|
||||
|
||||
## [P2] Vista command
|
||||
- Botón copiar
|
||||
|
||||
## [P2] Vista snippet
|
||||
- Syntax highlight
|
||||
|
||||
## [P2] Checklist procedure
|
||||
- Check interactivo
|
||||
|
||||
---
|
||||
|
||||
# 🏷️ EPIC 6 — Tags
|
||||
|
||||
## [P1] Normalización de tags
|
||||
**Objetivo:** evitar duplicados
|
||||
|
||||
**Alcance**
|
||||
- lowercase + trim
|
||||
|
||||
**Criterios**
|
||||
- Tags únicos consistentes
|
||||
|
||||
---
|
||||
|
||||
## [P2] Sugerencias de tags
|
||||
**Objetivo:** mejorar captura
|
||||
|
||||
**Alcance**
|
||||
- Endpoint `/api/tags/suggest`
|
||||
|
||||
---
|
||||
|
||||
# 🧪 EPIC 7 — Calidad
|
||||
|
||||
## [P1] Tests unitarios
|
||||
- search
|
||||
- quick-add
|
||||
- tags
|
||||
|
||||
## [P1] Tests integración
|
||||
- APIs principales
|
||||
|
||||
## [P2] Manejo de errores API
|
||||
- formato estándar
|
||||
|
||||
---
|
||||
|
||||
# 🗺️ Orden de ejecución
|
||||
|
||||
## Sprint 1
|
||||
- Ranking búsqueda
|
||||
- Quick Add (API + parser + UI)
|
||||
- Normalización tags
|
||||
- Tests base
|
||||
|
||||
## Sprint 2
|
||||
- Autocomplete tags
|
||||
- Relacionadas
|
||||
- Backlinks
|
||||
- Links [[nota]]
|
||||
|
||||
## Sprint 3
|
||||
- Highlight
|
||||
- Fuzzy search
|
||||
- Templates
|
||||
|
||||
## Sprint 4
|
||||
- UX tipos
|
||||
- Tags suggest
|
||||
- API errors
|
||||
|
||||
---
|
||||
|
||||
# ✅ Definición de Done
|
||||
|
||||
- Código testeado
|
||||
- API consistente
|
||||
- UI usable sin errores
|
||||
- No regresiones en CRUD existente
|
||||
|
||||
Reference in New Issue
Block a user