@fitlab-ai/agent-infra 0.3.1 → 0.4.0

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.
Files changed (93) hide show
  1. package/README.md +29 -39
  2. package/README.zh-CN.md +29 -39
  3. package/bin/cli.js +1 -1
  4. package/lib/defaults.json +3 -12
  5. package/lib/init.js +13 -24
  6. package/lib/paths.js +3 -42
  7. package/lib/update.js +98 -32
  8. package/lib/version.js +2 -1
  9. package/package.json +2 -1
  10. package/templates/.agents/QUICKSTART.md +7 -7
  11. package/templates/.agents/QUICKSTART.zh-CN.md +7 -7
  12. package/templates/.agents/README.md +16 -4
  13. package/templates/.agents/README.zh-CN.md +16 -4
  14. package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
  15. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
  16. package/templates/.agents/skills/block-task/SKILL.md +8 -8
  17. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +8 -8
  18. package/templates/.agents/skills/check-task/SKILL.md +3 -3
  19. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +3 -3
  20. package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
  21. package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
  22. package/templates/.agents/skills/commit/SKILL.md +1 -1
  23. package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
  24. package/templates/.agents/skills/complete-task/SKILL.md +7 -7
  25. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +7 -7
  26. package/templates/.agents/skills/create-issue/SKILL.md +57 -12
  27. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +57 -12
  28. package/templates/.agents/skills/create-pr/SKILL.md +44 -7
  29. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +44 -7
  30. package/templates/.agents/skills/create-release-note/SKILL.md +18 -11
  31. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +18 -11
  32. package/templates/.agents/skills/create-task/SKILL.md +80 -78
  33. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +11 -10
  34. package/templates/.agents/skills/implement-task/SKILL.md +15 -18
  35. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +15 -18
  36. package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
  37. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  38. package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
  39. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
  40. package/templates/.agents/skills/import-issue/SKILL.md +58 -58
  41. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
  42. package/templates/.agents/skills/init-labels/SKILL.md +8 -0
  43. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -0
  44. package/templates/.agents/skills/plan-task/SKILL.md +151 -149
  45. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +6 -6
  46. package/templates/.agents/skills/refine-task/SKILL.md +3 -3
  47. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +3 -3
  48. package/templates/.agents/skills/release/SKILL.md +55 -14
  49. package/templates/.agents/skills/release/SKILL.zh-CN.md +55 -14
  50. package/templates/.agents/skills/review-task/SKILL.md +9 -9
  51. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +9 -9
  52. package/templates/.agents/skills/sync-issue/SKILL.md +258 -279
  53. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -56
  54. package/templates/.agents/skills/sync-pr/SKILL.md +8 -28
  55. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +7 -27
  56. package/templates/.agents/skills/update-agent-infra/SKILL.md +6 -6
  57. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -6
  58. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +61 -116
  59. package/templates/.agents/templates/handoff.md +1 -1
  60. package/templates/.agents/templates/handoff.zh-CN.md +1 -1
  61. package/templates/.agents/workflows/bug-fix.yaml +71 -71
  62. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
  63. package/templates/.agents/workflows/feature-development.yaml +71 -71
  64. package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
  65. package/templates/.agents/workflows/refactoring.yaml +76 -76
  66. package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
  67. package/templates/{.agent-workspace → .agents/workspace}/README.md +1 -1
  68. package/templates/{.agent-workspace → .agents/workspace}/README.zh-CN.md +1 -1
  69. package/templates/.claude/CLAUDE.md +14 -1
  70. package/templates/.claude/CLAUDE.zh-CN.md +14 -1
  71. package/templates/.claude/hooks/check-version-format.sh +44 -0
  72. package/templates/.claude/settings.json +14 -0
  73. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +6 -6
  74. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
  75. package/templates/AGENTS.md +14 -1
  76. package/templates/AGENTS.zh-CN.md +14 -1
  77. package/templates/.editorconfig +0 -15
  78. package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +0 -149
  79. package/templates/.github/ISSUE_TEMPLATE/02_question.yml +0 -101
  80. package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +0 -131
  81. package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +0 -165
  82. package/templates/.github/ISSUE_TEMPLATE/05_other.yml +0 -147
  83. package/templates/.github/ISSUE_TEMPLATE/config.yml +0 -11
  84. package/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -123
  85. package/templates/.github/dependabot.yml +0 -17
  86. package/templates/.github/hooks/check-utf8-encoding.sh +0 -25
  87. package/templates/.github/release.yml +0 -27
  88. package/templates/.github/workflows/pr-title-check.yml +0 -42
  89. package/templates/.mailmap +0 -4
  90. package/templates/CONTRIBUTING.md +0 -126
  91. package/templates/CONTRIBUTING.zh-CN.md +0 -124
  92. package/templates/SECURITY.md +0 -131
  93. package/templates/SECURITY.zh-CN.md +0 -131
@@ -1,147 +0,0 @@
1
- name: 🔧 其他问题 / Other Issues
2
- description: 报告不属于上述分类的其他问题或建议 / Report other issues or suggestions that don't fit the above categories
3
- labels:
4
- - "status: waiting-for-triage"
5
- type: Task
6
- body:
7
- - type: markdown
8
- attributes:
9
- value: |
10
- ## 提交其他类型的问题 / Submit Other Types of Issues
11
-
12
- 如果您的问题不属于问题报告、问题咨询、功能请求或文档问题,请使用此模板。
13
- If your issue doesn't belong to bug reports, questions, feature requests or documentation issues, please use this template.
14
-
15
- **在提交前,请确认您的问题确实不属于以下类别:**
16
- **Before submitting, please confirm your issue doesn't belong to the following categories:**
17
- - 🐛 [问题报告 / Bug Report](./issues/new?template=01_bug_report.yml) - 项目功能错误
18
- - ❓ [问题咨询 / Question](./issues/new?template=02_question.yml) - 使用相关问题
19
- - ✨ [功能请求 / Feature Request](./issues/new?template=03_feature_request.yml) - 新功能建议
20
- - 📚 [文档问题 / Documentation](./issues/new?template=04_documentation.yml) - 文档相关问题
21
-
22
- - type: input
23
- id: summary
24
- attributes:
25
- label: 问题摘要 / Issue Summary
26
- description: 用一句话简要描述您的问题或建议 / Briefly describe your issue or suggestion in one sentence
27
- placeholder: |
28
- 例如:建议添加 GitHub Actions CI/CD 工作流
29
- Example: Suggest adding GitHub Actions CI/CD workflow
30
- validations:
31
- required: true
32
-
33
- - type: dropdown
34
- id: category
35
- attributes:
36
- label: 问题类别 / Issue Category
37
- description: 请选择最接近的问题类别 / Please select the closest issue category
38
- options:
39
- - "项目管理 / Project Management"
40
- - "开发工具 / Development Tools"
41
- - "CI/CD相关 / CI/CD Related"
42
- - "安全相关 / Security Related"
43
- - "许可证问题 / License Issues"
44
- - "社区建议 / Community Suggestions"
45
- - "第三方集成 / Third-party Integration"
46
- - "环境配置 / Environment Setup"
47
- - "版本发布 / Release Management"
48
- - "其他 (请在描述中说明) / Other (please specify in description)"
49
- validations:
50
- required: true
51
-
52
- - type: dropdown
53
- id: priority
54
- attributes:
55
- label: 优先级 / Priority
56
- description: 您认为这个问题的重要程度如何?/ How important do you think this issue is?
57
- options:
58
- - "高 - 影响项目正常运行 / High - Affects normal project operation"
59
- - "中 - 有一定影响 / Medium - Has some impact"
60
- - "低 - 优化改进建议 / Low - Optimization/improvement suggestion"
61
- validations:
62
- required: true
63
-
64
- - type: textarea
65
- id: description
66
- attributes:
67
- label: 详细描述 / Detailed Description
68
- description: |
69
- 详细描述您的问题、建议或需求
70
- Describe your issue, suggestion, or requirement in detail
71
- placeholder: |
72
- 请详细说明... / Please explain in detail...
73
-
74
- 包括但不限于 / Including but not limited to:
75
- - 问题的背景和原因 / Background and reasons for the issue
76
- - 具体的需求或建议 / Specific requirements or suggestions
77
- - 对项目的影响 / Impact on the project
78
- - 您认为的解决方案 / Your proposed solution
79
- validations:
80
- required: true
81
-
82
- - type: textarea
83
- id: context
84
- attributes:
85
- label: 相关背景 / Related Context
86
- description: |
87
- 提供任何相关的背景信息
88
- Provide any relevant background information
89
- placeholder: |
90
- 相关信息... / Related information...
91
-
92
- 例如 / Example:
93
- - 相关的外部工具或服务 / Related external tools or services
94
- - 类似项目的实现方式 / Implementation approaches in similar projects
95
- - 相关的讨论或文章链接 / Links to relevant discussions or articles
96
-
97
- - type: textarea
98
- id: impact
99
- attributes:
100
- label: 影响评估 / Impact Assessment
101
- description: |
102
- 这个问题或建议会对项目产生什么影响?
103
- What impact would this issue or suggestion have on the project?
104
- placeholder: |
105
- 可能的影响... / Potential impacts...
106
-
107
- 例如 / Example:
108
- - 对开发流程的影响 / Impact on development workflow
109
- - 对用户体验的影响 / Impact on user experience
110
- - 对项目维护的影响 / Impact on project maintenance
111
-
112
- - type: textarea
113
- id: additional-info
114
- attributes:
115
- label: 补充信息 / Additional Information
116
- description: |
117
- 添加任何其他有用的信息,如截图、链接、参考资料等
118
- Add any other useful information such as screenshots, links, references, etc.
119
-
120
- - type: checkboxes
121
- id: confirmations
122
- attributes:
123
- label: 确认事项 / Confirmations
124
- description: |
125
- 提交前请确认以下事项
126
- Please confirm the following before submitting
127
- options:
128
- - label: |
129
- 我已经确认这个问题不属于Bug报告、功能请求、问题咨询或文档问题
130
- I have confirmed this issue doesn't belong to bug reports, feature requests, questions, or documentation issues
131
- required: true
132
- - label: |
133
- 我已经搜索了现有的issues,确认这不是重复问题
134
- I have searched existing issues and confirmed this is not a duplicate
135
- required: true
136
- - label: |
137
- 我提供的信息清晰准确
138
- The information I provided is clear and accurate
139
- required: true
140
- - label: |
141
- 我理解这类问题可能需要更多时间来评估和处理
142
- I understand this type of issue may require more time to evaluate and process
143
- required: true
144
- - label: |
145
- 我愿意提供更多信息或协助解决 (可选)
146
- I'm willing to provide more information or help resolve the issue (optional)
147
- required: false
@@ -1,11 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: 📖 项目文档 / Project Documentation
4
- url: https://github.com/{{org}}/{{project}}/wiki
5
- about: 查看项目文档和使用指南 / View project documentation and usage guides
6
- - name: 💬 讨论区 / Discussions
7
- url: https://github.com/{{org}}/{{project}}/discussions
8
- about: 加入社区讨论,分享想法和经验 / Join community discussions, share ideas and experiences
9
- - name: 🆘 获取帮助 / Get Help
10
- url: https://github.com/{{org}}/{{project}}/discussions/categories/q-a
11
- about: 在Q&A区域获取使用帮助 / Get usage help in the Q&A section
@@ -1,123 +0,0 @@
1
- <!--
2
- 如果您正在寻求帮助,请先在我们的讨论区中进行交流。
3
- If you're looking for help, please check our Discussions section first.
4
-
5
- 我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
6
- Please try to use English to describe your issue, or at least provide a snippet of English translation.
7
-
8
- 请不要在没有创建 Issue 的情况下创建 Pull Request。
9
- Please do not create a Pull Request without creating an issue first.
10
-
11
- 微小的变更(如错别字修复)不需要创建 Issue。
12
- Trivial changes like typos do not require a Github issue.
13
-
14
- 提交 PR 之前请务必先阅读我们的贡献指南。
15
- Please read our Contributing Guide(CONTRIBUTING.md) before submitting your Pull Request.
16
-
17
- ⚠️ 注意 / Note:
18
-
19
- 不要重复创建类似的 PR,当你发现需要调整一个 PR 的时候,优先选择编辑修改它,而不是关闭之后再创建一个。
20
- Do not create a Pull Request without creating an issue first.
21
- -->
22
-
23
- ## 🔗 相关问题 / Related Issue
24
-
25
- <!-- 请先创建 Issue 讨论,然后在这里链接 -->
26
- <!-- Please create an issue for discussion first, then link it here -->
27
-
28
- **Issue 链接 / Issue Link:** <mark>#{$IssueNumber}</mark> 👈👈
29
-
30
- <!-- 请修改 {$IssueNumber} 为真实的编号。 -->
31
- <!-- Please update {$IssueNumber} to an actual number. -->
32
-
33
- - [ ] 我已经创建了相关 Issue 并进行了讨论 / I have created and discussed the related issue
34
- - [ ] 这是一个微小的修改(如错别字),不需要 Issue / This is a trivial change (like typo fix) that doesn't need an issue
35
-
36
- ## 📋 变更类型 / Type of Change
37
-
38
- - [ ] 🐛 Bug 修复 / Bug fix (non-breaking change which fixes an issue)
39
- - [ ] ✨ 新功能 / New feature (non-breaking change which adds functionality)
40
- - [ ] 💥 破坏性变更 / Breaking change (fix or feature that would cause existing functionality to not work as expected)
41
- - [ ] 📚 文档更新 / Documentation update
42
- - [ ] 🔧 重构 / Refactoring (no functional changes)
43
- - [ ] ⚡ 性能优化 / Performance improvement
44
- - [ ] 📦 依赖升级 / Dependency upgrade (update dependencies to newer versions)
45
- - [ ] 🚀 功能增强 / Feature enhancement (improve existing functionality without breaking changes)
46
- - [ ] 🧹 代码清理 / Code cleanup
47
-
48
- ## 📝 变更目的 / Purpose of the Change
49
-
50
- <!-- 详细描述这个变更的目的和必要性 -->
51
- <!-- Detailed description of the purpose and necessity of this change -->
52
-
53
- ## 📋 主要变更 / Brief Changelog
54
-
55
- <!-- 列出主要的变更内容 -->
56
- <!-- List the main changes -->
57
-
58
- -
59
- -
60
- -
61
-
62
- ## 🧪 验证变更 / Verifying this Change
63
-
64
- <!-- 描述如何验证这个变更是正确的 -->
65
- <!-- Describe how to verify that this change is correct -->
66
-
67
- ### 测试步骤 / Test Steps
68
-
69
- 1.
70
- 2.
71
- 3.
72
-
73
- ### 测试覆盖 / Test Coverage
74
-
75
- - [ ] 我已经添加了单元测试 / I have added unit tests
76
- - [ ] 所有现有测试都通过 / All existing tests pass
77
- - [ ] 我已经进行了手动测试 / I have performed manual testing
78
-
79
- ## 📸 截图 / Screenshots
80
-
81
- <!-- 如果适用,请添加截图来展示变更效果 -->
82
- <!-- If applicable, add screenshots to demonstrate the changes -->
83
-
84
- ## ✅ 贡献者检查清单 / Contributor Checklist
85
-
86
- 请确保你的 Pull Request 符合以下要求 / Please ensure your Pull Request meets the following requirements:
87
-
88
- **基本要求 / Basic Requirements:**
89
-
90
- - [ ] 确保有 GitHub Issue 对应这个变更(微小变更如错别字除外)/ Make sure there is a Github issue filed for the change (trivial changes like typos excluded)
91
- - [ ] 你的 Pull Request 只解决一个 Issue,没有包含其他不相关的变更 / Your PR addresses just this issue, without pulling in other changes - one PR resolves one issue
92
- - [ ] PR 中的每个 commit 都有有意义的主题行和描述 / Each commit in the PR has a meaningful subject line and body
93
-
94
- **代码质量 / Code Quality:**
95
-
96
- - [ ] 我的代码遵循项目的代码规范 / My code follows the project's coding standards
97
- - [ ] 我已经进行了自我代码审查 / I have performed a self-review of my code
98
- - [ ] 我已经为复杂的代码添加了必要的注释 / I have commented my code, particularly in hard-to-understand areas
99
-
100
- **测试要求 / Testing Requirements:**
101
-
102
- - [ ] 我已经编写了必要的单元测试来验证逻辑正确性 / I have written necessary unit-tests to verify the logic correction
103
- - [ ] 当存在跨模块依赖时,我尽量使用了 mock / I have used mocks when cross-module dependencies exist
104
- - [ ] 代码检查通过 / Lint checks pass
105
- - [ ] 单元测试通过 / Unit tests pass
106
-
107
- **文档和兼容性 / Documentation and Compatibility:**
108
-
109
- - [ ] 我已经更新了相应的文档 / I have made corresponding changes to the documentation
110
- - [ ] 如果有破坏性变更,我已经在 PR 描述中详细说明 / If there are breaking changes, I have documented them in detail
111
- - [ ] 我已经考虑了向后兼容性 / I have considered backward compatibility
112
-
113
- ## 📋 附加信息 / Additional Notes
114
-
115
- <!-- 任何其他相关信息,如已知问题、后续计划等 -->
116
- <!-- Any other relevant information, such as known issues, future plans, etc. -->
117
-
118
- ---
119
-
120
- **审查者注意事项 / Reviewer Notes:**
121
-
122
- <!-- 为审查者提供的特殊说明或需要重点关注的地方 -->
123
- <!-- Special instructions for reviewers or areas that need special attention -->
@@ -1,17 +0,0 @@
1
- version: 2
2
- updates:
3
- # TODO: add your project's package ecosystem (npm, pip, maven, gradle, etc.)
4
- # - package-ecosystem: "npm"
5
- # directory: "/"
6
- # schedule:
7
- # interval: "weekly"
8
- # labels:
9
- # - "dependencies"
10
- # open-pull-requests-limit: 10
11
-
12
- - package-ecosystem: "github-actions"
13
- directory: "/"
14
- schedule:
15
- interval: "weekly"
16
- labels:
17
- - "dependencies"
@@ -1,25 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
-
4
- echo "UTF-8 check script is running..."
5
-
6
- # Iterate over every file that is in the staging area
7
- for FILE in $(git diff --cached --name-only); do
8
- # If file exists
9
- # shellcheck disable=SC2039
10
- if [[ -e "$FILE" ]]; then
11
- if [[ $(file -bi "$FILE") != *"charset=binary"* ]]; then
12
- # Get file encoding
13
- encoding=$(file -bi "$FILE" | sed -e 's/.*[ ]charset=//')
14
- echo "Checking file $FILE (encoding: $encoding)"
15
-
16
- # If encoding is not utf-8 or us-ascii, exit with failure status
17
- if ! echo "$encoding" | grep -q -e 'utf-8' -e 'us-ascii'; then
18
- echo "Error: File $FILE is not UTF-8 encoded or US-ASCII, it is $encoding. Please convert it to UTF-8."
19
- exit 1
20
- fi
21
- fi
22
- fi
23
- done
24
-
25
- echo "UTF-8 check completed successfully."
@@ -1,27 +0,0 @@
1
- changelog:
2
- exclude:
3
- labels:
4
- - skip-changelog
5
- authors:
6
- - dependabot
7
- categories:
8
- - title: "⚠️ Breaking Changes"
9
- labels:
10
- - breaking
11
- - title: "✨ Enhancement"
12
- labels:
13
- - enhancement
14
- - feature
15
- - title: "🐛 Bug Fixes"
16
- labels:
17
- - bug
18
- - fix
19
- - title: "📚 Documentation"
20
- labels:
21
- - documentation
22
- - title: "📦 Dependencies"
23
- labels:
24
- - dependencies
25
- - title: "Other Changes"
26
- labels:
27
- - "*"
@@ -1,42 +0,0 @@
1
- name: PR Title Check
2
-
3
- on:
4
- pull_request_target:
5
- types: [opened, edited, synchronize]
6
-
7
- permissions:
8
- pull-requests: write
9
- statuses: write
10
-
11
- jobs:
12
- validate:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: amannn/action-semantic-pull-request@v6.1.1
16
- with:
17
- # 允许的提交类型
18
- types: |
19
- feat
20
- fix
21
- docs
22
- style
23
- refactor
24
- perf
25
- test
26
- chore
27
- build
28
- ci
29
- revert
30
-
31
- # 不限制 scope,允许任意模块名
32
- # requireScope: false - scope 是可选的
33
-
34
- # 标题描述长度 5-100 字符
35
- subjectPattern: '^.{5,100}$'
36
- subjectPatternError: '标题描述长度应在 5-100 字符之间'
37
-
38
- # 支持 WIP 前缀标记进行中的工作
39
- wip: true
40
-
41
- env:
42
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +0,0 @@
1
- Claude <noreply@anthropic.com>
2
- Codex <noreply@openai.com>
3
- Gemini <noreply@google.com>
4
- OpenCode <noreply@opencode.ai>
@@ -1,126 +0,0 @@
1
- # Developer Guide
2
-
3
- ## Introduction
4
-
5
- This guide provides detailed development guidance for contributors, including branch management, tagging, commit rules, and code review.
6
-
7
- ## Development Model
8
-
9
- We use [Git](https://git-scm.com/) for version control, following a multi-version Git-Flow model:
10
-
11
- - `main` branch is the primary development branch; all features branch from and merge into it
12
- - `{{project}}-feature-*` branches for feature development
13
- - `{{project}}-{majorVersion}.{minorVersion}.x` for version branches
14
- - `{{project}}-bugfix-*` branches for bug fixes
15
- - All bug fixes or enhancements must start from the lowest applicable version branch and merge upward to `main`
16
-
17
- ## Environment Setup
18
-
19
- ### Prerequisites
20
-
21
- <!-- TODO: Add your project's prerequisites here -->
22
-
23
- ### Quick Start
24
-
25
- ```bash
26
- # Clone the project
27
- git clone <repository-url>
28
-
29
- # Install dependencies
30
- # TODO: Add your project's install command
31
-
32
- # Build
33
- # TODO: Add your project's build command
34
-
35
- # Run tests
36
- # TODO: Add your project's test command
37
-
38
- # Lint
39
- # TODO: Add your project's lint command
40
- ```
41
-
42
- See the project's `README.md` for more details on configuring the development environment.
43
-
44
- ## Branch Management
45
-
46
- - Create a new branch for each feature or bug fix; never develop directly on `main`.
47
- - Branch naming should be concise and describe the branch's purpose.
48
- - Branches start with `{{project}}-`.
49
- - Feature branches: `{{project}}-feature-*`, enhancements: `{{project}}-enhancement-*`, tasks: `{{project}}-task-*`, bug fixes: `{{project}}-bugfix-*`.
50
- - Use hyphens `-` to separate words.
51
- - Version branches end with two version numbers and `x`: `{{project}}-1.0.x`.
52
- - Release branches end with three version numbers: `{{project}}-1.0.0`.
53
-
54
- ### Version Branch Merge Rules
55
-
56
- - Version branches must merge from lower to higher versions, without skipping.
57
- - After any feature, enhancement, or bugfix merges into a version branch, it must be merged upward through each subsequent version branch until reaching `main`.
58
-
59
- ## Tag Management
60
-
61
- - Tag names must match release branch names, e.g. `{{project}}-1.0.0`.
62
- - Purely numeric versions use a `v` prefix, e.g. `v0.1.0`.
63
- - Release candidates use special suffixes, e.g. `{{project}}-1.0.0-alpha1`.
64
- - After a tag is created, the corresponding release branch should be deleted.
65
- - All Issues and PRs must have at least two labels: `in: {module}` and `type: {type}`.
66
-
67
- ## Development Standards
68
-
69
- ### Code Style
70
-
71
- <!-- TODO: Add your project's code style requirements here -->
72
-
73
- ### Comments
74
-
75
- - Each module file should include comments explaining its purpose.
76
- - All exported classes, functions, and interfaces need documentation comments.
77
-
78
- ## Commit Rules
79
-
80
- ### Commit Message Format
81
-
82
- We follow [Conventional Commits](https://www.conventionalcommits.org/):
83
- `<type>(<scope>): <subject>`
84
-
85
- - **type**: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`
86
- - **scope**: Module name. Use `*` or leave empty for cross-module changes.
87
- - **subject**: Brief description in English imperative mood, max 50 characters, no trailing period.
88
-
89
- Add a blank line after the subject for detailed description if necessary.
90
-
91
- **Examples:**
92
- - `feat(ai): add multi-agent collaboration workflow`
93
- - `fix(github): fix PR title validation regex`
94
- - `docs(ai): update collaboration quick start guide`
95
-
96
- ## Code Review
97
-
98
- - Create a pull request to merge changes into the main branch. Describe your changes and invite team members for review.
99
- - Keep the main branch always deployable; ensure merged code is tested and follows coding standards.
100
-
101
- ## Testing
102
-
103
- <!-- TODO: Add your project's testing requirements here -->
104
-
105
- ## Release Process
106
-
107
- Follow the project's release plan. When releasing a new version, create a tag per the tag management rules.
108
-
109
- ## Issue and Requirement Tracking
110
-
111
- Use the project's Issue tracker to report and track issues, requirements, and feature suggestions. Provide detailed information when creating new Issues.
112
-
113
- ## Contribution Guide
114
-
115
- For contributors:
116
-
117
- 1. Fork the project.
118
- 2. Clone your fork locally.
119
- 3. Create a new branch for development.
120
- 4. Follow the commit conventions in this document.
121
- 5. Create a PR to merge into the corresponding branch (one commit per PR).
122
- 6. Participate in code review and make necessary changes.
123
- 7. Once accepted and merged, your contribution becomes part of the project.
124
-
125
- > - Maintainers may suggest modifications. Stay open and communicate actively.
126
- > - If you find an issue but don't plan to fix it, submit an Issue. For questions, use the Discussions section.
@@ -1,124 +0,0 @@
1
- # 开发者指导手册
2
-
3
- ## 简介
4
-
5
- 本指导手册旨在为项目的开发者提供一份详细的开发指导,包括分支管理、标签管理、提交规则、代码审查等内容。遵循这些指导有助于项目的高效开发和良好协作。
6
-
7
- ## 开发模式
8
-
9
- 我们使用 [Git](https://git-scm.com/) 作为版本控制工具,项目开发模式遵从多版本的 `Git-Flow` 模式:
10
-
11
- - `main` 分支为主干开发分支,所有特性都从该分支检出并合入
12
- - `{{project}}-feature-*` 分支为特性开发分支
13
- - `{{project}}-{$majorVersion}.{$minorVersion}.x` 为指定版本分支
14
- - `{{project}}-bugfix-*` 分支为问题修复分支
15
- - 所有问题修复或者功能增强,均需要找到合适的最低版本分支进行处理,然后逐级分支往上合入,最终合入 `main` 分支
16
-
17
- ## 环境配置
18
-
19
- ### 前置条件
20
-
21
- <!-- TODO: 在此添加你的项目前置条件 -->
22
-
23
- ### 快速开始
24
-
25
- ```bash
26
- # 克隆项目
27
- git clone <repository-url>
28
-
29
- # 安装依赖
30
- # TODO: 添加你的项目安装命令
31
-
32
- # 构建
33
- # TODO: 添加你的项目构建命令
34
-
35
- # 运行测试
36
- # TODO: 添加你的项目测试命令
37
-
38
- # 代码检查
39
- # TODO: 添加你的项目检查命令
40
- ```
41
-
42
- 请参考项目的 `README.md` 文件以获取更多关于如何配置开发环境的指导。
43
-
44
- ## 分支管理
45
-
46
- - 为每个功能或问题修复创建一个新的分支,避免在主分支(如 `main`)上直接开发。
47
- - 分支命名应简洁明了,描述分支的主要目的。
48
- - 分支以 `{{project}}-` 开头。
49
- - 特性分支以 `{{project}}-feature-` 开头,功能增强分支以 `{{project}}-enhancement-` 开头,任务型分支以 `{{project}}-task-` 开头,问题修复分支以 `{{project}}-bugfix-` 开头。
50
- - 使用短划线 `-` 来分隔单词。
51
- - 版本分支最后跟两个版本号和一个 `x` 字母,例如:`{{project}}-1.0.x`。
52
- - 发布分支后面跟三个版本号,例如:`{{project}}-1.0.0`。
53
-
54
- ### 版本分支合并规则
55
-
56
- - 版本分支合并必须遵循低版本向高版本合并的原则,且不可跨越某一个版本。
57
- - 当任意 `feature`、`enhancement` 或 `bugfix` 合入指定版本分支之后,需要依次向上合并直到 `main` 分支为止。
58
-
59
- ## 标签管理
60
-
61
- - 每个标签的名字和发布分支的名字需要保持一致,例如:`{{project}}-1.0.0`。
62
- - 纯数字版本的分支需要以 `v` 开头,例如:`v0.1.0`。
63
- - 候选版本以特殊词组结尾,例如:`{{project}}-1.0.0-alpha1`。
64
- - 当标签被打出后,对应的发布分支应当删除。
65
- - 所有的 Issue 和 PR 都需要至少包含两种标签:`in: {$module}` 和 `type: {$type}`。
66
-
67
- ## 开发规范
68
-
69
- ### 代码风格
70
-
71
- <!-- TODO: 在此添加你的项目代码风格要求 -->
72
-
73
- ### 注释信息
74
-
75
- - 每一个模块文件都建议包含注释,说明其职责和用途。
76
- - 所有被 `export` 的类、函数、接口等都需要添加文档注释。
77
-
78
- ## 提交规则
79
-
80
- ### 提交信息格式
81
-
82
- 我们采用 [Conventional Commits](https://www.conventionalcommits.org/) 规范:
83
- `<type>(<scope>): <subject>`
84
-
85
- - **type(类型)**:`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`
86
- - **scope(范围/模块)**:对应项目模块名。如果涉及多个模块或全局变动,可以使用 `*` 或留空。
87
- - **subject(描述)**:简短描述主要内容,使用英文祈使语气,不超过 50 字符,结尾不需要句号。
88
-
89
- **样例:**
90
- - `feat(ai): add multi-agent collaboration workflow`
91
- - `fix(github): fix PR title validation regex`
92
- - `docs(ai): update collaboration quick start guide`
93
-
94
- ## 代码审查
95
-
96
- - 开发完成后,通过创建合并请求将变更合并到主分支。在合并请求中描述所做的更改,并邀请其他项目成员进行代码审查。
97
- - 保持主分支始终可部署,确保合并的代码经过充分测试。
98
-
99
- ## 测试
100
-
101
- <!-- TODO: 在此添加你的项目测试要求 -->
102
-
103
- ## 发布流程
104
-
105
- 遵循项目的发布计划和流程。在发布新版本时,请按照标签管理的规定创建一个新的 `tag`。
106
-
107
- ## 问题和需求跟踪
108
-
109
- 使用项目的 `Issue` 跟踪器来报告和跟踪问题、需求和功能建议。在创建新 `Issue` 时,请尽量提供详细的信息。
110
-
111
- ## 贡献指南
112
-
113
- 对于希望参与项目的贡献者,请遵循以下步骤:
114
-
115
- 1. Fork 当前项目。
116
- 2. 克隆 Fork 后的仓库到本地。
117
- 3. 在本地仓库中创建一个新的分支,进行开发。
118
- 4. 遵循本文档中的提交规范,将更改提交到新分支。
119
- 5. 通过页面创建一个 PR,请求将更改合并到该项目的对应分支,PR 中仅能包含一次提交。
120
- 6. 参与代码审查和讨论,根据反馈进行必要的修改。
121
- 7. 一旦更改被接受并合并,您的贡献将成为项目的一部分。
122
-
123
- > - 项目维护者可能会提出修改建议,请保持开放态度并积极沟通。
124
- > - 如果您发现了一个问题但并不准备自己修复,可以仅提交一个 Issue。如果对方案存在疑问,可以在"讨论"模块中提问。