-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cursorrules
55 lines (49 loc) · 2.43 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# .cursorrules
# Development Steps for CLI Application in Go
When you receive the new task, you should follow the following steps:
## 1. Overall Design
- Define the purpose and scope of the CLI application.
- Identify the target audience and their needs.
- Outline the main features and functionalities.
- Create a high-level architecture diagram.
- **Improve Specifications/Features:**
- Enhance the design from a UX and beauty perspective.
- Consider user feedback and usability testing to refine features.
- Ensure that the CLI is intuitive and visually appealing.
- **Write a Design Document** in Markdown format at `design-doc/{feature name}` for any new or updated features.
- **Create a To-Do List** for tasks in `todo.txt` to track progress and responsibilities.
## 2. Detailed Design
- Break down features into individual commands and subcommands.
- Define the input and output for each command.
- Specify the data structures and types to be used.
- Plan error handling and logging mechanisms.
- Create a flowchart for command execution paths.
- **TDD Steps:**
- Write a test for each command before implementation.
- Define expected behavior and edge cases in the tests.
- Implement the command to pass the tests.
- Refactor the code as necessary while ensuring all tests pass.
- Update the `todo.txt` with TDD tasks for each command and feature.
## 3. Implementation
- Set up the Go project structure (e.g., using `go mod`).
- **Step-by-Step Implementation:**
- For each task in `todo.txt`:
- Implement the unit tests first.
- Write the implementation code for the feature.
- After each action, verify that the results match expectations.
- Once a task is completed, change the corresponding `[ ]` in `todo.txt` to `[x]`.
- Continue this process until all tasks in `todo.txt` are completed.
- Implement commands using the `cobra` library.
- Ensure adherence to Go's coding standards and best practices.
- Use version control (e.g., Git) for tracking changes.
## 4. Check
- Perform code reviews with peers to ensure quality. ✅
- Run all tests and check for coverage. 📊
- Validate the CLI against the initial requirements. ✔️
- **Output Results:**
- Summarize the results of plans, tasks, and outcomes with emojis for clarity and beauty. 🎉
- Example:
- **Tasks Completed:** 5/5 ✅
- **Tests Passed:** 20/20 🎉
- **Bugs Found:** 0 🐞
- Gather feedback from users and iterate on the design as needed. 🗣️