geqintan commited on
Commit
75836b4
·
1 Parent(s): df1de67
Files changed (5) hide show
  1. .clinerules +140 -0
  2. Dockerfile +16 -0
  3. app.py +7 -0
  4. push.sh +3 -0
  5. requirements.txt +2 -0
.clinerules ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 自定义指令
2
+ CUSTOM_INSTRUCTIONS = """
3
+
4
+ """
5
+
6
+
7
+ ---
8
+ description: Describes Cline's Memory Bank system, its structure, and workflows for maintaining project knowledge across sessions.
9
+ author: https://github.com/nickbaumann98
10
+ version: 1.0
11
+ tags: ["memory-bank", "knowledge-base", "core-behavior", "documentation-protocol"]
12
+ globs: ["memory-bank/**/*.md", "*"]
13
+ ---
14
+ # Cline's Memory Bank
15
+
16
+ My memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.
17
+
18
+ ## Memory Bank Structure
19
+
20
+ The Memory Bank consists of core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:
21
+
22
+ ```mermaid
23
+ flowchart TD
24
+ PB[projectBrief.md] --> PC[productContext.md]
25
+ PB --> SP[systemPatterns.md]
26
+ PB --> TC[techContext.md]
27
+
28
+ PC --> AC[activeContext.md]
29
+ SP --> AC
30
+ TC --> AC
31
+
32
+ AC --> P[progress.md]
33
+ ```
34
+
35
+ ### Core Files (Required)
36
+ 1. `projectBrief.md`
37
+ - Foundation document that shapes all other files
38
+ - Created at project start if it doesn't exist
39
+ - Defines core requirements and goals
40
+ - Source of truth for project scope
41
+
42
+ 2. `productContext.md`
43
+ - Why this project exists
44
+ - Problems it solves
45
+ - How it should work
46
+ - User experience goals
47
+
48
+ 3. `activeContext.md`
49
+ - Current work focus
50
+ - Recent changes
51
+ - Next steps
52
+ - Active decisions and considerations
53
+ - Important patterns and preferences
54
+ - Learnings and project insights
55
+
56
+ 4. `systemPatterns.md`
57
+ - System architecture
58
+ - Key technical decisions
59
+ - Design patterns in use
60
+ - Component relationships
61
+ - Critical implementation paths
62
+
63
+ 5. `techContext.md`
64
+ - Technologies used
65
+ - Development setup
66
+ - Technical constraints
67
+ - Dependencies
68
+ - Tool usage patterns
69
+
70
+ 6. `progress.md`
71
+ - What works
72
+ - What's left to build
73
+ - Current status
74
+ - Known issues
75
+ - Evolution of project decisions
76
+
77
+ ### Additional Context
78
+ Create additional files/folders within memory-bank/ when they help organize:
79
+ - Complex feature documentation
80
+ - Integration specifications
81
+ - API documentation
82
+ - Testing strategies
83
+ - Deployment procedures
84
+
85
+ ## Core Workflows
86
+
87
+ ### Plan Mode
88
+ ```mermaid
89
+ flowchart TD
90
+ Start[Start] --> ReadFiles[Read Memory Bank]
91
+ ReadFiles --> CheckFiles{Files Complete?}
92
+
93
+ CheckFiles -->|No| Plan[Create Plan]
94
+ Plan --> Document[Document in Chat]
95
+
96
+ CheckFiles -->|Yes| Verify[Verify Context]
97
+ Verify --> Strategy[Develop Strategy]
98
+ Strategy --> Present[Present Approach]
99
+ ```
100
+
101
+ ### Act Mode
102
+ ```mermaid
103
+ flowchart TD
104
+ Start[Start] --> Context[Check Memory Bank]
105
+ Context --> Update[Update Documentation]
106
+ Update --> Execute[Execute Task]
107
+ Execute --> Document[Document Changes]
108
+ ```
109
+
110
+ ## Documentation Updates
111
+
112
+ Memory Bank updates occur when:
113
+ 1. Discovering new project patterns
114
+ 2. After implementing significant changes
115
+ 3. When user requests with **update memory bank** (MUST review ALL files)
116
+ 4. When context needs clarification
117
+
118
+ ```mermaid
119
+ flowchart TD
120
+ Start[Update Process]
121
+
122
+ subgraph Process
123
+ P1[Review ALL Files]
124
+ P2[Document Current State]
125
+ P3[Clarify Next Steps]
126
+ P4[Document Insights & Patterns]
127
+
128
+ P1 --> P2 --> P3 --> P4
129
+ end
130
+
131
+ Start --> Process
132
+ ```
133
+
134
+ Note: When triggered by **update memory bank**, I MUST review every memory bank file, even if some don't require updates. Focus particularly on activeContext.md and progress.md as they track current state.
135
+
136
+ REMEMBER: After every memory reset, I begin completely fresh. The Memory Bank is my only link to previous work. It must be maintained with precision and clarity, as my effectiveness depends entirely on its accuracy.
137
+
138
+
139
+ # 自动批准规则
140
+ AUTO_APPROVE = true
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ WORKDIR /app
11
+
12
+ COPY --chown=user ./requirements.txt requirements.txt
13
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
+
15
+ COPY --chown=user . /app
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def greet_json():
7
+ return {"Hello": "World!"}
push.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ git add .
2
+ git commit -m "update"
3
+ git push
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ fastapi
2
+ uvicorn[standard]