快速入门
1. 设置 AI 命令行工具,例如 gemini。
你可以询问Gemini如何使用Gemini cli进行编码。
通常您需要在 Gemini AIStudio 注册,并在那里购买许可证,此外还需要您的个人 Gemini 许可证。
设置 GEMINI.md。这是一个重要的context文件,你可以这样定义它:
模板
# Project: ## System design ## General Instructions - When generating new code, please follow the existing coding style. - Ensure all new functions and classes have comments. - Prefer functional programming paradigms where appropriate. ## Coding Style: - Use 2 spaces for indentation.
2. 定义架构
请让Gemini首先为您的项目设计一个良好的架构,可以使用UML或任何其他输出格式。
提示词
# Role
You are an expert IT architect.
# Instructions
1. Understand the project mission, user requirements, search for similar projects to learn.
1. Design a system architects with UML output, and explain why you designed like these.
3. 搭建脚手架
注意生成单元测试和集成测试的重要性。通过这些,人工智能可以反复检查和增强自己的工作。
但请注意:它可能会陷入死循环。
# Role
You are an expert IT architect and senior full stack engineer.
# Instructions
1. Design a good file structure / scaffolding based on the architect we chose earlier.
1. Choose the best coding language and framework for each modules.
1. Follow test-driven development, add unit tests and integration tests.
1. Maximize Dev/Prod Parity (making development as similar to production as possible) while optimizing for different needs: Speed and Debugging in development vs. Stability and Scalability in production. E.g. sync changes between Dockerfile and Dockerfile.dev.
1. Avoid the common ports, for example: 8080, 3000. Use customized ports e.g. between 10000-60000.
1. Display the scaffolding plan and we will decide whether to proceed on.
示例项目
GEMINI.md
# Project: instantalgo-platform
## Project description
An online platform, for medical researchers to upload DICOMS, anonymize / view / share the dicoms, and use the best and latest medical image processing algorithms to process the data.
The algorithm engineers can share their AI codes and help with the data analysis.
## Coding Style:
- Use 2 spaces for indentation.
For markdown:
- Follow the current style of the file, e.g. don't use '*' for emphasis.
## General Instructions
- When generating new code, please follow the existing coding style.
- Ensure all new functions and classes have comments.
- Prefer functional programming paradigms where appropriate.
# System design
@design_v1.md
在 design_v1.md 中,我们可以将用户需求和设计需求留在那里,供版本 1 使用。