Repository navigation
feat(shared-lib): define the PR Requirements section rules once for skills and wbfy to render - #1316
Conversation
…kills to render Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request centralizes the logic and rules governing the 'Requirements' section of pull request templates. By moving these definitions into the shared library, it eliminates the risk of rule drift across various agentic workflows and review tools, ensuring consistent behavior when drafting or validating PR bodies. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Rules once scattered, now in one place, Giving the codebase a cleaner face. No more drifting, no more doubt, Shared-lib knows what it's all about. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request extracts the PR template's Requirements section rules into a new export PULL_REQUEST_REQUIREMENTS_RULES in @willbooster/shared-lib and updates the expected repository rules documentation accordingly. Feedback on this PR highlights that packages/wbfy/src/generators/agents.ts was not updated to consume this new export, leaving duplicated rules hardcoded there and defeating the goal of having a single source of truth.
…instructions Co-authored-by: WillBooster (Claude Code) <agent@willbooster.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request centralizes the rules for filling and preserving the PR template's Requirements section by introducing a shared constant PULL_REQUEST_REQUIREMENTS_RULES in @willbooster/shared-lib. The agent instruction generator in wbfy and the repository rules documentation are updated to use this shared constant. The feedback recommends importing PULL_REQUEST_REQUIREMENTS_RULES from the public entry point @willbooster/shared-lib instead of bypassing it with a direct path import to @willbooster/shared-lib/src.
| import fs from 'node:fs'; | ||
| import path from 'node:path'; | ||
|
|
||
| import { PULL_REQUEST_REQUIREMENTS_RULES } from '@willbooster/shared-lib/src'; |
There was a problem hiding this comment.
Importing directly from @willbooster/shared-lib/src bypasses the package's public entry point and can cause issues with module resolution, bundling, or duplicate module instances. Since PULL_REQUEST_REQUIREMENTS_RULES is exported from the package's main entry point (packages/shared-lib/src/index.ts), you should import it directly from @willbooster/shared-lib.
| import { PULL_REQUEST_REQUIREMENTS_RULES } from '@willbooster/shared-lib/src'; | |
| import { PULL_REQUEST_REQUIREMENTS_RULES } from '@willbooster/shared-lib'; |
There was a problem hiding this comment.
@willbooster/shared-lib/src is a declared export of the package, and it is how every import of shared-lib in wbfy is written (see packages/wbfy/src/github/template.ts and its comment): this workspace consumer uses the sources so that wbfy runs without building shared-lib first. Importing from the built entry point here would diverge from the package's other imports and require a build step.
Why
The rules for filling and preserving the PR template's Requirements section were restated by hand in the open-pr and update-pr skills of agentic-workflows, in the review-booster skill, and in the agent instructions wbfy generates, and the copies had drifted (what to write when no request is recorded, whether a section that merely describes the diff counts as a record, whether to mention an unmet
requiredline in Notes).docs/expected-repository-rules.mdrequires tools to consume shared-lib's template definitions instead of copying them, but no export carried these rules.Requirements
@willbooster/shared-libas the single source consumed by wbfy and the skillsCustomer Summary
Generated AGENTS.md files gain the full Requirements section rules as sub-bullets of the PR template instruction on the next wbfy run. Skills in agentic-workflows and review-booster will render the same rules from this export instead of their own wording.
Technical Summary
PULL_REQUEST_REQUIREMENTS_RULESinpackages/shared-lib/src/githubTemplates.tsholds the rules as markdown bullets: how lines are taken from the requester's instructions and markedrequiredorchosen, the record rule for an existing section, where the section goes when a template lacks the heading, and that arequiredline is never dropped or weakened. It is exported from the package index.packages/wbfy/src/generators/agents.tsrenders it (indented as sub-bullets) into the generated agent instructions in place of its own summary of the rules, importing from@willbooster/shared-lib/srclike the package's other shared-lib imports. The rules doc names the new export.Testing
bun run verify(install, lint, typecheck) passes. No test added: the change is a constant string, its export, and its interpolation into a generated file.