| name | content-evolution |
| description | Codex-native workflow for turning local long-form WeChat/Markdown/HTML articles into short social-card packages. Use when the user asks to select a high-potential article, generate low-cognition/emotional/opinionated card copy with Codex, create or register AI cover/background images, render Guizang social cards, or evolve content direction from market feedback in this repository. |
Content Evolution
Use this skill inside code-x-app to run the content workflow through Codex, not through a separate model API. Codex writes structured JSON and may use the app's image generation capability; local scripts handle article selection, context building, validation, SQLite writes, asset registration, and rendering.
Workflow
-
Select candidate articles:
npm run select-topic -- --limit 10 --tag AI --year 2026
Omit filters when the user asks for the strongest current candidate.
-
Build generation context for one article:
npm run context -- --article-id <articleId> --platform xhs > work/context.json
Read work/context.json before writing the brief. It includes article excerpts, score reasons, market memory, and the required output contract.
-
Generate structured brief JSON with Codex:
- Return JSON only:
{ "briefs": [...] }.
- Produce exactly three variants unless the user requests otherwise:
calm, conflict, confidence.
- Preserve the source article's core judgment; do not invent data, results, citations, or revenue.
- Keep anxiety tied to a real pressure and include an action/confidence outlet.
- Use the schema in
references/brief-schema.md.
-
Save the Codex-generated brief:
npm run save-ai-brief -- --article-id <articleId> --platform xhs --file work/briefs.json --context-file work/context.json
Use the returned briefs[].id for image and rendering steps.
-
Generate or register a cover image:
-
Render the final card package:
npm run render-with-asset -- --brief-id <briefId> --image-asset-id <assetId> --platform xhs --style editorial
Use swiss only when the user wants a more restrained layout.
-
Build reusable content assets:
- Use the workbench API or UI to extract reusable atoms from articles and briefs.
- Atoms are judgments, hooks, reframes, actions, discussion prompts, and risk boundaries.
- Prefer atom reuse when the user asks for daily candidates or long-term content evolution.
-
Generate daily candidates:
- Use
POST /api/content-plan/generate for a bounded daily plan.
- Default shape is 1-3 candidates: main, reuse, experiment.
- Treat the output as a human-review queue, not an auto-publishing queue.
-
Learn from feedback:
- Feedback CSV/Excel should include
articleId or briefId when possible.
- Importing feedback updates strategy memory, content atom performance, and learning logs.
- Optimize for interaction quality, not raw clickbait.
Guardrails
- Treat the original article directory as read-only.
- Keep generated state in the configured storage directory. By default this repository uses
data/, generated/, and outputs/; set CONTENT_EVOLUTION_HOME or the per-directory environment variables when the plugin should persist state outside the source checkout.
- Never write directly to SQLite by hand; use the scripts.
- Keep final text in HTML/CSS-rendered cards, not inside AI images.
- Before bulk generation, ask for a cost/volume confirmation unless the user already specified a bounded count.
- If image generation is unavailable in the current Codex session, save the image prompt and stop at a registered text brief rather than faking an image.
- Do not auto-publish. Status changes in
content_plans are planning metadata only.
- Do not reuse a high-performing atom verbatim when creating new content; adapt the angle and wording.
References
references/brief-schema.md: JSON shape and copy requirements.