Files
infiplot-web/lib/engine/prompts/segments/writer/style-base.ts
T
Zonghao Yuan 0e4c2ebef4 feat(engine): merge cloudflare-migration — paradigm D engine, BYOK proxy, story persistence (#95)
Squash-merge the cloudflare-migration branch (7 commits by Kai ki) into
staging with conflict resolution, feature integration, and bug fixes.

Engine:
- Paradigm D: single-stream Writer replacing dual-phase Plan/Beats
- Delete Architect agent; story bible generated via Writer <plan> tag
- Modular prompt architecture (segments/registry/builder)
- StreamRouter for tagged stream splitting (<plan>/<story>/<choices>)

Infrastructure:
- Cloudflare Workers deployment (wrangler.jsonc, OpenNext adapter)
- D1 database schema + Drizzle ORM (scaffolded, not yet active)
- R2 storage helpers (scaffolded, not yet active)
- Story persistence API routes + client-side persistence

BYOK (Bring Your Own Key):
- /api/llm/user-proxy with SSRF-protected LLM proxy (+ requireUser auth)
- CORS-aware fetch in ai-client: auto-detect CORS failure, fallback to
  server proxy transparently via OpenAI SDK custom fetch
- BYO config support added to classify-freeform and vision routes
- SettingsModal CORS privacy notice (keys never logged/stored)

SSE streaming:
- engineClient.ts: fetchSSE helper for progressive scene events
- startSession/requestScene accept optional emit callback
- Fix SSE error event field name (error → message) in scene/start routes

i18n integration:
- Wire buildLanguageDirective into paradigm D's prompt builder
- Update corsNotice i18n keys (zh-CN/en/ja) with CORS proxy privacy text
- Preserve Session.language + LanguageSwitcher from i18n commit

Co-authored-by: Kai ki <155355644+zbf1009@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-18 18:05:38 +08:00

42 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { PromptSegment } from "../../types";
export const WRITER_STYLE_BASE: PromptSegment = {
id: "writer-style-base",
name: "文风基准",
type: "style-guideline",
agent: "writer",
zone: "stable",
order: 110,
enabled: true,
editable: true,
category: "文风",
content: `═══════════════════════════════════════════════════════════════════
风格准则(对白与叙事的底线标准)
═══════════════════════════════════════════════════════════════════
- 避免对白中出现任何具体数值或数字
- **禁止用括号()或破折号——进行任何形式的解释说明**
- 不得对角色的声音/语气/眼神/视线进行任何直接或间接描写(声音归 lineDelivery,视线归 pose
- 对白采用直接引语,不加说明式的动作插入
- 以丰富细腻的白描代替单调陈述或解释,避免直给结论的形容词或副词、用概略性语言一笔带过
- 文字的核心是**可观察的、可直感的**——直接呈现角色的行动和对白,避免以作者视角进行解读或阐释
- 不得描写任何不存在的细节,不得无中生有(如拂去不存在的灰尘,拍了拍不存在的衣服褶皱)
- 将解读空间完全交给读者——避免描述角色言行神态背后的动机或内涵
- 详略得当,主次分明
- 保证文字细腻的同时流畅明快,通俗易读,长短交错
- 地道的中文本土化表达,杜绝欧化句式,严格避免"这个动作"、"这个认知"这类名词化表达
═══════════════════════════════════════════════════════════════════
禁词表(叙事中绝对不使用的词汇)
═══════════════════════════════════════════════════════════════════
- 一丝
- 不易察觉 / 不易觉察 / 难以察觉
- 鲜明对比
- 喉结
- 纽扣
- 弧度
- 不禁
- 悄然
- 涟漪
- 交织`,
};