Enhance plugin resolution and drift detection mechanisms#15
Merged
Conversation
Replaces the inline find/sort/sed one-liner with a dedicated script that reads plugin.json (authoritative), validates name == "sdd", and uses semver-aware version sorting with pre-release awareness. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename APPFOLIO_SPECKIT_PLUGIN_ROOT to CLAUDE_PLUGIN_ROOT to align with Claude Code plugin conventions. Switch hook instructions from cat to the Read tool so the output enters conversation context rather than shell output. Wire common.md to resolve-plugin-root.sh and add explicit guidance to bind the resolved path in context once, then reuse. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eturn step Remove the Step 1 cat of .specify/extensions.yml from all before-hooks — the lifecycle machinery already enforces hook ordering, reading the manifest inside each hook is redundant context bloat. Add a Final Step: Return section to each hook telling Claude to hand off silently rather than narrate what it resolved. Apply the CLAUDE_PLUGIN_ROOT rename and Read tool directive consistently with the rest of the extension. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The hook changes in this PR depend on CLI behavior that will ship in 0.6.1.6. Once that release is tagged from af-main, users running older CLIs will be prompted to upgrade. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reflect the env var rename in the hook architecture description and point the dev setup instructions at resolve-plugin-root.sh instead of the inline find/sort/sed command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ersion Print FORCE_UPGRADE_VERSION (0.0.0) from `specify-af version` when the repo schema (init-options.json speckit_version) is behind the CLI, or when the installed sdd plugin's minimum_cli_version exceeds the CLI. The deployed check-version.sh sorts 0.0.0 below its MINIMUM, fires VERSION_FAIL, and common.md surfaces the re-init prompt. Also warns on every invocation (except init) when the project's installed AF extension init_schema differs from the CLI-bundled value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…NIMUM Rewrite check-version.sh to check two drift axes: - CLI vs sdd plugin's minimum_cli_version (VERSION_FAIL) - repo schema (init-options.json speckit_version) vs CLI (SCHEMA_STALE) MINIMUM is now read dynamically from plugin.json rather than hardcoded. common.md handles both VERSION_FAIL and SCHEMA_STALE with a unified re-init prompt showing the relevant version values. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request standardizes environment variable and path references from
APPFOLIO_SPECKIT_PLUGIN_ROOTtoCLAUDE_PLUGIN_ROOTthroughout the documentation and extension hook scripts. It also introduces new documentation on version and schema drift detection, and clarifies when to bump theinit_schemaversion. Additionally, it updates test instructions and documents the removal of certain git commit hooks.Key changes include:
Environment variable and path standardization:
APPFOLIO_SPECKIT_PLUGIN_ROOTwithCLAUDE_PLUGIN_ROOTin extension hook markdown files and documentation to reflect the new environment variable and path convention. This affects hook dispatch logic and user instructions across multiple files, ensuring consistency and clarity for plugin root resolution. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Schema and version drift detection:
init_schemastaleness warning and version drift detection mechanisms, including when and how to bump theinit_schemainteger inextension.ymland how the CLI handles mismatches to prompt users for re-initialization. [1] [2]Test and hook documentation updates:
Plugin root resolution improvement:
General documentation improvements:
FORK.mdand related files to guide contributors on extension management, hook architecture, and integration processes. [1] [2]These changes collectively improve maintainability, user experience, and documentation clarity for the extension and its integration workflow.## Description
Testing
uv run specify --helpuv sync && uv run pytestAI Disclosure