Skip to content

Commit 7269561

Browse files
cipchkclaude
andcommitted
chore: update CLAUDE.md and add AGENTS.md workflow guide
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7110e2a commit 7269561

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

.claude/AGENTS.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Agent Workflow Guide
2+
3+
## 开发流程
4+
5+
### 1. 需求分析
6+
7+
- 先探索代码库,理解现有结构和约定
8+
- 查看 CLAUDE.md 了解项目整体规范
9+
10+
### 2. 设计(必须)
11+
12+
**技能**: `/superpowers:brainstorming`
13+
14+
- 参考 NG-ALAIN.md、DEVELOPMENT.md 了解项目和编码规范
15+
- 一次只问一个问题,提供 2-3 个方案对比并给出推荐
16+
- 涉及 UI 时使用视觉伴侣展示方案
17+
- 每一层逐一确认(接口层 → 组件层 → 模板层 → 样式层)
18+
- 确认后输出设计文档到 `docs/superpowers/specs/`(不提交)
19+
- 用户确认 spec 后才能进入下一步
20+
21+
### 3. 实现计划
22+
23+
**技能**: `writing-plans`
24+
25+
- 基于 spec 编写实现计划,包含文件路径、完整代码、测试代码、命令
26+
- 保存到 `docs/superpowers/plans/`(不提交)
27+
- 自检通过后提供给用户确认
28+
29+
### 4. 实现
30+
31+
**技能**: `subagent-driven-development`
32+
33+
- 一个任务一个 subagent,每个只获得它需要的上下文
34+
- 每个任务后做两阶段 review:spec 合规 → 代码质量
35+
- 有问题让 subagent 修复,循环直到通过
36+
- 全部完成后做 final code review
37+
38+
### 5. 测试 & Lint
39+
40+
- 参考 TESTING.md
41+
- 仅跑相关模块测试(`ng test --include="**/<module>/**"`),提交前跑完整套件
42+
- ESLint 0 错误(先用 `eslint --fix`
43+
- `tsc --noEmit` 通过
44+
45+
### 6. 文档
46+
47+
- 参考 DOCUMENTATION.md
48+
- 中英文同步更新(`*.zh-CN.md` / `*.en-US.md`),`demo/` 提供示例
49+
50+
### 7. Code Review
51+
52+
- 通过 GitHub MCP 查询 CI 状态
53+
- 处理 Gemini Code Assist bot 的建议
54+
- Lint 失败先用 `eslint --fix`
55+
56+
### 8. PR
57+
58+
- 分支命名:`feat-<package>-<feature>`
59+
- 首次提交整理为 feat、test、docs、chore 各一个(`--fixup` + `--autosquash`
60+
- 后续微调直接追加,不再合并
61+
- `docs/superpowers/``.superpowers/` 不纳入版本控制
62+
- 合入在 GitHub 网站操作

.claude/CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ You are an expert in TypeScript, Angular, and scalable web application developme
1111
- Always use standalone components over NgModules
1212
- Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v21+.
1313
- Use signals for state management
14+
- Use `input()` and `output()` functions instead of `@Input()` / `@Output()` decorators for new code
15+
- Use `signal()` for internal state, `model()` for two-way binding state
16+
- Prefix internal properties accessible from templates with `_` (e.g. `_btn`, `_hasCollapse`)
1417
- Implement lazy loading for feature routes
1518
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
1619
- Use `NgOptimizedImage` for all static images.

0 commit comments

Comments
 (0)