|
| 1 | +--- |
| 2 | +description: 'Initialize or update repository documentation and gather project information.' |
| 3 | +--- |
| 4 | + |
| 5 | +# Initialize Project Documentation |
| 6 | + |
| 7 | +Checks and updates `.github/copilot-instructions.md` to ensure it contains all required project information. Gathers missing information through dialogue when needed. |
| 8 | + |
| 9 | +## Core Principle |
| 10 | + |
| 11 | +**For this command only: Codebase is the source of truth** - When running init command, documentation must match the actual codebase structure. If documentation conflicts with code, update documentation to reflect reality. |
| 12 | + |
| 13 | +## Workflow |
| 14 | + |
| 15 | +1. **Check Current Documentation** |
| 16 | + - Read `.github/copilot-instructions.md` |
| 17 | + - Analyze codebase structure |
| 18 | + - Identify missing or outdated information |
| 19 | + |
| 20 | +2. **Verification Against Codebase** |
| 21 | + - Compare documentation with actual file structure |
| 22 | + - Check if described directories exist |
| 23 | + - Verify technical features match package.json/requirements |
| 24 | + - If documentation is outdated, update to match codebase |
| 25 | + |
| 26 | +3. **Information Gathering** |
| 27 | + - If ANY required section is empty or contains placeholders: |
| 28 | + - Start interview process |
| 29 | + - Ask questions ONE at a time |
| 30 | + - Wait for user response before next question |
| 31 | + |
| 32 | +4. **Update Documentation** |
| 33 | + - Update `.github/copilot-instructions.md` with gathered information |
| 34 | + - Ensure all required sections are complete |
| 35 | + - Maintain consistency with actual codebase |
| 36 | + |
| 37 | +## Interview Protocol |
| 38 | + |
| 39 | +### Initial Check Message |
| 40 | +``` |
| 41 | +プロジェクトの設定を確認させてください。 |
| 42 | +.github/copilot-instructions.mdに必要な情報が不足しています。 |
| 43 | +
|
| 44 | +まず最初の質問です: |
| 45 | +[Ask ONE question at a time from below] |
| 46 | +``` |
| 47 | + |
| 48 | +### Required Questions (Ask ONE at a time) |
| 49 | + |
| 50 | +1. **Application Purpose**: |
| 51 | + ``` |
| 52 | + このアプリケーションの目的を教えてください: |
| 53 | + - 実際の商品販売用ですか? |
| 54 | + - デモ・プレゼンテーション用ですか? |
| 55 | + - 学習・練習用ですか? |
| 56 | + ``` |
| 57 | + |
| 58 | +2. **System Separation**: |
| 59 | + ``` |
| 60 | + システムの分離方針を教えてください: |
| 61 | + - フロントエンドのみのモックでよいですか? |
| 62 | + - バックエンドAPIとの連携予定はありますか? |
| 63 | + - データの永続化は必要ですか? |
| 64 | + ``` |
| 65 | + |
| 66 | +3. **Core Functionality**: |
| 67 | + ``` |
| 68 | + コア機能の配置について教えてください: |
| 69 | + - 現在の構成でよいですか? |
| 70 | + - 他に必要な機能や特別な要件はありますか? |
| 71 | + ``` |
| 72 | + |
| 73 | +## Continuous Information Gathering |
| 74 | + |
| 75 | +During development, if information is unclear: |
| 76 | +1. STOP current task |
| 77 | +2. Ask ONE clarifying question |
| 78 | +3. Wait for answer |
| 79 | +4. Continue implementation |
| 80 | + |
| 81 | +### Trigger Conditions |
| 82 | +- System separation requirements unclear → ASK before coding |
| 83 | +- Core functionality placement ambiguous → ASK before creating files |
| 84 | +- Architectural constraints missing → ASK before implementing |
| 85 | +- Implementation direction could drift → ASK before proceeding |
| 86 | + |
| 87 | +## Auto-Update Rules |
| 88 | + |
| 89 | +AI automatically appends discovered constraints to `.github/copilot-instructions.md`: |
| 90 | +- Important architectural constraints discovered through implementation |
| 91 | +- New constraints affecting system separation |
| 92 | +- Constraints to prevent development drift |
| 93 | + |
| 94 | +### Update Principles |
| 95 | +- Add constraints only when architectural direction drifts |
| 96 | +- Remove specifications that aren't preventing problems |
| 97 | +- Focus on maintaining system separation |
| 98 | +- Avoid excessive documentation detail |
| 99 | +- When codebase is truth, update documentation to match |
0 commit comments