Align guidelines substrate with the upstream Knowledge rename (Gutenberg #79149 / #77230)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- php
- Domain
- api, authorization, backend-api-design, databases
Research direction
Start by comparing WP_Guidelines_Substrate with upstream Gutenberg proposals #77230 and #79149, then trace how WP_Agent_Memory_Registry and WP_Agent_Context_Section_Registry consume it. First resolve whether to mirror upstream on landing or adopt now with aliases; done requires the chosen rename, compatibility and migration path, updated smoke coverage, and unchanged runtime-contract smokes.
Written by the indexing model from the issue text.
Description
Summary
Agents API ships a WP_Guidelines_Substrate that mirrors the WordPress Guidelines storage primitive: CPT wp_guideline, taxonomy wp_guideline_type, a filterable wp_guideline_types() registry, a scope model (private_user_workspace_memory vs workspace_shared_guidance), the *_workspace_guidelines / *_agent_memory capability namespace (with promote_agent_memory), and a guidelines REST base.
Upstream is consolidating and renaming this primitive from "Guidelines" to "Knowledge", on the rationale that editorial guidelines are just one type of persistent, agent-facing knowledge a site stores — alongside skills, memory, and plans/notes — and they all share the same structural shape (titled, versioned, instructional documents over REST), differing only in lifecycle and multiplicity:
- Proposal: WordPress/gutenberg#77230 — "Evolve CPT to enable support for skills, memory, and plans via taxonomy"
- Reference implementation: WordPress/gutenberg#79149 — "Knowledge: Rename the Guidelines CPT storage primitive to Knowledge"
Our substrate already implements the evolved (typed + private-memory + promote) shape this proposal describes, just under the older guideline names. This issue tracks aligning our names and built-in types with the upstream primitive so consumers target one vocabulary.
Proposed alignment (per gutenberg#79149)
| Surface | Current | Upstream |
|---|---|---|
| CPT slug | wp_guideline |
wp_knowledge |
| Taxonomy | wp_guideline_type |
wp_knowledge_type |
| Types registry + filter | wp_guideline_types() |
wp_knowledge_types() |
| Capability namespace | *_guidelines |
*_knowledge |
| REST base | /wp/v2/guidelines |
/wp/v2/knowledge |
| Meta keys | _wp_guideline_* |
_wp_knowledge_* |
Built-in types, defined by behavior:
content→instruction(loaded by default when applicable)artifact→note(private freeform working text; the save-time fallback term)memorystaysmemory
skill is not a built-in upstream type — it would come through the wp_knowledge_types() filter. Decide whether we ship it as a default here or leave it to consumers.
Considerations
- Timing. gutenberg#79149 is explicitly an illustration of a proposal still gathering feedback (gutenberg#77230). Recommend we track upstream and mirror once it lands rather than rename ahead of it, to avoid churn if the final shape changes — same pattern as #94 (consume Abilities API lifecycle filters once they land). Alternatively, adopt now behind compatibility aliases.
- Backwards compatibility. Consumers already build on the
wp_guideline*names, the*_guidelinescaps, and the_wp_guideline_*meta. A rename needs a deprecation/aliasing path (old constants/filters delegating to new), plus migration for existing posts/terms/meta. - Runtime contracts. The consumption side —
WP_Agent_Memory_Registry,WP_Agent_Context_Section_Registry, the context injection/conflict-resolution layer — reads through this substrate. The rename is storage-layer + a compatibility shim; the runtime contracts that mapinstruction/note/memoryto agent context should keep working unchanged.
Acceptance
- Decision: mirror-on-land vs adopt-now-with-aliases.
-
wp_knowledgeCPT +wp_knowledge_typetaxonomy +wp_knowledge_types()filter, with the built-in type renames. -
*_knowledgecapability namespace and/wp/v2/knowledgeREST base. - Backwards-compatible aliases for the previous names/meta + a migration path.
- Smoke coverage updated for the new names; existing runtime-contract smokes still green.
- Dominant language
- PHP
- Stars
- 33
- Forks
- 8
- Avg merge
- 1h 39m
- Merged PRs (30d)
- 30
Contributor guide
No contributing guide indexed for this repository
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 Automattic/agents-api
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Automattic/agents-api#552 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
Automattic/agents-api#551 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Automattic/agents-api#550 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
Automattic/agents-api#549 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
Automattic/agents-api#529 ·
All issues in Automattic/agents-api
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·