From b0936ad38687017ccee91b01717aaf187eddea32 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Thu, 13 Aug 2026 18:05:29 +0000 Subject: [PATCH] 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 --- .pre-commit-config.yaml | 1 + plugins/bin/.claude-plugin/plugin.json | 10 +++++----- plugins/bin/.github/plugin/plugin.json | 10 +++++----- plugins/core/.claude-plugin/plugin.json | 12 ++++++------ plugins/core/.github/plugin/plugin.json | 12 ++++++------ plugins/git/.claude-plugin/plugin.json | 12 ++++++------ plugins/git/.github/plugin/plugin.json | 12 ++++++------ plugins/gitea/.claude-plugin/plugin.json | 12 ++++++------ plugins/gitea/.github/plugin/plugin.json | 12 ++++++------ plugins/kyberforge/.claude-plugin/plugin.json | 10 +++++----- plugins/kyberforge/.github/plugin/plugin.json | 10 +++++----- plugins/lint/.claude-plugin/plugin.json | 12 ++++++------ plugins/lint/.github/plugin/plugin.json | 12 ++++++------ scripts/sync-plugin-content.sh | 17 +++++++++++++---- 14 files changed, 82 insertions(+), 72 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2aff4bb..a1f8045 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/plugins/bin/.claude-plugin/plugin.json b/plugins/bin/.claude-plugin/plugin.json index de968f4..d7921d7 100644 --- a/plugins/bin/.claude-plugin/plugin.json +++ b/plugins/bin/.claude-plugin/plugin.json @@ -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" + } } diff --git a/plugins/bin/.github/plugin/plugin.json b/plugins/bin/.github/plugin/plugin.json index 68f36e6..06a4a86 100644 --- a/plugins/bin/.github/plugin/plugin.json +++ b/plugins/bin/.github/plugin/plugin.json @@ -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" } diff --git a/plugins/core/.claude-plugin/plugin.json b/plugins/core/.claude-plugin/plugin.json index 9da39d1..ce78fbd 100644 --- a/plugins/core/.claude-plugin/plugin.json +++ b/plugins/core/.claude-plugin/plugin.json @@ -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" + ] } diff --git a/plugins/core/.github/plugin/plugin.json b/plugins/core/.github/plugin/plugin.json index 9da39d1..ce78fbd 100644 --- a/plugins/core/.github/plugin/plugin.json +++ b/plugins/core/.github/plugin/plugin.json @@ -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" + ] } diff --git a/plugins/git/.claude-plugin/plugin.json b/plugins/git/.claude-plugin/plugin.json index 4275c2a..cc2b8a7 100644 --- a/plugins/git/.claude-plugin/plugin.json +++ b/plugins/git/.claude-plugin/plugin.json @@ -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" + ] } diff --git a/plugins/git/.github/plugin/plugin.json b/plugins/git/.github/plugin/plugin.json index 4275c2a..cc2b8a7 100644 --- a/plugins/git/.github/plugin/plugin.json +++ b/plugins/git/.github/plugin/plugin.json @@ -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" + ] } diff --git a/plugins/gitea/.claude-plugin/plugin.json b/plugins/gitea/.claude-plugin/plugin.json index 2ce281c..a9b935c 100644 --- a/plugins/gitea/.claude-plugin/plugin.json +++ b/plugins/gitea/.claude-plugin/plugin.json @@ -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" + ] } diff --git a/plugins/gitea/.github/plugin/plugin.json b/plugins/gitea/.github/plugin/plugin.json index 2ce281c..a9b935c 100644 --- a/plugins/gitea/.github/plugin/plugin.json +++ b/plugins/gitea/.github/plugin/plugin.json @@ -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" + ] } diff --git a/plugins/kyberforge/.claude-plugin/plugin.json b/plugins/kyberforge/.claude-plugin/plugin.json index d1351c6..567f231 100644 --- a/plugins/kyberforge/.claude-plugin/plugin.json +++ b/plugins/kyberforge/.claude-plugin/plugin.json @@ -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" } diff --git a/plugins/kyberforge/.github/plugin/plugin.json b/plugins/kyberforge/.github/plugin/plugin.json index d1351c6..567f231 100644 --- a/plugins/kyberforge/.github/plugin/plugin.json +++ b/plugins/kyberforge/.github/plugin/plugin.json @@ -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" } diff --git a/plugins/lint/.claude-plugin/plugin.json b/plugins/lint/.claude-plugin/plugin.json index cb1ee7f..be7d599 100644 --- a/plugins/lint/.claude-plugin/plugin.json +++ b/plugins/lint/.claude-plugin/plugin.json @@ -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" + ] } diff --git a/plugins/lint/.github/plugin/plugin.json b/plugins/lint/.github/plugin/plugin.json index cb1ee7f..be7d599 100644 --- a/plugins/lint/.github/plugin/plugin.json +++ b/plugins/lint/.github/plugin/plugin.json @@ -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" + ] } diff --git a/scripts/sync-plugin-content.sh b/scripts/sync-plugin-content.sh index 433656d..aad8a54 100755 --- a/scripts/sync-plugin-content.sh +++ b/scripts/sync-plugin-content.sh @@ -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"