docs: backend contract — auditoría + guía para el frontend nuevo - #53
Draft
turbillon50 wants to merge 1 commit into
Draft
docs: backend contract — auditoría + guía para el frontend nuevo#53turbillon50 wants to merge 1 commit into
turbillon50 wants to merge 1 commit into
Conversation
…uevo
Luis quiere reemplazar el frontend actual por uno nuevo (basado en
coding-agent-template de Vercel) y necesita "amarrar que todo esté en
orden" en el backend antes de la integración.
Este documento es la referencia única para conectar cualquier frontend:
§0. Verificación de V intacta — los 5 V_*.md (35KB system prompt v2
incluido), system-prompt.ts, tools.ts, BD tables, routing,
Hetzner v-server: todos confirmados presentes.
§2. /api/forge/run en detalle — el cerebro de V. Request shape, lista
completa de eventos SSE (text, tool_use_start, tool_use_result,
model_fallback, done, error) con snippet de integración mínima.
§3. Memoria y sesiones — /api/forge/active-session (clave para que
todos los devices compartan conversación) + /conversations
(rehidratación — sin esto V parece "empezar de cero").
§4-7. Resto de endpoints — projects, vault (operator/project),
GitHub helpers, e infrastructure de V.
§8. Tablas Neon — qué vive dónde (V owns: system_config,
conversations, knowledge_base, audit_events, skills, agent_*).
§9. Env vars requeridas — operacional, sin secrets en el doc.
§10. Inventario de 22+ tools categorizadas por Ring (0-3) + lista
explícita de archivos PROTEGIDOS que V no puede modificar.
§11. Checklist mínimo de integración para el frontend nuevo.
§12. Estado real del repo: tsc 0 errores, 30 endpoints, 8 migraciones,
todas las protecciones activas.
V no se toca. Solo documento.
https://claude.ai/code/session_01YD9ckFDdBjDhYB6aaH1HR4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Para qué
Luis va a integrar un frontend nuevo (basado en
vercel-labs/coding-agent-template). Antes de eso, amarrar el backend y dejar una referencia única para que la integración no se rompa.V intocada, como siempre. Solo es documentación + verificación.
Lo que verifica este PR
npx tsc --noEmitenmain→ 0 erroreslib/forge/system-prompt.tscon SENIOR_ENGINEER_DOCTRINElib/forge/tools.tscon 22+ tools cabledas (101 referencias aname:)lib/forge/v-server.tsQué hay en
docs/backend-contract.md12 secciones, ~420 líneas:
/api/forge/run— request/response shape completo + snippet de integración SSE mínimaactive-session(crítico para no duplicar V entre devices) +conversations(rehidratación)Línea roja respetada
NO toca:
lib/forge/*app/api/*migrations/*V_*.mddocsmiddleware.tsSOLO agrega
docs/backend-contract.md.Próximo paso
Cuando llegues con el frontend nuevo (vercel-labs/coding-agent-template adaptado), tu solo trabajo es:
app/(dashboard)/*ycomponents/*por el nuevoGenerated by Claude Code