A run executes sequentially within one native process; the doc ID is valid only for that session. Steps are not transactional; a later failure does not undo earlier saves.
Controlled development prerelease. Python 3.11+; pinned distribution printcraft-cli 0.2.1, only the macOS arm64 lock is verified. The entry point remains printcraft; do not treat research's new PdfCraft interface as a capability of the current distribution.
Set SKILL_DIR to the directory of this file as actually loaded by the host. All scripts and references are distributed with this skill and do not depend on sibling directories; at runtime place them in a separate user data directory.
python3 -I -B "$SKILL_DIR/scripts/bootstrap.py" --diagnose
# 仅已有安装授权时:
python3 -I -B "$SKILL_DIR/scripts/bootstrap.py" --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" list --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" describe doc_open --runtime-home "$RUNTIME_DIR"
--archive can specify an offline pinned ZIP, still verifying all digests; does not modify PATH.cli.py -- tools may install on first use and cannot be called a read-only installation diagnostic.
Plan format:{"domain":"printcraft","steps":[{"command":"实际工具名","params":{}}]}. Check the Schema before filling in parameters.
python3 -I -B "$SKILL_DIR/scripts/commands.py" check "$PLAN" --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" run "$PLAN" --output "$NEW_TASK_DIR" --expect "$OUTPUTS" --input "$ORIGINAL_PDF" --runtime-home "$RUNTIME_DIR"
python3 -I -B "$SKILL_DIR/scripts/commands.py" status "$NEW_TASK_DIR/receipt.json"
python3 -I -B "$SKILL_DIR/scripts/commands.py" reconcile "$NEW_TASK_DIR/receipt.json"
python3 -I -B "$SKILL_DIR/scripts/commands.py" verify "$VERIFY_REQUEST" --runtime-home "$RUNTIME_DIR"
The output directory must be brand new; runId is only for tracking and does not guarantee exactly-once. Tasks that have executed or whose results are unknown cannot be replayed by changing the directory or runId. Read-only reconciliation does not start native editing. Old or corrupted receipts are refused for recovery; keep the originals for investigation.
Explicitly register files or directories that need protection with --input , and detect digests before and after execution; paths not registered in the parameters are not covered by this check, and this is not a sandbox. Prefer editing a working copy; existing user authorization is reused directly, and authorization is re-determined only when adding original-file overwrite, actual printing, or going beyond the output scope. Native processes may write files, access the network, or use system resources.
A zero exit only reaches REVIEW_REQUIRED. You must check the explicit manifest, size/digest, reopening in a new process, per-page text and geometry, and then complete the visual review bound to the current digest. Unknown or partial results are not automatically replayed; revisions are not automatically looped. Forms, redaction, signatures, PDF/A, and OCR each record their acceptance status separately.
Secret fields include password/passwd/secret/token/api_key/credential; public receipts are redacted, private execution materials have permissions 0600, and are cleaned up afterward. Avoid putting secrets in file names or unrelated ordinary fields. Task directories may still contain sensitive PDFs and should be cleaned up by the user according to the retention policy.
Chinese scanned recognition: see the explicit optional Tesseract backend in Chinese OCR contract. Native 0.2.1 still only has English; this path generates a rasterized new copy, so first verify the output policy and backend identity.
See contract and boundaries、success/failure/refusal cases。
Routing: general tasks pdfcraft-use; environment printcraft-cli-setup; checks pdfcraft-cli-inspect; pages pdfcraft-cli-pages; batch recovery pdfcraft-cli-automation; specialized contracts printcraft-cli. If another skill is needed, install it by name:npx skills add full-aigc-skills/pdfcraft-skills --skill <技能名>。