Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
be0d2c4
feature(mcp): Add MCPConfig utility class
LC43 Jul 8, 2026
3f6deb4
feature(mcp): Add mcp_route helper to RestTool base
LC43 Jul 8, 2026
ae70df0
test(mcp): Add tests for MCPConfig
LC43 Jul 8, 2026
6ef8831
feature(mcp): Refactor model meta tools to use MCPConfig
LC43 Jul 8, 2026
deb1465
feature(mcp): Refactor settings action tools to use MCPConfig
LC43 Jul 8, 2026
600b6f1
feature(mcp): Refactor REST controllers to use MCPConfig
LC43 Jul 8, 2026
e169e87
feature(model): add get_config to Model interface
LC43 Jul 8, 2026
7a219e1
feature(mcp): wire McpPolicy into AbilityRegistrar
LC43 Jul 8, 2026
3c3a44b
refactor(rest): switch from saltus_rest to config-section gating
LC43 Jul 8, 2026
126ad4d
fix(rest): update error hints to reflect new config syntax
LC43 Jul 8, 2026
bb31a54
test(mcp): add McpPolicyTest
LC43 Jul 8, 2026
313560a
test(rest): update REST tests for config-section gating
LC43 Jul 8, 2026
dae1ce0
docs: update MCP config filterability docs
LC43 Jul 8, 2026
b42b977
docs: update ROADMAP.md McpPolicy entry
LC43 Jul 8, 2026
32209fe
docs: update CURRENT.md McpPolicy progress
LC43 Jul 8, 2026
d050a2b
fix: use array lookup instead of match for PHP 7.4 compat
LC43 Jul 8, 2026
74961af
fix: add PHPStan type assertions to MCP config classes
LC43 Jul 8, 2026
af38fed
fix: add PHPStan type assertions to REST controllers
LC43 Jul 8, 2026
36db61d
Add guard for ability default props
LC43 Jul 8, 2026
8b3bbc8
CS
LC43 Jul 8, 2026
95c0f50
Add more guards
LC43 Jul 8, 2026
a20b060
Add more guards
LC43 Jul 8, 2026
8663b28
Add esc_url_raw stub function
LC43 Jul 8, 2026
3f2285d
Add defensive tests for MCP policy
LC43 Jul 8, 2026
d9383a6
Add initial MCP tool tests
LC43 Jul 8, 2026
2c2b9d8
Configure PHPUnit coverage settings
LC43 Jul 8, 2026
619c748
Gate sections cap
LC43 Jul 8, 2026
a600002
Update tests to match the caps
LC43 Jul 8, 2026
5cd7e98
More guards
LC43 Jul 8, 2026
6ed3378
CS
LC43 Jul 9, 2026
7b2baba
Simplify escaping rest route
LC43 Jul 9, 2026
986f5a6
Fix hints
LC43 Jul 9, 2026
0cd461c
Update docs
LC43 Jul 9, 2026
a6f27c1
Fix docs
LC43 Jul 9, 2026
69f1adf
Update docs
LC43 Jul 9, 2026
c682bb4
Update docs
LC43 Jul 9, 2026
34925ec
Prepare next phase in docs
LC43 Jul 9, 2026
83fbf60
CS
LC43 Jul 10, 2026
b092f11
CS
LC43 Jul 10, 2026
8235f2c
Use model built label when creating labels
LC43 Jul 10, 2026
2b39557
Update feature capabilities matrix
LC43 Jul 10, 2026
857c50b
infra(docs): gitignore generated docs artifacts
LC43 Jul 21, 2026
cfe294f
infra(docs): add npm vitepress dependency
LC43 Jul 21, 2026
b23f46a
infra(docs): add composer docs:all scripts
LC43 Jul 21, 2026
e77ec9b
infra(docs): add phpDocumentor configuration
LC43 Jul 21, 2026
1daf11a
infra(docs): add GitHub Actions workflow for docs deploy
LC43 Jul 21, 2026
7ff4a29
docs(site): configure VitePress navigation
LC43 Jul 21, 2026
bd5446c
docs(site): add landing page
LC43 Jul 21, 2026
65f2456
docs(site): set custom domain
LC43 Jul 21, 2026
4657b2c
docs(guides): add getting started page
LC43 Jul 21, 2026
40b97d2
docs(guides): add features reference page
LC43 Jul 21, 2026
5c967c1
docs(guides): add architecture page
LC43 Jul 21, 2026
b86fd71
docs(guides): add build page
LC43 Jul 21, 2026
03b3b37
docs(mcp): add overview page
LC43 Jul 21, 2026
a797ac8
docs(mcp): add abilities reference page
LC43 Jul 21, 2026
f97bebe
docs(mcp): add client integration guide
LC43 Jul 21, 2026
5bb7cba
docs(api): add API reference landing page
LC43 Jul 21, 2026
08a7f72
infra(docs): add WP-CLI doc generator stub
LC43 Jul 21, 2026
6e65f1a
docs(api): annotate Core Modeler as public api
LC43 Jul 21, 2026
0ddde10
docs(api): annotate Models namespace as public api
LC43 Jul 21, 2026
7d7d3c8
docs(api): annotate Rest infrastructure as public api
LC43 Jul 21, 2026
24c1f56
docs(api): annotate Rest controllers as public api
LC43 Jul 21, 2026
94abe69
docs(api): annotate MCP config policy as public api
LC43 Jul 21, 2026
5856cf3
docs(api): annotate MCP error factory as public api
LC43 Jul 21, 2026
b94b655
docs(api): annotate MCP middleware pipeline as public api
LC43 Jul 21, 2026
7be66e8
docs(api): annotate MCP tools namespace as public api
LC43 Jul 21, 2026
c189985
docs(api): annotate MCP abilities namespace as public api
LC43 Jul 21, 2026
dbc615a
docs(api): annotate MCP cache rate audit validation as public api
LC43 Jul 21, 2026
ef878fe
docs(api): annotate Plugin infrastructure as public api
LC43 Jul 21, 2026
a597bf2
docs(api): annotate Container infrastructure as public api
LC43 Jul 21, 2026
ec7d2c3
docs(api): annotate Service namespace as public api
LC43 Jul 21, 2026
20a1865
docs(api): annotate Services Assets namespace as public api
LC43 Jul 21, 2026
7000239
docs(api): annotate admin Features as public api
LC43 Jul 21, 2026
f43df37
docs(api): annotate MCP Meta Settings Features as public api
LC43 Jul 21, 2026
fe7d943
docs(api): add stub method for test compatibility
LC43 Jul 21, 2026
5118c2c
docs(readme): update links to docs site
LC43 Jul 21, 2026
83bb788
docs(tracking): update roadmap with docs site progress
LC43 Jul 21, 2026
55f8b0d
test(mcp): add middleware pipeline tests
LC43 Jul 21, 2026
8317da1
docs(mcp): restructure ability reference sections
LC43 Jul 31, 2026
a016b53
docs(config): point logo link at saltus.dev
LC43 Jul 31, 2026
594817d
docs(theme): custom nav title with docs sub-link
LC43 Jul 31, 2026
b386118
docs(mcp): point generated reference at the mcp abilities page
LC43 Jul 31, 2026
2385a50
docs(mcp): drop redundant title line from ability reference
LC43 Jul 31, 2026
4458af4
feat(mcp): add saltus-mcp agent skill
LC43 Jul 31, 2026
9abbb3b
docs(mcp): link to the saltus-mcp skill download
LC43 Jul 31, 2026
1018f98
docs(mcp): add skill usage page
LC43 Jul 31, 2026
f394fb3
docs(theme): register skill page in MCP sidebar
LC43 Jul 31, 2026
f24a948
docs(mcp): link to skill usage page
LC43 Jul 31, 2026
3f1e90f
infra: bump version to 1.1.0
LC43 Jul 31, 2026
28c0da5
chore: add phpDocumentor for API docs generation
LC43 Jul 31, 2026
923c3e0
docs: add brand assets manifest
LC43 Jul 31, 2026
ce80424
docs: note phpDocumentor + platform pin in BUILD
LC43 Jul 31, 2026
33d5dfe
docs: record v1.1.0 tooling cycle
LC43 Jul 31, 2026
e737f7c
docs: plan next task in CURRENT
LC43 Jul 31, 2026
a00ccd5
infra: bump version to 1.2.0
LC43 Jul 31, 2026
9ec0ad7
feat(blocks): add block services, controller, policies
LC43 Jul 31, 2026
d84695f
feat(blocks): add editor assets, styles, templates
LC43 Jul 31, 2026
436599d
feat(mcp): add list block models tool
LC43 Jul 31, 2026
f35ebd8
feat(wpcli): add command gateway catalog
LC43 Jul 31, 2026
af9f0a3
feat(wpcli): add subcommand classes
LC43 Jul 31, 2026
6bdc156
test: add blocks, wpcli feature coverage
LC43 Jul 31, 2026
53605c1
feat(wpcli): add docs generator, stubs
LC43 Jul 31, 2026
44b1a75
docs: add blocks, wpcli guides
LC43 Jul 31, 2026
fcb4cf9
docs: update roadmap, current state
LC43 Jul 31, 2026
a12962b
docs: refresh vitepress, content pages
LC43 Jul 31, 2026
5b09024
docs: plan phase 5C frontend work
LC43 Jul 31, 2026
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
199 changes: 199 additions & 0 deletions .agents/skills/saltus-mcp/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
---
name: saltus-mcp
description: "Use when connecting an AI agent/client to Saltus Framework MCP/Abilities (saltus/*) on an active WordPress site — discovery, health-first flow, model/meta inspection, safe read/write patterns, permission and rate-limit handling, and write confirmation flows."
compatibility: "Requires WordPress 7.0+ with the Abilities API and an active plugin built on Saltus Framework. Client-side skill; no PHP required on the agent side."
---

# Saltus MCP

Connect an AI client to the WordPress-native MCP/Abilities surface exposed by Saltus Framework.

## When to use

Use this skill when the task involves:

- consuming `saltus/*` abilities from an AI client or editor agent,
- discovering what post types, taxonomies, meta fields, and tools a Saltus site exposes,
- reading or writing WordPress content through Saltus tools,
- diagnosing `saltus/*` call failures (permissions, params, rate limits, model visibility).

## Prerequisites

- A running WordPress site (7.0+) with the Abilities API.
- An active plugin using Saltus Framework (registers `saltus/*` abilities on `wp_abilities_api_init`).
- Client access to the abilities (discovery list, or a configured tool list).
- The site URL and a user with the needed WordPress capabilities.

## Discovery

- Discover abilities from WordPress and filter for the `saltus/` prefix.
- Treat the ability definitions as the source of truth for tool names, input schemas, permissions, and transport metadata.
- Each Saltus ability carries metadata like:

```json
{
"meta": {
"mcp_tool": "list_models",
"namespace": "saltus-framework/v1",
"transport": "wordpress-rest",
"show_in_rest": true
}
}
```

- Use `meta.mcp_tool` for user-facing tool names and logs. Use the ability name (e.g. `saltus/list-models`) for native execution.

## Recommended call flow

1. `saltus/get-health`
2. `saltus/list-models`
3. `saltus/list-meta-fields`
4. Choose the relevant model
5. `saltus/get-model` or `saltus/get-meta-fields` for detail
6. Read content with `saltus/list-posts`, `saltus/get-post`, `saltus/list-terms`, or settings tools
7. Propose changes to the user
8. Execute writes only after target model, fields, and permissions are clear

For narrow workflows that already know the post type, skip the aggregate metadata call and use `saltus/get-meta-fields` directly.

## Health first

Call `saltus/get-health` at session start.

| Health signal | Client behavior |
|---------------|-----------------|
| `status: ok` | Continue normally |
| `status: degraded` | Prefer read-only planning; explain the degraded state before writes |
| High `error_rate` | Avoid repeated retries; inspect permission and input errors |
| High latency | Reduce broad listing calls; keep page sizes modest |
| Rate limit enabled | Respect rate-limit errors and `retry_after` data |

Health is framework-scoped; it does not prove a specific model or write is available.

## Model discovery

- Use `saltus/list-models` to discover post types and taxonomies. Never assume a model exists from a user phrase.
- Map user language to model names after reading labels and slugs; prefer exact slugs.
- If multiple models are plausible, ask the user to choose.
- Treat missing models as configuration or permission issues, not empty content.

## Metadata discovery

- Use `saltus/list-meta-fields` for site-wide discovery; `saltus/get-meta-fields` for one post type.
- Saltus returns raw config in `meta` and normalized data in `normalized.fields` (flattened paths) plus `normalized.rest_meta_keys`.
- Prefer `normalized.fields` for reasoning. Example paths:

```text
points_info.coordinates.latitude
points_info.coordinates.longitude
points_info.tooltipContent
```

- When writing post meta, map the field path back to its writable REST meta root. Update the containing serialized structure carefully; do not send only the leaf path.

## Safe read patterns

1. `saltus/list-posts` with `post_type`, `search`, `status`, and pagination.
2. Ask the user to confirm the target when the search result is ambiguous.
3. `saltus/get-post` with the confirmed `post_id`.

Keep list queries small; use `per_page` values that fit the task. For terms: discover the taxonomy with `saltus/list-models`, call `saltus/list-terms`, and use returned term IDs in create/update calls.

## Safe write patterns

Before creating or updating, know: target post type, target post ID (for updates/deletes), writable meta roots, expected field shape, current user intent, and the relevant capability outcome.

Write flow:

1. Read current model and metadata.
2. Read the target post or settings.
3. Build a minimal patch.
4. Summarize the planned mutation to the user.
5. Execute the mutation.
6. Read the object again to confirm the result.

Avoid broad writes (many posts from one instruction) unless the exact target list is shown and confirmed.

## Destructive actions

Require explicit confirmation for:

- force deletion
- bulk deletion
- reordering more than a small visible set
- settings updates
- writes to serialized or nested meta

Prefer trashing over force deletion unless the user explicitly asks for permanent deletion.

## Permission failures

Saltus permissions are WordPress permissions; never bypass them.

| Failure | Likely cause | Client response |
|---------|--------------|-----------------|
| `rest_forbidden` | Current user lacks capability | Explain required access and stop |
| `invalid_params` | Missing or malformed arguments | Fix arguments once, then retry |
| model not found | Model not registered / not REST-enabled / not visible | Ask for a different model or admin config |
| write denied | User can read but not mutate | Offer a read-only summary instead |

Do not retry permission failures repeatedly; they are stable until role or model config changes.

## Rate limits

- Stop parallel calls after the first rate-limit error.
- Use the returned `retry_after` value when available.
- Prefer cached or already-read context while waiting.
- Avoid broad discovery loops that repeatedly call the same list tools.

## Caching

Saltus may cache read-only responses in WordPress transients. Repeated reads may return cached data. To confirm a mutation: execute the write, let Saltus clear its MCP cache, then read the object again. Mutating tools clear the cache after execution.

## Planning heuristics

| User intent | First tools |
|-------------|-------------|
| "What content types are available?" | `saltus/get-health`, `saltus/list-models` |
| "Show me entries for X" | `saltus/list-models`, `saltus/list-posts` |
| "Edit field Y on item Z" | `saltus/list-models`, `saltus/get-meta-fields`, `saltus/list-posts`, `saltus/get-post` |
| "Create a new X" | `saltus/list-models`, `saltus/get-meta-fields`, `saltus/create-post` |
| "Change plugin settings" | `saltus/list-models`, `saltus/get-settings`, `saltus/update-settings` |
| "Export this item" | `saltus/list-posts`, `saltus/get-post`, `saltus/export-post` |
| "Reorder items" | `saltus/list-posts`, user confirmation, `saltus/reorder-posts` |

## Prompt guidance

Ground tool use in a short internal plan:

```text
First check Saltus health. Then list models. Then discover metadata for the target post type. Do not write until the target post ID, field path, and new value are confirmed.
```

For destructive work:

```text
Before deletion or force deletion, show the exact post ID, title, post type, and deletion mode. Require explicit confirmation.
```

For nested meta:

```text
Use normalized field paths for reasoning, but write through the REST meta root reported by Saltus. Preserve sibling fields in serialized structures.
```

## Anti-patterns

- guessing post type slugs without `list_models`
- writing meta before checking normalized metadata
- retrying permission failures
- using large list queries as a discovery shortcut
- force deleting without explicit confirmation
- treating health `ok` as proof that all model-scoped capabilities are enabled
- assuming every Saltus model allows every REST-backed capability

## Reference

- Main docs: https://docs.saltus.dev/mcp/
- Abilities reference: https://docs.saltus.dev/mcp/abilities.html
- Client integration guide: https://docs.saltus.dev/mcp/clients.html
71 changes: 71 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docs

on:
push:
branches: [main]
paths:
- 'src/**'
- 'docs/**'
- 'bin/**'
- 'phpdoc.dist.xml'
- 'package.json'
workflow_dispatch:

concurrency:
group: pages
cancel-in-progress: true

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-php@v4
with:
php-version: 8.2

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install phpDocumentor
run: |
wget -q https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.10.0/phpDocumentor.phar
chmod +x phpDocumentor.phar

- name: Install PHP dependencies
run: composer install --no-interaction --no-progress

- name: Generate API docs
run: php phpDocumentor.phar -c phpdoc.dist.xml

- name: Generate MCP docs
run: composer docs:mcp

- name: Install Node dependencies
run: npm ci

- name: Build VitePress site
run: npm run docs:build

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# dev
vendor/
node_modules/

# docs
docs/public/api/
docs/.vitepress/dist/
build/phpdoc-cache/

# editor/OS files
.DS_Store
Expand Down
Loading
Loading