- name
- guozhi-hihi-script-agent
- description
- Use when the user wants one coordinated Chinese content Agent to turn a topic, tool link, article, long video, short video, transcript, or viral copy into an evidence-backed Xiaohongshu or short-video script package. Do not use for raw transcription, pure evidence extraction, or visual production when no script deliverable is requested.
# Guozhi HiHi Script Agent
## One job
Route one request to the smallest necessary embedded child chain, normalize its evidence, and require `subskills/guozhi-hihi-script-producer` to produce every final script deliverable.
## Non-negotiable boundaries
- A raw transcript, source extraction, analysis, or series plan is not silently rewritten as a HiHi script.
- A script output always ends with the embedded HiHi producer; no upstream child overrides its voice, factual boundary, timing, or Xiaohongshu compliance gate.
- Use generic narrative mechanisms and Feynman explanation only. Do not copy a creator identity, original wording, fixed CTA, quotation, voice, face, or persona cue.
- The host Agent reads child `CAPABILITY.md` files from `subskills/`; they are internal capabilities, not independently discoverable Skills. Do not assume a private Skill-to-Skill RPC exists.
## Workflow
1. Read `CALLING_SPEC.md` and normalize the request against `contracts/guozhi-script-agent-request-v1.json`.
2. Run `scripts/check_bundle.py .` before relying on any child. Return `blocked` if a declared child is missing or forbidden files are present.
3. Run `scripts/resolve_route.py` with the normalized request. Follow exactly one primary route from `references/routing-map.md`; do not stack overlapping specialists.
4. For script output, accept the router's `content_type` and `content_depth`. If mixed intent, invalid fields, or insufficient viewer result returns `needs_input`, stop and request only that missing choice. Never replace ambiguity with a keyword-priority guess.
5. Reuse sufficient verified material with `evidence_ready=true`; otherwise collect only missing facts and evidence. Pass `research_only` / `evidence_only` to upstream children so they return to this host without writing another script or calling the parent. Preserve `user_request`, `requested_outputs`, `edit_scope` and the original draft in `source`. Convert them to `GUOZHI_SCRIPT_AGENT_HANDOFF_V1` using `contracts/guozhi-script-agent-handoff-v1.json`.
Preserve optional `style_profile`, `reference_id`, `style_reference`, and `delivery_form` from request and route in the handoff. Existing profiles are presets, not the limit of reference authors. Analysis-only requests remain unchanged.
6. For `output_goal=script`, read `references/content-design.md`: establish the concrete viewer payoff, useful evidence, information order, and difficult ideas to explain. Then follow `references/reference-routing.md` and `references/writing-basics.md` to choose an applicable original transcript before expression defaults. Explicit originals override profile summaries; only the default branch loads `references/approved-voice-style.md`. Preserve narrative focus and user source restrictions; earlier user-supplied originals remain eligible when the user allows them. Invoke the embedded producer as finalizer.
7. The producer builds `CONTENT_PLAN_V1` and writes continuous speech within the requested scope. Run deterministic checks, then separately review where the viewer promise is fulfilled, how benefits are demonstrated, whether the flow is understandable, and what the original's content mechanism contributed. Only derive storyboards, subtitles, or publishing assets when requested. Return actual checks and limitations unchanged; no text check proves recorded delivery or audience retention.
8. Only after a completed script may `xhs-content-agent` archive it, and only when the user requested archive output. Invoke it as `archive_only` with the finished artifact; no return to script routing.
## Resource routing
- `CALLING_SPEC.md`: state machine, Human/Agent behavior, errors, and approval boundaries.
- `references/routing-map.md`: capability ownership and precedence.
- `references/content-type-routing.md`: choose tool recommendation, case tutorial, or knowledge sharing before depth and drafting.
- `references/content-depth-routing.md`: choose the quick-method or deep-dive content route before drafting a script.
- `references/content-design.md`: content-first viewer payoff, evidence, viewing progression and accessible explanation.
- `references/style-profiles.md`: legacy presets, subordinate to the selected original.
- `references/reference-library.md` and `references/source-catalog.json`: representative sources and evidence limits, loaded only for reference selection.
- `references/reference-routing.md`: select a concrete source and preserve optional reference fields.
- `references/writing-basics.md`: shared factual, editing and timing boundaries.
- `references/friendly-expression.md`: conditional clarity and actor/benefit review; obey the user's current reference-source restriction and do not stack a second style.
- `references/approved-voice-style.md`: default-branch tutorial guidance; shared edit boundaries live in writing-basics.md.
- `references/feynman-explanation.md`: use when the audience needs a technical idea explained in plain Chinese.
- `references/language-mechanisms.md`: use for evidence-supported hooks, explanations, transitions, and result recap without creator imitation.
- `references/source-attribution.md`: read before redistributing or updating external-derived mechanisms.
- `contracts/`: use for machine-readable input, handoff, and result payloads.
- `scripts/resolve_route.py`: use to make route selection deterministic.
- `scripts/check_bundle.py`: use for package integrity, dependency preflight, and authoritative-reference mirror checks.
## Validation
Run `python3 -m unittest discover -s tests -v`, `python3 scripts/check_bundle.py .`, the embedded HiHi behavior tests, and the platform Skill validators before packaging or installation.
Auf GitHub ansehen