Another observed failure: solution invents an exotic, unclued backstory
(astronaut returning from a space mission) to justify the twist, and repurposes
a mundane object (a nightstand hourglass) as something physically impossible
(running for three weeks) without the teaser ever flagging it as special.
Add an Occam's-razor rule plus a prop-plausibility rule, with a worked
bad-example pair.
Another observed failure mode: solutions resolving on an unverifiable mood
swing ("she realized she didn't want to leave") propped up by a convenient
coincidence, instead of a concrete fact a player could reach via yes/no
questions. Add an explicit rule plus a worked bad-example contrast.
Generated stories were sometimes incoherent or implausible (teasers claiming
things that didn't literally happen, unresolved details, forced twists).
Add explicit coherence/plausibility rules, a worked example, and lower
temperature from 1 to 0.85 to reduce randomness without killing variety.
Players can now submit a voluntary 1-5 difficulty rating after a story
ends (POST /api/stories/:id/ratings), stored in data/ratings.json. A new
reclassifyDifficulty script (wired to a weekly systemd timer) averages
those ratings and adjusts a story's difficulty band once it has enough
votes. The progressive hint system is removed end-to-end (schema, Gemini
prompt/response schema, generation instructions), and the Gemini prompt
is rewritten in Peninsular Spanish with an explicit instruction to
generate story content in Spain Spanish rather than any LatAm variant.
Also translates remaining Spanish code comments/error strings to English
and updates the backend README and systemd units accordingly.
Node/Express backend generates 5 lateral-thinking mystery stories a day via
Gemini and serves the latest batch; React/Vite frontend (Capacitor-wrapped
for Android) plays them pass-and-play style, falling back to a bundled set
of 16 original stories when the backend has nothing new or is unreachable.
Includes systemd/nginx deploy config for a Docker-less Debian LXC.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>