D1 免登录改造:App 启动直接进主界面,删 LoginPage/github.rs/OAuth 全套命令、
Sidebar 账户区与 GitHub OAuth 设置弹窗、健康检查 GitHub Token 项
D2 移除发布/导入/PR/CI 入口:删 PublishModal/ImportRepoModal、ProjectCard 的
PR compare 链接与 Actions 状态灯、RepoRegistryModal 同步 tab、CicdModal runs tab、
publish.rs 的 github_create_repo/git_push_to_github
D3 spacesSync 单机化:删 spacesSync/useSpacesSync/SpacesPage/DiscoveryPanel,
拆除 App→Dashboard→ProjectCard 的 spacesJson 链
D4 git_ops 凭据链重写:ssh agent → git credential helper → gitea_instances token
前缀匹配 → default,不再依赖 github_token
保留:server_software GitHub 镜像(Releases 下载加速)、gitea_migrate 迁移入口、
cicd.rs(待 Gitea Actions 改造卡);DB 表不删(R05 migration 兼容)
顺带:修复 servers.rs 两个存量测试的 schema 漂移(测试建表缺 deploy_type 列);
包含会话前未提交的 agent-infra F3(get_agent_health 健康诊断,与 lib.rs/
commands.ts 物理耦合无法拆分提交)
验证:cargo test 53 passed / typecheck 全绿 / vitest passWithNoTests
85 lines
3.8 KiB
Markdown
85 lines
3.8 KiB
Markdown
# 炼境 (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/CD:GitHub 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 实现
|
||
src-tauri/resources/onboarding/ 接入包分发模板(AGENTS.md、git-workflow、lefthook)
|
||
.blueprint/ 项目蓝图(manifest + 模块详情 + 任务卡)
|
||
.claude/rules/ 路径注入规则(tauri-contract / db-schema / onboarding-sync)
|
||
AGENTS.md 跨工具 AI 上下文(四支柱 + 元规则,单一来源)
|
||
docs/ai-context/ AI 速查文档(project-brief.md、project-context.yaml)
|
||
docs/templates/ 炼境接入包模板草案(agents-meta-rules 等)
|
||
```
|
||
|
||
## 命令执行规则
|
||
|
||
- 所有命令直接用 Bash tool 执行,禁止输出命令让用户手动运行
|
||
- `pnpm tauri build` / `cargo build --release` 等 Rust 构建用 `run_in_background: true` + `timeout: 600000`(首次编译可能需要 10 分钟)
|
||
- 超过 10 分钟的任务(如完整 release build)改为输出单行完整命令,让用户 `! <命令>` 一键执行
|
||
|
||
## 技能使用规则
|
||
|
||
根据任务卡 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.8.0" -->
|
||
## 项目蓝图
|
||
|
||
本项目使用 `.blueprint/` 目录维护项目全景架构图,驱动需求讨论和任务管理。
|
||
|
||
### 对话开始时必须执行
|
||
|
||
1. 读取 `.blueprint/manifest.yaml` 了解项目全景和当前状态
|
||
2. 读取 `.blueprint/CONVENTIONS.md` 了解完整工作流规则
|
||
|
||
### 需求讨论 → 蓝图同步规则
|
||
|
||
| 用户说的 | Claude 应做的 |
|
||
|----------|--------------|
|
||
| "我想加个 XX 功能" | 确认需求后:manifest 新增模块(status: concept),创建 `.blueprint/modules/<id>.md` |
|
||
| "XX 功能需要 A、B、C" | 在模块文件中拆分为任务卡 |
|
||
| "这个方案确定了" | 模块 status → planned,补充任务卡 files/acceptance |
|
||
| "开始做 XX" | 模块 status → in_progress |
|
||
| 没提蓝图但在讨论功能 | 主动提议更新蓝图 |
|
||
|
||
### 复杂度决策(讨论新功能 / 拆解需求时)
|
||
|
||
| complexity | 执行流程 |
|
||
|-----------|---------|
|
||
| S / M | 直接拆任务卡,确保每张卡有 `files` + `acceptance` + `complexity` → 标记 📋 |
|
||
| L(复杂系统设计) | 先 `/architect` 输出设计文档,用户确认后 `/splitter` 拆成 S/M 任务卡 |
|
||
|
||
> L 级任务禁止直接写代码,必须先经过 `/architect` → `/splitter` 流程。
|
||
|
||
### 任务执行两阶段提交
|
||
|
||
- **开始写代码前**:任务卡前缀改为 🔵,status → in_progress
|
||
- **完成验收后**:任务卡前缀改为 ✅,status → done,更新 manifest `updated` 日期
|
||
|
||
完整规则(迭代管理、阻塞处理、复盘笔记等)详见 `.blueprint/CONVENTIONS.md`。
|
||
<!-- BLUEPRINT_MANAGED_END -->
|