A reusable AI folder-workflow kit you can copy into any repository.
It keeps OpenCode as the runtime and permission layer, while moving workflow control into folders, Markdown runbooks, checklists, staged outputs, and skills. The active default is a single general agent.
This kit is inspired by Model Workspace Protocol (MWP) from Jake Van Clief and David McDermott: https://github.com/RinDig/Model-Workspace-Protocol-MWP.
MWP's core idea is that folder structure, Markdown context files, stage contracts, and plain-text outputs can orchestrate sequential human-reviewed AI workflows without a heavyweight multi-agent framework. This kit adapts that idea for OpenCode/Claude, machine-level routing, reusable templates, and vault/project workflows.
.opencode/opencode.json— single-agent runtime config, permissions, and defaultsAGENTS.md— portable execution policy, folder workflow rules, risk gates, done criteriaCLAUDE.md— Claude Code pointer that routes toAGENTS.mddocs/— framework concepts, template selection, kit maintenance, and migration notestemplates/— bootstrap templates:minimal,work,personaltemplates/pipeline/— strict MWP-style staged pipeline templatedocs/artifacts/— canonical artifact skeletons (copied into workspace templates)scripts/init-workspace.py— initialize a directory from a templatescripts/verify-workspace.py— verify any folder-workflow workspace.opencode/AGENTS.md— global OpenCode instruction file linked bysetup.shdocs/workflow-kit-bootstrap.md— cross-tool procedure for creating or repairing the kit/control-plane layerARCHITECTURE.md— repository map and boundaries.opencode/agents/— activegeneralprompt only.opencode/skills/— bundled, loadable skills (repo-bootstrap,workflow-kit-bootstrap).opencode/config/— source config and permission profiles used to generateopencode.json.opencode/scripts/— config generation helpers
Default usage starts with general, which reads local AGENTS.md, uses a local _workspace/ when present, otherwise reads the relevant docs/templates/scripts/config files, performs scoped local work, validates, and writes durable handoff artifacts when useful.
There are no default delegation lanes. Former lane/specialist prompts are archived under archive/retired-agents/; their useful logic is represented as workflows and checklists.
Typical flow:
- Read
AGENTS.md. - Use root
/Users/spider/workspace/_workspace/for machine-level routing when needed. - Select the relevant docs, templates, scripts, skills, or config files.
- Read only the required runbook/context/skill files.
- Produce a plan or proceed directly for small safe work.
- Execute within permission and safety gates.
- Save cross-workspace outputs under
/Users/spider/workspace/_workspace/outputs/when useful.
generalis configured for safe standalone local execution, including write/edit tools and focused validation allowlists.- Agent delegation is disabled for the active workflow.
- Review/security/performance work uses checklist/workflow files in target workspaces, not specialist agents.
- Write/command execution happens in
generalwith fallback ask for commands not explicitly allowed or denied. - Broad compound, pipe, redirection, command substitution,
xargs, andteeshell forms remain ask-gated unless a specific harmless read-only status combo is allowlisted before the broad guard. - Baseline command guardrails in
.opencode/opencode.jsondeny clearly dangerous operations (for example force-reset or recursive destructive deletes). - Both lanes enforce stop-and-confirm for high-risk changes such as:
- security/auth model changes
- billing/payment or funds-flow changes
- destructive/irreversible operations
- external API contract breaks
- shared/prod infra, deploy, publish, push, cluster, or terraform mutations
- OpenCode discovers skills by convention from
.opencode/skills/<skill-name>/SKILL.md. - No
.opencode/opencode.jsonsetting is needed for a skills directory path. - Run
python3 verify-opencode-setup.pyafter copying to validate required paths.
Install this repo's OpenCode config into your user config with symlinks:
cd ~/workspace/workflow-kit && ./setup.shTo target a different config directory:
OPENCODE_CONFIG_DIR=/path/to/opencode ./setup.shThe setup script links the selected .opencode entries (opencode.json,
agents/, skills/, config/, and scripts/) plus the global OpenCode
AGENTS.md from .opencode/AGENTS.md. It backs up conflicting
destination files or directories before replacing them with symlinks.
Restart OpenCode after running setup.
Use a template instead of copying the whole kit manually:
python3 scripts/init-workspace.py --template minimal /path/to/project
python3 scripts/init-workspace.py --template work /path/to/project
python3 scripts/init-workspace.py --template personal /path/to/vault
python3 scripts/init-workspace.py --template pipeline /path/to/pipeline-workspaceTemplates:
minimal: smallest usefulAGENTS.md+_workspace/work: coding/docs/review/validation/handoff workflowspersonal: learning, notes, source processing, and writing polish workflowspipeline: strict MWP-style sequential stage pipeline withCONTEXT.md,stages/,references/, andoutput/; it does not includeAGENTS.mdorCLAUDE.md
Verify a target workspace:
python3 scripts/verify-workspace.py /path/to/project- Initialize a template with
scripts/init-workspace.py. - Optionally copy
.opencode/if the project should carry its own OpenCode runtime config. - Run the
repo-bootstrapskill to generate/update repo-specific docs:ARCHITECTURE.md- folder workflows/runbooks/context files relevant to the repo
.opencode/skills/(add/remove skills relevant to the repo)
- Keep
AGENTS.mdmostly portable and policy-focused. - Adjust
.opencode/opencode.jsonif copied:- keep
default_agentasgeneral - tune permission rules for your environment
- keep agent delegation disabled unless you intentionally reintroduce it
- keep
- Reload/restart OpenCode so agent/skill config is re-read.
- Run
python3 scripts/verify-workspace.py <target>to confirm workspace integrity.
- Current active agent in this repo is
general. repo-bootstrapinitializes target repos/folders;workflow-kit-bootstrappoints OpenCode to the cross-tool kit bootstrap runbook.