fix(kyberforge): force plugin.json regeneration on every real sync

apm pack silently skips regenerating plugin.json when it already exists
("already exists; skipping plugin.json generation. Re-run with --force to
overwrite it."). sync-plugin-content.sh never passed --force, so
.claude-plugin/plugin.json and .github/plugin/plugin.json were written
once on first sync and never refreshed again -- a name/version/description
edit in a plugin's apm.yml would silently stop propagating, with no gate
catching it (check-manifests.sh only checks presence; check-plugin-content-
sync explicitly excludes plugin.json; apm-pack-check-clean is scoped to
marketplace.json only).

Pass --force on real-mode syncs only (--check must not mutate the plugin
root, so plugin.json staleness there stays a known, undetected gap until
the next real sync -- documented in the script's header comment).

Regenerating surfaced a second, unrelated bug: apm's writer and
pretty-format-json's --autofix disagree on JSON key order (semantic vs.
alphabetical), so every real sync would otherwise flip plugin.json's key
order right back after a commit re-alphabetized it. Excluded the four
apm-generated manifests (plugin.json x2, marketplace.json x2) from
pretty-format-json -- their exact formatting is dictated by apm's own
writer as compiled output, not this repo's generic JSON prettifier.

Verified idempotent: a second real sync after this fix produces zero
further diff.

Refs: #90
This commit is contained in:
2026-08-13 18:05:29 +00:00
parent 5f42f57106
commit b0936ad386
14 changed files with 82 additions and 72 deletions

View File

@@ -28,6 +28,7 @@ repos:
- id: pretty-format-json
stages: ['pre-commit']
args: [--autofix]
exclude: '(^|/)(\.claude-plugin/plugin\.json|\.github/plugin/plugin\.json|\.claude-plugin/marketplace\.json)$|^\.agents/plugins/marketplace\.json$'
- id: check-yaml
stages: ['pre-commit']
- id: trailing-whitespace

View File

@@ -1,10 +1,12 @@
{
"name": "bin",
"version": "1.1.1",
"description": "A place for things to be binned",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "A place for things to be binned",
"license": "MIT",
"mcpServers": {
"obsidian": {
@@ -15,7 +17,5 @@
"command": "npx",
"type": "stdio"
}
},
"name": "bin",
"version": "1.1.1"
}
}

View File

@@ -1,11 +1,11 @@
{
"name": "bin",
"version": "1.1.1",
"description": "A place for things to be binned",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "A place for things to be binned",
"license": "MIT",
"name": "bin",
"version": "1.1.1"
"license": "MIT"
}

View File

@@ -1,18 +1,18 @@
{
"name": "core",
"version": "1.1.0",
"description": "Cross-cutting utility skills for everyday AI-assisted coding \u2014 triage, diagnosis, architecture review, and session navigation.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Cross-cutting utility skills for everyday AI-assisted coding \u2014 triage, diagnosis, architecture review, and session navigation.",
"license": "MIT",
"keywords": [
"cross-cutting",
"triage",
"diagnose",
"architecture",
"debug"
],
"license": "MIT",
"name": "core",
"version": "1.1.0"
]
}

View File

@@ -1,18 +1,18 @@
{
"name": "core",
"version": "1.1.0",
"description": "Cross-cutting utility skills for everyday AI-assisted coding \u2014 triage, diagnosis, architecture review, and session navigation.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Cross-cutting utility skills for everyday AI-assisted coding \u2014 triage, diagnosis, architecture review, and session navigation.",
"license": "MIT",
"keywords": [
"cross-cutting",
"triage",
"diagnose",
"architecture",
"debug"
],
"license": "MIT",
"name": "core",
"version": "1.1.0"
]
}

View File

@@ -1,17 +1,17 @@
{
"name": "git",
"version": "1.3.2",
"description": "Skills for working with Git \u2014 conventional commits, branch management, pull requests, and feature flow.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills for working with Git \u2014 conventional commits, branch management, pull requests, and feature flow.",
"license": "MIT",
"keywords": [
"git",
"vcs",
"commit",
"branch"
],
"license": "MIT",
"name": "git",
"version": "1.3.2"
]
}

View File

@@ -1,17 +1,17 @@
{
"name": "git",
"version": "1.3.2",
"description": "Skills for working with Git \u2014 conventional commits, branch management, pull requests, and feature flow.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills for working with Git \u2014 conventional commits, branch management, pull requests, and feature flow.",
"license": "MIT",
"keywords": [
"git",
"vcs",
"commit",
"branch"
],
"license": "MIT",
"name": "git",
"version": "1.3.2"
]
}

View File

@@ -1,10 +1,13 @@
{
"name": "gitea",
"version": "1.3.3",
"description": "Skills for managing Gitea repositories \u2014 issues, pull requests, milestones, releases, and wikis.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills for managing Gitea repositories \u2014 issues, pull requests, milestones, releases, and wikis.",
"license": "MIT",
"keywords": [
"gitea",
"issues",
@@ -12,8 +15,5 @@
"milestones",
"releases",
"branches"
],
"license": "MIT",
"name": "gitea",
"version": "1.3.3"
]
}

View File

@@ -1,10 +1,13 @@
{
"name": "gitea",
"version": "1.3.3",
"description": "Skills for managing Gitea repositories \u2014 issues, pull requests, milestones, releases, and wikis.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills for managing Gitea repositories \u2014 issues, pull requests, milestones, releases, and wikis.",
"license": "MIT",
"keywords": [
"gitea",
"issues",
@@ -12,8 +15,5 @@
"milestones",
"releases",
"branches"
],
"license": "MIT",
"name": "gitea",
"version": "1.3.3"
]
}

View File

@@ -1,11 +1,11 @@
{
"name": "kyberforge",
"version": "1.4.0",
"description": "Skills and agents for creating, maintaining, and managing a Claude Code / Copilot CLI plugin marketplace.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills and agents for creating, maintaining, and managing a Claude Code / Copilot CLI plugin marketplace.",
"license": "MIT",
"name": "kyberforge",
"version": "1.4.0"
"license": "MIT"
}

View File

@@ -1,11 +1,11 @@
{
"name": "kyberforge",
"version": "1.4.0",
"description": "Skills and agents for creating, maintaining, and managing a Claude Code / Copilot CLI plugin marketplace.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills and agents for creating, maintaining, and managing a Claude Code / Copilot CLI plugin marketplace.",
"license": "MIT",
"name": "kyberforge",
"version": "1.4.0"
"license": "MIT"
}

View File

@@ -1,17 +1,17 @@
{
"name": "lint",
"version": "1.1.5",
"description": "Skills and agents for configuring and running linters.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills and agents for configuring and running linters.",
"license": "MIT",
"keywords": [
"lint",
"style",
"prose",
"linter"
],
"license": "MIT",
"name": "lint",
"version": "1.1.5"
]
}

View File

@@ -1,17 +1,17 @@
{
"name": "lint",
"version": "1.1.5",
"description": "Skills and agents for configuring and running linters.",
"author": {
"email": "defame1297@rkdr.net",
"name": "Defame1297",
"email": "defame1297@rkdr.net",
"url": "https://git.dev.rkdr.net/Defame1297/"
},
"description": "Skills and agents for configuring and running linters.",
"license": "MIT",
"keywords": [
"lint",
"style",
"prose",
"linter"
],
"license": "MIT",
"name": "lint",
"version": "1.1.5"
]
}

View File

@@ -15,9 +15,15 @@ set -euo pipefail
#
# plugin.json, apm.lock.yaml, and .mcp.json from the bundle are deliberately NOT
# copied: .claude-plugin/plugin.json + .github/plugin/plugin.json are already
# generated correctly by a separate apm code path (core/plugin_manifest.py, run as
# part of the same `apm pack` invocation), and .mcp.json is hand-authored at the
# plugin root per ADR-0015 (it is not an .apm/ primitive).
# generated in-place at the plugin root by a separate apm code path
# (core/plugin_manifest.py, run as part of the same `apm pack` invocation, keyed off
# cwd rather than -o), and .mcp.json is hand-authored at the plugin root per ADR-0015
# (it is not an .apm/ primitive). Real-mode syncs pass --force so that path actually
# refreshes both files from current apm.yml/.apm/ content -- apm pack silently skips
# regenerating an existing plugin.json otherwise ("already exists; skipping plugin.json
# generation"), which would let them go stale after a name/version/description edit.
# --check does NOT pass --force (it must not mutate the plugin root), so plugin.json
# staleness is not currently detected by --check -- only fixed by the next real sync.
#
# hooks.json is only synced when .apm/hooks/ actually produces one -- a plugin with
# no .apm/hooks/ content is left alone even if a root-level hooks.json already exists
@@ -126,7 +132,10 @@ sync_one() {
mkdir -p "$scratch"
pack_log="$(mktemp)"
if ! (cd "$plugin_dir" && apm pack --format plugin -o "$scratch") >"$pack_log" 2>&1; then
local force_flag=()
[[ "$CHECK" -eq 0 ]] && force_flag=(--force)
if ! (cd "$plugin_dir" && apm pack --format plugin "${force_flag[@]}" -o "$scratch") >"$pack_log" 2>&1; then
echo "FAIL $plugin_dir: apm pack failed:" >&2
sed 's/^/ /' "$pack_log" >&2
rm -f "$pack_log"