Skip to content

Commit 2cf22c7

Browse files
Copilotbearguo
andcommitted
Add tech design document templates, sample, and AI Agent instructions
Co-authored-by: bearguo <20483603+bearguo@users.noreply.github.com>
1 parent 8a80e82 commit 2cf22c7

File tree

4 files changed

+656
-1
lines changed

4 files changed

+656
-1
lines changed

.github/copilot-instructions.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# GitHub Copilot Instructions for Tech Design Documents
2+
3+
## Overview
4+
5+
This repository is used to create technical design documents using AI Agent mode in an IDE. When a user asks you to create a technical design document, follow the guidelines below.
6+
7+
## Creating a New Technical Design Document
8+
9+
### Step 1: Understand the Requirement
10+
11+
Ask clarifying questions if needed to understand:
12+
- What feature or system is being designed?
13+
- What problem does it solve?
14+
- Who is the target audience for the document?
15+
- Any specific constraints (tech stack, timeline, team size)?
16+
17+
### Step 2: Use the Template
18+
19+
Always base new technical design documents on the template located at:
20+
```
21+
templates/tech-design-template.md
22+
```
23+
24+
### Step 3: Save the Document
25+
26+
Save the new document to the `docs/` directory using the naming convention:
27+
```
28+
docs/<feature-name>-tech-design.md
29+
```
30+
31+
For example:
32+
- `docs/user-auth-tech-design.md`
33+
- `docs/payment-service-tech-design.md`
34+
- `docs/data-pipeline-tech-design.md`
35+
36+
### Step 4: Fill in the Content
37+
38+
When generating the document, ensure that:
39+
1. **All sections from the template are included** — do not skip sections; mark them as "N/A" if not applicable
40+
2. **The overview is concise** — 2-3 sentences maximum
41+
3. **Architecture diagrams** use ASCII art or reference image files stored in `docs/images/`
42+
4. **API designs** include request/response examples with realistic data
43+
5. **Security considerations** are always addressed, even for internal tools
44+
6. **Open questions** capture any unresolved decisions that need input from stakeholders
45+
46+
### Step 5: Update Status
47+
48+
Set the document status to `Draft` initially. The user will update it to `In Review` or `Approved` as appropriate.
49+
50+
## Document Quality Standards
51+
52+
- Use clear, concise language
53+
- Avoid jargon without explanation
54+
- Use tables for structured comparisons
55+
- Include diagrams for complex architectures (ASCII art is acceptable)
56+
- Reference external standards or RFCs where applicable
57+
- Ensure all links and cross-references are valid
58+
59+
## Updating an Existing Document
60+
61+
When a user asks to update an existing tech design document:
62+
1. Read the current document carefully
63+
2. Make targeted updates to the relevant sections
64+
3. Increment the version number (e.g., 1.0 → 1.1 for minor changes, 1.0 → 2.0 for major redesigns)
65+
4. Add a note in the document about what changed if the status is `In Review` or `Approved`
66+
67+
## Example Prompts
68+
69+
Users may interact with you using prompts like:
70+
71+
- "Create a tech design doc for a new notification service"
72+
- "Write a technical design for migrating our database from MySQL to PostgreSQL"
73+
- "Generate a design document for the search feature refactor"
74+
- "Update the payment service tech design to add support for cryptocurrency"

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,69 @@
11
# tech-design
2-
Tech design docs
2+
3+
[English](#english) | [中文](#中文)
4+
5+
---
6+
7+
## 中文
8+
9+
这个仓库用于在IDE里使用AI Agent模式创建技术设计文档。
10+
11+
### 快速开始
12+
13+
1. 在支持AI Agent模式的IDE中打开此仓库(例如:VS Code + GitHub Copilot)
14+
2. 进入 Agent 模式(在 GitHub Copilot Chat 中选择 `Agent` 模式)
15+
3. 向 Agent 描述你的技术设计需求,例如:
16+
> "请根据 `templates/tech-design-template.md` 模板,为 [你的功能] 创建一个技术设计文档,保存到 `docs/` 目录。"
17+
4. Agent 会自动生成技术设计文档并保存到 `docs/` 目录下
18+
19+
### 目录结构
20+
21+
```
22+
tech-design/
23+
├── .github/
24+
│ └── copilot-instructions.md # AI Agent 指令配置
25+
├── templates/
26+
│ └── tech-design-template.md # 技术设计文档模板
27+
├── docs/
28+
│ └── sample-tech-design.md # 示例技术设计文档
29+
└── README.md
30+
```
31+
32+
### 模板使用说明
33+
34+
- **模板文件**`templates/tech-design-template.md`
35+
- **文档存放**:所有生成的技术设计文档保存在 `docs/` 目录
36+
- **命名规范**`docs/<功能名称>-tech-design.md`,例如 `docs/user-auth-tech-design.md`
37+
38+
---
39+
40+
## English
41+
42+
This repository is used to create technical design documents using AI Agent mode in an IDE.
43+
44+
### Quick Start
45+
46+
1. Open this repository in an IDE that supports AI Agent mode (e.g., VS Code + GitHub Copilot)
47+
2. Switch to Agent mode (select `Agent` mode in GitHub Copilot Chat)
48+
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+
4. The Agent will automatically generate the technical design document and save it to the `docs/` directory
51+
52+
### Directory Structure
53+
54+
```
55+
tech-design/
56+
├── .github/
57+
│ └── copilot-instructions.md # AI Agent instructions configuration
58+
├── templates/
59+
│ └── tech-design-template.md # Technical design document template
60+
├── docs/
61+
│ └── sample-tech-design.md # Sample technical design document
62+
└── README.md
63+
```
64+
65+
### Template Usage
66+
67+
- **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`

0 commit comments

Comments
 (0)