@easysociable/cli 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easysociable/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Agent-first CLI for EasySociable: Content Engine, Template, Slideshow, and MCP",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,6 +37,13 @@
37
37
  "LICENSE",
38
38
  "README.md"
39
39
  ],
40
+ "scripts": {
41
+ "typecheck": "tsc --noEmit",
42
+ "test": "vitest run",
43
+ "build": "tsup",
44
+ "prepack": "node scripts/prepack.mjs && pnpm build",
45
+ "pack:check": "npm pack --dry-run"
46
+ },
40
47
  "publishConfig": {
41
48
  "access": "public",
42
49
  "registry": "https://registry.npmjs.org/"
@@ -45,19 +52,13 @@
45
52
  "commander": "^11.1.0"
46
53
  },
47
54
  "devDependencies": {
55
+ "@easysociable/mcp-server": "workspace:*",
56
+ "@easysociable/template-gateway-client": "workspace:*",
57
+ "@easysociable/tsconfig": "workspace:*",
58
+ "@easysociable/vitest-config": "workspace:*",
48
59
  "@types/node": "^22.14.0",
49
60
  "tsup": "^8.0.2",
50
61
  "typescript": "^5.8.3",
51
- "vitest": "^1.3.1",
52
- "@easysociable/template-gateway-client": "0.0.0",
53
- "@easysociable/mcp-server": "0.0.0",
54
- "@easysociable/tsconfig": "0.0.0",
55
- "@easysociable/vitest-config": "0.0.0"
56
- },
57
- "scripts": {
58
- "typecheck": "tsc --noEmit",
59
- "test": "vitest run",
60
- "build": "tsup",
61
- "pack:check": "npm pack --dry-run"
62
+ "vitest": "^1.3.1"
62
63
  }
63
- }
64
+ }
@@ -4,8 +4,8 @@ description: >
4
4
  Operate the EasySociable Content Engine (profile, needs, products, recommendations, topics, runs, workbench).
5
5
  Triggers: 采访我, 完善人设, interview me, who am I as a creator, 建立 profile
6
6
  — follow workflows/INTERVIEW.md (engine CLAUDE.md § Interview wins if present).
7
- Triggers: 记需求, 扫需求选题, capture audience quotes, user needs, 调研需求, 需求落库
8
- — follow workflows/NEEDS.md (engine CLAUDE.md § Needs wins if present).
7
+ Triggers: 记需求, 扫需求选题, 扫关键词, 路由 Hit, capture audience quotes, user needs, 调研需求, 需求落库
8
+ — follow workflows/NEEDS.md + engine CLAUDE.md § Keywords / § Hits / § Needs.
9
9
  Triggers: 更新产品, 产品库, product facts, product pricing, product offer
10
10
  — follow the engine CLAUDE.md § Products and edit `products/`.
11
11
  Triggers: 推荐产品, 评测工具, compare tools, review an AI product
@@ -52,16 +52,24 @@ Profile / Audience
52
52
  1. **No invented quotes** — Needs quote cell = verbatim only. Gloss is separate (`layer=L1|L2|L3` allowed in gloss).
53
53
  2. **Heat ≠ topic** — External source metrics never make `ready`.
54
54
  3. **Never invent `N-` from a product, vendor claim, or headline.** Match captured needs only.
55
- 4. **Topic decision card first** — start with 结论 / 状态原因 / 适合谁 / 核心判断 / 下一步, then explain the problem, current belief, angle, timing, expected belief change, evidence gap, and recommended form. Keep scores and IDs in the appendix. Chat output is the readable decision card, not a score walkthrough.
55
+ 4. **Topic decision card first** — start with Verdict / Why this status / Who it’s for / Core judgment / Next step, then explain the problem, current belief, angle, timing, expected belief change, evidence gap, and recommended form. **Language:** readable judgment + `one_liner` = profile `voice.md` Language (else pillars / `engine.json` locale); verbatim Needs stay untranslated. Keep scores and IDs in the appendix. Chat output is the readable decision card, not a score walkthrough.
56
56
  5. **`N-` never in `capture_id`** — needs go in `need_ids` only.
57
57
  6. **Rebuild workbench** after markdown writes in the engine vault.
58
58
  7. **Keep ownership explicit** — `products/` is for offers we own or provide;
59
59
  `recommendations/` is for third-party tools and products. A Topic may cite
60
60
  `product_ids`, `recommendation_ids`, both, or neither.
61
- 8. **Use the smallest honest Topic mode** — demand-led is the default;
62
- product/recommendation inputs do not prove audience demand.
63
-
64
- Topic modes:
61
+ 8. **Ask for Topic `generation_mode` before any `produce` write** — present the
62
+ six modes; recommend `demand` when Need-led; do not silently assume.
63
+ Product/recommendation inputs do not prove audience demand.
64
+ 9. **Scan stages Hits, not Needs/Topics** — default keyword scan is
65
+ `track=listen` only → `hits/` (`triage`); route to `needs/` or library
66
+ only after confirm. `search` = SEO, `ask` = GEO questions — not default
67
+ social scan. Hits are never Topic inputs.
68
+ 10. **Generate keywords from evidence** — propose listen/search/ask candidates
69
+ from Needs/audience in chat; write `keywords.md` only after confirm;
70
+ set `seed_from`. Google volume never gates listen.
71
+
72
+ Topic modes (ask before `produce`; recommend `demand` when Need-led):
65
73
 
66
74
  ```text
67
75
  demand = Needs + Profile
@@ -101,10 +109,11 @@ entries or migrate existing product notes.
101
109
  |--------|--------|
102
110
  | 采访我 / interview me / 完善人设 / 建立 profile | **workflows/INTERVIEW.md** (not a render) |
103
111
  | 记需求 / 用户原话 / capture audience quotes / 调研需求 / 需求落库 | **workflows/NEEDS.md** (not a render) |
112
+ | 加关键词 / 生成 listen\|search\|ask 词 / 扫关键词 / 路由 Hit | Engine **§ Keywords** + **§ Hits** — three-track recipes; scan listen→Hits |
104
113
  | 更新产品 / 产品库 / product facts | Engine **§ Products** — update owned offer facts and dated pricing |
105
114
  | 推荐产品 / 评测工具 / compare or review | `recommendations/` — collect evidence and disclosure before Topic |
106
- | 扫需求选题 | **NEEDS.md** then Topics from `needs/` `status=captured` |
107
- | 做成选题 / 生成 topic | engine **§ Topics** — explicit input |
115
+ | 扫需求选题 | **NEEDS.md** then Topics from `needs/` `status=captured` — **ask `generation_mode` first** |
116
+ | 做成选题 / 生成 topic | engine **§ Topics** — explicit input; **ask `generation_mode` before write** |
108
117
  | 开一单 / 用 T-… 开一单 | engine **§ Open a run** (ask platform; multi → N runs) |
109
118
  | 1 page image | **easysociable-template** (after hard gate) |
110
119
  | 2+ pages on tiktok / instagram / linkedin / threads | **easysociable-slideshow** (after hard gate) |
@@ -8,6 +8,7 @@ Do **not** invent quotes. Do **not** scan the watchlist to mint needs. Do **not*
8
8
 
9
9
  - 记需求 / 用户原话 / 评论导出
10
10
  - 扫需求选题
11
+ - 扫关键词 / 用关键词扫需求 / 扫 K-xx(research only — see **Keyword scan** below)
11
12
  - capture audience quotes / user needs
12
13
  - 调研需求 / 需求落库 / 重新调研并落库
13
14
 
@@ -42,15 +43,31 @@ Put `layer=L1|L2|L3` in **`## Our gloss` only** — never in the index `quote` c
42
43
  - If the user says **删除 / 删掉 retired / 可以直接删了**: **delete** the entry file(s) and remove the index row(s). Do not leave ghost `retired` rows. Rebuild workbench.
43
44
  - Do not delete `captured` or `promoted` without an explicit ask.
44
45
 
46
+ ## Keyword generate (from Needs)
47
+
48
+ When user asks to generate keywords from needs: follow engine **§ Keywords · Generate**.
49
+ Prefer `track=listen` seeds from verbatim Needs; propose in chat; write only on confirm with `seed_from=need:N-…`.
50
+ Optional: derive `search` (SEO) or `ask` (GEO question) pairs — not for default social scan.
51
+
52
+ ## Keyword / handle scan → Hits → route
53
+
54
+ Load `profiles/<id>/keywords.md` (and/or `handles.md`).
55
+ Default scan: up to **5** rows with **`track=listen` + `status=active`** (or named `K-xx` / `@handle`). Prefer L1/L2 `pain`/`question`.
56
+
57
+ Meaningful hits → write `hits/` (`H-…`, `status=triage`, `keyword_id`, heat when known) + chat cards.
58
+ **Needs / library only after route confirm** (engine **§ Hits**). Author posts are not Needs; comments may be. Structure/foil → library via Capture + ingest approval.
59
+
60
+ On **X**: `x_*` first. Other platforms only with a working host backend; else ask for paste. Hits are never Topic inputs. Do not default-scan `search`/`ask` rows into Hits.
61
+
45
62
  ## Ingest paths
46
63
 
47
64
  1. Pasted quote — 「记需求:……」 / “capture audience quotes: …”
48
65
  2. Comment / DM export or screenshot — extract quotes; one `N-` each; confirm with the user when unsure.
49
66
  3. URL / thread — fetch with host research tools; store the **commenter's** words, not the author's hook. On **X**: `x_*` first, then agent-reach if needed.
50
67
  4. After a consult — 「刚才那通咨询记需求」.
51
- 5. Research pass — screen for L1/L2; write `N-` only for verbatim hits; update `_index.md` research note briefly.
68
+ 5. Keyword / research pass — screen for L1/L2; **confirm** then write `N-` for verbatim hits; update `_index.md` research note briefly.
52
69
 
53
- Forbidden: Agent-rewritten sentences as quote; watchlist viral titles as need; FAQ templates with no original quote.
70
+ Forbidden: Agent-rewritten sentences as quote; watchlist/keyword viral titles as need; FAQ templates with no original quote; silent batch write from a scan.
54
71
 
55
72
  ## Write
56
73
 
@@ -73,7 +90,7 @@ Forbidden: Agent-rewritten sentences as quote; watchlist viral titles as need; F
73
90
 
74
91
  Input set: `needs/_index.md` rows with `status=captured` (`topic_ids` empty). Max **5** `produce`. Prefer L1/L2 glosses for this profile unless the user asks otherwise.
75
92
 
76
- Then **§ Topics**: Input gate Need ID `N-…`; `source_type=need`; `need_ids` lists the `N-` (never in `capture_id`); default `scout_label=demand`. Still run hard filters.
93
+ Then **§ Topics**: Input gate Need ID `N-…`; `source_type=need`; `need_ids` lists the `N-` (never in `capture_id`); default `scout_label=demand`. **Before any `produce` write, ask the user to choose `generation_mode`** (six modes; recommend `demand` when Need-led). Still run hard filters and that mode’s required-input gate.
77
94
 
78
95
  When `produce` creates a `T-` from an `N-`: update `needs/_index.md` + the entry to `status=promoted` and `topic_ids` containing that `T-`. Discard / library: leave `captured` or `retired` — do not mark `promoted` without a T-.
79
96