marketplace/bundles/plan-marshall/skills/platform-runtime/SKILL.md
Platform abstraction layer routing operations to Claude Code or OpenCode implementations
npx skillsauth add cuioss/plan-marshall platform-runtimeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Script-based platform abstraction that routes 15 goal-based operations to the correct target implementation. Follows the tools-integration-ci pattern: one router script, target-specific provider classes, static routing via marshal.json.
Execution mode: Invoke scripts via executor notation; parse TOON output for status and route accordingly.
Prohibited actions:
platform_runtime.pyruntime.target in marshal.jsonref-toon-format parser moduleConstraints:
python3 .plan/execute-script.py plan-marshall:platform-runtime:platform_runtime <operation> [args...]session render-title takes no arguments; all resolution is internalno-op responses are not errors; the calling skill must continuestandards/contract.md for per-operation TOON schemasFifteen operations covering the full platform lifecycle:
| Operation | Purpose |
|-----------|---------|
| project initial-setup | One-time project setup: create .plan/, seed marshal.json, install platform hook |
| session capture | Persist current session id via manage-status; no-op on OpenCode |
| permission configure | Write raw permission list to platform settings |
| permission analyze | Read-only audit of permission hygiene, redundancy, and missing-steps |
| permission fix | Apply hygienic fixes: normalize, add, remove, ensure, consolidate |
| permission ensure-wildcards | Add marketplace bundle wildcard permissions |
| permission ensure-steps | Add missing skill permissions for marshal.json phase steps |
| permission web-analyze | Read-only analysis of WebFetch/webfetch domain permissions |
| permission web-apply | Add or remove web domain permissions |
| session render-title | Emit OSC title sequence from writer artifact; no-op on OpenCode |
| session push-title-token | Parse --plan-id and --icon, emit OSC escape to /dev/tty (Claude); no-op on OpenCode |
| metrics capture | Record token consumption for a planning phase |
| subagent dispatch | Return platform-specific subagent invocation parameters |
| health-check | Verify platform integration |
See standards/contract.md for per-operation TOON schemas (success, error, no-op paths).
Static Routing Pattern: marshal.json stores runtime.target; router dispatches to target class.
marshal.json Scripts
runtime.target: claude ──────────────────► claude_runtime.py
runtime.target: opencode ─────────────────► opencode_runtime.py
Router (platform_runtime.py) reads runtime.target, looks up target class in registry, and dispatches. Registry is extensible — adding a new target adds a class and a registry entry.
Standard invocation (post-bootstrap):
python3 .plan/execute-script.py plan-marshall:platform-runtime:platform_runtime <operation> [args...]
Bootstrap invocation (Steps 1–3, before executor exists):
During marshall-steward Steps 1–3 the executor does not yet exist. Use the glob-path bootstrap directly. After Step 4 (Generate Executor), switch to executor notation for all subsequent calls.
Every operation returns:
status: success | error | no-op
operation: <name>
result: <any> (success only)
error: <string> (error only)
message: <string> (error only)
reason: <string> (no-op only)
alternative: <string> (no-op only)
Full per-operation schemas: standards/contract.md
No-op policy and caller obligations: standards/no-op-policy.md
| Code | Meaning |
|------|---------|
| invalid_scope | Scope argument not project or global |
| invalid_check | permission analyze --checks contains unknown check name |
| marshal_not_found | .plan/marshal.json missing |
| prompt_not_found | subagent dispatch prompt file not found |
| unknown_target | runtime.target not in registry |
| hook_not_configured | SessionStart hook missing; $CLAUDE_CODE_SESSION_ID unset |
When a target returns no-op:
status is no-op, not errorreason explains why the operation is not supportedalternative suggests what the caller can do insteadAll scripts comply with:
tools-script-executor — executor notation, standardized error format, environment variables (PLAN_DIR_NAME, PM_MARKETPLACE_ROOT), exit codes (0 success, 1 invalid params, 2 runtime error)ref-toon-format — TOON generated and parsed via toon_parser.py from the ref-toon-format skill; no ad-hoc parsingPlatform-runtime operations satisfy: "Would this differ between Claude Code and OpenCode?"
| In scope | Belongs elsewhere |
|----------|-------------------|
| Platform hooks, session IDs | manage-status (plan state) |
| Settings/permissions files | tools-integration-ci (CI/PR) |
| Terminal title rendering | manage-architecture (architecture data) |
| Platform-specific subagent invocation | manage-metrics (metrics storage) |
| Platform health verification | tools-script-executor (executor regeneration) |
The session render-title and session push-title-token operations are the
resolve + emit layer of the terminal-title three-way split. They resolve
session → plan, read the title state from status.json (live first, archived
fallback), call the pure manage-terminal-title composer, and emit per platform
(OSC / statusLine / web sessionTitle, plus the /dev/tty push). status.json is
the single source of persisted title state — there is no title-body.txt
artifact. See manage-terminal-title/standards/terminal-title-architecture.md for
the canonical end-to-end architecture: state (manage-status), composer
(manage-terminal-title), resolve+emit (platform-runtime), session-plan
binding, output channels, platform abstraction, and the glyph + icon vocabulary.
development
The single append-only change-ledger — one worktree_sha-stamped substrate for kind=build and kind=change entries — plus the first-class worktree-sha freshness API
development
Authoring standards for ASCII box diagrams in skill and doc source — box-drawing conventions, right-border alignment, and a deterministic check/fix validator over fenced/literal code blocks in .md and .adoc files
testing
Recipe for verifying and fixing alignment of ASCII box diagrams across .md skill source and .adoc documentation, one deliverable per offending file
development
Pure platform-agnostic terminal-title composition consumed by platform-runtime via PYTHONPATH