Files
kuentagym/website
dsantillan 90aa802980
Tests / test (push) Canceled after 0s
Publish Docker images / build (., ./web/Dockerfile, web) (push) Canceled after 0s
Publish Docker images / build (./api, ./api/Dockerfile, api) (push) Canceled after 0s
La segunda opinión: un juicio sobre tus números, con la probabilidad que trae
Preguntaste si se podía implementar Jev, y con qué API. Resulta que Jev se sirve por OpenCode Zen,
así que una sola cuenta cubre esto y cualquier otra cosa apuntada a ese gateway:

    POST https://opencode.ai/zen/v1/systemone   Bearer <clave>   model: jev-1.13

Y ahí está la razón de que valga la pena: Jev no es un modelo de chat. Le mandás un *estado* y
preguntas tipadas — sí/no (`noul`), opción (`choice`), rúbrica (`score`) — y contesta todas en una
sola petición con el valor **y la probabilidad que le puso**. "62% probable" se puede discutir;
"tomate una semana de descarga" no. Así que no entra por el Coach (que necesita *escribir*) y no se
fuerza dentro de su lista de proveedores: tiene su módulo, sus dos rutas y su tarjeta.

Qué hace. En Salud, arriba de la grilla, una tarjeta con cuatro respuestas: qué tan listo estás para
entrenar fuerte (nivel 1-5, con el número al lado), si la semana pide bajar carga (62% probable), qué
parte del cuerpo parece menos recuperada, y qué métrica de salud merece atención — esa última con la
última lectura de la métrica que nombró, para que "vigilá tu frecuencia en reposo" venga con el 62
que lo motivó. La hoja detrás del ⓘ dice a dónde va y exactamente qué se envía, con el mismo resumen
que devuelve el servidor.

Lo que sale, y lo que no. Se decide en `api/jev.js` y son agregados: una semana de cada métrica por
campo como la escribió el teléfono, series por parte del cuerpo de 4 semanas y de la última, sesiones,
días desde la última, RPE medio, estancamientos *por nombre de ejercicio*, el último pesaje y su
cambio. Ningún identificador: ni perfil, ni nombre, ni títulos de entrenamientos, ni ids de
ejercicios, ni chat — hay un test que lo afirma sobre el JSON, porque es una promesa que hacen los
docs y nada más la miraba. La única excepción es deliberada y está documentada: la nota de
*limitaciones* del cuestionario del Coach, porque "hombro malo" cambia la respuesta. (Los títulos sí
estuvieron un rato ahí: los saqué al escribir ese test, y el test se quedó.)

Un juicio no es una instrucción, y el código lo trata así. Cada respuesta se muestra con su
probabilidad; una pregunta que el modelo no contestó se muestra como no contestada, nunca como un
cero; un nivel que no habíamos ofrecido se marca en vez de disfrazarse de propio; y si los datos
cambiaron desde que se pidió (una sesión registrada, una noche que llegó) la tarjeta lo dice en lugar
de seguir pareciendo actual. Tampoco corre por temporizador: cuesta una petición, así que pasa cuando
alguien aprieta *Preguntar*, con cupo por perfil y por día y un piso de diez minutos aplicados en el
servidor, no en la pantalla.

El Coach, además, lo recibe como `secondOpinion` en su payload **solo si tiene menos de seis horas**,
como evidencia con confianza adjunta para citar en `why`, nunca como una orden ni como un cambio de
plan. Es la mitad que faltaba de "y el Coach escribe con eso".

El lector de respuestas es tolerante a propósito: el contrato de la petición está documentado, la
respuesta no la vimos nunca del servicio real, así que acepta las formas plausibles
(`answers`/`results`, `option`/`answer`/`choice`, `probability` o una distribución sobre los niveles),
normaliza lo que encuentra y devuelve `null` por lo que no puede leer. El cuerpo crudo queda guardado
al lado del parseado (y sale con `?raw=1`): la primera llamada real se puede mirar, y una forma mal
adivinada es un arreglo, no un misterio.

Dos cosas que encontré escribiendo esto y que quedan arregladas: una variable de entorno vacía se
leía como **cero** (`Number('')` pasa un chequeo ingenuo), así que un cupo sin configurar era "cero
peticiones" — un feature que parece configurado y no funciona nunca; y agregar la palabra *Back*
para la espalda redefinió el botón *Atrás* de la app a "Espalda", porque en un objeto literal la
última clave gana y nada lo dice. El catálogo de español tiene ahora un test que falla si una clave
se escribe dos veces, mutación comprobada.

Cobertura: 11 tests del módulo (el estado, las preguntas, cada forma de respuesta, la promesa de
privacidad, el cupo), 5 de las rutas contra un gateway de mentira y el servidor real, 6 del modelo de
vista en el frontend y 5 de render por la tarjeta real. API 259 en verde, frontend 1696, build OK.
2026-09-23 16:36:47 -04:00
..

KuentaGYM website

Source of the project website — plain hand-written HTML/CSS/JS, no build step, served as static files. It is not part of any pipeline here: .gitea/workflows/ builds and pushes the container images and nothing else, and this site is not deployed for this fork. Every page's canonical and og: URLs assume it is served alongside the app at https://gym.dploy.lol.

Not in this folder (added when the pages are published):

  • img/ — built by build-images.sh <dist>/img: the five screenshots from ../assets/screenshots/ as PNG plus WebP at 480/600/1170 px (served through <picture>), banner.png, and social.jpg (1200×630, the og:image on every page)
  • icon-180.png / icon-512.png — copied from ../frontend/public/ (the same icons the PWA uses, so the browser tab, home screen and app all match)

There is no KuentaGYM.apk and no demo/ here. This fork publishes no APK, so the mobile app is whatever you build from ../frontend yourself (see ../docs/MOBILE.md); there is no public demo instance, so nothing is framed or linked as one. Both belonged to the upstream project, and the sections and links that promised them are gone.

Navigation is a topic rail (.side): one title/subtitle list of everything on the site, a fixed column beside the page from 1300 px up and the hamburger sheet below that, with a scrollspy lighting the section under the reader. The top bar keeps only the brand, the source repository and the "Get started" button.

site.js carries the pieces that are left, each failing soft so the page is complete without any of them: the two panel controllers (header sheet, contents drawer), the scrollspy and the chapter groups, the scroll reveals, the feature-rail arrows and the hero intro handoff. It makes no third-party request. The repo star/issue counts, the Discord member count and the About page's release timeline were removed with the upstream links they belonged to: they read api.github.com and discord.com, which know nothing about this fork's repository — and the About page's timeline is now static, marked up in the HTML.

Every page starts with a "Skip to content" link (.skip, visible on focus) that targets <main id="main">. Screenshots change under the same file name, and nginx caches images for seven days — bump the name if a new one must show up at once.

api.html is the one generated file in here: node scripts/build-api-docs.mjs rewrites it from ../api/openapi.yaml. Edit the spec, re-run the script, commit both — never hand-edit api.html, the next run overwrites it. The page is static HTML in this site's own design (no Swagger UI, nothing rendered at view time); the only script of its own it carries is the contents drawer and the card expand/collapse.

api.html is generated — never edit it by hand. Its whole chrome (nav, nav sheet, contents rail, footer, the "Get started" button, the no-analytics comment, the cache-busters, the spec download link) lives in scripts/build-api-docs.mjs, outside this folder, which renders the page from ../api/openapi.yaml. Change the generator, then re-run node scripts/build-api-docs.mjs; anything typed into api.html is overwritten wholesale. Keep the four pages' ?v=N values in step when styles.css or site.js changes — three pages carry their own tags, and the generator writes api.html's.

styles.css and site.js are cache-busted with ?v=N — nginx serves the site with no-cache, must-revalidate, but the query bump is what saves a Cloudflare edge from handing out an old stylesheet with new markup. Bump it on every change.