Process protocol

From mderk/memento · View interactive version

Process protocol is an AI agent skill from the GitHub repository mderk/memento. Process and implement tasks from a protocol in git worktrees (or inline on the main workdir)

How to use this skill

Skill file

Process Protocol

Run the process-protocol workflow to implement protocol steps.

Two modes:

Instructions

1. Resolve protocol directory

The user may specify a protocol in different ways. Resolve to a directory containing plan.md:

Verify the resolved directory contains plan.md before proceeding.

2. Parse flags

If the user passes --no-worktree (anywhere in the arguments), set no_worktree=true in the variables block below. Otherwise omit it.

Inline-mode preconditions (when --no-worktree is used): the working directory must have no uncommitted changes. The workflow aborts early with a clear error if git status --porcelain is non-empty. Tell the user to commit or stash first.

3. Check for resumable run

Check if <protocol_dir>/.last_run exists. If it does:

4. Start workflow

Load the memento-workflow:workflow-engine skill, then:

Fresh start (worktree mode):

mcp__plugin_memento-workflow_memento-workflow__start(
  workflow="process-protocol",
  variables={"protocol_dir": "<resolved protocol directory>"},
  cwd="<project root>"
)

Fresh start (inline mode):

mcp__plugin_memento-workflow_memento-workflow__start(
  workflow="process-protocol",
  variables={"protocol_dir": "<resolved protocol directory>", "no_worktree": true},
  cwd="<project root>"
)

Resume: add resume="<run_id from .last_run>" to the call. Include the same no_worktree value the original run used.

5. Follow the relay protocol from the workflow-engine skill until the workflow completes.

Finalization

```

git checkout develop && git merge --no-ff protocol-NNN

```

/merge-protocol currently expects the worktree layout and does not support inline mode yet.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.