feat(skills): carry the changepacks skill and report what a .changepacks directory obliges - #69
Merged
Merged
Conversation
…cks directory obliges
Agents using devup-mcp open pull requests without a changepack log, and the
cause turns out to be documentation rather than the agent.
The invocation changepacks documents is the bare command, which opens an
interactive selection UI. In an agent shell, a CI job, or any non-TTY context
that hangs or is cancelled, so the step is skipped, the version never moves,
and the change reaches the base branch unreleased.
The non-interactive form already existed and was documented nowhere a reader
would find it while writing a pull request:
bunx @changepacks/cli --yes --update-type patch --message "..."
changepacks/changepacks#131 adds a consumer-facing SKILL.md that leads with it.
This vendors that document as an embedded skill, so `devup_skills install`
delivers it with no network. Apache-2.0 makes the redistribution fine; this is
the first carried skill from outside dev-five-git.
Detection is the other half, and the more important one. A skill only helps a
caller who installed and loaded it, while the pull request that lacks a
changepack comes from the caller who never thought to ask. `devup_skills` now
reports a `repoObligations.changepacks` block whenever the workspace has a
`.changepacks` directory:
- the non-interactive command, filled in
- why the bare one hangs, so the reader does not try it
- the tracked-path patterns read out of config.json rather than assumed,
because which paths need a changepack differs per repository
- the base branch and any changepack logs already pending on this branch
`instructions` already tells every session to call `devup_skills` before writing
devup-ui code, so this arrives without anyone asking for it.
Two tests had `dev-five-git` spelled into the provenance assertion and failed on
the first skill vendored from another organisation. They derive the repository
from the record now.
Verified by using it: this commit's own changepack was created with the exact
command the skill teaches, non-interactively, exit 0.
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.
Why
Agents using devup-mcp open pull requests without a changepack log. Investigating it, the cause turned out to be documentation, not the agent.
changepacks documents the bare command:
changepacks # "opens an interactive session to select changed projects and write release notes"In an agent shell, a CI job, or any non-TTY context, that hangs or is cancelled. So the step is skipped, the version never moves, and the change reaches the base branch unreleased.
The non-interactive form already existed, documented nowhere a reader would find it while writing a PR:
bunx @changepacks/cli --yes --update-type patch --message "..."Two halves
1. Carry the skill
changepacks/changepacks#131 adds a consumer-facing
SKILL.mdthat leads with the non-interactive form. This vendors it as anembeddedskill, sodevup_skills installdelivers it with no network.Apache-2.0 makes the redistribution fine. This is the first carried skill from outside
dev-five-git, which is what broke the two tests below.2. Report the obligation — the more important half
A skill only helps a caller who installed and loaded it. The PR that lacks a changepack comes from the caller who never thought to ask.
devup_skillsnow returns arepoObligations.changepacksblock whenever the workspace has a.changepacks/directory. Real output against this repository:{ "detected": "...\\devup-mcp\\.changepacks", "obligation": "A pull request that changes a tracked path must add a changepack log. Without one the version never moves, so the change reaches the base branch and is never released.", "createWith": "bunx @changepacks/cli --yes --update-type <major|minor|patch> --message \"<why this change exists>\"", "whyNotBare": "Running the tool with no flags opens an interactive selection UI, which hangs or is cancelled in a non-TTY shell...", "tracks": ["**", "!/crates/*/Cargo.toml"], "tracksNote": "Patterns from .changepacks/config.json. A leading `!` marks a tracked path... decided by this list, not by a general rule.", "baseBranch": "main", "pendingLogs": ["changepack_log_reset_css_needs_no_config.json"], "skill": "changepacks" }The tracked patterns are read from the config, never assumed — which paths need a changepack differs per repository (
["**", "!/crates/*/Cargo.toml"]here,["*", "!packages/*/*", ...]in devup-ui).instructionsalready tells every session to calldevup_skillsbefore writing devup-ui code, so this arrives without anyone asking for it. That is what makes it apply just by installing the MCP.Test fix
Two tests had
dev-five-gitspelled into the provenance assertion:They failed on the first skill vendored from another organisation. Both derive the repository from the record now, or assert the note's shape rather than an org.
Verification
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets --all-features -- -D warningscargo test -p devup-mcp --all-featuresnode scripts/refresh-skills.mjs --check= changepacks: unchanged at ec1f4b025ed7repoObligations.changepackspresent, config read correctlyThis PR's own changepack was created with the exact command the skill teaches, non-interactively, exit 0:
Its key was then aligned to this repo's convention (
crates/devup-mcp/Cargo.toml, matching every previous pack) and confirmed withupdate --dry-run:Release note
This Minor absorbs the pending
0.8.1patch (the reset-css correction from #67), so the next release is 0.9.0 rather than 0.8.1.