| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 0 | 6 | 5 | 0% |
| Commands | 0 | 19 | 0 | 0% |
| Section tags | 4 | 1 | 3 | 50% |
What each file covers
Sections
0 shared · 6 only in A · 5 only in B- − CLAUDE.md
- − テストガイドライン
- − 階層別の詳細指示(path-specificルール)
- − Docker統合テスト
- − Firebase Emulator
- − Codex 実行ポリシー
- + Development Guidelines
- + Basic Rules
- + Security
- + Confidential Files
- + Workflow
Commands
0 shared · 19 only in A · 0 only in B- − npm run dev
- − npm run build
- − npm start
- − npm run lint
- − npm run prettier
- − npm run format
- − npm run test
- − npm run test:run
- − npm run test:coverage
- − npm run test:ui
- − npm run test:e2e
- − npm run test:e2e:ui
- − npm run docker:test
- − npm run docker:test:run
- − npm run docker:test:down
- − npm run docker:e2e:run
- − npm run emulator:start
- − npm run emulator:test
- − npm run msw:init
Section tags
4 shared · 1 only in A · 3 only in B- − build
- + security
- + ui
- + do-not
- test
- lint-format
- testing-strategy
- agent-behaviour
Line diff
sakatai11/todoApp-next · .claude/CLAUDE.md
@@ −1 @@
1# CLAUDE.md
2
3This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
5## 必ず日本語で回答してください
6
7## 横断的ルール(自動読み込み)
8
9以下の`.claude/rules/`配下のルールが全て自動的に適用されます:
10
11- **コード品質**: @.claude/rules/code-quality.md
12- **セキュリティ**: @.claude/rules/security.md
13- **開発フロー**: @.claude/rules/development.md
14
15## 階層別の詳細指示(path-specificルール)
16
17作業ディレクトリに応じて、以下のpath-specificルールが自動的に適用されます:
18
19| ルールファイル | 適用パス | 主な内容 |
20| -------------------------- | -------------------------------------------------- | ------------------------------------------------------------- |
21| @.claude/rules/app.md | `app/**/*.{ts,tsx}` | App Router開発、API開発、認証ミドルウェア、エラーハンドリング |
22| @.claude/rules/features.md | `features/**/*.{ts,tsx}` | Shared機能、Todo機能、状態管理、カスタムフック |
23| @.claude/rules/testing.md | `tests/**/*.{ts,tsx}`, `**/*.{test,spec}.{ts,tsx}` | テスト戦略、環境設定、データ一貫性 |
24
25## プロジェクト概要
26
27これは、App Routerとフィーチャーベースアーキテクチャを使用したNext.js 16のtodoアプリケーションです。
28
29### 開発コマンド
30
31```bash
32# 開発
33npm run dev # Turbopackで開発サーバーを起動
34npm run build # クリーンビルド(.nextディレクトリ削除+ビルド)
35npm start # 本番サーバーを起動
36
37# コード品質
38npm run lint # ESLintを自動修正で実行
39npm run prettier # Prettierでコードをフォーマット
40npm run format # prettierとlintの両方を実行
41
42# テスト
43npm run test # テスト(watch mode)
44npm run test:run # テスト一回実行
45npm run test:coverage # カバレッジ付きテスト実行
46npm run test:ui # Vitest UIモードでテスト実行
47npm run test:e2e # Playwright E2Eテスト
48npm run test:e2e:ui # Playwright UIモードでE2Eテスト
49
50# Docker統合テスト
51npm run docker:test # Firebase Emulator環境起動
52npm run docker:test:run # 統合テスト実行(Firebase Emulator + tsx)
53npm run docker:test:down # Docker環境停止
54npm run docker:e2e:run # E2Eテスト実行
55
56# Firebase Emulator
57npm run emulator:start # 開発用Firebase Emulator起動
58npm run emulator:test # テスト用Firebase Emulator起動
59
60# モック
61npm run msw:init # Mock Service Workerを初期化
62```
63
64### 現在の技術スタック
65
66- **フレームワーク**: Next.js 16(App Router + Turbopack)
67- **認証**: NextAuth.js v5(beta)- カスタム認証プロバイダー
68- **バックエンド**: Firebase Admin SDK(Firestore + Auth)
69- **UI**: Material-UI(MUI)+ Tailwind CSS
70- **状態管理**: React Context + データ取得用SWR
71- **ドラッグ&ドロップ**: @dnd-kit/core(タスクの並び替え用)
72- **バリデーション**: Zodスキーマ
73- **テスト**: Vitest + React Testing Library + MSW
74- **モック**: MSW(Mock Service Worker)
75
76### アーキテクチャ概要
77
78- **ディレクトリ構造**: フィーチャーベース設計(`features/`内で機能自己完結)
79- **ルーティング**: Next.js App Router + ルートグループ`()`による整理
80- **API構造**: 管理者用`(admin)/`、一般用`(general)/`、認証用`auth/`に分離
81- **詳細構造**: [@todoApp-submodule/docs/PRODUCTS.md](../todoApp-submodule/docs/PRODUCTS.md#プロジェクト構造)参照
82
83### 重要なプロジェクト注意事項
84
85- **本番環境ではTypeScriptビルドエラーを無視(`ignoreBuildErrors: true`)**
86 - **理由**: 開発時にエディタのリアルタイム型チェックと`tsconfig.json`の厳密な設定で型安全性を確保済み。本番ビルド時の型チェックをスキップすることでビルド速度を向上させるため。
87- **開発時のAPIモック用MSWを使用**
88 - **理由**: ユニットテスト時にFirebase Emulatorを起動せずに高速なテスト実行を実現するため。
89- **キャッシュ制御ヘッダー付きのVercelデプロイ設定**
90 - **理由**: 静的アセットの効率的なキャッシュ配信と、動的コンテンツの適切な更新を両立するため。
91
92## 開発パターン
93
94- 新しい機能は`features/`内で自己完結させる(共通は`features/shared/`)
95- **Admin API**: `app/api/(admin)/`、**General API**: `app/api/(general)/`、**Auth API**: `app/api/auth/`
96- 新規APIでZodバリデーション推奨(既存APIは`trimAllSpaces` + 手動チェックの場合あり)
97- 詳細: [@.claude/rules/app.md](rules/app.md) / [@.claude/rules/features.md](rules/features.md)
98
99## テストガイドライン
100
101- **UTカバレッジ**: 100%達成済み(493テスト)
102- **統合テスト**: Docker + Firebase Emulator(ポート3002/4000/8080/9099)
103- **詳細ガイド**: [@.claude/rules/testing.md](rules/testing.md)参照
104
105## Codex 実行ポリシー
106
107- `/codex:review` は常にバックグラウンドで実行する(`--background` フラグを自動付与)
108- `/codex:rescue` はタスクの複雑さに応じて自動判断する(フラグ省略で自動選択)
109
sakatai11/todoApp-next · .clinerules/development-guidelines.md
@@ +1 @@
1# Development Guidelines
2
3## Basic Rules
4
5- Follow Instructions
6 - Execute tasks as per defined requirements
7 - Report progress or issues proactively
8
9- Autonomous Problem Solving
10 - Analyze and propose solutions when errors or problems occur
11 - Clearly state recommended options if multiple approaches exist
12 - Report issues that might be outside of the code
13
14- Respect Existing Code
15 - Follow existing code style and patterns
16 - Explain if major changes are necessary
17
18- Handling Repeated Failures
19 - If a test fails twice in a row, summarize the situation with reproduction steps, logs, and error messages, and report it
20 - Do not repeat the same action — always propose a solution
21
22## Security
23
24### Confidential Files
25
26Do not read or modify the following under any circumstances
27
28- .env file
29- Any file containing API keys, tokens, or credentials
30
31If changes to confidential files are necessary, contact the project owner.
32
33Also follow these security practices:
34
35- Never commit confidential files
36- Use environment variables for secrets
37- Avoid logging sensitive data (auth/user info)
38
39## Workflow
40
41Follow these four steps during development:
42
431. Requirements (PM Mode)
44 - Clarify and refine requirements
45 - Ask questions or make suggestions if needed
46
472. Design (Architect Mode)
48 - Choose appropriate architecture or design patterns
49 - Design components, data flows, and use case diagrams
50
513. Implementation (Code Mode)
52 - Write code based on the design
53 - Create unit tests
54 - Must be executable via Vitest
55 - 100% test coverage required for:
56 - statements
57 - branches
58 - functions
59 - lines
60 - Each function/component should be tested with mocked external dependencies
61
624. Quality Check (PMO Mode)
63 - Code Review
64 - Lint/format checks (ESLint / Prettier)
65 - Validate user input properly
66 - Consider performance and security
67 - Requirement Verification
68
69AI should make autonomous decisions to progress through these steps and deliver complete results in a single request whenever possible.
70
@@ −1 +1 @@
1−# CLAUDE.md
1+# Development Guidelines
22
3−This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3+## Basic Rules
44
5−## 必ず日本語で回答してください
5+- Follow Instructions
6+ - Execute tasks as per defined requirements
7+ - Report progress or issues proactively
68
7−## 横断的ルール(自動読み込み)
9+- Autonomous Problem Solving
10+ - Analyze and propose solutions when errors or problems occur
11+ - Clearly state recommended options if multiple approaches exist
12+ - Report issues that might be outside of the code
813
9−以下の`.claude/rules/`配下のルールが全て自動的に適用されます:
14+- Respect Existing Code
15+ - Follow existing code style and patterns
16+ - Explain if major changes are necessary
1017
11−- **コード品質**: @.claude/rules/code-quality.md
12−- **セキュリティ**: @.claude/rules/security.md
13−- **開発フロー**: @.claude/rules/development.md
18+- Handling Repeated Failures
19+ - If a test fails twice in a row, summarize the situation with reproduction steps, logs, and error messages, and report it
20+ - Do not repeat the same action — always propose a solution
1421
15−## 階層別の詳細指示(path-specificルール)
22+## Security
1623
17−作業ディレクトリに応じて、以下のpath-specificルールが自動的に適用されます:
24+### Confidential Files
1825
19−| ルールファイル | 適用パス | 主な内容 |
20−| -------------------------- | -------------------------------------------------- | ------------------------------------------------------------- |
21−| @.claude/rules/app.md | `app/**/*.{ts,tsx}` | App Router開発、API開発、認証ミドルウェア、エラーハンドリング |
22−| @.claude/rules/features.md | `features/**/*.{ts,tsx}` | Shared機能、Todo機能、状態管理、カスタムフック |
23−| @.claude/rules/testing.md | `tests/**/*.{ts,tsx}`, `**/*.{test,spec}.{ts,tsx}` | テスト戦略、環境設定、データ一貫性 |
26+Do not read or modify the following under any circumstances
2427
25−## プロジェクト概要
28+- .env file
29+- Any file containing API keys, tokens, or credentials
2630
27−これは、App Routerとフィーチャーベースアーキテクチャを使用したNext.js 16のtodoアプリケーションです。
31+If changes to confidential files are necessary, contact the project owner.
2832
29−### 開発コマンド
33+Also follow these security practices:
3034
31−```bash
32−# 開発
33−npm run dev # Turbopackで開発サーバーを起動
34−npm run build # クリーンビルド(.nextディレクトリ削除+ビルド)
35−npm start # 本番サーバーを起動
35+- Never commit confidential files
36+- Use environment variables for secrets
37+- Avoid logging sensitive data (auth/user info)
3638
37−# コード品質
38−npm run lint # ESLintを自動修正で実行
39−npm run prettier # Prettierでコードをフォーマット
40−npm run format # prettierとlintの両方を実行
39+## Workflow
4140
42−# テスト
43−npm run test # テスト(watch mode)
44−npm run test:run # テスト一回実行
45−npm run test:coverage # カバレッジ付きテスト実行
46−npm run test:ui # Vitest UIモードでテスト実行
47−npm run test:e2e # Playwright E2Eテスト
48−npm run test:e2e:ui # Playwright UIモードでE2Eテスト
41+Follow these four steps during development:
4942
50−# Docker統合テスト
51−npm run docker:test # Firebase Emulator環境起動
52−npm run docker:test:run # 統合テスト実行(Firebase Emulator + tsx)
53−npm run docker:test:down # Docker環境停止
54−npm run docker:e2e:run # E2Eテスト実行
43+1. Requirements (PM Mode)
44+ - Clarify and refine requirements
45+ - Ask questions or make suggestions if needed
5546
56−# Firebase Emulator
57−npm run emulator:start # 開発用Firebase Emulator起動
58−npm run emulator:test # テスト用Firebase Emulator起動
47+2. Design (Architect Mode)
48+ - Choose appropriate architecture or design patterns
49+ - Design components, data flows, and use case diagrams
5950
60−# モック
61−npm run msw:init # Mock Service Workerを初期化
62−```
51+3. Implementation (Code Mode)
52+ - Write code based on the design
53+ - Create unit tests
54+ - Must be executable via Vitest
55+ - 100% test coverage required for:
56+ - statements
57+ - branches
58+ - functions
59+ - lines
60+ - Each function/component should be tested with mocked external dependencies
6361
64−### 現在の技術スタック
62+4. Quality Check (PMO Mode)
63+ - Code Review
64+ - Lint/format checks (ESLint / Prettier)
65+ - Validate user input properly
66+ - Consider performance and security
67+ - Requirement Verification
6568
66−- **フレームワーク**: Next.js 16(App Router + Turbopack)
67−- **認証**: NextAuth.js v5(beta)- カスタム認証プロバイダー
68−- **バックエンド**: Firebase Admin SDK(Firestore + Auth)
69−- **UI**: Material-UI(MUI)+ Tailwind CSS
70−- **状態管理**: React Context + データ取得用SWR
71−- **ドラッグ&ドロップ**: @dnd-kit/core(タスクの並び替え用)
72−- **バリデーション**: Zodスキーマ
73−- **テスト**: Vitest + React Testing Library + MSW
74−- **モック**: MSW(Mock Service Worker)
75−
76−### アーキテクチャ概要
77−
78−- **ディレクトリ構造**: フィーチャーベース設計(`features/`内で機能自己完結)
79−- **ルーティング**: Next.js App Router + ルートグループ`()`による整理
80−- **API構造**: 管理者用`(admin)/`、一般用`(general)/`、認証用`auth/`に分離
81−- **詳細構造**: [@todoApp-submodule/docs/PRODUCTS.md](../todoApp-submodule/docs/PRODUCTS.md#プロジェクト構造)参照
82−
83−### 重要なプロジェクト注意事項
84−
85−- **本番環境ではTypeScriptビルドエラーを無視(`ignoreBuildErrors: true`)**
86− - **理由**: 開発時にエディタのリアルタイム型チェックと`tsconfig.json`の厳密な設定で型安全性を確保済み。本番ビルド時の型チェックをスキップすることでビルド速度を向上させるため。
87−- **開発時のAPIモック用MSWを使用**
88− - **理由**: ユニットテスト時にFirebase Emulatorを起動せずに高速なテスト実行を実現するため。
89−- **キャッシュ制御ヘッダー付きのVercelデプロイ設定**
90− - **理由**: 静的アセットの効率的なキャッシュ配信と、動的コンテンツの適切な更新を両立するため。
91−
92−## 開発パターン
93−
94−- 新しい機能は`features/`内で自己完結させる(共通は`features/shared/`)
95−- **Admin API**: `app/api/(admin)/`、**General API**: `app/api/(general)/`、**Auth API**: `app/api/auth/`
96−- 新規APIでZodバリデーション推奨(既存APIは`trimAllSpaces` + 手動チェックの場合あり)
97−- 詳細: [@.claude/rules/app.md](rules/app.md) / [@.claude/rules/features.md](rules/features.md)
98−
99−## テストガイドライン
100−
101−- **UTカバレッジ**: 100%達成済み(493テスト)
102−- **統合テスト**: Docker + Firebase Emulator(ポート3002/4000/8080/9099)
103−- **詳細ガイド**: [@.claude/rules/testing.md](rules/testing.md)参照
104−
105−## Codex 実行ポリシー
106−
107−- `/codex:review` は常にバックグラウンドで実行する(`--background` フラグを自動付与)
108−- `/codex:rescue` はタスクの複雑さに応じて自動判断する(フラグ省略で自動選択)
69+AI should make autonomous decisions to progress through these steps and deliver complete results in a single request whenever possible.
10970
