SuperAPI AI Directory

story-publish

Writing & research

View repository

Updated 10-15 21:39

About this skill

Story Publish

Hand off approved local chapters to the publishing adapter registered for the project. Publishing materials are prepared by story-release-package; this Skill is only responsible for platform delivery, and the two have separate permissions.

Permission boundaries

  • "Continue writing", "finalize", and "prepare for publishing" do not authorize remote writes; the corresponding actions are performed only when the user explicitly requests login, saving a draft, editing, immediate publishing, or scheduled publishing.
  • Preview is local read-only; preflight and books are platform read-only; draft writes a remote draft; edit, publish, and schedule modify the official platform state.
  • Do not read, copy, or output cookies, passwords, or browser storage. The login state is managed only by the local adapter registered for the project.
  • Do not call the raw GUI directly or bypass project-level anti-duplication wrappers. Do not concatenate user parameters with shell.
  • What is currently built in is a general adapter layer, not the Fanqie MCP; platform capabilities are provided by the project's local adapter.

Prerequisite gates

  1. The target chapter must already be finalized, and the main text hash must still match the latest release review/manifest; candidate chapters must not be published.
  2. For long-form projects, the tracking, revision, and story doctor gates must have no unresolved blockers.
  3. The project root contains .story-publish.json, and status can confirm that both the adapter and the interpreter exist.
  4. Preview first, then preflight; if any target chapter number or title already exists, a new publish must be aborted. Existing chapters can only go through an explicit edit.
  5. Before remote writes, restate to the user the platform, work, chapter range, action, AI declaration, and schedule; reconfirm after the range or action changes.

Execution entry point

Locate from the current Skill directory scripts/publish_bridge.py, and detect the interpreter in the project's unified way:for PYBIN in python3 python py; do "$PYBIN" -c "" 2>/dev/null && break; done. If no usable interpreter is available, stop and do not guess commands; after successful detection, pass the current project root to --project-root:

  • View associations:"$PYBIN" publish_bridge.py --project-root <项目根> status
  • Associated Fanqie adapter:"$PYBIN" publish_bridge.py --project-root <项目根> configure fanqie --adapter <project_publish.py> --python <适配器虚拟环境Python>
  • Run read-only actions:"$PYBIN" publish_bridge.py --project-root <项目根> run fanqie preview --chapters 109
  • Save draft: after explicit user confirmation, add --confirm-remote-draft; this bridge confirmation parameter is not passed downstream.
  • Official edit/publish/schedule: the downstream-required --confirm-live and --ai-declaration yes|no must be passed through as-is; do not guess the declaration on the user's behalf.

For the specific configuration structure, action grading, and failure semantics, see references/adapter-contract.md。

Result receipt

  • Always report the actual executed action, the adapter exit code, and the successful/failed chapters; do not write "started" or "clicked" as "published".
  • After an official publish or edit, call the adapter's preflight/platform read-back capability to confirm the target state; when read-back is unavailable, report REMOTE_STATE_UNVERIFIED, and do not automatically retry the write.
  • After a failure, do not automatically repeat draft/edit/publish/schedule. First query the remote state read-only, and then let the user decide whether to retry.

Prohibited items

  • Do not write this book's Book ID, book title, chapter directory, account path, or machine absolute path into this Skill.
  • Do not put .story-publish.json, cookies, authentication state, or raw platform responses into the publishing package.
  • Do not extend it to other works, other chapters, or subsequent automatic daily updates just because the user authorized one release.
  • Do not automatically act on behalf of the user on CAPTCHA, MFA, agreement confirmation, or platform risk control pages.