Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions eval/scenarios/wpcli-hol-guard-protected-agent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Protect agent-run WP-CLI with HOL Guard",
"skills": ["wordpress-router", "wp-project-triage", "wp-wpcli-and-ops"],
"query": "I'm using a local coding agent to run a production wp search-replace. I want HOL Guard in front of the agent before it can execute WP-CLI writes. Give me the safe workflow.",
"expected_behavior": [
"Confirm production target and blast radius before any write",
"Require a backup and WP-CLI dry-run for search-replace",
"Install HOL Guard with an isolated CLI install when needed",
"Use hol-guard detect --json instead of guessing the active harness",
"Use hol-guard bootstrap, install, run --dry-run, run, and doctor for the detected supported harness",
"Treat deny, review-required, Guard error, or unavailable states as blocked rather than bypassing Guard",
"State that HOL Guard protects the supported local agent harness and is not native WordPress or WP-CLI server interception"
],
"success_criteria": [
"HOL Guard itself is installed and invoked in the workflow",
"The agent is run through the Guard-owned bootstrap and harness path before WP-CLI writes",
"WordPress backup, targeting, and dry-run safeguards remain required",
"No unsupported claim of WordPress server-side interception is made",
"Protection is only claimed after hol-guard doctor verifies the harness"
]
}
28 changes: 28 additions & 0 deletions skills/wp-wpcli-and-ops/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,32 @@ WP-CLI commands can be destructive. Before running anything that writes:
Read:
- `references/safety.md`

#### Optional: protect agent-run WP-CLI with HOL Guard

If WP-CLI is being invoked by a supported local coding-agent harness and the
user wants a pre-execution policy boundary, run that harness through HOL Guard
before performing write operations:

```bash
pipx install hol-guard
hol-guard detect --json
hol-guard bootstrap
hol-guard install <harness>
hol-guard run <harness> --dry-run
hol-guard run <harness>
hol-guard doctor <harness> --json
```

Use the harness reported by `hol-guard detect --json`; do not guess an adapter
name. A deny, review-required, error, or unavailable Guard state is not
permission to run the WP-CLI command outside the protected harness. Keep the
WordPress-specific safeguards above as well: Guard does not replace correct site
targeting, backups, or WP-CLI dry-runs.

This is agent-side protection, not a native WordPress or WP-CLI interception
layer. Do not claim the WordPress server is protected merely because HOL Guard
is installed.

### 1) Inspect WP-CLI and site targeting (deterministic)

Run the inspector:
Expand Down Expand Up @@ -104,6 +130,8 @@ Read:
- plugins/themes in expected state
- cron/caches flushed where needed
- If there’s a health check endpoint or smoke test suite, run it after ops changes.
- If HOL Guard is used, require `hol-guard doctor <harness> --json` to confirm
the harness integration before claiming the agent is protected.

## Failure modes / debugging

Expand Down
Loading