Turn a job you just ran into a playbook you can reuse

MaintenanceIntermediate~10 min

Before you start

Plugin version 1.10.1 or newer. Run it from an administrator connection, since the Activity Log read needs the manage-options capability, ideally in the same chat as the job. List playbooks only checks for an existing playbook with the same job. Agents cannot save playbooks, so you paste the result into the Playbooks tab.

You just walked an agent through a job and it went right: the monthly link check, a menu cleanup, a sale set up the way you like it. Next month you would have to explain it all again.

A playbook is where that explanation lives. The draft comes from what the Activity Log shows the agent actually called, so a step that was refused or failed shows up before it gets written into the playbook as if it worked.

The prompt
That job went well and I want to save it as a playbook. Do not change
anything on the site.
1. Read this plugin's Activity Log newest first, 200 per page, until you
pass the start of the job, about [45 minutes] ago. Log times are UTC.
Keep only rows where the user login is [agent-editor], and list the
tools that ran, in order, with their outcomes.
2. List the Active playbooks and tell me if one already covers this job.
If so, suggest changes to that one instead of a new one.
3. Write the playbook in this format:
- Title: 80 characters or fewer.
- Description: 200 characters or fewer, saying whether it changes
anything.
- Steps: numbered, one action per step, naming each tool by its label
(for example "the Get posts tool"). Include the checks we did, when to
stop, and the report format I asked for. Add a Rules section saying
what the agent must never do. Keep it well under 8,000 characters.
4. List the tools I should tick for it in the playbook's ability picker.
5. Leave out any password, key, private address or customer detail.
Give me the title, description and steps as three separate plain text
blocks so I can paste each one into its box.

Why this is safe to run

No tool can save a playbook, so what comes back is text for you to review. It reaches your agents only after you paste it into the Playbooks tab and set it to Active, and new playbooks start Off.

Read the steps before you save them. Every agent that loads the playbook later follows your wording, so a vague step now becomes a vague job every month.

Already connected from an admin account? Ask your agent to write up the job you just finished as a playbook draft, and it uses the same log read.

How it works

  1. Page back through the Activity Log to the start of the job and keep the agent user's rows.
  2. Check the Active playbooks for one that already covers the job.
  3. Write a title, description and numbered steps within the Playbooks tab limits.
  4. List the tools to tick in the playbook's ability picker.
  5. Hand you the text to paste into the Playbooks tab.

Questions

Why can't the agent save the playbook itself?
Playbooks are written only from wp-admin, and no tool can create or edit one, so an agent can never change the instructions agents are given. The agent writes the draft and you decide what goes in.
What are the limits?
A title of up to 80 characters, a description of up to 200, steps of up to 8,000, and up to 50 playbooks per site. The prompt asks the agent to stay inside them.
Should a playbook include passwords or API keys?
Never. Agents read the steps word for word, so the prompt tells the agent to leave out anything secret.