Plugin Manifest Sync
Reconcile plugin.yaml with Betty Framework registries
What this skill does
# docs.sync.plugin_manifest
## Overview
**docs.sync.plugin_manifest** is a validation and reconciliation tool that compares `plugin.yaml` against Betty Framework's registry files to ensure consistency and completeness. It identifies missing commands, orphaned entries, metadata mismatches, and suggests corrections.
## Purpose
Ensures synchronization between:
- **Skill Registry** (`registry/skills.json`) – Active skills with entrypoints
- **Command Registry** (`registry/commands.json`) – Slash commands
- **Plugin Configuration** (`plugin.yaml`) – Claude Code plugin manifest
This skill helps maintain plugin.yaml accuracy by detecting:
- Active skills missing from plugin.yaml
- Orphaned commands in plugin.yaml not found in registries
- Metadata inconsistencies (permissions, runtime, handlers)
- Missing metadata that should be added
## What It Does
1. **Loads Registries**: Reads `skills.json` and `commands.json`
2. **Loads Plugin**: Reads current `plugin.yaml`
3. **Builds Indexes**: Creates lookup tables for both registries and plugin
4. **Compares Entries**: Identifies missing, orphaned, and mismatched commands
5. **Analyzes Metadata**: Checks permissions, runtime, handlers, descriptions
6. **Generates Preview**: Creates `plugin.preview.yaml` with suggested updates
7. **Creates Report**: Outputs `plugin_manifest_diff.md` with detailed analysis
8. **Provides Summary**: Displays key findings and recommendations
## Usage
### Basic Usage
```bash
python skills/docs.sync.plugin_manifest/plugin_manifest_sync.py
```
No arguments required - reads from standard locations.
### Via Betty CLI
```bash
/docs/sync/plugin-manifest
```
### Expected File Structure
```
betty/
├── registry/
│ ├── skills.json # Source of truth for skills
│ └── commands.json # Source of truth for commands
├── plugin.yaml # Current plugin manifest
├── plugin.preview.yaml # Generated preview (output)
└── plugin_manifest_diff.md # Generated report (output)
```
## Behavior
### 1. Registry Loading
Reads and parses:
- `registry/skills.json` – All registered skills
- `registry/commands.json` – All registered commands
Only processes entries with `status: active`.
### 2. Plugin Loading
Reads and parses:
- `plugin.yaml` – Current plugin configuration
Extracts all command definitions.
### 3. Index Building
**Registry Index**: Maps command names to their registry sources
```python
{
"skill/define": {
"type": "skill",
"source": "skill.define",
"skill": {...},
"entrypoint": {...}
},
"api/validate": {
"type": "skill",
"source": "api.validate",
"skill": {...},
"entrypoint": {...}
}
}
```
**Plugin Index**: Maps command names to plugin entries
```python
{
"skill/define": {
"name": "skill/define",
"handler": {...},
"permissions": [...]
}
}
```
### 4. Comparison Analysis
Performs four types of checks:
#### Missing Commands
Commands in registry but not in plugin.yaml:
```
- skill/create (active in registry, missing from plugin)
- api/validate (active in registry, missing from plugin)
```
#### Orphaned Commands
Commands in plugin.yaml but not in registry:
```
- old/deprecated (in plugin but not registered)
- test/removed (in plugin but removed from registry)
```
#### Metadata Mismatches
Commands present in both but with different metadata:
**Runtime Mismatch**:
```
- skill/define:
- Registry: python
- Plugin: node
```
**Permission Mismatch**:
```
- api/validate:
- Missing: filesystem:read
- Extra: network:write
```
**Handler Mismatch**:
```
- skill/create:
- Registry: skills/skill.create/skill_create.py
- Plugin: skills/skill.create/old_handler.py
```
**Description Mismatch**:
```
- agent/run:
- Registry: "Execute a Betty agent..."
- Plugin: "Run agent"
```
#### Missing Metadata Suggestions
Identifies registry entries missing recommended metadata:
```
- hook/define: Consider adding permissions metadata
- test/skill: Consider adding description
```
### 5. Preview Generation
Creates `plugin.preview.yaml` by:
- Taking all active commands from registries
- Converting to plugin.yaml format
- Including all metadata from registries
- Adding generation timestamp
- Preserving existing plugin metadata (author, license, etc.)
### 6. Report Generation
Creates `plugin_manifest_diff.md` with:
- Executive summary
- Lists of missing commands
- Lists of orphaned commands
- Detailed metadata issues
- Metadata suggestions
## Outputs
### Success Response
```json
{
"ok": true,
"status": "success",
"preview_path": "/home/user/betty/plugin.preview.yaml",
"report_path": "/home/user/betty/plugin_manifest_diff.md",
"reconciliation": {
"missing_commands": [...],
"orphaned_commands": [...],
"metadata_issues": [...],
"metadata_suggestions": [...],
"total_registry_commands": 19,
"total_plugin_commands": 18
}
}
```
### Console Output
```
============================================================
PLUGIN MANIFEST RECONCILIATION COMPLETE
============================================================
📊 Summary:
- Commands in registry: 19
- Commands in plugin.yaml: 18
- Missing from plugin.yaml: 2
- Orphaned in plugin.yaml: 1
- Metadata issues: 3
- Metadata suggestions: 2
📄 Output files:
- Preview: /home/user/betty/plugin.preview.yaml
- Diff report: /home/user/betty/plugin_manifest_diff.md
⚠️ 2 command(s) missing from plugin.yaml:
- registry/query (registry.query)
- hook/simulate (hook.simulate)
⚠️ 1 orphaned command(s) in plugin.yaml:
- old/deprecated
✅ Review plugin_manifest_diff.md for full details
============================================================
```
### Failure Response
```json
{
"ok": false,
"status": "failed",
"error": "Failed to parse JSON from registry/skills.json"
}
```
## Generated Files
### plugin.preview.yaml
Updated plugin manifest with all active registry commands:
```yaml
# Betty Framework - Claude Code Plugin (Preview)
# Generated by docs.sync.plugin_manifest skill
# Review changes before applying to plugin.yaml
name: betty-framework
version: 1.0.0
description: Betty Framework - Structured AI-assisted engineering
author:
name: RiskExec
email: [email protected]
url: https://github.com/epieczko/betty
license: MIT
metadata:
generated_at: "2025-10-23T20:00:00.000000+00:00"
generated_by: docs.sync.plugin_manifest skill
command_count: 19
commands:
- name: skill/define
description: Validate a Claude Code skill manifest
handler:
runtime: python
script: skills/skill.define/skill_define.py
parameters:
- name: manifest_path
type: string
required: true
description: Path to skill.yaml file
permissions:
- filesystem:read
- filesystem:write
# ... more commands ...
```
### plugin_manifest_diff.md
Detailed reconciliation report:
```markdown
# Plugin Manifest Reconciliation Report
Generated: 2025-10-23T20:00:00.000000+00:00
## Summary
- Total commands in registry: 19
- Total commands in plugin.yaml: 18
- Missing from plugin.yaml: 2
- Orphaned in plugin.yaml: 1
- Metadata issues: 3
- Metadata suggestions: 2
## Missing Commands (in registry but not in plugin.yaml)
- **registry/query** (skill: registry.query)
- **hook/simulate** (skill: hook.simulate)
## Orphaned Commands (in plugin.yaml but not in registry)
- **old/deprecated**
## Metadata Issues
- **skill/create**: Permissions Mismatch
- Missing: process:execute
- Extra: network:http
- **api/validate**: Handler Mismatch
- Registry: `skills/api.validate/api_validate.py`
- Plugin: `skills/api.validate/validator.py`
- **agent/run**: Runtime Mismatch
- Registry: `python`
- Plugin: `node`
## Metadata Suggestions
- **hook/define** (permissions): Consider adding permissions metadata
- **test/skill** (description): Consider adding description
```
## Examples
### Example 1: Routine Sync Check
**Scenario**: Regular validation after making registry changes
```baRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.