# Project export: NEVERCASE

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: OpenAI Build Week
- Tagline: Start with photos that catch your eye, and investigate an incident with an AI detective.
- Devpost: https://devpost.com/software/nevercase
- GitHub: https://github.com/Dw3P/nevercase
- Demo: https://nevercase-host01-20260714.kazuomi-kuguiya.chatgpt.site/
- Video: https://www.youtube.com/embed/wP6sCi-ouJs?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 1 GitHub contributor(s) — Dw3P (108 commits)

## Devpost submission (written by the team)

### Inspiration

Generative AI is now widely used to create images, dialogue, code, summaries, and other things whose forms are already easy to imagine. But can generative AI create something that does not yet exist? That question gave rise to NEVERCASE. A kettle, an abandoned calendar page, a row of plants, or a sock left in an unusual place may all seem like parts of an ordinary scene. Yet when we take another careful look, we often discover small details that feel slightly out of place. Connect several of those subtle inconsistencies, and they may become evidence of a great secret, an impossible disappearance, or an incident that never actually happened. I created NEVERCASE in the hope that it would become a short creative game in which players could look closely at their surroundings, invent mysteries, and enjoy the act of imagination itself.

### What it does

NEVERCASE is a mystery game built from photographs supplied by the player. The player begins by submitting three photographs of things that feel slightly strange or interesting. Detective Vellum examines details that can actually be observed in the images and constructs an unlikely—but logically traceable—incident connecting all three. The game does not select a prewritten answer. Instead, it performs the following process: Extracts grounded observations, ambiguities, arrangements, and relationships from the opening photographs. Builds several possibilities specific to that case. Locks the candidate set without choosing a final truth. Selects an unlikely but evidence-grounded lead. Asks the player for two additional photographs through Vellum’s poetic and slightly cryptic investigative suggestions. Re-evaluates the surviving possibilities after each new photograph. Presents Vellum’s final theory. The player can accept Vellum’s conclusion or object with a theory of their own. An objection is not judged through keyword matching or comparison with a secret model answer. GPT-5.6 checks whether the player’s theory can be reconstructed from the saved observations and relationships. If the player’s theory is evidence-grounded and also more imaginative than Vellum’s conclusion, it becomes the ending. The case closes with Vellum’s verdict and a final investigation report. For a faster judging experience, Prepared Investigation provides five preselected photographs. Only the photographs are prepared. Image analysis, candidate generation, Detective reasoning, objection judgment, and the ending are all generated during play through live GPT inference via the API. How I built it I began by discussing the idea with ChatGPT. I then created the documentation and task list, and used them as the basis for implementing the project together with Codex. Perhaps because ChatGPT is so good at producing correct answers, it was difficult to develop a system that could invent incidents that do not exist at all, and it took considerable effort to make the concept work well. The result is a Cloudflare Worker-compatible ChatGPT Sites project built with React, Next.js, vinext, and TypeScript. How I used Codex I used Codex throughout the Build Week implementation period. Codex played an active role in almost every part of the project: Inspecting and understanding the evolving repository. Translating the game rules into production state transitions. Implementing the staged inference runtime. Writing unit, integration, security, and end-to-end tests. Diagnosing failures in the hosted environment. Finding retry loops and fallback paths that could hide real AI failures. Reviewing privacy and secret-data boundaries. Building the Accept/Object interaction and objection judgment flow. Adding the Prepared Investigation path. Verifying data deletion and replay behavior. Preparing the public repository and submission documentation. Of course, the product principles were human decisions. These included not predetermining the incident, having Vellum prefer a sensational but logically defensible theory over a mundane one, and giving the player a genuine opportunity to defeat the AI with a better theory. Challenges I ran into The hardest challenge was balancing imagination with evidence. If the prompts were too conservative, Vellum merely described what was visible: a sock became a sock repair, and a calendar became scheduling. That was accurate, but it was not interesting. If the prompts encouraged unrestricted imagination, the result could become disconnected from the photographs. The solution was to preserve strict, grounded observations in the Evidence Atlas while allowing a separate narrative layer to introduce unlikely actors, intentions, and events. A theory may make a large imaginative leap, but the chain connecting that leap to the photographs must remain understandable. Reliability was another challenge. A complete case requires several structured model calls, but long-running request chains caused timeouts, duplicate retries, and unnecessary API usage. Dividing the flow into durable stages with saved checkpoints made failures visible and recoverable. It is still far from perfect, however. I also learned that strict prose validators can actually make a generative game less reliable. If an entire inference is rejected simply because a line of dialogue is slightly imperfect in style, the game can stop. I therefore moved most stylistic control into the prompts and limited hard validation to structural requirements and safety boundaries. Accomplishments I am proud of I am proud that NEVERCASE made it beyond a mere technical demonstration and became a complete product experience, even if an imperfect one. I am also proud that I managed to build it on my own in just eight days. What I learned I learned that building a product takes more than simply giving instructions. Video production has become surprisingly accessible. One highlight was using the HyperFrames plugin in the ChatGPT app to add subtitles and edit them live while visually reviewing the results. Codex’s image generation still struggles with anatomical details, particularly distinguishing left from right arms and hands. I found that it is often more efficient to work with the model’s learned tendencies—for example, by repositioning elements in the reference image before requesting a correction from a right hand to a left hand. Carefully planning and dividing implementation work into smaller tasks has both advantages and drawbacks. In particular, validation work can become locally optimized, leading to overengineering and unintended side effects elsewhere in the system.

### What's next

If I continue developing NEVERCASE, I would like to add: Direct capture from a device camera. Broader smartphone and browser testing. Longer investigations with more evidence turns. Measured evaluation of output quality, latency, and API cost. Automatic retention limits and deletion auditing. Stronger recovery from occasional inference failures. Additional Detective presentation, animation, and audio. The Build Week version is intentionally short: three opening photographs, two additional evidence turns, and one final confrontation with Vellum. A future version could support longer cases while continuing to preserve multiple possibilities until the evidence truly narrows them.

## README (from the GitHub repository)

No README available.

## Detected evidence (automated analysis)

Indexed codebase: 124 recognized source files, 2379 KB.
- CSS (language) — detected in the code
- Next.js (technology) — detected in the code
- React (technology) — detected in the code
- SQL (language) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code

## Codebase structure (from repository index)

### Files (120 of 247)

```
.gitignore
ASSETS.md
DEVELOPMENT.md
docs/00-core-game-principle.md
docs/01-product-brief.md
docs/03-user-experience.md
docs/04-game-system.md
docs/05-evidence-atlas.md
docs/07-ai-orchestration.md
docs/09-safety-and-privacy.md
docs/15-detective-gideon-vellum-character-bible.md
docs/16-detective-art-and-ui-direction.md
docs/README.md
LICENSE
README.ja.md
README.md
SECURITY.md
work/sites-spike/.env.example
work/sites-spike/.gitignore
work/sites-spike/.openai/hosting.json
work/sites-spike/app/api/cases/[caseId]/accept/route.ts
work/sites-spike/app/api/cases/[caseId]/evidence/[evidenceId]/image/route.ts
work/sites-spike/app/api/cases/[caseId]/evidence/[evidenceId]/replace/route.ts
work/sites-spike/app/api/cases/[caseId]/evidence/route.ts
work/sites-spike/app/api/cases/[caseId]/field-assignment/fallback/route.ts
work/sites-spike/app/api/cases/[caseId]/object/route.ts
work/sites-spike/app/api/cases/[caseId]/process/route.ts
work/sites-spike/app/api/cases/[caseId]/report/route.ts
work/sites-spike/app/api/cases/[caseId]/route.ts
work/sites-spike/app/api/cases/route.ts
work/sites-spike/app/api/investigation-dependencies.ts
work/sites-spike/app/api/safe-failure-diagnostic.ts
work/sites-spike/app/case-audio.tsx
work/sites-spike/app/case-construction/index.ts
work/sites-spike/app/case-construction/service.ts
work/sites-spike/app/chatgpt-auth.ts
work/sites-spike/app/detective/index.ts
work/sites-spike/app/detective/turn-orchestration.ts
work/sites-spike/app/e2e/candidate-fixture-core.ts
work/sites-spike/app/e2e/fixture-core.ts
work/sites-spike/app/globals.css
work/sites-spike/app/health.ts
work/sites-spike/app/hosted-continuation.ts
work/sites-spike/app/images/safe-image-intake.ts
work/sites-spike/app/images/upload-payload.ts
work/sites-spike/app/investigate/own-photos/page.tsx
work/sites-spike/app/investigate/prepared/page.tsx
work/sites-spike/app/investigation-continuation.ts
work/sites-spike/app/investigation-runtime.ts
work/sites-spike/app/investigation-shell.tsx
work/sites-spike/app/layout.tsx
work/sites-spike/app/page.tsx
work/sites-spike/app/projections/candidate-stage-projections.ts
work/sites-spike/app/projections/case-projections.ts
work/sites-spike/app/projections/index.ts
work/sites-spike/app/projections/investigation-projections.ts
work/sites-spike/app/repositories/case-deletion.ts
work/sites-spike/app/repositories/case-repository.ts
work/sites-spike/app/repositories/evidence-extraction-repository.ts
work/sites-spike/app/repositories/image-repository.ts
work/sites-spike/app/repositories/index.ts
work/sites-spike/app/repositories/repository-result.ts
work/sites-spike/app/retry-policy.ts
work/sites-spike/candidates/control.ts
work/sites-spike/candidates/index.ts
work/sites-spike/candidates/lead-selection.ts
work/sites-spike/catalog/candidate-construction-frames.ts
work/sites-spike/catalog/controlled-catalog.ts
work/sites-spike/catalog/index.ts
work/sites-spike/catalog/matching.ts
work/sites-spike/catalog/schema.ts
work/sites-spike/cloudflare-runtime.d.ts
work/sites-spike/crypto/web-crypto.ts
work/sites-spike/domain/canonical-case.ts
work/sites-spike/domain/case-reducer.ts
work/sites-spike/domain/index.ts
work/sites-spike/drizzle.config.ts
work/sites-spike/drizzle/0000_material_corsair.sql
work/sites-spike/drizzle/meta/_journal.json
work/sites-spike/drizzle/meta/0000_snapshot.json
work/sites-spike/eslint.config.mjs
work/sites-spike/inference/case-keeper/deterministic-comparison.ts
work/sites-spike/inference/case-keeper/index.ts
work/sites-spike/inference/case-keeper/local-fallbacks.ts
work/sites-spike/inference/case-keeper/objection-matcher.ts
work/sites-spike/inference/case-keeper/parser.ts
work/sites-spike/inference/case-keeper/prompt.ts
work/sites-spike/inference/case-keeper/schema.ts
work/sites-spike/inference/case-keeper/service.ts
work/sites-spike/inference/codex/adapter.ts
work/sites-spike/inference/codex/config.ts
work/sites-spike/inference/codex/index.ts
work/sites-spike/inference/detective/index.ts
work/sites-spike/inference/detective/local-action-composer.ts
work/sites-spike/inference/detective/local-hypothesis-fallback.ts
work/sites-spike/inference/detective/parser.ts
work/sites-spike/inference/detective/prompt.ts
work/sites-spike/inference/detective/schema.ts
work/sites-spike/inference/detective/service.ts
work/sites-spike/inference/evidence-extractor/acquisition-spec.ts
work/sites-spike/inference/evidence-extractor/batched-local.ts
work/sites-spike/inference/evidence-extractor/constants.ts
work/sites-spike/inference/evidence-extractor/index.ts
work/sites-spike/inference/evidence-extractor/merge.ts
work/sites-spike/inference/evidence-extractor/persistence.ts
work/sites-spike/inference/evidence-extractor/prompt.ts
work/sites-spike/inference/evidence-extractor/retrieval.ts
work/sites-spike/inference/evidence-extractor/schema.ts
work/sites-spike/inference/evidence-extractor/service.ts
work/sites-spike/inference/evidence-extractor/stage-schema.ts
work/sites-spike/inference/fixture/adapter.ts
work/sites-spike/inference/fixture/fingerprint.ts
work/sites-spike/inference/fixture/index.ts
work/sites-spike/inference/fixture/loader.ts
work/sites-spike/inference/fixture/manifest.ts
work/sites-spike/inference/fixture/types.ts
work/sites-spike/inference/openai/adapter.ts
work/sites-spike/inference/openai/config.ts
work/sites-spike/inference/openai/index.ts
work/sites-spike/next.config.ts
[127 more files omitted for size]
```

### Dependencies

- work/sites-spike/package.json: @cloudflare/vite-plugin@1.37.1, @tailwindcss/postcss@4.2.1, @types/node@22.19.19, @types/react@19.2.14, @types/react-dom@19.2.3, @vitejs/plugin-react@6.0.2, @vitejs/plugin-rsc@0.5.26, drizzle-kit@0.31.10, drizzle-orm@0.45.2, eslint@9.39.4, eslint-config-next@16.2.6, next@16.2.6, react@19.2.6, react-dom@19.2.6, react-server-dom-webpack@19.2.6, tailwindcss@4.2.1, typescript@5.9.3, vinext@0.0.50, vite@8.0.13, wrangler@4.92.0

### Recent commits (newest first)

- Remove Project Story files
- Add Japanese Project Story and refine translation
- Correct Project Story translation
- Add English Devpost Project Story
- Sync English and Japanese README submission status
- Synchronize English README with Japanese copy
- Record repository publication audit
- Correct background music attribution
- Exclude licensed audio from public source
- Prepare repository for public review
- Merge remote-tracking branch 'origin/main'
- Ignore local play-test photographs
- Initial commit
- Prepare Build Week submission README
- Freeze Build Week release candidate
- Constrain keeper evidence references
- Add prepared investigation path and refine Detective output
- Add post-report replay and data deletion controls
- Allow bounded structured-output repair and safe retry timing
- Add explicit transport recovery and reconcile retries

## Key source files (fetched from GitHub, selected and truncated for size)

Source contents could not be fetched from GitHub right now.

[108 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]