Skip to content

docs(ai-copilot): correct the skill count and stop attributing the forecast buckets to the skill (#897, #898) - #902

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-897-898-sales-copilot-counts-buckets
Aug 6, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-897-898-sales-copilot-counts-buckets

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Fixes #897
Fixes #898

Two drifts left over from the #891 / PR #895 pass, on pages that PR did not cover. #898 is the urgent half: since #895 landed, skills.mdx and sales-copilot.mdx have been describing the same skill differently.

Documentation only, all three locales. No src/** change, no content/docs/releases/ change, no guard added, no @objectstack/* bump.

Premise re-check on origin/main @ 90686a4

All three claims verified live before editing. Every one still held.

Claim Verified against Verdict
allSkills registers 6, incl. Live Data src/skills/index.ts:20-27 holds
Two pages still say 5 content/docs/index.mdx:68, sales-copilot.mdx:15 (+ zh) holds
Four buckets are not the skill's output src/skills/revenue-forecasting.skill.ts:19-39 holds
Buckets belong to the field + snapshot src/objects/opportunity.object.ts:233-243, src/flows/forecast-snapshot.flow.ts:33-36,145-153,289-292 holds
Probability thresholds have no source repo-wide grep for 80% / 40-80 holds — only stage-probability tables in sales/opportunities.mdx
Rep coaching not in the instructions revenue-forecasting.skill.ts (stage + period are the only groupings) holds

Line relocation (issue measured @ 92b94e7, this PR @ 90686a4)

Surface In issue Actual
index.mdx AI row :68 :68 unchanged
index.zh-Hans / zh-Hant AI row :67 :67 unchanged
sales-copilot.mdx persona note :15 :15 unchanged
sales-copilot zh persona note :13 :13 unchanged
sales-copilot.mdx bucket block :103-110 :103-109 (four buckets at :105-108)
sales-copilot zh bucket block :98-104 :96-102 (four buckets at :98-101)
sales-copilot.mdx coaching tip :141 :152
sales-copilot zh coaching tip :141 :141 unchanged

Only the EN coaching tip moved (+11), from the Customer 360 prose #861/#895 added above it.

#897 — skill count

content/docs/index.mdx ×3: 5 skills becomes 6 skills and live data is prepended to the parenthetical list, matching the order in skills.mdx. The Sales Copilot, Service Copilot names in that same cell are untouched — #612's face, per the dispatch ruling.

One deviation from the dispatch ruling, flagged for review

The ruling was "5 → 六项" at both spots. I applied it at index.mdx, but not at sales-copilot.mdx:15, where I removed the count instead. Reasoning:

  • The sentence is lives in five skills registered through src/skills/. Its subject is the registry (six), but the page itself documents five sales-side skills and numbers them ### 1. through ### 5., with a table at :30-34 listing exactly those five. ai-copilot/index.mdx:48 also groups Sales as five. Writing "six" here makes the page contradict its own next 100 lines.
  • The sentence is about where the retired Sales Copilot's capability went. That capability did not move into Case Triage, the service-side sixth.
  • The parallel note on service-copilot.mdx:13-17 — landed earlier, all three locales — already solves this by carrying no count at all. This PR makes the sales note verbatim identical to it, so this is the existing house wording rather than a third version.

Either way #897's defect is cured: no page asserts a stale count. If the maintainer prefers the explicit "six", it is a one-word edit and I will take it.

#898 — forecast buckets

sales-copilot.mdx:103-109 ×3, rewritten to decompose skills.mdx:70's landed Output row clause by clause:

  • pipeline by stage (count + summed amount, scoped to the named period)
  • weighted value (amount x probability, computed by the skill)
  • at-risk deals, named with the signal behind each
  • the forecast as a range, commit-only to full weighted pipeline
  • an optional chart via visualize_data

The four names are not silently dropped. A follow-on paragraph says where they live: options of crm_opportunity's Forecast Category field (alongside Omitted, the fifth option the page never mentioned), and the amounts the scheduled snapshot writes onto Forecast records. It also states plainly that the >80% / 40-80% thresholds had no source — the snapshot buckets by forecast category, not by probability band.

Two adjacent claims in the same rewritten block, both inside the "整段重写" the issue asks for:

  1. "missing close dates" was listed as a risk signal. The skill's three signals are close date already past, no activity in 30+ days, stage held longer than typical. Corrected — leaving it would have re-opened the contradiction with skills.mdx on the same sentence.
  2. The coaching tip (:152 EN / :141 zh) asked "Which reps need coaching?". It now asks for slipping deals and states why the per-rep read is not available, rather than deleting the old claim without trace.

#732 (whether the skill writes forecast records, needs-user-decision) is untouched — this PR only says what the skill outputs.

Consistency sweep

Grepped every other page for the same claims before pushing. No residue: sales/forecasting.mdx, sales/opportunities.mdx, administration/automation.mdx and reference/glossary.mdx already attribute the buckets to forecast_category and the snapshot correctly. whats-new.mdx:56's "5 skills" is the sales grouping with live data named — correct as written, not a residue. skills.mdx:107's "the other five skills" is 6 minus Lead Qualification — also correct.

zh terminology

Per src/translations/zh-CN.ts:903-909 and :269-270: 预测类别 / 管道 / 最佳情况 / 承诺 / 已排除 / 已关闭, crm_forecast = 销售预测. zh-Hant follows the terms already landed in skills.zh-Hant.mdx (機率 / 週期 / 資料 / 欄位).

Verification

Full sequence under the shared lock with NODE_OPTIONS=--max-old-space-size=4096, all exit 0:

Step Exit Note
pnpm validate 0 13 warnings, all pre-existing (approval approvers, campaign member group)
pnpm typecheck 0 clean
pnpm build 0
pnpm vitest run --maxWorkers=2 0 66 files, 1587 passed, 1 skipped
pnpm lint 0 13 warnings, 14 suggestions — baseline
pnpm hygiene 0 no raw control bytes in first-party files over 409 content/changeset files

Control-byte self-scan on the seven changed files (grep -naP over the C0 range) returned no hits, beyond what the hygiene gate scans.


Generated by Claude Code

…recast buckets to the skill (#897, #898)

Two drifts left over from the #891 / PR #895 pass, both on pages that page did
not cover.

#897 — skill count. `src/skills/index.ts` registers six skills; Live Data was
the one the docs never picked up. The capability table in `content/docs/index.mdx`
said "5 skills" and its parenthetical list omitted Live Data, which is the odd
one to lose since it is the skill behind Wow #1. Now six, with live data named
first to match the table order in `content/docs/ai-copilot/skills.mdx`. The
Sales Copilot / Service Copilot names in that same cell are deliberately
untouched — they belong to #612.

On `content/docs/ai-copilot/sales-copilot.mdx` the "Where the personas went"
note said the capability "lives in five skills registered through `src/skills/`".
The subject is the registry, which holds six, but the page documents five
sales-side skills and numbers them 1-5, so "six" would have traded one mismatch
for another. The sentence now carries no count, which is verbatim what the
parallel note on `content/docs/ai-copilot/service-copilot.mdx` already says in
all three languages.

#898 — forecast buckets. The forecasting section presented Closed / Commit /
Best Case / Pipeline as the skill's output, with probability thresholds on two
of them. `src/skills/revenue-forecasting.skill.ts` groups by stage, computes
weighted value as amount x probability, names at-risk deals with the signal
behind each, and gives the forecast as a range from commit-only to full weighted
pipeline, optionally with a chart. It never reads `forecast_category`.

The four names are real, so the page now says where they live instead of
dropping them: options of `crm_opportunity.forecast_category`, and the amounts
the scheduled snapshot in `src/flows/forecast-snapshot.flow.ts` writes onto
`crm_forecast`. The probability thresholds had no source anywhere — the snapshot
buckets by forecast category, not by probability band. Two smaller claims in the
same block go with them: "missing close dates" was never one of the skill's risk
signals, and the manager tip asking "Which reps need coaching?" described a
per-rep rollup the skill does not do, stage and the user's period being its only
groupings.

Documentation only, en / zh-Hans / zh-Hant. No `src/**` change. Brings the page
into line with the skill rows landed in `skills.mdx`, which had been describing
the same skill differently.

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

Co-authored-by: Claude <noreply@anthropic.com>
@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 5:43am

Request Review

@yinlianghui
yinlianghui marked this pull request as ready for review August 6, 2026 05:47
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit ea11514 Aug 6, 2026
9 checks passed
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