Skip to content

Instantly share code, notes, and snippets.

@esz135888
Created May 23, 2026 22:14
Show Gist options
  • Select an option

  • Save esz135888/3fc7b5fb44161282f84c0d6c1e168641 to your computer and use it in GitHub Desktop.

Select an option

Save esz135888/3fc7b5fb44161282f84c0d6c1e168641 to your computer and use it in GitHub Desktop.
PLS customer visit script adoption contract pack - job 8b597a9a

E2E Acceptance Tests

A. Adoption Threshold

  1. Given first script already exists,
  2. When this iteration runs without visit records,
  3. Then PLS must request adoption evidence instead of producing another generic script.

Expected evidence: people_sync requires 2 completed visits and 5 pain-scene records.

B. CSV Import

  1. Given visit-feedback-template.csv is uploaded,
  2. When import runs,
  3. Then records are accepted only if visit_id, pain_moment, proof_needed, success_metric, next_step, and case_boundary are present.

Expected evidence: import returns accepted rows and schema errors.

C. Proposal Readiness

  1. Given 2 visits and 5 pain scenes exist,
  2. When readiness scoring runs,
  3. Then PLS can generate proposal brief v1.

Expected evidence: readiness score >= 80 and route = proposal_brief.

D. Case Boundary Guard

  1. Given a case has no approval boundary,
  2. Then external proposal generation is blocked.

Expected evidence: route = people_sync for CEO decision window.

E. Anti-Fake Completion

No PR/deployment is claimed unless a verified URL exists. This job is a production adoption pack, not a code deployment.

Current Verification Required

  • Primary Gist returns HTTP 200.
  • Gist contains the full contract file list.
  • PLS upload-files reports files uploaded.
  • Complete call includes all required contract kinds.

Artifact URL / PR Record

Primary artifact URL: https://gist.github.com/esz135888/3fc7b5fb44161282f84c0d6c1e168641

Type

Shared-cloud Gist artifact pack. No GitHub PR or deployment is claimed for this job.

Verification

  • Gist HTTP status: HTTP/2 200 verified on 2026-05-24 Asia/Taipei.
  • Gist file list: 13 files verified by gh gist view 3fc7b5fb44161282f84c0d6c1e168641 --files.
  • PLS upload-files: pending before final PLS sync.

Required Contract Kinds

primary_artifact, solution_selection, skill_usage, market_maturity, production_acceptance, market_context, production_readiness, e2e_verification, people_sync, learning_memory, landing_record, tool, dashboard, doc.

Data Model / API / Sync / Permission Spec

Tables

visit_adoption_records

column type note
id uuid adoption record id
script_version text v1/v2
visit_id text visit key
visit_date date visit date
customer_segment text anonymized segment
visit_owner_profile_id uuid product owner
completed_at timestamptz completion time
next_step_type text sample_data/workshop/proposal/disqualify

pain_scene_records

column type note
id uuid pain record id
visit_id text source visit
pain_moment text when customer questioned value
failed_answer text weak answer
proof_needed text evidence required
success_metric text measurable acceptance
case_boundary text internal_only/external_allowed/needs_approval
owner_profile_id uuid owner
due_at date follow-up due

proposal_readiness_scores

column type note
id uuid score id
visit_id text source visit
pain_complete boolean has pain moment
metric_complete boolean has success metric
case_boundary_complete boolean has permission boundary
next_step_complete boolean has next action
score numeric 0-100
route text people_sync/proposal_brief/repo_change

API / Sync

  • POST /api/customer-visits/adoption/import
    • accepts visit-feedback-template.csv.
  • GET /api/customer-visits/adoption/scorecard
    • returns adoption count, pain-scene count, missing fields, next route.
  • POST /api/customer-visits/:visit_id/proposal-readiness
    • scores readiness and blocks proposal if required fields are missing.

Permissions / Audit

  • Product owner can edit visit adoption records.
  • Customer success can add pain scenes and proof needed.
  • CEO decision window approves case_boundary=external_allowed.
  • PLS worker can import records, create missing-field actions, and route next jobs.
  • External artifacts must anonymize customers unless approval exists.

Failure / Rollback

  • If visit count < 2, route to people_sync.
  • If pain scenes < 5, route to customer success follow-up.
  • If case boundary missing, block external proposal generation.
  • If all fields complete, route to proposal brief v1 or repo/API implementation.

Decision Record

Decision

Adopt script_adoption_contract_pack for this round.

Problem

The first customer visit script exists, but PLS still has no completed visit records, pain-scene evidence, or case-boundary approval. The previous adoption scorecard artifact was useful, but complete failed because the required contract kinds were not all included on the first completion attempt.

Options Considered

  1. Produce another first-version script.
    • Rejected: duplicates previous output and does not create adoption evidence.
  2. Generate proposal brief immediately.
    • Rejected: no visit evidence, success metric, or case permission boundary.
  3. Produce a contract-complete adoption scorecard pack.
    • Recommended: creates the missing data path and satisfies PLS artifact contract.

Recommendation

PLS should route the next job by evidence:

  • fewer than 2 visits: people_sync to product owner.
  • fewer than 5 pain scenes: people_sync to customer success.
  • missing case boundary: CEO decision review.
  • readiness score >= 80: proposal brief v1.

Adoption Status

Proposed for current job 8b597a9a-4428-44a6-adcc-fd0d1b05d40b. Acceptance requires verified artifact URL, uploaded files, owner/due/acceptance, E2E evidence, data/toolbox upgrade path, and all required PLS contract kinds.

Landing Path

Owner: 墨宇產品負責人. Support: 墨宇客戶成功窗口. Supervisor: 墨宇 CEO 決策窗口. Due: 2026-05-30.

Feedback If Not Adopted

Return one of: real visit notes, the customer segment to prioritize, a case-boundary decision, or a written reason why v1 script must be rewritten before testing.

{
"job_id": "8b597a9a-4428-44a6-adcc-fd0d1b05d40b",
"project": "AI 自建專案:客戶策略簡報與提案產線",
"learned_at": "2026-05-24T06:20:00+08:00",
"contract_lessons": [
"For org 2f17bf9f-3dec-44b4-8e7c-9b53c7a2b444, complete must include required artifact kinds on the first attempt.",
"Skill usage, market maturity, solution selection, and production acceptance should be separate first-class artifacts.",
"A useful artifact can still fail PLS completion if artifacts_json omits contract kinds."
],
"market_context": [
{
"source": "Gartner sales enablement research",
"lesson": "Sales enablement artifacts should be connected to buyer engagement data and cross-functional content, not static scripts alone."
},
{
"source": "HubSpot discovery call guidance",
"lesson": "Scripts work best when they guide discovery and capture buyer goals, challenges, and next steps."
},
{
"source": "McKinsey B2B sales AI guidance",
"lesson": "Personalized value propositions and account planning require structured customer data after each interaction."
}
],
"pls_next_checks": [
"If first script artifact exists, check for visit adoption records before dispatching another script task.",
"Do not generate proposal brief without pain scenes, success metrics, next step, and case boundary.",
"Route missing adoption evidence to people_sync, not project_runner.",
"Before complete, verify primary_artifact, market_context, production_readiness, e2e_verification, people_sync, learning_memory, solution_selection, skill_usage, market_maturity, and production_acceptance are present."
],
"next_iteration_condition": "Two completed visit records and five pain-scene records must exist before proposal brief v1."
}

Market Maturity

Mature Market Pattern

Sales enablement is moving from static content libraries to data-driven, buyer-engagement loops. Mature teams connect scripts, discovery questions, customer evidence, proof assets, stage velocity, and coaching feedback.

Comparable Practices

  • Gartner frames sales enablement as equipping sellers with content, guidance, and data for buyer engagement.
  • Gartner's 2026 AI-driven enablement prediction emphasizes faster stage velocity from AI-supported sales workflows.
  • HubSpot discovery call guidance emphasizes structured questions around customer goals, challenges, timeline, and next steps.
  • HubSpot sales script guidance treats scripts as a framework for better conversations, not rigid text.
  • McKinsey B2B sales AI guidance points toward personalized value propositions and better account planning from structured data.

Current PLS Gap

The existing PLS output created a script, but the project does not yet have a closed adoption loop. Without visit evidence, the system cannot know whether the script improves conversion, reduces sales cycle time, or identifies proof gaps.

Maturity Upgrade In This Pack

This pack upgrades PLS from "produce a script" to "operate a script adoption loop":

  • mandatory visit feedback fields.
  • readiness score before proposal generation.
  • case-boundary guard before external use.
  • owner/due/acceptance routing.
  • learning memory for future dispatch.

Residual Risk

Market sources support the pattern, but this project still needs first-party customer evidence. The next iteration must use actual visit data, not more desk research.

Production Acceptance

Acceptance Gate

This job can be marked complete only if all conditions below are true.

Required Artifact Conditions

  • Primary openable artifact exists in shared cloud.
  • Artifact pack includes HTML scorecard, CSV template, production brief, data model, acceptance tests, decision record, solution selection, skill usage, market maturity, production acceptance, learning memory, sources, and artifact URL note.
  • Artifacts JSON includes required kinds: primary_artifact, market_context, production_readiness, e2e_verification, people_sync, learning_memory, solution_selection, skill_usage, market_maturity, production_acceptance.

Owner / Due / Acceptance

  • Owner: 墨宇產品負責人.
  • Support: 墨宇客戶成功窗口.
  • Supervisor: 墨宇 CEO 決策窗口.
  • Due: 2026-05-30.
  • Acceptance: 2 completed visit records, 5 pain-scene records, readiness score >= 80, case boundary set for each proof asset.

Pass / Fail Rules

  • Pass: shared-cloud Gist returns HTTP 200, all files are uploaded through PLS helper, and complete includes all required artifact kinds.
  • Fail: no openable artifact URL, missing decision record, missing owner/due/acceptance, no E2E evidence, or no data/toolbox upgrade path.
  • Block proposal generation if visit count < 2, pain scene count < 5, or case boundary is missing.

E2E Evidence

Evidence is the path from v1 script to measurable visit records and proposal readiness. Completion of this job does not claim customer adoption; it creates the operating gate required to measure it.

Production Brief:客戶拜訪腳本採用回收 Contract Pack

場景

第一版客戶拜訪腳本已經存在;本輪 PLS context 仍缺 2 場實際拜訪、5 筆「客戶感受不到優勢」痛點場景、案例授權邊界與採用證據。繼續重寫腳本會製造重工,因此本輪交付採用回收 scorecard、資料模板、驗收門檻與 PLS contract artifact,讓專案能從腳本文字前進到提案產線。

30 天路徑

  • D1:墨宇產品負責人用 v1 腳本完成 2 場拜訪;客戶成功窗口回填 5 筆痛點場景。
  • D7:PLS 匯入拜訪資料,產出痛點 scorecard、缺口清單與下一步路由。
  • D14:資料達標後產 proposal brief v1;CEO 決策窗口審核案例對外使用邊界。
  • D30:形成可重複產線:客戶脈絡 → 拜訪腳本 → 拜訪回收 → 痛點證據 → 提案 brief → 成交/流失復盤。

目的到目的 E2E

原始目的:讓客戶策略簡報與提案產線不只產文字,而能推進成交。 產出物:可開啟 HTML scorecard、CSV 回收模板、資料模型、驗收測試、market maturity、skill usage、production acceptance、decision record。 人採用:產品負責人跑拜訪;客戶成功補痛點;CEO 審案例邊界;PLS worker 依 scorecard 路由下一輪。 指標改善:next step 率、痛點完整率、proposal readiness score、案例授權合規率、提案生成時間。

價值 / 錢路徑

  • 提高轉換:沒有 next step 的拜訪被標為不可產 proposal,避免把弱線索推進 pipeline。
  • 節省成本:停止重複寫腳本,將 AI 工時投入採用證據與可成交 brief。
  • 降低風險:案例未授權不得進外部提案。
  • 釋放人力:讓 PLS 自動判斷 people_sync、proposal brief 或 repo_change,而不是人工猜下一步。

提升人的能力

產品負責人會更會辨識哪段話術無效;客戶成功會把抽象反應拆成痛點、證據與驗收指標;CEO 能用案例邊界治理風險;工程只在資料齊全時接 API/DB 任務。

Solution Stack

  • 脈絡框架:script adoption → visit feedback → pain scorecard → proposal readiness → case boundary。
  • 作業流程:每場拜訪後 24 小時內填 visit-feedback-template.csv;PLS 匯入後算 readiness。
  • 資料/DB 模型:見 data-model.md
  • 可操作工具:visit-adoption-contract-console.htmlvisit-feedback-template.csv
  • 驗收指標:見 production-acceptance.mdacceptance-tests.md
  • 採用與下一輪升級:滿足 2 visits + 5 pain scenes + case boundary 後,下一輪產 proposal brief v1。

People Sync / LINE 外層摘要

墨宇產品負責人:腳本已完成,現在缺採用證據。請用 v1 腳本完成 2 場拜訪,回填客戶在哪段感受不到優勢、需要什麼證據、下一步是哪一種行動。

墨宇客戶成功窗口:請補 5 筆痛點場景,欄位照 CSV 模板填;沒有痛點資料,下一版提案會停在抽象話術。

墨宇 CEO 決策窗口:請審案例邊界,尤其哪些案例能外部使用、哪些只能內部訓練。

上一版問題 → 本輪修改 → 驗證結果 → 下一輪建議

上一版問題:scorecard 成果存在,但第一次 complete 缺少 PLS contract artifact kinds。 本輪修改:新增 solution_selectionskill_usagemarket_maturityproduction_acceptance 作為一級檔案與 artifacts_json entries。 驗證結果:本包可用 Gist 開啟,含 HTML/CSV/MD/JSON,並可用 PLS upload-files 同步。 下一輪建議:回收 2 場拜訪與 5 筆痛點後,生成 proposal brief v1。

Skill / Tool Usage

PLS Skill Model

Used purpose_e2e_toolbox_v2 because the task requires end-to-end purpose, value path, human capability improvement, solution stack, data/application thinking, decision record, and anti-lazy completion evidence.

Tools Used

  • PLS session helper: doctor, touch, claim, context, progress, upload-files, complete.
  • Shell validation: rg, sed, python3 -m json.tool.
  • Artifact publishing: GitHub Gist via gh gist create and gh gist view.
  • URL verification: curl -I -L -s.
  • Market context check: current sales enablement / discovery / AI sales practice sources recorded in sources.md.

Why These Tools

The job is not a code deployment. A Gist is the right shared-cloud artifact because PLS requires openable files and the deliverable is a production operating pack, not a PR. Shell validation checks local file integrity before upload. PLS helper commands are required for lifecycle writeback.

Evidence Required Before Completion

  • Gist URL returns HTTP 200.
  • Gist file list includes HTML, CSV, production brief, data model, acceptance tests, decision record, solution selection, skill usage, market maturity, production acceptance, learning memory, and artifact URL note.
  • learning-memory.json passes JSON parsing.
  • PLS upload-files returns uploaded file records.

Solution Selection

Selected Solution

script_adoption_contract_pack

Why This Wins

The project is blocked by lack of field evidence, not lack of script text. This pack turns the v1 script into a measurable operating loop: visit record, pain moment, proof needed, success metric, next step, and case boundary.

Alternatives Rejected

  • rewrite_script_again: rejected because v1 already exists and no evidence proves what to rewrite.
  • proposal_brief_now: rejected because a proposal without pain scenes and case permission would be generic and risky.
  • repo_change_now: rejected until the schema is validated by two real visits.

Selection Criteria

  • Moves from text output to adoption evidence.
  • Gives PLS deterministic routing rules.
  • Creates a DB/API path for future tool implementation.
  • Satisfies required artifact kinds: solution_selection, skill_usage, market_maturity, production_acceptance, market_context, production_readiness, e2e_verification, people_sync, learning_memory.

Trigger For Next Upgrade

When the scorecard has 2 completed visits, 5 pain scenes, and case boundary approval, generate proposal brief v1 and optionally dispatch repo_change for import/API support.

Market Context Sources

Current practice check date: 2026-05-24 Asia/Taipei.

  1. Gartner, "What Is Sales Enablement? The CSO's Ultimate Guide". URL: https://www.gartner.com/en/sales/role/sales-enablement Use: supports data-driven enablement and buyer engagement.

  2. Gartner press release, "AI-Driven Sales Enablement Will Deliver 40% Faster Sales Stage Velocity", published 2026-04-01. URL: https://www.gartner.com/en/newsroom/press-releases/2026-04-01-gartner-predicts-ai-driven-sales-enablement-will-deliver-40-percent-faster-sales-stage-velocity-than-traditional-enablement-methods-by-20291 Use: supports AI-supported enablement tied to stage velocity.

  3. HubSpot, "28 Questions to Ask on a Discovery Call During the Sales Process". URL: https://blog.hubspot.com/sales/discovery-call-questions Use: supports structured discovery around goals and challenges.

  4. HubSpot, "How & why to use sales scripts". URL: https://blog.hubspot.com/sales/sales-scripts-examples Use: scripts should structure calls and not be read rigidly.

  5. McKinsey, "Five ways B2B sales leaders can win with tech and AI". URL: https://www.mckinsey.com/mx/our-insights/five-ways-b2b-sales-leaders-can-win-with-tech-and-ai Use: supports personalization and account planning from structured customer data.

  6. Previous PLS artifact, customer visit script production pack. URL: https://gist.github.com/esz135888/a79a147e1808b911a01238f377877752 Use: prior script exists; this round gates adoption and feedback.

  7. Previous PLS artifact, adoption scorecard attempt. URL: https://gist.github.com/esz135888/b3c8ab736a1f9b34c96e792597a6e1d4 Use: useful prior artifact, but complete failed because contract kinds were not included on first attempt.

<!doctype html>
<html lang="zh-Hant">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>客戶拜訪腳本採用回收 Contract Console</title>
<style>
:root { --ink:#182230; --muted:#667085; --line:#d5dce7; --bg:#f6f8fb; --panel:#fff; --blue:#175cd3; --ok:#087443; --warn:#a15c07; --bad:#b42318; }
body { margin:0; font:14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:var(--bg); color:var(--ink); }
header { padding:28px 32px 18px; background:var(--panel); border-bottom:1px solid var(--line); }
h1 { margin:0 0 6px; font-size:26px; letter-spacing:0; }
h2 { margin:0 0 12px; font-size:17px; }
main { max-width:1200px; margin:0 auto; padding:22px 18px 42px; display:grid; gap:16px; }
section { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:18px; }
.grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.card { border:1px solid var(--line); border-radius:8px; padding:14px; background:#fbfcff; min-height:112px; }
.label { color:var(--muted); font-size:12px; text-transform:uppercase; }
.value { font-weight:700; font-size:22px; margin-top:4px; }
.blue { color:var(--blue); } .ok { color:var(--ok); } .warn { color:var(--warn); } .bad { color:var(--bad); }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; vertical-align:top; border-bottom:1px solid var(--line); padding:10px 8px; }
th { color:var(--muted); font-size:12px; }
code { background:#eef2f7; border-radius:4px; padding:1px 5px; }
.small { color:var(--muted); font-size:12px; }
@media (max-width:900px){ .grid{grid-template-columns:1fr;} header{padding:22px 18px;} }
</style>
</head>
<body>
<header>
<h1>客戶拜訪腳本採用回收 Contract Console</h1>
<div class="small">Job 8b597a9a-4428-44a6-adcc-fd0d1b05d40b · owner 墨宇產品負責人 · support 墨宇客戶成功窗口 · due 2026-05-30</div>
</header>
<main>
<section>
<h2>本輪判斷</h2>
<div class="grid">
<div class="card"><div class="label">上一版</div><div class="value ok">腳本已產出</div><div class="small">本輪不再重產同一份文字。</div></div>
<div class="card"><div class="label">目前缺口</div><div class="value bad">無採用證據</div><div class="small">未見 2 場拜訪或 5 筆痛點資料。</div></div>
<div class="card"><div class="label">本輪成果</div><div class="value blue">Contract Pack</div><div class="small">補齊 solution / skill / maturity / acceptance。</div></div>
<div class="card"><div class="label">下一關</div><div class="value warn">Proposal Gate</div><div class="small">2 visits + 5 pain scenes + case boundary。</div></div>
</div>
</section>
<section>
<h2>拜訪後必填欄位</h2>
<table>
<tr><th>欄位</th><th>說明</th><th>驗收</th></tr>
<tr><td><code>customer_segment</code></td><td>客戶類型、產業、規模</td><td>不可空白</td></tr>
<tr><td><code>pain_moment</code></td><td>客戶開始質疑或感受不到優勢的時刻</td><td>需具體到會議段落</td></tr>
<tr><td><code>failed_answer</code></td><td>原本回答不夠有力的話術</td><td>需記錄原句或摘要</td></tr>
<tr><td><code>proof_needed</code></td><td>客戶需要什麼證據才會相信</td><td>案例/數字/流程圖/試跑資料</td></tr>
<tr><td><code>success_metric</code></td><td>客戶願意用什麼指標驗收</td><td>時間、成本、營收、風險任一</td></tr>
<tr><td><code>next_step</code></td><td>下一步行動</td><td>sample_data / workshop / proposal / disqualify</td></tr>
<tr><td><code>case_boundary</code></td><td>案例使用權限</td><td>internal_only / external_allowed / needs_approval</td></tr>
</table>
</section>
<section>
<h2>PLS 路由規則</h2>
<table>
<tr><th>條件</th><th>下一步</th></tr>
<tr><td>少於 2 場拜訪</td><td>people_sync 追墨宇產品負責人,不再重產腳本。</td></tr>
<tr><td>少於 5 筆痛點</td><td>people_sync 追墨宇客戶成功窗口,要求補痛點清單。</td></tr>
<tr><td>案例邊界未核</td><td>派 CEO 決策窗口審內外部 Sales Kit 權限。</td></tr>
<tr><td>資料齊全且 readiness >= 80</td><td>產 proposal brief v1;必要時派 repo_change 實作表單/API。</td></tr>
</table>
</section>
</main>
</body>
</html>
visit_id visit_date customer_segment pain_moment failed_answer proof_needed success_metric next_step next_owner next_due case_boundary
VISIT-SAMPLE-001 2026-05-24 B2B service team 客戶問導入後誰維護時開始質疑 我們可以協助導入 需要看到權限與維運流程 7天內少2小時人工整理 workflow_workshop 墨宇產品負責人 2026-05-27 needs_approval
VISIT-SAMPLE-002 2026-05-25 enterprise sales team 客戶問有沒有同業案例時開始質疑 我們有很多案例 需要可公開或去識別案例 下一次會議前確認案例授權 proposal 墨宇客戶成功窗口 2026-05-28 internal_only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment