Skip to content

Commit 21cd65a

Browse files
author
RyukyuInteractive
committed
from RyukyuInteractive
1 parent 9699acd commit 21cd65a

File tree

4 files changed

+167
-305
lines changed

4 files changed

+167
-305
lines changed

.claude/commands/init.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
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

.claude/commands/instructions.md

Lines changed: 0 additions & 115 deletions
This file was deleted.

.github/instructions/core.instructions.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,76 @@ Keep it simple stupid.
2020
- Safety > Convenience: Prioritize bug prevention above all
2121
- Readability > Performance: Prioritize ease of understanding
2222

23+
## Implementation-First Approach
24+
25+
- Build to understand requirements
26+
- Iterate through construction
27+
- Document only what stabilizes
28+
- Evolve specifications through code
29+
- Learn requirements through building, not planning
30+
- Prioritize rapid implementation over detailed specifications
31+
32+
## Documentation Priority
33+
34+
**`.github/copilot-instructions.md` takes precedence over code** - Follow documented constraints even if code differs
35+
2336
# Dialogue Rules
2437

2538
- Always ask questions one at a time
2639
- Keep responses concise
2740
- Always confirm if inferences are correct
41+
42+
# copilot-instructions.md Template
43+
44+
## Required Sections (Fixed Names)
45+
46+
The following section names must never be changed:
47+
48+
```markdown
49+
# Overview
50+
[Application overview description]
51+
52+
## Directory Structure
53+
[Directory structure]
54+
55+
## Technical Features
56+
[Technology stack]
57+
58+
## Decoupled Design
59+
[System separation policy]
60+
61+
## Core Location
62+
[Core functionality placement]
63+
64+
## System Independence
65+
[Independence of each system]
66+
```
67+
68+
## Optional Sections
69+
70+
```markdown
71+
## Domain Systems
72+
[Domain-specific systems - for special business logic]
73+
74+
## API Design
75+
[API design policy - for API-centric projects]
76+
77+
## Data Flow
78+
[Data flow - for complex data processing]
79+
```
80+
81+
## Documentation Guidelines
82+
83+
### Information to Write
84+
85+
- Stable basic separation policies
86+
- Physical locations of major functionality
87+
- Consistent organization
88+
- Important constraints discovered through implementation
89+
90+
### Information Not to Write
91+
92+
- Detailed feature specifications (discover through implementation)
93+
- Specific UI designs (iterate through building)
94+
- Complete data models (evolve with requirements)
95+
- Comprehensive API definitions (emerge through use)

0 commit comments

Comments
 (0)