Skip to content

feat(graph): add pre-rebuild-check Claude Code skill#1017

Open
stmcgovern wants to merge 3 commits intopython-wheel-build:mainfrom
stmcgovern:skill/pre-rebuild-check
Open

feat(graph): add pre-rebuild-check Claude Code skill#1017
stmcgovern wants to merge 3 commits intopython-wheel-build:mainfrom
stmcgovern:skill/pre-rebuild-check

Conversation

@stmcgovern
Copy link
Copy Markdown

Summary

  • Add .claude/commands/pre-rebuild-check.md — a Claude Code skill that runs fromager graph check, interprets the output, and recommends constraint fixes
  • Update .gitignore to allow .claude/commands/ while keeping other Claude state ignored

The skill guides the assistant to:

  • Run graph check against a build's graph.json
  • Present conflicts grouped by binding parent (highest leverage first)
  • Recommend specific actions (relax specifier, add constraint, upgrade parent)
  • Offer ready-to-paste constraints.txt output
  • Flag required conflicts as rebuild blockers

Depends on #999 (graph check command).

Closes: #1012

Add a skill that runs `fromager graph check`, interprets results,
and recommends constraint fixes grouped by leverage.

Closes: python-wheel-build#1012
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b408849d-cde0-49eb-9c90-1892a8768c4d

📥 Commits

Reviewing files that changed from the base of the PR and between 793408e and 7fedf3c.

📒 Files selected for processing (1)
  • .claude/commands/pre-rebuild-check.md
✅ Files skipped from review due to trivial changes (1)
  • .claude/commands/pre-rebuild-check.md

📝 Walkthrough

Walkthrough

Adds a new Claude Code skill document at .claude/commands/pre-rebuild-check.md that specifies an interactive workflow for analyzing a fromager build graph (graph.json), parsing CLI flags (--json, --constraints), and deterministically reporting three outcomes: all checks pass (one-line success, optional diff), structural failures (dangling edges/cycles; self-loops treated as warnings), and version conflicts (grouped by binding parent, classify each as “collapsible” vs “required”, provide recommendations and a constraints-generation flow). Also updates .gitignore to ignore .claude/* but keep .claude/commands/.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a Claude Code skill for pre-rebuild graph analysis.
Description check ✅ Passed The description is related to the changeset, explaining the new skill, its functionality, and the .gitignore update.
Linked Issues check ✅ Passed The PR satisfies issue #1012 requirements: creates the pre-rebuild-check.md skill, encodes the graph check workflow, distinguishes conflict types, identifies binding parents, and suggests constraint edits.
Out of Scope Changes check ✅ Passed All changes are in-scope: the new .claude/commands/pre-rebuild-check.md directly addresses the skill requirement, and .gitignore changes are necessary to include this file.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@stmcgovern stmcgovern marked this pull request as ready for review April 2, 2026 18:03
@stmcgovern stmcgovern requested a review from a team as a code owner April 2, 2026 18:03
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/commands/pre-rebuild-check.md:
- Line 41: The document contains an internal inconsistency between the
"Required" severity wording: one spot states "will fail" (and a header reads
"Required → blocker. write_constraints_file will fail") while another says "will
likely fail"; make the policy wording consistent by choosing one phrasing and
updating both occurrences: either change the stronger instance to "will likely
fail" or the weaker one to "will fail", and ensure the header/severity label
("Required → blocker") and the mention of write_constraints_file reflect the
chosen wording so all references are identical.
- Line 47: The "Constraints block" instruction is wrong — replace the
non-existent `graph check --constraints` flow with the implemented command
`fromager graph to_constraints <graph.json>` so users run `fromager graph
to_constraints <graph.json>` and paste that output into constraints.txt; update
the text under the "Constraints block" heading to reference `fromager graph
to_constraints`, `constraints.txt`, and describe that the command produces a
ready-to-paste constraints block.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c9d5908c-eba8-4149-b85d-cdf489822c11

📥 Commits

Reviewing files that changed from the base of the PR and between cd32d2e and 71771ab.

📒 Files selected for processing (2)
  • .claude/commands/pre-rebuild-check.md
  • .gitignore

Use "will likely fail" consistently for required conflicts.
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.

[RFE] Add Claude Code skill for pre-rebuild graph analysis

1 participant