Skip to content

Conversation

@priethor
Copy link
Contributor

@priethor priethor commented Dec 23, 2025

What

Closes #171.

Adds Field abilities to the Abilities API.

Why

Fields are the core building blocks of SCF. Exposing field operations through the Abilities API allows AI agents to create, modify, and manage fields within field groups.

How

  • Implementing the SCF_Field_Abilities class with full CRUD operations following the same pattern as the regular SCF internal post types.
  • Doing some refactoring to the existing JSON schemas:
    • Extract the field schema to a separate field.schema.json file for reusability between field groups that contain fields and standalone fields; the field group schema now references the field schema for its fields array.
    • Refactor the internal fields schema (the ones that are stripped during export), as Fields only have ID and _valid but not local or not_registered, since they are not internal post types.

Testing Instructions

  1. Connect to SCF through MCP
  2. Ask your AI agent of choice to create/modify a field, list them by type text, etc.

@priethor priethor added this to the 6.8.0 milestone Dec 23, 2025
@priethor priethor self-assigned this Dec 23, 2025
@priethor priethor added the [Type] Enhancement New feature or request label Dec 23, 2025
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props priethor.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

❌ Patch coverage is 99.51456% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.35%. Comparing base (de6ee27) to head (4ebb80f).
⚠️ Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
includes/abilities/class-scf-field-abilities.php 99.50% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #300      +/-   ##
============================================
+ Coverage     13.40%   14.35%   +0.95%     
- Complexity     4321     4386      +65     
============================================
  Files           285      286       +1     
  Lines         34863    35270     +407     
============================================
+ Hits           4674     5064     +390     
- Misses        30189    30206      +17     
Flag Coverage Δ
e2e 30.69% <ø> (-0.03%) ⬇️
javascript 2.60% <ø> (ø)
phpunit 10.47% <99.51%> (+1.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@priethor priethor force-pushed the add/field-abilities branch from a6365e3 to 8094993 Compare December 23, 2025 17:16
@priethor priethor merged commit 8887e6c into trunk Dec 24, 2025
9 checks passed
@priethor priethor deleted the add/field-abilities branch December 24, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate with other plugins to expose SCF data and features to AI agents

2 participants