> For the complete documentation index, see [llms.txt](https://getsquish.gitbook.io/squish/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://getsquish.gitbook.io/squish/ja/rissu/contributing.md).

# コントリビューション

〜の短縮版 [`CONTRIBUTING.md`](https://github.com/getsquish/squish/blob/main/CONTRIBUTING.md) リポジトリ内にあります — PR を開く前にそのファイルを読んでください。このページは案内図です。

## 開発者向けクイックスタート

要件: Node ≥ 20 · `ffmpeg` + `ffprobe` PATH 上にあること。

```bash
npm install
npm run squish -- path/to/clip.mov --json   # CLI をソースから実行
npm run mcp                                  # MCP サーバーをソースから実行
npm test                                     # node:test スイート
npm run check                                # tsc --noEmit
npm run build                                # tsup → dist/
npm run e2e -- path/to/clip.mov              # 実サーバーに対する実際の MCP クライアント
```

## 3 行でわかるアーキテクチャ

* `src/engine.ts` は唯一のパイプラインです: probe → plan → extract → compose → write。
* `src/main.ts` (CLI + `mcp` サブコマンド) と `src/mcp.ts` はその上に載る薄いラッパーで、ロジックの分岐はありません。
* `src/core/` 純粋なプランナー（密度、サンプリング、グリッドレイアウト、タイムコード形式）を収めており、 [getsquish.app](https://getsquish.app) Web アプリ。

## コントラクトは固定されています

`squish-cli-v0` (CLI `--json` の出力) と `squish-mcp-v0` (MCP ツールの結果) は安定性コントラクトです: **追加変更のみ**; 破壊的変更があればコントラクト文字列が更新されます。利用側は `契約` この field をパースしてこれを検知します — PR ではその仕様を維持してください。サンプリング/タイムコード系の処理に手を入れる前に知っておくべき不変条件が 2 つあります:

* **タイムコードは、どのズーム深度でも元の動画に対する絶対値です** — ウィンドウ指定の実行でも再基準化されることはありません。
* アドレス可能な下限は **1 セルあたり 2 ms**; それより小さいウィンドウは、黙って生成されるのではなく、説明用エラーで拒否されます。

参照 [安定性とバージョニング](/squish/ja/rifarensu/stability.md) で完全なポリシーをご確認ください。

## 変更の流れ（ミラー優先）

公開リポジトリは、非公開 monorepo を厳選したミラーです。真実のソースは引き続きそちらで、Web アプリ、ホスト型 API、内部ドキュメントはそこにあります。実際には:

* **公開リポジトリでは Issues と PR を歓迎します。** メンテナーがそこでレビューし、採用された変更を upstream に取り込み、次のミラーで反映されます — 移植されたコミットでは著者クレジットは保持されます。
* ミラーは、何かを push する前にフルテストスイートとビルドを実行するスクリプトで組み立てられるため、 `main` 常にグリーンであるべきです。

## セキュリティ

脆弱性は非公開で次を通じて報告してください: [GitHub セキュリティアドバイザリ](https://github.com/getsquish/squish/security/advisories/new) — 公開 Issue では報告しないでください。対象範囲: CLI/MCP はシステム上で外部コマンドを呼び出します `ffmpeg`/`ffprobe`、そのため ffmpeg 自体のバグは upstream の範囲ですが、「Squish が敵対的入力を ffmpeg に安全でない形で渡す」は対象範囲です。ホスト型 API に関する報告も同じ窓口で受け付けています。完全なポリシー: [`SECURITY.md`](https://github.com/getsquish/squish/blob/main/SECURITY.md).

## ライセンス

Apache-2.0 と、 `NOTICE` ファイルです。貢献することで、あなたの貢献物がそのライセンスの下で提供されることに同意したものとみなされます。Squish の名称、ロゴ、マスコット、ブランド素材は留保されており、ライセンスの対象ではありません。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://getsquish.gitbook.io/squish/ja/rissu/contributing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
