Skip to content

docs(ai-copilot): 按 skill 源码写实 service-copilot 其余段落的能力残留 (#860) - #865

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-860-service-copilot-residue
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-860-service-copilot-residue

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #860

#847 / PR #861 只改了「它分析 / 它返回」两张清单与 Customer 360° 段;本页其余段落(tips 三段、第 3 节邮件撰写、页尾交叉引用)仍在复述同一批 skill 做不到的事。本 PR 以 src/skills/*.skill.ts 与 src/objects/*.object.ts 为唯一事实来源逐条写实,三语同步,未触碰 src/**。

一、前提复核(行号已在含 PR #861 的 main 上重定位)

基线 origin/main = eb4a7e11(PR #861 已合并)。issue 与追评里的行号都是 #861 之前的编号,全部重新定位并逐条复核过:

# issue 行号(#861 前) 本 PR 行号(#861 后) 原文 源码复核 前提
1 :39 :39 The product referenced in the case src/objects/case.object.ts 29 个字段全集里 grep -c product = 0;lookup 只有 sys_user / crm_account / crm_contact / crm_case(parent),无 crm_product ✅ 成立
2 :92 :108 Trust but verify the KB suggestions case-triage.skill.ts:49 tools: [describe_object, get_record],无检索工具,不产出 KB 建议 ✅ 成立
3 :96 :112 拒绝率 → your KB needs work 同上;分流返回的只有优先级 + 升级/关闭指引 ✅ 成立
4 :101 :117 「助手」找不到匹配文章 = 知识缺口 匹配文章的是 customer-360.skill.ts:48-52 第 3 步(query_records 打 crm_knowledge_article,按 category/tags),不是分流 ✅ 成立(归属错,非全错)
5 :91(追评) :107 用 Customer 360 了解合同层级 customer-360.skill.ts 第 2-3 步枚举 crm_contact / crm_case / crm_opportunity / crm_knowledge_article,不含 crm_contract ✅ 成立
6 :79(备查) :95 All drafts cite the Support Knowledge articles they pulled from email-drafting.skill.ts:21-37 五步 instructions 从头到尾没有一个字提知识文章;tools: [get_record, query_records] 够得着但没被要求读 ✅ 成立

六项前提全部成立,无一项过期。

补一条源码事实(第 5 项写实时用到):crm_contract 上没有任何叫「层级 / tier」的字段——真实字段是 contract_type(合同类型)、contract_value(合同金额)、status;tier 是 crm_account 上的 Customer Tier。所以「合同层级」半句里的名词本身也无落地面,改写时按真实字段名指路。

二、六项逐条处置

1. 幽灵「产品」字段(:39) —— 删掉独立那一条,把更正折进 主题 + 描述 那一条,沿用 #861 为 customer-since 幽灵建立的同一句式(正面陈述 + 「也无从参与」+ 真实去处):产品挂在 商机产品明细 / 报价单明细(crm_opportunity_line_item.crm_product、crm_quote_line_item.crm_product)上,分流够得着的范围里,产品只以文本形式出现在描述里。不静默删名。

2. :108 KB suggestions —— 不删建议本身,改判归属:核实的是 Customer 360° 引用的文章(KA-0007),并写明它是按 category/tags 匹配的,「是起点不是结论」。

3. :112 拒绝率当知识库指标 —— 改成分流真正的产出:跟踪建议优先级的保留率;改写率高指向评判标准与工单数据,与知识库无关;知识缺口信号明确转指下面那条。

4. :117 归属写错 —— 主语由「助手」改为 Customer 360°,并点明「分流从不检索文章,所以这个信号来自向 Customer 360° 要客户历史」。

5. :107 合同层级 —— 采纳追评的第二种修法(改写而非删除):Customer 360° 会给的是未结工单 / 进行中商机 / 匹配文章;合同不在它读的对象里(明确回指 #861 的《Customer 360° 不会拉取的东西》段),要谈 合同类型 / 合同金额 请直接看客户的合同记录。

6. :95 email_drafting —— 改为写实:草稿依据它真正读到的记录(联系人 + 请求点名时的关联客户/商机),instructions 里没有一步去取文章,因此草稿不引用文章;需要援引时从 Customer 360° 拿。顺带把不实的因果尾巴收掉:页尾「了解为回复提供动力的支持知识索引」→「了解支持知识索引」——同一事实的另一半,若只改第 3 节会让同页自相矛盾。链接与「支持知识索引」这个名字都保留,未评述该知识库实体是否存在(#808 边界)。

三、与 PR #861 的衔接

四、边界遵守

五、验证(共享锁 + NODE_OPTIONS=--max-old-space-size=4096)

命令 退出码 关键行
pnpm validate 0 Data: 17 Objects 344 Fields;5 条既有 author-time 警告,与本 PR 无关
pnpm typecheck 0 tsc --noEmit 无输出
pnpm build 0 ✓ Build complete (1562ms) · Artifact: dist/objectstack.json (1921.3 KB)
pnpm test -- --maxWorkers=2 0 Test Files 66 passed (66) · Tests 1587 passed | 1 skipped (1588)
pnpm lint 0 13 warning(s), 14 suggestion(s),均为既有
pnpm hygiene 0 ✓ no raw control bytes in first-party files · ✓ source hygiene clean

test 输出里的 ✗ source hygiene failed: ... 是 source-hygiene 元测试自己的预期 stderr(断言失败路径),非真实失败——同一轮 pnpm hygiene 独立跑出 ✓ source hygiene clean。

控制字节自扫(改动的 4 个文件):grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]' 退出码 1 = 零命中;file 判定三页均为 Unicode text, UTF-8 text。

六、越界发现(未在本 PR 修)

content/docs/ai-copilot/sales-copilot.mdx:78-80 三语把 Product Information / Sales Knowledge 两个知识库列为 Email Drafting 的输入——与本单第 6 项是同一 skill、同一事实(instructions 从不取知识来源),但那两个名字正是 #808 的四个知识库,改写它必然要评述实体存在性,越 #808 边界。已作为新增位置评论到 #808(不另开重复单)。在 #808 落地前,两页对同一 skill 的说法暂不一致,特此标注。


Generated by Claude Code

#847 / PR #861 只改了「它分析 / 它返回」两张清单与 Customer 360° 段,本页
其余段落仍在复述同一批 skill 做不到的事。以 src/skills/*.skill.ts 与
src/objects/*.object.ts 为唯一事实来源,逐条写实:

- 「工单中引用的产品」是幽灵字段:crm_case 全字段无 product,也无指向
  crm_product 的 lookup;产品挂在商机产品明细/报价单明细上。折进主题+描述
  那一条(沿用 #861 为 customer-since 建立的写法),不静默删名。
- email_drafting 的 instructions 五步从未提知识文章,故「所有草稿都会引用
  支持知识文章」改为写实,并指向 Customer 360° 拿文章。
- 三条提示语归属改正:匹配文章的是 customer_360 第 3 步,不是 case_triage;
  分流只返回优先级与升级/关闭指引,「拒绝率=知识库质量」不成立。
- customer_360 的 instructions 未枚举 crm_contract,「打电话前了解合同层级」
  改指客户自己的合同记录,与 #861「不会拉取的东西」段衔接。

三语同步;未触碰 src/**。
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 6, 2026 12:41am

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 00:49
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit 30e6306 Aug 6, 2026
9 checks passed
yinlianghui added a commit to yinlianghui/hotcrm that referenced this pull request Aug 10, 2026
… (objectstack-ai#892)

* docs(ai-copilot,service): write the "four built-in knowledge bases" claim against the metadata (objectstack-ai#808)

文档在 12 个页面(三语 36 个文件)宣称 HotCRM 内置四个 AI 知识库
(Sales Knowledge / Product Information / Support Knowledge /
Competitive Intelligence),而 src/ 里这四个名字一个都不存在:没有元数据
声明过知识库,没有技能绑定,Setup 里也没有可 seed 的地方。唯一命中是
knowledge_article.object.ts:9 的一行注释。

按方向 1(文档跟元数据)收敛到真实存在的 crm_knowledge_article + 其 7 个
category。四个名字不静默删除,逐一写明「本应用不 ship 这样的独立知识库」
并给出内容的实际落点;Competitive Intelligence 与 objectstack-ai#790 清掉的 demo
competitor 模块同源,如实注明。

- ai-copilot/knowledge-bases:整页按真实结构重写——四库对照表、文章对象的
  字段与检索面、唯一会读文章的技能是 customer_360、以及不存在的那些东西
  (文档摄取、/knowledge/support/ 目录、嵌入分块、夜间重索引、连接器、
  按技能绑定知识库)。
- service/knowledge-base:「四种内容类型」与四库表改为 7 个真实分类、4 个
  列表页签与发布/复核时间戳行为。
- administration/setup:Day 5 三条 seed 步骤改写为真实可执行动作;产品目录
  一条不再说数据表馈送产品信息知识库。
- ai-copilot/sales-copilot:邮件撰写输入列去掉两个知识库,并写明第二个独立
  事实——email_drafting 的 instructions 从不取任何知识来源(与 objectstack-ai#860 /
  PR objectstack-ai#865 在 service 页的口径一致,消除两页暂不一致)。
- 另六页同源说法一并写实:ai-copilot/skills 的「知识库」行、ai-copilot/index、
  ai-copilot/service-copilot、getting-started/introduction、whats-new、
  revenue/products。

「元数据跟文档」(真建这四个库)是产品扩展,本次不预判。三语同步;
未触碰 src/**。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa

* docs(ai-copilot): singularise the residual "knowledge bases" phrase on the AI Copilot index (objectstack-ai#808)

同页第 2 项已写实为一个知识文章库,开头「了解你的产品、知识库和流程规则」
的复数说法是同一句四库遗留,三语一并收敛。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
yinlianghui added a commit to yinlianghui/hotcrm that referenced this pull request Aug 10, 2026
…and three skill subjects to source (objectstack-ai#907)

Fixes objectstack-ai#886
Fixes objectstack-ai#890

objectstack-ai#886 — content/docs/service/sla-and-escalation.mdx (+ zh-Hans / zh-Hant):

- The "High priority AND the related account is a Customer" escalation branch
  does not exist. `src/flows/case-escalation.flow.ts` gates the start node on
  `record.priority == "critical"` and nothing else; its insert-time twin
  `case_escalation_on_create` reuses the same condition. No flow in the app
  reads an account type or tier. Written real: only Critical auto-escalates,
  High never does, and raising a High case is a manual step. The SLA-monitor
  fallback does not cover them either — `case.hook.ts` stamps `sla_due_date`
  for `critical` only.
- The Critical breach row promised a red banner and an alert to a support
  manager. There is no banner mechanism under `src/`, and the breach notice is
  `case-sla-monitor.flow.ts`'s notify node, whose recipients are
  `{currentCase.owner_id}` alone.

objectstack-ai#890 — service/cases.mdx:156, service/index.mdx:48,
service/sla-and-escalation.mdx:105 (+ zh-Hans / zh-Hant):

"Suggest a resolution" searching the knowledge base and drafting a reply, and
the Copilot pattern-matching past cases, are attributed to skills that cannot
do it: `case_triage` carries `describe_object` + `get_record` and no query
tool, and `email_drafting` never reaches for a knowledge source. The skill that
reads articles is `customer_360`. All three sentences rewritten on the objectstack-ai#861 /
objectstack-ai#865 line, and the fictional "Support Knowledge Base" link label replaced with
the page's real name.

Docs only, three pages x three locales, plus a changeset. No change under
`src/**`.


Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants