Repository navigation
ci: helper to move a branch onto the split claim, command and inventory files - #1351
Merged
Merged
Conversation
…ry files After #1342, #1344 and #1345 land, every open branch that touched claims.yaml, the CAPABILITIES.md command list or public-artifacts.json conflicts once with main. scripts/migrate_branch_to_split_files.py runs during that merge. It compares the branch with the merge base, writes the branch's claim and command changes to claims/<id>.yaml and docs/commands/<group>/<verb>.md, takes main's side only for conflict hunks inside the command list, and regenerates the report, the command list and the path-only inventory. It never overwrites a claim or command main also changed, and it does not commit. Co-Authored-By: Claude Opus 5.5 <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.
Why
After #1342, #1344 and #1345 land, every open branch that touched
claims.yaml, the CAPABILITIES.md command list orpublic-artifacts.jsonwill conflict withmainonce. This helper resolves that conflict in one command, so each such PR needs one push instead of a manual rework.Usage
What it does
It runs while the merge is still in progress and compares your branch with the merge base, so it moves only what your branch changed.
claims.yamlgoes topackages/flow/claims/<id>.yaml, keeping its wording and comments. It then removesclaims.yamland regeneratesdocs/VERIFICATION.mdanddocs/verification.json.packages/flow/docs/commands/<group>/<verb>.md. A parenthetical in the old list becomes the file's note, and a capability title it doesn't know gets a new group. For conflict hunks inside "Every command, by capability" only, it takesmain's side, then runsscripts/build_command_map.py. Conflicts in map rows or anywhere else are left for you.public-artifacts.jsonas the path-only list.mainalso changed; it lists those under "BY HAND".mainhas that format, so the script works whichever of the three PRs have landed.Verified
I ran a dry run in a scratch worktree, pushing nothing. "Future main" was #1344 (which includes #1342), #1345 and this PR, all on today's
main. I merged it into seven open PR branches and ran the helper.flow/deferred-check(#1297)claims/deferred-report-check.yamland03-run-and-answer/deferred.mdaddedflow/save-response-evidence(#1298)claims/server-response-evidence.yamladdedfeat/narration-rules(#1291)narration.mdaddedclaude/crystallize-from-prompt-89950e(#1277)compile-agent.mdaddedclaude/scoreboard-arm7(#1307)compile-agent.mdaddedclaude/pixel-identity-measure(#1340)claude/often-missed-oct19(#1341)Checks on each of the four branches with claim or command changes (#1297, #1298, #1291, #1277):
check_release_consistency.pypasses.tests/test_validate_claims.pyandtests/test_capabilities_map.pypass (31 passed).On #1307, #1340 and #1341, every line the branch added to CAPABILITIES.md is still present after the migration. The only exception is #1307's old one-line command group, which was converted to a command file as intended. The other three branches added no lines beyond their command group lines.
tests/test_migrate_split_files.pycovers the claim split, the old-list parser and the conflict-hunk rule (3 passed).Savings
One push per affected PR, instead of a manual conflict fix that is often followed by a second push when the first attempt misses a generated file. Each avoided push saves one full PR pipeline run (about 40 jobs). About 13 open PRs touch these files today.
No changes to
packages.yml,desktop-release.ymlormain.yml.🤖 Generated with Claude Code