A local-first multi-agent app development platform, built on PenguinHarness
Draft-screen examples: a rhythm game, an investment Copilot, and a scheduled-tasks folder (#399)
Yaowei Zheng07046e8ec8a5
diff --git a/changelog/unreleased/2026-08-21-draft-examples.md b/changelog/unreleased/2026-08-21-draft-examples.mdnew file mode 100644index 00000000..0ac6c538--- /dev/null+++ b/changelog/unreleased/2026-08-21-draft-examples.md@@ -0,0 +1,26 @@+# Draft-screen examples: a rhythm game, an investment Copilot, and a scheduled-tasks folder++- **Date:** 2026-08-21+- **Type:** feature+- **Scope:** `web`+- **PR:** [#399](https://github.com/Prism-Shadow/penguin-harness/pull/399)++[中文版](2026-08-21-draft-examples.zh.md)++The home screen's example catalog grows by five cards and one folder. Build web apps gains a Muse Dash-style rhythm runner; Build and optimize agents gains a conversational investment analyst as its first entry; and a new Create scheduled tasks folder holds three examples that set up real schedules.++Each of the five is a one- or two-sentence request rather than a full working brief — what to build and the constraints without which the result would be the wrong thing, with the file layouts, field lists and step-by-step headings left for the Agent to work out or ask about.++## The new examples++- **Rhythm runner mini game** (Build web apps, `web-design`) — a Muse Dash-style rhythm runner: a penguin runs forward on its own, notes drawn as music-note icons fly in locked to the beat, and each hit is graded Perfect / Great / Miss with a combo score.+- **Conversational investment analyst** (Build and optimize agents, `penguin-sdk` + `web-design`) — a stock-market Copilot on the Penguin SDK, modelled on perplexity.ai/finance, that pulls live market data every five minutes from startup and lists the strongest-trending stocks and sector comparison on its home page, with the evidence behind every call. Its stock-lookup tool takes a company name rather than only a ticker, and says so when a company has no match or is not listed instead of inventing a quote. Framed as analysis of public data, not investment advice.+- **Create scheduled tasks** (new folder, no pinned skills) — three schedules, each saying when it fires:+ - *A 9am daily planning check-in* — every day at 9am, in the same conversation, planning the day and reviewing yesterday's progress.+ - *Daily GitHub project digest* — every morning, one repo's issues, PRs and CI, ending in recommendations ranked by priority.+ - *Friday memory review* — every Friday evening, in the same conversation, going through what is worth remembering from the week and writing the confirmed items into Memory.++## Layout and tests++- Folders are no longer all the same length (4 / 4 / 3), so opening the schedules folder moves what sits below the block by one row. The registry docstring and the draft view's layout comments now state the rule that actually holds — folders stay within one row of each other — and `example-tasks.test.ts` enforces it.+- The same test now also checks that every folder and example has non-empty copy in both dictionaries, that the five new prompts stay under their length ceiling and keep their core (the rhythm game synced to music; the Copilot's Penguin SDK, refresh-from-startup, home-page trending list and name-resolving lookup tool; each schedule's trigger time and, for two of them, that they run in the current conversation), and that the investment brief keeps its not-advice framing.diff --git a/changelog/unreleased/2026-08-21-draft-examples.zh.md b/changelog/unreleased/2026-08-21-draft-examples.zh.mdnew file mode 100644index 00000000..3a2fb6d2--- /dev/null+++ b/changelog/unreleased/2026-08-21-draft-examples.zh.md@@ -0,0 +1,26 @@+# 首页示例:音游、投资 Copilot 与定时任务分类++- **Date:** 2026-08-21+- **Type:** feature+- **Scope:** `web`+- **PR:** [#399](https://github.com/Prism-Shadow/penguin-harness/pull/399)++[English](2026-08-21-draft-examples.md)++首页示例目录新增五张卡片与一个分类。「搭建网页应用」新增一个喵斯快跑式的节奏跑酷游戏;「搭建和优化智能体」的第一条新增对话式投资分析助理;新分类「创建定时任务」下三条示例创建的是真实的定时任务。++五条示例的提示词都是一两句话的请求,而不是完整的工作简报:只写要做什么、以及少了就会做错的约束;文件结构、字段清单与分步小节交给 Agent 自行判断或来问。++## 新增示例++- **音乐节奏跑酷小游戏**(搭建网页应用,`web-design`)——喵斯快跑式的节奏跑酷:企鹅主角自动向前跑,音符画成音符图标、严格踩着节拍飞来,每次击打给出 Perfect / Great / Miss 判定与连击计分。+- **对话式投资分析助理**(搭建和优化智能体,`penguin-sdk` + `web-design`)——基于 Penguin SDK、形态参考 perplexity.ai/finance 的股市 Copilot:启动后每 5 分钟实时抓取行情,首页直接列出近期走势较好的股票与板块强弱,每个判断都给出依据;查股工具支持按公司名(中文亦可)提问,查不到或未上市就直说而不是编一个报价。整体定位为基于公开数据的分析,而非投资建议。+- **创建定时任务**(新分类,不固定技能)——三条定时任务,各自写明触发时间:+ - *每天早 9 点的计划对话*——每天早上 9 点在当前会话里聊当天计划,并回顾昨天的进展。+ - *每天汇总 GitHub 项目状态*——每天早上汇总一个仓库的 Issue、PR 与 CI,结尾给出按优先级排序的建议。+ - *每周五晚回顾并记录 Memory*——每周五傍晚在当前会话里过一遍这周值得长期记住的事,确认后写进 Memory。++## 布局与测试++- 各分类不再等长(4 / 4 / 3),打开定时任务分类时其下方内容会移动一行。注册表文档注释与首页布局注释改为陈述当前真正成立的规则——各分类长度相差不超过一行——并由 `example-tasks.test.ts` 守住。+- 该测试同时检查:每个分类与示例在两份词典里都有非空文案;五条新提示词不超过长度上限且保留各自的核心(音游与音乐同步;Copilot 的 Penguin SDK、启动后周期刷新、首页走势榜与按公司名查询的查股工具;每条定时任务的触发时间,其中两条还要落在当前会话);投资示例保留「不是投资建议」的定位。diff --git a/packages/web/src/features/chat/draft-view.tsx b/packages/web/src/features/chat/draft-view.tsxindex 7c5009a8..8bb8e11c 100644--- a/packages/web/src/features/chat/draft-view.tsx+++ b/packages/web/src/features/chat/draft-view.tsx@@ -124,12 +124,15 @@ function saveAppliedRouteKey(field: RouteStateField, key: string): void {* Agents entry uses (NAV_ICONS.agents) — deliberately not a generic refresh loop, because the* app already has one glyph that means "agent" and a folder of agent examples should wear it.* Duplicated as a literal rather than imported: sidebar.tsx imports from chat-page.tsx, which- * renders this file, so importing it back would close an import cycle.+ * renders this file, so importing it back would close an import cycle. schedules: a clock face+ * with hands — the plainest mark for "fires on a timer", and distinct from the hourglass that+ * already means a Session is waiting.*/const FOLDER_GLYPHS: Record<ExampleFolderId, string> = {webapps:"M3 6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6zM3 9h18M6 6.5h.01M9 6.5h.01",agents: "M12 3v3m-6 4a6 6 0 0 1 12 0v5a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3v-5zm3 3h.01M15 13h.01",+ schedules: "M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20M12 6.5V12l3.5 2",};export function DraftView({@@ -687,9 +690,10 @@ export function DraftView({/*** The open example folder — bookmark-style, and ALWAYS exactly one: selecting another closes* the previous, and clicking the open one is a no-op rather than collapsing it. Never- * nullable on purpose. With every folder the same length, "one open" is what makes the- * block's height a constant: the examples area can neither collapse to bare folder rows nor- * grow, so nothing below it shifts as folders are switched.+ * nullable on purpose. With the folders kept within one row of each other, "one open" is+ * what keeps the block's height near-constant: the examples area can neither collapse to+ * bare folder rows nor grow to the whole catalog, so switching folders moves what sits+ * below it by at most one row.*/const [openFolder, setOpenFolder] = useState<ExampleFolderId>(EXAMPLE_FOLDERS[0].id);@@ -763,13 +767,14 @@ export function DraftView({{/* Example tasks: one-click canned builds showing off the one-sentence → app flow.Bookmark-style folders with ALWAYS exactly one open — selecting another closes the- previous, and the open one cannot be collapsed. The block is therefore a FIXED- height: two folder rows plus one folder's rows, whichever folder that is (they are- kept the same length). Nothing below shifts when folders are switched, and no- scroll container is needed — a scrollbar inside a six-line showcase reads as a- defect. Each example is a single-line title; its one-sentence description rides in- the row tooltip rather than a second line. Rows are disabled until- agents/models/skills are resolved (onSend would silently no-op without an Agent). */}+ previous, and the open one cannot be collapsed. The block is therefore three+ folder rows plus one folder's rows, with the folders kept within one row of each+ other (3–4 examples each), so switching folders moves what sits below by at most+ one row and no scroll container is needed — a scrollbar inside a seven-line+ showcase reads as a defect. Each example is a single-line title; its one-sentence+ description rides in the row tooltip rather than a second line. Rows are disabled+ until agents/models/skills are resolved (onSend would silently no-op without an+ Agent). */}<div className="mt-6 space-y-1">{EXAMPLE_FOLDERS.map((folder) => {const open = folder.id === openFolder;diff --git a/packages/web/src/features/chat/example-tasks.ts b/packages/web/src/features/chat/example-tasks.tsindex ebe02574..c372acc2 100644--- a/packages/web/src/features/chat/example-tasks.ts+++ b/packages/web/src/features/chat/example-tasks.ts@@ -6,12 +6,15 @@* folder plus the open folder's own rows, never the whole catalog. Adding an example means* appending it to the folder it belongs to, not lengthening the page.*- * Keep the folders similarly sized: the draft page reserves no scroll area for this block, so- * a folder much longer than its siblings is what would make the height jump between them.+ * Keep the folders within one row of each other (3–4 examples each today): the draft page+ * reserves no scroll area for this block, so its height is the folder rows plus the open+ * folder's rows — a folder much longer than its siblings is what would make that height jump+ * as folders are switched.*- * Copy and full prompts live in the active locale dictionary at `S.chat.exampleFolders[id]`- * and `S.chat.exampleTasks[id]`. Skills listed here are pinned only when the selected Agent has- * them installed; an empty list sends the prompt unchanged.+ * Copy and prompts live in the active locale dictionary at `S.chat.exampleFolders[id]` and+ * `S.chat.exampleTasks[id]`, which is also where the rule for how long a prompt may get is+ * stated. Skills listed here are pinned only when the selected Agent has them installed; an+ * empty list sends the prompt unchanged.*/export const EXAMPLE_FOLDERS = [{@@ -20,16 +23,26 @@ export const EXAMPLE_FOLDERS = [{ id: "game", skills: ["web-design"] },{ id: "gamecenter", skills: ["web-design"] },{ id: "lol", skills: ["web-design"] },+ { id: "rhythmRunner", skills: ["web-design"] },],},{id: "agents",tasks: [+ { id: "investmentCopilot", skills: ["penguin-sdk", "web-design"] },{ id: "rag", skills: ["penguin-sdk", "web-design"] },{ id: "agentBenchmarkBuild", skills: [] },{ id: "agentOptimization", skills: [] },],},+ {+ id: "schedules",+ tasks: [+ { id: "dailyPlan", skills: [] },+ { id: "githubDigest", skills: [] },+ { id: "memoryReview", skills: [] },+ ],+ },] as const;export type ExampleFolder = (typeof EXAMPLE_FOLDERS)[number];diff --git a/packages/web/src/lib/strings-en.ts b/packages/web/src/lib/strings-en.tsindex 043f3208..2fcdb6a5 100644--- a/packages/web/src/lib/strings-en.ts+++ b/packages/web/src/lib/strings-en.ts@@ -1164,6 +1164,7 @@ export const en: Strings = {exampleFolders: {webapps: "Build web apps",agents: "Build and optimize agents",+ schedules: "Create scheduled tasks",},exampleTasks: {game: {@@ -1231,6 +1232,28 @@ Penguin visual style (see the web-design skill), dark by default. On phones theWhen done, open index.html in a browser and self-test once.`,},+ rhythmRunner: {+ label: "Rhythm runner mini game",+ desc: "A Muse Dash-style rhythm runner: a penguin lead, notes locked to the beat, graded Perfect / Great / Miss",+ prompt:+ "Build a Muse Dash-style rhythm runner: a penguin runs forward on its own, and notes — " ++ "drawn as music-note icons — fly in locked to the beat for me to hit. Show Perfect / " ++ "Great / Miss for each hit, score combos, and let the difficulty climb as the track goes " ++ "on. Pure front end, one file, playable straight from file://.",+ },+ investmentCopilot: {+ label: "Conversational investment analyst",+ desc: "A conversational market Copilot on the Penguin SDK: the home page lists what is trending, with the market factors behind every call",+ prompt:+ "Build a conversational stock-market Copilot on the Penguin SDK, along the lines of " ++ "perplexity.ai/finance: from startup it pulls live market data every 5 minutes, and the " ++ "home page lists the stocks trending strongest lately alongside how the sectors compare. " ++ "Every call has to name the market factors behind it — policy, sector news, fund flows, " ++ "earnings, macro data — rather than technical indicators. Analysis of public data, not " ++ "investment advice. Its stock-lookup tool has to handle questions like \"look up Zhipu's " ++ 'stock for me": resolve a company name to its ticker itself, and when there is no match ' ++ "or the company is not listed, say so rather than inventing a quote.",+ },rag: {label: "Build a Claude Code docs RAG agent",desc: "Collect the claude-code-docs repo into a conversational RAG knowledge app with source citations",@@ -1277,6 +1300,32 @@ Scenarios:- desired_score: \`>=95\`- candidate_round_limit: \`5\``,},+ dailyPlan: {+ label: "A 9am daily planning check-in",+ desc: "09:00 every day: talk through the day's plan in this same chat, and review yesterday's progress",+ prompt:+ "Set up a scheduled task: every day at 9am, in this same conversation, plan today's work " ++ "with me. Read back over the conversation first and say what yesterday's plan got done and " ++ "where it stuck, then offer an ordered shortlist for today with a line of reasoning each, " ++ "and write up what I confirm as a checklist.",+ },+ githubDigest: {+ label: "Daily GitHub project digest",+ desc: "A daily pass over one repo's issues, PRs and CI, ending in prioritized recommendations",+ prompt:+ "Set up a scheduled task: every morning, use gh to digest one GitHub repo's issues, PRs " ++ "and CI — surface what has stalled, what is waiting on review and what is failing — and " ++ "end with recommendations ranked by priority, each saying why it sits where it does.",+ },+ memoryReview: {+ label: "Friday memory review",+ desc: "Friday evening: go through what is worth remembering from the week and write it into Memory",+ prompt:+ "Set up a scheduled task: every Friday evening, in this same conversation, go through " ++ "what is worth remembering from the week with me. Check the existing memory index first so " ++ "nothing is duplicated, then take it item by item — what to record, what to revise — and " ++ "write what I confirm into Memory.",+ },},sessionList: "Sessions",defaultSessionTitle: "New chat",diff --git a/packages/web/src/lib/strings.ts b/packages/web/src/lib/strings.tsindex 9cf60fab..1ac3015c 100644--- a/packages/web/src/lib/strings.ts+++ b/packages/web/src/lib/strings.ts@@ -1126,11 +1126,15 @@ export const zh = {exampleFolders: {webapps: "搭建网页应用",agents: "搭建和优化智能体",+ schedules: "创建定时任务",},/**- * Example task cards on the draft screen: one click auto-submits the canned prompt. These- * are the FULL working prompts — descriptions stay short, but the submitted instructions- * remain detailed because execution quality depends on them.+ * Example task cards on the draft screen: one click loads the canned prompt for the user.+ * Keep a prompt SHORT — a short paragraph, around 100 Chinese characters, carrying what to+ * build plus the constraints the result would be wrong without. File layouts, field lists,+ * step-by-step headings and self-test instructions are what the Agent works out or asks+ * about, so they stay out; the older briefs below are still far longer and are being trimmed+ * to match.*/exampleTasks: {game: {@@ -1195,6 +1199,24 @@ Penguin 视觉风格(见 web-design 技能),默认深色。手机端侧边完成后在浏览器打开 index.html 自测一次。`,},+ rhythmRunner: {+ label: "音乐节奏跑酷小游戏",+ desc: "喵斯快跑式的音乐节奏跑酷:企鹅主角,音符踩着节拍飞来,判定分 Perfect / Great / Miss",+ prompt:+ "做一个喵斯快跑(Muse Dash)式的音乐节奏跑酷小游戏:主角是一只企鹅,自动向前跑;" ++ "音符画成音符图标,严格踩着节拍飞来,玩家按键击打,判定显示 Perfect / Great / Miss 三档," ++ "连击计分,难度随曲子推进。纯前端单文件,file:// 直接打开即玩。",+ },+ investmentCopilot: {+ label: "对话式投资分析助理",+ desc: "用 Penguin SDK 做对话式看盘 Copilot:首页列出近期走势较好的股票,每个判断都说清市场因素",+ prompt:+ "用 Penguin SDK 做一个对话式的股市 Copilot,形态参考 perplexity.ai/finance:启动后每 5 分钟实时抓取大盘行情," ++ "首页直接列出近期走势较好的股票和板块强弱,每个判断都要说清背后的市场因素——政策、行业消息、" ++ "资金流向、财报或宏观数据,而不是技术指标," ++ "只做分析不是投资建议。它的查股工具要能答「帮我查一下智谱的股票」这类问题:" ++ "按公司名(中文也行)自己对应到股票代码,查不到或没上市就直说,不要编。",+ },rag: {label: "构建 Claude Code 文档 RAG 智能体",desc: "收集 claude-code-docs 仓库,生成可对话、带来源引用的 RAG 知识应用",@@ -1240,6 +1262,28 @@ Benchmark:- desired_score:\`>=95\`- candidate_round_limit:\`5\``,},+ dailyPlan: {+ label: "每天早 9 点的计划对话",+ desc: "每天 09:00 在同一个会话里聊当天计划,并回顾昨天的进展",+ prompt:+ "建一个定时任务:每天早上 9 点在这个会话里和我聊今天的计划。" ++ "先回看上文说清昨天定的事做完了多少、哪些卡住,再给我一份排好序的今日候选、每条一句理由," ++ "我确认后写成清单。",+ },+ githubDigest: {+ label: "每天汇总 GitHub 项目状态",+ desc: "定时跑一遍仓库的 Issue、PR 与 CI,日报结尾给出按优先级排序的建议",+ prompt:+ "建一个定时任务:每天早上用 gh 汇总一个 GitHub 仓库的 Issue、PR 与 CI 状态," ++ "挑出停滞的、待评审的和挂掉的,结尾给出按优先级排序的建议,每条说清为什么排在这个位置。",+ },+ memoryReview: {+ label: "每周五晚回顾并记录 Memory",+ desc: "周五傍晚一起过一遍这周值得长期记住的事,确认后由你写进 Memory",+ prompt:+ "建一个定时任务:每周五傍晚在这个会话里和我过一遍这周值得长期记住的事。" ++ "先看已有记忆索引避免重复,再逐条问我该记什么、要不要改已有的,我确认后你写进 Memory。",+ },},sessionList: "Session",defaultSessionTitle: "新对话",diff --git a/packages/web/test/example-tasks.test.ts b/packages/web/test/example-tasks.test.tsindex 5f394a01..bed2fb3d 100644--- a/packages/web/test/example-tasks.test.ts+++ b/packages/web/test/example-tasks.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from "vitest";-import { EXAMPLE_TASKS } from "../src/features/chat/example-tasks";+import { EXAMPLE_FOLDERS, EXAMPLE_TASKS } from "../src/features/chat/example-tasks";import { buildSkillsMessage } from "../src/features/chat/skill-use";import { en } from "../src/lib/strings-en";import { zh } from "../src/lib/strings";@@ -101,3 +101,155 @@ describe("draft example tasks", () => {},);});++describe("draft example catalog", () => {+ it("gives every folder and every example copy in both dictionaries", () => {+ const ids = EXAMPLE_TASKS.map((task) => task.id);+ expect(new Set(ids).size).toBe(ids.length);+ for (const dict of [zh, en]) {+ for (const folder of EXAMPLE_FOLDERS) {+ expect(dict.chat.exampleFolders[folder.id]).not.toBe("");+ }+ for (const id of ids) {+ const copy = dict.chat.exampleTasks[id];+ expect(copy.label).not.toBe("");+ expect(copy.desc).not.toBe("");+ // The prompt is the request; the description is only the row's tooltip for it.+ expect(copy.prompt.length).toBeGreaterThan(copy.desc.length);+ }+ }+ });++ // The draft page reserves no scroll area: its height is the folder rows plus the open+ // folder's rows, so a folder much longer than its siblings makes that height jump.+ it("keeps the folders within one row of each other", () => {+ const sizes = EXAMPLE_FOLDERS.map((folder) => folder.tasks.length);+ expect(Math.max(...sizes) - Math.min(...sizes)).toBeLessThanOrEqual(1);+ });+});++describe("scheduled-task examples", () => {+ const scheduleIds = ["dailyPlan", "githubDigest", "memoryReview"] as const;++ it("files them all in the schedules folder", () => {+ const folder = EXAMPLE_FOLDERS.find((candidate) => candidate.id === "schedules");+ expect(folder?.tasks.map((task) => task.id)).toEqual([...scheduleIds]);+ });++ // Two things a shortened schedule brief cannot lose. WHEN it fires: a schedule with no time+ // in it is not a schedule, and the Agent has nothing to ask about it that would not be a+ // guess. And, for the two check-ins that need the user to answer, that they run in the+ // conversation the user is already in — the default is a fresh Session per run, which for+ // those two would be wrong. How the schedule is written (TOML under agent_state/schedule/,+ // `enabled`, `start_at`) is in the Agent's own Scheduled Tasks section; the prompt no longer+ // repeats it. `period` is a fixed interval (30m / 12h / 7d), so cron syntax is always wrong.+ it.each([+ {+ id: "dailyPlan",+ zhMarkers: ["每天", "9 点", "这个会话"],+ enMarkers: ["every day", "9am", "this same conversation"],+ },+ { id: "githubDigest", zhMarkers: ["每天"], enMarkers: ["every morning"] },+ {+ id: "memoryReview",+ zhMarkers: ["每周五", "这个会话"],+ enMarkers: ["every Friday", "this same conversation"],+ },+ ] as const)("$id says when it fires in both locales", ({ id, zhMarkers, enMarkers }) => {+ const zhPrompt = zh.chat.exampleTasks[id].prompt;+ const enPrompt = en.chat.exampleTasks[id].prompt;+ for (const marker of zhMarkers) {+ expect(zhPrompt).toContain(marker);+ }+ for (const marker of enMarkers) {+ expect(enPrompt).toContain(marker);+ }+ expect(zhPrompt).not.toContain("cron");+ expect(enPrompt).not.toContain("cron");+ });+});++/**+ * These five are written to be read by the user before they run, so each is a short paragraph —+ * around 100 Chinese characters — carrying what to build plus the constraints the result would be+ * wrong without, and none of the step-by-step detail the Agent works out or asks about. The caps+ * below are a ceiling against re-inflation, not a target. Only these five are covered: the older+ * briefs in the catalog are still far longer and are being shortened separately.+ */+describe("short example prompts", () => {+ const shortExamples = [+ {+ id: "rhythmRunner",+ zhMarkers: ["喵斯快跑", "企鹅", "音符图标", "节拍", "Perfect", "Great", "Miss"],+ enMarkers: ["Muse Dash", "penguin", "music-note icons", "beat", "Perfect", "Great", "Miss"],+ },+ {+ id: "investmentCopilot",+ zhMarkers: [+ "Penguin SDK",+ "perplexity.ai/finance",+ "对话式",+ "启动后",+ "实时抓取",+ "首页",+ "走势较好的股票",+ "市场因素",+ "查股工具",+ "公司名",+ "不要编",+ ],+ enMarkers: [+ "Penguin SDK",+ "perplexity.ai/finance",+ "conversational",+ "from startup",+ "live market",+ "home page",+ "trending strongest",+ "market factors",+ "stock-lookup tool",+ "company name",+ "not listed",+ ],+ },+ { id: "dailyPlan", zhMarkers: ["计划"], enMarkers: ["plan"] },+ { id: "githubDigest", zhMarkers: ["GitHub", "优先级"], enMarkers: ["GitHub", "priority"] },+ { id: "memoryReview", zhMarkers: ["Memory"], enMarkers: ["Memory"] },+ ] as const;++ it.each(shortExamples)("$id stays within the length ceiling", ({ id }) => {+ // investmentCopilot sits highest by a wide margin: seven requirements plus a reference URL and+ // a quoted sample question, both literals no rewording compresses. The English ceiling is the+ // wider one because English runs about three times the character count of the same Chinese,+ // not because the English is allowed to say more.+ expect(zh.chat.exampleTasks[id].prompt.length).toBeLessThanOrEqual(230);+ expect(en.chat.exampleTasks[id].prompt.length).toBeLessThanOrEqual(700);+ });++ // What is left after the cut: what to build, and the constraints without which the result+ // would be the wrong thing (a rhythm game is a game synced to music; the investment Copilot+ // is a Penguin SDK app that refreshes from startup, surfaces trending stocks on its home page,+ // and gives the assistant a name-resolving stock-lookup tool).+ it.each(shortExamples)("$id keeps its core in both locales", ({ id, zhMarkers, enMarkers }) => {+ for (const marker of zhMarkers) {+ expect(zh.chat.exampleTasks[id].prompt).toContain(marker);+ }+ for (const marker of enMarkers) {+ expect(en.chat.exampleTasks[id].prompt).toContain(marker);+ }+ });+});++describe("investment copilot example", () => {+ // Short as it is, the brief stays analysis with stated evidence, never a call to act.+ it.each([+ { locale: "zh", prompt: zh.chat.exampleTasks.investmentCopilot.prompt, marker: "不是投资建议" },+ {+ locale: "en",+ prompt: en.chat.exampleTasks.investmentCopilot.prompt,+ marker: "not investment advice",+ },+ ])("$locale keeps the not-advice framing", ({ prompt, marker }) => {+ expect(prompt).toContain(marker);+ });+});