Skip to content

Commit 020e83f

Browse files
committed
docs: add more scenes
1 parent 358cb6d commit 020e83f

File tree

3 files changed

+188
-1
lines changed

3 files changed

+188
-1
lines changed

docs/scenes/domain-driven-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
title: Domain Driven Design
4-
nav_order: 1
4+
nav_order: 2
55
parent: Scenes
66
permalink: /scenes/domain-drive-design
77
---

docs/scenes/tdd.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
layout: default
3+
title: TDD
4+
nav_order: 3
5+
parent: Scenes
6+
permalink: /scenes/tdd
7+
---
8+
9+
- Scene: TDD
10+
- Used features: Custom Team Prompts
11+
12+
1. Tasking
13+
2. TDD red: write failed test
14+
3. TDD green: make test pass
15+
4. refactor
16+
17+
## Tasking
18+
19+
---
20+
interaction: AppendCursorStream
21+
---
22+
**System:**
23+
24+
You are a software developer. Reply only with code
25+
26+
**User:**
27+
28+
The code given below is written in Java, convert it into Kotlin without changing its functionality. Output the converted snippet with ``` at the start and end:
29+
30+
```user```
31+
32+
你是一个资深的软件开发工程师,你擅长使用 TDD 的方式来开发软件,你现在需要帮助帮手开发人员做好 Tasking,以方便于编写测试用例。
33+
34+
- Tasking 产生的任务都是具有独立业务价值的,每完成一条,都可以独立交付、产生价值。
35+
- 采用面向业务需求的 Tasking 采用业务语言描述任务列表,更有助于开发人员和业务人员对需求进行详细的沟通和确认。
36+
- 采用 Given When Then 的书写格式,其中 When 中所代表系统行为。
37+
- 要考虑业务场景覆盖率,可能合并重复的测试场景。
38+
39+
请严格按照以下的格式输出。
40+
41+
示例如下:
42+
43+
Q: 开发一个出租车计费功能,它的计算规则是这样的:不超过8公里时每公里收费0.8元,超过8公里则每公里加收50%长途费,停车等待时每分钟加收0.25元。
44+
A: ###
45+
${commentSymbol} Given 出租车行驶了5公里(8公里以内),未发生等待,When 计费,Then 收费4元
46+
${commentSymbol} Given 出租车行驶了5公里(8公里以内),等待10分钟,When 计费,Then 收费6.5元
47+
${commentSymbol} Given 出租车恰好行驶了8公里,未发生等待,When 计费,Then 收费6.4元
48+
${commentSymbol} Given 出租车恰好行驶了8公里,等待10分钟,When 计费,Then 收费8.9元
49+
###
50+
Q: ${selection}
51+
A: ###
52+
53+
## TDD Red
54+
55+
---
56+
interaction: AppendCursorStream
57+
---
58+
```user```
59+
60+
你是一个资深的软件开发工程师,你擅长使用 TDD 的方式来开发软件,你需要根据用户的需求,帮助用户编写测试代码。
61+
62+
${frameworkContext}
63+
64+
当前类相关的代码如下:
65+
66+
${beforeCursor}
67+
68+
用户的需求是:${selection}
69+
70+
请使用 @Test 开头编写你的代码块:
71+
72+
## TDD Green
73+
74+
---
75+
interaction: ChatPanel
76+
---
77+
```user```
78+
79+
你是一个资深的软件开发工程师,你擅长使用 TDD 的方式来开发软件,你需要根据新的测试用例,来改进原有的代码实现。
80+
81+
原有的实现代码是:$context.underTestFileCode($methodName)
82+
83+
$context.underTestMethodCode($methodName)
84+
85+
新的测试代码是:
86+
87+
${selection}
88+
89+
请根据新的测试,优化 class under test 部分的代码。请返回对应的方法的代码,使用 ``` 开始你的代码块:
90+

docs/scenes/tech-writing.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
layout: default
3+
title: Tech Writing
4+
nav_order: 4
5+
parent: Scenes
6+
permalink: /scenes/tech-writing
7+
---
8+
9+
- Scene: Tech Writing
10+
- Used features: Custom Team Prompts
11+
12+
1. Analysis domain
13+
2. Generate outline
14+
3. Continue writing
15+
4. Summarize
16+
17+
create prompts files in your project.
18+
19+
## Analysis domain
20+
21+
---
22+
type: QuickAction
23+
name: Trend Analysis
24+
category: Generate
25+
language: Markdown
26+
interaction: AppendCursorStream
27+
---
28+
29+
```system```
30+
31+
你是一个经验丰富的软件开发咨询师与技术作者,请分析如下领域的行业趋势、未来方向思考。你必须在 3~5 句话描述完,以第一人称的方式来描述。
32+
33+
```user```
34+
${selection}
35+
36+
37+
## Generate outline
38+
39+
---
40+
type: QuickAction
41+
name: Outline
42+
category: Generate
43+
language: Markdown
44+
interaction: AppendCursorStream
45+
---
46+
47+
```system```
48+
49+
50+
You are an assistant helping to draft an outline for a document. Use this format, replacing text in brackets with the result. Do not include the brackets in the output:
51+
52+
# [Title of document]
53+
[Bulleted list outline of document, in markdown format]
54+
55+
```user```
56+
${selection}
57+
58+
## Continue writing
59+
60+
---
61+
type: QuickAction
62+
name: Continue Writing
63+
category: Default
64+
language: Markdown
65+
interaction: AppendCursorStream
66+
---
67+
**system**
68+
69+
You are an assistant helping a user write a document. Output how the document continues, no more than 3 sentences. Output in markdown format. Do not use links.
70+
71+
Use this format, replacing text in brackets with the result. Do not include the brackets in the output:
72+
73+
[Continuation of the document in markdown format, no more than 3 sentences.]
74+
75+
**user**
76+
77+
${beforeCursor}
78+
79+
## Summarize
80+
81+
---
82+
type: QuickAction
83+
name: Summarize
84+
category: Generate
85+
language: markdown
86+
interaction: AppendCursorStream
87+
---
88+
89+
```system```
90+
91+
You are an assistant helping summarize a document. Use this format, replacing text in brackets with the result. Do not include the brackets in the output:
92+
93+
[One-paragaph summary of the document using the identified language.].
94+
95+
```user```
96+
${beforeCursor}
97+

0 commit comments

Comments
 (0)