Files
dcalc/AGENTS.md
T
2026-05-18 20:02:16 +08:00

56 lines
2.3 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.
# dcalc Agent Guide
本仓库前端迁移主线是将 frontend 迁移到 frontendNew。
## Scope
- 主线目录:frontendNew
- 对照目录:frontend(仅用于行为对照,不作为新实现落点)
- 本仓库优先维护 Dcalc Character 模块:equipment、skill、forge、result
## Runbook
- frontendNew 开发:`cd frontendNew && pnpm install && pnpm dev`
- frontendNew 质量检查:`pnpm type-check && pnpm lint && pnpm build`
- backend 开发:`cd backend && uv sync && python main.py`
## Non-Negotiables
- 不要改动 /calc 的 API 契约与 IResult 数据结构。
- 不要打破配置链路:config 变化 -> result.execute -> saveConfig。
- 不要为了 UI 重构而改写 Skill/Forge 的核心业务逻辑。
- 优先复用 frontendNew 现有 shadcn-vue 组件,不引入新的 UI 框架。
## Frontend Migration Priorities
1. P0:Skill 配置回写完整(VP/UP 约束与持久化一致)。
2. P0:Forge 配置编辑完整(装备/誓约/时装/徽章联动计算)。
3. P0:Result 完整展示(loading/error/empty/success 四态与伤害明细)。
4. P1:响应式体验优化(桌面双栏,移动端结果抽屉)。
5. P1:Tab 汇总(装备详情/结果、技能详情/结果切换)。
## Design/Docs Entry
- [README](README.md)
- [frontendNew README](frontendNew/README.md)
- [frontendNew Migration Plan](frontendNew/MIGRATION_PLAN.md)
- [frontendNew Design](frontendNew/DESIGN.md)
- [角色信息与结果链路专项分析](frontend-角色信息与计算结果展示链路-专项分析.md)
- [装备技能打造交互与布局设计](frontend-装备技能打造-完整交互与布局设计文档.md)
## Key Code Entry
- [Character Container](frontendNew/src/pages/Dcalc/Character/Index.vue)
- [Result Panel](frontendNew/src/pages/Dcalc/Character/Result/Index.vue)
- [Skill Page](frontendNew/src/pages/Dcalc/Character/Skill/index.vue)
- [Forge Page](frontendNew/src/pages/Dcalc/Character/Forge/index.vue)
- [Config Store](frontendNew/src/stores/config.ts)
- [Router](frontendNew/src/router/index.ts)
## Implementation Bias
- 同页配置 + 结果展示优先。
- Skill/Forge 在交互上尽量小改,优先行为兼容。
- 新增交互优先使用低侵入方式:Tab、Sheet、折叠区。
- 文档遵循 link-not-embed:链接现有文档,不重复长文说明。