@fitlab-ai/agent-infra 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -15
- package/README.zh-CN.md +23 -15
- package/lib/defaults.json +5 -9
- package/lib/init.js +1 -6
- package/lib/update.js +0 -55
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.md +17 -7
- package/templates/.agents/QUICKSTART.zh-CN.md +23 -13
- package/templates/.agents/README.md +33 -27
- package/templates/.agents/README.zh-CN.md +35 -29
- package/templates/.agents/skills/analyze-task/SKILL.md +1 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/block-task/SKILL.md +1 -5
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/check-task/SKILL.md +1 -5
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/close-codescan/SKILL.md +1 -4
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/close-dependabot/SKILL.md +1 -4
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/commit/SKILL.md +26 -198
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +26 -197
- package/templates/.agents/skills/commit/reference/commit-message.md +60 -0
- package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +60 -0
- package/templates/.agents/skills/commit/reference/copyright-check.md +39 -0
- package/templates/.agents/skills/commit/reference/copyright-check.zh-CN.md +39 -0
- package/templates/.agents/skills/commit/reference/task-status-update.md +88 -0
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +88 -0
- package/templates/.agents/skills/complete-task/SKILL.md +1 -6
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/create-issue/SKILL.md +32 -251
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +33 -252
- package/templates/.agents/skills/create-issue/reference/label-and-type.md +77 -0
- package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +77 -0
- package/templates/.agents/skills/create-issue/reference/template-matching.md +45 -0
- package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +45 -0
- package/templates/.agents/skills/create-pr/SKILL.md +39 -221
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +39 -220
- package/templates/.agents/skills/create-pr/reference/branch-strategy.md +29 -0
- package/templates/.agents/skills/create-pr/reference/branch-strategy.zh-CN.md +29 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.md +86 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +86 -0
- package/templates/.agents/skills/create-release-note/SKILL.md +10 -13
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/create-task/SKILL.md +2 -5
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/implement-task/SKILL.md +47 -176
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +43 -170
- package/templates/.agents/skills/implement-task/reference/implementation-rules.md +58 -0
- package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +58 -0
- package/templates/.agents/skills/implement-task/reference/report-template.md +63 -0
- package/templates/.agents/skills/implement-task/reference/report-template.zh-CN.md +63 -0
- package/templates/.agents/skills/import-codescan/SKILL.md +1 -4
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-dependabot/SKILL.md +1 -4
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-issue/SKILL.md +2 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +2 -3
- package/templates/.agents/skills/init-labels/SKILL.md +1 -4
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/init-milestones/SKILL.md +1 -3
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/plan-task/SKILL.md +1 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/refine-task/SKILL.md +40 -162
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +38 -158
- package/templates/.agents/skills/refine-task/reference/fix-workflow.md +76 -0
- package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +76 -0
- package/templates/.agents/skills/refine-task/reference/report-template.md +38 -0
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +38 -0
- package/templates/.agents/skills/refine-title/SKILL.md +1 -4
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/release/SKILL.md +10 -12
- package/templates/.agents/skills/release/SKILL.zh-CN.md +10 -11
- package/templates/.agents/skills/review-task/SKILL.md +37 -239
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +37 -238
- package/templates/.agents/skills/review-task/reference/output-templates.md +72 -0
- package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +72 -0
- package/templates/.agents/skills/review-task/reference/report-template.md +63 -0
- package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +63 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.md +24 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +24 -0
- package/templates/.agents/skills/sync-issue/SKILL.md +34 -490
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -489
- package/templates/.agents/skills/sync-issue/reference/comment-publish.md +84 -0
- package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +84 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.md +62 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +62 -0
- package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +37 -0
- package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +37 -0
- package/templates/.agents/skills/sync-pr/SKILL.md +37 -284
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +41 -288
- package/templates/.agents/skills/sync-pr/reference/comment-publish.md +82 -0
- package/templates/.agents/skills/sync-pr/reference/comment-publish.zh-CN.md +82 -0
- package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +54 -0
- package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +54 -0
- package/templates/.agents/skills/test/SKILL.md +1 -3
- package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/test-integration/SKILL.md +1 -4
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/update-agent-infra/SKILL.md +2 -6
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +45 -55
- package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
- package/templates/.claude/commands/analyze-task.md +1 -1
- package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.claude/commands/block-task.md +2 -1
- package/templates/.claude/commands/block-task.zh-CN.md +2 -1
- package/templates/.claude/commands/check-task.md +2 -1
- package/templates/.claude/commands/check-task.zh-CN.md +2 -1
- package/templates/.claude/commands/close-codescan.md +2 -1
- package/templates/.claude/commands/close-codescan.zh-CN.md +2 -1
- package/templates/.claude/commands/close-dependabot.md +2 -1
- package/templates/.claude/commands/close-dependabot.zh-CN.md +2 -1
- package/templates/.claude/commands/commit.md +1 -1
- package/templates/.claude/commands/commit.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-task.md +1 -1
- package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
- package/templates/.claude/commands/create-issue.md +1 -1
- package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/create-pr.md +2 -2
- package/templates/.claude/commands/create-pr.zh-CN.md +2 -2
- package/templates/.claude/commands/create-release-note.md +2 -1
- package/templates/.claude/commands/create-release-note.zh-CN.md +2 -1
- package/templates/.claude/commands/create-task.md +1 -1
- package/templates/.claude/commands/create-task.zh-CN.md +1 -1
- package/templates/.claude/commands/implement-task.md +1 -1
- package/templates/.claude/commands/implement-task.zh-CN.md +1 -1
- package/templates/.claude/commands/import-codescan.md +1 -0
- package/templates/.claude/commands/import-codescan.zh-CN.md +2 -1
- package/templates/.claude/commands/import-dependabot.md +1 -0
- package/templates/.claude/commands/import-dependabot.zh-CN.md +2 -1
- package/templates/.claude/commands/import-issue.md +1 -1
- package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/init-labels.md +1 -0
- package/templates/.claude/commands/init-labels.zh-CN.md +2 -1
- package/templates/.claude/commands/init-milestones.md +2 -1
- package/templates/.claude/commands/init-milestones.zh-CN.md +2 -1
- package/templates/.claude/commands/plan-task.md +1 -1
- package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
- package/templates/.claude/commands/refine-task.zh-CN.md +1 -1
- package/templates/.claude/commands/refine-title.md +2 -1
- package/templates/.claude/commands/refine-title.zh-CN.md +2 -1
- package/templates/.claude/commands/release.md +2 -1
- package/templates/.claude/commands/release.zh-CN.md +2 -1
- package/templates/.claude/commands/review-task.md +1 -1
- package/templates/.claude/commands/review-task.zh-CN.md +1 -1
- package/templates/.claude/commands/sync-issue.md +1 -1
- package/templates/.claude/commands/sync-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/sync-pr.md +2 -2
- package/templates/.claude/commands/sync-pr.zh-CN.md +2 -2
- package/templates/.claude/commands/test-integration.md +2 -1
- package/templates/.claude/commands/test-integration.zh-CN.md +2 -1
- package/templates/.claude/commands/test.md +1 -1
- package/templates/.claude/commands/test.zh-CN.md +1 -1
- package/templates/.claude/commands/update-agent-infra.md +2 -1
- package/templates/.claude/commands/update-agent-infra.zh-CN.md +2 -1
- package/templates/.claude/commands/upgrade-dependency.md +2 -1
- package/templates/.claude/commands/upgrade-dependency.zh-CN.md +2 -1
- package/templates/.gemini/commands/_project_/analyze-task.toml +1 -1
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/block-task.toml +1 -1
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/check-task.toml +1 -1
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/close-codescan.toml +1 -1
- package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/close-dependabot.toml +1 -1
- package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/commit.toml +1 -1
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/complete-task.toml +1 -1
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-pr.toml +1 -1
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-release-note.toml +1 -1
- package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-task.toml +1 -1
- package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/implement-task.toml +1 -1
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/plan-task.toml +1 -1
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-title.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/release.toml +1 -1
- package/templates/.gemini/commands/_project_/release.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/review-task.toml +1 -1
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-issue.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-pr.toml +2 -2
- package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +2 -2
- package/templates/.gemini/commands/_project_/test-integration.toml +1 -1
- package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/test.toml +1 -1
- package/templates/.gemini/commands/_project_/test.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/update-agent-infra.toml +1 -1
- package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/upgrade-dependency.toml +1 -1
- package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +1 -1
- package/templates/.github/hooks/check-version-format.sh +29 -0
- package/templates/.github/hooks/pre-commit +8 -0
- package/templates/.opencode/commands/analyze-task.md +1 -1
- package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/block-task.md +1 -1
- package/templates/.opencode/commands/block-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/check-task.md +1 -1
- package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/close-codescan.md +1 -1
- package/templates/.opencode/commands/close-codescan.zh-CN.md +1 -1
- package/templates/.opencode/commands/close-dependabot.md +1 -1
- package/templates/.opencode/commands/close-dependabot.zh-CN.md +1 -1
- package/templates/.opencode/commands/commit.md +1 -1
- package/templates/.opencode/commands/commit.zh-CN.md +1 -1
- package/templates/.opencode/commands/complete-task.md +1 -1
- package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-pr.md +1 -1
- package/templates/.opencode/commands/create-pr.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-release-note.md +1 -1
- package/templates/.opencode/commands/create-release-note.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-task.md +1 -1
- package/templates/.opencode/commands/create-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/implement-task.md +1 -1
- package/templates/.opencode/commands/implement-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-codescan.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-dependabot.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-issue.md +1 -1
- package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-milestones.md +1 -1
- package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
- package/templates/.opencode/commands/plan-task.md +1 -1
- package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/refine-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/refine-title.md +1 -1
- package/templates/.opencode/commands/refine-title.zh-CN.md +1 -1
- package/templates/.opencode/commands/release.md +1 -1
- package/templates/.opencode/commands/release.zh-CN.md +1 -1
- package/templates/.opencode/commands/review-task.md +1 -1
- package/templates/.opencode/commands/review-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/sync-issue.md +1 -1
- package/templates/.opencode/commands/sync-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/sync-pr.md +2 -2
- package/templates/.opencode/commands/sync-pr.zh-CN.md +2 -2
- package/templates/.opencode/commands/test-integration.md +1 -1
- package/templates/.opencode/commands/test-integration.zh-CN.md +1 -1
- package/templates/.opencode/commands/test.md +1 -1
- package/templates/.opencode/commands/test.zh-CN.md +1 -1
- package/templates/.opencode/commands/update-agent-infra.md +1 -1
- package/templates/.opencode/commands/update-agent-infra.zh-CN.md +1 -1
- package/templates/.opencode/commands/upgrade-dependency.md +1 -1
- package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +1 -1
- package/templates/.claude/CLAUDE.md +0 -176
- package/templates/.claude/CLAUDE.zh-CN.md +0 -176
- package/templates/.claude/project-rules.md +0 -65
- package/templates/.claude/project-rules.zh-CN.md +0 -65
- package/templates/.codex/README.md +0 -38
- package/templates/.codex/README.zh-CN.md +0 -37
- package/templates/.opencode/COMMAND_STYLE_GUIDE.md +0 -232
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +0 -232
- package/templates/.opencode/README.md +0 -76
- package/templates/.opencode/README.zh-CN.md +0 -77
- package/templates/AGENTS.md +0 -104
- package/templates/AGENTS.zh-CN.md +0 -104
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# 项目 - Claude Code 指令
|
|
2
|
-
|
|
3
|
-
本仓库使用 agent-infra 进行多 AI 协作基础设施管理。
|
|
4
|
-
|
|
5
|
-
## 快速命令
|
|
6
|
-
|
|
7
|
-
<!-- TODO: 在此添加你的项目构建命令 -->
|
|
8
|
-
```bash
|
|
9
|
-
# 安装依赖
|
|
10
|
-
# TODO: 你的安装命令
|
|
11
|
-
|
|
12
|
-
# 构建项目
|
|
13
|
-
# TODO: 你的构建命令
|
|
14
|
-
|
|
15
|
-
# 运行测试
|
|
16
|
-
# TODO: 你的测试命令
|
|
17
|
-
|
|
18
|
-
# 代码检查
|
|
19
|
-
# TODO: 你的 lint 命令
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 项目结构
|
|
23
|
-
|
|
24
|
-
<!-- TODO: 在此添加你的项目目录结构 -->
|
|
25
|
-
|
|
26
|
-
## 编码规范
|
|
27
|
-
|
|
28
|
-
<!-- TODO: 在此添加你的项目编码规范 -->
|
|
29
|
-
|
|
30
|
-
### 版权头更新
|
|
31
|
-
修改任意带版权头的文件时,必须更新版权年份:
|
|
32
|
-
1. 先运行 `date +%Y` 获取当前年份(不要硬编码)
|
|
33
|
-
2. 更新格式:`2024-2025` -> `2024-2026`(假设当前年份为 2026)
|
|
34
|
-
|
|
35
|
-
### 分支命名
|
|
36
|
-
使用项目前缀:`{{project}}-feature-xxx`、`{{project}}-bugfix-yyy`
|
|
37
|
-
|
|
38
|
-
## 测试要求
|
|
39
|
-
|
|
40
|
-
<!-- TODO: 在此添加你的项目测试框架和命令 -->
|
|
41
|
-
|
|
42
|
-
## 提交与 PR 规范
|
|
43
|
-
|
|
44
|
-
### 提交信息格式(Conventional Commits)
|
|
45
|
-
```
|
|
46
|
-
<type>(<scope>): <subject>
|
|
47
|
-
```
|
|
48
|
-
- **type**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
|
|
49
|
-
- **scope**: 模块名(可省略)
|
|
50
|
-
- **subject**: 英文,简洁祈使语气,不超过 50 字符
|
|
51
|
-
|
|
52
|
-
### Claude 提交署名
|
|
53
|
-
```
|
|
54
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### PR 检查清单
|
|
58
|
-
- [ ] 测试通过
|
|
59
|
-
- [ ] 代码检查通过
|
|
60
|
-
- [ ] 构建成功
|
|
61
|
-
- [ ] 公共 API 有文档
|
|
62
|
-
- [ ] 版权头年份已更新
|
|
63
|
-
|
|
64
|
-
## Claude 特定规则
|
|
65
|
-
|
|
66
|
-
### 关键规则
|
|
67
|
-
1. **禁止自动提交**:绝对不要自动执行 `git commit`/`git add`,提醒用户使用 `/commit`
|
|
68
|
-
2. **版权年份更新**:运行 `date +%Y` 获取当前年份,使用 Edit 工具更新
|
|
69
|
-
3. **任务状态管理**:执行命令后更新 `task.md` 字段
|
|
70
|
-
|
|
71
|
-
### 重要规则
|
|
72
|
-
4. **任务语义识别**:自动识别用户意图(如"分析 issue 207" -> `/import-issue 207`;"分析任务 TASK-20260306-143022" -> `/analyze-task TASK-20260306-143022`)
|
|
73
|
-
5. **PR 规范**:创建 PR 时添加生成标记
|
|
74
|
-
|
|
75
|
-
**详细规则**:`.claude/project-rules.md`
|
|
76
|
-
|
|
77
|
-
## 工具使用偏好
|
|
78
|
-
|
|
79
|
-
| 操作 | 推荐 | 不推荐 |
|
|
80
|
-
|------|------|--------|
|
|
81
|
-
| 文件搜索 | `Glob` | `find`、`ls` |
|
|
82
|
-
| 内容搜索 | `Grep` | `grep`、`rg` |
|
|
83
|
-
| 读取文件 | `Read` | `cat`、`head`、`tail` |
|
|
84
|
-
| 编辑文件 | `Edit` | `sed`、`awk` |
|
|
85
|
-
| 创建文件 | `Write` | `echo >`、`cat <<EOF` |
|
|
86
|
-
|
|
87
|
-
**Bash 仅用于**:Git 操作、构建/测试、系统信息查询
|
|
88
|
-
|
|
89
|
-
## Slash Commands
|
|
90
|
-
|
|
91
|
-
### 开发相关
|
|
92
|
-
```bash
|
|
93
|
-
/commit [message] # 提交代码
|
|
94
|
-
/create-pr [branch] # 创建 PR
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 任务管理
|
|
98
|
-
```bash
|
|
99
|
-
/create-task <description> # 创建任务
|
|
100
|
-
/import-issue <number> # 导入 GitHub Issue 为任务
|
|
101
|
-
/analyze-task <task-id> # 分析任务需求
|
|
102
|
-
/plan-task <task-id> # 设计方案
|
|
103
|
-
/implement-task <task-id> # 实施任务
|
|
104
|
-
/review-task <task-id> # 代码审查
|
|
105
|
-
/complete-task <task-id> # 完成任务
|
|
106
|
-
/check-task <task-id> # 查看状态
|
|
107
|
-
/block-task <task-id> # 阻塞任务
|
|
108
|
-
/refine-task <task-id> # 处理审查反馈
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### PR 与同步
|
|
112
|
-
```bash
|
|
113
|
-
/sync-issue <number> # 同步进度到 Issue
|
|
114
|
-
/sync-pr <number> # 同步进度到 PR
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### 测试与发布
|
|
118
|
-
```bash
|
|
119
|
-
/test # 运行测试
|
|
120
|
-
/test-integration # 运行集成测试
|
|
121
|
-
/release <version> # 版本发布
|
|
122
|
-
/create-release-note # 生成发布说明
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### 安全
|
|
126
|
-
```bash
|
|
127
|
-
/import-dependabot <number> # 导入 Dependabot 告警
|
|
128
|
-
/close-dependabot # 关闭 Dependabot 告警
|
|
129
|
-
/import-codescan <number> # 导入 Code Scanning 告警
|
|
130
|
-
/close-codescan # 关闭 Code Scanning 告警
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### 工具
|
|
134
|
-
```bash
|
|
135
|
-
/init-milestones # 初始化 GitHub Milestones
|
|
136
|
-
/init-labels # 初始化 GitHub Labels
|
|
137
|
-
/refine-title # 重构 Issue/PR 标题
|
|
138
|
-
/upgrade-dependency # 升级依赖
|
|
139
|
-
/update-agent-infra # 更新 AI 协作配置
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## 语言规范
|
|
143
|
-
|
|
144
|
-
| 场景 | 语言 |
|
|
145
|
-
|------|------|
|
|
146
|
-
| 代码标识符、文档 | 英文 |
|
|
147
|
-
| Git commit message | 英文 (Conventional Commits) |
|
|
148
|
-
| 项目文档 | 英文(主) + 中文翻译 |
|
|
149
|
-
| AI 回复 | 跟随用户输入语言 |
|
|
150
|
-
|
|
151
|
-
## 多 AI 协作
|
|
152
|
-
|
|
153
|
-
本项目支持 Claude Code、Codex、Gemini CLI、OpenCode。
|
|
154
|
-
|
|
155
|
-
- `.agents/` - 共享协作配置
|
|
156
|
-
- `.agents/workspace/` - 任务工作区(已被 git ignore)
|
|
157
|
-
|
|
158
|
-
**协作指南**:`.agents/README.md`
|
|
159
|
-
|
|
160
|
-
## Skill 编写规范
|
|
161
|
-
|
|
162
|
-
编写或维护 `.agents/skills/*/SKILL.md` 时,步骤编号遵循以下规则:
|
|
163
|
-
|
|
164
|
-
1. 顶级步骤使用连续整数:`1.`、`2.`、`3.`。
|
|
165
|
-
2. 只有父步骤下的从属动作才使用子步骤:`1.1`、`1.2`、`2.1`。
|
|
166
|
-
3. 同一步中的分支、条件或多种可能性使用 `a`、`b`、`c` 标记。
|
|
167
|
-
4. 不要使用 `1.5`、`2.5` 这类中间编号;如新增独立步骤,应整体顺延后续编号。
|
|
168
|
-
5. 调整编号时,必须同步更新文中的步骤引用,确保说明、命令和检查点一致。
|
|
169
|
-
6. 长 bash 脚本应从 SKILL.md 提取到同级 `scripts/` 目录中,SKILL.md 只保留单行调用(如 `bash .agents/skills/<skill>/scripts/<script>.sh`)和对脚本职责的概要说明。
|
|
170
|
-
|
|
171
|
-
<!-- Canonical source: .agents/README.zh-CN.md - keep in sync -->
|
|
172
|
-
|
|
173
|
-
## 安全注意事项
|
|
174
|
-
|
|
175
|
-
- 不要提交:`.env`、credentials、密钥
|
|
176
|
-
- 安全问题请按 `SECURITY.md` 指引
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Claude Code - Detailed Rules
|
|
2
|
-
|
|
3
|
-
## Rule Summary
|
|
4
|
-
|
|
5
|
-
| Rule | Level | Description |
|
|
6
|
-
|------|-------|-------------|
|
|
7
|
-
| Commit message format | Critical | Conventional Commits in English |
|
|
8
|
-
| No auto-commit | Critical | Never auto-execute git commit/add |
|
|
9
|
-
| Copyright year update | Critical | Dynamic year via `date +%Y` |
|
|
10
|
-
| Task status management | Critical | Update task.md after each command |
|
|
11
|
-
| PR conventions | Important | Add generation marker |
|
|
12
|
-
| Task semantic recognition | Important | Auto-detect user intent |
|
|
13
|
-
|
|
14
|
-
## Rule 1: Commit Message Format
|
|
15
|
-
|
|
16
|
-
Format: `<type>(<scope>): <English description>`
|
|
17
|
-
|
|
18
|
-
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
|
|
19
|
-
|
|
20
|
-
Must append Co-Authored-By signature with your model name.
|
|
21
|
-
|
|
22
|
-
Use HEREDOC format for multi-line commit messages.
|
|
23
|
-
|
|
24
|
-
## Rule 2: No Auto-Commit
|
|
25
|
-
|
|
26
|
-
- NEVER execute `git commit` or `git add` automatically
|
|
27
|
-
- Only commit when user explicitly uses `/commit` command
|
|
28
|
-
- Complete code modifications, then remind user to use `/commit`
|
|
29
|
-
|
|
30
|
-
## Rule 3: PR Submission Rules
|
|
31
|
-
|
|
32
|
-
Before creating PR:
|
|
33
|
-
- All tests must pass
|
|
34
|
-
- Lint checks pass
|
|
35
|
-
- Build succeeds
|
|
36
|
-
- Copyright headers updated
|
|
37
|
-
- Use PR template format
|
|
38
|
-
|
|
39
|
-
## Rule 4: Copyright Year Update
|
|
40
|
-
|
|
41
|
-
- Get year dynamically: `date +%Y` (never hardcode)
|
|
42
|
-
- Update format: `Copyright (C) 2024-2025` -> `Copyright (C) 2024-2026`
|
|
43
|
-
- Use Edit tool, only update modified files
|
|
44
|
-
|
|
45
|
-
## Rule 5: Task Semantic Recognition
|
|
46
|
-
|
|
47
|
-
Auto-detect user intent:
|
|
48
|
-
- "analyze issue XXX" -> `/import-issue`
|
|
49
|
-
- "analyze task TASK-..." -> `/analyze-task`
|
|
50
|
-
- "plan/design solution" -> `/plan-task`
|
|
51
|
-
- "implement/code" -> `/implement-task`
|
|
52
|
-
- "review" -> `/review-task`
|
|
53
|
-
|
|
54
|
-
## Rule 6: Task Status Management
|
|
55
|
-
|
|
56
|
-
CRITICAL: Update task status immediately after command execution.
|
|
57
|
-
|
|
58
|
-
Commands that require updates:
|
|
59
|
-
- `/import-issue`: update current_step, updated_at, assigned_to
|
|
60
|
-
- `/analyze-task`: update current_step, updated_at, assigned_to
|
|
61
|
-
- `/plan-task`: update current_step, updated_at
|
|
62
|
-
- `/implement-task`: update current_step, updated_at
|
|
63
|
-
- `/review-task`: update current_step, updated_at
|
|
64
|
-
- `/complete-task`: update status, completed_at, updated_at
|
|
65
|
-
- `/block-task`: update status, blocked_at, blocked_reason
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Claude Code - 详细规则
|
|
2
|
-
|
|
3
|
-
## 规则总览
|
|
4
|
-
|
|
5
|
-
| 规则 | 级别 | 描述 |
|
|
6
|
-
|------|------|------|
|
|
7
|
-
| 提交信息格式 | 关键 | Conventional Commits 英文格式 |
|
|
8
|
-
| 禁止自动提交 | 关键 | 不自动执行 git commit/add |
|
|
9
|
-
| 版权年份更新 | 关键 | 通过 `date +%Y` 动态获取年份 |
|
|
10
|
-
| 任务状态管理 | 关键 | 每个命令执行后更新 task.md |
|
|
11
|
-
| PR 规范 | 重要 | 添加生成标记 |
|
|
12
|
-
| 任务语义识别 | 重要 | 自动识别用户意图 |
|
|
13
|
-
|
|
14
|
-
## 规则 1: 提交信息格式
|
|
15
|
-
|
|
16
|
-
格式: `<type>(<scope>): <英文描述>`
|
|
17
|
-
|
|
18
|
-
类型: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
|
|
19
|
-
|
|
20
|
-
必须附加 Co-Authored-By 署名(使用你的模型名称)。
|
|
21
|
-
|
|
22
|
-
使用 HEREDOC 格式处理多行提交信息。
|
|
23
|
-
|
|
24
|
-
## 规则 2: 禁止自动提交
|
|
25
|
-
|
|
26
|
-
- 绝对不要自动执行 `git commit` 或 `git add`
|
|
27
|
-
- 仅当用户明确使用 `/commit` 命令时才提交
|
|
28
|
-
- 完成代码修改后,提醒用户使用 `/commit`
|
|
29
|
-
|
|
30
|
-
## 规则 3: PR 提交规则
|
|
31
|
-
|
|
32
|
-
创建 PR 前必须确保:
|
|
33
|
-
- 所有测试通过
|
|
34
|
-
- 代码检查通过
|
|
35
|
-
- 构建成功
|
|
36
|
-
- 版权头年份已更新
|
|
37
|
-
- 使用 PR 模板格式
|
|
38
|
-
|
|
39
|
-
## 规则 4: 版权年份更新
|
|
40
|
-
|
|
41
|
-
- 动态获取年份: `date +%Y`(不要硬编码)
|
|
42
|
-
- 更新格式: `Copyright (C) 2024-2025` -> `Copyright (C) 2024-2026`
|
|
43
|
-
- 使用 Edit 工具,只更新已修改的文件
|
|
44
|
-
|
|
45
|
-
## 规则 5: 任务语义识别
|
|
46
|
-
|
|
47
|
-
自动识别用户意图:
|
|
48
|
-
- "分析 issue XXX" -> `/import-issue`
|
|
49
|
-
- "分析任务 TASK-..." -> `/analyze-task`
|
|
50
|
-
- "设计方案" -> `/plan-task`
|
|
51
|
-
- "实施/实现" -> `/implement-task`
|
|
52
|
-
- "审查" -> `/review-task`
|
|
53
|
-
|
|
54
|
-
## 规则 6: 任务状态管理
|
|
55
|
-
|
|
56
|
-
关键: 每个命令执行后必须立即更新任务状态。
|
|
57
|
-
|
|
58
|
-
需要更新的命令:
|
|
59
|
-
- `/import-issue`: 更新 current_step, updated_at, assigned_to
|
|
60
|
-
- `/analyze-task`: 更新 current_step, updated_at, assigned_to
|
|
61
|
-
- `/plan-task`: 更新 current_step, updated_at
|
|
62
|
-
- `/implement-task`: 更新 current_step, updated_at
|
|
63
|
-
- `/review-task`: 更新 current_step, updated_at
|
|
64
|
-
- `/complete-task`: 更新 status, completed_at, updated_at
|
|
65
|
-
- `/block-task`: 更新 status, blocked_at, blocked_reason
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Codex Skills ({{project}})
|
|
2
|
-
|
|
3
|
-
This project uses native Codex skills.
|
|
4
|
-
|
|
5
|
-
## Use Skills Directly
|
|
6
|
-
|
|
7
|
-
- Skills live in `.agents/skills/`
|
|
8
|
-
- Invoke them with `$skill-name`
|
|
9
|
-
|
|
10
|
-
Examples:
|
|
11
|
-
|
|
12
|
-
```text
|
|
13
|
-
$update-agent-infra
|
|
14
|
-
$create-task add graceful shutdown support
|
|
15
|
-
$plan-task TASK-20260310-105622
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Where Commands Live
|
|
19
|
-
|
|
20
|
-
Codex reads the actual workflow instructions from the project-local skill
|
|
21
|
-
files, for example:
|
|
22
|
-
|
|
23
|
-
- `.agents/skills/update-agent-infra/SKILL.md`
|
|
24
|
-
- `.agents/skills/create-task/SKILL.md`
|
|
25
|
-
- `.agents/skills/implement-task/SKILL.md`
|
|
26
|
-
|
|
27
|
-
The `.codex/` directory contains project documentation for Codex usage.
|
|
28
|
-
|
|
29
|
-
## FAQ
|
|
30
|
-
|
|
31
|
-
### Q: How are skills resolved?
|
|
32
|
-
|
|
33
|
-
A: Codex discovers skills from the current project directory.
|
|
34
|
-
|
|
35
|
-
### Q: How do I customize a workflow?
|
|
36
|
-
|
|
37
|
-
A: Edit the corresponding `SKILL.md` file under `.agents/skills/`. Template
|
|
38
|
-
projects should update the matching file under `templates/.agents/skills/`.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Codex Skills({{project}})
|
|
2
|
-
|
|
3
|
-
本项目使用 Codex 原生 skills。
|
|
4
|
-
|
|
5
|
-
## 直接使用 Skills
|
|
6
|
-
|
|
7
|
-
- 技能文件位于 `.agents/skills/`
|
|
8
|
-
- 使用 `$skill-name` 调用
|
|
9
|
-
|
|
10
|
-
示例:
|
|
11
|
-
|
|
12
|
-
```text
|
|
13
|
-
$update-agent-infra
|
|
14
|
-
$create-task 给 postman 添加优雅停机功能
|
|
15
|
-
$plan-task TASK-20260310-105622
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## 命令定义在哪里
|
|
19
|
-
|
|
20
|
-
Codex 会直接读取项目内的技能文件,例如:
|
|
21
|
-
|
|
22
|
-
- `.agents/skills/update-agent-infra/SKILL.md`
|
|
23
|
-
- `.agents/skills/create-task/SKILL.md`
|
|
24
|
-
- `.agents/skills/implement-task/SKILL.md`
|
|
25
|
-
|
|
26
|
-
`.codex/` 目录用于存放本项目的 Codex 使用文档。
|
|
27
|
-
|
|
28
|
-
## 常见问题
|
|
29
|
-
|
|
30
|
-
### Q: Skills 是如何解析的?
|
|
31
|
-
|
|
32
|
-
A: Codex 会从当前项目目录中发现并加载 skills。
|
|
33
|
-
|
|
34
|
-
### Q: 如何自定义工作流?
|
|
35
|
-
|
|
36
|
-
A: 直接编辑 `.agents/skills/` 下对应的 `SKILL.md`。如果是在模板仓库中维护,
|
|
37
|
-
则同步修改 `templates/.agents/skills/` 中的对应文件。
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
# Command Style Guide
|
|
2
|
-
|
|
3
|
-
This guide defines conventions for writing OpenCode command files in the `.opencode/commands/` directory.
|
|
4
|
-
|
|
5
|
-
## File Format
|
|
6
|
-
|
|
7
|
-
Every command file uses Markdown with YAML frontmatter:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
---
|
|
11
|
-
description: Brief one-line description
|
|
12
|
-
agent: general
|
|
13
|
-
subtask: false
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
Command instructions here.
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Frontmatter Fields
|
|
20
|
-
|
|
21
|
-
| Field | Required | Description |
|
|
22
|
-
|-------|----------|-------------|
|
|
23
|
-
| `description` | Yes | One-line summary (under 80 chars) |
|
|
24
|
-
| `agent` | Yes | Always `general` unless specialized |
|
|
25
|
-
| `subtask` | Yes | `false` for top-level commands |
|
|
26
|
-
|
|
27
|
-
## Executable Commands vs Code Blocks
|
|
28
|
-
|
|
29
|
-
### Use `!` prefix for commands that MUST be executed
|
|
30
|
-
|
|
31
|
-
```markdown
|
|
32
|
-
!date -u +"%Y-%m-%dT%H:%M:%SZ"
|
|
33
|
-
!git status --short
|
|
34
|
-
!gh issue view 123 --json number,title,body
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
The `!` prefix tells OpenCode to run the command directly. Use this for:
|
|
38
|
-
- Getting dynamic information (timestamps, git status)
|
|
39
|
-
- Performing actions (creating files, calling APIs)
|
|
40
|
-
- Running build/test commands
|
|
41
|
-
|
|
42
|
-
### Use markdown code blocks for illustrative examples
|
|
43
|
-
|
|
44
|
-
````markdown
|
|
45
|
-
Example output format:
|
|
46
|
-
```
|
|
47
|
-
Task ID: TASK-20260101-120000
|
|
48
|
-
Status: active
|
|
49
|
-
```
|
|
50
|
-
````
|
|
51
|
-
|
|
52
|
-
Code blocks are NOT executed. Use them for:
|
|
53
|
-
- Showing expected output formats
|
|
54
|
-
- Documenting templates
|
|
55
|
-
- Illustrating patterns the AI should follow
|
|
56
|
-
|
|
57
|
-
## Parameter Handling
|
|
58
|
-
|
|
59
|
-
### Positional parameters
|
|
60
|
-
|
|
61
|
-
Reference with `$ARGUMENTS`:
|
|
62
|
-
|
|
63
|
-
```markdown
|
|
64
|
-
Parse the task ID from `$ARGUMENTS`.
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Validation
|
|
68
|
-
|
|
69
|
-
Always validate required parameters early:
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
If `$ARGUMENTS` is empty, respond:
|
|
73
|
-
"Please provide a task ID. Example: /check-task TASK-20260101-120000"
|
|
74
|
-
Then STOP.
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Timestamp Handling
|
|
78
|
-
|
|
79
|
-
**NEVER** hardcode dates or years.
|
|
80
|
-
|
|
81
|
-
Correct:
|
|
82
|
-
```markdown
|
|
83
|
-
!date -u +"%Y-%m-%dT%H:%M:%SZ"
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Wrong:
|
|
87
|
-
```markdown
|
|
88
|
-
Set the date to 2026-03-06.
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## GitHub API Paths
|
|
92
|
-
|
|
93
|
-
**ALWAYS** use `{owner}/{repo}` placeholders. Resolve dynamically:
|
|
94
|
-
|
|
95
|
-
```markdown
|
|
96
|
-
!gh api repos/{owner}/{repo}/dependabot/alerts/$ARGUMENTS
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
To get owner/repo:
|
|
100
|
-
```markdown
|
|
101
|
-
!gh repo view --json owner,name -q '.owner.login + "/" + .name'
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Step Numbering and Readability
|
|
105
|
-
|
|
106
|
-
### Use numbered steps for sequential operations
|
|
107
|
-
|
|
108
|
-
```markdown
|
|
109
|
-
## Steps
|
|
110
|
-
|
|
111
|
-
1. **Validate input** - Check that the task ID is provided.
|
|
112
|
-
|
|
113
|
-
2. **Read task file** - Find and read the task.md file.
|
|
114
|
-
|
|
115
|
-
3. **Update status** - Modify the task metadata.
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Use bold for step titles
|
|
119
|
-
|
|
120
|
-
Each step should have a clear bold title followed by a description.
|
|
121
|
-
|
|
122
|
-
### Keep steps atomic
|
|
123
|
-
|
|
124
|
-
Each step should do one thing. If a step is too complex, break it into sub-steps.
|
|
125
|
-
|
|
126
|
-
## Error Handling Patterns
|
|
127
|
-
|
|
128
|
-
### Check prerequisites before acting
|
|
129
|
-
|
|
130
|
-
```markdown
|
|
131
|
-
1. **Verify task exists**
|
|
132
|
-
|
|
133
|
-
Search for the task file:
|
|
134
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
135
|
-
- `.agents/workspace/blocked/{task-id}/task.md`
|
|
136
|
-
- `.agents/workspace/completed/{task-id}/task.md`
|
|
137
|
-
|
|
138
|
-
If not found, respond:
|
|
139
|
-
"Task {task-id} not found. Please check the task ID."
|
|
140
|
-
Then STOP.
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Report errors clearly
|
|
144
|
-
|
|
145
|
-
```markdown
|
|
146
|
-
If the command fails, report:
|
|
147
|
-
- What went wrong
|
|
148
|
-
- Possible causes
|
|
149
|
-
- Suggested next steps
|
|
150
|
-
|
|
151
|
-
Do NOT silently continue.
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Common Patterns
|
|
155
|
-
|
|
156
|
-
### Task file lookup pattern
|
|
157
|
-
|
|
158
|
-
```markdown
|
|
159
|
-
Search for the task in this order:
|
|
160
|
-
1. `.agents/workspace/active/{task-id}/task.md`
|
|
161
|
-
2. `.agents/workspace/blocked/{task-id}/task.md`
|
|
162
|
-
3. `.agents/workspace/completed/{task-id}/task.md`
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### Status update pattern
|
|
166
|
-
|
|
167
|
-
```markdown
|
|
168
|
-
Update `task.md` YAML frontmatter:
|
|
169
|
-
- `current_step`: {step-name}
|
|
170
|
-
- `assigned_to`: opencode
|
|
171
|
-
- `updated_at`: {current timestamp from date command}
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Next-step suggestion pattern
|
|
175
|
-
|
|
176
|
-
```markdown
|
|
177
|
-
**Next step:**
|
|
178
|
-
Use `/plan-task {task-id}` to design the technical plan.
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Anti-Patterns
|
|
182
|
-
|
|
183
|
-
### DO NOT
|
|
184
|
-
|
|
185
|
-
- Hardcode dates, years, or timestamps
|
|
186
|
-
- Hardcode repository owner/name in API paths
|
|
187
|
-
- Skip parameter validation
|
|
188
|
-
- Auto-commit without user confirmation
|
|
189
|
-
- Use tool-specific syntax (e.g., Claude's Read/Edit/Write tool names)
|
|
190
|
-
- Reference tech-stack-specific commands without TODO markers
|
|
191
|
-
- Include emoji in command files (keep them professional)
|
|
192
|
-
- Write overly long steps -- break them up
|
|
193
|
-
|
|
194
|
-
### DO
|
|
195
|
-
|
|
196
|
-
- Use `!` for all executable commands
|
|
197
|
-
- Validate parameters before proceeding
|
|
198
|
-
- Provide clear error messages
|
|
199
|
-
- Include "STOP" after error conditions
|
|
200
|
-
- Keep commands concise and scannable
|
|
201
|
-
- Use placeholders for project-specific values
|
|
202
|
-
- Add TODO markers for tech-stack-specific sections
|
|
203
|
-
|
|
204
|
-
## Tech-Stack Agnostic Commands
|
|
205
|
-
|
|
206
|
-
For commands that depend on the project's tech stack (build tools, test runners, package managers), use TODO markers:
|
|
207
|
-
|
|
208
|
-
```markdown
|
|
209
|
-
3. **Run tests**
|
|
210
|
-
|
|
211
|
-
<!-- TODO: Replace with your project's test command -->
|
|
212
|
-
!npm test
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
This tells users they need to customize the command for their project.
|
|
216
|
-
|
|
217
|
-
## Command Review Checklist
|
|
218
|
-
|
|
219
|
-
Before submitting a new command, verify:
|
|
220
|
-
|
|
221
|
-
- [ ] Frontmatter has `description`, `agent`, and `subtask`
|
|
222
|
-
- [ ] All executable commands use `!` prefix
|
|
223
|
-
- [ ] All illustrative examples use code blocks (no `!`)
|
|
224
|
-
- [ ] Parameters are validated with clear error messages
|
|
225
|
-
- [ ] Timestamps are generated dynamically
|
|
226
|
-
- [ ] GitHub API paths use `{owner}/{repo}` placeholders
|
|
227
|
-
- [ ] Steps are numbered and have bold titles
|
|
228
|
-
- [ ] Error cases are handled with "STOP" directives
|
|
229
|
-
- [ ] No hardcoded dates, repo names, or tool-specific references
|
|
230
|
-
- [ ] Tech-stack-specific sections have TODO markers
|
|
231
|
-
- [ ] Both EN and ZH-CN versions are created
|
|
232
|
-
- [ ] Command is concise -- no unnecessary prose
|