diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yml b/.github/ISSUE_TEMPLATE/1-bug-report.yml index d38aab205..45b15e1b4 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yml @@ -13,6 +13,8 @@ body: Please try to include as much information as possible. + If you plan to submit a fix: link this issue in your PR. Small, reproducible bugs can go straight to a PR; for broader or uncertain fixes, wait for maintainer feedback first. + - type: input id: version attributes: diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yml b/.github/ISSUE_TEMPLATE/2-feature-request.yml index cbc055334..bd1a04e44 100644 --- a/.github/ISSUE_TEMPLATE/2-feature-request.yml +++ b/.github/ISSUE_TEMPLATE/2-feature-request.yml @@ -11,6 +11,7 @@ body: Before you submit a feature: 1. Search existing issues for similar features. If you find one, 👍 it rather than opening a new one. 2. The Kimi Code team will try to balance the varying needs of the community when prioritizing or rejecting new features. Please understand that not all features will be accepted. + 3. Do not open a feature PR until maintainers have had a chance to respond here. PRs without prior discussion may be closed without review. - type: textarea id: feature diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 020e01f04..940000f70 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,25 +1,28 @@ ## Related Issue - + Resolve #(issue_number) -## Description +## Problem - + + +## What changed + + ## Checklist - [ ] I have read the [CONTRIBUTING](https://github.com/MoonshotAI/kimi-code/blob/main/CONTRIBUTING.md) document. -- [ ] I have linked the related issue, if any. -- [ ] I have added tests that prove my fix is effective or that my feature works. +- [ ] I have linked a related issue, or explained the problem above. +- [ ] I have added tests that prove my feature works. - [ ] Ran `gen-changesets` skill, or this PR needs no changeset. - [ ] Ran `gen-docs` skill, or this PR needs no doc update. diff --git a/AGENTS.md b/AGENTS.md index ddb2cea34..3c344585c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,6 +55,8 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - Prefer `rg` / `rg --files` when reading code. - When designing changes, follow existing boundaries and local patterns first. - When creating a PR, the PR title must follow Conventional Commit style, e.g. `chore: remove legacy format commands`. +- When an AI agent opens or updates a PR, fill in `.github/pull_request_template.md` — link the related issue or explain the problem, then describe what changed. Do not leave placeholder text or submit a generic summary of the diff. +- Do not submit vague AI-generated PR text. The human author must understand the change well enough to explain the code, edge cases, and why the approach fits this repository. - After finishing a task and before submitting a PR, you must run the `gen-changesets` skill (see `.agents/skills/gen-changesets/SKILL.md`) and generate a changeset under `.changeset/` according to its rules. - When generating a changeset, **never** decide on a `major` bump on your own. When you judge a change to meet the major criteria (breaking changes, incompatible user configuration, renamed or removed commands/arguments, changed behavior semantics, etc.), you must stop and explain it to the user and ask for confirmation. **Only write `major` after the user has explicitly agreed.** Otherwise default to `minor` (and fall back to `patch` if `minor` is unclear). See the "Hard rule: confirm with the user before writing `major`" section in `.agents/skills/gen-changesets/SKILL.md` for details. - Prefer importing via `import ... from '#/...'`, which serves the same purpose as `import ... from '@/...'`. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ac49526de..87173d926 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,24 @@ Thanks for taking the time to contribute! This project moves quickly, and though ## Before You Start -- Open an issue or discussion before making changes larger than ~100 lines so we can align on direction early. -- We only merge PRs that are aligned with the roadmap — drive-by refactors without context are unlikely to land. -- Code quality bar: as good as code written by a strong human engineer or a competent coding agent. We hold AI-assisted contributions to the same standard as hand-written ones. +Kimi Code already has opinions on CLI/TUI behavior, agent workflows, and public APIs. If your change shifts that direction, open an issue first so we can align before you invest time in a PR. + +We hold AI-assisted contributions to the same standard as hand-written ones. **You should understand what you submit** — what changed, how it behaves at the edges, and why it fits this codebase. If you cannot explain that, the PR is not ready for review. + +We only merge PRs aligned with the roadmap. Drive-by refactors without context are unlikely to land. + +**Discuss first** — open an issue before coding. PRs without prior discussion may be closed without review: + +- New features or user-visible behavior changes (regardless of size) +- Refactors or other changes larger than ~100 lines +- Public API or compatibility changes +- Bug fixes where the cause or fix approach is still unclear + +**Can open a PR directly** — link an existing issue when there is one: + +- Clear, reproducible bug fixes with a focused diff +- Typos, documentation-only changes, and small CI/build fixes +- Small changes that clearly match an existing issue or maintainer request ## Project Layout @@ -65,20 +80,13 @@ This repo uses [changesets](https://github.com/changesets/changesets) to manage - Every PR that affects release artifacts (code, behavior, public API) **must** include a changeset. - Docs-only, test-only, or CI-only PRs may skip changesets. - Generate one with `pnpm changeset` and follow the prompts (which packages are touched, which bump level). -- For repo-specific conventions, see `.changeset/README.md`. +- For repo-specific conventions on package selection and bump levels, see `.changeset/README.md`. When working in this repo with coding agents, use the `gen-changesets` skill. -## Pull Request Checklist +## Pull Requests -Before requesting review, make sure your PR ticks the following: +Use the [PR template](.github/pull_request_template.md) when opening a feature pull request. -- [ ] Linked an issue (for non-trivial changes) -- [ ] PR title follows Conventional Commits -- [ ] Added or updated tests -- [ ] Added a changeset if the PR affects release artifacts -- [ ] Ran `pnpm lint && pnpm typecheck && pnpm test` locally -- [ ] Updated user-facing docs in `docs/` if behavior changed - -The `.github/pull_request_template.md` checklist is a shorter subset of this — both must pass. +PR titles must follow [Conventional Commits](#commit-convention); CI runs `pnpm lint`, `pnpm typecheck`, and `pnpm test` on every PR. Update user-facing docs in `docs/` when behavior changes — use the `gen-docs` skill when working with coding agents. ## Code Style