hackers.pub Hall

The New Wing (ai)

ja· en· ko
If you're new hereThe wing for experimental AI features—image captions, translation, and the like.

Images get captions, long texts get summarized, posts get translated—as tools that lower the barrier to reading and writing, exactly four AI capabilities are at work.

And the way the line is drawn is the sight to see. On the moderation wall it's written: this is reference material for human moderators, not an automatic verdict. It only returns confidence and reasons. The judgment stays a human's work.

Highlights

  • Prompts are per-locale Markdown (ai/prompts/). They're picked up with readdir at import time, and the one closest to the request's language is negotiated
  • The dependency runs one way, models → ai. So ai keeps its own copy of CocProvision—a small sutra-copying to preserve the wing's independence

A passage from the sutra

const PROMPT_LANGUAGES: Locale[] = (
  await readdir(
    join(import.meta.dirname!, "prompts", "summary"),
    { withFileTypes: true },
  )
).map((f) => f.name.replace(/\.md$/, "")).filter(isLocale);
ai/summary.ts L10-L15— Reading the prompt shelf aloud at startup

Floor plan

ai/mod.ts
All of the exposed capabilities (four of them)
ai/moderation.ts
Confidence and reasons per clause. It passes no verdict
ai/summary.ts
A summary with locale negotiation
ai/prompts
The prompt shelf of per-locale Markdown

Neighboring rooms

Outside links