# Contributing to gaji

Thank you for your interest in contributing to gaji! This guide will help you get started.

gaji에 기여해 주셔서 감사합니다! 이 가이드가 시작하는 데 도움이 되길 바랍니다.

## Code of Conduct

Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md) before participating.

참여하기 전에 [행동 강령](CODE_OF_CONDUCT.md)을 읽고 따라 주세요.

## Bug Reports

Before reporting a bug, please search [existing issues](https://github.com/dodok8/gaji/issues) to check if it has already been reported.

When filing a bug report, please include:

- gaji version (`gaji --version`)
- Operating system and architecture
- Installation method (npm, cargo, binary)
- Steps to reproduce
- Expected vs. actual behavior
- Relevant workflow file (if applicable)

You can use the [bug report template](https://github.com/dodok8/gaji/issues/new?template=bug_report.yml) for convenience.

## Feature Requests

Before requesting a feature, please search [existing issues](https://github.com/dodok8/gaji/issues) to avoid duplicates.

A good feature request includes:

- The problem or motivation
- A proposed solution
- Example usage (TypeScript workflow code if applicable)

You can use the [feature request template](https://github.com/dodok8/gaji/issues/new?template=feature_request.yml).

## Pull Requests

### License

All contributions are licensed under the [MIT License](LICENSE).

### Development Setup

**Prerequisites:**

- Rust (stable toolchain)
- [mise](https://mise.jdx.dev/) (recommended for managing Deno and Node.js)

```bash
# Clone the repository
git clone https://github.com/dodok8/gaji.git
cd gaji

# Install dev tools via mise (optional but recommended)
mise trust && mise install

# Build the project
cargo build

# Run tests
cargo test --all-features
```

### Before Submitting

All pull requests must pass the following CI checks:

```bash
# Run tests
cargo test --all-features

# Lint
cargo clippy --all-targets --all-features -- -D warnings

# Format check
cargo fmt --all --check
```

Run all three before pushing to avoid CI failures.

### AI Tool Disclosure

If you used AI tools (e.g., GitHub Copilot, Claude, ChatGPT) to generate code, please mention it in the PR description.

AI 도구(GitHub Copilot, Claude, ChatGPT 등)를 사용하여 코드를 생성한 경우, PR 설명에 명시해 주세요.

### Bug Fixes

1. Open an issue describing the bug (if one doesn't exist).
2. Create a branch from `main`.
3. Include:
   - A test that demonstrates the bug
   - The fix itself
4. Reference the issue number in your PR (e.g., `Fixes #123`).

### Feature Implementation

1. Open an issue to discuss the feature first.
2. Create a branch from `main`.
3. Include:
   - Tests for the new functionality
   - The implementation
   - Updated documentation (if applicable)
4. Reference the issue number in your PR.

### Commit Messages

Follow conventional commit style:

```
feat: add shell completion support
fix: handle empty workflow directory gracefully
docs: update CLI reference
chore: bump oxc dependencies
```

The project uses [release-plz](https://release-plz.ieni.dev/) for automated releases, which relies on conventional commits to generate changelogs.

## Project Structure

See [CLAUDE.md](CLAUDE.md) for a detailed overview of the codebase architecture, module layout, and common development workflows.

프로젝트 구조와 아키텍처에 대한 자세한 내용은 [CLAUDE.md](CLAUDE.md)를 참고하세요.

## Files to Never Edit Manually

- `.github/workflows/*.yml` — generated by gaji from `workflows/*.ts`
- `.github/actions/` — generated action definitions
- `generated/` — auto-generated type definitions
- `.gaji-cache.json` — auto-managed cache
- `npm/platform-*/bin/` — populated by CI release process

These files are auto-generated. Edit the source files instead (e.g., `workflows/*.ts` for CI workflows).

## Questions?

If you have questions, feel free to open a [GitHub Issue](https://github.com/dodok8/gaji/issues). There are no bad questions!

질문이 있으면 [GitHub Issue](https://github.com/dodok8/gaji/issues)를 열어 주세요.
