From 4900b02712d0cdc0804e80ea941e3d3a13802622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauricio=20S=C3=A1nchez?= Date: Thu, 1 Oct 2026 23:00:54 -0500 Subject: [PATCH] fix: /upgrade carries the uncommitted plugin setting into the hub's worktree Choosing parallel-agents moves the upgrade into a worktree created from the last commit, so the plugin setting the install prompt left uncommitted in the main checkout stayed behind: the pull request added it again, and the main checkout's copy stopped the first pull after the merge. /upgrade now checks git status first, carries the setting into the worktree, restores the main checkout's copy, and lists both in the plan; other uncommitted work is the developer's to decide. The plugin-setting check tells committed, uncommitted, and missing apart. aplyca-framework 0.2.5. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 11 +++++++++ evals/static/check-skills.sh | 1 + .../.claude-plugin/plugin.json | 2 +- .../aplyca-framework/skills/upgrade/SKILL.md | 23 ++++++++++++++----- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a96d35..855622a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,17 @@ For each entry, **Upgrade impact** classifies the change against the [three-buck ## Unreleased +### `/upgrade` keeps the hub clean when it installs the dispatcher hub + +Choosing `parallel-agents` moves the upgrade into a worktree created from the last commit, so the +plugin setting the install prompt left uncommitted in the main checkout stayed behind: the pull +request added it again, and the main checkout's copy stopped the first pull after the merge. `/upgrade` +now checks `git status` before creating the worktree, carries the setting into it, and restores the +main checkout's copy, listing both in the plan; anything else uncommitted is the developer's to +decide. The plugin-setting check now tells committed, uncommitted, and missing apart +(`aplyca-framework` 0.2.5). +**Upgrade impact:** framework-internal; update the plugin. + ## 7383422 — 2026-10-01 — Parallel agents, test first in every lane, and adoption per project (`aplyca-framework` 0.2.4) Everything since `3eb7777`: portable parallel agents and `/handoff` diff --git a/evals/static/check-skills.sh b/evals/static/check-skills.sh index c376d56..07a3caf 100755 --- a/evals/static/check-skills.sh +++ b/evals/static/check-skills.sh @@ -614,6 +614,7 @@ check_practices() { file_contains "$HOOKS_DIR/config.sh" '^HUB_READONLY=' || missing+=("config.sh: HUB_READONLY") file_contains "$REPO_ROOT/plugins/aplyca-framework/skills/upgrade/SKILL.md" "Offer the modules the project doesn't have" || missing+=("/upgrade: offers missing modules") file_contains "$REPO_ROOT/plugins/aplyca-framework/skills/adopt/SKILL.md" '### A new project' || missing+=("/adopt: new-project mode") + file_contains "$REPO_ROOT/plugins/aplyca-framework/skills/upgrade/SKILL.md" "don't follow into the worktree" || missing+=("/upgrade: carries uncommitted changes into the hub's worktree") file_contains_literal "$REPO_ROOT/ADOPT.md" '--scope project' || missing+=("ADOPT.md: the agent entry point installs per project") file_contains_literal "$REPO_ROOT/README.md" '(ADOPT.md)' || missing+=("README.md: points agents to ADOPT.md") if [ ${#missing[@]} -eq 0 ]; then diff --git a/plugins/aplyca-framework/.claude-plugin/plugin.json b/plugins/aplyca-framework/.claude-plugin/plugin.json index 950cbd2..098de60 100644 --- a/plugins/aplyca-framework/.claude-plugin/plugin.json +++ b/plugins/aplyca-framework/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "aplyca-framework", "description": "Installer and upgrader for the Aplyca Agentic Development Framework. /adopt bootstraps a repository for agentic development — skeleton, optional modules (GitHub harness, git hooks, parallel-agent worktrees), guardrail hooks, verified facts; /upgrade syncs an adopted repository to a newer skeleton version; /cost-report shows what agent sessions on a project cost, from local transcripts. The framework itself ships as committed files in each repo (AGENTS.md standard, multi-tool); this plugin is the tooling that installs and maintains them.", - "version": "0.2.4", + "version": "0.2.5", "author": { "name": "Aplyca", "email": "dev@aplyca.com" diff --git a/plugins/aplyca-framework/skills/upgrade/SKILL.md b/plugins/aplyca-framework/skills/upgrade/SKILL.md index ac4d134..4fb78a2 100644 --- a/plugins/aplyca-framework/skills/upgrade/SKILL.md +++ b/plugins/aplyca-framework/skills/upgrade/SKILL.md @@ -68,12 +68,23 @@ Edit files under that path and run git with `-C `. Once the module is protect-hub hook stops edits in the main checkout, so the main checkout stays a clean hub from the first commit. -**Check where the plugin is turned on.** If `.claude/settings.json` has no -`"enabledPlugins": {"aplyca-framework@aplyca": true}` with its `aplyca` entry in -`extraKnownMarketplaces`, this session got the plugin from a user- or local-scope install. Offer to -add both entries in this upgrade (the snippet in the plugin's README § For teams), so the plugin is on -for this project and its team only — and in every worktree of a hub. After the merge, the developer -removes a user-scope copy with the commands in that README's § Install. +Uncommitted changes in the main checkout don't follow into the worktree. Check `git status` there +before creating it. The usual one is the plugin setting the install left in `.claude/settings.json`: +make the same change in the worktree, then restore the main checkout's copy +(`git restore .claude/settings.json`), so the hub starts clean and the first pull after the merge +doesn't stop on it. List both moves in the plan. Anything else uncommitted there is the developer's: +ask, and never discard it. + +**Check where the plugin is turned on.** The upgrade's pull request must leave +`"enabledPlugins": {"aplyca-framework@aplyca": true}`, with its `aplyca` entry in +`extraKnownMarketplaces`, committed in `.claude/settings.json`: + +- **Already committed:** nothing to do. +- **Uncommitted, left by the install:** commit it with this upgrade — in the worktree, for a hub. +- **Missing:** this session got the plugin from a user- or local-scope install. Offer to add both + entries in this upgrade (the snippet in the plugin's README § For teams), so the plugin is on for + this project and its team only — and in every worktree of a hub. After the merge, the developer + removes a user-scope copy with the commands in that README's § Install. ## Step 3 — Classify every changed file