feat: 添加项目规则、环境配置示例及开发文档

This commit is contained in:
锦麟 王
2026-02-04 18:49:38 +08:00
commit df76882178
88 changed files with 13150 additions and 0 deletions

90
.claude/commands/code.md Normal file
View File

@@ -0,0 +1,90 @@
---
description: code
---
```mermaid
flowchart TD
start_node_default([Start])
check_docs_1[[MCP: read_file]]
if_docs_exist{If/Else:<br/>Conditional Branch}
error_no_docs[error-no-docs]
end_error([End])
extract_steps_1[extract-steps-1]
foreach_loop_start[foreach-loop-start]
develop_step_1[develop-step-1]
verify_step_1[verify-step-1]
if_step_passed{If/Else:<br/>Conditional Branch}
step_complete[step-complete]
fix_bugs_1[fix-bugs-1]
loop_back[loop-back]
end_success([End])
start_node_default --> check_docs_1
check_docs_1 --> if_docs_exist
if_docs_exist -->|无文档| error_no_docs
if_docs_exist -->|存在文档| extract_steps_1
error_no_docs --> end_error
extract_steps_1 --> foreach_loop_start
foreach_loop_start --> develop_step_1
develop_step_1 --> verify_step_1
verify_step_1 --> if_step_passed
if_step_passed -->|通过| step_complete
if_step_passed -->|失败| fix_bugs_1
step_complete --> end_success
fix_bugs_1 --> loop_back
loop_back --> develop_step_1
```
## Workflow Execution Guide
Follow the Mermaid flowchart above to execute the workflow. Each node type has specific execution methods as described below.
### Execution Methods by Node Type
- **Rectangle nodes**: Execute Sub-Agents using the Task tool
- **Diamond nodes (AskUserQuestion:...)**: Use the AskUserQuestion tool to prompt the user and branch based on their response
- **Diamond nodes (Branch/Switch:...)**: Automatically branch based on the results of previous processing (see details section)
- **Rectangle nodes (Prompt nodes)**: Execute the prompts described in the details section below
## MCP Tool Nodes
#### check_docs_1(read_file)
**Description**: 读取步骤文档文件
**MCP Server**: filesystem
**Tool Name**: read_file
**Validation Status**: valid
**Configured Parameters**:
- `file_path` (string): ./step_documentation.md
**Available Parameters**:
- `file_path` (string) (required): 步骤文档文件路径
This node invokes an MCP (Model Context Protocol) tool. When executing this workflow, use the configured parameters to call the tool via the MCP server.
### If/Else Node Details
#### if_docs_exist(Binary Branch (True/False))
**Evaluation Target**: file_content
**Branch conditions:**
- **存在文档**: 文件存在且包含内容
- **无文档**: 文件不存在或为空
**Execution method**: Evaluate the results of the previous processing and automatically select the appropriate branch based on the conditions above.
#### if_step_passed(Binary Branch (True/False))
**Evaluation Target**: verification_result
**Branch conditions:**
- **通过**: 验证成功
- **失败**: 验证失败
**Execution method**: Evaluate the results of the previous processing and automatically select the appropriate branch based on the conditions above.