@easysociable/cli 0.1.1 → 0.1.2

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.
Files changed (108) hide show
  1. package/README.md +4 -1
  2. package/dist/easysociable.js +301 -2829
  3. package/dist/easysociable.js.map +1 -1
  4. package/package.json +17 -12
  5. package/skills/ONBOARDING.md +3 -1
  6. package/skills/easysociable-content/INSTALL.md +60 -0
  7. package/skills/easysociable-content/SKILL.md +107 -96
  8. package/skills/easysociable-content/fixtures/golden-run-en/draft.md +13 -0
  9. package/skills/easysociable-content/fixtures/golden-run-en/idea.md +26 -0
  10. package/skills/easysociable-content/fixtures/golden-run-en/pack-tiktok.json +11 -0
  11. package/skills/easysociable-content/platforms/claude.md +1 -2
  12. package/skills/easysociable-content/platforms/codex.md +1 -2
  13. package/skills/easysociable-content/platforms/hermes.md +1 -2
  14. package/skills/easysociable-content/platforms/openclaw.md +1 -2
  15. package/skills/easysociable-content/references/CLI.md +25 -12
  16. package/skills/easysociable-content/references/CONTRACT_SYNC.md +42 -0
  17. package/skills/easysociable-content/references/MCP.md +7 -12
  18. package/skills/easysociable-content/references/PAGE_PACK.md +128 -5
  19. package/skills/easysociable-content/references/PLATFORM_GUIDE.md +36 -0
  20. package/skills/easysociable-content/references/RUN_LAYOUT.md +73 -0
  21. package/skills/easysociable-content/references/TROUBLESHOOTING.md +11 -9
  22. package/skills/easysociable-content/references/VAULT.md +32 -12
  23. package/skills/easysociable-content/references/VOICE.md +16 -0
  24. package/skills/easysociable-content/scripts/contracts.mjs +183 -0
  25. package/skills/easysociable-content/scripts/export-contracts.mjs +76 -0
  26. package/skills/easysociable-content/scripts/fixture.test.mjs +24 -0
  27. package/skills/easysociable-content/scripts/package-skill.mjs +49 -0
  28. package/skills/easysociable-content/scripts/setup.mjs +127 -83
  29. package/skills/easysociable-content/scripts/setup.test.mjs +49 -38
  30. package/skills/easysociable-content/scripts/starter.mjs +50 -48
  31. package/skills/easysociable-content/scripts/validate-export.mjs +42 -0
  32. package/skills/easysociable-content/scripts/validate-pack.mjs +48 -0
  33. package/skills/easysociable-content/scripts/validate-run.mjs +100 -0
  34. package/skills/easysociable-content/scripts/validate.test.mjs +101 -0
  35. package/skills/easysociable-content/scripts/workbench.mjs +135 -0
  36. package/skills/easysociable-content/starter/CLAUDE.md +756 -0
  37. package/skills/easysociable-content/starter/accounts/README.md +9 -0
  38. package/skills/easysociable-content/starter/accounts/_index.md +31 -0
  39. package/skills/easysociable-content/starter/accounts/overrides/README.md +3 -0
  40. package/skills/easysociable-content/starter/discovery/README.md +18 -0
  41. package/skills/easysociable-content/starter/discovery/_index.md +27 -0
  42. package/skills/easysociable-content/starter/discovery/_template.md +41 -0
  43. package/skills/easysociable-content/starter/engine.json +19 -0
  44. package/skills/easysociable-content/starter/exports/README.md +28 -0
  45. package/skills/easysociable-content/starter/inbox/README.md +9 -0
  46. package/skills/easysociable-content/starter/inbox/_index.md +24 -0
  47. package/skills/easysociable-content/starter/inbox/entries/README.md +3 -0
  48. package/skills/easysociable-content/starter/platforms/README.md +19 -0
  49. package/skills/easysociable-content/starter/platforms/ig.md +69 -0
  50. package/skills/easysociable-content/starter/platforms/instagram.md +5 -0
  51. package/skills/easysociable-content/starter/platforms/linkedin.md +72 -0
  52. package/skills/easysociable-content/starter/platforms/threads.md +69 -0
  53. package/skills/easysociable-content/starter/platforms/tiktok.md +71 -0
  54. package/skills/easysociable-content/starter/platforms/x.md +78 -0
  55. package/skills/easysociable-content/starter/platforms/xiaohongshu.md +19 -0
  56. package/skills/easysociable-content/starter/profiles/_index.md +13 -0
  57. package/skills/easysociable-content/starter/profiles/default/README.md +11 -0
  58. package/skills/easysociable-content/starter/profiles/default/audience.md +38 -0
  59. package/skills/easysociable-content/starter/profiles/default/pillars.md +33 -0
  60. package/skills/easysociable-content/starter/profiles/default/voice.md +24 -0
  61. package/skills/easysociable-content/starter/published/_index.md +20 -0
  62. package/skills/easysociable-content/starter/raw/README.md +4 -0
  63. package/skills/easysociable-content/starter/raw/_index.md +12 -0
  64. package/skills/easysociable-content/starter/runs/README.md +22 -0
  65. package/skills/easysociable-content/starter/runs/_index.md +41 -0
  66. package/skills/easysociable-content/starter/runs/_template/brief.md +66 -0
  67. package/skills/easysociable-content/starter/runs/_template/draft.md +11 -0
  68. package/skills/easysociable-content/starter/runs/_template/editor.md +18 -0
  69. package/skills/easysociable-content/starter/runs/_template/feedback.md +15 -0
  70. package/skills/easysociable-content/starter/runs/_template/idea.md +27 -0
  71. package/skills/easysociable-content/starter/runs/_template/pack.md +47 -0
  72. package/skills/easysociable-content/starter/runs/_template/packet.md +25 -0
  73. package/skills/easysociable-content/starter/runs/_template/rubric.md +19 -0
  74. package/skills/easysociable-content/starter/swipe/_index.md +27 -0
  75. package/skills/easysociable-content/starter/swipe/_template.md +34 -0
  76. package/skills/easysociable-content/starter/topics/README.md +25 -0
  77. package/skills/easysociable-content/starter/topics/WATCHLIST.md +65 -0
  78. package/skills/easysociable-content/starter/topics/_index.md +44 -0
  79. package/skills/easysociable-content/starter/topics/_template-item.md +90 -0
  80. package/skills/easysociable-content/starter/topics/items/README.md +4 -0
  81. package/skills/easysociable-content/starter/topics/scoring.md +201 -0
  82. package/skills/easysociable-content/starter/topics/watchlists/README.md +10 -0
  83. package/skills/easysociable-content/starter/topics/watchlists/_shared.md +14 -0
  84. package/skills/easysociable-content/starter/topics/watchlists/default.md +6 -0
  85. package/skills/easysociable-content/starter/wiki/README.md +13 -0
  86. package/skills/easysociable-content/starter/wiki/atoms/_index.md +23 -0
  87. package/skills/easysociable-content/starter/wiki/atoms/_template.md +31 -0
  88. package/skills/easysociable-content/starter/wiki/claims/_index.md +26 -0
  89. package/skills/easysociable-content/starter/wiki/claims/_template.md +38 -0
  90. package/skills/easysociable-content/starter/workbench/README.md +17 -0
  91. package/skills/easysociable-content/workbench/build.py +1074 -0
  92. package/skills/easysociable-content/workbench/serve.py +53 -0
  93. package/skills/easysociable-content/workbench/template.html +2119 -0
  94. package/skills/easysociable-content/workflows/ANALYSIS_AND_COVERAGE.md +14 -5
  95. package/skills/easysociable-content/workflows/CONTENT_EXPORT.md +16 -11
  96. package/skills/easysociable-content/workflows/GETTING_STARTED.md +40 -0
  97. package/skills/easysociable-content/workflows/MCP_FIRST.md +3 -8
  98. package/skills/easysociable-content/workflows/OUT_OF_SCOPE.md +18 -0
  99. package/skills/easysociable-content/workflows/PACK_AUTHORING.md +42 -0
  100. package/skills/easysociable-content/workflows/SWIPE_CAPTURE.md +18 -0
  101. package/skills/easysociable-content/workflows/TOPIC_DRAFT.md +28 -4
  102. package/skills/easysociable-content/workflows/WORKING_DRAFT.md +17 -8
  103. package/skills/easysociable-slideshow/SKILL.md +20 -13
  104. package/skills/easysociable-slideshow/references/VAULT.md +13 -11
  105. package/skills/easysociable-template/scripts/generate-theme-from-hex.mjs +0 -0
  106. package/skills/easysociable-content/workflows/DEVICE_TASKS.md +0 -5
  107. package/skills/easysociable-content/workflows/EXPERIMENTS.md +0 -6
  108. package/skills/easysociable-content/workflows/PUBLICATION.md +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easysociable/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Agent-first CLI and MCP host for EasySociable Template and Slideshow V1",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,23 +36,28 @@
36
36
  "LICENSE",
37
37
  "README.md"
38
38
  ],
39
+ "scripts": {
40
+ "typecheck": "tsc --noEmit",
41
+ "test": "vitest run",
42
+ "build": "tsup",
43
+ "prepack": "node scripts/prepack.mjs && pnpm build",
44
+ "pack:check": "npm pack --dry-run"
45
+ },
39
46
  "publishConfig": {
40
47
  "access": "public",
41
48
  "registry": "https://registry.npmjs.org/"
42
49
  },
50
+ "dependencies": {
51
+ "commander": "^11.1.0"
52
+ },
43
53
  "devDependencies": {
54
+ "@easysociable/mcp-server": "workspace:*",
55
+ "@easysociable/template-gateway-client": "workspace:*",
56
+ "@easysociable/tsconfig": "workspace:*",
57
+ "@easysociable/vitest-config": "workspace:*",
44
58
  "@types/node": "^22.14.0",
45
- "commander": "^11.1.0",
46
59
  "tsup": "^8.0.2",
47
60
  "typescript": "^5.8.3",
48
- "vitest": "^1.3.1",
49
- "@easysociable/tsconfig": "0.0.0",
50
- "@easysociable/vitest-config": "0.0.0"
51
- },
52
- "scripts": {
53
- "typecheck": "tsc --noEmit",
54
- "test": "vitest run",
55
- "build": "tsup",
56
- "pack:check": "npm pack --dry-run"
61
+ "vitest": "^1.3.1"
57
62
  }
58
- }
63
+ }
@@ -27,7 +27,9 @@ easysociable install --skills content --yes
27
27
  ```
28
28
 
29
29
  Then run the `easysociable-content` setup workflow (Obsidian Vault + Content
30
- Engine). Skipping Content does **not** block single-page or Slideshow renders.
30
+ Engine). For a private copy to another machine, see
31
+ `skills/easysociable-content/INSTALL.md`. Skipping Content does **not** block
32
+ single-page or Slideshow renders.
31
33
 
32
34
  ## Lazy auth (Agent script)
33
35
 
@@ -0,0 +1,60 @@
1
+ # Install easysociable-content (private copy)
2
+
3
+ Ship this folder — **not** the whole monorepo.
4
+
5
+ ## What to copy
6
+
7
+ ```text
8
+ easysociable-content/
9
+ ├── SKILL.md
10
+ ├── INSTALL.md
11
+ ├── scripts/
12
+ ├── starter/
13
+ ├── workbench/
14
+ ├── references/
15
+ ├── workflows/
16
+ ├── platforms/
17
+ └── fixtures/ # optional
18
+ ```
19
+
20
+ Do **not** include API keys, `.env`, or the user's Content Engine.
21
+
22
+ ## Where to install
23
+
24
+ | Agent host | Path |
25
+ |---|---|
26
+ | Cursor | `~/.cursor/skills/easysociable-content/` |
27
+ | Claude Code | `~/.claude/skills/easysociable-content/` |
28
+ | Codex | host-specific skills directory (see `platforms/codex.md`) |
29
+
30
+ ```bash
31
+ cp -R easysociable-content ~/.cursor/skills/easysociable-content
32
+ ```
33
+
34
+ Restart the Agent session so the skill is picked up.
35
+
36
+ ## Prerequisites
37
+
38
+ 1. **python3** (workbench `build.py` / `serve.py`)
39
+ 2. A parent directory for `Content Engine/` (any folder; Obsidian is not required)
40
+ 3. For rendering: unified `easysociable` CLI + Template/Slideshow skills (optional until first render)
41
+
42
+ ## First run (Agent)
43
+
44
+ 1. Ask for a parent directory (or an existing `Content Engine/` path). Do not ask language.
45
+ 2. Apply and start workbench:
46
+
47
+ ```bash
48
+ node scripts/setup.mjs --root "<parent>" --preview --json
49
+ node scripts/setup.mjs --root "<parent>" --apply --json
50
+ ```
51
+
52
+ 3. Follow `workflows/GETTING_STARTED.md`. Daily operations follow engine `CLAUDE.md`.
53
+
54
+ Existing files are never overwritten. Later skill updates: `--apply` adds **missing** starter files only; skip existing `workbench/template.html`.
55
+
56
+ ## Package script (maintainers)
57
+
58
+ ```bash
59
+ node skills/easysociable-content/scripts/package-skill.mjs --output /tmp/easysociable-content-skill
60
+ ```
@@ -1,115 +1,126 @@
1
1
  ---
2
2
  name: easysociable-content
3
3
  description: >
4
- Set up and operate a local Obsidian-based Content Engine for EasySociable.
5
- Obsidian is required. During setup, ask the user to choose 中文 or English;
6
- that locale names the engine folders and starter notes. This Skill records
7
- Runs, Packs and exports for the Template and Slideshow Skills. It does not
8
- provide a hosted content backend, Content API, SQLite runtime, content MCP
9
- server or content CLI.
4
+ Set up and operate a local Content Engine for EasySociable. English folder
5
+ tree only (Content Engine/). One platform = one Run. The Agent writes
6
+ markdown; workbench is the observatory UI. Hosted Template/Slideshow work
7
+ uses the unified easysociable CLI/MCP. No Obsidian requirement, no content
8
+ MCP, no content CLI.
10
9
  ---
11
10
 
12
11
  # EasySociable Content Skill
13
12
 
14
- This Skill owns the user's local knowledge base. It is intentionally filesystem-
15
- first: the Agent writes Markdown and JSON under the user's existing Obsidian
16
- Vault, while hosted Template and Slideshow operations are performed later by
17
- the unified `easysociable` CLI/MCP.
13
+ This Skill owns the user's local knowledge base. The Agent writes Markdown
14
+ under `Content Engine/`. After writes, rebuild the workbench. Hosted Template
15
+ and Slideshow operations stay with the unified `easysociable` CLI/MCP.
16
+
17
+ **Operating manual lives in the engine:** `Content Engine/CLAUDE.md`. Follow it
18
+ for capture, discovery, topics, 开一单, ingest, ship, and catalog evidence. This
19
+ file is setup, routing, and hosted handoff only.
18
20
 
19
21
  ## Non-negotiable rules
20
22
 
21
- 1. Obsidian must already be installed. If it is missing, stop and give the
22
- official installation guidance; do not create a partial vault.
23
- 2. Ask the user to choose **中文 (`zh`)** or **English (`en`)** before the first
24
- preview. Do not default the locale silently.
25
- 3. Ask the user to choose an existing Vault. Never create a new Vault silently.
26
- 4. Create or validate only the locale root: `Content Engine/` (`en`) or
27
- `内容引擎/` (`zh`). Never create both in one Vault.
28
- 5. Existing Content Engine files are read-only during setup. Report differences
29
- and ask before any migration; never auto-repair or overwrite user content.
30
- 6. Do not start a Local API, open SQLite, call Content MCP, or call private
31
- Directus/R2/Stripe endpoints.
32
- 7. Every intent/run is saved under the locale runs folder (`runs/<slug>/` or
33
- `成稿/<slug>/`). Every platform gets a Pack. Binary outputs belong only
34
- under the locale exports folder.
35
- 8. The host Agent owns copy and semantic decisions. Template and Slideshow Skills
36
- own template selection, hosted preview and final rendering.
37
- 9. V1 final output is PNG only. Never create ZIP, JPEG, WebP, PDF or video output.
38
- 10. `content-pack.v1` JSON field names, `role` values and slot keys stay English
39
- even when the vault language is 中文. Folder names and Markdown notes follow
40
- the chosen locale.
41
-
42
- ## Setup workflow
43
-
44
- 1. Detect Obsidian.app.
45
- 2. Ask: 内容引擎用中文还是 English? Map the answer to `--locale zh` or `--locale en`.
46
- 3. Ask for an existing Vault path.
47
- 4. Preview with `scripts/setup.mjs --vault <path> --locale zh|en --preview --json`.
48
- 5. Create the sanitized Starter and generalized `CLAUDE.md` only after confirmation,
49
- using `--apply`.
50
- 6. Open the Vault in Obsidian.
51
- 7. Return the Vault path, locale, engine folder name, and the next workflow.
52
-
53
- The deterministic setup helper is `scripts/setup.mjs`. Use `--preview` before
54
- `--apply`; it never overwrites an existing file and refuses to create anything
55
- when Obsidian is not installed. It is a helper for the host Agent, not a
56
- separate product CLI.
57
-
58
- After setup, read `locale.json` in the engine root (or detect `内容引擎/` vs
59
- `Content Engine/`) and keep using that tree. Do not switch language later.
60
-
61
- The Starter contains empty indexes, templates and operating rules only. It must
62
- not contain the owner's personal examples, previous Runs or generated media.
63
-
64
- ## Run and Pack workflow
65
-
66
- For each piece of content, create a local Run with:
67
-
68
- - a stable slug and title;
69
- - platform and language;
70
- - semantic outline and page roles;
71
- - generated copy and selected media references;
72
- - the chosen Profile/Theme identifiers when known;
73
- - links to the corresponding platform Pack and export Manifest.
74
-
75
- Write user-facing notes in the vault locale. The Pack is the handoff to
76
- `easysociable-slideshow`. It contains public page roles and slot values, never
77
- private AST, Binding Maps, RenderPlans or a hosted ContentDocument:
78
-
79
- ```json
80
- {
81
- "schemaVersion": "content-pack.v1",
82
- "platform": "tiktok",
83
- "title": "A short story",
84
- "pages": [
85
- { "role": "hook", "slots": { "text_0": "Hook", "text_1": "Support" } },
86
- { "role": "value", "slots": { "text_0": "One idea" } }
87
- ]
88
- }
23
+ 1. English tree only: `Content Engine/`. Do not ask language.
24
+ 2. Obsidian is **not** required. Do not detect, install, or open it.
25
+ 3. Ask for a parent directory (or an existing `Content Engine/` path). Never create the engine silently in a random folder.
26
+ 4. Existing engine files are read-only during setup. Never overwrite user content, especially `workbench/template.html`.
27
+ 5. One platform = one Run (one folder). Same Topic, native rewrite for another network → **N runs**, shared `topic_id`.
28
+ 6. On **开一单**: **ask platform(s)** if unset. Multi-select → N runs. Do **not** silent-default to `x`.
29
+ 7. Before brief / draft / editor / pack: **read** `platforms/<platform>.md` (`instagram` → `ig.md`).
30
+ 8. Write selection into `idea.md` (`swipe_id` / `atoms` / `claim_id`). Chat cards are not citations.
31
+ 9. Pack JSON (`content-pack.v1`) only at **handoff to render**. Until then the run uses `pack.md` (slideshow platforms after SHIP).
32
+ 10. Final PNGs live under `exports/<run-slug>/`, never inside the run folder. V1 output is PNG only.
33
+ 11. Do not start a Local API, open SQLite, call a Content MCP, or call private Directus/R2/Stripe endpoints.
34
+ 12. Do not create a hosted Brand Profile during setup.
35
+
36
+ ## When this skill runs
37
+
38
+ 1. Resolve the engine (`--root` parent, or existing `Content Engine/`).
39
+ 2. If missing files: `node scripts/setup.mjs --root <path> --apply --json` (never overwrites).
40
+ 3. Ensure `workbench/` exists (copy skill `workbench/` files **only if missing**).
41
+ 4. `python3` is required. If missing, stop and tell the user.
42
+ 5. Run `python3 workbench/build.py`.
43
+ 6. If port **8765** is free: start `workbench/serve.py`. If it is already listening, reuse it — do not start a second server.
44
+ 7. Open `http://127.0.0.1:8765/workbench/`.
45
+ 8. After Agent writes markdown: run `build.py` again (leave serve running).
46
+
47
+ ```bash
48
+ node scripts/setup.mjs --root <parent-or-engine> --preview --json
49
+ node scripts/setup.mjs --root <parent-or-engine> --apply --json
50
+ node scripts/workbench.mjs start --engine "<path>/Content Engine" --json
51
+ node scripts/workbench.mjs build --engine "<path>/Content Engine" --json
52
+ ```
53
+
54
+ `--no-open` skips the browser / server start.
55
+
56
+ ## Intent routing
57
+
58
+ Defer the body of each flow to engine `CLAUDE.md`. Use these skill workflows only for setup and hosted handoff.
59
+
60
+ | User intent | Action |
61
+ |---|---|
62
+ | First install / missing engine | Setup above → `workflows/GETTING_STARTED.md` |
63
+ | capture / 记一下 | Engine `CLAUDE.md` § Capture |
64
+ | Watchlist add | Engine `CLAUDE.md` § Topics (watchlist files) |
65
+ | 扫 watchlist / 发现内容 | Engine `CLAUDE.md` § Discovery — Source Digest only; no Topics |
66
+ | 选题 / score topics | Engine `CLAUDE.md` § Topics — explicit input; Scout→opportunity 5-dim; ready=opp≥7.5 and aud≥6; cap=5 produce |
67
+ | 开一单 / open a run | Engine `CLAUDE.md` § Open a run — **ask platforms**; N platforms → N folders |
68
+ | 收成 swipe/atom/claim | Engine `CLAUDE.md` § Library ingest |
69
+ | Ship + URL + result | Engine `CLAUDE.md` § Published index + Catalog evidence |
70
+ | 出图 / pack + render | Engine `CLAUDE.md` § PagePack, then handoff below |
71
+ | Platform craft | `Content Engine/platforms/<platform>.md` + `references/PLATFORM_GUIDE.md` |
72
+ | Single-page image | Hand off → **easysociable-template** |
73
+ | Multi-page slideshow | Hand off → **easysociable-slideshow** (Pack JSON at this step) |
74
+ | Export PNGs | `workflows/CONTENT_EXPORT.md` |
75
+ | Hosted CLI/MCP | `workflows/MCP_FIRST.md` |
76
+ | Out of scope | `workflows/OUT_OF_SCOPE.md` |
77
+
78
+ ### Single-page vs slideshow
79
+
80
+ ```text
81
+ 1 page → easysociable-template
82
+ 2+ pages + slideshow platform → easysociable-slideshow
83
+ x / xiaohongshu → easysociable-template only
84
+ ```
85
+
86
+ Slideshow platforms: `tiktok`, `instagram`/`ig`, `linkedin`, `threads`.
87
+
88
+ ## Run model
89
+
90
+ ```text
91
+ ask platform(s) → N folders
92
+ runs/<YYYY-MM-DD-slug[-platform]>/idea.md ← one platform, selection ids
93
+ brief.md → packet.md → draft.md → editor.md → rubric.md
94
+ pack.md (after SHIP, image decks only)
95
+ pack-<platform>.json ← only at Slideshow/Template handoff
96
+ ```
97
+
98
+ Copy `runs/_template/` for each platform. Update `runs/_index.md` (one row per run).
99
+
100
+ Validate before slideshow handoff:
101
+
102
+ ```bash
103
+ node scripts/validate-run.mjs --run <run-dir> --json
104
+ node scripts/validate-run.mjs --run <run-dir> --require-pack --json
89
105
  ```
90
106
 
91
107
  ## Handoff
92
108
 
93
- For a single image, hand the selected published Page Template and slot values to
94
- the Template workflow. For a slideshow:
109
+ **Slideshow (multi-page):**
110
+
111
+ 1. Rubric SHIP on this run. Write `pack.md` (slots only).
112
+ 2. Hand off to `easysociable-slideshow`. It selects a Page Template per page and writes `pack-<platform>.json`.
113
+ 3. User confirms Studio preview.
114
+ 4. Final render + export to `{engine}/exports/<run-slug>/`.
95
115
 
96
- 1. write the Pack to the Run folder;
97
- 2. ask the Slideshow Skill to create/update a temporary Run;
98
- 3. let the Agent review the returned Studio URL;
99
- 4. after confirmation, let the Agent call `easysociable slideshows render`;
100
- 5. let the Agent call `easysociable renders export` to atomically write PNGs and
101
- `manifest.json` under the Run's exports directory.
116
+ **Template (single-page):**
102
117
 
103
- Preview is not a final local export and does not consume hosted Render Page
104
- allowance. The final render does.
118
+ 1. Hand off slot values to `easysociable-template` `FILL_AND_RENDER`.
105
119
 
106
- Network research is optional. If the host does not expose a search tool, keep
107
- the source URL in the local note and continue with user-provided evidence; do
108
- not install an MCP server automatically and do not block vault setup.
120
+ Preview does not consume Render Page allowance. Final render does.
109
121
 
110
- ## Required references
122
+ ## Reference loading
111
123
 
112
- - `references/PAGE_PACK.md`
113
- - `references/VAULT.md`
114
- - `workflows/CONTENT_EXPORT.md`
115
- - `workflows/MCP_FIRST.md` (for the unified CLI/MCP handoff only)
124
+ Always read engine `CLAUDE.md`, `engine.json`, `references/RUN_LAYOUT.md` and
125
+ `references/PLATFORM_GUIDE.md`. Load `GETTING_STARTED` on first install,
126
+ `PACK_AUTHORING` / `CONTENT_EXPORT` / `MCP_FIRST` only at render handoff.
@@ -0,0 +1,13 @@
1
+ # Draft
2
+
3
+ ## Page 1 (hook)
4
+ Stop scrolling — this changed my mornings.
5
+
6
+ ## Page 2 (value)
7
+ Wake at the same time, even on weekends.
8
+
9
+ ## Page 3 (value)
10
+ No phone for the first 20 minutes after waking.
11
+
12
+ ## Page 4 (cta)
13
+ Save this and try it tomorrow.
@@ -0,0 +1,26 @@
1
+ ---
2
+ run_id: RUN-20260823-morning-routine-tips
3
+ status: pack-ready
4
+ created: 2026-08-23
5
+ ---
6
+
7
+ # Idea
8
+
9
+ - **one_liner:** Three morning habits that calm the start of the day
10
+ - **account:** your-handle
11
+ - **profile:** default
12
+ - **pillar:** P1
13
+ - **primary_platform:** tiktok
14
+ - **platforms:** tiktok
15
+ - **topic_id:** none
16
+ - **capture_ids:** none
17
+ - **swipe_id:** none
18
+ - **atoms:** none
19
+ - **claim_id:** none
20
+ - **hypothesis:** none
21
+
22
+ ## Platform (this run)
23
+
24
+ | platform | copy | images (pack) | publish status |
25
+ |----------|------|---------------|----------------|
26
+ | tiktok | yes | yes | pending |
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": "content-pack.v1",
3
+ "platform": "tiktok",
4
+ "title": "Three morning habits",
5
+ "pages": [
6
+ { "role": "hook", "pageTemplateId": "tpl_hook_001", "slots": { "text_0": "Stop scrolling — this changed my mornings" } },
7
+ { "role": "value", "pageTemplateId": "tpl_value_001", "slots": { "text_0": "Wake at the same time", "text_1": "Even on weekends" } },
8
+ { "role": "value", "pageTemplateId": "tpl_value_001", "slots": { "text_0": "No phone for 20 minutes", "text_1": "Before email or feeds" } },
9
+ { "role": "cta", "pageTemplateId": "tpl_cta_001", "slots": { "text_0": "Save this for tomorrow" } }
10
+ ]
11
+ }
@@ -1,5 +1,4 @@
1
1
  # Claude Desktop
2
2
 
3
- - Install the unified EasySociable Skill bundle. Content remains Obsidian-first;
4
- hosted Template/Slideshow calls use the unified `easysociable` CLI/MCP.
3
+ - Install the unified EasySociable Skill bundle. Content is filesystem-first under `Content Engine/`; hosted Template/Slideshow calls use the unified `easysociable` CLI/MCP.
5
4
  - Prefer the Skill frontmatter in each `SKILL.md`.
@@ -1,5 +1,4 @@
1
1
  # Codex
2
2
 
3
3
  - Install `skills/easysociable-content` under the host skill directory for local content workflows.
4
- - Install the unified EasySociable Skill bundle; hosted preview/render uses the
5
- unified `easysociable` CLI/MCP.
4
+ - Install the unified EasySociable Skill bundle; hosted preview/render uses the unified `easysociable` CLI/MCP.
@@ -1,5 +1,4 @@
1
1
  # Hermes overrides
2
2
 
3
3
  - Point Hermes skill loader at this directory.
4
- - Prefer explicit Vault paths in multiprocess environments; do not use the
5
- retired `--data-dir` Runtime option.
4
+ - Prefer explicit `Content Engine/` paths in multiprocess environments.
@@ -1,5 +1,4 @@
1
1
  # OpenClaw overrides
2
2
 
3
3
  - Register the unified `easysociable` CLI/MCP entry.
4
- - Keep API Keys and session material out of tool logs. Gateway authentication is
5
- owned by the unified client.
4
+ - Keep API Keys and session material out of tool logs. Gateway authentication is owned by the unified client.
@@ -1,18 +1,25 @@
1
1
  # Content Skill filesystem reference
2
2
 
3
- The Content Skill does not own a Content CLI in V1. It writes the user's
4
- existing Obsidian Vault directly and uses the unified `easysociable` command only
5
- for the hosted Template/Slideshow handoff.
3
+ The Content Skill does not own a Content CLI. It writes `Content Engine/` on disk and uses the unified `easysociable` command only for hosted Template/Slideshow handoff.
6
4
 
7
5
  ## Local workflow
8
6
 
9
- Use the host's filesystem tools to detect Obsidian, ask for 中文 or English,
10
- choose a Vault, preview the locale engine paths (`Content Engine/` or
11
- `内容引擎/`) with `--locale zh|en`, create or validate Markdown/JSON files after
12
- confirmation, and open the Vault in Obsidian.
7
+ Ask for a parent directory (or existing engine path). Do not ask language. Do not require Obsidian.
13
8
 
14
- Do not invent `easysociable-content init/start/doctor` commands and do not pass
15
- `--data-dir`. Those belong to the retired Content Runtime.
9
+ Do not invent `easysociable-content init/start/doctor`.
10
+
11
+ ## Setup
12
+
13
+ ```bash
14
+ node scripts/setup.mjs --detect --json
15
+ node scripts/setup.mjs --root <parent-or-engine> --preview --json
16
+ node scripts/setup.mjs --root <parent-or-engine> --apply --json
17
+ node scripts/setup.mjs --root <parent-or-engine> --validate --json
18
+ node scripts/workbench.mjs start --engine <Content Engine> --json
19
+ node scripts/workbench.mjs build --engine <Content Engine> --json
20
+ ```
21
+
22
+ `--no-open` skips the browser and the workbench server.
16
23
 
17
24
  ## Hosted handoff
18
25
 
@@ -20,8 +27,14 @@ Do not invent `easysociable-content init/start/doctor` commands and do not pass
20
27
  easysociable templates list --platforms tiktok --json
21
28
  easysociable slideshows create --file ./runs/<slug>/pack-tiktok.json --json
22
29
  easysociable slideshows render --id run_xxx --idempotency-key run_xxx-final-1 --json
23
- easysociable renders wait --id job_xxx --json
24
- easysociable renders export --id job_xxx --output ./exports/<slug>/tiktok --json
30
+ easysociable slideshows export --id run_xxx --output ./exports/<slug> --json
31
+ ```
32
+
33
+ Validate before slideshow create:
34
+
35
+ ```bash
36
+ node scripts/validate-run.mjs --run ./runs/<slug> --require-pack --json
37
+ node scripts/validate-pack.mjs --file ./runs/<slug>/pack-tiktok.json --json
25
38
  ```
26
39
 
27
- Use the unified MCP first when the host exposes it. The CLI is the fallback.
40
+ Use unified MCP first when the host exposes it. CLI is the fallback.
@@ -0,0 +1,42 @@
1
+ # Contract sync
2
+
3
+ Pack validation in this skill mirrors the hosted public contract. When those
4
+ contracts change, update this skill in the same PR.
5
+
6
+ ## Source of truth
7
+
8
+ | Contract | Repository path |
9
+ |---|---|
10
+ | `content-pack.v1` schema | `packages/template-public-contracts/src/index.ts` → `contentPackSchema` |
11
+ | Platform page caps | `slideshowPlatformCaps` in the same file |
12
+ | Page roles | `pageRoleSchema` in the same file |
13
+
14
+ ## Mirrored in skill
15
+
16
+ | Skill file | What to sync |
17
+ |---|---|
18
+ | `scripts/contracts.mjs` | caps, roles, forbidden keys, validate logic |
19
+ | `references/PAGE_PACK.md` | Agent-facing summary + examples |
20
+ | `references/PLATFORM_GUIDE.md` | slideshow vs template routing |
21
+
22
+ ## Maintainer checklist
23
+
24
+ Before merging contract changes:
25
+
26
+ 1. Diff `contentPackSchema` / `slideshowPlatformCaps` / `pageRoleSchema`.
27
+ 2. Update `contracts.mjs` and `PAGE_PACK.md`.
28
+ 3. Run:
29
+
30
+ ```bash
31
+ node skills/easysociable-content/scripts/validate.test.mjs
32
+ node skills/easysociable-content/scripts/fixture.test.mjs
33
+ node skills/easysociable-content/scripts/setup.test.mjs
34
+ ```
35
+
36
+ 4. If caps or roles changed, refresh `fixtures/golden-run-en/pack-tiktok.json` when needed.
37
+
38
+ ## Optional hard sync (future)
39
+
40
+ Import `contentPackSchema` from `@easysociable/template-public-contracts` in
41
+ `validate-pack.mjs` once skill scripts run through the monorepo toolchain. Until
42
+ then, `contracts.mjs` is the portable mirror (marked with `ponytail:`).
@@ -1,20 +1,15 @@
1
1
  # Unified MCP reference
2
2
 
3
- V1 has one MCP server installed by the unified EasySociable installer. It owns
4
- hosted Template, Image, Profile, Theme, Slideshow and Render tools. The Content
5
- Skill itself does not require a Content MCP or local MCP bridge.
3
+ V1 has one MCP server from the unified EasySociable installer. It owns hosted Template, Image, Profile, Theme, Slideshow and Render tools. This Content Skill does not require a Content MCP.
6
4
 
7
- Use the MCP tool registry exposed by `easysociable mcp serve --transport stdio`. Content work stays
8
- in the Obsidian filesystem; hosted calls use the same Gateway client and account
9
- as the CLI.
5
+ Content work stays on disk under `Content Engine/`. Hosted calls use the same Gateway client as the CLI.
10
6
 
11
7
  ## Handoff sequence
12
8
 
13
- 1. Write a `content-pack.v1` into the local Run folder.
14
- 2. Call `create_slideshow_run` with the Pack.
15
- 3. Open the returned Studio URL and wait for Save.
9
+ 1. After SHIP, write `pack.md` (slideshow) or slot values (single-page).
10
+ 2. Slideshow skill writes `content-pack.v1` into the run folder, then `create_slideshow_run`.
11
+ 3. Open Studio URL; wait for Save.
16
12
  4. After confirmation call `render_slideshow_run`.
17
- 5. Poll the render job and export the PNG set into the Vault.
13
+ 5. Export PNGs into `exports/<run-slug>/`.
18
14
 
19
- The MCP server must never expose private AST, Binding Maps, RenderPlans, R2
20
- credentials, Directus credentials, Stripe credentials or Local Runtime tokens.
15
+ The MCP server must never expose private AST, Binding Maps, RenderPlans, R2 credentials, Directus credentials, Stripe credentials or Local Runtime tokens.