プロジェクトの意図・方針を JSON 形式で構造化管理するスキル。AI エージェントとのコンテキスト共有を最適化し、並列開発やコンテキストスイッチ時の混乱を防ぐ。セッションの開始、終了前、ユーザー入力で開発の方向性・局面が変わった時点、一定量のタスクを終えた時点、「プロジェクトの Intent を設定して」「project.json を作成して」「brief.json を更新して」などのリクエスト時に使用。
/plugin marketplace add hiroshi75/ccplugins/plugin install hiroshi75-project-intent-plugin-project-intent-plugin@hiroshi75/ccpluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/project-intent-guide.mdreferences/templates/brief.jsonreferences/templates/project.jsonscripts/init-brief.shscripts/init-project-intent.shscripts/load-context.shプロジェクトや worktree の意図・方針を JSON 形式で構造化管理し、AI エージェントとのコンテキスト共有を最適化する。
特定ファイル名(.intent/project.json / .intent/brief.json)が指定されない限りは両方のファイルを更新してください。ただし、project.json はプロジェクト全体の方針を示すものなのでそうそう大きくは変わりません。その場合は編集せず、brief.json のみを更新してください。
Claude Code を使って開発を進める際、以下の問題が発生しやすい:
これらは 「何を正しいとみなしていたか」 という上位コンテキストが失われることが原因である。
Issue や Task は「何をするか」を管理するが、失われやすいのは以下の情報:
| ファイル | 役割 | commit | 更新頻度 |
|---|---|---|---|
.intent/project.json | プロジェクト全体の憲法 | ✅ する | 基本不変 |
.intent/brief.json | worktree ごとの思考メモ | ❌ しない | 随時 |
プロジェクト全体で共有される不変的な方針を JSON で記述する。
| キー | 型 | 説明 |
|---|---|---|
schemaVersion | string | スキーマバージョン(例: "1.0") |
type | "project" | 固定値 |
id | string | プロジェクトの一意識別子 |
name | string | プロジェクト名 |
intent | string | プロジェクトの狙い・目指す姿(最大 200 文字) |
| キー | 型 | 説明 |
|---|---|---|
summary | string | 短い要約(最大 120 文字、UI 表示用) |
successCriteria | string[] | 成功条件(客観的な基準) |
guardrails | string[] | 守るべき制約 |
nonGoals | string[] | プロジェクト全体でやらないこと |
technicalStack | string[] | 使用する技術スタック |
keyDecisions | object[] | 重要な意思決定の履歴(date, text) |
{
"schemaVersion": "1.0",
"type": "project",
"id": "proj-parallel-dev-001",
"name": "Parallel Development Platform",
"intent": "複数の Claude が同時並行で開発タスクを進行できる環境を提供し、開発速度を最大化しながらコンフリクトを最小化する。",
"summary": "並列開発環境の構築",
"successCriteria": [
"3つ以上のタスクを同時並行で進行できる",
"タスク間のコンフリクト率が 10% 以下"
],
"guardrails": [
"マージ前に必ずテストを実行する",
"全タスクで同じコーディング規約を使用する"
],
"nonGoals": ["リアルタイム協調編集機能は提供しない", "IDE 統合は対象外"],
"technicalStack": ["Python 3.11+", "FastAPI"],
"keyDecisions": [
{
"date": "2024-01-15",
"text": "worktree ベースの並列開発方式を採用(コンフリクト最小化のため)"
}
]
}
テンプレート: references/templates/project.json
各 worktree の一時的な作業方針を JSON で記述する。
| キー | 型 | 説明 |
|---|---|---|
schemaVersion | string | スキーマバージョン(例: "1.0") |
type | "worktree" | 固定値 |
mode | enum | explore / converge / maintain |
| キー | 型 | 説明 |
|---|---|---|
worktree | object | worktree 情報(name, branch) |
purpose | string | この枝の目的(最大 200 文字) |
statusLine | string | 現在の状況(最大 120 文字、UI 表示用) |
focus | string[] | いま注目している軸 |
nonGoals | string[] | この枝ではやらないこと |
nextBet | string | 次に試して意思決定する一手 |
exitCriteria | string[] | いつ終わるか |
decisionsLog | object[] | この worktree での意思決定履歴(date, text) |
discardedOptions | string[] | 捨てた選択肢 |
notes | string | メモ・気づき |
updatedAt | string | 最終更新日時(ISO 8601 形式) |
| 値 | 説明 |
|---|---|
explore | 複数の選択肢を試行錯誤している段階 |
converge | 方向性が決まり、実装を詰めている段階 |
maintain | 既存機能の修正・改善 |
テンプレート: references/templates/brief.json
# .intent ディレクトリを作成
mkdir -p .intent
# スクリプトを使用
bash scripts/init-project-intent.sh
# または手動でテンプレートをコピー
cp templates/project.json .intent/project.json
# Worktree thinking / intent
.intent/brief.json
worktrees/**/.intent/brief.json
cd worktrees/task-name
mkdir -p .intent
# スクリプトを使用
bash ../../scripts/init-brief.sh "task-name"
# または手動でテンプレートをコピー
cp ../../templates/brief.json .intent/brief.json
各 worktree で作業を開始する際、必ず以下を Claude に指示する:
この worktree の .intent/brief.json と、プロジェクトの .intent/project.json を読み、
mode / focus / nonGoals / nextBet を最初に要約してから作業を開始してください。
または、スクリプトを使用:
bash scripts/load-context.sh
decisionsLog に追加discardedOptions に追加focus を更新mode を更新nextBet を更新brief.json で記録した判断のうち、プロジェクト全体に影響する重要な決定は project.json に昇格させる:
# brief.json から重要な決定を抽出
# → project.json の "keyDecisions" に追記
# → commit する
notes.md に記載This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.