marionettist-pathway-opencode
v0.3.2
Published
OpenCode Pathway plugin package surface for Marionettist.
Readme
Optional OpenCode Assets
These files are optional local OpenCode assets for repositories that want a marionettist-oriented command and subagent setup.
What Is Included
opencode.jsonc: project-level OpenCode config that enables either the package plugin default or the repository-local./.opencode/plugin/opencode-tasks.jsprototype..opencode/plugin/opencode-tasks.js: repository-local OpenCode plugin prototype asset installed from this Pathway source root.commands/*.md: starter slash commands that route users into the Marionettist workflow, with/marionettistas the default builder-first entrypoint and optionalminimal,standard, andadvancedcommand surfaces.agents/*.md: starter agent definitions for builder, coder, critic, indexer, planner, reviewer, and validator roles.agents/validators/*.md: validator guidance variants you can copy from or adapt to your project type.
P1 Workflow Additions
agents/marionettist-critic.mdprovides a dedicated critic gate role and renders itsmodelfrom the review profile.commands/marionettist-incident.mdstarts an evidence-first incident flow, stops before coding, and keeps the incident artifact ready for the next approved investigation or implementation step.- Context refresh and coding flows should keep
docs/project/knowledge-map.mdand nearbyMODULE_RULES.md,AGENTS.md, andHARNESS_RULES.mdaligned with the current project.
Customization
- Model defaults are rendered from
.marionettist/model-profiles.ymlprofiles. Updateprofiles.think/build/review/runthere first, then runmarionettist diff --with-opencodeandmarionettist sync --with-opencodeto preview and apply regenerated agentmodelfields. If a project has not adopted.marionettist/model-profiles.ymlyet,marionettist.config.yamlmodels.profiles.*remains the legacy fallback. - Command visibility is configured through
opencode.commandSurface: minimal|standard|advancedormarionettist init --with-opencode --opencode-command-surface minimal|standard|advanced. Legacyfullremains an accepted alias foradvanced. - Surface definitions are builder-first by design:
minimalinstalls/marionettist,/marionettist-dev,/marionettist-incident,/marionettist-docs, and/marionettist-config;standardadds/marionettist-context,/marionettist-status, and/marionettist-continue;advancedadds/marionettist-feature,/marionettist-bugfix, and/marionettist-refactor. - The existing
marionettist-configcommand remains the general or legacy OpenCode config wrapper. The OpenCode Pathway MVP may also expose a distinctmarionettist-pathway-configworkflow for Pathway-scoped config authoring; that workflow is not a new core CLI config command. - Pathway config writes should always follow the same safety posture: draft candidate YAML or config content, show a diff or diff-like preview, and require explicit confirmation before writing managed config files.
- Marionettist gate policy is configured separately through
marionettist.config.yamlgatePolicy.defaultMode: strict|balanced|autonomous. The builder should recommend a task policy before coding, and task-local artifacts may record a selected override when the project workflow allows it. - Gate policy is not the same as
opencode.permissionMode. Gate policy controls where Marionettist pauses or continues;opencode.permissionModeonly adjusts OpenCode tool-permission friction. - In
balancedmode,/marionettist-continuemay continue into the next already-approvedgateClass: simpleslice/group or low/moderate-riskgateClass: standardslice/group withrisk_score <= 3when no critic-required or explicit gate blocks continuation. Inautonomousmode, it still pauses forhigh-risk,boundary-sensitive, critic-required, explicitly requested gates, or any slice whose supplementalrisk_scorereflects concrete elevated risk. Final approval remains required by default. - Permission mode is configured through
opencode.permissionMode: default|moderate|loose.defaultpreserves current behavior;moderateandlooseadjust friction around higher-risk operations without changing the Marionettist gate model. - The dangerous-command baseline covers destructive deletes, dangerous git rewrites, force pushes, publish/release operations, global config mutation, project-external writes, and risky shell pipe/chain patterns.
- That baseline is enforced as strongly as OpenCode schema allows. Where schema cannot express a risky pattern precisely, templates fall back to warnings, prompts, and agent guidance prose.
- Treat
looseas a higher-trust local option, not as a shared default recommendation. Do not treat these templates as endorsing globalpermission: allow. - Install/distribution mode is recorded in
.marionettist/manifest.jsonasdistributionMode(embedded,hybrid, oradapter). Legacy installs without that field remain valid and are reported safely. - OpenCode generated artifact ownership stays template-driven:
templates/pathways/opencode/**is the only framework source of truth,distributions/opencode/**is generated package staging, and target-project manifest entries track adapter metadata,templateHash,renderedHash, and legacyhashcompatibility. marionettist diffandmarionettist syncprotect local modifications. Missing files, conflicts, and orphaned managed entries are reported rather than silently overwritten; explicit force is required for intentional managed replacement.- Same-name plugin and file entries may conflict. If a plugin-provided agent or command shares a name with a generated or project-local file entry, the plugin entry may win.
- OpenCode may load the same plugin from both the explicit config entry and
.opencode/plugin/auto-discovery. The current prototype is accepted because its config hook is idempotent. - If generated config, plugin, command, or skill files change, restarting OpenCode may be required before the running session observes the update.
- Permission settings are also examples. Tighten or relax them to fit your safety requirements.
- Keep terminology aligned with your repository docs, rules, and
docs/project/knowledge-map.md.
Validator Guidance
agents/marionettist-validator.mdincludes a generic fallback.- If
opencode.jsoncenablesopencode-tasks, the validator also gets scheduling guidance for recurring validation requests. agents/validators/gradle-kotlin.mdprovides a Gradle/Kotlin-oriented example.agents/validators/maven.mdprovides Maven-oriented validation guidance.agents/validators/node.mdprovides Node.js package manager validation guidance.agents/validators/python.mdprovides Python validation guidance.agents/validators/generic-fallback.mdprovides tool-agnostic validation guidance.
If your repository uses another stack, keep the generic fallback and replace the project-type-specific examples with local guidance.
