Repository navigation
docs(ai-copilot): 按 case_triage 与 customer_360 源码写实两页能力清单 (#847) - #861
Merged
Merged
Conversation
case-triage.skill.ts 的 tools 只有 describe_object + get_record,没有任何检索 工具,因此工单分流页宣称的「历史工单」「支持知识库文章匹配」「最匹配的 KB 文章」 在工具面上不可达;「首次回复草稿」更与 skill 第 6 步(交给 email_drafting)直接 矛盾;「建议的分类」instructions 从未指派,且选项表里的「账单」在 crm_case.type 上并不存在。 customer_360 有 query_records,属于低一档的漂移:sales 页的近期活动 / 合同 / 营销参与与 service 页的合同状态 / 接触点只是 instructions 没让它读。两处 Customer 360° 段按 instructions 第 2-4 步重写为真实枚举与三段产出。 按 #841/#848 口径不静默删名:每一处被删的承诺都有一段说明它真正的去处。 src/** 未改动;知识库实体是否存在见 #808。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 6, 2026 00:24
This was referenced Aug 6, 2026
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
…-ai#860) (objectstack-ai#865) objectstack-ai#847 / PR objectstack-ai#861 只改了「它分析 / 它返回」两张清单与 Customer 360° 段,本页 其余段落仍在复述同一批 skill 做不到的事。以 src/skills/*.skill.ts 与 src/objects/*.object.ts 为唯一事实来源,逐条写实: - 「工单中引用的产品」是幽灵字段:crm_case 全字段无 product,也无指向 crm_product 的 lookup;产品挂在商机产品明细/报价单明细上。折进主题+描述 那一条(沿用 objectstack-ai#861 为 customer-since 建立的写法),不静默删名。 - email_drafting 的 instructions 五步从未提知识文章,故「所有草稿都会引用 支持知识文章」改为写实,并指向 Customer 360° 拿文章。 - 三条提示语归属改正:匹配文章的是 customer_360 第 3 步,不是 case_triage; 分流只返回优先级与升级/关闭指引,「拒绝率=知识库质量」不成立。 - customer_360 的 instructions 未枚举 crm_contract,「打电话前了解合同层级」 改指客户自己的合同记录,与 objectstack-ai#861「不会拉取的东西」段衔接。 三语同步;未触碰 src/**。 Co-authored-by: Claude <noreply@anthropic.com>
yinlianghui
added a commit
to yinlianghui/hotcrm
that referenced
this pull request
Aug 10, 2026
…source (objectstack-ai#891) (objectstack-ai#895) `content/docs/ai-copilot/skills.mdx` is the page the sales and service pages cite as the full skill spec, and its per-skill tables described capabilities `src/skills/*.skill.ts` does not have. Re-checked all six skills against their tool lists and instructions and rewrote the drifting rows: - Case Triage writes nothing: its tools are `describe_object` + `get_record`, `escalate_case` / `close_case` carry no `ai` block so no write tool is materialised, and `category` / `queue` are not fields on `crm_case` at all (its classification field is `type`, label "Case Type"). It also cannot read prior cases (no query tool) and there is no product field to read. - Lead Qualification writes through `action_convert_lead` / `action_schedule_followup` rather than fields; `rating` (1-5 star Lead Score) is never written, `status` is stamped by the conversion flow. - Email Drafting has no send tool (`send_email` carries no `ai` block) and returns a second subject-line variant. - Revenue Forecasting summarises by stage and forecasts a range; the Closed/Commit/Best Case/Pipeline buckets belong to `crm_opportunity.forecast_category` and the `forecast_snapshot` flow. - Customer 360 reads contacts / open cases / open opportunities / published knowledge articles - not contracts, activities or campaign members, matching the wording landed on service-copilot in objectstack-ai#861. - "How skills work together" no longer claims skills invoke each other; the only instruction-level handoff is case_triage naming `email_drafting`. - The Confirmation bullet now matches the two real Actions (convert requires human approval, schedule follow-up has no approval gate). `content/docs/whats-new.mdx` counted five built-in skills; `allSkills` in `src/skills/index.ts` registers six (Live Data was missing). All changes in en / zh-Hans / zh-Hant. No `src/**` change. Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa Co-authored-by: Claude <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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #847
以
src/skills/*.skill.ts为唯一事实来源(#840 / #841 / PR #848 同口径),把content/docs/ai-copilot/两页的能力清单改回技能真实的工具面与 instructions。三语共 6 文件src/**一行未动。一、前提复核(重定位后的行号表)
issue 基线是
3912845b,当前origin/main是9d2c787a(PR #848 / #849 / #854 已合)。逐条重定位结论:issue 的每一处在最新 main 上都仍然成立,
premise_still_valid: true。git diff 3912845b..origin/main -- content/docs/ai-copilot/显示 #848 对这两页各只做了一行换一行 的原地替换(Customer Since 幽灵那条 bullet),没有增删行,因此行号整体没有漂移:
service:39:39未动- **Historical cases** from the same account and contact.service:41:41未动- The **Support Knowledge** knowledge base for matching articles.service:45(分类):46- **Suggested category** (Bug, Question, Feature Request, Billing).:44记作优先级、:45记作分类,实际是:45/:46,且它列的:47/:48/:49又是对的——是 issue 内部不自洽,不是 #848 造成的漂移)service:47:47未动- **Top matching KB articles**.service:48:48未动- A **draft first reply** …service:56-60:57-63段落sales:112/:114/:115源码侧复核(都在最新 main 上重读过):
case-triage.skill.ts:49仍是tools: [ 'describe_object', 'get_record' ];case-triage.skill.ts:46-47的第 6 步仍写着把面向客户的回复交给email_drafting;customer-360.skill.ts:61仍带query_records+aggregate_data,第 2-3 步枚举的关联对象仍是
crm_contact/crm_case/crm_opportunity/crm_knowledge_article,第 4 步产出仍是 Account Snapshot · Active Work · Risks & Notes 三段。
一处比 issue 更重的实况:issue 说
:46的分类「instructions 从未指派」,这没错;额外查到它连选项表都是错的——
src/objects/case.object.ts的type字段实际只有Question / Problem / Feature Request / Bug,没有 Billing,而 Problem 又没被列出。写实句因此
直接给出真实选项,避免删掉一处捏造又留下另一处。
二、第一类:
case_triage工具面够不着(硬缺陷)describe_object+get_record两个工具,get_record按 id 取单条,没有任何检索工具,因此「历史工单」「知识库文章匹配」「最匹配的 KB 文章」不是 instructions 漏写,是没有工具能做到;
「首次回复草稿」与 skill 自己的第 6 步直接矛盾。改动:
:39/:41(分析清单)与:47/:48(返回清单)四条从清单里移除;:45优先级一条按 instructions 第 2-3 步写实(一条理由 + 引用工单 ID 与字段值 + 完整评判顺序);:49指向 Escalate / Close 一条保留,并补上 skill 真会给的reason/resolution可粘贴文本;:46分类一条按实况收口。不静默删名(#841 口径):新增一段
**What triage does not do.**,逐条说明被删掉的三项能力各自真正的去处——历史与文章匹配去问 Customer 360°(它才带
query_records,读crm_case与
crm_knowledge_article);分类是人在工单上选的 Case Type 字段;首次回复由Email Drafting 接手(就是 skill 第 6 步点名的那个技能,正好是同页第 3 节)。
三、第二类:
customer_360instructions 未枚举(低一档)这个技能有
query_records,所以 sales 页的 Recent activity / Contracts / Marketingengagement 与 service 页的合同状态 / 最近接触点是「instructions 没让它读」而非「读不到」。
PR 里刻意把这一档与第一类分开表述:写实段明确写出 This is not a tool ceiling,并点名它
本可够到
crm_contract/crm_campaign/crm_event/crm_task,只是没有被要求去读,而放宽一个技能读什么是产品决策而非文档决策(ADR-0109 的 skill 边界,见下方「未动的东西」)。
两处 Customer 360° 段按 instructions 第 2-4 步重写为真实枚举与产出:
crm_contact(主要联系人优先)、crm_case(is_closed为 false、最新优先)、crm_opportunity(阶段 / 金额 / 预计成交日期)、已发布的
crm_knowledge_article(按工单的分类或标签匹配);总数取自
aggregate_data而非逐行相加;产出固定三段 Account Snapshot · Active Work ·Risks & Notes,内联引用记录 ID,风险必须点名记录与信号。
顺带写实的同段一条(同属第二类):service 页原本写「所有过往工单(未结和已结)」,
instructions 只让它查
is_closed为 false 的工单,已结部分是aggregate_data的按状态计数——改后仍然支撑该段结尾「本季度第 3 次」那句话,只是把它挂到真正数得出来的那个工具上。
四、与 #848 措辞的衔接
#848 今晚刚把两页各一条 bullet 改成 Customer Since 幽灵的写实句,本 PR 未改动这两行
(
sales:110/service:38,diff 里可见它们不在改动块内),并让新句子与它们读起来连贯::38(docs(ai-copilot): 按两个 skill 源码写实 Customer 360 与工单分流的客户画像 (#840) #848)说「客户分层 与 合同金额 是分流评判标准里排在最前面的权重」,本 PR 的优先级写实句就从 After tier and contract value 接着往下列剩余三项权重,不重复它
已经说过的前两项;
:110(docs(ai-copilot): 按两个 skill 源码写实 Customer 360 与工单分流的客户画像 (#840) #848)的 Relationship snapshot 保持原样作为 Customer 360° 清单第一条,本 PR 只在其后接续真实枚举,两句共同构成「快照 + 关联对象」的完整一段。
五、未动的东西(边界)
src/**一行未改。给case_triage加query_records、或给customer_360的 instructions加合同 / 营销活动,都是产品决策(ADR-0109 的 skill 边界),不由文档倒推;本 PR 只让文档停止
承诺技能还没有的能力。
什么工具、instructions 让它做什么」,对知识库本身不作评述;引用的
crm_knowledge_article是
src/objects/knowledge_article.object.ts里真实存在的普通对象。content/docs/releases/,未改任何@objectstack/*依赖版本(锁17.0.0-rc.2)。六、本页仍有残留,已另立单 #860(不在本 PR 修)
实施中发现同页 其余段落 还有四处同类问题,超出 #847 的 scope,按 Prime Directive #10 立为
新单而非夹带修复:
service-copilot.mdx:39的「工单中引用的产品」是幽灵字段(
crm_case全字段里没有任何 product 字段,也没有指向crm_product的 lookup);三段 tips(
:92/:96/:101改前编号)仍在复述「分流会匹配知识库文章」;另有:79属于第三个skill(
email_drafting)的同族漂移。已对 #847 / #808 / #732 / #832 / #837 逐一去重。七、验证输出
全部在共享锁
flock -w 7200 /tmp/os-heavy-verify.lock下、NODE_OPTIONS=--max-old-space-size=4096执行:pnpm validate✓ Validation passed (1303ms)·Data: 17 Objects 344 Fieldspnpm typechecktsc --noEmit,无输出pnpm build✓ Build complete (1492ms)·Artifact: dist/objectstack.json (1921.3 KB)pnpm test -- --maxWorkers=2Test Files 66 passed (66)·Tests 1587 passed | 1 skipped (1588)pnpm lint13 warning(s), 14 suggestion(s) (1225ms)pnpm hygieneSource hygiene — 245 files under src, test, e2e, scripts; the control-byte scan adds 388 under content, .changeset·✓ source hygiene cleanvalidate / build / lint 的 warning 与 suggestion 全部是 main 上既有的(审批节点可能空审批人、
crm_campaign_member字段组被高亮条遮蔽、行项目建议改 master_detail 等),与本 PR 无关。test 输出里
✗ source hygiene failed: …是source-hygiene-scan-surface.test.ts元测试故意打到 stderr 的预期文本,同一批次里 66 个测试文件全绿。
控制字节自扫(改动的 6 个 mdx + changeset,转义写法,非裸字节):
pnpm hygiene的控制字节扫描面自 #818 / PR #835 起已覆盖content/与.changeset/,上表里那 388 个文件即是,本次改动全部落在该扫描面内。
changeset:
.changeset/copilot-capability-drift.md,'hotcrm': patch,站内路径一律反引号、无 markdown 链接(#797 教训)。
Generated by Claude Code