SuperAPI AI Directory

photocraft-harness

Design & creation

View repository

Updated 10-15 21:47

About this skill

PhotoCraft Harness (built-in execution channel)

This skill is the PhotoCraft skill suite'ssole execution implementation: first-time installation, native command invocation, workflow orchestration, desktop bridging, continuous task sessions, and delivery verification are all converged in this directory scripts/ .photocraft-use、photocraft-cli and the domain skills are thin documentation skills—they provide scenario guidance, plan examples, and reference contracts, while actual execution always goes through this skill's entry points.Before executing any PhotoCraft script, first set HARNESS_DIR to this SKILL.md 's containing directory (the absolute path actually loaded by the host); do not assume the current working directory is the skill directory. A user-level installation may be located at ~/.agents/skills/photocraft-harness, a project-level one may be located at .agents/skills/photocraft-harness, and a plugin may be located in its skills/photocraft-harness or the host cache directory; the path actually loaded by the host takes precedence. In domain skill documentation, SKILL_DIR refers to the domain skill's own directory (used to read its examples/、references/), which is a different location from this harness.

Entry points

Entry point Purpose
scripts/bootstrap.py First-use installer: uses only the standard library to install the pinned official CLI (runtime.lock.json fixed version and digest), and returns JSON executable。
scripts/cli.py Public CLI channel: invokes the pinned binary by argv;-- is followed by the native subcommand, and there are also mcp and serve session entry points.
scripts/commands.py Native command single-skill entry point:list / describe / check / run, parameter descriptions, real-time pre-checks, same-session invocation, and failure receipts.
scripts/workflow.py Native layered plan executor: independent session, restricted read/write directories, and immutable revision delivery.
scripts/desktop.py Desktop bridge: installs the desktop application from the pinned official DMG and executes desktop plans; separate from the CLI cache.
scripts/task_session.py Continuous task session: invokes the native command entry point stage by stage, reusing one owning instance without restarting or replaying.
scripts/route.py Intent routing query:route.py INTENT returns the shortest skill chain; a read-only contract query, it does not replace the host model's understanding.
scripts/delivery.py Delivery integrity: read-only verification of the delivery manifest, dependencies, and exchange identity; does not install a runtime.
scripts/progress.py Progress observation: read-only query of atomic progress snapshots; does not install, start sessions, or grant replay or revision permissions.
scripts/native_verify.py Delivery verification: uses the installed pinned binary to reopen read-only in a new session; does not install or modify the delivery package.
scripts/native_workflow.py Workflow gateway: full reflection commands connect to the verified workflow; delivery is determined by native save, reopen, and dependency gates.
scripts/checkpoint_verify.py Checkpoint reconciliation: read-only reconciliation of failed staging and reopening of the original project; does not upgrade partial success to delivery pass.

The remaining scripts/ files are internal dependencies of the above entry points (protocol, guard, and contract modules) and are not invoked separately.

Usage

Scenario guidance, plans, and example files come from the corresponding domain skill directory (SKILL_DIR/examples/、SKILL_DIR/references/); execution paths always use this directory HARNESS_DIR/scripts/。

First-time installation (when no CLI is preinstalled; the installation scope is the user data directory and does not require sudo):

python3 -I -B "$HARNESS_DIR/scripts/bootstrap.py"

Native command direct connection and command catalog query (cli.py's native subcommands must be placed after -- Afterward; commands.py output is always JSON):

python3 -I -B "$HARNESS_DIR/scripts/cli.py" -- --version
python3 -I -B "$HARNESS_DIR/scripts/cli.py" -- commands --json
python3 -I -B "$HARNESS_DIR/scripts/commands.py" list --filter QUERY
python3 -I -B "$HARNESS_DIR/scripts/commands.py" describe COMMAND_ID

For continuous interaction, use cli.py -- mcp or cli.py serve(stdio/TCP); for continuous inspection, editing, saving, and reopening, use task_session.py. For desktop installation and GUI planning, see the domain skill's [Fixed Desktop Installation] reference, with the entry point at scripts/desktop.py。

Relationship between domain skills and this harness

  • photocraft-use: complete task routing and delivery contract; execution still goes through this harness.
  • photocraft-cli and each scenario skill (setup/project/layers/selection/masks/adjustments/retouch/text/resize/export/filters): scenario knowledge and parameter contracts; execution still goes through this harness.
  • When domain skill documentation references scripts, it always writes $HARNESS_DIR/scripts/<入口>;references/ with the execution contract JSON (commands, command-coverage, native-command-snapshot, desktop-command-snapshot, routing-contract) inside this skill remaining byte-identical to photocraft-use , and each domain skill retaining its own scenario reference.
  • Before delivery, moving packages, or reworking source projects, execute according to the domain skill's delivery completeness reference scripts/delivery.py; read-only inspection does not require installing the runtime.

Current scope

The version and artifact digest of the fixed CLI are governed by this skill's scripts/runtime.lock.json ; the skill package version is governed by the corresponding release tag. Independent installation re-verification and full per-command acceptance are recorded separately, and release is not a substitute for acceptance. Directory coverage and direct native use do not mean that all instructions, GUI, delivery, or Art orchestration have been accepted.