[Ability] update-post-content — Read, modify, and save post content with validated block markup
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, php
- Domain
- api, full-stack
Research direction
Start with docs/ABILITIES-GUIDE.md and the existing includes/abilities/plugin-deactivate.php and src/extensions/abilities/plugin-deactivate.js examples. Implement the PHP and JavaScript ability, register it in src/extensions/abilities/index.js, then add cases to tests/abilities/core-abilities.test.js. Done means insert, replace, and delete operations validate with parse_blocks(), destructive operations require confirmation, and npm run build plus npm run test:abilities pass.
Written by the indexing model from the issue text.
Description
Use Case
User says "add a paragraph after the heading" or "delete the second block" in the block editor chat. AI reads the current post blocks, performs the requested insert/replace/delete operation, validates the markup with parse_blocks(), and saves via REST API. Destructive operations (replace, delete) require confirmation.
Checklist
- Writer: Define natural language triggers, expected response format, and confirmation requirements per operation type
- PHP Dev: Create
includes/abilities/update-post-content.phpusingregister_agentic_ability() - JS Dev: Create
src/extensions/abilities/update-post-content.jswithregisterAbility() - JS Dev: Register in
src/extensions/abilities/index.js - LLM Tester: Add test cases to
tests/abilities/core-abilities.test.js - Build & verify:
npm run buildandnpm run test:abilities
References
- Abilities Guide
- Existing destructive ability example:
includes/abilities/plugin-deactivate.php+src/extensions/abilities/plugin-deactivate.js
Notes
Operations: insert, replace, delete blocks by position. Reads current content from editor state or REST API (GET /wp/v2/posts/{id}). Saves via PUT /wp/v2/posts/{id} with content field. Validates all markup with parse_blocks() before saving — zero "Attempt Block Recovery" errors. Replace and delete operations are destructive and need requiresConfirmation: true. Depends on Goal 7 (block editor chat window) for the editor-side surface. See CLOUDFEST_HACKATHON.md Goal 8.
- Dominant language
- JavaScript
- Stars
- 28
- Forks
- 6
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pluginslab/wp-agentic-admin
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pluginslab/wp-agentic-admin#226 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pluginslab/wp-agentic-admin#215 ·
-
php question wporg-submission
pluginslab/wp-agentic-admin#228 · 5 comments · 2 assignees ·
-
enhancement react-js ux
Difficulty 5/5 Over a week Newbie friendliness 35/100
pluginslab/wp-agentic-admin#224 ·
-
enhancement ux
Difficulty 4/5 3-5 days Newbie friendliness 48/100
pluginslab/wp-agentic-admin#223 ·
All issues in pluginslab/wp-agentic-admin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·