Repository navigation
docs: add PR template, title conventions, and prepare-pr workflow #793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
17e8f38
Add PR template and prepare-pr workflow
jeanduplessis efb71fe
Add AGENTS.md with PR template instructions for AI agents
kilo-code-bot[bot] 00a8517
Add PR title conventions, draft PR rules, and title validation workflow
kilo-code-bot[bot] 23b9e40
chore(ci): remove pr-title validation workflow
jeanduplessis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <!-- PR title format: type(scope): description — e.g., feat(auth): add SSO login --> | ||
| <!-- Keep the title under 72 characters, use imperative mood, no trailing period. --> | ||
|
|
||
| ## Summary | ||
|
|
||
| <!-- What changed and why? Keep this brief and outcome-focused. --> | ||
| <!-- Include any architectural changes and enough context for a reviewer unfamiliar with this code area. --> | ||
|
|
||
| ## Verification | ||
|
|
||
| <!-- List the checks you ran and what passed. Add command output notes when useful. --> | ||
|
|
||
| - [ ] | ||
|
|
||
| ## Visual Changes | ||
|
|
||
| <!-- If UI/visual behavior changed, add before/after screenshots in the table below. --> | ||
| <!-- If there are no visual changes, replace the table with: N/A --> | ||
|
|
||
| | Before | After | | ||
| | ------ | ----- | | ||
| | | | | ||
|
|
||
| ## Reviewer Notes | ||
|
|
||
| <!-- Optional: reviewer focus areas, edge cases, or context that helps review quickly. --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Prepare PR | ||
|
|
||
| Prepare a pull request description using this repository's PR template and then create or update the PR. | ||
|
|
||
| ## Required source of truth | ||
|
|
||
| - Read and use `/.github/pull_request_template.md` from this repository. | ||
| - Preserve section headings and order exactly as they appear in the template. | ||
| - Do not add sections that are not present in the template. | ||
|
|
||
| ## PR title | ||
|
|
||
| - Use the format `type(scope): <description>` (e.g., `feat(auth): add SSO login`). | ||
| - Common types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `ci`, `style`, `perf`. | ||
| - Keep the title under 72 characters, use imperative mood, and do not end with a period. | ||
|
|
||
| ## Build the PR description | ||
|
|
||
| 1. Collect branch context. | ||
| - Run git commands to understand all changes that will be included in the PR. | ||
| - Include all commits since branch divergence, not just the latest commit. | ||
|
|
||
| 2. Prefill `## Summary`. | ||
| - Describe what changed and why. | ||
| - Explicitly call out any architectural changes. | ||
| - Include enough context for a reviewer unfamiliar with this code area. | ||
| - Keep it concise and reviewer-friendly. | ||
|
|
||
| 3. Prefill `## Verification` from this session. | ||
| - Capture verification already performed in this session (tests, typecheck, lint, builds, manual checks). | ||
| - Include command names and short pass/fail outcomes when available. | ||
| - Add a final placeholder bullet for extra user-provided verification details. | ||
|
|
||
| 4. Prepare `## Visual Changes`. | ||
| - Detect likely visual/UI changes from changed files (for example: `*.tsx`, `*.jsx`, CSS, Tailwind config, component/page/view files). | ||
| - If visual/UI changes are likely, keep the before/after screenshot table and add meaningful row labels/placeholders. | ||
| - If no visual/UI changes are likely, replace the section content with `N/A`. | ||
|
|
||
| 5. Prefill `## Reviewer Notes`. | ||
| - Add concise context that helps reviewer efficiency (risk areas, tricky logic, rollout notes). | ||
| - Keep this section brief. | ||
|
|
||
| ## Confirm with the user | ||
|
|
||
| - Print the full generated PR description in markdown. | ||
| - Ask for confirmation and any edits. | ||
| - Apply edits and show the final version before writing it to GitHub. | ||
|
|
||
| ## Create or update PR | ||
|
|
||
| 1. Check whether a PR already exists for the current branch. | ||
| 2. If a PR exists, update the PR body using `gh pr edit --body`. | ||
| 3. If a PR does not exist, create it as a **draft** using `gh pr create --draft` with the generated title and body. | ||
| 4. Return the PR URL. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # AGENTS.md | ||
|
|
||
| ## Pull Request Titles | ||
|
|
||
| - Use the format: `type(scope): <description>` | ||
| - Common types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `ci`, `style`, `perf` | ||
| - Scope is optional but encouraged (e.g., `feat(auth): add SSO login`) | ||
| - Use imperative mood (e.g., "Add feature", not "Added feature"). | ||
| - Keep titles under 72 characters. | ||
| - Do not end the title with a period. | ||
|
|
||
| ## Draft PRs | ||
|
|
||
| When creating a pull request, **always create it as a draft** (`gh pr create --draft`). Let the author mark it ready for review. | ||
|
|
||
| ## Pull Request Descriptions | ||
|
|
||
| When creating or updating a pull request, you **must** follow the PR template in `.github/pull_request_template.md`. Every PR description must include these four sections in order: | ||
|
|
||
| ### `## Summary` | ||
|
|
||
| - Describe what changed and why. Be outcome-focused. | ||
| - Call out architectural changes explicitly. | ||
| - Include enough context for a reviewer unfamiliar with this code area. | ||
| - Keep it concise. Do not pad with generic filler. | ||
|
|
||
| ### `## Verification` | ||
|
|
||
| - List the checks you actually ran during development (tests, typecheck, lint, build, manual checks). | ||
| - Include command names and pass/fail outcomes where available. | ||
| - **Do not fabricate verification steps.** Only list testing you actually performed. Reviewers rely on this section to assess risk — dishonest verification is worse than none. | ||
|
|
||
| ### `## Visual Changes` | ||
|
|
||
| - If UI or visual behavior changed, include a before/after screenshot table. | ||
| - If there are no visual changes, replace the section content with `N/A`. | ||
|
|
||
| ### `## Reviewer Notes` | ||
|
|
||
| - Add concise context that helps reviewer efficiency: risk areas, tricky logic, rollout notes, or edge cases. | ||
| - If there is nothing noteworthy, keep this section brief or write `N/A`. | ||
|
|
||
| ### General rules | ||
|
|
||
| - Preserve section headings and order exactly as they appear in the template. | ||
| - Do not add sections that are not in the template. | ||
| - Do not leave HTML comments from the template in the final description — replace them with actual content. | ||
| - PR descriptions must be accurate and valuable to reviewers. Generic or boilerplate descriptions waste reviewer time. | ||
| - Review all commits on the branch (not just the latest) when writing the summary. | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a strong resistance against this line, can we remove it? Draft PR's are subject to personal preference and should be no 'always'.