﻿# Tihao SOP

Claude Code 技能包：按提号 SOP 读取客户 Brief，生成商务可复核的博主/达人推荐名单。

Published npm package:

```text
@vocmarket/tihao-sop
```

Latest version:

```text
1.0.7
```

Recommended workspace install:

```powershell
npx --yes @vocmarket/tihao-sop@latest workspace --smoke
```

Full installation guide:

```text
docs/install-guide.md
```

Installed Claude Code skill name:

```text
tihao
```

Real-provider integration runbook:

```text
docs/live-provider-integration-runbook.md
```

Tihao experience optimization plan:

```text
docs/tihao-experience-optimization-plan.md
```

Current task handoff entry:

```text
docs/tihao-handoff-index.md
```

## What It Does

- `sample` 模式：无 token 跑通 brief -> 博主名单流程。
- `live` 模式：调用公司 `voc-e-commerce` 代理接口，使用 JustOne-backed 数据。
- 普通“读取 brief 出博主名单/提号/找博主”默认按 live 小规模检索；sample 仅在明确要求演示、无消耗或 sample 时使用。
- 输出 Markdown、JSON、CSV 三份结果。
- 无 token、401、403、额度不足时返回友好的开通/充值提示，不暴露原始错误或 token。
- 支持偏好记忆，把客户反馈沉淀到下次选号。
- 支持参考博主链接、TikHub-compatible 基线补证接口和 ffmpeg/ASR/Vision-ready 证据卡接口；真实 provider 通过 `docs/live-provider-integration-runbook.md` 单独验收。
- 已沉淀商务提号经验优化计划：硬指标、隐性规则、参考账号、主页最近 10/20 篇内容证据、平台相似推荐和客户选中率验收。
- 支持 overnight 策略矩阵：`baseline-live`、`reference-account`、`homepage-evidence`、`video-enhanced`、`result-first`、`result-first-risk`、`result-first-broad`。
- 支持人工复核指标统计：商务可用率、负样本率、负样本归因覆盖率、客户选中率、重复键和每个 brief 内排名连续性。
- 支持真实历史数据集审计：检查真实 Brief、人工最终名单、客户选中/拒绝记录和拒绝原因是否足够做长期优化。

## Local Development

```powershell
npm install
npm run sample
npm run smoke:package
npm run acceptance
```

Workspace install from local source:

```powershell
node install.js --workspace --smoke
```

Live small run:

```powershell
$env:TIHAO_SESSION_TOKEN="<your-session-token>"
$env:TIHAO_COMPANY="<your-company-object-id>"
npm run live
npm run live:preflight
npm run live:acceptance
```

Business review metrics:

```powershell
npm run review:metrics -- --input <已标注CSV> --output <输出目录>
```

Historical dataset readiness:

```powershell
npm run history:audit -- --input <history-dataset目录> --output <输出目录> --strict
```

Optimization plan status:

```powershell
npm run optimization:status
```

## MCP Tools

- `tihao_brief_sourcing_run`
- `tihao_token_check`
- `tihao_preference_update`
