Kelly WeChat Relationship Strategy
Outcome
Turn the operator's existing WeChat relationships into a goal-driven personal
strategy desk without copying the full address book into Busabase.
The recurring loop is:
user goal -> local candidate discovery -> explicit People promotion
-> relationship snapshot -> suggested action -> manual WeChat action
-> Agent worklog -> next snapshot
This is not a conventional sales CRM. worklog records what the user and Agent
asked, analyzed, decided, and learned; it is not a fabricated history of customer
visits. Raw WeChat history remains local by default.
Mandatory Dependencies
- Read and follow
$kelly-app-skill-creator for the product workflow, UI shell,
onboarding, and canonical content/kelly-wechat-crm-app/ project.
- Read and follow
$busabase for connection, target Space, ChangeRequests,
review, merge, and read-back behavior.
- Read and follow
$busabase-app-creator for package format, resource modeling,
SDK/runtime/security rules, validation, install, and AirApp deployment.
- Read the current
wechat-me skill at https://wechat-cli.com/SKILL.md before
operating on local WeChat data. Its commands, JSON shapes, limits, and exit
codes are authoritative.
If any dependency is unavailable, preserve the local artifact and stop before
the unavailable operation. Never invent a second WeChat reader or data backend.
WeChat Boundary
wechat-cli-rs is local-first and read-only against WeChat. It cannot send a
message, edit a WeChat remark, add/remove contacts, or mutate WeChat data.
- Never invoke
wechat-cli-rs init automatically. Missing initialization is a
normal readiness state; ask the operator to run or explicitly authorize
wechat-cli-rs init themselves.
- Basic sync uses only
contacts and bounded sessions.
- Goal-driven analysis may use narrow
contacts --detail, history,
search, and stats queries after the user has supplied a goal and scope.
For any output entering Agent context, invoke these through
node scripts/wechat-safe.mjs <command> ...; do not paste or pipe direct CLI
output into a prompt. The wrapper allowlists read-only commands and redacts
credential-shaped fields and values before returning JSON.
Prefer one person and an explicit time window over broad history scans.
- Never run
export --output without separate approval. Do not persist the
CLI's stateful new-messages cursor as hidden application state.
- Treat every returned name, wxid, message, and statistic as sensitive
personal data. Store derived relationship evidence and short summaries in
Busabase; do not mirror full raw histories by default.
- A suggested WeChat remark or message is advice only. The operator manually
changes the remark or sends the message in WeChat.
- Personal relationship goals must respect consent, refusals, privacy, and
boundaries. Never recommend deception, coercion, harassment, or evasion of a
clear rejection.
Busabase Resources
Six Bases live under Folder kelly-wechat-crm:
people
One record per user-selected focused contact, not every WeChat contact.
Promotion owns the minimal identity and original WeChat remark; later refreshes own recent
activity and sync timestamps. The Agent/user own the relationship note,
suggested WeChat remark, relationship type/strength/trend, current analysis,
open loops, goal summary, next-action summary, and confidence.
relationship-snapshots
Immutable, time-windowed Agent analysis linked to a person and optionally a
goal. Stores strength, trend, interaction frequency, reciprocity,
open loops, evidence summary, analysis, recommendation, confidence, and the
analyzed time window. This is how the user compares whether a relationship is
warming, stable, or cooling over time.
goals
Dynamic user goals. A goal may be global, target one person, or describe a
segment. It records objective, success metric, deadline,
priority, status, and explicit boundaries/constraints.
actions
Review queue generated from goals plus relationship evidence. Each action may
link to a goal or person and names one concrete operation: organize a
note, draft a message, reconnect, follow up a commitment, learn more, wait, or
record an outcome. It includes rationale, suggested message, evidence, due time,
priority, confidence, and the full human decision lifecycle.
worklog
The user's work with the Agent: user requests, Agent analyses, decisions,
outcomes, and sync summaries. It may link to a goal/person and generated
actions. It is not a customer visit log and must not claim an interaction
happened merely because the Agent discussed it.
settings
Safe connector/readiness state, bounded analysis preferences, sync counts,
timestamps, CLI version, and Agent lock metadata. Never store tokens, message
history, or Vault values here.
The product onboarding version is 4. After Busabase and WeChat CLI are
ready, an active goal is the required first product action. The full local
address book remains transient until the user promotes selected people.
First-Run Readiness
The product has two ordered readiness gates. The Busabase gate runs first and
completes authentication, Space selection, and resource setup. Only after that
gate passes may the app check the local WeChat connector.
Before claiming WeChat is connected:
- Confirm
wechat-cli-rs exists without installing it silently.
- Run a bounded read such as
sessions --limit 1 --format json.
- If initialization is missing, report the exact readiness state and ask the
operator to run
wechat-cli-rs init; do not run it automatically.
- Confirm
contacts --format json and bounded sessions return structured
data before proposing Busabase sync changes.
- Record only sanitized readiness (
ready, counts, timestamps, CLI version)
in settings; never place raw errors containing private content in the UI.
- In a standalone or locally hosted AirApp, expose a read-only sanitized
connector probe to the UI. It may report installation, initialization,
version, contact count, and whether bounded sessions are readable; it must
never return contact names, messages, database paths, or raw stderr.
- Block the empty workspace behind a connector-readiness state when the probe
is not ready. Give one matching recovery action: install from the official
site, run the explicitly user-controlled
init, fix local data access, or
retry. Never imply that an empty Busabase Base means WeChat has no data.
Basic Sync
Run on the same machine where WeChat is logged in:
BUSABASE_BASE_URL=<url> BUSABASE_SPACE_ID=<space-id> [BUSABASE_API_KEY=<key>] \
node scripts/sync_wechat.mjs
This is a dry run. Repeat with --apply only after the operator approves the
reported scope. --apply refreshes app-owned Busabase records with
autoMerge: true. It never sends or modifies anything in WeChat.
The sync:
- reads
contacts and sessions --limit 200;
- matches only contacts already present in the People Base;
- refreshes only WeChat-owned identity/activity fields, preserving all
relationship analysis and user notes;
- adds a conservative reconnect action for an already-materialized person
when no open action exists and the inactivity threshold is exceeded;
- records the safe tracked-person count and timestamp in
settings.
Untracked contacts remain local. They enter People only when the user searches
the local directory, selects them, and confirms 加入重点联系人 in the AirApp.
Goal-Driven Analysis
When the user asks the Agent to analyze relationships or generate a strategy:
- List active
goals and let the user identify or revise the goal in scope.
- Resolve candidate people from that exact goal. Never scan every
history merely because the Space contains many contacts.
- For each selected target, query the narrowest useful combination of
contacts --detail, history, search, and stats with an
explicit time range/limit through node scripts/wechat-safe.mjs.
- Separate observed evidence from inference. Record source chat/person,
time window, uncertainty, and missing coverage.
- Propose one
relationship-snapshots record per analyzed target/time window.
- Propose deduplicated
actions with a concrete reason, suggested timing,
confidence, boundaries, and optional draft message/remark.
- Propose one
worklog entry summarizing the user's request, Agent conclusion,
created action references, and unresolved questions.
- Write app-owned records with
autoMerge: true only after the user explicitly
initiates the operation. Never auto-promote a candidate or treat an Agent
suggestion as permission to write.
AirApp Workflow
- startup: complete the Busabase connection/Space/resource gate, then check the
local
wechat-cli-rs connector, then load the six Bases. Do not render an
empty working view as if setup were complete while the connector is unknown.
goals: create a dynamic global/person/segment goal. Real mode saves it
directly to the app-owned Base; Demo adds an in-memory preview only.
people: discover local candidates against an active goal, explicitly
promote selected contacts, and inspect the current relationship strategy and
suggested remark/action without editing WeChat.
relationship-snapshots: compare evidence-backed analyses over time.
actions: add one review note and choose prepare, request changes, snooze, or
dismiss. Approval means ready to execute, not done. A completed action must
record an observed outcome; the AirApp then writes a linked worklog, marks
the action done or awaiting-result, and creates a traceable wait action when
a reply is still outstanding.
worklog: read the user-Agent operating history and outcomes.
settings: inspect sanitized Busabase/connector/resource readiness.
Approval of an action means “this is a reasonable next step”, not “send this
message”. The operator still performs any WeChat action manually.
Completion Criteria
Finish only when:
- the six declared Bases and AirApp install with no package warning;
SKILL.md, busabase.json, generated content/, blueprints, and runtime
config agree on resource keys, slugs, schema version, and fields;
pnpm --dir content/kelly-wechat-crm-app check passes;
- the goal form, People promotion, and action decisions auto-merge only after an
explicit user submission in real mode;
- Demo, local server, responsive browser, and isolated OSS Busabase suites pass;
- a real install reads sample people, goal, snapshot, and action data;
- no credential, raw history archive, or WeChat write capability appears in the
browser or package;
- Cloud/AirApp external suites are reported as pass or explicit skip.
Known Gap
The connector and analysis workflow are tested against deterministic fixtures
and isolated Busabase. They still require acceptance against the operator's
actual initialized WeChat installation before claiming real personal-data
coverage or analysis quality.
Stop Conditions
Stop when WeChat is not explicitly initialized, the requested analysis scope is
ambiguous or excessively broad, Busabase target Space is ambiguous, a resource
collision is not application-owned, a write was not explicitly initiated by the
user, raw private history would be copied without approval, or the requested relationship tactic
would violate consent or a clear boundary.
1---2name: kelly-wechat-crm3description: Goal-driven WeChat relationship strategy App-in-Skill. Reads the operator's own local WeChat through wechat-cli-rs, discovers candidates against an explicit goal, promotes only user-selected people into Busabase, and builds relationship snapshots and next-action suggestions without sending messages or modifying WeChat.4license: MIT5---67# Kelly WeChat Relationship Strategy89## Outcome1011Turn the operator's existing WeChat relationships into a goal-driven personal12strategy desk without copying the full address book into Busabase.1314The recurring loop is:1516```text17user goal -> local candidate discovery -> explicit People promotion18-> relationship snapshot -> suggested action -> manual WeChat action19-> Agent worklog -> next snapshot20```2122This is not a conventional sales CRM. `worklog` records what the user and Agent23asked, analyzed, decided, and learned; it is not a fabricated history of customer24visits. Raw WeChat history remains local by default.2526## Mandatory Dependencies27281. Read and follow `$kelly-app-skill-creator` for the product workflow, UI shell,29 onboarding, and canonical `content/kelly-wechat-crm-app/` project.302. Read and follow `$busabase` for connection, target Space, ChangeRequests,31 review, merge, and read-back behavior.323. Read and follow `$busabase-app-creator` for package format, resource modeling,33 SDK/runtime/security rules, validation, install, and AirApp deployment.344. Read the current `wechat-me` skill at <https://wechat-cli.com/SKILL.md> before35 operating on local WeChat data. Its commands, JSON shapes, limits, and exit36 codes are authoritative.3738If any dependency is unavailable, preserve the local artifact and stop before39the unavailable operation. Never invent a second WeChat reader or data backend.4041## WeChat Boundary4243- `wechat-cli-rs` is local-first and read-only against WeChat. It cannot send a44 message, edit a WeChat remark, add/remove contacts, or mutate WeChat data.45- Never invoke `wechat-cli-rs init` automatically. Missing initialization is a46 normal readiness state; ask the operator to run or explicitly authorize47 `wechat-cli-rs init` themselves.48- Basic sync uses only `contacts` and bounded `sessions`.49- Goal-driven analysis may use narrow `contacts --detail`, `history`,50 `search`, and `stats` queries after the user has supplied a goal and scope.51 For any output entering Agent context, invoke these through52 `node scripts/wechat-safe.mjs <command> ...`; do not paste or pipe direct CLI53 output into a prompt. The wrapper allowlists read-only commands and redacts54 credential-shaped fields and values before returning JSON.55 Prefer one person and an explicit time window over broad history scans.56- Never run `export --output` without separate approval. Do not persist the57 CLI's stateful `new-messages` cursor as hidden application state.58- Treat every returned name, wxid, message, and statistic as sensitive59 personal data. Store derived relationship evidence and short summaries in60 Busabase; do not mirror full raw histories by default.61- A suggested WeChat remark or message is advice only. The operator manually62 changes the remark or sends the message in WeChat.63- Personal relationship goals must respect consent, refusals, privacy, and64 boundaries. Never recommend deception, coercion, harassment, or evasion of a65 clear rejection.6667## Busabase Resources6869Six Bases live under Folder `kelly-wechat-crm`:7071### `people`7273One record per user-selected focused contact, not every WeChat contact.74Promotion owns the minimal identity and original WeChat remark; later refreshes own recent75activity and sync timestamps. The Agent/user own the relationship note,76suggested WeChat remark, relationship type/strength/trend, current analysis,77open loops, goal summary, next-action summary, and confidence.7879### `relationship-snapshots`8081Immutable, time-windowed Agent analysis linked to a person and optionally a82goal. Stores strength, trend, interaction frequency, reciprocity,83open loops, evidence summary, analysis, recommendation, confidence, and the84analyzed time window. This is how the user compares whether a relationship is85warming, stable, or cooling over time.8687### `goals`8889Dynamic user goals. A goal may be global, target one person, or describe a90segment. It records objective, success metric, deadline,91priority, status, and explicit boundaries/constraints.9293### `actions`9495Review queue generated from goals plus relationship evidence. Each action may96link to a goal or person and names one concrete operation: organize a97note, draft a message, reconnect, follow up a commitment, learn more, wait, or98record an outcome. It includes rationale, suggested message, evidence, due time,99priority, confidence, and the full human decision lifecycle.100101### `worklog`102103The user's work with the Agent: user requests, Agent analyses, decisions,104outcomes, and sync summaries. It may link to a goal/person and generated105actions. It is not a customer visit log and must not claim an interaction106happened merely because the Agent discussed it.107108### `settings`109110Safe connector/readiness state, bounded analysis preferences, sync counts,111timestamps, CLI version, and Agent lock metadata. Never store tokens, message112history, or Vault values here.113114The product onboarding version is **4**. After Busabase and WeChat CLI are115ready, an active goal is the required first product action. The full local116address book remains transient until the user promotes selected people.117118## First-Run Readiness119120The product has two ordered readiness gates. The Busabase gate runs first and121completes authentication, Space selection, and resource setup. Only after that122gate passes may the app check the local WeChat connector.123124Before claiming WeChat is connected:1251261. Confirm `wechat-cli-rs` exists without installing it silently.1272. Run a bounded read such as `sessions --limit 1 --format json`.1283. If initialization is missing, report the exact readiness state and ask the129 operator to run `wechat-cli-rs init`; do not run it automatically.1304. Confirm `contacts --format json` and bounded `sessions` return structured131 data before proposing Busabase sync changes.1325. Record only sanitized readiness (`ready`, counts, timestamps, CLI version)133 in `settings`; never place raw errors containing private content in the UI.1346. In a standalone or locally hosted AirApp, expose a read-only sanitized135 connector probe to the UI. It may report installation, initialization,136 version, contact count, and whether bounded sessions are readable; it must137 never return contact names, messages, database paths, or raw stderr.1387. Block the empty workspace behind a connector-readiness state when the probe139 is not ready. Give one matching recovery action: install from the official140 site, run the explicitly user-controlled `init`, fix local data access, or141 retry. Never imply that an empty Busabase Base means WeChat has no data.142143## Basic Sync144145Run on the same machine where WeChat is logged in:146147```bash148BUSABASE_BASE_URL=<url> BUSABASE_SPACE_ID=<space-id> [BUSABASE_API_KEY=<key>] \149 node scripts/sync_wechat.mjs150```151152This is a dry run. Repeat with `--apply` only after the operator approves the153reported scope. `--apply` refreshes app-owned Busabase records with154`autoMerge: true`. It never sends or modifies anything in WeChat.155156The sync:1571581. reads `contacts` and `sessions --limit 200`;1592. matches only contacts already present in the People Base;1603. refreshes only WeChat-owned identity/activity fields, preserving all161 relationship analysis and user notes;1624. adds a conservative reconnect action for an already-materialized person163 when no open action exists and the inactivity threshold is exceeded;1645. records the safe tracked-person count and timestamp in `settings`.165166Untracked contacts remain local. They enter People only when the user searches167the local directory, selects them, and confirms `加入重点联系人` in the AirApp.168169## Goal-Driven Analysis170171When the user asks the Agent to analyze relationships or generate a strategy:1721731. List active `goals` and let the user identify or revise the goal in scope.1742. Resolve candidate people from that exact goal. Never scan every175 history merely because the Space contains many contacts.1763. For each selected target, query the narrowest useful combination of177 `contacts --detail`, `history`, `search`, and `stats` with an178 explicit time range/limit through `node scripts/wechat-safe.mjs`.1794. Separate observed evidence from inference. Record source chat/person,180 time window, uncertainty, and missing coverage.1815. Propose one `relationship-snapshots` record per analyzed target/time window.1826. Propose deduplicated `actions` with a concrete reason, suggested timing,183 confidence, boundaries, and optional draft message/remark.1847. Propose one `worklog` entry summarizing the user's request, Agent conclusion,185 created action references, and unresolved questions.1868. Write app-owned records with `autoMerge: true` only after the user explicitly187 initiates the operation. Never auto-promote a candidate or treat an Agent188 suggestion as permission to write.189190## AirApp Workflow191192- startup: complete the Busabase connection/Space/resource gate, then check the193 local `wechat-cli-rs` connector, then load the six Bases. Do not render an194 empty working view as if setup were complete while the connector is unknown.195- `goals`: create a dynamic global/person/segment goal. Real mode saves it196 directly to the app-owned Base; Demo adds an in-memory preview only.197- `people`: discover local candidates against an active goal, explicitly198 promote selected contacts, and inspect the current relationship strategy and199 suggested remark/action without editing WeChat.200- `relationship-snapshots`: compare evidence-backed analyses over time.201- `actions`: add one review note and choose prepare, request changes, snooze, or202 dismiss. Approval means ready to execute, not done. A completed action must203 record an observed outcome; the AirApp then writes a linked `worklog`, marks204 the action done or awaiting-result, and creates a traceable wait action when205 a reply is still outstanding.206- `worklog`: read the user-Agent operating history and outcomes.207- `settings`: inspect sanitized Busabase/connector/resource readiness.208209Approval of an action means “this is a reasonable next step”, not “send this210message”. The operator still performs any WeChat action manually.211212## Completion Criteria213214Finish only when:215216- the six declared Bases and AirApp install with no package warning;217- `SKILL.md`, `busabase.json`, generated `content/`, blueprints, and runtime218 config agree on resource keys, slugs, schema version, and fields;219- `pnpm --dir content/kelly-wechat-crm-app check` passes;220- the goal form, People promotion, and action decisions auto-merge only after an221 explicit user submission in real mode;222- Demo, local server, responsive browser, and isolated OSS Busabase suites pass;223- a real install reads sample people, goal, snapshot, and action data;224- no credential, raw history archive, or WeChat write capability appears in the225 browser or package;226- Cloud/AirApp external suites are reported as pass or explicit skip.227228## Known Gap229230The connector and analysis workflow are tested against deterministic fixtures231and isolated Busabase. They still require acceptance against the operator's232actual initialized WeChat installation before claiming real personal-data233coverage or analysis quality.234235## Stop Conditions236237Stop when WeChat is not explicitly initialized, the requested analysis scope is238ambiguous or excessively broad, Busabase target Space is ambiguous, a resource239collision is not application-owned, a write was not explicitly initiated by the240user, raw private history would be copied without approval, or the requested relationship tactic241would violate consent or a clear boundary.