Skip to content

docs: define capability versions, consumer pins and rollback - #8

Merged
R0SEWT merged 3 commits into
mainfrom
docs/capability-versioning
Sep 27, 2026
Merged

R0SEWT merged 3 commits into
mainfrom
docs/capability-versioning

Conversation

@R0SEWT

@R0SEWT R0SEWT commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Why

Capabilities need reproducible revisions and a clear boundary between shared instructions and consumer-specific configuration.

Changes

  • docs/capability-versioning.md: manual release contract (SemVer rules, explicit managed files), exact consumer pins in a reviewed docs/capabilities.md inventory, compatibility rules, dependency review, evidence and rollback, and a promotion criterion before automating packaging.
  • docs/capability-versioning.md also ties capability releases to the version in .claude-plugin/plugin.json: the host keys its install cache on that field, so a release that ships through the plugin bumps it in the same PR.
  • README.md: short pointer section.

No installer or lockfile generator is implemented or claimed. Companion to #7; either merge order works.

Validation

  • git diff --check passes.
  • Applies cleanly on main (b9818bf) and merges with docs: add an agent workflow laboratory and experiment playbook #7 without conflicts.
  • Local Markdown links resolve.
  • CI steps run locally: shell syntax, JSON manifests and scaffold dry-run pass. ShellCheck is left to CI; no scripts change.
  • Documentation-only: no runtime or agent-host execution claimed.

Limits

The pilot has not run. This documents the versioning contract only.

🤖 Generated with Claude Code

Summary by Sourcery

Establish a manual, reproducible versioning and consumer-pinning contract for capabilities distributed through the plugin.

Enhancements:

  • Define a manual capability versioning contract covering SemVer compatibility, ownership boundaries, managed files, consumer pins, dependency review, validation evidence, and rollback.
  • Align plugin-distributed capability releases with the Claude Code plugin version and installed commit to ensure reproducible consumer revisions.
  • Add a promotion criterion for validating capability updates and rollback across multiple consumer repositories.

Documentation:

  • Add documentation describing capability release, pinning, upgrade, and rollback practices.
  • Add a README pointer to the capability versioning contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @R0SEWT, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 days and 17 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

This documentation-only PR establishes a manual, Git-revision-based contract for releasing capabilities, pinning exact consumer installations, reviewing dependencies and evidence, and safely upgrading or rolling back. README links to the contract while clearly scoping out installer, resolver, and lockfile automation.

Entity relationship diagram for capability consumer pins

erDiagram
    CONSUMER_REPOSITORY ||--o{ CAPABILITY_PIN : records
    CAPABILITY_PIN }o--|| CAPABILITY_RELEASE : resolves
    CAPABILITY_RELEASE }o--o{ CAPABILITY_RELEASE : depends_on
    CONSUMER_REPOSITORY {
        string repository
        string consumer_commit
    }
    CAPABILITY_PIN {
        string capability_id
        string declared_version
        string git_revision
        string installed_file_hashes
        string validation_evidence
    }
    CAPABILITY_RELEASE {
        string capability_id
        string semver
        string managed_file_paths
    }
Loading

Flow diagram for manual capability release and rollback

flowchart TD
    A["Candidate capability release"] --> B["Record SemVer contract and managed files"]
    B --> C["Review source, dependencies and validation"]
    C --> D["Pin exact Git revision in docs/capabilities.md"]
    D --> E["Update declared files in consumer repo"]
    E --> F["Run baseline, candidate and recovery cases"]
    F --> G["Submit files, inventory and evidence"]
    F --> H["Rollback previous file set and inventory"]
    H --> I["Run environment recovery and repeat checks"]
Loading

File-Level Changes

Change Details Files
Define a manual capability release contract covering artifact boundaries, ownership, SemVer compatibility, and release metadata.
  • Distinguish skills, playbooks, and runbooks while requiring explicit managed file sets.
  • Separate reusable capability content from consumer configuration and secrets.
  • Specify release fields, SemVer rules, prerelease handling, and 0.x compatibility expectations.
docs/capability-versioning.md
Establish reviewed consumer pinning and upgrade/rollback procedures based on immutable revisions and file-level evidence.
  • Require a human-reviewed capability inventory with exact versions, commit SHAs, installed paths, hashes, dependencies, configuration, and validation evidence.
  • Define dependency checks, staged updates, baseline/candidate/recovery validation, and coordinated rollback.
  • Set a two-consumer promotion criterion before packaging or lockfile automation.
docs/capability-versioning.md
Expose the new contract from the project documentation without implying implementation of an installer or resolver.
  • Add a README pointer describing manual per-repository capability versioning.
  • Explicitly note that package management and generated lockfiles are not implemented.
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread docs/capability-versioning.md Outdated
## Update and rollback

1. Review candidate release notes, source diff and changed dependencies.
2. In a lab worktree, compare installed hashes with the inventory. Stop if local

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 2 ("compare installed hashes with the inventory") and the required "Installed files: exact destination paths and file hashes" row (L79) contradict L65-67, which says plugin-loaded capabilities record version + commit "instead of hashes of copied files".

Every capability in this repo ships through the plugin, so under L65-67 no consumer inventory has hashes. Step 2 has nothing to compare, and the "required" table field can't be filled. A reviewer following the doc either blocks the update or skips the local-changes check the step exists for. Either make hashes optional for plugin-delivered capabilities and define the plugin equivalent of step 2 (for example, diff the cache dir against the recorded commit), or require hashes of the cache dir.

Automated review (Claude Code, AI-generated). Validate before acting.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0894c8d: the table row and step 2 now separate copied capabilities (hashes) from plugin-loaded ones (version + commit). The 0.x bump rule is now a one-level shift. (Claude Opus 5.5, on behalf of Rody)

The host installs it into a cache directory named after the `version` field of
`.claude-plugin/plugin.json` (for example
`~/.claude/plugins/cache/project-kit-local/project-kit/0.1.0/`) and records the
commit it installed. Changing files without changing that field can leave

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host's recorded install commit is taken as the immutable revision. With a directory marketplace (this repo's install method) it's the checkout's HEAD, while the cache is copied from the working tree.

If the main checkout has uncommitted edits at install time (PR #5 notes one, in .beads/issues.jsonl), the cache holds files that match no commit, yet the inventory records gitCommitSha as the "full immutable" revision. Rollback to that SHA doesn't reproduce what was loaded. Require a clean tree before install/bump, or record cache file hashes as well.

Automated review (Claude Code, AI-generated). Validate before acting.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 0894c8d: "install from a clean checkout", with the reason. (Claude Opus 5.5, on behalf of Rody)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@R0SEWT
R0SEWT merged commit 8eceabe into main Sep 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant