Skip to content

Commit 171e45e

Browse files
Copilotbearguo
andcommitted
Adopt per-module folder structure for design documents
Co-authored-by: bearguo <20483603+bearguo@users.noreply.github.com>
1 parent 2cf22c7 commit 171e45e

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

.github/copilot-instructions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ templates/tech-design-template.md
2323

2424
### Step 3: Save the Document
2525

26-
Save the new document to the `docs/` directory using the naming convention:
26+
Create a dedicated folder for the module inside `docs/` and save the document as `tech-design.md` within it:
2727
```
28-
docs/<feature-name>-tech-design.md
28+
docs/<feature-name>/tech-design.md
2929
```
3030

3131
For example:
32-
- `docs/user-auth-tech-design.md`
33-
- `docs/payment-service-tech-design.md`
34-
- `docs/data-pipeline-tech-design.md`
32+
- `docs/user-auth/tech-design.md`
33+
- `docs/payment-service/tech-design.md`
34+
- `docs/data-pipeline/tech-design.md`
3535

3636
### Step 4: Fill in the Content
3737

3838
When generating the document, ensure that:
3939
1. **All sections from the template are included** — do not skip sections; mark them as "N/A" if not applicable
4040
2. **The overview is concise** — 2-3 sentences maximum
41-
3. **Architecture diagrams** use ASCII art or reference image files stored in `docs/images/`
41+
3. **Architecture diagrams** use ASCII art or reference image files stored in `docs/<feature-name>/images/`
4242
4. **API designs** include request/response examples with realistic data
4343
5. **Security considerations** are always addressed, even for internal tools
4444
6. **Open questions** capture any unresolved decisions that need input from stakeholders

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1. 在支持AI Agent模式的IDE中打开此仓库(例如:VS Code + GitHub Copilot)
1414
2. 进入 Agent 模式(在 GitHub Copilot Chat 中选择 `Agent` 模式)
1515
3. 向 Agent 描述你的技术设计需求,例如:
16-
> "请根据 `templates/tech-design-template.md` 模板,为 [你的功能] 创建一个技术设计文档,保存到 `docs/` 目录。"
16+
> "请根据 `templates/tech-design-template.md` 模板,为 [你的功能] 创建一个技术设计文档,保存到 `docs/[功能名称]/tech-design.md`。"
1717
4. Agent 会自动生成技术设计文档并保存到 `docs/` 目录下
1818

1919
### 目录结构
@@ -25,15 +25,16 @@ tech-design/
2525
├── templates/
2626
│ └── tech-design-template.md # 技术设计文档模板
2727
├── docs/
28-
│ └── sample-tech-design.md # 示例技术设计文档
28+
│ └── <模块名称>/ # 每个模块单独一个文件夹
29+
│ └── tech-design.md # 该模块的设计文档
2930
└── README.md
3031
```
3132

3233
### 模板使用说明
3334

3435
- **模板文件**`templates/tech-design-template.md`
35-
- **文档存放**所有生成的技术设计文档保存在 `docs/` 目录
36-
- **命名规范**`docs/<功能名称>-tech-design.md`,例如 `docs/user-auth-tech-design.md`
36+
- **文档存放**每个模块的设计文档单独保存在 `docs/<模块名称>/` 文件夹中
37+
- **命名规范**`docs/<模块名称>/tech-design.md`,例如 `docs/user-auth/tech-design.md`
3738

3839
---
3940

@@ -46,7 +47,7 @@ This repository is used to create technical design documents using AI Agent mode
4647
1. Open this repository in an IDE that supports AI Agent mode (e.g., VS Code + GitHub Copilot)
4748
2. Switch to Agent mode (select `Agent` mode in GitHub Copilot Chat)
4849
3. Describe your technical design requirements to the Agent, for example:
49-
> "Please create a technical design document for [your feature] based on the `templates/tech-design-template.md` template, and save it to the `docs/` directory."
50+
> "Please create a technical design document for [your feature] based on the `templates/tech-design-template.md` template, and save it to `docs/[feature-name]/tech-design.md`."
5051
4. The Agent will automatically generate the technical design document and save it to the `docs/` directory
5152

5253
### Directory Structure
@@ -58,12 +59,13 @@ tech-design/
5859
├── templates/
5960
│ └── tech-design-template.md # Technical design document template
6061
├── docs/
61-
│ └── sample-tech-design.md # Sample technical design document
62+
│ └── <module-name>/ # One folder per module
63+
│ └── tech-design.md # Design document for that module
6264
└── README.md
6365
```
6466

6567
### Template Usage
6668

6769
- **Template file**: `templates/tech-design-template.md`
68-
- **Document storage**: All generated technical design documents are saved in the `docs/` directory
69-
- **Naming convention**: `docs/<feature-name>-tech-design.md`, e.g., `docs/user-auth-tech-design.md`
70+
- **Document storage**: Each module's design document is stored in its own folder under `docs/<module-name>/`
71+
- **Naming convention**: `docs/<module-name>/tech-design.md`, e.g., `docs/user-auth/tech-design.md`
File renamed without changes.

0 commit comments

Comments
 (0)