dev-manager-tauri/CLAUDE.md
lanrtop 56536effff feat: P2 CONVENTIONS 动态化——梦核建议可直接写入并分发
- 新增用户版 CONVENTIONS 存储层(app_data_dir/conventions/CONVENTIONS.md)
  - OnceLock 初始化目录,effective_conventions_content() 用户版优先 fallback 内置
  - invalidate_effective_cache() 写入/重置后清除缓存

- 新增三个 Tauri command
  - get_user_conventions_status:返回来源(builtin/user)、版本、内容
  - save_user_conventions:解析 frontmatter version,写入用户版,自动同步所有项目
  - reset_conventions_to_builtin:删除用户版,自动同步回内置版

- sync_blueprint_rules / build_init_prompt / build_sync_prompt / generate_muhe_prompt
  全部切换为 effective_conventions_content(),规则更新无需发版

- GovernancePanel 新增规则编辑器 UI
  - 来源 badge(内置基线 / 用户自定义)
  - 「应用梦核建议」区域:粘贴新内容 + 确认写入 + 同步进度提示
  - 「重置为基线」按钮(仅用户版存在时显示)
2026-04-08 03:27:04 +09:00

63 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 炼境 (Dev Manager Tauri)
Git 多空间开发管理器Tauri v2 + React + TypeScript + Rust。
<!-- 手动维护区:只放技术栈、目录结构、技能规则。蓝图工作流由下方 MANAGED 块统一管理,勿在此重复。 -->
## 技术栈
- 前端React 19 + TypeScript + TailwindCSS + React Query + Zustand + React Flow
- 后端Rust + Tauri v2 + SQLite (rusqlite + r2d2)
- 包管理pnpm禁止 npm/yarn
- CI/CDGitHub Actions + 阿里云 OSS详见 docs/tauri-cicd-guide.md
- 客户端更新tauri-plugin-updater详见 docs/tauri-updater-guide.md
## 目录结构
```
src/ 前端源码
src/components/ React 组件(按功能分目录)
src/lib/commands.ts Tauri command 调用封装
src-tauri/src/ Rust 后端
src-tauri/src/commands/ Tauri command 实现
.blueprint/ 项目蓝图manifest + 模块详情 + 任务卡)
docs/ 部署和更新指南
```
## 技能使用规则
根据任务卡 complexity 决定执行后的检查:
| complexity | 执行后必跑 |
|-----------|-----------|
| S简单增删改 | /code-review → /smart-commit |
| M中等逻辑 | /Dev-edge-case → /code-review → /smart-commit |
| L复杂应先拆 | /architect → /splitter → 拆成 S/M |
- 新功能设计阶段:/architect
- 代码重构/简化:/simplify → /code-review
- 发现深层问题:/Dev-deep-think
<!-- BLUEPRINT_MANAGED_START version="1.4.2" -->
## 项目蓝图
本项目使用 `.blueprint/` 目录维护项目全景架构图,驱动需求讨论和任务管理。
**每次对话都应遵循以下流程:**
### 1. 了解当前状态
对话开始时,先读取 `.blueprint/manifest.yaml` 了解项目模块和状态。
### 2. 讨论需求时更新蓝图
- 确认了新需求 → 在 manifest.yaml 新增模块,创建 `.blueprint/modules/<id>.md`
- 拆分了大需求 → 在模块文件中添加任务卡
- 调整了方向 → 更新模块关系edges
### 3. 完成实现后标记蓝图
- 完成了功能 → 更新对应任务卡状态为 `done`(前缀改为 ✅)
- 更新 manifest.yaml 顶部的 `updated` 日期
### 4. 任务卡规范
详见 `.blueprint/CONVENTIONS.md`,核心规则:
- 任务卡同时具备 `files` + `acceptance` + complexity `S/M` → 标记为 📋 可派发
- 可派发的任务卡可以直接交给 Claude Agent 独立完成
<!-- BLUEPRINT_MANAGED_END -->