From 42155850b6952d02bd0d4f6ba90c75ca6477eeca Mon Sep 17 00:00:00 2001 From: Ryunosuke MURAMATSU Date: Thu, 19 Jun 2025 19:50:06 +0900 Subject: [PATCH 1/4] Claude PR Assistant workflow --- .github/workflows/claude.yml | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/claude.yml diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml new file mode 100644 index 0000000..58d0fa2 --- /dev/null +++ b/.github/workflows/claude.yml @@ -0,0 +1,59 @@ +name: Claude Code + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned] + pull_request_review: + types: [submitted] + +jobs: + claude: + if: | + (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || + (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code + id: claude + uses: anthropics/claude-code-action@beta + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + + # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) + # model: "claude-opus-4-20250514" + + # Optional: Customize the trigger phrase (default: @claude) + # trigger_phrase: "/claude" + + # Optional: Trigger when specific user is assigned to an issue + # assignee_trigger: "claude-bot" + + # Optional: Allow Claude to run specific commands + # allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" + + # Optional: Add custom instructions for Claude to customize its behavior for your project + # custom_instructions: | + # Follow our coding standards + # Ensure all new code has tests + # Use TypeScript for new files + + # Optional: Custom environment variables for Claude + # claude_env: | + # NODE_ENV: test + From a282121b4b50db89bf362be2f1c71297a82c0ae0 Mon Sep 17 00:00:00 2001 From: Ryunosuke MURAMATSU Date: Thu, 19 Jun 2025 19:50:07 +0900 Subject: [PATCH 2/4] Claude Code Review workflow --- .github/workflows/claude-code-review.yml | 75 ++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/claude-code-review.yml diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml new file mode 100644 index 0000000..ecd27d0 --- /dev/null +++ b/.github/workflows/claude-code-review.yml @@ -0,0 +1,75 @@ +name: Claude Code Review + +on: + pull_request: + types: [opened, synchronize] + # Optional: Only run on specific file changes + # paths: + # - "src/**/*.ts" + # - "src/**/*.tsx" + # - "src/**/*.js" + # - "src/**/*.jsx" + +jobs: + claude-review: + # Optional: Filter by PR author + # if: | + # github.event.pull_request.user.login == 'external-contributor' || + # github.event.pull_request.user.login == 'new-developer' || + # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + issues: read + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Claude Code Review + id: claude-review + uses: anthropics/claude-code-action@beta + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + + # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) + # model: "claude-opus-4-20250514" + + # Direct prompt for automated review (no @claude mention needed) + direct_prompt: | + Please review this pull request and provide feedback on: + - Code quality and best practices + - Potential bugs or issues + - Performance considerations + - Security concerns + - Test coverage + + Be constructive and helpful in your feedback. + + # Optional: Customize review based on file types + # direct_prompt: | + # Review this PR focusing on: + # - For TypeScript files: Type safety and proper interface usage + # - For API endpoints: Security, input validation, and error handling + # - For React components: Performance, accessibility, and best practices + # - For tests: Coverage, edge cases, and test quality + + # Optional: Different prompts for different authors + # direct_prompt: | + # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && + # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || + # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} + + # Optional: Add specific tools for running tests or linting + # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" + + # Optional: Skip review for certain conditions + # if: | + # !contains(github.event.pull_request.title, '[skip-review]') && + # !contains(github.event.pull_request.title, '[WIP]') + From 2c4bb0154a947c6abb30b2c4f81dfacd2b3c7a62 Mon Sep 17 00:00:00 2001 From: Ryunosuke Muramatsu Date: Fri, 20 Jun 2025 08:09:15 +0900 Subject: [PATCH 3/4] docs: add CLAUDE.md --- CLAUDE.md | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..5e1d51f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,99 @@ +# CLAUDE.md + +## 概要 + +このプロジェクトは Altive Handbook - Hugo と Docsy テーマで構築された会社のドキュメントサイトです。 + +このハンドブックは、公開可能なすべての会社全体の情報の Single Source of Truth (SSOT) として機能します。日本語コンテンツ(`content/ja/`)を対象とし、会社のポリシー、エンジニアリングプラクティス、オンボーディング、ジョブファミリー等を網羅する包括的なドキュメントシステムとして構造化されています。 + +### 主要コンポーネント + +- **Hugo Static Site Generator**: 多言語サポート(主に日本語)でサイトを動作させる +- **Docsy テーマ**: UI フレームワークを提供する Google のドキュメントテーマ +- **コンテンツ構造**: 階層的なドキュメントセクションで `content/ja/` 配下に整理 +- **デプロイ**: GitHub Actions により main ブランチプッシュ時に GitHub Pages へ自動デプロイ + +### コンテンツ構成 + +ハンドブックは以下の主要セクションに整理されています: +- `company/`: 会社のポリシー、価値観、ミッション、福利厚生 +- `engineering/`: 開発プラクティス、コードルール、Flutter/Git ガイドライン +- `onboarding/`: 新入社員向けガイドと手順 +- `job-families/`: 役職定義とキャリア進路 +- `communication/`: 会議プロトコルとコミュニケーションガイドライン +- `handbook/`: ハンドブック自体に関するメタドキュメント + +## 開発コマンド + +### 初期セットアップ +```bash +# Hugo をインストール(必須) +brew install hugo + +# Go をインストール(Hugo モジュールに必須) +brew install go + +# npm の依存関係をインストール +npm install +``` + +### 開発サーバー +```bash +# ライブリロード付きで開発サーバーを起動 +hugo server + +# ドラフトコンテンツを含める +hugo server -D + +# 変更されたファイルに自動ナビゲート +hugo server --navigateToChanged +``` + +### コンテンツ作成 +```bash +# 新しいコンテンツページを作成 +hugo new content directory/page-name.md +``` + +### ビルドコマンド +```bash +# 開発用にビルド +npm run build + +# 本番用にビルド +npm run build:production + +# ビルド成果物をクリーン +npm run clean +``` + +### テスト +```bash +# リンクチェックを実行(ビルド後) +npm test +``` + +## コンテンツガイドライン + +### Front Matter フォーマット +一貫性のため YAML front matter を使用(TOML や JSON ではなく): + +```yaml +--- +title: "ページタイトル" # 必須 +description: "ページの説明" # 推奨 +linkTitle: "短いタイトル" # オプション +slug: "カスタム-url-スラッグ" # オプション +--- +``` + +### 言語とローカライゼーション +- 主要言語: 日本語(`ja`) +- コンテンツは `content/ja/` に配置 +- Hugo は CJK 言語サポートで設定済み +- すべてのコンテンツに「なぜ」を明確に含める + +### デプロイ +- main ブランチプッシュ時に GitHub Actions による自動デプロイ +- 本番サイト: https://handbook.altive.co.jp +- プレビュー用の Netlify デプロイもサポート From 46841c4fb66e6ba311234d5d67c09dfa097ab040 Mon Sep 17 00:00:00 2001 From: Ryunosuke Muramatsu Date: Fri, 20 Jun 2025 10:14:40 +0900 Subject: [PATCH 4/4] feat: add timeout_minutes --- .cspell/framework-words.txt | 1 + .github/workflows/claude.yml | 1 + .vscode/settings.json | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 .cspell/framework-words.txt diff --git a/.cspell/framework-words.txt b/.cspell/framework-words.txt new file mode 100644 index 0000000..5576197 --- /dev/null +++ b/.cspell/framework-words.txt @@ -0,0 +1 @@ +anthropics diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 58d0fa2..5e740ec 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -34,6 +34,7 @@ jobs: uses: anthropics/claude-code-action@beta with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + timeout_minutes: "30" # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # model: "claude-opus-4-20250514" diff --git a/.vscode/settings.json b/.vscode/settings.json index f7798a9..364432a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,6 +8,13 @@ "addWords": true, "scope": "workspace" }, + "framework-words": { + "name": "framework-words", + "path": "${workspaceRoot}/.cspell/framework-words.txt", + "description": "Framework Specific Words", + "addWords": true, + "scope": "workspace" + }, "organization-words": { "name": "organization-words", "path": "${workspaceRoot}/.cspell/organization-words.txt", @@ -48,5 +55,13 @@ "**/bower_components": true, "**/*.code-search": true, "public": true + }, + "workbench.colorCustomizations": { + "titleBar.activeBackground": "#EEEEEE", + "titleBar.activeForeground": "#333333", + "titleBar.inactiveBackground": "#CCCCCC", + "titleBar.inactiveForeground": "#666666", + "statusBar.debuggingBackground": "#FFFFFF", + "statusBar.debuggingForeground": "#000000" } } \ No newline at end of file