openyida 2026.11.7 → 2026.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -336,7 +336,7 @@ npm run test:e2e:real:skills
336
336
 
337
337
  The runner creates a disposable app, form, and custom page with an `OY_E2E_*` prefix, then verifies token login, app listing, schema fetch, data query, and page publish. It writes a registry to `project/.cache/e2e-real/` so created resources can be audited later. Run `openyida login` for the target environment before starting the real E2E runner.
338
338
 
339
- `test:e2e:real:full` extends the smoke path into a broad deterministic feature matrix: auth/env, app update, form update and option mutation, page build/compile/generate/publish, data create/get/update/query, permission read, page config and short URL check, report create/append, dashboard skill verification, export/import, batch, task-center, formula/doctor/sample/CDN config, and local connector parsing/template generation. AI-backed commands such as `flash-to-prd` are available as the optional `ai` stage because they depend on remote model availability. Workflow mutation is available as the opt-in `process` stage; it creates and republishes a workflow on the disposable E2E form and records advanced official-node fixtures for review.
339
+ `test:e2e:real:full` extends the smoke path into a broad deterministic feature matrix: auth/env, app update, form update and option mutation, page build/compile/generate/publish, data create/get/update/query, permission read, page config and short URL check, report create/append, dashboard skill verification, export/import, batch, task-center, formula/doctor/sample/CDN config, and local connector parsing/template generation. Meeting-note PRD generation is handled by the current agent through the `yida-flash-note-to-prd` skill and verified by reviewing its document output. Workflow mutation is available as the opt-in `process` stage; it creates and republishes a workflow on the disposable E2E form and records advanced official-node fixtures for review.
340
340
 
341
341
  `test:e2e:real:skills` enforces coverage for every directory under `yida-skills/skills/`. Each skill must be classified as real E2E, offline/unit, opt-in, or deprecated with an explicit reason. This prevents new skills from quietly bypassing the real-environment test plan.
342
342
 
@@ -661,7 +661,6 @@ When preparing a PR that needs a personal Fork, or when you ask how to support t
661
661
  | `openyida export-conversation [options]` | Export AI conversation records |
662
662
  | `openyida feedback <report\|github\|setup\|url\|dismiss\|status> [options]` | Prepare local issue reports, configure feedback forms and reminders |
663
663
  | `openyida batch <file>\|--commands "cmd1 ; cmd2" [--concurrency 1..4] [--stop-on-error] [--json]` | Run OpenYida commands in batch |
664
- | `openyida flash-to-prd --file <path> --name "<project>"` | Convert flash notes or meeting notes to a PRD prompt |
665
664
  | `openyida ai <text\|image> [options]` | Call Yida AI text and image recognition APIs |
666
665
  | `openyida asset <status\|resolve\|sources> [options]` | Detect asset capability / resolve materials |
667
666
  | `openyida cdn-config [options]` | Configure CDN / OSS upload |
package/bin/yida.js CHANGED
@@ -478,6 +478,9 @@ function formatSuggestionMessage(suggestion) {
478
478
  function throwUnknownCommand(commandName, commandArgs = []) {
479
479
  const suggestion = findCommandSuggestion([commandName, ...commandArgs]);
480
480
  const lines = [t('cli.unknown_command', commandName)];
481
+ if (commandName === 'flash-to-prd') {
482
+ lines.push(t('cli.flash_note_skill'));
483
+ }
481
484
  if (suggestion) {
482
485
  lines.push(t('cli.command_suggestion', suggestion.suggested_usage));
483
486
  const suggestionMessage = formatSuggestionMessage(suggestion);
@@ -1282,12 +1285,6 @@ async function main() {
1282
1285
  break;
1283
1286
  }
1284
1287
 
1285
- case 'flash-to-prd': {
1286
- const { run: runFlashToPrd } = require('../lib/flash-note/flash-to-prd');
1287
- await runFlashToPrd(args);
1288
- break;
1289
- }
1290
-
1291
1288
  case 'ai': {
1292
1289
  const { run: runAI } = require('../lib/ai/ai');
1293
1290
  await runAI(args);
@@ -442,7 +442,6 @@ const COMMAND_SIDE_EFFECTS = new Map([
442
442
  'design-plan.patch',
443
443
  'export',
444
444
  'export-conversation',
445
- 'flash-to-prd',
446
445
  'login',
447
446
  'login-qwenwork',
448
447
  'logout',
@@ -799,7 +798,6 @@ const COMMAND_PERMISSIONS = new Map([
799
798
  'export-conversation',
800
799
  'externalize-form',
801
800
  'export',
802
- 'flash-to-prd',
803
801
  'import',
804
802
  'integration.create',
805
803
  'integration.update',
@@ -2165,9 +2163,6 @@ const COMMAND_GROUPS = [
2165
2163
  args: [{ name: 'concurrency', type: 'integer', source: 'option', builder_options: ['--concurrency'], description: 'Independent ready-task limit, 1..4; defaults to 1.' }],
2166
2164
  notes: ['Batch only independent ready tasks. Default concurrency is 1; opt in to 1..4. Audited reads and independent page compile/publish commands overlap; conflicting page/source/output writes wait, other commands are serial barriers. Dependent work belongs in later batches. Stop-on-error drains running tasks and stops queued work. Results retain input order and timing; failed batches exit nonzero. Managed-run admission remains unchanged.'],
2167
2165
  }),
2168
- command('flash-to-prd', ['flash-to-prd'], 'flash-to-prd --file <path> --name "<project>"', 'help.cmd_flash_to_prd', { managedRun: { scope: 'denied', reason: 'scope_not_audited' },
2169
- requiresLogin: false,
2170
- }),
2171
2166
  command('ai', ['ai'], 'ai <text|image> [options]', 'help.cmd_ai', { managedRun: { scope: 'denied', reason: 'scope_not_audited' },
2172
2167
  output: 'text|json',
2173
2168
  }),
@@ -320,7 +320,6 @@ module.exports = {
320
320
  cmd_export_conversation: 'Export AI conversation records',
321
321
  cmd_feedback: 'Prepare local issue reports, configure feedback forms and reminders',
322
322
  cmd_batch: 'Run OpenYida commands in batch',
323
- cmd_flash_to_prd: 'Convert flash notes or meeting notes to a PRD prompt',
324
323
  cmd_ai: 'Call Yida AI text and image recognition APIs',
325
324
  cmd_asset: 'Detect asset capability / resolve materials',
326
325
  cmd_cdn: 'CDN image management (config/upload/refresh)',
@@ -475,6 +474,7 @@ Examples:
475
474
  openyida export-conversation --list List available conversations
476
475
  `,
477
476
  unknown_command: 'Unknown command: {0}',
477
+ flash_note_skill: 'The flash-to-prd command has been removed. Ask your current agent to use the yida-flash-note-to-prd skill to generate a PRD directly from the meeting content.',
478
478
  command_suggestion: 'Suggested command: {0}',
479
479
  forbidden_alias_list_apps: '`{0}` is not an OpenYida command; use `{1}` for application discovery.',
480
480
  forbidden_alias_get_app: '`{0}` is ambiguous; use `{1}` for app name search, `{2}` for form/schema lookup, or `{3}` for resource context preflight.',
@@ -1876,52 +1876,6 @@ Options:
1876
1876
  file_not_found: '❌ File not found: {0}',
1877
1877
  },
1878
1878
 
1879
- // ── src/flash-note/flash-to-prd.ts ──────────────
1880
- flashNote: {
1881
- toPrd: {
1882
- title: '📋 DingTalk Flash Note to PRD',
1883
- help_usage: 'Usage: openyida flash-to-prd --file <flash-note-path> [--name <project-name>]',
1884
- help_usage2: ' openyida flash-to-prd --name <project-name> (read from stdin)',
1885
- help_args_title: 'Arguments:',
1886
- help_arg_file: ' --file, -f <path> Flash note file path (.txt / .md)',
1887
- help_arg_name: ' --name, -n <name> Project name (optional, auto-extracted from content)',
1888
- help_arg_max_tokens: ' --max-tokens <count> Max AI output tokens (default 8000)',
1889
- help_examples_title: 'Examples:',
1890
- help_example1: ' openyida flash-to-prd --file ./meeting-notes.txt --name "Equipment Inspection"',
1891
- help_example2: ' cat meeting.txt | openyida flash-to-prd --name "Equipment Inspection"',
1892
- step_read: '[Step 1] Reading flash note content...',
1893
- file_not_found: 'File not found: {0}',
1894
- no_input: 'No flash note content provided. Use --file to specify a file, or pipe content via stdin.',
1895
- stdin_empty: 'Standard input is empty',
1896
- read_success: '✅ Read successfully, {0} characters',
1897
- step_load_module: '[Step 2] Loading prompt builder module...',
1898
- module_loaded_builtin: '✅ Built-in prompt module loaded',
1899
- module_loaded_local: '✅ Local prompt module loaded: {0}',
1900
- module_not_found: '❌ build-flash-note-prompt.js module not found',
1901
- module_path_tried: ' Tried path {0}: {1}',
1902
- step_preprocess: '[Step 3] Preprocessing + meeting recognition...',
1903
- preprocess_result: ' Preprocessed: {0} chars -> {1} chars',
1904
- meeting_meta: ' Meeting metadata: {0} fields{1}',
1905
- a1_sections: ' A1 summary sections: {0}{1}',
1906
- speakers: ' Speakers identified: {0}{1}',
1907
- speakers_with_role: ' (with {0} role annotations)',
1908
- step_login: '[Step 4] Checking login status...',
1909
- no_login: ' No login session found, triggering login...',
1910
- login_ready: '✅ Login ready ({0})',
1911
- step_ai: '[Step 5] Calling AI to generate PRD...',
1912
- single_segment: ' Single segment mode, prompt length: {0} chars',
1913
- multi_segment: ' Multi-segment mode, {0} segments total',
1914
- extracting_segment: ' Extracting segment {0}/{1} ({2} chars)...',
1915
- merging_segments: ' Merging segment results...',
1916
- ai_success: '✅ PRD generated successfully',
1917
- ai_error: 'AI API call failed: {0}',
1918
- done: '✅ Flash note to PRD complete',
1919
- done_project: ' Project name: {0}',
1920
- done_file: ' Output file: {0}',
1921
- done_size: ' File size: {0} characters',
1922
- done_meeting: ' Meeting recognition: {0} metadata fields, {1} A1 sections, {2} speakers',
1923
- },
1924
- },
1925
1879
 
1926
1880
  // ── lib/process/preview-process.js ─────────────────
1927
1881
  preview_process: {
@@ -320,7 +320,6 @@ module.exports = {
320
320
  cmd_export_conversation: '导出 AI 对话记录',
321
321
  cmd_feedback: '整理本地问题报告、配置反馈表单与提醒',
322
322
  cmd_batch: '批量执行 OpenYida 命令',
323
- cmd_flash_to_prd: '闪记 / 会议纪要转 PRD prompt',
324
323
  cmd_ai: '调用 AI 文生文和识图能力',
325
324
  cmd_asset: '检测素材能力 / 解析回填素材',
326
325
  cmd_cdn: 'CDN 图片管理(配置/上传/刷新)',
@@ -475,6 +474,7 @@ openyida - 宜搭命令行工具
475
474
  openyida export-conversation --list 列出可用对话
476
475
  `,
477
476
  unknown_command: '未知命令: {0}',
477
+ flash_note_skill: 'flash-to-prd 命令已移除。请将会议内容交给当前 Agent,使用 yida-flash-note-to-prd 技能直接生成 PRD。',
478
478
  command_suggestion: '建议命令: {0}',
479
479
  forbidden_alias_list_apps: '`{0}` 不是 OpenYida 命令;请使用 `{1}` 查询应用。',
480
480
  forbidden_alias_get_app: '`{0}` 含义不明确;按应用名称搜索请用 `{1}`,查询表单/字段结构请用 `{2}`,读取资源上下文请用 `{3}`。',
@@ -1873,52 +1873,6 @@ openyida - 宜搭命令行工具
1873
1873
  file_not_found: '❌ 文件不存在: {0}',
1874
1874
  },
1875
1875
 
1876
- // ── src/flash-note/flash-to-prd.ts ──────────────
1877
- flashNote: {
1878
- toPrd: {
1879
- title: '📋 钉钉闪记转 PRD',
1880
- help_usage: '用法:openyida flash-to-prd --file <闪记文件路径> [--name <项目名>]',
1881
- help_usage2: ' openyida flash-to-prd --name <项目名> (从标准输入读取)',
1882
- help_args_title: '参数:',
1883
- help_arg_file: ' --file, -f <路径> 闪记文本文件路径(支持 .txt / .md)',
1884
- help_arg_name: ' --name, -n <名称> 项目名称(可选,默认从闪记内容中自动提取)',
1885
- help_arg_max_tokens: ' --max-tokens <数量> AI 最大输出 token 数(默认 8000)',
1886
- help_examples_title: '示例:',
1887
- help_example1: ' openyida flash-to-prd --file ./meeting-notes.txt --name "设备巡检系统"',
1888
- help_example2: ' cat meeting.txt | openyida flash-to-prd --name "设备巡检系统"',
1889
- step_read: '[Step 1] 读取闪记内容...',
1890
- file_not_found: '文件不存在:{0}',
1891
- no_input: '未提供闪记内容。请使用 --file 指定文件,或通过管道传入内容。',
1892
- stdin_empty: '标准输入内容为空',
1893
- read_success: '✅ 读取成功,原文 {0} 字',
1894
- step_load_module: '[Step 2] 加载 Prompt 构建模块...',
1895
- module_loaded_builtin: '✅ 已加载内置 Prompt 模块',
1896
- module_loaded_local: '✅ 已加载本地 Prompt 模块:{0}',
1897
- module_not_found: '❌ 未找到 build-flash-note-prompt.js 模块',
1898
- module_path_tried: ' 尝试路径 {0}:{1}',
1899
- step_preprocess: '[Step 3] 预处理 + 会议识别...',
1900
- preprocess_result: ' 预处理:{0} 字 → {1} 字',
1901
- meeting_meta: ' 会议元信息:{0} 项{1}',
1902
- a1_sections: ' A1 摘要段落:{0} 段{1}',
1903
- speakers: ' 发言人识别:{0} 位{1}',
1904
- speakers_with_role: '(含角色标注 {0} 位)',
1905
- step_login: '[Step 4] 检查登录态...',
1906
- no_login: ' 未检测到登录态,触发登录...',
1907
- login_ready: '✅ 登录态就绪({0})',
1908
- step_ai: '[Step 5] 调用 AI 生成 PRD...',
1909
- single_segment: ' 单段模式,Prompt 长度:{0} 字',
1910
- multi_segment: ' 多段模式,共 {0} 段',
1911
- extracting_segment: ' 提取第 {0}/{1} 段({2} 字)...',
1912
- merging_segments: ' 合并分段结果...',
1913
- ai_success: '✅ PRD 生成成功',
1914
- ai_error: 'AI 接口调用失败:{0}',
1915
- done: '✅ 闪记转 PRD 完成',
1916
- done_project: ' 项目名称:{0}',
1917
- done_file: ' 输出文件:{0}',
1918
- done_size: ' 文件大小:{0} 字',
1919
- done_meeting: ' 会议识别:元信息 {0} 项,A1 摘要 {1} 段,发言人 {2} 位',
1920
- },
1921
- },
1922
1876
 
1923
1877
  // ── lib/process/preview-process.js ─────────────────
1924
1878
  preview_process: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openyida",
3
- "version": "2026.11.7",
3
+ "version": "2026.11.8",
4
4
  "description": "OpenYida CLI - AI 宜搭应用开发工具(安装即用,零配置)",
5
5
  "bin": {
6
6
  "openyida": "bin/yida.js",
@@ -193,8 +193,8 @@ Fast / Plan 选定的主题和主色属于整个应用:导航、原生页、
193
193
  | 按 taskUuid 读取钉钉听记 | `yida-tingji`,将听记任务 ID 原样传入命令 |
194
194
  | 将钉钉开放平台官方 API 接入宜搭或 Canvas | `yida-dingtalk-openapi`;密钥不进聊天,账号由用户在宜搭或本机 TTY 配置 |
195
195
  | 钉钉事件订阅、Stream 或 HTTP 回调 | OpenYida 不支持;直接说明能力边界并停止,不生成连接器动作 |
196
- | 用户给 taskUuid 并要求转 PRD | 先用 `yida-tingji` 读取听记内容,再把已有内容交给 `yida-flash-note-to-prd` 生成 PRD |
197
- | 已有会议纪要/闪记内容转 PRD | `yida-flash-note-to-prd`,只处理已有内容,不负责按 taskUuid 拉取听记 |
196
+ | 用户给 taskUuid 并要求转 PRD | 先用 `yida-tingji` 读取听记内容,再把已有内容交给 `yida-flash-note-to-prd` 由当前 Agent 直接生成 PRD |
197
+ | 已有会议纪要/闪记内容转 PRD | `yida-flash-note-to-prd`,由当前 Agent 直接处理已有内容;生成阶段无需宜搭登录或远端 AI 接口 |
198
198
  | 只创建应用壳并拿 appType | `yida-create-app`;若随后继续完整搭建,已经确认的 `requirement-brief.json`、`prd.md` 与 `design.md` 保持不变,真实 `appType` 只写入 schema 或当前任务资源上下文 |
199
199
  | 明确强制要求 AI 老应用升级成新版主题 | `yida-upgrade-app-theme`;必须先取得针对目标应用的 ask_human 肯定回复,普通美化/换色/建应用不得触发 |
200
200
  | 启用/上线或停用/下线已有应用 | `yida-app-lifecycle`;只有用户明确要求时执行,`app-offline` 执行前需再次确认目标应用 |
@@ -1,309 +1,54 @@
1
1
  ---
2
2
  name: yida-flash-note-to-prd
3
- description: 从已有钉钉闪记、会议记录或需求文档内容中提取产品需求,生成结构化 PRD。若用户只给 taskUuid,先用 yida-tingji 读取内容,再进入本技能。
3
+ description: 从已有钉钉闪记、会议记录或需求文档内容中提取产品需求,由当前 Agent 直接生成结构化 PRD,适用于本地、远端和托管宿主。若用户只给 taskUuid,先用 yida-tingji 读取内容,再进入本技能。
4
4
  ---
5
5
 
6
6
  # 闪记和会议内容转 PRD
7
7
 
8
- ## 严格禁止 (NEVER DO)
8
+ ## 执行入口
9
9
 
10
- - 不要在没有闪记内容的情况下强行生成 PRD,必须等待用户提供闪记文本、图片或链接
11
- - 不要将生成的 PRD 写入项目根目录,必须写入 `prd/<项目名>/prd.md`
12
- - 不要忽略闪记中的 A1 结构化摘要(会议摘要、待办事项、决策结论),这是最高优先级信息
13
- - 不要生成泛泛的会议纪要,输出必须是可直接驱动宜搭开发的结构化 PRD
10
+ 当前 Agent 使用自身的模型能力理解材料并生成 PRD。本地、远端、千问办公、Codex 和托管任务均使用这一流程。
14
11
 
15
- ## 严格要求 (MUST DO)
12
+ - 已有文本、文件或图片可以直接处理,生成 PRD 无需宜搭登录。
13
+ - 用户只提供 taskUuid 时,先加载 `yida-tingji` 读取听记内容,再处理读取结果。读取听记所需的权限与登录遵循该技能。
14
+ - 用户提供钉钉文档链接时,用 `yida-document-markdown` 获取正文。听记链接中的 taskUuid 交给 `yida-tingji`。
15
+ - 材料无法读取或内容不足以确定任何需求时,说明缺少的内容并请用户补充。
16
+ - Agent 生成 PRD 时,不调用 `openyida flash-to-prd`、`openyida ai` 或 `/query/intelligent/txtFromAI.json`。
16
17
 
17
- - 必须自动识别输入类型:文本闪记 / 图片闪记 / 闪记链接,分别处理
18
- - 用户只提供 `taskUuid` 且要求转 PRD 时,必须先加载 `yida-tingji` 读取听记内容,再用读取结果生成 PRD
19
- - 必须提取会议元信息(标题、参会人、时间)并写入 PRD 上下文
20
- - 生成的 PRD 必须包含:MVP 边界、用户角色与权限、核心用户旅程、功能模块、字段设计表、流程/状态机、数据关联与约束、交互验收标准、报表需求、OpenYida 落地约束、待确认事项
21
- - 生成完成后必须提示用户确认 PRD 内容;用户确认要继续搭应用时,交给 `yida-app`
22
18
 
23
- ## 适用场景
24
19
 
25
- | 用户意图 | 触发条件 |
26
- |---------|---------|
27
- | 闪记转需求文档 | 用户发送闪记文本/图片、提到"闪记"、"会议纪要"、"会议记录" |
28
- | 快速启动开发 | 从会议记录直接生成可执行的 PRD |
29
- | taskUuid 转 PRD | 先由 `yida-tingji` 读取听记,再处理已有内容 |
20
+ ## 生成步骤
30
21
 
31
- ## 触发条件
22
+ 1. 读取用户提供的完整材料,识别会议标题、时间、参会人、转写、会议摘要、决策及待办。
23
+ 2. 提取项目目标、MVP 范围、角色权限、功能、数据字段、流程状态、约束、报表及验收要求。为关键事实保留材料位置或原始措辞。
24
+ 3. 按 [PRD 输出模板](references/flash-note-prd-template.md) 组织 PRD。材料未涉及的章节说明缺口,将需要业务决策的事项列入「待确认事项」。
25
+ 4. 使用宿主的文件写入能力保存至 `prd/<项目名>/prd.md`。无法写文件时,提供完整 Markdown 并说明保存能力的缺口。
26
+ 5. 重新读取产物,逐项核对角色权限、数值、日期、时间、否定条件及例外,确认没有缺章、截断或遗漏材料末尾。
27
+ 6. 返回 PRD 的可访问位置、需求摘要与关键待确认项。用户确认继续搭建应用时,交给 `yida-app`。
32
28
 
33
- **正向触发**:
34
- - 用户发送闪记文本/图片
35
- - 用户提到"闪记"、"会议纪要"、"会议记录"、"闪记转需求"
36
- - 用户发送钉钉闪记链接(`shanji.dingtalk.com` 或 `alidocs.dingtalk.com`)
37
- - 用户口述会议要点,要求整理成需求
29
+ 用户直接提供内容时,从读取材料开始执行;不先检查宜搭登录或创建应用。
38
30
 
39
- > ⚠️ PRD 生成后还需 `yida-app` 流程创建应用;本技能不处理非需求类文档(技术文档、代码文件)。
31
+ ## 长材料处理
40
32
 
41
- ## 异常处理
33
+ 按当前宿主的上下文与文件读取能力分段读取。每段建立需求事实清单,记录来源、明确决策、争议和待确认项,再由当前 Agent 合并清单生成 PRD。
42
34
 
43
- | 异常场景 | 处理方式 |
44
- |---------|----------|
45
- | 闪记内容为空或过短 | 提示用户补充更多会议内容,至少需要包含功能需求描述 |
46
- | 图片识别失败 | 提示用户重新上传清晰图片,或直接粘贴闪记文本 |
47
- | 闪记链接无法访问 | 提示用户在钉钉中打开链接,复制全文后粘贴 |
48
- | PRD 文件写入失败 | 检查 `prd/` 目录是否存在,确认文件系统权限 |
49
- | 生成的 PRD 质量不佳 | 展示待确认事项,引导用户补充关键信息后重新生成 |
35
+ - 按话题、发言或段落拆分;超长单行继续分段,保留所有内容。
36
+ - 覆盖会议摘要和原始转写,并核对首段、中段、末段是否都已读取。
37
+ - 以业务事实清单衔接各段,合并重复项,同时保留独立规则、具体数值与例外。
38
+ - 清单过长时按业务模块分别整理并写入同一份 PRD,最后检查跨模块关联。
39
+ - 输出较长时分章节写入文件,再读取整份产物核对完整性。
50
40
 
51
- ## Agent 错误处理策略
41
+ 具体的分段、事实核对和冲突处理见 [材料处理规则](references/flash-note-prompt.md)。
52
42
 
53
- 当 Agent 执行本技能遇到错误时,必须遵循以下默认行为:
43
+ ## 事实与推导
54
44
 
55
- | 错误类型 | 默认处理策略 |
56
- |---------|-------------|
57
- | 输入内容为空 | 停止执行,主动询问用户提供闪记内容(文本/图片/链接) |
58
- | 输入内容过短(<100 字) | 提示用户内容可能不足以生成完整 PRD,询问是否继续或补充 |
59
- | 图片识别失败 | 提示用户重新上传清晰图片,或改用文本粘贴方式 |
60
- | 闪记链接无法访问 | 引导用户在钉钉中打开链接,复制全文后粘贴 |
61
- | 文件写入失败 | 检查目录权限,尝试创建 `prd/` 目录后重试 |
62
- | 生成结果不完整 | 展示已生成内容,询问用户是否需要补充或调整 |
63
- | 未知错误 | 停止执行,完整展示错误信息,建议用户反馈问题 |
45
+ - 区分原始转写、自动摘要、讨论建议和明确决策。自动摘要与原话冲突时,保留分歧;只有明确的最终决策可以替代旧结论。
46
+ - 保留业务时间、数量、金额、阈值、单位和否定条件。只清理录音定位时间等噪音。
47
+ - 按原文记录操作权限。「调整库存」不自动扩大为新增或删除物料的权限。
48
+ - 区分触发时间和统计范围。只给出报表生成时间时,将统计截止时间列为待确认。
49
+ - 补充的字段、流程或实现建议必须标注为「建议,待确认」,不得作为已经确认的业务规则。
50
+ - PRD 只写业务语义。真实 appType、formUuid、fieldId 由后续搭建回读取得,记录在对应 Schema 台账中。
64
51
 
65
- ---
66
-
67
-
68
- ## 概述
69
-
70
- 本技能将钉钉闪记、会议记录、需求讨论文本或截图转成结构化 PRD。生成结果写入 `prd/<项目名>/prd.md`,用户确认后再交给 `yida-app` 执行应用搭建或补齐。
71
-
72
- > **核心理念**:PRD 只写业务语义和验收口径,便于后续技能读取并执行;不要在 PRD 中编造 `appType`、`formUuid`、`fieldId` 等真实 ID。
73
-
74
- **核心能力**:
75
- - **自动识别闪记输入**:用户直接发送闪记文本或图片,AI 智能体自动触发本技能
76
- - **智能识别钉钉 A1 / 闪记生成的结构化摘要**(会议摘要、待办事项、决策结论等),作为高优先级信息
77
- - **自动提取会议元信息**(标题、参会人、时间、时长等),丰富 PRD 上下文
78
- - **识别发言人角色标注**(如"张三(产品经理)"),帮助区分不同角色视角
79
- - **生成可直接驱动开发的结构化 PRD**,包含 MVP 边界、角色权限、核心旅程、功能模块、字段设计表、流程/状态机、数据约束、验收标准、报表需求和待确认事项
80
-
81
- ---
82
-
83
- ## 何时使用
84
-
85
- 当以下情况发生时,**自动触发**本技能(无需用户明确说"转 PRD"):
86
-
87
- - 用户发送了一段**会议纪要/闪记文本**(包含发言人对话、讨论内容等)
88
- - 用户发送了**闪记截图/图片**(钉钉闪记的图文纪要截图)
89
- - 用户发送了**钉钉闪记链接**(`shanji.dingtalk.com` 或 `alidocs.dingtalk.com`)
90
- - 用户提到"闪记"、"会议纪要"、"会议记录转PRD"、"闪记转需求"等关键词
91
- - 用户口述会议要点,要求整理成需求
92
-
93
- ---
94
-
95
- ## ⚡ AI 智能体自动执行流程(核心)
96
-
97
- > **重要**:本技能的主要执行方式是 **AI 智能体直接处理**,而非调用 CLI 命令。AI 智能体自身就是大模型,可以直接完成闪记内容理解和 PRD 生成。
98
-
99
- 当识别到用户输入为闪记/会议纪要内容时,按以下流程自动执行:
100
-
101
- ```
102
- [Step 1] 识别输入类型
103
- - 图片 → 用视觉能力识别图片中的所有文字内容
104
- - 文本 → 直接使用
105
- - 闪记链接 → 提示用户复制闪记全文后粘贴
106
- ↓
107
- [Step 2] 内容预处理(AI 智能体自行完成,参照预处理规则)
108
- - 去除时间戳、口语填充词、重复标点
109
- - 识别会议元信息(标题、参会人、时间等)
110
- - 识别 A1 生成的结构化摘要段落(📋 会议摘要、✅ 待办事项、📌 决策结论等)
111
- - 识别发言人及其角色标注
112
- ↓
113
- [Step 3] 生成结构化 PRD
114
- - 按照「PRD 输出模板」和「内容提取规则」生成
115
- - AI 智能体直接生成,无需调用外部 AI 接口
116
- - 严格遵循字段设计规则(使用宜搭标准字段类型)
117
- - 每个模块写清功能描述、交互规则、业务规则、字段设计表和验收标准
118
- - PRD 必须包含足够的业务语义信息,使后续技能可直接读取执行
119
- ↓
120
- [Step 4] 写入文件 prd/<项目名>/prd.md
121
- ↓
122
- [Step 5] 输出摘要,询问用户是否需要调整
123
- - 展示:项目名称、功能模块数、待确认事项数
124
- - 询问:是否需要修改或补充
125
- - 用户确认继续搭建时,交给 `yida-app`
126
- ```
127
-
128
- ### 图片输入处理规则
129
-
130
- 当用户发送图片时:
131
- 1. 使用视觉能力**完整识别**图片中的所有文字内容,包括标题、正文、表格、列表等
132
- 2. 注意识别图片中的**结构化布局**(如分栏、卡片、流程图等),保留其逻辑关系
133
- 3. 识别图片中的**标签/标注**(如 Emoji 标识、颜色标注、高亮文字等),这些通常是重点信息
134
- 4. 将识别结果作为闪记文本,进入 Step 2 继续处理
135
-
136
- ### 闪记链接处理规则
137
-
138
- 以下 URL 模式自动识别为钉钉闪记链接:
139
- - `https://shanji.dingtalk.com/app/transcribes/...` — 钉钉闪记(AI 听记)分享链接
140
- - `https://alidocs.dingtalk.com/...` — 钉钉文档中的闪记
141
-
142
- 钉钉闪记页面是 SPA 应用,需要登录态才能获取数据。当用户提供闪记链接时:
143
- 1. 提示用户在钉钉中打开链接,复制闪记全文后粘贴
144
- 2. 或导出为 .txt 文件后告知文件路径
145
-
146
- ---
147
-
148
- ## CLI 命令(可选的自动化工具)
149
-
150
- > 以下 CLI 命令是可选的自动化工具,适用于批量处理或脚本化场景。日常使用中,直接将闪记内容发给 AI 智能体即可。
151
-
152
- ### flash-to-prd — 闪记转 PRD
153
-
154
- ```bash
155
- # 从文件读取闪记内容并生成 PRD
156
- openyida flash-to-prd --file <闪记文件路径> [--name <项目名>]
157
-
158
- # 从标准输入读取闪记内容
159
- cat meeting.txt | openyida flash-to-prd --name <项目名>
160
- ```
161
-
162
- | 参数 | 必填 | 说明 |
163
- |------|------|------|
164
- | `--file` | 否 | 闪记文本文件路径(支持 .txt / .md) |
165
- | `--name` | 否 | 项目名称,用于生成 PRD 文件名(默认从闪记内容中提取) |
166
- | `--max-tokens` | 否 | AI 最大输出 token 数(默认 8000) |
167
-
168
- **输出**:生成 `prd/<项目名>/prd.md` 文件
169
-
170
- ---
171
-
172
- ## 处理流程
173
-
174
- ```
175
- [Step 1] 接收闪记内容(文本/文件/链接)
176
- ↓
177
- [Step 2] 预处理(preprocessFlashNote):
178
- - 去除时间戳、口语填充词、重复标点
179
- - 合并同一发言人的连续发言
180
- - 清理多余空行
181
- ↓
182
- [Step 3] 会议识别(新增能力):
183
- - extractMeetingMeta:提取会议元信息(标题、参会人、时间、时长等)
184
- - extractA1Summary:识别钉钉 A1 生成的结构化摘要段落
185
- - extractSpeakers:识别发言人及其角色标注
186
- - buildMeetingContext:组装会议上下文信息
187
- ↓
188
- [Step 4] 分段判断(splitIntoSegments):
189
- - ≤ 6000 字 → 单段模式
190
- - > 6000 字 → 按段落边界智能分段
191
- ↓
192
- [Step 5] AI 提取(buildFlashNoteToPrdPrompt):
193
- - 会议上下文作为高优先级信息注入 Prompt
194
- - 单段模式:三层 Prompt 架构,直接输出 Markdown PRD
195
- - 多段模式:每段输出 JSON 结构化数据
196
- ↓
197
- [Step 6](仅多段模式)合并去重(buildMergePrompt):
198
- - 合并各段 JSON 结果
199
- - 去重、解决冲突
200
- - 生成完整 Markdown PRD
201
- ↓
202
- [Step 7] 输出到 prd/<项目名>/prd.md
203
- ↓
204
- [Step 8] 展示 PRD 摘要,询问用户确认或调整
205
- ```
206
-
207
- ---
208
-
209
- ## PRD 输出模板
210
-
211
- > 📖 生成的 PRD 文件标准结构详见 [references/flash-note-prd-template.md](references/flash-note-prd-template.md)。
212
-
213
- ---
214
-
215
- ## 生成规则参考
216
-
217
- > 📖 完整的三层 Prompt 架构、Prompt 原文、分段处理策略和调用方式详见 [references/flash-note-prompt.md](references/flash-note-prompt.md)。
218
-
219
- ---
220
-
221
- ## 闪记内容预处理规则
222
-
223
- 在发送给 AI 之前,对闪记原文进行预处理(实现在 `build-flash-note-prompt.js` 的 `preprocessFlashNote` 函数中):
224
-
225
- | 处理步骤 | 说明 | 正则/规则 |
226
- |---------|------|----------|
227
- | 去除时间戳 | 移除 `[00:01:23]` 等时间标记 | `/\[?\d{1,2}:\d{2}(?::\d{2})?\]?\s*/g` |
228
- | 去除口语填充词 | 移除"嗯"、"那个"、"就是说"、"对对对"等口语化表达 | 预定义填充词列表匹配 |
229
- | 合并连续空行 | 多个空行合并为单个换行 | `/\n{3,}/g` → `\n\n` |
230
- | 去除重复标点 | 连续重复标点合并为一个 | `/([,。!?,\.!?])\1+/g` |
231
- | 合并连续发言 | 同一人连续多段发言合并为一段(用逗号连接) | 按发言人前缀匹配合并 |
232
- | 保留发言人标识 | 保留"张三:"等发言人前缀,帮助 AI 理解上下文 | 支持中英文冒号格式 |
233
-
234
- ---
235
-
236
- ## 会议识别能力(v2.0 新增)
237
-
238
- 预处理完成后,自动执行以下会议识别步骤:
239
-
240
- ### 会议元信息提取(extractMeetingMeta)
241
-
242
- 从闪记头部提取结构化的会议元信息:
243
-
244
- | 识别字段 | 匹配关键词 | 示例 |
245
- |---------|-----------|------|
246
- | 会议标题 | 会议主题/标题/名称、Meeting Title/Topic | `会议主题:产品需求评审会` |
247
- | 会议时间 | 会议时间/日期、Date/Time | `会议时间:2026-03-24 14:00` |
248
- | 会议时长 | 会议时长/时长、Duration | `会议时长:45 分钟` |
249
- | 参会人员 | 参会人/与会人/出席、Participants/Attendees | `参会人员:张三、李四、王五` |
250
- | 主持人 | 主持人/组织者/发起人、Organizer/Host | `主持人:张三` |
251
- | 会议地点 | 会议地点/位置、Location | `会议地点:3 号会议室` |
252
-
253
- ### 钉钉 A1 摘要识别(extractA1Summary)
254
-
255
- 自动识别钉钉 A1 / 闪记 AI 生成的结构化摘要段落,支持 Emoji 标识和纯文本标识两种格式:
256
-
257
- | 段落类型 | Emoji 标识 | 纯文本标识 | 说明 |
258
- |---------|-----------|-----------|------|
259
- | 会议摘要 | 📋 / 📝 | 【会议摘要】 | AI 生成的会议内容总结 |
260
- | 待办事项 | ✅ / ☑️ | 【待办事项】 | 会议中确定的行动项 |
261
- | 决策结论 | 📌 / 🔑 / 💡 | 【决策结论】 | 会议中达成的决策 |
262
- | 讨论要点 | 📊 / 📈 | 【讨论要点】 | 关键讨论内容摘要 |
263
- | 后续跟进 | ⏭️ / 👉 | 【后续跟进】 | 下一步计划和跟进事项 |
264
-
265
- > **优先级说明**:A1 摘要段落被视为高优先级信息,会优先注入生成上下文,帮助 AI 更准确地提取需求。
266
-
267
- ### 发言人角色识别(extractSpeakers)
268
-
269
- 自动识别闪记中发言人的角色标注,支持以下格式:
270
-
271
- ```
272
- 张三(产品经理):... → 识别为 张三,角色:产品经理
273
- 李四(技术负责人):... → 识别为 李四,角色:技术负责人
274
- 王五[设计师]:... → 识别为 王五,角色:设计师
275
- 赵六:... → 识别为 赵六,角色:未标注
276
- ```
277
-
278
- 识别到的发言人角色信息会注入生成上下文,帮助 AI 区分不同角色视角的发言。
279
-
280
- ---
281
-
282
- ## PRD 输出要求
283
-
284
- 生成 `prd/<项目名>/prd.md` 时,写清以下内容;缺失时写入「待确认事项」,不要假装已经明确:
285
-
286
- - 第一版必须做什么,哪些放到二期。
287
- - 谁使用主入口,谁维护后台表,谁审批、调度或查看报表。
288
- - 用户从进入页面到完成关键任务的步骤。
289
- - 表单之间如何关联,哪些字段唯一,哪些字段只能后台维护。
290
- - 状态有哪些,谁能改,允许从哪个状态流转到哪个状态。
291
- - 时间冲突、重复提交、并发提交、取消、退回、失败如何处理。
292
- - 用可验证标准描述验收口径。
293
- - PRD 只写业务语义,不写 `appType`、`formUuid`、`fieldId`;真实 ID 写入 `.cache/<项目名>-schema.json`。
294
-
295
- ## 前置依赖
296
-
297
- - Node.js ≥ 16
298
- - 已登录宜搭(存在有效 `.cache/auth-token-<env>.json`),用于调用 AI 接口
299
-
300
- ---
301
-
302
- ## 注意事项
52
+ ## 旧命令迁移
303
53
 
304
- 1. **闪记质量影响 PRD 质量**:如果闪记内容过于碎片化或口语化严重,生成的 PRD 可能需要用户手动补充完善
305
- 2. **长文本分段处理**:闪记内容超过 6000 字时,建议分段提取后合并,避免超出 AI 模型 token 限制
306
- 3. **待确认事项必须处理**:PRD 中的"待确认事项"需要用户逐一确认后,才能进入开发阶段
307
- 4. **PRD 不记录技术 ID**:PRD 文档只记录业务语义信息(字段名、类型、说明),`formUuid`、`fieldId` 等技术 ID 写入 `.cache/` 临时文件
308
- 5. **支持迭代优化**:用户可以对生成的 PRD 提出修改意见,AI 会基于反馈重新调整 PRD 内容
309
- 6. **本技能不读写 memory**:生成的 PRD 输出到 `prd/<项目名>/prd.md` 文件,不依赖跨会话的 memory 状态
54
+ `openyida flash-to-prd` 已移除。将原来的输入文件或会议文本交给当前 Agent,按本文流程生成 `prd/<项目名>/prd.md`。原脚本中的宜搭 AI 生成步骤改由宿主 Agent 执行。
@@ -22,17 +22,11 @@
22
22
 
23
23
  ### 执行过程
24
24
 
25
- ```bash
26
- # 方式 1:从文件读取
27
- # 先使用 create_file / Write / file edit tool 创建:
28
- # <projectRoot>/.cache/openyida/员工积分管理系统/flash-note/meeting.txt
29
- openyida flash-to-prd --file .cache/openyida/员工积分管理系统/flash-note/meeting.txt --name 员工积分管理系统
30
-
31
- # 方式 2:直接发给 AI 智能体(推荐)
32
- # 将文本直接粘贴到对话框,AI 自动识别并触发本技能
33
- ```
25
+ 1. 当前 Agent 读取用户提供的完整会议文本,按发言提取需求事实。
26
+ 2. 使用本技能的 PRD 模板组织内容,把未明确事项列为待确认。
27
+ 3. 使用宿主文件工具保存 `prd/员工积分管理系统/prd.md`,读取核对后返回文件位置。
34
28
 
35
- ### 输出文件:`prd/员工积分管理系统.md`
29
+ ### 输出文件:`prd/员工积分管理系统/prd.md`
36
30
 
37
31
  ```markdown
38
32
  # 员工积分管理系统 — 产品需求文档