chore: 导入旧记忆备份供恢复

This commit is contained in:
2026-09-23 22:38:40 +08:00
parent 5313fcee7a
commit 6a6a895eaf
638 changed files with 29816 additions and 1 deletions
@@ -0,0 +1,22 @@
---
title: MemRelay 为主、本地 aidocs 仅作离线暂存
type: rule
permalink: main/global/mem-relay-为主、本地-aidocs-仅作离线暂存
stable_id: 25332e63-48d0-4daa-8c08-d676bb2d310d
scope: global
memory_type: rule
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 3
request_id: airules-global-memrelay-fallback-20260916-1140
created_at: '2026-09-16T03:23:42.866736+00:00'
updated_at: '2026-09-16T03:40:08.714257+00:00'
tags:
- rules
- memory
- memrelay
- offline-fallback
---
会话开始先调用 capabilities_get 检查 MemRelay,并按当前目录、Git remote、项目名解析项目。MemRelay 可用时它是唯一的记忆存储:所有全局和项目记忆都写入 MemRelay,不创建或更新本地 aidocs。仅当 MemRelay 工具不存在、不可访问、鉴权失败或写入不可用时,才把待同步记忆临时保存到项目的 aidocs/project_context.md(最新优先、秒级时间戳,记录做了什么/为什么/如何验证/问题/下一步),并确保 aidocs 已加入 .gitignore、不提交。每次会话开始若发现 aidocs/project_context.md 存在且 MemRelay 可用,立即将有效记忆按正确范围去重同步;逐条确认成功且无遗漏后删除整个 aidocs 目录。不主动调用 project_export_prepare 向 aidocs 导出副本,除非用户明确要求;导出副本不视为待同步记忆。线上与本地冲突时不得静默覆盖线上内容,冲突条目暂留本地并向用户说明,待用户裁定后再写入。重要里程碑保存检查点;会话结束前若有实质进展,保存交接级检查点(未完成线索、临时约定、要避开的坑)。记忆仓库的历史恢复、记忆仓库 Git 同步和破坏性清理只在用户明确要求时执行,此限制不涉及代码仓库的提交推送。推测、临时数据、闲聊、未裁定的冲突内容和任何密文均不得写入 MemRelay。
@@ -0,0 +1,22 @@
---
title: Optional AI and Git configuration
type: rule
permalink: main/global/optional-ai-and-git-configuration
stable_id: 3f91189b-11a1-45bb-8357-4f413dc1609d
scope: global
memory_type: rule
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 1
request_id: global-optional-ai-git-20260804
created_at: '2026-08-04T15:03:57.892969+00:00'
updated_at: '2026-08-04T15:03:57.892969+00:00'
tags:
- deployment
- optional
- ai
- git
---
AI curation and memory Git are independent optional enhancements and are disabled by default. A deployment with neither configured is a complete supported mode: do not probe models, enqueue curation or Git work, clone workspaces, create .git directories, or report a fault. Memory, projects, checkpoints, search, vault, files, Web, REST, MCP, export, backup, and local semantic search remain available.
@@ -0,0 +1,84 @@
---
title: Cross‑Workspace Experiences (Project eb…)
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/cross-workspace-experiences-project-eb...
stable_id: 8a861a5f-35c3-4f95-bd5b-6b2297888f56
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: cross_workspace_experience
revision: 13
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:d8161df6-3159-46c9-9402-c5ab30d1436e: '1'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:8a861a5f-35c3-4f95-bd5b-6b2297888f56
- cross_workspace_memory:b3fc5d7e-f1d7-4a63-860b-37f9f35cb136
- cross_workspace_memory:41e5bdb5-a67b-49bc-b8a6-ab20b4c66fca
- cross_workspace_memory:340af5e9-b3e5-423a-9971-b370992738ce
- cross_workspace_memory:b70c1a22-6834-4e59-936c-1945b04273b7
- cross_workspace_memory:8d83fdf5-683a-41ce-94ed-da186cf32c71
- cross_workspace_memory:67499b3a-97a6-4982-9c16-4afaa59d45f3
- cross_workspace_memory:d0a91595-3be4-4366-a615-58833dd0dff8
- cross_workspace_memory:51b5b48b-ac1f-4477-ab2f-dfc46198eb01
- cross_workspace_memory:fd164c80-b38b-4984-8008-48b57ba46e61
- cross_workspace_memory:e92dbe0b-bb27-4b0e-b5bb-2330a0472fd2
- cross_workspace_memory:8c6276e6-d7db-409d-a3cd-5570c2d8fdc5
- cross_workspace_memory:5924806e-b234-49f7-b971-3c844fd07cf3
- cross_workspace_memory:bc21af00-1127-44f8-93b7-aa484a7041c2
- cross_workspace_memory:09d9ff03-0cbd-4551-9b74-f5953855e4a3
- cross_workspace_memory:0f19c98d-0d69-4702-af18-e75edae6370a
- cross_workspace_memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b
- cross_workspace_memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165
- cross_workspace_memory:3e6dcfc1-f561-415d-9356-b387347c9193
- cross_workspace_memory:0ca7e07e-97b7-496c-96c8-dc712498fc8e
- cross_workspace_memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2
- cross_workspace_memory:61e30ee3-0e26-4d64-b00e-f77bc3a3fd60
- cross_workspace_memory:ce9006a3-2313-411f-b577-10bbb9b9c3bb
- cross_workspace_memory:e61163f1-50db-49d4-839b-a8bdb67741c2
- cross_workspace_memory:23bcc4c0-4992-41d6-b70e-210937a76a0f
- cross_workspace_memory:db92ba17-fcee-4f1d-9593-6b325105e482
- memory:d8161df6-3159-46c9-9402-c5ab30d1436e
job_cited_source_ids: []
conflicts: []
supersedes: []
preferences: []
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:37.078512+00:00'
updated_at: '2026-09-16T03:09:06.704794+00:00'
tags:
- cross‑workspace
- artveris
- deployment
---
# Cross‑Workspace Experience – Project artveris
In project `artveris` (project ID `d44c219a-0b31-4de1-b160-323eb34a4c6a`) a recurring issue was identified where `deploy.py` could inadvertently launch two parallel SSH deployments, causing log overwrite and database migration conflicts.
## Resolution
Implemented a file‑based locking mechanism using `flock -n`. The script now checks for an existing lock when a deployment starts and exits immediately if the lock is already held, preventing duplicate runs.
## Reference
- cross_workspace_memory:8a861a5f-35c3-4f95-bd5b-6b2297888f56
- cross_workspace_memory:36e69016-705a-4df3-8247-75874afeeb24 (conflict removed)
@@ -0,0 +1,89 @@
---
title: Global Development Workflows
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/global-development-workflows
stable_id: e4fc35f2-1606-4b79-9c1e-367edeea97d0
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: workflows
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:5ed86f53-b53e-4534-8e51-d3a010069d5e: '2'
memory:105b328f-4bda-4641-90a7-7282ef156316: '2'
memory:3f91189b-11a1-45bb-8357-4f413dc1609d: '1'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
- cross_workspace_memory:df065dbf-85de-4f2b-bbb1-5d8b115de08c
- cross_workspace_memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b
- cross_workspace_memory:0f19c98d-0d69-4702-af18-e75edae6370a
- cross_workspace_memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165
- cross_workspace_memory:6e63a053-fea4-4785-984c-b61fab08810a
- cross_workspace_memory:dd093dd7-71be-46a2-bcb1-4a87c3d4b9ab
- cross_workspace_memory:dc70f54c-8e29-4834-a5c1-a63bc9ac9e68
- cross_workspace_memory:e1b8d25d-f638-4fbe-8a8d-0eda8f2d7d46
- cross_workspace_memory:6b129c78-a412-41e9-af9f-63ab071e03d9
- cross_workspace_memory:5924806e-b234-49f7-b971-3c844fd07cf3
- cross_workspace_memory:2bff13bb-b5cc-40fd-8b2f-774f5c6b9dba
- cross_workspace_memory:61e30ee3-0e26-4d64-b00e-f77bc3a3fd60
- memory:5ed86f53-b53e-4534-8e51-d3a010069d5e
- memory:105b328f-4bda-4641-90a7-7282ef156316
- memory:3f91189b-11a1-45bb-8357-4f413dc1609d
job_cited_source_ids:
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
conflicts: []
supersedes: []
preferences: []
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:35.371609+00:00'
updated_at: '2026-09-16T03:09:03.015482+00:00'
tags:
- workflows
- global
---
# Global Development Workflow
1. **Project memory & Git process**
- All notes are kept in `aidocs/project_context.md`. `aidocs/` is in `.gitignore` and never committed.
- After completing a task, perform: delete temporary files, debug logs, unused code → update memory (what/why/validation/issues/next steps) → check `.gitignore` → commit with `type: 中文一句话描述`. Default is *commit only*; push only when explicitly requested.
2. **Credential Retrieval Workflow**
- Before any login, SSH, database or API call, query Vaultwarden. If exactly one match, use it directly. If multiple or none, prompt for selection or manual input.
- When adding or updating credentials, immediately write them to the password vault; memory records only the entry name, purpose, and usage method.
3. **Technical Notes**
- **FastAPI async** – Never perform blocking I/O inside `async def`; change to normal `def` so FastAPI handles it in a thread‑pool.
- **PowerShell JSON** – Write JSON to a temporary file and send with `curl.exe --data-binary @file` to preserve quotes.
- **Large‑table SQL** – Add indexes on frequently queried text columns, raise DB `read/write_timeout` along with client `upload_timeout`/`run_timeout`.
- **Docker exec timeout** – Obtain raw socket and call `socket.settimeout(None)` to disable default 3 s timeout.
- **Docker Hub proxy** – Configure Docker Desktop to **Manual** with HTTP/HTTPS pointing to `http://127.0.0.1:7897` and restart Docker.
4. **Version & Deployment Rules**
- For OTA, always use the official release version matching the device's ABI and keep the device’s firmware tightly coupled to the release channel.
- Do not flash generic RK3568 images; use the project‑provided U‑Boot, DTB and RTL8367S/DSA configurations.
5. **Testing & Validation**
- Regression tests should use real timestamps and ensure that the JSON output from `memrelay://capabilities` rendered via `jsonable_encoder` matches the raw resource structure.
- FastAPI handlers that perform blocking I/O should be switched to synchronous functions.
@@ -0,0 +1,129 @@
---
title: Global Workspace Profile
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/global-workspace-profile
stable_id: 6973450e-6ecc-48e3-8cdd-4d7d7707d843
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: profile
revision: 16
source_memory_ids:
- 938fd87f-6a79-4765-b266-9aad0e8664de
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 97
source_revisions:
memory:ff34c6eb-6bba-41e5-9e43-ff80941fa823: '2'
memory:25332e63-48d0-4daa-8c08-d676bb2d310d: '3'
memory:2406be77-e6ce-4572-890e-18747c968f55: '2'
memory:ac8bb556-947d-43a1-87d9-bfe7e8da310b: '1'
memory:938fd87f-6a79-4765-b266-9aad0e8664de: '1'
source_dispositions:
processed: 97
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- memory:938fd87f-6a79-4765-b266-9aad0e8664de
- memory:ac8bb556-947d-43a1-87d9-bfe7e8da310b
- memory:25332e63-48d0-4daa-8c08-d676bb2d310d
- memory:2406be77-e6ce-4572-890e-18747c968f55
- cross_workspace_memory:785ee52e-7fc0-4c3e-af00-161d219bc6d0
- cross_workspace_memory:5c51c39f-5737-482d-929f-ed22bb1f2e2c
- cross_workspace_memory:c9dcce4b-b7ab-4268-aa69-544bc64d17b3
- cross_workspace_memory:592bc22a-9f8a-4ce1-81ee-107b47371312
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
- curated_baseline:416ac7c5-22a5-414a-be97-6b30deccf8e2
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
- curated_baseline:8a861a5f-35c3-4f95-bd5b-6b2297888f56
- cross_workspace_memory:dd093dd7-71be-46a2-bcb1-4a87c3d4b9ab
- cross_workspace_memory:b476b307-7224-4128-8499-4c43a2ad1cb5
- cross_workspace_memory:dc70f54c-8e29-4834-a5c1-a63bc9ac9e68
- cross_workspace_memory:e1b8d25d-f638-4fbe-8a8d-0eda8f2d7d46
- cross_workspace_memory:6b129c78-a412-41e9-af9f-63ab071e03d9
- cross_workspace_memory:f42fc721-886f-4d6d-85a4-1611d7bc2cf1
- cross_workspace_memory:5924806e-b234-49f7-b971-3c844fd07cf3
- memory:ff34c6eb-6bba-41e5-9e43-ff80941fa823
job_cited_source_ids:
- memory:938fd87f-6a79-4765-b266-9aad0e8664de
conflicts: []
supersedes: []
preferences:
- statement: Cursor must be a local, non‑syncing plugin for all workspaces; install
under `%USERPROFILE%\.cursor\plugins\local\collaboration-rules\`.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- memory:938fd87f-6a79-4765-b266-9aad0e8664de
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
source_cursor: 620
source_hash: 5b10d7140112f8e9fe0313be1788db0eb632993d7519d6692bc58fac359fd0d0
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: 5d0a5a46-f90b-4dbc-8723-f907bacf2c2f
created_at: '2026-08-08T07:55:31.878711+00:00'
updated_at: '2026-09-16T13:48:03.895012+00:00'
tags:
- development
- global
- commit
- project-creation
- memory-management
- communication
---
# Global Development Profile
## 1. Scope
This profile applies globally to every workspace and project managed under MemRelay.
## 2. Key Rules
- **Commit** immediately after each fully implemented feature.
- **Push** to the remote right after committing; before pushing, `git fetch` and `git rebase` local changes onto the target branch if new remote commits exist.
- **Avoid** the use of `git push --force` unless explicitly authorised.
- **Rebase** onto the target branch and then perform a **fast‑forward merge**; avoid generating merge commits.
- When protected branches, CI pipelines, or PR reviews exist, **create a PR** instead of performing a direct merge.
- **Re‑validate** the branch after any rebase or merge and resolve conflicts by fully understanding both sides of the conflict.
- For branches that contain published or shared changes, **forced rebase is forbidden** unless explicitly authorised.
- The **target branch** may be pushed only after a successful merge; **automatic deployment is never performed**.
- **Commit messages** must follow Conventional Commits, e.g. `type: <中文一句话描述>`.
- All communication within the project must be in Chinese and adhere to the KISS / YAGNI principle. Enforce the commit format `type: 中文一句话描述`.
- **Credentials** must be stored exclusively in the password vault; only the vault entry name is recorded in memory and never committed to code.
- The **integration of the Collaboration‑Rules** must be installed locally as a non‑syncing plugin for all workspaces. The installation path is `%USERPROFILE%\.cursor\plugins\local\collaboration-rules\` and the file `collaboration-rules.mdc` is built from `RULES.md` with `alwaysApply:true`.
## 3. Workflow Enhancements
- **Streamlit UI**: Widgets inside `st.form` are now placed outside the form to ensure immediate re‑run when the form is modified.
- **Marketplace Results UI**: Formal product files are moved to `task‑dir/20260815-xxx/results` and presented via a scrollable list, avoiding inline rendering of large files.
- **Tool‑box UI Simplification**: All developer‑style subtitles have been removed; only essential actions (download button & file listing) remain.
- **Layout Optimization**: Unnecessary whitespace in the Streamlit toolbox and sidebar has been reduced for a cleaner UI.
- **Navigation Branding**: The title “MarketGrid” with subtitle “空间数据工具箱” is now positioned above the navigation bar.
- **Start‑UI Script**: `start‑ui.ps1` is a PowerShell 5.1 script with a UTF‑8 BOM to avoid `UnexpectedToken` errors when non‑ASCII characters are present.
- **PowerShell Script Encoding**: All PowerShell files are saved with a UTF‑8 BOM; validated with `powershell.exe Parser.ParseFile`.
- **Unresolved Future Tasks**: Verify that the PLUGIN‑MD regeneration for Codex/CLI avoids duplicate `RULES.md` copies, enforce consistent PowerShell encoding across scripts, and confirm full task‑folder migration on all workspaces.
## 4. Implementation Notes
- The document is written in Chinese to reflect the communication policy.
- All policy statements are derived from the following evidence sources: `memory:938fd87f-6a79-4765-b266-9aad0e8664de`, `memory:6973450e-6ecc-48e3-8cdd-4d7d7707d843`, and `memory:e4fc35f2-1606-4b79-9c1e-367edeea97d0`.
- The policy may be refined by additional evidence, but the current rules take precedence until a newer explicit update supersedes them.
---
## 5. Preferences
- **Global Preference List**: See the JSON array below.
@@ -0,0 +1,155 @@
---
title: Global and Scenario Preferences
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/global-and-scenario-preferences
stable_id: 2b47472d-3ac2-4394-8646-c6bf1c0fc270
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: preferences
revision: 13
source_memory_ids:
- 9988effa-80c9-4062-97a2-8a5f40e3856a
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 104
source_revisions:
memory:bf88c265-4749-4c50-85bc-4bae25298cd5: '4'
memory:5ed86f53-b53e-4534-8e51-d3a010069d5e: '2'
memory:105b328f-4bda-4641-90a7-7282ef156316: '2'
memory:3f91189b-11a1-45bb-8357-4f413dc1609d: '1'
memory:1194be51-ee29-47e1-8957-ec2888007db6: '1'
memory:7429c22e-50ff-458a-97c0-423c679904c7: '2'
memory:9988effa-80c9-4062-97a2-8a5f40e3856a: '1'
source_dispositions:
processed: 104
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- memory:9988effa-80c9-4062-97a2-8a5f40e3856a
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
- curated_baseline:416ac7c5-22a5-414a-be97-6b30deccf8e2
- memory:7429c22e-50ff-458a-97c0-423c679904c7
- curated_baseline:8a861a5f-35c3-4f95-bd5b-6b2297888f56
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
- memory:1194be51-ee29-47e1-8957-ec2888007db6
- curated_baseline:7b5a1fcd-adea-4418-ac8e-2f6275b5ada6
- memory:bf88c265-4749-4c50-85bc-4bae25298cd5
- memory:5ed86f53-b53e-4534-8e51-d3a010069d5e
- memory:105b328f-4bda-4641-90a7-7282ef156316
- memory:3f91189b-11a1-45bb-8357-4f413dc1609d
- cross_workspace_memory:23bcc4c0-4992-41d6-b70e-210937a76a0f
- cross_workspace_memory:db92ba17-fcee-4f1d-9593-6b325105e482
- cross_workspace_memory:b70c1a22-6834-4e59-936c-1945b04273b7
job_cited_source_ids:
- memory:9988effa-80c9-4062-97a2-8a5f40e3856a
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
conflicts: []
supersedes: []
preferences:
- statement: 答题时首选已知答案
level: scenario
workspace_types:
- development
workspace_ids: []
source_ids:
- memory:9988effa-80c9-4062-97a2-8a5f40e3856a
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: 保持KISS/YAGNI原则,Vault优先,中文沟通
level: scenario
workspace_types:
- development
workspace_ids: []
source_ids:
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: '提交信息采用“type: <中文描述>”的约定式提交格式'
level: scenario
workspace_types:
- development
workspace_ids: []
source_ids:
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: 提交后立即推送,重基后推送;禁止--force,优先快进合并;受保护分支需 PR 并在合并后重新验证
level: scenario
workspace_types:
- development
workspace_ids: []
source_ids:
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: 凭据从 vault 获取,单一匹配自动使用,多重没有或多重需手动提示
level: scenario
workspace_types:
- development
workspace_ids: []
source_ids:
- curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
source_cursor: 689
source_hash: dc4cbe063d006d6ae3edf966ab516b13c6177691ffc0e1abcc06f072267adc88
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: f55f2513-17b7-43db-a55a-9ebeea813022
created_at: '2026-08-08T07:55:33.922490+00:00'
updated_at: '2026-09-17T07:37:01.980798+00:00'
tags:
- preferences
---
# Global Preferences
- **Answering Strategy**: Prefer to give known answers immediately. When encountering uncertain or ambiguous queries, append known answers first and clarify later if needed. (来源:memory:9988effa-80c9-4062-97a2-8a5f40e3856a)
- **KISS/YAGNI Principle & Vault‑First**: Reuse existing frameworks and libraries. Do not add needless dependencies; keep the codebase simple. All credentials must be retrieved from a vault before usage; only one match is auto‑used, otherwise a manual prompt is presented. (来源:curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270、curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843、curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0)
- **Chinese Language for All Communication**: All documentation, commit messages, and user‑facing text should be in Chinese unless otherwise required. (来源:同一 curated baselines)
- **Conventional Commit Format**: Commit messages should follow the pattern `type: <简短中文描述>` – e.g., `feat: 新增用户登录`. (来源:同一 curated baselines)
- **Git Workflow**: Commit immediately after writing. Push only after a successful rebase. Avoid `--force` pushes and favor fast‑forward merges. Protected branches require a pull request for changes and must be re‑validated after merging. (来源:同一 curated baselines)
- **Credential Storage & Retrieval**: All credentials are stored in a vault. Prior to each operation, query the vault; if exactly one matching credential is found, use it automatically. If none or multiple are found, prompt the user. (来源:curated_baseline:e4fc35f2-1606-4b79-9c1e-367edeea97d0)
- **Technical Notes & Performance**: Avoid blocking I/O in async functions; use `jsonable_encoder`, add indexes for large tables, enforce UTF‑8 BOM on PowerShell scripts, and standardize CSV encoding detection (UTF‑8‑sig then GBK). (来源:同一 curated baselines)
- **UI Guidelines**: In Streamlit, place form controls outside of `st.form` to ensure re‑triggers; minimize spacing; keep only essential UI elements. (来源:同一 curated baselines)
These preferences apply globally across all workspaces in the project and are considered current and stable.
@@ -0,0 +1,60 @@
---
title: Collaboration and Language Preferences
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/collaboration-and-language-preferences
stable_id: 416ac7c5-22a5-414a-be97-6b30deccf8e2
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: context_personal
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:ff34c6eb-6bba-41e5-9e43-ff80941fa823: '2'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:416ac7c5-22a5-414a-be97-6b30deccf8e2
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
- memory:ff34c6eb-6bba-41e5-9e43-ff80941fa823
job_cited_source_ids:
- curated_baseline:416ac7c5-22a5-414a-be97-6b30deccf8e2
conflicts: []
supersedes: []
preferences: []
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:51.383806+00:00'
updated_at: '2026-09-16T03:09:22.147229+00:00'
tags:
- personal
---
# Current context_personal
## 个人开发上下文(中文)
- **语言与沟通**:默认使用中文与用户交流,除非用户明确要求使用其他语言。
- **开发环境**:操作系统为 Windows,所有命令、路径和验证步骤必须兼容 Windows(包括 WSL2 与 Docker Desktop)。
- **工作方式**:在任何改动前必须完整理解现有代码库,并持续向相关方报告关键进展。若任务可独立完成并自行验证,则直接完成并提交。
- **KISS & YAGNI**:实现最简且正确的方案,复用已有框架、服务、工具与约定,避免为猜测需求添加依赖或抽象层。
- **私有部署优先**:倾向一次性配置、长期复用的部署方式,重视系统能力与使用便利性,而非对未知风险的冗余设计。
- **凭证检索工作流**:在任何登录、SSH、数据库或 API 调用前先查询 Vaultwarden,若唯一匹配则直接使用;新增或修改凭证必须立即写入密码库,记录仅包含条目名称与用途,绝不存储密文。
- **项目记忆管理**:所有项目笔记统一保存在 `aidocs/project_context.md`(已 `.gitignore`),采用固定标题 + **最新‑优先**、秒级时间戳的条目格式。完成任务后依次执行:实现 → 清理临时文件/调试日志 → 更新记忆 → 检查 `.gitignore` → 提交以 `type: 中文一句话描述` 的形式。
@@ -0,0 +1,190 @@
---
title: Development Context Overview
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/development-context-overview
stable_id: d3a20d44-6001-4c88-8772-65dbfac75e6e
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: context_development
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:bf88c265-4749-4c50-85bc-4bae25298cd5: '4'
memory:5ed86f53-b53e-4534-8e51-d3a010069d5e: '2'
memory:105b328f-4bda-4641-90a7-7282ef156316: '2'
memory:3f91189b-11a1-45bb-8357-4f413dc1609d: '1'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
- cross_workspace_memory:dd093dd7-71be-46a2-bcb1-4a87c3d4b9ab
- cross_workspace_memory:b476b307-7224-4128-8499-4c43a2ad1cb5
- cross_workspace_memory:67a86e88-a750-4cd8-9650-c1b7cfbf22b9
- cross_workspace_memory:2939ce96-a6f6-418a-9a70-568980dbdc2a
- cross_workspace_memory:7737eaaf-441e-476e-aea0-42a4d13ae245
- cross_workspace_memory:92e5c8d9-c4ef-4ab7-99ac-1b81f3228b59
- cross_workspace_memory:dc70f54c-8e29-4834-a5c1-a63bc9ac9e68
- cross_workspace_memory:e1b8d25d-f638-4fbe-8a8d-0eda8f2d7d46
- cross_workspace_memory:6b129c78-a412-41e9-af9f-63ab071e03d9
- cross_workspace_memory:df7b18f9-490f-415f-a388-2332d1b7df87
- cross_workspace_memory:f42fc721-886f-4d6d-85a4-1611d7bc2cf1
- cross_workspace_memory:a9739d28-4318-492e-bad3-53e9ea2769a8
- cross_workspace_memory:814d437d-2c21-4f02-b17b-97fd3ec03f7e
- cross_workspace_memory:650349fe-0a22-4d62-b3ab-329523cb1960
- cross_workspace_memory:180c6231-32a2-4513-980b-613afff09cbe
- cross_workspace_memory:f8c5300e-3068-4003-a816-b20f997d9715
- cross_workspace_memory:4f58f272-ba63-4f40-a617-c35cfa4cad6e
- cross_workspace_memory:cb5d1924-eb5d-4e63-9696-4033f7d0b943
- cross_workspace_memory:27678f65-69be-4d2d-84f9-fc4ed515819c
- cross_workspace_memory:74160f67-38fe-487e-a2d3-8f739c31a09b
- cross_workspace_memory:84879e0b-c836-496e-a6cd-d607d6445689
- cross_workspace_memory:2f6e65b2-e6f2-4970-b570-1895590207dd
- cross_workspace_memory:9d00d45d-e524-4fbd-8b40-bd9b8d89e7f7
- cross_workspace_memory:97c12ace-42c3-40ad-a7e6-18b5f765bd72
- cross_workspace_memory:8d83fdf5-683a-41ce-94ed-da186cf32c71
- cross_workspace_memory:67499b3a-97a6-4982-9c16-4afaa59d45f3
- cross_workspace_memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2
- cross_workspace_memory:df065dbf-85de-4f2b-bbb1-5d8b115de08c
- cross_workspace_memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b
- cross_workspace_memory:0f19c98d-0d69-4702-af18-e75edae6370a
- cross_workspace_memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165
- cross_workspace_memory:6e63a053-fea4-4785-984c-b61fab08810a
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- cross_workspace_memory:61e30ee3-0e26-4d64-b00e-f77bc3a3fd60
- cross_workspace_memory:2bff13bb-b5cc-40fd-8b2f-774f5c6b9dba
- cross_workspace_memory:5924806e-b234-49f7-b971-3c844fd07cf3
- cross_workspace_memory:0ca7e07e-97b7-496c-96c8-dc712498fc8e
- cross_workspace_memory:09d9ff03-0cbd-4551-9b74-f5953855e4a3
- cross_workspace_memory:ce9006a3-2313-411f-b577-10bbb9b9c3bb
- cross_workspace_memory:b3fc5d7e-f1d7-4a63-860b-37f9f35cb136
- cross_workspace_memory:41e5bdb5-a67b-49bc-b8a6-ab20b4c66fca
- cross_workspace_memory:23bcc4c0-4992-41d6-b70e-210937a76a0f
- cross_workspace_memory:db92ba17-fcee-4f1d-9593-6b325105e482
- cross_workspace_memory:340af5e9-b3e5-423a-9971-b370992738ce
- cross_workspace_memory:b70c1a22-6834-4e59-936c-1945b04273b7
- memory:bf88c265-4749-4c50-85bc-4bae25298cd5
- memory:5ed86f53-b53e-4534-8e51-d3a010069d5e
- memory:105b328f-4bda-4641-90a7-7282ef156316
- memory:3f91189b-11a1-45bb-8357-4f413dc1609d
job_cited_source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
conflicts: []
supersedes: []
preferences:
- statement: Use the simplest correct implementation (KISS & YAGNI).
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Default commit only; push only on explicit request.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Run on Windows + WSL2 + Docker Desktop; containers use host.docker.internal
and listen on 0.0.0.0.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Configure Docker Desktop proxy to Manual with HTTP/HTTPS at http://127.0.0.1:7897.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Never perform blocking I/O inside async def; use def in FastAPI.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:39.614383+00:00'
updated_at: '2026-09-16T03:09:11.180111+00:00'
tags:
- development
- global
- context
---
# Current Development Context (Global)
## Core Principles
- Use the simplest correct implementation (KISS & YAGNI) and re‑use existing project frameworks, services, tools, and conventions. Avoid speculative dependencies or abstractions.
## Memory Workflow
- All project notes are kept exclusively in `aidocs/project_context.md`. The file has a fixed header and is never committed to the repository (`.gitignore`). Entries are added newest‑first with a second‑level timestamp.
## Git Commit Convention
- Default is to **commit only**; a push occurs only on explicit request.
- Commit messages follow the form `type: 中文一句话描述` where `type` ∈ `feat`, `fix`, `refactor`, `style`, `docs`, `chore`, `revert`.
## Development Platform
- Windows + WSL2 + Docker Desktop (Linux containers).
- Containers access host services via `host.docker.internal`. The host must listen on `0.0.0.0`.
- Bridge‑network access to host‑mapped ports uses the gateway address `172.17.0.1`.
## Docker Hub Proxy
- Docker Desktop must be set to **Manual** with both HTTP and HTTPS pointing to `http://127.0.0.1:7897`. Restart Docker and verify `docker pull` successful before any build.
## Common Technical Pitfalls and Mitigations
- **FastAPI async** – Never perform blocking I/O inside `async def` (pymysql, requests, file I/O, etc.). Use `def` so FastAPI moves it to a thread‑pool.
- **PowerShell JSON** – Write JSON to a temporary file then send with `curl.exe --data-binary @file` to preserve quotes.
- **Large‑table SQL** – Add indexes on commonly queried text columns; unify DB `read/write_timeout=3600s` and client upload/run timeouts `1800s/7200s`.
- **Docker Exec timeout** – Obtain raw socket and call `socket.settimeout(None)` to disable the default 3 s timeout.
- **Wheel & sdist download** – Use `--platform manylinux2014_x86_64` for manylinux wheels; for sdist‑only packages download tar.gz via PyPI JSON API.
- **Docker Hub proxy** – Configure Docker Desktop to use Manual proxy with HTTP/HTTPS at `http://127.0.0.1:7897` and restart.
## Git Rules
- See curated rule `cross_workspace_memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2` for commit style and default local‑only commits.
## Project Memory Management
- All notes kept in `aidocs/project_context.md`. The `aidocs/` directory is in `.gitignore` and never committed.
@@ -0,0 +1,85 @@
---
title: Global Development Principles and Operational Rules
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/global-development-principles-and-operational-rules
stable_id: 7b5a1fcd-adea-4418-ac8e-2f6275b5ada6
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: context_general
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:bf88c265-4749-4c50-85bc-4bae25298cd5: '4'
memory:5ed86f53-b53e-4534-8e51-d3a010069d5e: '2'
memory:105b328f-4bda-4641-90a7-7282ef156316: '2'
memory:3f91189b-11a1-45bb-8357-4f413dc1609d: '1'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:7b5a1fcd-adea-4418-ac8e-2f6275b5ada6
- curated_baseline:d3a20d44-6001-4c88-8772-65dbfac75e6e
- cross_workspace_memory:6e63a053-fea4-4785-984c-b61fab08810a
- cross_workspace_memory:61e30ee3-0e26-4d64-b00e-f77bc3a3fd60
- cross_workspace_memory:df065dbf-85de-4f2b-bbb1-5d8b115de08c
- cross_workspace_memory:9f00df57-ec45-4d63-9da6-9b2fb16c2d6b
- cross_workspace_memory:0f19c98d-0d69-4702-af18-e75edae6370a
- cross_workspace_memory:1dfbc803-3390-4cc7-9a17-6bf86c9bb165
- cross_workspace_memory:5924806e-b234-49f7-b971-3c844fd07cf3
- curated_baseline:2b47472d-3ac2-4394-8646-c6bf1c0fc270
- memory:bf88c265-4749-4c50-85bc-4bae25298cd5
- memory:5ed86f53-b53e-4534-8e51-d3a010069d5e
- memory:105b328f-4bda-4641-90a7-7282ef156316
- memory:3f91189b-11a1-45bb-8357-4f413dc1609d
- cross_workspace_memory:b3fc5d7e-f1d7-4a63-860b-37f9f35cb136
- cross_workspace_memory:41e5bdb5-a67b-49bc-b8a6-ab20b4c66fca
- cross_workspace_memory:23bcc4c0-4992-41d6-b70e-210937a76a0f
- cross_workspace_memory:db92ba17-fcee-4f1d-9593-6b325105e482
- cross_workspace_memory:340af5e9-b3e5-423a-9971-b370992738ce
- cross_workspace_memory:b70c1a22-6834-4e59-936c-1945b04273b7
job_cited_source_ids:
- curated_baseline:7b5a1fcd-adea-4418-ac8e-2f6275b5ada6
conflicts: []
supersedes: []
preferences: []
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:54.432494+00:00'
updated_at: '2026-09-16T03:09:24.893133+00:00'
tags:
- general
---
# Current context_general
## 全局发展上下文(中文)
- **核心原则 (KISS & YAGNI)**:使用最简且正确的实现,复用项目已有的框架、服务、工具与约定,避免为假设需求引入依赖或抽象层。
- **开发平台**:统一使用 **Windows + WSL2 + Docker Desktop**(Linux 容器)。容器访问宿主服务通过 `host.docker.internal`,宿主服务必须监听 `0.0.0.0`。桥接网络访问宿主映射端口使用网关 `172.17.0.1`。
- **Docker Hub 代理配置**:Docker Desktop 代理必须设为 **Manual**,HTTP 与 HTTPS 均填写 `http://127.0.0.1:7897`,保存后重启 Docker 并验证 `docker pull` 正常后再进行构建。
- **常见技术坑与对策**:
- *FastAPI async*:不要在 `async def` 内执行阻塞 I/O(pymysql、requests、文件 I/O 等)。改为普通 `def`,FastAPI 会自动转入线程池。
- *PowerShell JSON*:先将 JSON 写入临时文件,再使用 `curl.exe --data-binary @file` 发送,以保持引号。
- *大表 SQL*:对无索引文本列建索引;统一提升 DB `read/write_timeout=3600s`、客户端 `upload_timeout=1800s`、`run_timeout=7200s`。
- *Docker exec 超时*:获取裸 socket 后调用 `socket.settimeout(None)`,取消默认 3 s 超时。
- *Wheel 与 sdist 下载*:对 manylinux2014 wheel 采用 `--platform manylinux2014_x86_64`,sdist‑only 包通过 PyPI JSON API 下载源码 tar.gz。
- *Docker Hub 代理*:在 Docker Desktop 中手动配置 `HTTP/HTTPS=http://127.0.0.1:7897` 并重启 Docker。
- **Git 规则**:见 curated 规则 `cross_workspace_memory:aa56cfd5-4cbf-4bbd-b589-03aaed17acb2`,默认仅 commit,除非用户明确请求推送。
- **项目记忆管理**:所有笔记保存在 `aidocs/project_context.md`,`.gitignore` 中不提交任何改动。
@@ -0,0 +1,111 @@
---
title: Office Collaboration Guidelines
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/office-collaboration-guidelines
stable_id: 1d00b33d-2bf5-4890-bf34-0645e483e216
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: context_office
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:ff34c6eb-6bba-41e5-9e43-ff80941fa823: '2'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
- curated_baseline:416ac7c5-22a5-414a-be97-6b30deccf8e2
- curated_baseline:6973450e-6ecc-48e3-8cdd-4d7d7707d843
- memory:ff34c6eb-6bba-41e5-9e43-ff80941fa823
job_cited_source_ids:
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
conflicts: []
supersedes: []
preferences:
- statement: Default communication language is Chinese.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Ensure all steps work on Windows (WSL2 + Docker Desktop).
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Report progress to stakeholders continuously.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Prioritize long‑term reusable deployment configurations.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:1d00b33d-2bf5-4890-bf34-0645e483e216
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:42.431751+00:00'
updated_at: '2026-09-16T03:09:13.807629+00:00'
tags:
- office
- global
---
# Current Office Context (Global)
## Communication
- Default language is Chinese; switch only on explicit request.
## Environment Compatibility
- All development steps (commands, paths, validation) work on Windows (with WSL2 and Docker Desktop).
## Project Understanding & Progress Reporting
- Before any change, fully understand the existing codebase and continuously inform stakeholders. Tasks that can be completed and verified independently should be finished immediately.
## Private Deployment Priority
- Favor configurations that are easy to set up once and reusable long‑term, emphasizing system capability and user convenience over speculative risk mitigation.
## Tags
["office","global"]
@@ -0,0 +1,128 @@
---
title: Research & Production Constraints
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/research-production-constraints
stable_id: 23340925-d052-4393-952a-b1daf798cce3
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: context_research
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions: {}
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
- cross_workspace_memory:23bcc4c0-4992-41d6-b70e-210937a76a0f
- cross_workspace_memory:db92ba17-fcee-4f1d-9593-6b325105e482
- cross_workspace_memory:340af5e9-b3e5-423a-9971-b370992738ce
- cross_workspace_memory:b70c1a22-6834-4e59-936c-1945b04273b7
- cross_workspace_memory:41e5bdb5-a67b-49bc-b8a6-ab20b4c66fca
- cross_workspace_memory:b3fc5d7e-f1d7-4a63-860b-37f9f35cb136
- curated_baseline:8a861a5f-35c3-4f95-bd5b-6b2297888f56
job_cited_source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
conflicts: []
supersedes: []
preferences:
- statement: Use canonical password‑vault index names as listed.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Remove TSO from DTB and switch TCP congestion to Cubic.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Never flash generic RK3568 image; use provided boot and config.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Encode datetime/UUID/Pydantic before json.dumps.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Bitwarden snapshots reduce latency to ~0.4 s on ARM64.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:23340925-d052-4393-952a-b1daf798cce3
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:48.729821+00:00'
updated_at: '2026-09-16T03:09:19.514321+00:00'
tags:
- research
- global
---
# Current Research Context (Global)
## Global Password‑Vault Index
- Canonical names: `MemRelay Administrator`, `BDYG18Pro Armbian SSH`, `OpenWrt Router SSH`, `Public FRPS Server SSH`, `FRP ali.asio.asia Token`, `Gitea git.asio.asia OAuth`, `Armbian MySQL Root`.
## Network Stack Adjustments (TSO & Cubic)
- Hardware TSO incompatible with RTL8367S DSA; removed `snps,tso` from the DTB. Default TCP congestion algorithm switched from Reno to Cubic.
## Flashing & Recovery Safety Rules
- Do **not** flash the generic RK3568 image. Use the project‑provided U‑Boot, DTB, and RTL8367S/DSA configuration. Verify storage type, image SHA‑256, and backup status before writing.
## Production‑grade MCP JSON Serialization
- Objects containing `datetime`, `UUID` or Pydantic models must be passed through FastAPI `jsonable_encoder` before `json.dumps`.
## Vault Performance Audit
- In‑process Bitwarden snapshots reduce list/search latency from ~20 s to ~0.4 s on ARM64. All audit checks pass.
## Tags
["research","global"]
@@ -0,0 +1,99 @@
---
title: Study & Knowledge Capture Practices
type: curated
permalink: main/global/curated/7aee455b-24cc-4008-bdaf-443721e6f939/contexts/study-knowledge-capture-practices
stable_id: 293586da-c6d2-41da-9ea7-701e3974d19f
scope: global
project_id: null
workspace_type: global
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
preference_context: global
document_type: context_study
revision: 9
source_memory_ids:
- d8161df6-3159-46c9-9402-c5ab30d1436e
source_checkpoint_ids: []
source_file_ids: []
source_git_commit: null
source_git_commits: []
source_agent_sync_ids: []
model_connection: Sub2API
model_name: openai/gpt-oss-20b
source_count: 90
source_revisions:
memory:5ed86f53-b53e-4534-8e51-d3a010069d5e: '2'
memory:105b328f-4bda-4641-90a7-7282ef156316: '2'
memory:3f91189b-11a1-45bb-8357-4f413dc1609d: '1'
source_dispositions:
processed: 90
unchanged: 0
unsupported: 0
skipped: 0
cited_source_ids:
- curated_baseline:293586da-c6d2-41da-9ea7-701e3974d19f
- memory:5ed86f53-b53e-4534-8e51-d3a010069d5e
- memory:105b328f-4bda-4641-90a7-7282ef156316
- memory:3f91189b-11a1-45bb-8357-4f413dc1609d
job_cited_source_ids:
- curated_baseline:293586da-c6d2-41da-9ea7-701e3974d19f
conflicts: []
supersedes: []
preferences:
- statement: Use aidocs/project_context.md as the only project note store.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:293586da-c6d2-41da-9ea7-701e3974d19f
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: Query Vaultwarden before any sensitive action; exact match used directly.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:293586da-c6d2-41da-9ea7-701e3974d19f
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
- statement: AI‑driven memory aggregation disabled by default.
level: global
workspace_types: []
workspace_ids: []
source_ids:
- curated_baseline:293586da-c6d2-41da-9ea7-701e3974d19f
counterexample_source_ids: []
occurrence_count: 1
explicit: true
confidence: 1.0
status: current
source_cursor: 571
source_hash: b84354eb37ab531c5be3076d5c3f130399f235bc33c8cf9453cbfcecae042e49
prompt_version: 2026-08-12.3
schema_version: '3'
curation_job_id: ef77eb26-e282-4e81-88c8-7d622d14ccc7
created_at: '2026-08-08T07:55:45.147252+00:00'
updated_at: '2026-09-16T03:09:16.406956+00:00'
tags:
- study
- global
---
# Current Study Context (Global)
## Project Activity Log
- Use `aidocs/project_context.md` as the sole source of project notes. The file has a fixed header and entries are added newest‑first with a second‑level timestamp containing **what, why, validation, issues, next steps**.
## Credential Handling
- Before any exploratory login, SSH, database or API call, query Vaultwarden. If exactly one match, use it directly. New or updated credentials must be written to the password vault immediately; notes record only the entry name, purpose and usage method – never the secret itself.
## Optional AI Assistance
- AI‑driven memory aggregation is **disabled by default**; the system will not load models or create a `.git` directory without explicit enable.
## Tags
["study","global"]
+27
View File
@@ -0,0 +1,27 @@
---
title: 交流语言
type: preference
permalink: main/global/交流语言
stable_id: 7429c22e-50ff-458a-97c0-423c679904c7
scope: global
memory_type: preference
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 2
request_id: a4751fdc-8c77-4172-a138-8af148a304fe
created_at: '2026-08-25T07:45:48.399582+00:00'
updated_at: '2026-09-01T12:43:28.000955+00:00'
tags:
- global
---
# 偏好
## 偏好内容
- 日常交流使用中文
## 适用场景
- 适用于所有场景,包括但不限于 日常交流、代码注释等
+21
View File
@@ -0,0 +1,21 @@
---
title: 做题先给已确定答案
type: preference
permalink: main/global/做题先给已确定答案
stable_id: 9988effa-80c9-4062-97a2-8a5f40e3856a
scope: global
memory_type: preference
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 1
request_id: 20260917-pref-quiz-answer-first
created_at: '2026-09-17T07:29:25.224657+00:00'
updated_at: '2026-09-17T07:29:25.224657+00:00'
tags:
- 答题
- 沟通
- 优先给答案
---
答题或看截图做题时:已经能确定的题目立刻先给选项/对错,不要等全部题目查完再一次性输出。不确定、需要检索的题可以后补,但已知答案必须先出。
+26
View File
@@ -0,0 +1,26 @@
---
title: 凭证与记忆边界
type: rule
permalink: main/global/凭证与记忆边界
stable_id: 105b328f-4bda-4641-90a7-7282ef156316
scope: global
memory_type: rule
project_id: null
status: active
revision: 2
request_id: b10b7eee-809d-461b-9cfc-ebb4278fe4af
updated_at: '2026-08-02T21:15:11.036241+00:00'
tags:
- global
- rule
- vault
- credentials
created_at: '2026-08-02T09:39:36.268858+00:00'
---
# 凭证与记忆边界
- 登录、SSH、数据库和 API 操作前先搜索 Vaultwarden;唯一匹配时直接使用,不重复询问。
- 开发或日常任务中新获得、生成或修改的账号、密码、Token、API 密钥和 TOTP 种子立即写入密码库。
- 普通记忆只记录密码库条目名称、用途和使用方式,不保存秘密值。
- 当前正式基础设施条目包括 BDYG18Pro、OpenWrt、MySQL、MemRelay、Gitea OAuth、FRP Token 和公网 FRPS 服务器。
@@ -0,0 +1,24 @@
---
title: 功能完成即提交并按远端状态推送
type: rule
permalink: main/global/功能完成即提交并按远端状态推送
stable_id: 2406be77-e6ce-4572-890e-18747c968f55
scope: global
memory_type: rule
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 3
request_id: airules-global-git-workflow-20260916-1140
created_at: '2026-09-16T03:28:01.309765+00:00'
updated_at: '2026-09-16T03:40:32.035813+00:00'
tags:
- rules
- git
- commit
- push
- rebase
- linear-history
---
此规则取代旧的“默认仅 commit、明确要求才 push”规则。每个可独立交付的功能完成并验证后立即提交;仓库存在远端时提交后推送对应远端分支,没有远端时仅本地提交且不擅自创建远端。推送前先 fetch,远端有新提交时将本地提交 rebase 到远端最新状态后再推送;推送被拒绝时先排查原因,未经用户明确确认不得使用 --force 或 --force-with-lease。功能分支达到可集成状态且目标分支明确时主动合并:优先把功能分支 rebase 到最新目标分支,再以 fast-forward 合并,保持单一、线性的提交历史,避免无意义 merge commit。若仓库存在分支保护、PR 评审或 CI 门禁流程,不直接合并进目标分支,改为推送功能分支并创建 PR。rebase/合并后重新验证;冲突必须理解双方改动后解决。已发布或共享分支若 rebase 需要强制推送,未经确认不得改写远端历史。合并完成且存在远端时推送目标分支,不擅自发布或部署。提交信息格式为 type: 中文一句话描述,type 使用 feat/fix/refactor/style/docs/chore/revert。
+25
View File
@@ -0,0 +1,25 @@
---
title: 协作与语言偏好
type: preference
permalink: main/global/协作与语言偏好
stable_id: ff34c6eb-6bba-41e5-9e43-ff80941fa823
scope: global
memory_type: preference
project_id: null
status: active
revision: 2
request_id: 00c95ab6-a578-4b9c-8efd-1a9110589a4e
updated_at: '2026-08-02T21:15:07.064609+00:00'
tags:
- global
- preference
- collaboration
created_at: '2026-08-02T09:39:33.063854+00:00'
---
# 协作与语言偏好
- 默认使用中文沟通,除非明确要求其他语言。
- 当前开发环境为 Windows,命令、路径和验证方式应与 Windows 兼容。
- 先理解现有项目再实施,持续告知关键进展,能够独立完成的工作直接完成并验证。
- 私有个人/团队部署以系统能力、使用便利和一次配置长期复用为优先,不围绕假设风险削减正常能力。
@@ -0,0 +1,27 @@
---
title: 协作规则文档与 Cursor 本机全局安装位置
type: fact
permalink: main/global/协作规则文档与-cursor-本机全局安装位置
stable_id: 938fd87f-6a79-4765-b266-9aad0e8664de
scope: global
memory_type: fact
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 1
request_id: airules-20260916-global-rules-install-fact-01
created_at: '2026-09-16T13:20:09.098368+00:00'
updated_at: '2026-09-16T13:20:09.098368+00:00'
tags:
- rules
- cursor
- codex
- install
- collaboration-rules
---
跨客户端通用协作规则的维护主文件为 E:\code\AIRules\RULES.md(配套 SOURCES.md 记录来源与冲突取舍,README.md 记录安装方式)。正文与文件名不使用“AI”字样,正文不含适用范围、来源、整理日期等说明性文字,只保留规则本身。
Cursor 侧已按“本机级、不随账号同步、所有工作区生效”的要求安装为本地插件:%USERPROFILE%\.cursor\plugins\local\collaboration-rules\(.cursor-plugin\plugin.json 仅声明 name=collaboration-rules;rules\collaboration-rules.mdc = 前置元数据 alwaysApply: true + RULES.md 正文,UTF-8 无 BOM)。修改后需 Developer: Reload Window。未使用账号同步的 User Rules;未使用 %USERPROFILE%\.cursor\rules,因为该目录在工作区不在用户主目录下时会被忽略(Cursor 3.20.x 已知问题)。
Codex App/CLI 尚未安装:应把 RULES.md 正文写入 %USERPROFILE%\.codex\AGENTS.md(当前为空文件)。更新规则时先改 RULES.md,再用 README.md 中的 PowerShell 片段重新生成 .mdc,避免多份副本各自演变。
+33
View File
@@ -0,0 +1,33 @@
---
title: 开发实施原则
type: rule
permalink: main/global/开发实施原则
stable_id: bf88c265-4749-4c50-85bc-4bae25298cd5
scope: global
memory_type: rule
project_id: null
status: active
revision: 4
request_id: ff637b9f-54a3-4f33-b4f2-ff089b3fa15f
updated_at: '2026-08-05T12:19:24.102240+00:00'
tags:
- global
- rule
- development
created_at: '2026-08-02T09:39:33.919260+00:00'
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
---
# 开发实施原则
- 遵循 KISS 与 YAGNI,使用最简单且正确的实现。
- 优先复用项目已有框架、服务、工具和约定,不建立重复实现。
- 不添加为假设未来需求服务的依赖、抽象或基础设施。
- 修改范围与当前目标一致,测试覆盖随风险扩大;完成前清理临时内容和无用代码。
- 前端以真实工作流、桌面可用性、信息层级和无重叠为验收标准。
- Web 表单优先使用“标题在左、控件在右”的紧凑横向布局;Markdown、代码、备注等较大或多行内容使用“标题在上、内容在下”,并根据实际场景调整。
- Web 页面顶部标题区域在内容滚动时保持可见,页面操作继续放在标题区域右侧。
- Web 提示说明放在对应页面、分区或字段标题旁,以提示图标呈现并在鼠标悬停后显示;错误、警告和关键状态仍应直接展示。
- Web 弹窗的保存、取消等操作区域固定显示,不随正文滚动离开视口。
- Markdown 编辑/预览、多行文本、日志和长列表优先在控件内部滚动,并根据桌面浏览器可用高度自适应;避免让整个页面或弹窗承担长内容滚动。
- 表单标签列、控件列和分组间距保持紧凑一致,避免大面积无意义留白;标签页和列表需保留清晰内边距,不能贴边或被遮挡。
@@ -0,0 +1,21 @@
---
title: 开发记忆统一使用 MemRelay
type: preference
permalink: main/global/开发记忆统一使用-mem-relay
stable_id: 1194be51-ee29-47e1-8957-ec2888007db6
scope: global
memory_type: preference
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 1
request_id: global-memory-policy-memrelay-only-20260825
created_at: '2026-08-25T04:03:40.994879+00:00'
updated_at: '2026-08-25T04:03:40.994879+00:00'
tags:
- memory-policy
- memrelay
- global
---
所有项目的开发记忆统一由 MemRelay 持久管理。默认不得创建或更新本地 aidocs、project_context.md 或其他开发记忆副本;只有用户明确要求时才临时导出,并在使用后清理。
@@ -0,0 +1,22 @@
---
title: 未设置项目目录时不自动创建 MemRelay 项目
type: rule
permalink: main/global/未设置项目目录时不自动创建-mem-relay-项目
stable_id: ac8bb556-947d-43a1-87d9-bfe7e8da310b
scope: global
memory_type: rule
project_id: null
usage_profile_id: 7aee455b-24cc-4008-bdaf-443721e6f939
status: active
revision: 1
request_id: airules-global-no-project-autocreate-20260916-1144
created_at: '2026-09-16T03:44:56.802075+00:00'
updated_at: '2026-09-16T03:44:56.802075+00:00'
tags:
- rules
- memrelay
- project
- scope
---
当前会话未设置项目目录(无工作区、无明确工作目录的临时会话)时,除用户明确要求外,不得调用 project_resolve_or_create 或 project_create 创建 MemRelay 项目,也不得写入项目范围的记忆或检查点。此时只允许写入符合条件的全局范围记忆。会话开始时仍调用 capabilities_get 并读取全局规则;仅在已设置项目目录时才解析项目并读取项目上下文。
+27
View File
@@ -0,0 +1,27 @@
---
title: 项目记忆与 Git 工作流
type: rule
permalink: main/global/项目记忆与-git-工作流
stable_id: 5ed86f53-b53e-4534-8e51-d3a010069d5e
scope: global
memory_type: rule
project_id: null
status: active
revision: 2
request_id: d3147f88-103b-4a75-85bb-81ab5d6f3687
updated_at: '2026-08-02T21:15:08.786655+00:00'
tags:
- global
- rule
- git
- timeline
created_at: '2026-08-02T09:39:35.982002+00:00'
---
# 项目记忆与 Git 工作流
- 项目本地记忆使用 `aidocs/project_context.md`,说明固定在顶部,新记录紧随说明之后。
- 记录按精确到秒的时间倒序排列,形成可追溯的开发时间线,并写明做了什么、原因、验证、问题与下一步。
- `aidocs/` 默认加入 `.gitignore`,本地记忆不提交。
- 完成任务后清理、更新记忆、检查全部工作树改动并提交有意义变更,提交格式为 `<type>: <中文说明>`。
- 非当前会话的合理用户修改在确认不破坏代码且不含敏感信息后一起提交。