docs: require takt review before submitting PRs
Rewrite CONTRIBUTING.md to require contributors to run takt -t "#<PR>" -w review and post the review summary as a PR comment. Add Japanese version at docs/CONTRIBUTING.ja.md.
This commit is contained in:
parent
b6cd71e79d
commit
52c5e29000
@ -1,62 +1,58 @@
|
|||||||
# Contributing to TAKT
|
# Contributing to TAKT
|
||||||
|
|
||||||
Thank you for your interest in contributing to TAKT!
|
🇯🇵 [日本語版](./docs/CONTRIBUTING.ja.md)
|
||||||
|
|
||||||
## About This Project
|
Thank you for your interest in contributing to TAKT! This project uses TAKT's review piece to verify PR quality before merging.
|
||||||
|
|
||||||
This project is developed using [TAKT](https://github.com/nrslib/takt). Please understand the following before contributing:
|
|
||||||
|
|
||||||
- **Small, focused changes are preferred** - Bug fixes, typo corrections, documentation improvements
|
|
||||||
- **Large PRs are difficult to review** - Especially AI-generated bulk changes without explanation
|
|
||||||
|
|
||||||
## How to Contribute
|
|
||||||
|
|
||||||
### Reporting Issues
|
|
||||||
|
|
||||||
1. Search existing issues first
|
|
||||||
2. Include reproduction steps
|
|
||||||
3. Include your environment (OS, Node version, etc.)
|
|
||||||
|
|
||||||
### Pull Requests
|
|
||||||
|
|
||||||
**Preferred:**
|
|
||||||
- Bug fixes with tests
|
|
||||||
- Documentation improvements
|
|
||||||
- Small, focused changes
|
|
||||||
- Typo corrections
|
|
||||||
|
|
||||||
**Difficult to review:**
|
|
||||||
- Large refactoring
|
|
||||||
- AI-generated bulk changes
|
|
||||||
- Feature additions without prior discussion
|
|
||||||
|
|
||||||
### Before Submitting a PR
|
|
||||||
|
|
||||||
1. Open an issue first to discuss the change
|
|
||||||
2. Keep changes small and focused
|
|
||||||
3. Include tests if applicable
|
|
||||||
4. Update documentation if needed
|
|
||||||
|
|
||||||
## Development Setup
|
## Development Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
|
||||||
git clone https://github.com/your-username/takt.git
|
git clone https://github.com/your-username/takt.git
|
||||||
cd takt
|
cd takt
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
# Build
|
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
# Run tests
|
|
||||||
npm test
|
npm test
|
||||||
|
|
||||||
# Lint
|
|
||||||
npm run lint
|
npm run lint
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How to Contribute
|
||||||
|
|
||||||
|
1. **Open an issue** to discuss the change before starting work
|
||||||
|
2. **Keep changes small and focused** — bug fixes, documentation improvements, typo corrections are welcome
|
||||||
|
3. **Include tests** for new behavior
|
||||||
|
4. **Run the review** before submitting (see below)
|
||||||
|
|
||||||
|
Large refactoring or feature additions without prior discussion are difficult to review and may be declined.
|
||||||
|
|
||||||
|
## Before Submitting a PR
|
||||||
|
|
||||||
|
All PRs must pass the TAKT review process. PRs without a review summary or with unresolved REJECT findings will not be merged.
|
||||||
|
|
||||||
|
### 1. Pass CI checks
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
npm run lint
|
||||||
|
npm test
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Run TAKT review
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create your PR first, then run review against it
|
||||||
|
takt -t "#<PR-number>" -w review
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Confirm APPROVE
|
||||||
|
|
||||||
|
Check the review summary in `.takt/runs/*/reports/review-summary.md`. If the result is **REJECT**, fix the reported issues and re-run the review until you get **APPROVE**.
|
||||||
|
|
||||||
|
If a REJECT finding cannot be resolved (e.g., false positive, intentional design decision), leave a comment on the PR explaining why it remains unresolved.
|
||||||
|
|
||||||
|
### 4. Include the review summary in your PR
|
||||||
|
|
||||||
|
Post the contents of `review-summary.md` as a comment on your PR. This is **required** — it lets maintainers verify that the review was run and passed.
|
||||||
|
|
||||||
## Code Style
|
## Code Style
|
||||||
|
|
||||||
- TypeScript strict mode
|
- TypeScript strict mode
|
||||||
|
|||||||
64
docs/CONTRIBUTING.ja.md
Normal file
64
docs/CONTRIBUTING.ja.md
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# TAKT への貢献
|
||||||
|
|
||||||
|
[English](../CONTRIBUTING.md)
|
||||||
|
|
||||||
|
TAKT への貢献に興味を持っていただきありがとうございます。このプロジェクトでは TAKT のレビューピースを使って PR の品質を確認しています。
|
||||||
|
|
||||||
|
## 開発環境のセットアップ
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/your-username/takt.git
|
||||||
|
cd takt
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
npm test
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
|
|
||||||
|
## 貢献の流れ
|
||||||
|
|
||||||
|
1. **Issue を起票** して変更内容を議論する
|
||||||
|
2. **小さく焦点を絞った変更** にする — バグ修正、ドキュメント改善、typo 修正を歓迎します
|
||||||
|
3. 新しい振る舞いには **テストを含める**
|
||||||
|
4. PR 提出前に **レビューを実行する**(下記参照)
|
||||||
|
|
||||||
|
事前議論なしの大規模リファクタリングや機能追加はレビューが困難なため、お断りする場合があります。
|
||||||
|
|
||||||
|
## PR 提出前の必須事項
|
||||||
|
|
||||||
|
すべての PR は TAKT レビュープロセスを通過する必要があります。レビューサマリーが添付されていない PR、または REJECT 指摘が未解消の PR はマージされません。
|
||||||
|
|
||||||
|
### 1. CI チェックをパスする
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm run build
|
||||||
|
npm run lint
|
||||||
|
npm test
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. TAKT レビューを実行する
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# PR を作成してからレビューを実行
|
||||||
|
takt -t "#<PR番号>" -w review
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. APPROVE を確認する
|
||||||
|
|
||||||
|
`.takt/runs/*/reports/review-summary.md` のレビューサマリーを確認してください。結果が **REJECT** の場合は、報告された問題を修正し、**APPROVE** になるまでレビューを再実行してください。
|
||||||
|
|
||||||
|
REJECT 指摘が解消不可能な場合(誤検知、意図的な設計判断など)は、その理由を PR のコメントに記載してください。
|
||||||
|
|
||||||
|
### 4. レビューサマリーを PR に含める
|
||||||
|
|
||||||
|
`review-summary.md` の内容を PR のコメントとして投稿してください。これは**必須**です。メンテナーがレビューの実行と通過を確認するために使用します。
|
||||||
|
|
||||||
|
## コードスタイル
|
||||||
|
|
||||||
|
- TypeScript strict mode
|
||||||
|
- ESLint によるリンティング
|
||||||
|
- 巧妙なコードより、シンプルで読みやすいコードを優先
|
||||||
|
|
||||||
|
## ライセンス
|
||||||
|
|
||||||
|
貢献いただいたコードは MIT ライセンスの下でライセンスされることに同意したものとみなされます。
|
||||||
Loading…
x
Reference in New Issue
Block a user