weekly-performance-advisor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWeekly Performance Advisor
Weekly Performance Advisor
Generate the user's own Weekly Performance Advisor: a two-tab live artifact built from their
La Growth Machine (LGM) data. This skill is fully self-contained — every rule needed to detect
the environment, score campaigns, classify replies, and fill the dashboard is written below. It
references no other document.
Two hard rules, always:
- Only ever show the downloading user's data. Pull exclusively from their connected MCPs. Never inject numbers, campaign names, replies, or examples from anyone else. The template ships empty; it is filled at runtime with their live values. If you cannot pull a value, render the documented empty state — never a placeholder number and never a value borrowed from somewhere else.
- The output is a LIVE ARTIFACT, not a saved HTML file. In Generate mode you fill the template
in memory and render it as a live artifact using the available artifact tool (whatever the
current Cowork build exposes for creating/updating an artifact — do not hard-code a tool name).
On a refresh, update the existing artifact rather than creating a new one. The
file is the build source only.
assets/dashboard-template.html
为用户生成专属的Weekly Performance Advisor:一个基于用户自身La Growth Machine(LGM)数据构建的双标签页实时工件。该技能完全独立——检测环境、为营销活动评分、分类回复及填充仪表盘所需的所有规则均已在下文列出,无需参考其他文档。
两条硬性规则,始终遵守:
- 仅展示下载用户自身的数据。仅从用户已连接的MCP拉取数据,绝不注入任何其他用户的数字、营销活动名称、回复内容或示例。模板初始状态为空白,仅在运行时填充用户的实时数据。若无法拉取某个值,则渲染文档中指定的空状态——绝不能使用占位数字或借用其他来源的值。
- 输出结果为实时工件,而非保存的HTML文件。在生成模式下,需在内存中填充模板,并使用可用的工件工具(当前Cowork构建版本提供的用于创建/更新工件的工具,请勿硬编码工具名称)将其渲染为实时工件。刷新时,需更新现有工件而非创建新工件。文件仅作为构建源文件使用。
assets/dashboard-template.html
Two modes
两种模式
- Setup mode (first run, or when LGM isn't connected / no identity chosen yet): interactive. Detect the environment, guide install if needed, ask the scoping questions. Conversational.
- Generate mode (every run once setup is done): run the engine, fill the template, emit the artifact + a short handoff. Apply output discipline here — return the artifact and a few lines of handoff, no step-by-step narration.
If setup was already done in this project (a snapshot exists and LGM is connected),
skip straight to Generate mode; only re-ask a question if something is missing.
./.lgm-wpa/- 设置模式(首次运行,或LGM未连接/未选择身份时):交互式模式。检测环境、引导安装(若需)、询问范围相关问题,全程采用对话式交互。
- 生成模式(完成设置后的每次运行):运行引擎、填充模板、生成工件并提供简短交接说明。此阶段需严格控制输出——仅返回工件及几句交接语,无需分步说明。
若当前项目已完成设置(存在快照且LGM已连接),则直接进入生成模式;仅当缺失必要信息时才重新询问相关问题。
./.lgm-wpa/Phase 0 — Detect (silent, no questions)
阶段0 — 检测(静默执行,无需提问)
Check your own tool list — do not ask the user what they have installed.
- LGM MCP present? True if tools named for La Growth Machine are available, i.e. any of
mcp__*,list_identities,list_campaigns,get_campaign_stats,get_conversations_to_reply,get_conversation_messages. (In a terminal you could also confirm withsearch_conversationsshowing an LGM server, but tool presence is enough — never ask the user.)claude mcp list - CRM / deal MCP present? Is a HubSpot MCP available (deal/company/contact tools)?
- skill available? (used to build the optional deal/€ layer.)
campaign-impact-analyzer
Record these three booleans and move on. Do not announce the detection.
检查自身工具列表——无需询问用户已安装的工具。
- 是否存在LGM MCP? 若存在名称为的La Growth Machine工具(即
mcp__*、list_identities、list_campaigns、get_campaign_stats、get_conversations_to_reply、get_conversation_messages中的任意一个),则判定为存在。(在终端中也可通过search_conversations显示LGM服务器来确认,但工具存在性已足够——绝不询问用户。)claude mcp list - 是否存在CRM/交易MCP? 是否有HubSpot MCP可用(包含交易/公司/联系人工具)?
- 是否存在技能?(用于构建可选的交易/金额层。)
campaign-impact-analyzer
记录这三个布尔值后继续执行,无需告知用户检测结果。
Phase 1 — LGM MCP gate
阶段1 — LGM MCP准入检查
If the LGM MCP is present: say "LGM connected ✓" in one line and go to Phase 2.
If the LGM MCP is absent: the dashboard is built entirely from LGM data, so it can't run yet.
Explain that in one sentence, then guide the install (do not ask "is it installed?" — you already
know it isn't):
- From the repo, run the installer and complete browser sign-in:
gtm-system(or the curl one-liner the repo's README provides). Auth is browser OAuth — there is no API key to paste.bashsh install.sh - No LGM account yet → point them to register at https://app.lagrowthmachine.com and then re-run the installer.
- After they've run it, re-detect (Phase 0). Loop until the LGM tools appear, then continue.
Keep this friendly and short; it's a gate, not a lecture.
若LGM MCP存在: 用一行文字告知“LGM已连接 ✓”,然后进入阶段2。
若LGM MCP不存在: 仪表盘完全基于LGM数据构建,因此无法运行。用一句话解释原因,然后引导安装(无需询问“是否已安装?”——你已确认未安装):
- 从仓库运行安装程序并完成浏览器登录:
gtm-systembashsh install.sh
(或使用仓库README中提供的curl单行命令)。身份验证采用浏览器OAuth——无需粘贴API密钥。
2. 若尚未拥有LGM账户 → 引导用户前往https://app.lagrowthmachine.com注册,然后重新运行安装程序。
3. 用户完成安装后,重新检测(阶段0)。循环直至LGM工具出现,再继续执行。
保持友好且简洁的语气,这是准入检查而非教程讲解。
Phase 2 — Identity scope (a real question)
阶段2 — 身份范围选择(需用户回答)
Call . Then, to pick a sensible default, get each identity's campaign load: call
(paginate) and count RUNNING campaigns per .
list_identitieslist_campaigns {status:"RUNNING"}identity.idAsk which identity to track, defaulting to the identity running the most RUNNING campaigns
(name it, and ask them to confirm or switch). Mention they can add more identities later for a
team-wide view (the dashboard supports multiple identities — union their campaigns and replies).
Store the selected identity id(s) and display name(s); every LGM pull below is scoped to them.
调用接口。然后,为选择合理的默认值,获取每个身份的营销活动负载:调用(支持分页)并统计每个对应的运行中营销活动数量。
list_identitieslist_campaigns {status:"RUNNING"}identity.id询问用户要跟踪哪个身份,默认选择运行中营销活动数量最多的身份(告知该身份名称,并询问用户确认或切换)。提示用户后续可添加更多身份以获取团队视角(仪表盘支持多身份——合并其营销活动和回复内容)。
存储所选身份的ID和显示名称;后续所有LGM数据拉取操作均限定于这些身份。
Phase 3 — Deal layer (optional, additive — never blocks)
阶段3 — 交易层(可选,附加功能——绝不阻塞流程)
The dashboard ships a "Deals from campaigns" box. Without a CRM it shows and the note
"connect HubSpot to pull deal data". Offer the richer layer, but never block the build on it.
—- CRM/deal MCP present → offer now: "Want me to add the deals/€ layer (which campaigns actually drove pipeline), or ship the dashboard first and add it later?"
- No CRM MCP → ask "What do you track deals in?" (HubSpot / Salesforce / Sheets / other / none).
- HubSpot but not connected → offer to connect it (then it becomes "present").
- Salesforce / Sheets / other / complex → dashboard-first; add the deal layer later.
Delegation (do not re-implement the join here):
- If is available → delegate the LGM×CRM cross-reference to it to populate the "Deals from campaigns" box (deal count + €, this week, portfolio-wide). Use its output to fill
campaign-impact-analyzer/{{DEALS_VALUE}}.{{DEALS_NOTE}} - If is not available → do not block and do not inline a join cascade. Ship the LGM-only dashboard (deals box shows
campaign-impact-analyzer) and, in the handoff, add the pointer: "For the deals/€ layer, install—from gtm-system, then re-run."campaign-impact-analyzer
仪表盘包含一个**“营销活动转化的交易”模块。若未连接CRM,则显示及提示文字“连接HubSpot以拉取交易数据”。提供更丰富的交易层功能,但绝不因该功能阻塞仪表盘构建。
—- 若CRM/交易MCP存在 → 立即询问:“是否需要添加交易/金额层(展示哪些营销活动实际推动了销售线索),还是先生成仪表盘后续再添加该功能?”
- 若CRM MCP不存在 → 询问“你使用什么工具跟踪交易?”(HubSpot / Salesforce / Sheets / 其他 / 不使用)。
- 若使用HubSpot但未连接 → 提供连接引导(连接后即视为“存在”)。
- 若使用Salesforce / Sheets / 其他复杂工具 → 优先生成仪表盘;后续再添加交易层。
任务委托(请勿在此处重新实现关联逻辑):
- 若可用 → 将LGM×CRM交叉引用任务委托给该技能,以填充“营销活动转化的交易”模块(交易数量+金额,本周数据,全组合范围)。使用其输出结果填充
campaign-impact-analyzer/{{DEALS_VALUE}}。{{DEALS_NOTE}} - 若不可用 → 绝不阻塞流程,也不手动实现关联逻辑。先交付仅含LGM数据的仪表盘(交易模块显示
campaign-impact-analyzer),并在交接语中添加提示:“如需交易/金额层,请从gtm-system安装—,然后重新运行本技能。”campaign-impact-analyzer
Phase 4 — Build
阶段4 — 构建
Run the engine (below) on the user's live data → fill every placeholder in
→ render as a live artifact (2 tabs) using the available
artifact tool (create on the first run, update the existing artifact on later runs) → write this
week's snapshot to .
assets/dashboard-template.html./.lgm-wpa/基于用户的实时数据运行引擎(下文详述)→ 填充中的所有占位符 → 使用可用的工件工具将其渲染为实时工件(两个标签页)(首次运行时创建,后续运行时更新现有工件)→ 将本周快照写入目录。
assets/dashboard-template.html./.lgm-wpa/Phase 4.5 — Wire the weekly refresh (routine)
阶段4.5 — 配置每周刷新(常规操作)
The dashboard has a ↻ Refresh button. It only works once a weekly routine exists to re-pull
the data and update the artifact — so offer to build it now (do it only if they say yes):
Ask (English, verbatim-ish): "To make the ↻ Refresh button live, I can set up a weekly routine that re-pulls your La Growth Machine data and updates this dashboard every Monday morning. Want me to set it up?"
- Yes → create a scheduled task with the available scheduling tool, cadence Monday morning
(weekly), whose prompt re-runs THIS skill in Generate mode for the same identity/identities and
updates the existing artifact (it does not create a new one). Suggested task prompt to store:
"Re-run the weekly-performance-advisor skill in Generate mode for identity/identities [<ids>]: pull fresh La Growth Machine data, recompute the engine, update the existing Weekly Performance Advisor artifact, and write this week's snapshot to ./.lgm-wpa/. Do not ask questions; setup is already done."
- Capture the task id the tool returns at runtime and pass it into the template as
so the ↻ button triggers this user's task. The id is resolved per user at creation time — never hard-code an id in the shipped files.
{{REFRESH_TASK_ID}} - The button already calls and shows a graceful message if it can't run.
runScheduledTask(<that id>)
- Capture the task id the tool returns at runtime and pass it into the template as
- No / skip → fill with an empty string. The ↻ button then falls back to a friendly alert (nothing breaks); mention they can enable the routine anytime by re-running the skill.
{{REFRESH_TASK_ID}}
仪表盘设有一个↻刷新按钮。该按钮仅在存在每周例行任务以重新拉取数据并更新工件时才生效——因此现在询问用户是否需要配置该任务(仅在用户同意时执行):
询问内容(英文,大致表述一致即可): “为使↻刷新按钮生效,我可以设置一项每周例行任务,在每周一上午重新拉取你的La Growth Machine数据并更新此仪表盘。是否需要我进行设置?”
- 同意 → 使用可用的调度工具创建定时任务,执行频率为每周一上午,任务提示语为重新以生成模式运行本技能,针对相同身份并更新现有工件(不创建新工件)。建议存储的任务提示语:
“针对身份[<ids>]以生成模式重新运行weekly-performance-advisor技能:拉取最新La Growth Machine数据、重新计算引擎、更新现有Weekly Performance Advisor工件,并将本周快照写入./.lgm-wpa/。无需提问;设置已完成。”
- 捕获工具运行时返回的任务ID,并将其传入模板作为,以便↻按钮触发用户专属的任务。任务ID需在创建时为每个用户单独解析——绝不在交付的文件中硬编码ID。
{{REFRESH_TASK_ID}} - 按钮已内置调用的逻辑,若无法运行则显示友好提示。
runScheduledTask(<该ID>)
- 捕获工具运行时返回的任务ID,并将其传入模板作为
- 拒绝/跳过 → 将填充为空字符串。此时↻按钮会显示友好提示(不会出现功能故障);提示用户可随时重新运行本技能以启用例行任务。
{{REFRESH_TASK_ID}}
Phase 5 — Handoff
阶段5 — 交接说明
After the artifact renders, give a short handoff (no step narration):
- To do tab = your week: the moves to make, replies to handle (urgency-sorted), and the only-🔴 campaigns to fix. Weekly performance tab = the stats: count KPIs with WoW/30-day deltas, volume-weighted health gauges, and the full campaign panorama.
- Refresh weekly: if they enabled the routine (Phase 4.5), the ↻ button and the Monday task keep the dashboard fresh; otherwise they can re-run this skill anytime (and enable the routine then). Deltas and the 30-day trend come alive after 2+ weeks of snapshots.
- Routine status: confirm whether the Monday auto-refresh was set up (Phase 4.5). If they skipped it, remind them the ↻ button stays inert until the routine exists.
- Classify replies in LGM: nudge them to tag replies (interested / not) in the LGM inbox — it makes next week's positive-reply count and trend sharper.
- Fix-this buttons in the artifact open a copy/paste prompt modal (the ready-made prompt targets
the matching gtm-system skill — ,
/reply-draft-assistant,/campaign-challenger,/sales-nav-search-builder) to paste into a new conversation./won-deal-icp-finder
工件渲染完成后,提供简短的交接说明(无需分步讲解):
- 待办事项标签页 = 本周工作重点:需执行的操作、需处理的回复(按优先级排序)、以及仅需关注的🔴需优化营销活动。每周绩效标签页 = 统计数据:包含周环比/30天变化的关键指标、基于回复量加权的健康度仪表盘,以及完整的营销活动全景视图。
- 每周刷新:若用户已启用例行任务(阶段4.5),则↻按钮和周一定时任务会保持仪表盘数据最新;否则用户可随时重新运行本技能(并在此时启用例行任务)。累计2周及以上快照后,变化量和30天趋势数据将生效。
- 例行任务状态:确认是否已设置周一自动刷新任务(阶段4.5)。若用户跳过该设置,提醒用户在例行任务创建前,↻按钮将无法生效。
- 在LGM中分类回复:提醒用户在LGM收件箱中标记回复(感兴趣/不感兴趣),这将使下周的积极回复统计和趋势数据更精准。
- 工件中的“立即优化”按钮:打开预填充提示的模态框(现成提示针对gtm-system中的对应技能——、
/reply-draft-assistant、/campaign-challenger、/sales-nav-search-builder),用户可将提示复制到新对话中使用。/won-deal-icp-finder
THE ENGINE (inline — reproduce exactly)
引擎逻辑(内置——需严格复刻)
All scoring is deterministic. Percentages are whole numbers. Use en-dash-free copy (plain hyphens).
所有评分均为确定性计算。百分比取整数。使用无连字符的文本(仅用普通短横线)。
E1. Pull (scoped to the selected identity/identities)
E1. 数据拉取(限定于所选身份)
- → resolve the selected identity id(s) and name(s).
list_identities - (paginate) → keep campaigns whose
list_campaigns {status:"RUNNING"}∈ selected.identity.id - per kept campaign → per-channel counters.
get_campaign_stats - Replies — two distinct pulls (do not conflate them):
- Actionable "to handle" list → : threads currently awaiting your reply. Drives E8 (the rows shown on the To do tab).
get_conversations_to_reply {identityIds:[...selected]} - This-week count set → filtered to RECEIVED this week (the lead replied since Monday), scoped to the selected identities — regardless of whether you've already answered. Drives the E9 count KPIs. This is what makes the hero count accurate: an "interested" lead you already replied to has left the to-handle queue but must still be counted this week.
search_conversations - For any thread in either set not yet in the latest snapshot's , read
classifiedReplyIdsand classify (incremental — don't re-classify known ids).get_conversation_messages
- Actionable "to handle" list →
- → 解析所选身份的ID和名称。
list_identities - (支持分页)→ 保留
list_campaigns {status:"RUNNING"}属于所选身份的营销活动。identity.id - 为每个保留的营销活动调用→ 获取各渠道统计数据。
get_campaign_stats - 回复数据——需执行两次独立拉取(请勿混淆):
- 需处理的“待办”列表 → :当前等待用户回复的对话线程。用于生成E8(待办事项标签页显示的行数据)。
get_conversations_to_reply {identityIds:[...selected]} - 本周统计数据集 → 筛选本周收到的回复(潜在客户自周一以来的回复),限定于所选身份——无论用户是否已回复。用于生成E9的统计关键指标。这确保核心统计数据准确:用户已回复的“感兴趣”潜在客户虽已移出待办队列,但仍需计入本周统计。
search_conversations - 对于任一列表中未包含在最新快照中的线程,调用
classifiedReplyIds并进行分类(增量处理——无需重新分类已知ID)。get_conversation_messages
- 需处理的“待办”列表 →
E2. Normalize each campaign
E2. 标准化每个营销活动
campaign = {
id, name, contacted,
li: {accept, reply, csent, msent} | null, // % values; csent = connection-request sends, msent = message sends
em: {sent, deliv, open, reply, click, bounce, atag, eng} | null
}- = the email step contains a tracked
ataglink (only then is click a real KPI).<a href> - = email had any engagement to score = (email reply > 0) OR (email click > 0).
eng - A campaign with is low-sample: list it, do not score or rank it.
contacted < 20
campaign = {
id, name, contacted,
li: {accept, reply, csent, msent} | null, // 百分比数值;csent = 发送的连接请求数,msent = 发送的消息数
em: {sent, deliv, open, reply, click, bounce, atag, eng} | null
}- = 邮件步骤包含可追踪的
atag链接(仅此时点击量才是真实关键指标)。<a href> - = 邮件产生了可评分的互动 = (邮件回复量 > 0) OR (邮件点击量 > 0)。
eng - 若营销活动的,则视为样本量不足:仅列出该活动,不进行评分或排序。
contacted < 20
E3. Benchmark constants (BAKED — never cited, no source/brand name in the artifact)
E3. 基准常量(内置——无需引用,工件中不显示来源/品牌名称)
3 zones per KPI: 🟢 on target / 🟡 watch / 🔴 to fix. :
(good, floor, direction)linkedin_acceptance = (30, 20, up)
linkedin_reply = (25, 15, up)
email_open = (60, 45, up)
email_reply = (6, 3, up) # cold-email calibration
email_click = (8, 4, up) # shown, NOT status-driving
email_bounce = (15, 25, down) # lower is better
email_deliverability= (90, 80, up) # not shown as a gauge (see note)- No deliverability gauge. In LGM , so "deliverability" is just
Delivered = Sent − Bounced— not a true inbox-placement signal. We track bounce instead (the actionable email technical-health metric). The five portfolio gauges are: LinkedIn acceptance, LinkedIn reply, email bounce, email open, email reply.100 − bounce - : a KPI or step needs ≥10 sends to be scored, else "insufficient volume".
MIN_SEND = 10
zone(k, v): up → . down → .
sev(k, v) (how far below floor, ≥0): up → ; down → ; round 3.
g if v≥good else y if v≥floor else rg if v<good else y if v≤floor else rmax(0,(floor−v)/floor)max(0,(v−floor)/floor)每个关键指标分为三个区间:🟢达标 / 🟢需关注 / 🔴需优化。格式为:
(良好值, 下限值, 趋势方向)linkedin_acceptance = (30, 20, up)
linkedin_reply = (25, 15, up)
email_open = (60, 45, up)
email_reply = (6, 3, up) # 冷邮件校准值
email_click = (8, 4, up) # 仅显示,不影响状态
email_bounce = (15, 25, down) # 值越低越好
email_deliverability= (90, 80, up) # 不显示为仪表盘指标(见备注)- 无送达率仪表盘。在LGM中,,因此“送达率”仅为
已送达 = 发送量 − 退信量——并非真实的收件箱投递指标。我们改为跟踪退信率(可操作的邮件技术健康指标)。五个组合仪表盘指标为:领英接受率、领英回复率、邮件退信率、邮件打开率、邮件回复率。100 − 退信率 - :关键指标或步骤需**≥10次发送量**才可进行评分,否则显示“样本量不足”。
MIN_SEND = 10
zone(k, v)函数逻辑:趋势向上 → ;趋势向下 → 。
sev(k, v)函数逻辑(低于下限的程度,≥0):趋势向上 → ;趋势向下 → ;保留3位小数。
若v≥良好值则为🟢,否则若v≥下限值则为🟡,否则为🔴若v<良好值则为🟢,否则若v≤下限值则为🟡,否则为🔴max(0,(下限值−v)/下限值)max(0,(v−下限值)/下限值)E4. Per-campaign KPI set (kpis_for
)
kpis_forE4. 每个营销活动的关键指标集(kpis_for
)
kpis_forEmit ordered :
(kpi, value, state, driving)- If :
li(scored iflinkedin_acceptanceelse insuf),csent≥10(scored iflinkedin_replyelse insuf).msent≥10 - If and
emandem.sent≥10:em.eng,email_open, thenemail_replyonly ifemail_click(non-driving), thenem.atag.email_bounce - If and
emand notem.sent≥10: no email KPIs scored → render the line "Email: {sent} sent · {open}% open · 0 replies · 0 clicks - delivered, no engagement to score".em.eng
输出有序的:
(关键指标, 数值, 状态, 是否影响整体状态)- 若存在数据:
li(若linkedin_acceptance则评分,否则显示样本量不足)、csent≥10(若linkedin_reply则评分,否则显示样本量不足)。msent≥10 - 若存在数据且
em且em.sent≥10为真:em.eng、email_open,然后仅当email_reply为真时显示em.atag(不影响整体状态),最后显示email_click。email_bounce - 若存在数据且
em但em.sent≥10为假:不评分任何邮件关键指标 → 渲染文本*“邮件:已发送{sent}封 · 打开率{open}% · 0条回复 · 0次点击 - 已送达,但无互动可评分”*。em.eng
E5. Primary-channel weighting → status
E5. 主渠道权重计算 → 整体状态
- ,
li_sends = li.msent (or 0),em_raw = em.sent (or 0).total = li_sends + em_raw - .
primary = 'li' if li_sends ≥ em_raw else 'email'.SEC_MIN = 0.30 - .
balanced = li_sends>0 AND em scored AND min(li_share, em_share) ≥ 0.30 - is_driving(k):
- → never driving.
email_click - →
linkedin_*.li present AND li.msent≥10 AND (primary=='li' OR balanced) - → driving whenever email is scored (technical health always counts).
email_bounce - /
email_open→email_reply.email scored AND (primary=='email' OR balanced)
- /
driving_reds= driving KPIs at 🔴 / 🟡.driving_yellows - status = if any driving_reds, else
To fixif any driving_yellows, elseWatch. (Internally "On target" is the healthy state; never print the words "Healthy" or "needs work".)On target - Secondary-channel red (a 🔴 KPI that is NOT driving, on linkedin_acceptance/linkedin_reply/ email_open/email_reply) → don't flip the whole campaign; attach a "email leg to fix" or "LinkedIn leg to fix" chip instead.
- ,
li_sends = li.msent(或0),em_raw = em.sent(或0)。total = li_sends + em_raw - 。
primary = 'li'(若li_sends ≥ em_raw),否则为'email'。SEC_MIN = 0.30 - 。
balanced = li_sends>0 且 邮件已评分 且 min(li_share, em_share) ≥ 0.30 - is_driving(k)逻辑:
- → 绝不影响整体状态。
email_click - →
linkedin_*。存在领英数据 且 li.msent≥10 且 (主渠道为'li' 或 渠道平衡) - → 只要邮件已评分,就影响整体状态(技术健康始终重要)。
email_bounce - /
email_open→email_reply。邮件已评分 且 (主渠道为'email' 或 渠道平衡)
- /
driving_reds= 影响整体状态的🔴/🟡关键指标数量。driving_yellows - status = (若存在任何driving_reds),否则为
需优化(若存在任何driving_yellows),否则为需关注。(内部“达标”为健康状态;绝不使用“健康”或“需要改进”等表述。)达标 - 次要渠道异常(不影响整体状态的🔴关键指标,涉及linkedin_acceptance/linkedin_reply/email_open/email_reply)→ 不改变整个营销活动的状态,而是添加**“需优化邮件环节”或“需优化领英环节”**标签。
E6. Fix #1 (diagnosis) for To-fix campaigns
E6. 需优化营销活动的首要优化建议(诊断)
- Among , pick the weakest step in funnel order, EXCLUDING the terminal breakup step:
driving_reds→ take the first in this order that is red.FUNNEL = [email_bounce, linkedin_acceptance, email_open, linkedin_reply, email_reply] - ;
s = sev(k, v). Cap conf to medium when the flagged step hasconf = high if s≥0.4 else mediumsends (driving evidence is thin). When you show verbatim "current copy", annotate the step type (Intro / Follow-up / BreakUp); the flagged step must not be the breakup.<20 - Cause + routing skill per KPI:
linkedin_acceptance -> "targeting or connection note" -> sales-nav-search-builder linkedin_reply -> "message copy" -> campaign-challenger email_open -> "subject line or setup" -> campaign-challenger email_reply -> "message copy" -> campaign-challenger email_bounce -> "list quality / warm-up" -> won-deal-icp-finder (also flag list hygiene / email verification) - Channel tip (): if both LinkedIn reply and email reply are scored and one is red while the other is green/yellow, recommend favoring the stronger channel and reworking/dropping the weaker leg.
reco - Ranking: . To-fix cards sorted by
prio = maxsev(driving_reds) × contacteddesc.prio
- 在中,按漏斗顺序选择最薄弱的环节,排除最终终止环节:
driving_reds→ 选择该列表中第一个处于🔴状态的环节。FUNNEL = [email_bounce, linkedin_acceptance, email_open, linkedin_reply, email_reply] - ;
s = sev(k, v)。当标记环节的发送量conf = 高可信度(若s≥0.4),否则为中可信度时,将可信度上限设为中可信度(驱动证据不足)。显示“当前文案”时,需标注环节类型(介绍/跟进/终止);标记环节不得为终止环节。<20 - 原因 + 关联技能对应每个关键指标:
linkedin_acceptance -> "目标受众或连接请求文案" -> sales-nav-search-builder linkedin_reply -> "消息文案" -> campaign-challenger email_open -> "主题或设置" -> campaign-challenger email_reply -> "消息文案" -> campaign-challenger email_bounce -> "列表质量/预热" -> won-deal-icp-finder (同时标记列表维护/邮箱验证问题) - 渠道建议():若领英回复率和邮件回复率均已评分,且其中一个为🔴状态而另一个为🟢/🟡状态,则建议优先使用表现较好的渠道,重新优化或放弃表现较差的渠道环节。
reco - 排序规则:。需优化营销活动卡片按
prio = maxsev(driving_reds) × contacted降序排列。prio
E7. Volume-weighted portfolio gauges
E7. 基于回复量加权的组合仪表盘
For each of the five gauge KPIs, aggregate Σnumerator / Σdenominator across channel-active,
scored campaigns (not a mean of percentages). Round to whole %. = # campaigns feeding the
LinkedIn gauges; = # feeding the email gauges. Gauge zone = .
N_LIN_EMzone(k, weightedValue)对于五个仪表盘指标中的每一个,汇总所有渠道活跃且已评分营销活动的Σ分子 / Σ分母(而非百分比平均值)。取整为整数百分比。 = 为领英仪表盘提供数据的营销活动数量; = 为邮件仪表盘提供数据的营销活动数量。仪表盘区间 = 。
N_LIN_EMzone(k, weightedValue)E8. Reply classification + urgency sort
E8. 回复分类 + 优先级排序
- Classify each new RECEIVED reply into from the thread.
interested / neutral / not_interested / wrong_fit= explicit call/meeting request.hot= LGM auto-qualify said interested but you corrected it here.corr∈ {LINKEDIN, EMAIL}.chan(actionable) =act.cls ∈ {interested, neutral} - waited days = , min 0;
floor((asOf − lastMessageAt)/86400000)= actionable AND waited > 3.urgent - Urgency sort (actionable only): group 0 = call requests (), 1 = interested, 2 = neutral; within a group, longest-waiting first. Show a "waited Xd" badge per row (urgent → red marker).
hot - Only interested + neutral are listed as rows. /
not_interestedare collapsed to a count behind an "open in LGM inbox ↗" link; keep a small "N corrected" tally visible there so auto-qualify corrections stay surfaced. No write-back to LGM (the user validates in LGM).wrong_fit
- 将每个新收到的回复从对话线程中分类为。
interested / neutral / not_interested / wrong_fit= 明确的电话/会议请求。hot= LGM自动标记为感兴趣,但在此处已修正分类。corr∈ {LINKEDIN, EMAIL}。chan(可操作)=act。cls ∈ {interested, neutral} - 等待天数 = ,最小值为0;
floor((当前时间 − 最后消息时间)/86400000)= 可操作且等待天数 > 3。urgent - 优先级排序(仅针对可操作回复):组0 = 电话请求(),组1 = 感兴趣,组2 = 中性;同一组内按等待时间从长到短排序。每行显示**“已等待Xd”**标签(紧急状态显示红色标记)。
hot - 仅列出感兴趣+中性回复。/
not_interested回复折叠为计数,显示在*“在LGM收件箱中打开 ↗”链接后;保留一个小型*“已修正N条”**统计,以便展示对自动分类的修正。不向LGM写回数据(用户需在LGM中验证分类)。wrong_fit
E9. Count KPIs (North Star, portfolio-wide, this week) — refresh-safe
E9. 统计关键指标(核心指标,全组合范围,本周数据)——支持刷新
Source the counts from the this-week RECEIVED set (E1 step 4b, ), not
from the to-handle queue, so leads you've already answered still count.
search_conversations- (hero) = count of this-week received threads classified
TOTAL_POSITIVE_REPLIES(incl. call requests), portfolio-wide.interested - (secondary) = count of this-week received threads (any lead reply this week).
TOTAL_REPLIES - Week-cumulative + refresh-safe: persist this week's positive and total counts (and the
) in the snapshot. On a re-run within the same ISO week, take the union of already-counted ids and the fresh set — a refresh may only add, never drop, a reply already counted this week. (Across weeks the count resets per week, as expected.)
classifiedReplyIds - Never render a "0 positive leads" hero; if zero, show plainly with the delta caveat.
0
统计数据来源于本周收到的回复数据集(E1步骤4b,),而非待办队列,因此用户已回复的潜在客户仍需计入统计。
search_conversations- (核心指标)= 本周收到的分类为
TOTAL_POSITIVE_REPLIES的对话线程数量(包含电话请求),全组合范围。interested - (次要指标)= 本周收到的对话线程数量(本周内潜在客户的所有回复)。
TOTAL_REPLIES - 本周累计 + 支持刷新:将本周的积极回复数和总回复数(以及)持久化到快照中。在同一ISO周内重新运行时,取已统计ID与新拉取数据集的并集——刷新仅可增加统计数量,绝不删除本周已统计的回复。(跨周时统计数据按周重置,符合预期。)
classifiedReplyIds - 绝不渲染“0个积极潜在客户”的核心指标;若为0,则直接显示并标注变化量说明。
0
E10. Period comparison (deltas)
E10. 周期对比(变化量)
From the rolling snapshot history in (keep ≥5 weeks):
./.lgm-wpa/- For each count KPI and each gauge, show vs last week and vs trailing-30-day weekly average (last ≤4 prior weeks). Arrow ▲/▼; up = green, down = red — inverted for bounce (down is good).
- Units: counts have no unit; gauges use . Zero delta →
pt.+0 - No history yet → render and caption "Baseline week - trends start after 2+ weeks of history." With history, caption is "Deltas compare this week vs last week and vs the trailing 30-day weekly average."
— · trend starts after 2+ weeks
从中的滚动快照历史(保留≥5周)获取数据:
./.lgm-wpa/- 对于每个统计关键指标和仪表盘,显示与上周对比和与过去30天周平均值对比(最近≤4周)。使用箭头▲/▼;上升为绿色,下降为红色——退信率反向显示(下降为好)。
- 单位:统计数量无单位;仪表盘使用。变化量为0时显示
pt。+0 - 尚无历史数据 → 渲染并标注说明*“基准周 - 累计2周及以上数据后开始显示趋势。”。有历史数据时,标注说明“变化量为本周与上周、以及与过去30天周平均值的对比。”*
— · 2周后开始显示趋势
E11. Health cards (under the gauges, Weekly performance tab)
E11. 健康卡片(仪表盘下方,每周绩效标签页)
Replace any single-sentence "verdict" with two cards:
- 🟢 On target — lists the gauges currently green (`"LinkedIn acceptance 53%, email bounce 7% ...
- all on target."`).
- 🟡 Watch — for each non-green gauge, where note =
"<KPI> <v>% - <gap>pt under/over the <good>% target, <note>"if gap ≤ 3, elsejust optimization, not urgent(or, if that gauge is red,worth a pass). Add the pillneeds work. Then a red line:N campaign(s) to fix— so 🔴 campaigns stay visible on this tab and point to the To do tab."Real fix: N campaign(s) to fix on their main channel - <name> (<KPI> <v>%); ... Rewrite that copy first." - Empty state: no 🔴 campaigns → the To-fix cards region shows "No 🔴 campaigns this week - every running campaign is On target or Watch on its primary channel."
将任何单句“结论”替换为两张卡片:
- 🟢达标 — 列出当前处于绿色状态的仪表盘指标()。
“领英接受率53%,邮件退信率7%……全部达标。” - 🟡需关注 — 对于每个非绿色指标,显示,其中说明 = 若差距≤3则为“仅需优化,非紧急”,否则为“值得关注”(若指标为红色则为“需优化”)。添加标签
“<关键指标> <v>% - 与<良好值>%目标相差<gap>pt,<说明>”。然后显示一条红色提示:N个需优化营销活动——确保🔴营销活动在本标签页可见,并指向待办事项标签页。“重点优化:N个主渠道需优化的营销活动 - <名称>(<关键指标> <v>%);……优先重写该文案。” - 空状态:无🔴营销活动 → 需优化卡片区域显示*“本周无🔴营销活动 - 所有运行中的营销活动主渠道状态均为达标或需关注。”*
E12. Status lexicon (use these three words everywhere)
E12. 状态术语(所有场景统一使用以下三个词)
🟢 On target · 🟡 Watch · 🔴 To fix — identical on the gauge legend, the two health cards, the
panorama badges, and the campaign cards. Do not print "Healthy", "needs work", or "To improve".
🟢达标 · 🟡需关注 · 🔴需优化 — 在仪表盘图例、两张健康卡片、全景视图标签和营销活动卡片中保持一致。绝不使用“健康”“需要改进”或“有待提升”等表述。
FILL CONTRACT — placeholders in assets/dashboard-template.html
assets/dashboard-template.html填充规则 — assets/dashboard-template.html
中的占位符
assets/dashboard-template.htmlRead , compute the values below, replace every , and render
the result as a live artifact. Escape all user-supplied text (campaign names, reply notes, lead
names) for HTML. Gauge colored bands and the target tick are derived from the E3 constants at
fill-time (see the gauge snippet) — never hardcode band widths; change a threshold and the bands move.
assets/dashboard-template.html{{...}}| Placeholder | Source / value |
|---|---|
| Monday of the current week, e.g. |
| Date the pull ran, e.g. |
| The scheduled-task id captured at runtime in Phase 4.5 (this user's own task). If no routine was created, fill with an empty string — the ↻ button then falls back to a friendly alert. Never ship a real id in the template file. |
| One-line screen-reader summary: |
| |
| 2-3 |
| actionable reply count (used in 3 spots). |
| call-request count. |
| escaped reply-triage prompt (snippet P). |
| one |
| if any non-actionable replies: the inbox link with the corrected tally (snippet I); else empty string. |
| To-fix cards sorted by |
| |
| |
| delta span for each count KPI (snippet D). |
| |
| |
| E10 caption (history vs baseline). |
| gauge feed counts (E7). |
| the five portfolio gauges in order: linkedin_acceptance, linkedin_reply, email_bounce, email_open, email_reply (snippet G, each wrapped in |
| the |
| one |
| the low-sample header row + one row per low-sample campaign (snippet LOW); empty string if none. |
读取,计算以下值,替换所有占位符,并将结果渲染为实时工件。对用户提供的文本(营销活动名称、回复说明、潜在客户名称)进行HTML转义。仪表盘彩色区间和目标刻度需在填充时从E3常量推导(见仪表盘代码片段)——绝不硬编码区间宽度;修改阈值后区间会自动调整。
assets/dashboard-template.html{{...}}| 占位符 | 来源 / 取值 |
|---|---|
| 当前周的周一日期,例如 |
| 数据拉取完成的日期,例如 |
| 阶段4.5运行时捕获的定时任务ID(用户专属任务)。若未创建例行任务,则填充空字符串——此时↻按钮会显示友好提示。绝不在模板文件中嵌入真实ID。 |
| 一行屏幕阅读器摘要: |
| |
| 2-3个 |
| 可操作回复数量(用于3个位置)。 |
| 电话请求数量。 |
| 转义后的回复优先级处理提示(见代码片段P)。 |
| 每个可操作回复对应一个 |
| 若存在不可操作回复:包含修正统计的收件箱链接(见代码片段I);否则为空字符串。 |
| 按 |
| |
| |
| 每个统计关键指标的变化量 span(见代码片段D)。 |
| 默认值为 |
| 默认值为 |
| E10的说明文字(有历史数据/基准周)。 |
| 仪表盘数据来源数量(E7)。 |
| 五个组合仪表盘,顺序为:linkedin_acceptance、linkedin_reply、email_bounce、email_open、email_reply(见代码片段G,每个包裹在 |
| |
| 每个已评分营销活动对应一对 |
| 样本量不足的标题行 + 每个样本量不足活动对应一行(见代码片段LOW);若无则为空字符串。 |
Snippet G — gauge (bands derived from constants)
代码片段G — 仪表盘(区间从常量推导)
For an "up" KPI with ; needle left = ; :
(good, floor)clamp(value,0,100)%z = zone(k,value)<div class="stat"><div class="k">{LABEL}</div>
<div class="gauge"><span class="gbands">
<span class="gb r" style="left:0;width:{floor}%"></span>
<span class="gb y" style="left:{floor}%;width:{good-floor}%"></span>
<span class="gb g" style="left:{good}%;width:{100-good}%"></span>
<span class="gtick" style="left:{good}%"></span>
<span class="gneedle {z}" style="left:{value}%"></span></span>
<span class="gval {z}">{value}%</span><span class="gtgt">target ≥{good}%</span></div>
<div class="dwrap">{DELTA}</div></div>For a "down" KPI (email_bounce): bands are (0→good), (good→floor), (floor→100), tick
at , target text . Labels: , ,
, , . The same gauge markup (row layout via ) is reused
inside campaign detail rows — there without the /delta wrapper.
gyrgoodtarget <{good}%LinkedIn acceptanceLinkedIn replyEmail bounceEmail openEmail reply.dg.stat对于趋势向上的关键指标,参数为;指针位置 = ;:
(良好值, 下限值)clamp(value,0,100)%z = zone(k,value)<div class="stat"><div class="k">{LABEL}</div>
<div class="gauge"><span class="gbands">
<span class="gb r" style="left:0;width:{floor}%"></span>
<span class="gb y" style="left:{floor}%;width:{good-floor}%"></span>
<span class="gb g" style="left:{good}%;width:{100-good}%"></span>
<span class="gtick" style="left:{good}%"></span>
<span class="gneedle {z}" style="left:{value}%"></span></span>
<span class="gval {z}">{value}%</span><span class="gtgt">target ≥{good}%</span></div>
<div class="dwrap">{DELTA}</div></div>对于趋势向下的关键指标(email_bounce):区间为(0→良好值)、(良好值→下限值)、(下限值→100),刻度位于位置,目标文本为。标签:、、、、。相同的仪表盘标记(通过实现行布局)可复用在营销活动详情行中——此时无需/变化量包裹。
gyr良好值target <{good}%LinkedIn acceptanceLinkedIn replyEmail bounceEmail openEmail reply.dg.statSnippet D — delta span
代码片段D — 变化量span
<span class="delta"><span class="dl">vs last wk</span> <b class="d {cls}">{▲/▼ ±d}{unit}</b><span class="dl">· vs 30d</span> <b class="d {cls}">{▲/▼ ±d}{unit}</b></span>cls<span class="delta none">- · trend starts after 2+ weeks</span><span class="delta"><span class="dl">vs last wk</span> <b class="d {cls}">{▲/▼ ±d}{unit}</b><span class="dl">· vs 30d</span> <b class="d {cls}">{▲/▼ ±d}{unit}</b></span>cls<span class="delta none">- · trend starts after 2+ weeks</span>Snippet M — moves list (example shape; adapt to the data)
代码片段M — 行动列表(示例格式;需根据数据调整)
<li><b>Answer the {nHot} call requests</b> ({callNames}){ - firstCall waited Xd if urgent}. Then reply to {firstInterested} and nudge the {nNeutral} warm neutrals.</li>
<li><b>Rewrite the flagged copy</b> on the {N} campaign(s) leaking their main-channel reply rate.</li>
<li><b>Keep classifying replies in LGM</b> so next week's trend stays live.</li>Drop line 1 if no replies, line 2 if no to-fix campaigns. Never fabricate; only mention names/counts present.
<li><b>回复{nHot}个电话请求</b> ({callNames}){ 若紧急则添加 - 最早的请求已等待Xd}。然后回复{firstInterested},并跟进{nNeutral}个中性潜在客户。</li>
<li><b>重写标记的文案</b>,修复{N}个主渠道回复率下滑的营销活动。</li>
<li><b>持续在LGM中分类回复</b>,确保下周趋势数据准确。</li>若无回复则删除第1行,若无需优化活动则删除第2行。绝不编造内容;仅提及实际存在的名称/数量。
Snippet R — reply row (actionable only, urgency-sorted)
代码片段R — 回复行(仅可操作回复,按优先级排序)
<tr><td class="cname">{lead}{ <span class="hotpill">CALL</span> if hot}{ <span class="corrpill" title="LGM auto-qualify said interested; corrected">corrected</span> if corr}</td>
<td><span class="wbadge{ urgent}">waited {X}d</span></td>
<td><span class="chan {li|em}">{LINKEDIN|EMAIL}</span></td>
<td><span class="rcls {good|neu}">{interested|neutral}</span></td>
<td class="rnote">{why}</td></tr><tr><td class="cname">{lead}{ 若为hot则添加<span class="hotpill">CALL</span>}{ 若为corr则添加<span class="corrpill" title="LGM自动标记为感兴趣;已修正">corrected</span>}</td>
<td><span class="wbadge{ 若为urgent则添加}">waited {X}d</span></td>
<td><span class="chan {li|em}">{LINKEDIN|EMAIL}</span></td>
<td><span class="rcls {good|neu}">{interested|neutral}</span></td>
<td class="rnote">{why}</td></tr>Snippet I — inbox link (with corrected tally)
代码片段I — 收件箱链接(包含修正统计)
<a class="inboxlink" href="https://app.lagrowthmachine.com/" target="_blank" rel="noopener">{N} more replies (not interested / wrong fit){, M corrected} - open in LGM inbox ↗</a><a class="inboxlink" href="https://app.lagrowthmachine.com/" target="_blank" rel="noopener">{N}条其他回复(不感兴趣/不符合需求){, M条已修正} - 在LGM收件箱中打开 ↗</a>Snippet P — reply-triage prompt (goes in the button's data-prompt, escaped)
代码片段P — 回复优先级处理提示(放入按钮的data-prompt,需转义)
Use the /reply-draft-assistant skill. Handle my {nAct} actionable replies across all running campaigns, most urgent first: {nHot} call requests ({callNames}) first, then {nInterested} interested and {nNeutral} warm neutrals to nudge (some have waited over a week). Draft each in the thread language for my approval. If the /reply-draft-assistant skill is not installed, download it from https://github.com/LaGrowthMachine/gtm-system first, then run it.Use the /reply-draft-assistant skill. Handle my {nAct} actionable replies across all running campaigns, most urgent first: {nHot} call requests ({callNames}) first, then {nInterested} interested and {nNeutral} warm neutrals to nudge (some have waited over a week). Draft each in the thread language for my approval. If the /reply-draft-assistant skill is not installed, download it from https://github.com/LaGrowthMachine/gtm-system first, then run it.Snippet C — to-fix card
代码片段C — 需优化活动卡片
Card with , a + meta, and a Fix-this button whose
(escaped) is built per the routing skill:
card-namebadge tofixcontacted Ndata-prompt- :
campaign-challengerUse the /campaign-challenger skill. Challenge campaign "{name}" ({label} {value}%, below the {floor}% floor, likely {cause}): rewrite the current copy of the flagged step. If the /campaign-challenger skill is not installed, download it from https://github.com/LaGrowthMachine/gtm-system first, then run it. - :
sales-nav-search-builder... Rebuild the targeting for campaign "{name}" ({label} {value}%, below the {floor}% floor): draft a tighter Sales Navigator search and connection note. ... - :
won-deal-icp-finder... Clean the audience for campaign "{name}" ({label} {value}%, below the {floor}% floor): rebuild it from a verified ICP list. ...
Then the block (Fix #1 tag, KPI label, , , ), optional channel-tip
box and watch/leg chips, an optional diagnosis line + "Current copy to rewrite"
block (verbatim step copy, channel + step type), and a with the full-funnel gauges. Use
the exact class names from the template's CSS.
fix1{conf} confidence{value}% now · target ≥{good}% · floor {floor}% · {gap} pt(s) under targetLikely cause: {cause}recodiag-outfocus<details>卡片包含、 + 元数据,以及一个立即优化按钮,其(已转义)需根据关联技能构建:
card-namebadge tofixcontacted Ndata-prompt- :
campaign-challengerUse the /campaign-challenger skill. Challenge campaign "{name}" ({label} {value}%, below the {floor}% floor, likely {cause}): rewrite the current copy of the flagged step. If the /campaign-challenger skill is not installed, download it from https://github.com/LaGrowthMachine/gtm-system first, then run it. - :
sales-nav-search-builder... Rebuild the targeting for campaign "{name}" ({label} {value}%, below the {floor}% floor): draft a tighter Sales Navigator search and connection note. ... - :
won-deal-icp-finder... Clean the audience for campaign "{name}" ({label} {value}%, below the {floor}% floor): rebuild it from a verified ICP list. ...
然后是区块(首要优化标签、关键指标标签、、、)、可选的渠道建议区块和需关注/环节标签、可选的诊断行 + “需重写的当前文案”区块(环节原文,包含渠道+环节类型),以及包含全漏斗仪表盘的。需使用模板CSS中定义的精确类名。
fix1{conf} confidence{value}% now · target ≥{good}% · floor {floor}% · {gap} pt(s) under targetLikely cause: {cause}recodiag-outfocus<details>Snippet PANO / LOW — panorama rows
代码片段PANO / LOW — 全景视图行
prowdrow—n/azilowheadBelow sample floor - listed for completeness, not scoredprow low{contacted} contacted · ... - not scored (below the 20-contact floor; rates on so few sends aren't reliable).prowdrow—n/azilowheadBelow sample floor - listed for completeness, not scoredprow low{contacted} contacted · ... - not scored (below the 20-contact floor; rates on so few sends aren't reliable).SNAPSHOT PERSISTENCE (in the current project)
快照持久化(当前项目中)
Create in the project where the skill runs and write
for the current ISO week. Store:
./.lgm-wpa/./.lgm-wpa/snapshot-<YYYY>-W<ww>.json{
"week": "2026-W28",
"identities": ["<id>", ...],
"counts": { "posReplies": N, "totalReplies": N },
"positiveReplyIds": ["<conversationId>", ...], // this-week ids classified interested (for the union)
"weekReplyIds": ["<conversationId>", ...], // this-week ids that received a lead reply
"gauges": { "linkedin_acceptance": %, "linkedin_reply": %, "email_bounce": %, "email_open": %, "email_reply": % },
"campaigns": [ { "id", "name", "contacted", "status", "fix1": {...}|null, "kpis": {...} } ],
"classifiedReplyIds": ["<conversationId>", ...] // every id already classified (skip-list, incremental)
}- First run = baseline: no prior snapshot → all deltas render and the baseline caption.
— - Before overwriting, load the latest prior snapshot to compute WoW + 30-day deltas and to skip already-classified reply ids. Keep ≥5 weeks (prune older) so the ~4-week average is computable.
- One snapshot per ISO week. Re-running in the same week updates that week's file: union
/
positiveReplyIdswith the fresh pull, recomputeweekReplyIdsfrom the unions (so the hero count is refresh-safe and only grows within the week), then persist. Deltas always compare against prior weeks' snapshots, never the current week's earlier run.counts
在技能运行的项目中创建目录,并为当前ISO周写入文件。存储内容如下:
./.lgm-wpa/./.lgm-wpa/snapshot-<YYYY>-W<ww>.json{
"week": "2026-W28",
"identities": ["<id>", ...],
"counts": { "posReplies": N, "totalReplies": N },
"positiveReplyIds": ["<conversationId>", ...], // 本周分类为感兴趣的对话ID(用于并集计算)
"weekReplyIds": ["<conversationId>", ...], // 本周收到潜在客户回复的对话ID
"gauges": { "linkedin_acceptance": %, "linkedin_reply": %, "email_bounce": %, "email_open": %, "email_reply": % },
"campaigns": [ { "id", "name", "contacted", "status", "fix1": {...}|null, "kpis": {...} } ],
"classifiedReplyIds": ["<conversationId>", ...] // 所有已分类的对话ID(跳过列表,增量处理)
}- 首次运行 = 基准:无历史快照 → 所有变化量显示并标注基准周说明。
— - 覆盖前,加载最新的历史快照以计算周环比+30天变化量,并跳过已分类的回复ID。保留≥5周数据(删除更早的数据),以便计算约4周的平均值。
- 每个ISO周对应一个快照。同一周内重新运行时更新该周的文件:将/
positiveReplyIds与新拉取数据集取并集,从并集中重新计算weekReplyIds(确保核心统计数据支持刷新,且仅在本周内增加),然后持久化。变化量始终与过去几周的快照对比,而非本周内的早期运行结果。counts
ACCEPTANCE (self-check before finishing)
验收标准(完成前自检)
- Fresh env, LGM absent → skill guided install, waited, re-detected, then proceeded.
- LGM present → detected silently, asked identity, (optionally) deals, built the artifact from the user's live data. No data from anyone but the user appears anywhere.
- HubSpot + present → deal layer offered and delegated.
campaign-impact-analyzer - absent → dashboard shipped anyway + install pointer in the handoff.
campaign-impact-analyzer - Output is a live artifact (2 tabs) rendered with the available artifact tool (no hard-coded
tool name); a snapshot was written to .
./.lgm-wpa/ - Refresh routine offered (Phase 4.5): on yes → Monday task created, its runtime id injected as
, ↻ button live; on skip → empty id, button falls back gracefully. No real task id is embedded in the shipped files.
{{REFRESH_TASK_ID}} - Counts are refresh-safe: /
posRepliescome from the this-week RECEIVED set (totalReplies), persisted and unioned within the week, so a mid-week refresh only adds and never drops an already-counted reply (fixes undercount from the to-handle queue).search_conversations - Single status lexicon (On target / Watch / To fix) everywhere; email reply uses 🟢≥6/🟡3-6/🔴<3; bounce gauge (not deliverability); no benchmark source/brand cited; English; self-contained.
- 全新环境,LGM未安装 → 技能引导安装、等待、重新检测,然后继续执行。
- LGM已安装 → 静默检测、询问身份、(可选)询问交易层、基于用户实时数据构建工件。所有数据均来自用户自身,无任何其他用户数据。
- HubSpot + 已安装 → 提供交易层并委托任务。
campaign-impact-analyzer - 未安装 → 仍交付仪表盘 + 交接语中提示安装。
campaign-impact-analyzer - 输出结果为实时工件(两个标签页),使用可用的工件工具渲染(无硬编码工具名称);已将快照写入目录。
./.lgm-wpa/ - 已提供刷新例行任务设置选项(阶段4.5):同意则创建周一任务,将运行时ID注入,↻按钮生效;拒绝则填充空ID,按钮显示友好提示。交付文件中无真实任务ID。
{{REFRESH_TASK_ID}} - 统计数据支持刷新:/
posReplies来自本周收到的回复数据集(totalReplies),在本周内持久化并取并集,因此周中刷新仅增加统计数量,绝不删除已统计的回复(解决待办队列导致的统计不足问题)。search_conversations - 所有场景统一使用状态术语(达标/需关注/需优化);邮件回复率采用🟢≥6/🟡3-6/🔴<3;显示退信率仪表盘(而非送达率);未提及基准来源/品牌;英文术语正确;完全独立运行。