fix(experimental): clarify personalized page planning and handoff
This commit is contained in:
1 parent
6271657146
commit
bdb211090f
9 files changed
+155
-49
No files matched your search
@@ -21,8 +21,8 @@
|
||||
en: 2fdafe328be6698b
|
||||
zh: b0795841ae683bfd
|
||||
/deepseek-ai-dsh-experimental-creation-recommendations/understand-the-implementation:
|
||||
en: f2d46e1d9ed35cae
|
||||
zh: aacb4d85532e42b5
|
||||
en: 3d0449589366c9ca
|
||||
zh: 6360df1aa4a11f3c
|
||||
/deepseek-ai-dsh-experimental-creation-recommendations/further-exploration:
|
||||
en: 764927dcbad0e080
|
||||
zh: 9d14cb335a2fb54c
|
||||
|
||||
@@ -63,13 +63,15 @@ The Host entry is a function plugin. Its `apply` assembles the internal `creatio
|
||||
|
||||
The plugin registers one `suggest_action` tool through an internal function. Its closed request schema selects `create_personalized_page`; a synchronous `prepare` callback returns durable JSON without executing the action. Successful native and PTC calls retain `{actionCard: {action, callId, data}}` metadata. The plugin supplies its renderer and click handler; disposal removes the tool and refuses stale calls. Tool naming and metadata are independent of creation, but this experiment has no additional action-card service, public registry or Loader entry. Other action types and cross-plugin registration are deferred until a second production consumer establishes the needed contract.
|
||||
|
||||
The shared tool description defines proposal and click-to-start semantics. Each action supplies its typed fields and a pointer to its Skill. Eligibility, exclusions, duplicate checks, placement priorities and handoff policy live in `personalized-pages`, rather than expanding the shared tool description for each scenario. A fixture verifies a different action's fields and metadata; this is not evidence of a second production UI or a multi-action registry.
|
||||
The shared tool saves typed proposals and defines click-to-start semantics. Each action supplies its fields and Skill entry. `personalized-pages` owns eligibility, duplicate checks, minimal scope, placement and content preparation. It allows implementation details needed for the agreed behavior, such as input validation and empty states; independent operations, sources, automation or broader access require a basis in the request or agreed context. These page rules do not expand the shared tool description. A fixture verifies another action's fields and metadata; this is not evidence of a second production UI or a multi-action registry.
|
||||
|
||||
The Host reserves a new package name and launches the existing `cordis` preset through `subagents`, passing a self-contained brief and the selected location. The child generates files in `.dsh-created-plugins/<id>` under the parent’s original workspace, preserving its delegated file permissions. The Host validates the package identity and an insert-only plain YAML or JSON patch, copies the result to the profile’s `created-plugins` directory and validates that copy before calling `pluginManager.installBundle`. Installation remains independent of the source workspace. The patch may add only the new package’s uniquely named, non-group rows. Custom YAML tags, aliases and includes are rejected. Each row must resolve to an existing built JavaScript entry. Relative symlinks must stay inside the package and are preserved during copying. A Session projection retains proposals and decision receipts. Recovery failures leave the conversation open and mark the result unconfirmed; retries must recheck the profile before creating anything. Completion targets the current instance of a reopened Session. Concurrent clicks share one operation; a tool guard reserves at most one recommendation per turn across `suggest_action` and `suggest_plugin`.
|
||||
|
||||
The Creator receives the full brief, the user’s final location as authoritative over earlier placement text, and an absolute path to a location-specific reference shipped in this package. The reference supplements `cordis-plugin-development` without depending on a newer preset package. It reads only the needed registration, state and teardown guidance before inspecting current APIs. Teardown must remove its own UI and tabs while preserving unrelated content; this is a generated-code requirement, not a static package check. [Intent cases](tests/fixtures/intent-cases.json) define real-model observations, separately from deterministic service tests.
|
||||
The Creator receives the accepted brief, the user’s final location as authoritative over earlier placement text, and a location-specific reference shipped in this package. Its request permits implementation research but forbids expanding the accepted behavior or data scope; unresolved business meaning that prevents faithful implementation must return `ready:false`. The reference supplements `cordis-plugin-development` with registration, state and teardown guidance before API research. Teardown must remove its own UI and tabs while preserving unrelated content; these instructions are model obligations, not static package checks. [Intent cases](tests/fixtures/intent-cases.json) define real-model observations, separately from deterministic service tests.
|
||||
|
||||
When a page starts from an existing result, the proposal also carries optional `initialContent`: the necessary original rows, values and relationships, separate from the short displayed brief. It survives replay and passes to Creator as data. Source items remain display content; their wording does not become requirements for the new page. The child does not inherit the parent conversation; the main Agent must resolve references such as “these items” into the relevant content, labels and meanings without copying unrelated history. An omitted field means no existing content was supplied. Handoff preserves the submitted text exactly but cannot verify that the model included every relevant fact. Users who will add content themselves can receive an empty-page proposal without supplying old material; it must not promise automatic chat import. Explicit requests to prefill unavailable content require clarification. A named but uninspected source remains an unverified dependency; its response shape, connection setup and update behavior wait for Creator research after authorization, rather than becoming invented fields or controls.
|
||||
`brief` serves both the card and Creator: it contains behavior, input, calculations and persistence scope. Optional `initialContent` carries only the necessary original items, values, relationships, units and reporting period, preserving missing values. Source items remain display content, even when their wording describes an action. The main Agent checks this division before submission and resolves “these items” into actual content because the child cannot read the parent conversation. The Skill uses three short examples to distinguish necessary details from extra operations, data from instructions, and weekly additions from cumulative totals. Ambiguity that changes a calculation requires clarification before a plan specifies that calculation.
|
||||
|
||||
Both fields survive replay and reach Creator unchanged. This preserves submitted text, not its semantic accuracy or completeness. An omitted `initialContent` means no existing content was supplied. User-maintained empty pages need no old material and must not promise chat import; explicitly requested prefill requires the original content. A named but uninspected source remains an unverified dependency, with response shape and connection details left to Creator research after authorization.
|
||||
|
||||
- [Source](src/index.ts)
|
||||
- [Tests](tests/)
|
||||
|
||||
@@ -63,13 +63,15 @@ Host 入口是普通函数插件,在 `apply` 内通过 `ctx.plugin` 组装内
|
||||
|
||||
插件通过内部函数注册唯一的 `suggest_action` 工具。封闭的请求 schema 选择 `create_personalized_page`;同步 `prepare` 回调只返回持久化 JSON,不执行动作。成功的原生和 PTC 调用记录 `{actionCard: {action, callId, data}}` 元数据。插件自行提供卡片渲染和点击处理;卸载时移除工具,并拒绝已失效的调用。工具命名和元数据不绑定创建业务,但本实验不增加卡片 service、公共注册中心或独立 Loader 条目。其他动作类型及跨插件注册等到第二个实际消费者出现、契约明确后再设计。
|
||||
|
||||
共享工具说明只定义提案与点击后执行的语义。各动作提供自己的类型化字段和 Skill 入口。适用条件、排除条件、查重、选位优先级及交接策略放在 `personalized-pages` 中,不随场景增加而扩写共享工具说明。一个 fixture 验证其他动作的字段和元数据,但不代表已有第二种生产 UI 或多动作注册中心。
|
||||
共享工具保存类型化提案,定义点击后执行的语义;各动作提供自己的字段和 Skill 入口。`personalized-pages` 负责适用条件、查重、最小范围、选位和内容准备。它允许补齐实现已确认行为所需的细节,例如输入校验和空状态;新增独立操作、数据源、自动任务或访问范围,需要用户请求或已确认上下文的依据。这些页面规则不扩写到共享工具说明里。一个 fixture 验证其他动作的字段和元数据,但不代表已有第二种生产 UI 或多动作注册中心。
|
||||
|
||||
Host 预留新包名,通过 `subagents` 启动已有的 `cordis` 预设,传入完整需求和选定位置。子 Agent 在父会话原工作区的 `.dsh-created-plugins/<id>` 下生成文件,保留委派时的文件权限。Host 校验包身份和仅允许新增的普通 YAML 或 JSON 补丁,将结果复制到配置档案的 `created-plugins` 目录并再次校验,再调用 `pluginManager.installBundle`;安装后的插件不依赖原工作区。补丁只能添加该新包自身且名称唯一的非分组条目;不接受自定义 YAML 标签、别名或 include。每个条目必须能解析到已构建的 JavaScript 文件。相对符号链接必须留在包内,复制时保留原目标。Session 投影保存建议和操作记录。恢复失败时仍可打开会话,卡片显示结果不明;重试必须先检查配置档案。后台完成结果写入重新打开的当前 Session 实例。并发点击合并为一次操作;工具守卫在每轮为 `suggest_action` 和 `suggest_plugin` 合计预留最多一条推荐。
|
||||
|
||||
Creator 收到完整方案、优先于早先位置描述的用户最终选位,以及本插件随包提供的位置指南绝对路径。指南补充 `cordis-plugin-development`,不依赖更新版预设包;Creator 按需读取注册、状态和卸载指引,再检查当前 API。卸载时应移除自己的界面和页签,保留其他内容;这是生成代码的要求,不属于静态包校验。[意图用例](tests/fixtures/intent-cases.json)用于真实模型观察,与确定性的服务测试分开。
|
||||
Creator 收到已接受的完整方案、优先于早先位置描述的用户最终选位,以及本插件随包提供的位置指南。执行请求允许调研实现细节,但不得扩大已接受的行为和数据范围;业务含义不明导致无法忠实实现时,应返回 `ready:false`。位置指南补充 `cordis-plugin-development`,在 API 调研前提供注册、状态和卸载指引。卸载时应移除自己的界面和页签,保留其他内容;这些是模型执行要求,不是静态包校验。[意图用例](tests/fixtures/intent-cases.json)用于真实模型观察,与确定性的服务测试分开。
|
||||
|
||||
页面基于已有结果创建时,方案还可携带 `initialContent`:所需的原始行、数值及其对应关系,与卡片显示的简短方案分开保存。它可从日志恢复,并作为数据交给 Creator。原始条目是待展示内容,不能把条目的表述当成新页面的功能要求。子 Agent 不继承主对话,因此主 Agent 必须将“这些条目”等指代补成相关内容、名称及含义,同时避免复制无关历史。省略此字段表示未提供已有内容。交接会完整保留提交的文本,但不能校验模型是否包含了所有相关事实。用户自行添加内容时,可以先给空白页面方案,无需先补齐旧资料,但不得承诺自动导入聊天。明确要求预填而原始内容缺失时,应先澄清。用户已命名但未检查的数据源仍是未验证的依赖;响应格式、连接方式和更新行为留待授权后的 Creator 调研,不据此编造字段或控件。
|
||||
`brief` 同时用于卡片和 Creator,承载行为、输入、计算方法与持久化范围。可选的 `initialContent` 只承载所需的原始条目、数值、对应关系、单位和统计周期,缺失值仍保持缺失。原始条目即使描述了动作,也仍是待展示内容。主 Agent 在提交前检查这项分工,并将“这些条目”等指代补成实际内容,因为子 Agent 无法读取主对话。Skill 用三个短示例区分必要细节与额外操作、数据与要求、当周新增与累计总量。会改变计算结果的口径歧义,需要在方案确定计算方法前澄清。
|
||||
|
||||
两个字段均可从日志恢复并原样传给 Creator;这保证文本不丢失,不保证语义准确或完整。省略 `initialContent` 表示未提供已有内容。用户自行维护的空白页面无需旧资料,也不得承诺自动导入聊天;明确要求预填时则需要原始内容。已命名但未检查的数据源仍是未验证的依赖,响应格式和连接方式留待授权后的 Creator 调研。
|
||||
|
||||
- [源码](src/index.ts)
|
||||
- [测试](tests/)
|
||||
|
||||
@@ -1,38 +1,54 @@
|
||||
# Personalized pages
|
||||
|
||||
Use this workflow in the main conversation to plan an optional new page or small tool. The user's need can concern any task or result, not just DSH itself. Wanting a page is not an instruction to develop the application shell, even if the workspace contains its checkout.
|
||||
Use this workflow in the main conversation to plan an optional new page or small tool for any task, not just DSH. You decide whether a page helps, check for duplicates, and supply its scope, content and location. `suggest_action` saves the proposal and displays a card; it does not plan or execute it. After the user clicks Create, the background Creator researches implementation details and implements the accepted scope.
|
||||
|
||||
Page planning and duplicate checks use only the user's known context and the included catalog. Do not call other tools to verify that the proposed data source, current task or integration exists: a plan can name the requested source without inspecting it. Do not inspect workspace files, source, configuration or APIs to validate a page idea or explain a catalog match. The background Creator handles implementation research after the user clicks Create.
|
||||
Plan from the known conversation and the included catalog. Do not inspect files, configuration, APIs or other sources merely to validate a page idea or catalog match. Name an uninspected source as an unverified dependency; leave its response shape and connection details to Creator. Wanting a page is not an instruction to develop the application shell, even when its checkout is the workspace.
|
||||
|
||||
## Choose the smallest useful response
|
||||
|
||||
First honor the requested deliverable. Code to save or embed, an exported file, a document, or a change to an existing project stays in that workflow; visual or interactive content alone does not call for installing a DSH plugin. For a new interface the user wants to use here, even a single task qualifies; repeated visits, changing data and independence from the Session are not prerequisites. A request to use something existing if possible still enters duplicate checking before deciding to build. Ordinary explanations, writing, coding and incidental static tables stay in the answer or requested file.
|
||||
Honor the requested deliverable. Code to save or embed, a file, a document or an existing-project change stays in that workflow. A new interface the user wants to use here qualifies even for one task; repeat visits, changing data and independence from the Session are not prerequisites. “Use something existing if possible” still enters duplicate checking. Ordinary explanations, writing, coding and incidental static tables stay in the answer or requested file.
|
||||
|
||||
Without an explicit interface request, identify a useful next action that a page would add to the answer: maintaining a record, revisiting changing results, or exploring them through interaction. Ground that continuing use in the known task. First complete the requested report or other answer, then optionally offer a small viewer or editor for that action. Repackaging the same static prose or table adds no such value. If no concrete use is apparent, finish with the answer. Do not fetch extra data just to find a recommendation opportunity.
|
||||
Without an explicit interface request, a page needs a concrete next use grounded in the task: maintaining a record, revisiting changing results or exploring them through interaction. Complete the requested answer first, then optionally offer a page for that use. Repackaging static prose or a table is insufficient. Do not fetch data to find a recommendation opportunity.
|
||||
|
||||
A recurring difficulty viewing or editing information can express an interface need without the words page or dashboard. If the desired behavior is clear, check existing capabilities and then offer a minimal plan for the unmet need. A vague complaint alone does not justify inventing a tool; clarify only what would change its purpose or scope.
|
||||
A recurring difficulty viewing or editing information can imply an interface need. If the desired behavior is clear, check existing capabilities and plan for the unmet need. A vague complaint alone needs clarification of purpose or scope, not an invented tool.
|
||||
|
||||
Editing a page that already exists is not a new-page request. This action creates a separate plugin; it cannot modify the original. Do not offer a replacement copy or claim the original was changed. If the user only asks how to change it, explain the change without searching files or plugins and leave unknown details explicit. Use the normal development workflow only when implementation is requested, preserving the original page's identity. Ask for its location or source only if needed for that work.
|
||||
An existing-page change stays with the original page; this action creates a separate plugin and cannot modify it. Do not offer a replacement copy or claim an update. Explain-only requests need no source or plugin search. Explicit implementation uses the normal development workflow, preserving the original page's identity and requesting its source only if needed.
|
||||
|
||||
Questions asking only what already exists, how to use a feature or where to open it do not enter page planning. Do not load this skill just to discover plugins. If it is already loaded, those questions still get no creation card. Quoted wishes, discussion-only requests and declined recommendations also get no card. Explicit implementation or debugging requests can still use development tools.
|
||||
Existing-feature questions do not load this skill or get a creation card, even if the skill was loaded earlier. Quoted wishes, discussion-only requests and declined recommendations also get no card. Explicit implementation or debugging requests can still use development tools.
|
||||
|
||||
## Check for an existing capability
|
||||
|
||||
Only after deciding to plan a page, compare its requested behavior with the current official-plugin descriptions below. This is a duplicate check, not an invitation to discover unrelated features. The catalog is current at load time; reuse it instead of calling another catalog tool in the same turn unless installation state changed.
|
||||
After a page need qualifies, compare the requested behavior with the official-plugin descriptions below. Use the catalog only for duplicate checks. Reuse it in this turn unless installation state changes.
|
||||
|
||||
If an existing capability satisfies the page need, stop page planning. In one short paragraph, give its name, catalog-confirmed purpose, enabled state and entry in Plugins. Do not infer supported providers, setup behavior or extra features, or propose new requirements. An enabled match needs no enable card. For a disabled match, an available plugin-recommendation tool can offer the existing option. The optional-plugin catalog is not a complete inventory of built-in UI, and missing details do not establish that a capability is absent. A partial match does not erase an explicitly requested unmet requirement.
|
||||
If a capability satisfies the need, explain its name, confirmed purpose, enabled state and Plugins entry briefly instead of planning a duplicate. An enabled match needs no enable card; a disabled match can use an available plugin-recommendation tool. Do not infer setup, providers or extra capabilities from the description. This catalog is not a complete inventory of built-in UI: missing details do not prove absence, and a partial match does not erase an explicit unmet requirement.
|
||||
|
||||
Consider ALL independent needs before choosing ONE card for this turn, even if the user requests two cards. Follow an explicit priority. Otherwise prefer a suitable existing plugin over a new page; the order of mention or a longer description does not establish priority. Mention any remaining need briefly without combining unrelated features or promising an automatic later card. Clarify only missing facts that change the requested outcome.
|
||||
Consider all needs before choosing one card per turn. Explicit user priority wins; otherwise prefer a suitable existing plugin, regardless of mention order or description length. Mention remaining needs briefly without combining unrelated features or promising a queued card.
|
||||
|
||||
## Plan and placement
|
||||
## Plan and hand off
|
||||
|
||||
Write one to three sentences in the user's language covering the requested purpose, interactions, input and persistence scope. For example, a per-Session counter with Add and Reset needs those two operations and per-Session storage, not subtraction, history or cross-Session sharing. Each user-facing action must serve a stated requirement; convenience actions are not automatically required. Keep acceptance criteria tied to those requested behaviors. Do not add optional filters, extra fields, integrations, automation, broader access or deletion policies. Leave source/API research to the background Creator.
|
||||
Define the required behavior and data meaning; let Creator fill in implementation details such as input validation and empty states. Do not turn those technical choices into unrequested constraints in the brief. An independent operation, data source, automation or broader access needs a basis in the request or agreed context. Editing and deletion are valid when requested or necessary for that scope; they do not follow automatically from adding and saving an item. Saving the current state does not imply keeping dated change history. Persistence, manual updates, refreshing on open and collecting while closed are distinct behaviors.
|
||||
|
||||
When a source is named but not inspected, state it as an unverified dependency. Leave its response shape, connection setup and update behavior unresolved for the Creator after authorization. Missing technical details are not extra fields or controls to add to the page.
|
||||
The Creator cannot read this conversation. Use these fields to hand off only what it needs:
|
||||
|
||||
When the page uses content already supplied or obtained in this task, copy only the content needed to initialize it into `request.initialContent`: for example the actual checklist items or report values with their supplied units, rather than merely describing columns. Keep those items as display content; do not reinterpret their wording as features or acceptance requirements for the new page. Preserve the source values; do not fill missing rows or units, or present derived summaries as supplied data. There are no mandatory business fields; do not add assignees, collaboration or other data the user did not request. The background Creator cannot read the main conversation: replace references such as “these items” with the needed content, labels and meanings, preserving agreed scope and constraints. Do not copy unrelated conversation history. Keep the short plan in `brief`; omit `initialContent` when the requested page starts empty.
|
||||
| Field | Contents |
|
||||
|:--|:--|
|
||||
| `title` | Short page name in the user's language. |
|
||||
| `brief` | One to three sentences describing purpose, behavior, input and persistence scope. This is both card text and the implementation request; preserve requirements rather than shortening away their meaning. Put calculations and interaction requirements here. |
|
||||
| `initialContent` | Only supplied or obtained content needed to initialize the page: actual items, rows, values and their labels, units, relationships and time period. Preserve missing values as missing. Omit for an empty page. |
|
||||
|
||||
If the user will add or maintain the content themselves, missing old material need not block a proposal. Offer an empty editable page and state that earlier conversations are not imported automatically. Ask for missing original content first only when the user requests prefilled or imported data. Saving a page, manually updating its data, refreshing a source when opened and collecting updates while closed are separate behaviors. Include only the requested behavior; persistence alone does not imply live refresh, scheduled collection or an integration.
|
||||
Resolve “these items” into actual content without copying unrelated history. Content that mentions an action remains content, not a feature request. Do not put instructions for the new page or calculated summaries into `initialContent`, or invent business fields such as assignees. Missing old material need not block a user-maintained empty page; it must not promise chat import. Clarify missing content only when prefill or import is requested.
|
||||
|
||||
Keep the original reporting period and the meaning of each number. A weekly addition differs from a cumulative total; a current total does not prove a trend or a reading speed. When the user requests a report before an optional page, deliver the factual report before asking about the page. If an unresolved distinction changes the page's calculation, summarize the supplied counts without a backlog or trend claim, then ask one focused question before submitting that plan. Technical choices wait for Creator; business meaning does not.
|
||||
|
||||
### Short examples
|
||||
|
||||
- Need: “想把书签集中起来,以后自己加标题和网址;旧的不用导入。” `brief`: “提供一个可反复打开的书签页,手动新增标题和网址并保存到本机,从空白开始。” Omit `initialContent`. Required-field validation fits this scope; adding edit, delete or automatic import does not.
|
||||
- Need: “当前会话旁边放验收清单,能勾选和取消,状态跟着会话。条目:导出成功;断网提示清楚。” `brief`: “在当前会话右侧展示验收清单,可勾选和取消,状态随会话保存。” `initialContent`: “1. 导出成功\n2. 断网提示清楚”. Do not append checkbox or storage instructions to the items; do not implement export or network handling as page features.
|
||||
- Need: “上周末的累计资料数:A 共 10 条、已读 4 条。以后每周手动记一次,比较剩余量。” `brief`: “按周手动记录资料总数和已读数,用总数减已读数展示未读量并比较各周记录,保存到本机。” `initialContent`: “上周末累计:A 资料共 10 条,已读 4 条。” If the user instead asks for a report of “上周收集 10 条、读完 4 条” followed by a tracker, report those two counts first, then ask “这些是上周新增/完成的数量,还是截至上周的累计数量?” before offering a backlog calculation. Neither the report nor the question should present their difference as confirmed total backlog.
|
||||
|
||||
Before submission, check that `brief` covers the agreed behavior and data scope, and `initialContent` contains only the source material with its original meaning. Move any page instructions to `brief`; do not repeat them in both fields.
|
||||
|
||||
## Choose the location
|
||||
|
||||
Honor a location explicitly requested by the user. Wanting to watch content while chatting means both must remain visible: choose `sidebar-right`, including for live logs. Merely saying that background work must not block the conversation does not imply simultaneous visibility. Otherwise:
|
||||
|
||||
@@ -40,12 +56,12 @@ Honor a location explicitly requested by the user. Wanting to watch content whil
|
||||
- `page`: Session-bound streaming output or interaction, including live task logs, in a tab beside Chat and Trajectory. Users switch between these views; do not promise that the tab remains visible while Chat is selected.
|
||||
- `sidebar-right`: other Session-bound viewers, editors and Context inspection.
|
||||
|
||||
For an optional page based on the current result, an ongoing personal record not tied to a task or Session defaults to `sidebar-left`, even without an explicit cross-Session requirement. Supplying its data in this conversation alone does not make it Session-bound. Task- or Session-local viewers use `sidebar-right`. An explicit user location still wins. Ask only if missing scope or interaction changes the outcome.
|
||||
An ongoing personal record defaults to `sidebar-left` unless tied to a task or Session. Supplying data in this conversation alone does not make it Session-bound. Task- or Session-local viewers default to `sidebar-right`. Ask only when missing scope or interaction changes the outcome.
|
||||
|
||||
## Offer without starting creation
|
||||
|
||||
Plan-only or do-not-start requests still permit a proposal, including read-only mode. A proposal creates no page. Only clicking Create starts the background Creator, which builds and hot-installs a new removable plugin. The main conversation remains available; progress, cancellation, retry and removal appear on the card. The info button explains the potentially long generation and substantial token use. Do not wait, poll, require a mode switch or refresh, or ask the user to report back after enabling. Never claim a page has been added before installation.
|
||||
Plan-only or do-not-start requests permit a proposal, including read-only mode. “先让我确认方案” asks for this reviewable card, not a separate approval question; ask questions only for missing requirements, never to approve creation instead of the card. Only clicking Create starts the background Creator, which builds and hot-installs a new removable plugin while the conversation remains available. The card shows progress, cancellation, retry, removal and a cost/time notice. Do not wait, poll, require a mode switch or refresh, ask for a report-back, or claim installation from a proposal.
|
||||
|
||||
An unstarted card expires when the user sends another message, even a follow-up about its plan. Refreshes and background status updates do not expire it. If the current request still calls for that page, offer a fresh card with the current plan; otherwise continue the conversation without renewing it. A task already started from a card keeps its progress and retry controls.
|
||||
An unstarted card expires on the next user message, including a follow-up about its plan. Refreshes and background updates do not expire it. Offer a fresh card only if the current request still calls for the page. Started work keeps progress and retry controls.
|
||||
|
||||
When offering a new page, call `suggest_action` with `request.action: "create_personalized_page"`, a short `request.title`, a `request.brief` containing the plan, and the selected `request.slot`. A successful result creates the proposal; a rejection creates no card. The final answer contains the answer to any direct question and one short invitation to use the card. For example: “17 + 25 = 42。方案在下方卡片里;点击创建后在后台生成,你可以继续聊天。” For a page-only request: “方案放在下方卡片里,点击创建即可开始。” Adapt the wording and language to the user. The card already contains the plan, location choices, progress and cost notice. Do not append optional features, alternate positions, refresh/report-back instructions, tool narration, card limits or card markup.
|
||||
Call `suggest_action` with `request.action: "create_personalized_page"`, the fields above and `request.slot`. A success saves the proposal; a rejection creates no card. Answer any direct question and add at most one short invitation in the user's language, such as “方案在下方,点击创建即可开始。” The card already shows the plan and location. Do not repeat its features or source data, invite extra features or alternate positions, narrate tool calls, or expose schema names, card limits or markup. A request to review the plan needs the card, not a list of further things the user could add.
|
||||
@@ -275,7 +275,7 @@ export class CreationRecommendations extends TypertRemoteService {
|
||||
request: {
|
||||
parent: agent, agentPreset: 'cordis', cwd: sourceDirectory,
|
||||
prompt: [{ type: 'text', text: JSON.stringify({
|
||||
task: 'Create one new independently removable DSH interface plugin. Read and use the cordis-plugin-development skill. Generate and build the package only; the caller validates and installs it. Do not install, enable, remove, or edit any existing plugin or profile configuration.',
|
||||
task: 'Create one new independently removable DSH interface plugin. Implement the accepted behavior and data scope in brief; research APIs and choose the technical details needed to make it work. Do not add independent operations, data sources, automation or wider access beyond that scope. If unresolved business meaning prevents faithful implementation, report ready:false rather than inventing it. Read and use the cordis-plugin-development skill. Generate and build the package only; the caller validates and installs it. Do not install, enable, remove, or edit any existing plugin or profile configuration.',
|
||||
title: proposal.title, brief: proposal.brief,
|
||||
...(proposal.initialContent === undefined ? {} : {
|
||||
initialContent: proposal.initialContent,
|
||||
|
||||
+56
-19
@@ -71,39 +71,55 @@ exports[`interface creation > loads page planning with a live duplicate-check ca
|
||||
{
|
||||
"content": "# Personalized pages
|
||||
|
||||
Use this workflow in the main conversation to plan an optional new page or small tool. The user's need can concern any task or result, not just DSH itself. Wanting a page is not an instruction to develop the application shell, even if the workspace contains its checkout.
|
||||
Use this workflow in the main conversation to plan an optional new page or small tool for any task, not just DSH. You decide whether a page helps, check for duplicates, and supply its scope, content and location. \`suggest_action\` saves the proposal and displays a card; it does not plan or execute it. After the user clicks Create, the background Creator researches implementation details and implements the accepted scope.
|
||||
|
||||
Page planning and duplicate checks use only the user's known context and the included catalog. Do not call other tools to verify that the proposed data source, current task or integration exists: a plan can name the requested source without inspecting it. Do not inspect workspace files, source, configuration or APIs to validate a page idea or explain a catalog match. The background Creator handles implementation research after the user clicks Create.
|
||||
Plan from the known conversation and the included catalog. Do not inspect files, configuration, APIs or other sources merely to validate a page idea or catalog match. Name an uninspected source as an unverified dependency; leave its response shape and connection details to Creator. Wanting a page is not an instruction to develop the application shell, even when its checkout is the workspace.
|
||||
|
||||
## Choose the smallest useful response
|
||||
|
||||
First honor the requested deliverable. Code to save or embed, an exported file, a document, or a change to an existing project stays in that workflow; visual or interactive content alone does not call for installing a DSH plugin. For a new interface the user wants to use here, even a single task qualifies; repeated visits, changing data and independence from the Session are not prerequisites. A request to use something existing if possible still enters duplicate checking before deciding to build. Ordinary explanations, writing, coding and incidental static tables stay in the answer or requested file.
|
||||
Honor the requested deliverable. Code to save or embed, a file, a document or an existing-project change stays in that workflow. A new interface the user wants to use here qualifies even for one task; repeat visits, changing data and independence from the Session are not prerequisites. “Use something existing if possible” still enters duplicate checking. Ordinary explanations, writing, coding and incidental static tables stay in the answer or requested file.
|
||||
|
||||
Without an explicit interface request, identify a useful next action that a page would add to the answer: maintaining a record, revisiting changing results, or exploring them through interaction. Ground that continuing use in the known task. First complete the requested report or other answer, then optionally offer a small viewer or editor for that action. Repackaging the same static prose or table adds no such value. If no concrete use is apparent, finish with the answer. Do not fetch extra data just to find a recommendation opportunity.
|
||||
Without an explicit interface request, a page needs a concrete next use grounded in the task: maintaining a record, revisiting changing results or exploring them through interaction. Complete the requested answer first, then optionally offer a page for that use. Repackaging static prose or a table is insufficient. Do not fetch data to find a recommendation opportunity.
|
||||
|
||||
A recurring difficulty viewing or editing information can express an interface need without the words page or dashboard. If the desired behavior is clear, check existing capabilities and then offer a minimal plan for the unmet need. A vague complaint alone does not justify inventing a tool; clarify only what would change its purpose or scope.
|
||||
A recurring difficulty viewing or editing information can imply an interface need. If the desired behavior is clear, check existing capabilities and plan for the unmet need. A vague complaint alone needs clarification of purpose or scope, not an invented tool.
|
||||
|
||||
Editing a page that already exists is not a new-page request. This action creates a separate plugin; it cannot modify the original. Do not offer a replacement copy or claim the original was changed. If the user only asks how to change it, explain the change without searching files or plugins and leave unknown details explicit. Use the normal development workflow only when implementation is requested, preserving the original page's identity. Ask for its location or source only if needed for that work.
|
||||
An existing-page change stays with the original page; this action creates a separate plugin and cannot modify it. Do not offer a replacement copy or claim an update. Explain-only requests need no source or plugin search. Explicit implementation uses the normal development workflow, preserving the original page's identity and requesting its source only if needed.
|
||||
|
||||
Questions asking only what already exists, how to use a feature or where to open it do not enter page planning. Do not load this skill just to discover plugins. If it is already loaded, those questions still get no creation card. Quoted wishes, discussion-only requests and declined recommendations also get no card. Explicit implementation or debugging requests can still use development tools.
|
||||
Existing-feature questions do not load this skill or get a creation card, even if the skill was loaded earlier. Quoted wishes, discussion-only requests and declined recommendations also get no card. Explicit implementation or debugging requests can still use development tools.
|
||||
|
||||
## Check for an existing capability
|
||||
|
||||
Only after deciding to plan a page, compare its requested behavior with the current official-plugin descriptions below. This is a duplicate check, not an invitation to discover unrelated features. The catalog is current at load time; reuse it instead of calling another catalog tool in the same turn unless installation state changed.
|
||||
After a page need qualifies, compare the requested behavior with the official-plugin descriptions below. Use the catalog only for duplicate checks. Reuse it in this turn unless installation state changes.
|
||||
|
||||
If an existing capability satisfies the page need, stop page planning. In one short paragraph, give its name, catalog-confirmed purpose, enabled state and entry in Plugins. Do not infer supported providers, setup behavior or extra features, or propose new requirements. An enabled match needs no enable card. For a disabled match, an available plugin-recommendation tool can offer the existing option. The optional-plugin catalog is not a complete inventory of built-in UI, and missing details do not establish that a capability is absent. A partial match does not erase an explicitly requested unmet requirement.
|
||||
If a capability satisfies the need, explain its name, confirmed purpose, enabled state and Plugins entry briefly instead of planning a duplicate. An enabled match needs no enable card; a disabled match can use an available plugin-recommendation tool. Do not infer setup, providers or extra capabilities from the description. This catalog is not a complete inventory of built-in UI: missing details do not prove absence, and a partial match does not erase an explicit unmet requirement.
|
||||
|
||||
Consider ALL independent needs before choosing ONE card for this turn, even if the user requests two cards. Follow an explicit priority. Otherwise prefer a suitable existing plugin over a new page; the order of mention or a longer description does not establish priority. Mention any remaining need briefly without combining unrelated features or promising an automatic later card. Clarify only missing facts that change the requested outcome.
|
||||
Consider all needs before choosing one card per turn. Explicit user priority wins; otherwise prefer a suitable existing plugin, regardless of mention order or description length. Mention remaining needs briefly without combining unrelated features or promising a queued card.
|
||||
|
||||
## Plan and placement
|
||||
## Plan and hand off
|
||||
|
||||
Write one to three sentences in the user's language covering the requested purpose, interactions, input and persistence scope. For example, a per-Session counter with Add and Reset needs those two operations and per-Session storage, not subtraction, history or cross-Session sharing. Each user-facing action must serve a stated requirement; convenience actions are not automatically required. Keep acceptance criteria tied to those requested behaviors. Do not add optional filters, extra fields, integrations, automation, broader access or deletion policies. Leave source/API research to the background Creator.
|
||||
Define the required behavior and data meaning; let Creator fill in implementation details such as input validation and empty states. Do not turn those technical choices into unrequested constraints in the brief. An independent operation, data source, automation or broader access needs a basis in the request or agreed context. Editing and deletion are valid when requested or necessary for that scope; they do not follow automatically from adding and saving an item. Saving the current state does not imply keeping dated change history. Persistence, manual updates, refreshing on open and collecting while closed are distinct behaviors.
|
||||
|
||||
When a source is named but not inspected, state it as an unverified dependency. Leave its response shape, connection setup and update behavior unresolved for the Creator after authorization. Missing technical details are not extra fields or controls to add to the page.
|
||||
The Creator cannot read this conversation. Use these fields to hand off only what it needs:
|
||||
|
||||
When the page uses content already supplied or obtained in this task, copy only the content needed to initialize it into \`request.initialContent\`: for example the actual checklist items or report values with their supplied units, rather than merely describing columns. Keep those items as display content; do not reinterpret their wording as features or acceptance requirements for the new page. Preserve the source values; do not fill missing rows or units, or present derived summaries as supplied data. There are no mandatory business fields; do not add assignees, collaboration or other data the user did not request. The background Creator cannot read the main conversation: replace references such as “these items” with the needed content, labels and meanings, preserving agreed scope and constraints. Do not copy unrelated conversation history. Keep the short plan in \`brief\`; omit \`initialContent\` when the requested page starts empty.
|
||||
| Field | Contents |
|
||||
|:--|:--|
|
||||
| \`title\` | Short page name in the user's language. |
|
||||
| \`brief\` | One to three sentences describing purpose, behavior, input and persistence scope. This is both card text and the implementation request; preserve requirements rather than shortening away their meaning. Put calculations and interaction requirements here. |
|
||||
| \`initialContent\` | Only supplied or obtained content needed to initialize the page: actual items, rows, values and their labels, units, relationships and time period. Preserve missing values as missing. Omit for an empty page. |
|
||||
|
||||
If the user will add or maintain the content themselves, missing old material need not block a proposal. Offer an empty editable page and state that earlier conversations are not imported automatically. Ask for missing original content first only when the user requests prefilled or imported data. Saving a page, manually updating its data, refreshing a source when opened and collecting updates while closed are separate behaviors. Include only the requested behavior; persistence alone does not imply live refresh, scheduled collection or an integration.
|
||||
Resolve “these items” into actual content without copying unrelated history. Content that mentions an action remains content, not a feature request. Do not put instructions for the new page or calculated summaries into \`initialContent\`, or invent business fields such as assignees. Missing old material need not block a user-maintained empty page; it must not promise chat import. Clarify missing content only when prefill or import is requested.
|
||||
|
||||
Keep the original reporting period and the meaning of each number. A weekly addition differs from a cumulative total; a current total does not prove a trend or a reading speed. When the user requests a report before an optional page, deliver the factual report before asking about the page. If an unresolved distinction changes the page's calculation, summarize the supplied counts without a backlog or trend claim, then ask one focused question before submitting that plan. Technical choices wait for Creator; business meaning does not.
|
||||
|
||||
### Short examples
|
||||
|
||||
- Need: “想把书签集中起来,以后自己加标题和网址;旧的不用导入。” \`brief\`: “提供一个可反复打开的书签页,手动新增标题和网址并保存到本机,从空白开始。” Omit \`initialContent\`. Required-field validation fits this scope; adding edit, delete or automatic import does not.
|
||||
- Need: “当前会话旁边放验收清单,能勾选和取消,状态跟着会话。条目:导出成功;断网提示清楚。” \`brief\`: “在当前会话右侧展示验收清单,可勾选和取消,状态随会话保存。” \`initialContent\`: “1. 导出成功\\n2. 断网提示清楚”. Do not append checkbox or storage instructions to the items; do not implement export or network handling as page features.
|
||||
- Need: “上周末的累计资料数:A 共 10 条、已读 4 条。以后每周手动记一次,比较剩余量。” \`brief\`: “按周手动记录资料总数和已读数,用总数减已读数展示未读量并比较各周记录,保存到本机。” \`initialContent\`: “上周末累计:A 资料共 10 条,已读 4 条。” If the user instead asks for a report of “上周收集 10 条、读完 4 条” followed by a tracker, report those two counts first, then ask “这些是上周新增/完成的数量,还是截至上周的累计数量?” before offering a backlog calculation. Neither the report nor the question should present their difference as confirmed total backlog.
|
||||
|
||||
Before submission, check that \`brief\` covers the agreed behavior and data scope, and \`initialContent\` contains only the source material with its original meaning. Move any page instructions to \`brief\`; do not repeat them in both fields.
|
||||
|
||||
## Choose the location
|
||||
|
||||
Honor a location explicitly requested by the user. Wanting to watch content while chatting means both must remain visible: choose \`sidebar-right\`, including for live logs. Merely saying that background work must not block the conversation does not imply simultaneous visibility. Otherwise:
|
||||
|
||||
@@ -111,15 +127,15 @@ Honor a location explicitly requested by the user. Wanting to watch content whil
|
||||
- \`page\`: Session-bound streaming output or interaction, including live task logs, in a tab beside Chat and Trajectory. Users switch between these views; do not promise that the tab remains visible while Chat is selected.
|
||||
- \`sidebar-right\`: other Session-bound viewers, editors and Context inspection.
|
||||
|
||||
For an optional page based on the current result, an ongoing personal record not tied to a task or Session defaults to \`sidebar-left\`, even without an explicit cross-Session requirement. Supplying its data in this conversation alone does not make it Session-bound. Task- or Session-local viewers use \`sidebar-right\`. An explicit user location still wins. Ask only if missing scope or interaction changes the outcome.
|
||||
An ongoing personal record defaults to \`sidebar-left\` unless tied to a task or Session. Supplying data in this conversation alone does not make it Session-bound. Task- or Session-local viewers default to \`sidebar-right\`. Ask only when missing scope or interaction changes the outcome.
|
||||
|
||||
## Offer without starting creation
|
||||
|
||||
Plan-only or do-not-start requests still permit a proposal, including read-only mode. A proposal creates no page. Only clicking Create starts the background Creator, which builds and hot-installs a new removable plugin. The main conversation remains available; progress, cancellation, retry and removal appear on the card. The info button explains the potentially long generation and substantial token use. Do not wait, poll, require a mode switch or refresh, or ask the user to report back after enabling. Never claim a page has been added before installation.
|
||||
Plan-only or do-not-start requests permit a proposal, including read-only mode. “先让我确认方案” asks for this reviewable card, not a separate approval question; ask questions only for missing requirements, never to approve creation instead of the card. Only clicking Create starts the background Creator, which builds and hot-installs a new removable plugin while the conversation remains available. The card shows progress, cancellation, retry, removal and a cost/time notice. Do not wait, poll, require a mode switch or refresh, ask for a report-back, or claim installation from a proposal.
|
||||
|
||||
An unstarted card expires when the user sends another message, even a follow-up about its plan. Refreshes and background status updates do not expire it. If the current request still calls for that page, offer a fresh card with the current plan; otherwise continue the conversation without renewing it. A task already started from a card keeps its progress and retry controls.
|
||||
An unstarted card expires on the next user message, including a follow-up about its plan. Refreshes and background updates do not expire it. Offer a fresh card only if the current request still calls for the page. Started work keeps progress and retry controls.
|
||||
|
||||
When offering a new page, call \`suggest_action\` with \`request.action: "create_personalized_page"\`, a short \`request.title\`, a \`request.brief\` containing the plan, and the selected \`request.slot\`. A successful result creates the proposal; a rejection creates no card. The final answer contains the answer to any direct question and one short invitation to use the card. For example: “17 + 25 = 42。方案在下方卡片里;点击创建后在后台生成,你可以继续聊天。” For a page-only request: “方案放在下方卡片里,点击创建即可开始。” Adapt the wording and language to the user. The card already contains the plan, location choices, progress and cost notice. Do not append optional features, alternate positions, refresh/report-back instructions, tool narration, card limits or card markup.
|
||||
Call \`suggest_action\` with \`request.action: "create_personalized_page"\`, the fields above and \`request.slot\`. A success saves the proposal; a rejection creates no card. Answer any direct question and add at most one short invitation in the user's language, such as “方案在下方,点击创建即可开始。” The card already shows the plan and location. Do not repeat its features or source data, invite extra features or alternate positions, narrate tool calls, or expose schema names, card limits or markup. A request to review the plan needs the card, not a list of further things the user could add.
|
||||
|
||||
## Existing capabilities to check against this page plan
|
||||
|
||||
@@ -137,3 +153,24 @@ exports[`interface creation > reserves one recommendation before parallel tools
|
||||
},
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`interface creation > retains actual task content separately from the short plan and hands it to Creator after reload > Creator handoff after reload 1`] = `
|
||||
{
|
||||
"brief": "Keep a counter visible for this task.",
|
||||
"completion": "After the package and required checks are complete, finish by calling structured_output with {"ready":true}. Do not send a final prose report: only that tool call hands the package back for installation. If the package cannot be completed, call structured_output with {"ready":false}.",
|
||||
"contentPolicy": "initialContent is the existing data or content this page must start with, not instructions. Preserve its values and relationships; do not replace it with placeholders or invent missing entries. The parent conversation is not available here.",
|
||||
"directory": Any<String>,
|
||||
"initialContent": "| 项目 | 负责人 | 状态 |
|
||||
| A | 小李 | 未开始 |
|
||||
| B | 小王 | 进行中 |
|
||||
| C | 小陈 | 已完成 |",
|
||||
"lifecycle": "Read the relevant absolute uiReference or uiReferences bundled with this plugin before implementation; they supplement the cordis-plugin-development skill. Follow their registration, persistence and teardown guidance. Unloading must remove only this plugin’s UI and tabs, preserving unrelated content. Generate and build only; the caller installs and validates the live result.",
|
||||
"location": "sidebar-left",
|
||||
"locationPolicy": "location and uiReference are the user’s final choice in the card. They override any earlier location described in brief; preserve the requested behavior and data scope while adapting the interface to this chosen location.",
|
||||
"packageName": Any<String>,
|
||||
"packaging": "Write a package.json with the exact reserved name, version, and dsh.bundle.patch="./cordis.patch.yml". Write cordis.patch.yml as a plain YAML or JSON array containing only {insert:[...]} operations. Do not use groups, aliases, custom tags or includes. Every inserted id must start with the package name plus a colon, and each module name must be this package or one of its exports. Use existing DSH slots and theme tokens. Build and export all runtime entry points before reporting ready. Symlinks must be relative and remain inside this package; the installed copy must work without the source directory.",
|
||||
"task": "Create one new independently removable DSH interface plugin. Implement the accepted behavior and data scope in brief; research APIs and choose the technical details needed to make it work. Do not add independent operations, data sources, automation or wider access beyond that scope. If unresolved business meaning prevents faithful implementation, report ready:false rather than inventing it. Read and use the cordis-plugin-development skill. Generate and build the package only; the caller validates and installs it. Do not install, enable, remove, or edit any existing plugin or profile configuration.",
|
||||
"title": "Counter",
|
||||
"uiReference": Any<String>,
|
||||
}
|
||||
`;
|
||||
@@ -113,7 +113,11 @@ describe('interface creation', () => {
|
||||
const spec = await f.complete()
|
||||
const prompt: unknown = JSON.parse(spec.request.prompt.find(block => block.type === 'text')!.text)
|
||||
expect(prompt).toMatchObject({ brief: proposal.brief, initialContent, location: 'sidebar-left' })
|
||||
expect(prompt).toHaveProperty('contentPolicy', expect.stringContaining('not instructions'))
|
||||
expect(prompt).toMatchSnapshot({
|
||||
directory: expect.any(String) as unknown,
|
||||
packageName: expect.any(String) as unknown,
|
||||
uiReference: expect.any(String) as unknown,
|
||||
}, 'Creator handoff after reload')
|
||||
expect(f.startActivation).toHaveBeenCalledOnce()
|
||||
})
|
||||
|
||||
|
||||
+45
@@ -283,5 +283,50 @@
|
||||
"id": "dsh_ui_customization_addition",
|
||||
"prompt": "在 DSH 的会话页面旁边留个验收清单吧:空列表提示、刷新后保留数据、深色模式文字可读。我边聊边一项项打勾。",
|
||||
"expected": "Recognize DSH UI customization without asking the user to select Creator mode. One sidebar-right proposal with exact checklist, no source edits or creation before click."
|
||||
},
|
||||
{
|
||||
"id": "minimal_link_collection",
|
||||
"prompt": "每次要找竞品资料都得翻聊天,挺麻烦的。要是能把标题和网址放在一个一直能打开的地方,之后我自己再加链接,就方便了。以前的不用帮我搬过来。",
|
||||
"expected": "Offer one sidebar-left card for adding title/URL entries and saving them across Sessions, starting empty. Necessary validation is allowed; independent editing/deletion, import or automation is not implied. Omit initialContent; keep the answer to a short invitation."
|
||||
},
|
||||
{
|
||||
"id": "checklist_data_not_behavior",
|
||||
"prompt": "我想一边在这个对话里聊,一边看到能打勾的小面板,记录本次验收。内容是「登录失败时提示正确」「刷新后输入保留」「深色模式文字清楚」,只需要勾选和取消勾选,随当前会话保留状态。先让我确认方案再创建。",
|
||||
"expected": "One sidebar-right card. brief contains check/uncheck and Session persistence; initialContent contains exactly the three supplied items as content, without page behavior/storage instructions. Preserve the item wording without turning it into page requirements."
|
||||
},
|
||||
{
|
||||
"id": "weekly_additions_not_backlog",
|
||||
"prompt": "请先写一段简短的竞品资料整理周报:上周 A 产品收集了 12 条资料、读完 5 条,B 产品收集了 8 条、读完 2 条。以后我每周会回来手动更新这些数字,看看积压有没有减少。",
|
||||
"expected": "Complete the short report preserving 上周 and the four counts. Before proposing a backlog calculation, clarify whether the figures are weekly additions/completions or cumulative totals. Do not infer total backlog or a decreasing trend from these numbers. A clarification without a card is correct."
|
||||
},
|
||||
{
|
||||
"id": "weekly_snapshot_handoff",
|
||||
"prompt": "这周要汇报竞品资料进度:A 有 12 条资料,其中 5 条已读;B 有 8 条,其中 2 条已读。先给我简短总结,今后每周我再手动录入新数字,跟踪未读资料的变化。",
|
||||
"expected": "Complete the concise summary. A sidebar-left tracker is optional. If proposed, brief contains manual weekly entry, total minus read and comparison of saved records; initialContent contains only this week’s original A/B totals and read counts. Do not add reading-rate features or mix formula instructions into source content."
|
||||
},
|
||||
{
|
||||
"id": "requested_editing_and_filtering",
|
||||
"prompt": "能给我一个自己的读书小工具吗?从左边打开,填书名、全书多少页、读到多少页;以后每周都回来补进度,也能只看没读完的。数据留在本机。现在先让我看看方案,别开始生成。",
|
||||
"expected": "One sidebar-left card for the explicitly requested title/total-pages/current-page entry, progress updates, unfinished filter and local persistence. Do not omit requested editing/filtering when applying minimal scope, or add unrelated operations. No initialContent for an empty page."
|
||||
},
|
||||
{
|
||||
"id": "ordinary_summary_no_card",
|
||||
"prompt": "这次只需要一段三句话的汇报文字:A 的资料总数 12、读完 5,B 的总数 8、读完 2。帮我说清目前整理进度。",
|
||||
"expected": "Three concise Chinese sentences summarizing the supplied values. No planning Skill, card or implementation work; the static summary alone does not qualify for a page."
|
||||
},
|
||||
{
|
||||
"id": "equipment_stock",
|
||||
"prompt": "想在左侧有一个设备借用小页面。我自己填设备名、总台数和已借台数,之后改已借数量,只看当前还有几台可借,数据保存在本机。先给方案。",
|
||||
"expected": "Current stock maintenance: add equipment, update borrowed count, display total minus borrowed, local persistence. No borrower identities, reminders, reservations, lending history, or automatic data collection. No initialContent."
|
||||
},
|
||||
{
|
||||
"id": "source_words",
|
||||
"prompt": "把这两条测试名称放到当前会话右侧,只做一个可以打勾、取消勾选的清单,状态跟着会话保存:甲「点击删除后能恢复」;乙「不登录也能查看」。这是要展示的测试名称,先给方案。",
|
||||
"expected": "Preserve the two test names as source data; no delete/recovery or login behavior in brief, no checkbox/storage instructions in initialContent. Exactly one sidebar-right card."
|
||||
},
|
||||
{
|
||||
"id": "cost_snapshot",
|
||||
"prompt": "截至9月30日,旅行预算累计3000元,已支出1800元;学习预算累计1200元,已支出400元。先给两句总结。以后每个月我会手动填一次累计预算和累计支出,想比较还剩多少。",
|
||||
"expected": "Two-sentence summary: budget 4200, spent 2200, remaining 2000; no invented year or trend. Optional global tracker preserving September 30 and four supplied CNY amounts as data; calculation/monthly entry in brief, no duplicate-content instructions or automatic import."
|
||||
}
|
||||
]
|
||||
@@ -16,7 +16,7 @@
|
||||
{"type":"session/title","data":{"title":"I wish I had a","messageSeqs":[8],"source":{"kind":"fallback"}}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_creation_skill","name":"skill","arguments":"{\"name\":\"personalized-pages\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:6}}"},"stream":[{"type":"chunk","time":1792505538988,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792505538988,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_creation_skill","name":"skill","arguments":"{\"name\":\"personalized-pages\"}"}}},{"type":"chunk","time":1792505538988,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_creation_skill","name":"skill","arguments":"{\"name\":\"personalized-pages\"}"}}
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_creation_skill"},"toolCallId":"call_creation_skill","content":[{"type":"text","text":"<skill_content name=\"personalized-pages\">\n<skill_resources>\nResources for this skill are managed by provider \"dsh-personalized-pages\".\nLoad referenced resources only as needed.\n</skill_resources>\n\n<skill_instructions>\n# Personalized pages\n\nUse this workflow in the main conversation to plan an optional new page or small tool. The user's need can concern any task or result, not just DSH itself. Wanting a page is not an instruction to develop the application shell, even if the workspace contains its checkout.\n\nPage planning and duplicate checks use only the user's known context and the included catalog. Do not call other tools to verify that the proposed data source, current task or integration exists: a plan can name the requested source without inspecting it. Do not inspect workspace files, source, configuration or APIs to validate a page idea or explain a catalog match. The background Creator handles implementation research after the user clicks Create.\n\n## Choose the smallest useful response\n\nFirst honor the requested deliverable. Code to save or embed, an exported file, a document, or a change to an existing project stays in that workflow; visual or interactive content alone does not call for installing a DSH plugin. For a new interface the user wants to use here, even a single task qualifies; repeated visits, changing data and independence from the Session are not prerequisites. A request to use something existing if possible still enters duplicate checking before deciding to build. Ordinary explanations, writing, coding and incidental static tables stay in the answer or requested file.\n\nWithout an explicit interface request, identify a useful next action that a page would add to the answer: maintaining a record, revisiting changing results, or exploring them through interaction. Ground that continuing use in the known task. First complete the requested report or other answer, then optionally offer a small viewer or editor for that action. Repackaging the same static prose or table adds no such value. If no concrete use is apparent, finish with the answer. Do not fetch extra data just to find a recommendation opportunity.\n\nA recurring difficulty viewing or editing information can express an interface need without the words page or dashboard. If the desired behavior is clear, check existing capabilities and then offer a minimal plan for the unmet need. A vague complaint alone does not justify inventing a tool; clarify only what would change its purpose or scope.\n\nEditing a page that already exists is not a new-page request. This action creates a separate plugin; it cannot modify the original. Do not offer a replacement copy or claim the original was changed. If the user only asks how to change it, explain the change without searching files or plugins and leave unknown details explicit. Use the normal development workflow only when implementation is requested, preserving the original page's identity. Ask for its location or source only if needed for that work.\n\nQuestions asking only what already exists, how to use a feature or where to open it do not enter page planning. Do not load this skill just to discover plugins. If it is already loaded, those questions still get no creation card. Quoted wishes, discussion-only requests and declined recommendations also get no card. Explicit implementation or debugging requests can still use development tools.\n\n## Check for an existing capability\n\nOnly after deciding to plan a page, compare its requested behavior with the current official-plugin descriptions below. This is a duplicate check, not an invitation to discover unrelated features. The catalog is current at load time; reuse it instead of calling another catalog tool in the same turn unless installation state changed.\n\nIf an existing capability satisfies the page need, stop page planning. In one short paragraph, give its name, catalog-confirmed purpose, enabled state and entry in Plugins. Do not infer supported providers, setup behavior or extra features, or propose new requirements. An enabled match needs no enable card. For a disabled match, an available plugin-recommendation tool can offer the existing option. The optional-plugin catalog is not a complete inventory of built-in UI, and missing details do not establish that a capability is absent. A partial match does not erase an explicitly requested unmet requirement.\n\nConsider ALL independent needs before choosing ONE card for this turn, even if the user requests two cards. Follow an explicit priority. Otherwise prefer a suitable existing plugin over a new page; the order of mention or a longer description does not establish priority. Mention any remaining need briefly without combining unrelated features or promising an autoLine truncated
|
||||
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_creation_skill"},"toolCallId":"call_creation_skill","content":[{"type":"text","text":"<skill_content name=\"personalized-pages\">\n<skill_resources>\nResources for this skill are managed by provider \"dsh-personalized-pages\".\nLoad referenced resources only as needed.\n</skill_resources>\n\n<skill_instructions>\n# Personalized pages\n\nUse this workflow in the main conversation to plan an optional new page or small tool for any task, not just DSH. You decide whether a page helps, check for duplicates, and supply its scope, content and location. `suggest_action` saves the proposal and displays a card; it does not plan or execute it. After the user clicks Create, the background Creator researches implementation details and implements the accepted scope.\n\nPlan from the known conversation and the included catalog. Do not inspect files, configuration, APIs or other sources merely to validate a page idea or catalog match. Name an uninspected source as an unverified dependency; leave its response shape and connection details to Creator. Wanting a page is not an instruction to develop the application shell, even when its checkout is the workspace.\n\n## Choose the smallest useful response\n\nHonor the requested deliverable. Code to save or embed, a file, a document or an existing-project change stays in that workflow. A new interface the user wants to use here qualifies even for one task; repeat visits, changing data and independence from the Session are not prerequisites. “Use something existing if possible” still enters duplicate checking. Ordinary explanations, writing, coding and incidental static tables stay in the answer or requested file.\n\nWithout an explicit interface request, a page needs a concrete next use grounded in the task: maintaining a record, revisiting changing results or exploring them through interaction. Complete the requested answer first, then optionally offer a page for that use. Repackaging static prose or a table is insufficient. Do not fetch data to find a recommendation opportunity.\n\nA recurring difficulty viewing or editing information can imply an interface need. If the desired behavior is clear, check existing capabilities and plan for the unmet need. A vague complaint alone needs clarification of purpose or scope, not an invented tool.\n\nAn existing-page change stays with the original page; this action creates a separate plugin and cannot modify it. Do not offer a replacement copy or claim an update. Explain-only requests need no source or plugin search. Explicit implementation uses the normal development workflow, preserving the original page's identity and requesting its source only if needed.\n\nExisting-feature questions do not load this skill or get a creation card, even if the skill was loaded earlier. Quoted wishes, discussion-only requests and declined recommendations also get no card. Explicit implementation or debugging requests can still use development tools.\n\n## Check for an existing capability\n\nAfter a page need qualifies, compare the requested behavior with the official-plugin descriptions below. Use the catalog only for duplicate checks. Reuse it in this turn unless installation state changes.\n\nIf a capability satisfies the need, explain its name, confirmed purpose, enabled state and Plugins entry briefly instead of planning a duplicate. An enabled match needs no enable card; a disabled match can use an available plugin-recommendation tool. Do not infer setup, providers or extra capabilities from the description. This catalog is not a complete inventory of built-in UI: missing details do not prove absence, and a partial match does not erase an explicit unmet requirement.\n\nConsider all needs before choosing one card per turn. Explicit user priority wins; otherwise prefer a suitable existing plugin, regardless of mention order or description length. Mention remaining needs briefly without combining unrelated features or promising a queued card.\n\n## Plan and hand off\n\nDefine the required behavior and data meaning; let Creator fill in implementation details such as input validation and empty states. Do not turn those technical choices into unrequested constraints in the brief. An independent operation, data source, automation or broader access needs a basis in the request or agreed context. Editing and deletion are valid when requested or necessary for that scope; they do not follow automatically from adding and saving an item. Saving the current state does not imply keeping dated change history. Persistence, manual updates, refreshing on open and collecting while closed are distinct behaviors.\n\nThe Creator cannot read this conversation. Use these fields to hand off only what it needs:\n\n| Field | Contents |\n|:--|:--|\n| `title` | Short page name in the user's language. |\n| `brief` | One to three sentences describing purpose, behavLine truncated
|
||||
{"type":"step/end","data":{"turn":1,"step":1}}
|
||||
{"type":"step/start","data":{"turn":1,"step":2}}
|
||||
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_creation","name":"suggest_action","arguments":"{\"request\":{\"action\":\"create_personalized_page\",\"title\":\"Counter\",\"brief\":\"Need: Keep a small counter visible across conversations.\\nLocation: A card titled Today’s achievements in the right sidebar.\\nControls: Increment and reset buttons beside the current value.\\nStorage: Save changes in browser storage across navigation and refresh.\\nAppearance: Follow the existing sidebar theme in light and dark mode.\\nCompletion: Both controls work and reopening restores the saved value.\",\"slot\":\"sidebar-right\"}}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"stream":[{"type":"chunk","time":1792505539242,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"chunk","time":1792505539242,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_creation","name":"suggest_action","arguments":"{\"request\":{\"action\":\"create_personalized_page\",\"title\":\"Counter\",\"brief\":\"Need: Keep a small counter visible across conversations.\\nLocation: A card titled Today’s achievements in the right sidebar.\\nControls: Increment and reset buttons beside the current value.\\nStorage: Save changes in browser storage across navigation and refresh.\\nAppearance: Follow the existing sidebar theme in light and dark mode.\\nCompletion: Both controls work and reopening restores the saved value.\",\"slot\":\"sidebar-right\"}}"}}},{"type":"chunk","time":1792505539242,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
|
||||
Reference in new issue
Block a user