@fitlab-ai/agent-infra 0.3.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.
- package/License.txt +21 -0
- package/README.md +170 -0
- package/README.zh-CN.md +170 -0
- package/bin/cli.js +65 -0
- package/lib/defaults.json +45 -0
- package/lib/init.js +203 -0
- package/lib/log.js +27 -0
- package/lib/paths.js +48 -0
- package/lib/prompt.js +70 -0
- package/lib/render.js +99 -0
- package/lib/update.js +161 -0
- package/lib/version.js +7 -0
- package/package.json +48 -0
- package/templates/.agent-workspace/README.md +26 -0
- package/templates/.agent-workspace/README.zh-CN.md +26 -0
- package/templates/.agents/QUICKSTART.md +166 -0
- package/templates/.agents/QUICKSTART.zh-CN.md +166 -0
- package/templates/.agents/README.md +134 -0
- package/templates/.agents/README.zh-CN.md +134 -0
- package/templates/.agents/skills/analyze-task/SKILL.md +169 -0
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +169 -0
- package/templates/.agents/skills/block-task/SKILL.md +164 -0
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +163 -0
- package/templates/.agents/skills/check-task/SKILL.md +122 -0
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +122 -0
- package/templates/.agents/skills/close-codescan/SKILL.md +122 -0
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +122 -0
- package/templates/.agents/skills/close-dependabot/SKILL.md +130 -0
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +130 -0
- package/templates/.agents/skills/commit/SKILL.md +218 -0
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +217 -0
- package/templates/.agents/skills/complete-task/SKILL.md +139 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +137 -0
- package/templates/.agents/skills/create-pr/SKILL.md +126 -0
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +125 -0
- package/templates/.agents/skills/create-release-note/SKILL.md +167 -0
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +166 -0
- package/templates/.agents/skills/create-task/SKILL.md +143 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +143 -0
- package/templates/.agents/skills/implement-task/SKILL.md +229 -0
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +227 -0
- package/templates/.agents/skills/import-codescan/SKILL.md +103 -0
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +103 -0
- package/templates/.agents/skills/import-dependabot/SKILL.md +107 -0
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +107 -0
- package/templates/.agents/skills/import-issue/SKILL.md +119 -0
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +119 -0
- package/templates/.agents/skills/init-labels/SKILL.md +74 -0
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +74 -0
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +111 -0
- package/templates/.agents/skills/init-milestones/SKILL.md +74 -0
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +74 -0
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +169 -0
- package/templates/.agents/skills/plan-task/SKILL.md +225 -0
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +225 -0
- package/templates/.agents/skills/refine-task/SKILL.md +200 -0
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +200 -0
- package/templates/.agents/skills/refine-title/SKILL.md +84 -0
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +83 -0
- package/templates/.agents/skills/release/SKILL.md +142 -0
- package/templates/.agents/skills/release/SKILL.zh-CN.md +141 -0
- package/templates/.agents/skills/release/scripts/manage-milestones.sh +80 -0
- package/templates/.agents/skills/review-task/SKILL.md +276 -0
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +276 -0
- package/templates/.agents/skills/sync-issue/SKILL.md +569 -0
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +569 -0
- package/templates/.agents/skills/sync-pr/SKILL.md +142 -0
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +142 -0
- package/templates/.agents/skills/test/SKILL.md +61 -0
- package/templates/.agents/skills/test/SKILL.zh-CN.md +61 -0
- package/templates/.agents/skills/test-integration/SKILL.md +70 -0
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +69 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.md +136 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +124 -0
- package/templates/.agents/skills/update-agent-infra/scripts/package.json +3 -0
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +469 -0
- package/templates/.agents/skills/upgrade-dependency/SKILL.md +88 -0
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +87 -0
- package/templates/.agents/templates/handoff.md +60 -0
- package/templates/.agents/templates/handoff.zh-CN.md +60 -0
- package/templates/.agents/templates/review-report.md +67 -0
- package/templates/.agents/templates/review-report.zh-CN.md +67 -0
- package/templates/.agents/templates/task.md +65 -0
- package/templates/.agents/templates/task.zh-CN.md +65 -0
- package/templates/.agents/workflows/bug-fix.yaml +149 -0
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +149 -0
- package/templates/.agents/workflows/code-review.yaml +60 -0
- package/templates/.agents/workflows/code-review.zh-CN.yaml +60 -0
- package/templates/.agents/workflows/feature-development.yaml +150 -0
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +150 -0
- package/templates/.agents/workflows/refactoring.yaml +154 -0
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +154 -0
- package/templates/.claude/CLAUDE.md +163 -0
- package/templates/.claude/CLAUDE.zh-CN.md +163 -0
- package/templates/.claude/commands/analyze-task.md +8 -0
- package/templates/.claude/commands/analyze-task.zh-CN.md +8 -0
- package/templates/.claude/commands/block-task.md +8 -0
- package/templates/.claude/commands/block-task.zh-CN.md +8 -0
- package/templates/.claude/commands/check-task.md +8 -0
- package/templates/.claude/commands/check-task.zh-CN.md +8 -0
- package/templates/.claude/commands/close-codescan.md +8 -0
- package/templates/.claude/commands/close-codescan.zh-CN.md +8 -0
- package/templates/.claude/commands/close-dependabot.md +8 -0
- package/templates/.claude/commands/close-dependabot.zh-CN.md +8 -0
- package/templates/.claude/commands/commit.md +7 -0
- package/templates/.claude/commands/commit.zh-CN.md +7 -0
- package/templates/.claude/commands/complete-task.md +8 -0
- package/templates/.claude/commands/complete-task.zh-CN.md +8 -0
- package/templates/.claude/commands/create-pr.md +8 -0
- package/templates/.claude/commands/create-pr.zh-CN.md +8 -0
- package/templates/.claude/commands/create-release-note.md +8 -0
- package/templates/.claude/commands/create-release-note.zh-CN.md +8 -0
- package/templates/.claude/commands/create-task.md +8 -0
- package/templates/.claude/commands/create-task.zh-CN.md +8 -0
- package/templates/.claude/commands/implement-task.md +8 -0
- package/templates/.claude/commands/implement-task.zh-CN.md +8 -0
- package/templates/.claude/commands/import-codescan.md +8 -0
- package/templates/.claude/commands/import-codescan.zh-CN.md +8 -0
- package/templates/.claude/commands/import-dependabot.md +8 -0
- package/templates/.claude/commands/import-dependabot.zh-CN.md +8 -0
- package/templates/.claude/commands/import-issue.md +8 -0
- package/templates/.claude/commands/import-issue.zh-CN.md +8 -0
- package/templates/.claude/commands/init-labels.md +7 -0
- package/templates/.claude/commands/init-labels.zh-CN.md +7 -0
- package/templates/.claude/commands/init-milestones.md +8 -0
- package/templates/.claude/commands/init-milestones.zh-CN.md +8 -0
- package/templates/.claude/commands/plan-task.md +8 -0
- package/templates/.claude/commands/plan-task.zh-CN.md +8 -0
- package/templates/.claude/commands/refine-task.md +8 -0
- package/templates/.claude/commands/refine-task.zh-CN.md +8 -0
- package/templates/.claude/commands/refine-title.md +8 -0
- package/templates/.claude/commands/refine-title.zh-CN.md +8 -0
- package/templates/.claude/commands/release.md +8 -0
- package/templates/.claude/commands/release.zh-CN.md +8 -0
- package/templates/.claude/commands/review-task.md +8 -0
- package/templates/.claude/commands/review-task.zh-CN.md +8 -0
- package/templates/.claude/commands/sync-issue.md +8 -0
- package/templates/.claude/commands/sync-issue.zh-CN.md +8 -0
- package/templates/.claude/commands/sync-pr.md +8 -0
- package/templates/.claude/commands/sync-pr.zh-CN.md +8 -0
- package/templates/.claude/commands/test-integration.md +7 -0
- package/templates/.claude/commands/test-integration.zh-CN.md +7 -0
- package/templates/.claude/commands/test.md +7 -0
- package/templates/.claude/commands/test.zh-CN.md +7 -0
- package/templates/.claude/commands/update-agent-infra.md +7 -0
- package/templates/.claude/commands/update-agent-infra.zh-CN.md +7 -0
- package/templates/.claude/commands/upgrade-dependency.md +8 -0
- package/templates/.claude/commands/upgrade-dependency.zh-CN.md +8 -0
- package/templates/.claude/project-rules.md +65 -0
- package/templates/.claude/project-rules.zh-CN.md +65 -0
- package/templates/.claude/settings.json +20 -0
- package/templates/.codex/README.md +38 -0
- package/templates/.codex/README.zh-CN.md +37 -0
- package/templates/.editorconfig +15 -0
- package/templates/.gemini/commands/_project_/analyze-task.toml +8 -0
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/block-task.toml +8 -0
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/check-task.toml +8 -0
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/close-codescan.toml +8 -0
- package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/close-dependabot.toml +8 -0
- package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/commit.toml +6 -0
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +6 -0
- package/templates/.gemini/commands/_project_/complete-task.toml +8 -0
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/create-pr.toml +8 -0
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/create-release-note.toml +8 -0
- package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/create-task.toml +8 -0
- package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/implement-task.toml +8 -0
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/import-codescan.toml +8 -0
- package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/import-dependabot.toml +8 -0
- package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/import-issue.toml +8 -0
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/init-labels.toml +8 -0
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/init-milestones.toml +10 -0
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +10 -0
- package/templates/.gemini/commands/_project_/plan-task.toml +8 -0
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/refine-task.toml +8 -0
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/refine-title.toml +8 -0
- package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/release.toml +8 -0
- package/templates/.gemini/commands/_project_/release.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-task.toml +8 -0
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/sync-issue.toml +8 -0
- package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/sync-pr.toml +8 -0
- package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/test-integration.toml +6 -0
- package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +6 -0
- package/templates/.gemini/commands/_project_/test.toml +6 -0
- package/templates/.gemini/commands/_project_/test.zh-CN.toml +6 -0
- package/templates/.gemini/commands/_project_/update-agent-infra.toml +6 -0
- package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +6 -0
- package/templates/.gemini/commands/_project_/upgrade-dependency.toml +8 -0
- package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +8 -0
- package/templates/.gemini/settings.json +3 -0
- package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +149 -0
- package/templates/.github/ISSUE_TEMPLATE/02_question.yml +101 -0
- package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +131 -0
- package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +165 -0
- package/templates/.github/ISSUE_TEMPLATE/05_other.yml +147 -0
- package/templates/.github/ISSUE_TEMPLATE/config.yml +11 -0
- package/templates/.github/PULL_REQUEST_TEMPLATE.md +123 -0
- package/templates/.github/dependabot.yml +17 -0
- package/templates/.github/hooks/check-utf8-encoding.sh +25 -0
- package/templates/.github/release.yml +27 -0
- package/templates/.github/workflows/pr-title-check.yml +42 -0
- package/templates/.mailmap +4 -0
- package/templates/.opencode/COMMAND_STYLE_GUIDE.md +232 -0
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +232 -0
- package/templates/.opencode/README.md +76 -0
- package/templates/.opencode/README.zh-CN.md +77 -0
- package/templates/.opencode/commands/analyze-task.md +11 -0
- package/templates/.opencode/commands/analyze-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/block-task.md +11 -0
- package/templates/.opencode/commands/block-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/check-task.md +11 -0
- package/templates/.opencode/commands/check-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/close-codescan.md +11 -0
- package/templates/.opencode/commands/close-codescan.zh-CN.md +11 -0
- package/templates/.opencode/commands/close-dependabot.md +11 -0
- package/templates/.opencode/commands/close-dependabot.zh-CN.md +11 -0
- package/templates/.opencode/commands/commit.md +9 -0
- package/templates/.opencode/commands/commit.zh-CN.md +9 -0
- package/templates/.opencode/commands/complete-task.md +11 -0
- package/templates/.opencode/commands/complete-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/create-pr.md +11 -0
- package/templates/.opencode/commands/create-pr.zh-CN.md +11 -0
- package/templates/.opencode/commands/create-release-note.md +11 -0
- package/templates/.opencode/commands/create-release-note.zh-CN.md +11 -0
- package/templates/.opencode/commands/create-task.md +11 -0
- package/templates/.opencode/commands/create-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/implement-task.md +11 -0
- package/templates/.opencode/commands/implement-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/import-codescan.md +11 -0
- package/templates/.opencode/commands/import-codescan.zh-CN.md +11 -0
- package/templates/.opencode/commands/import-dependabot.md +11 -0
- package/templates/.opencode/commands/import-dependabot.zh-CN.md +11 -0
- package/templates/.opencode/commands/import-issue.md +11 -0
- package/templates/.opencode/commands/import-issue.zh-CN.md +11 -0
- package/templates/.opencode/commands/init-labels.md +9 -0
- package/templates/.opencode/commands/init-labels.zh-CN.md +9 -0
- package/templates/.opencode/commands/init-milestones.md +11 -0
- package/templates/.opencode/commands/init-milestones.zh-CN.md +11 -0
- package/templates/.opencode/commands/plan-task.md +11 -0
- package/templates/.opencode/commands/plan-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/refine-task.md +11 -0
- package/templates/.opencode/commands/refine-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/refine-title.md +11 -0
- package/templates/.opencode/commands/refine-title.zh-CN.md +11 -0
- package/templates/.opencode/commands/release.md +11 -0
- package/templates/.opencode/commands/release.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-task.md +11 -0
- package/templates/.opencode/commands/review-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/sync-issue.md +11 -0
- package/templates/.opencode/commands/sync-issue.zh-CN.md +11 -0
- package/templates/.opencode/commands/sync-pr.md +11 -0
- package/templates/.opencode/commands/sync-pr.zh-CN.md +11 -0
- package/templates/.opencode/commands/test-integration.md +9 -0
- package/templates/.opencode/commands/test-integration.zh-CN.md +9 -0
- package/templates/.opencode/commands/test.md +9 -0
- package/templates/.opencode/commands/test.zh-CN.md +9 -0
- package/templates/.opencode/commands/update-agent-infra.md +9 -0
- package/templates/.opencode/commands/update-agent-infra.zh-CN.md +9 -0
- package/templates/.opencode/commands/upgrade-dependency.md +11 -0
- package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +11 -0
- package/templates/AGENTS.md +91 -0
- package/templates/AGENTS.zh-CN.md +91 -0
- package/templates/CONTRIBUTING.md +126 -0
- package/templates/CONTRIBUTING.zh-CN.md +124 -0
- package/templates/SECURITY.md +131 -0
- package/templates/SECURITY.zh-CN.md +131 -0
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Project - Claude Code Instructions
|
|
2
|
+
|
|
3
|
+
This repository uses agent-infra for multi-AI collaboration infrastructure.
|
|
4
|
+
|
|
5
|
+
## Quick Commands
|
|
6
|
+
|
|
7
|
+
<!-- TODO: Add your project's build commands here -->
|
|
8
|
+
```bash
|
|
9
|
+
# Install dependencies
|
|
10
|
+
# TODO: your install command
|
|
11
|
+
|
|
12
|
+
# Build
|
|
13
|
+
# TODO: your build command
|
|
14
|
+
|
|
15
|
+
# Run tests
|
|
16
|
+
# TODO: your test command
|
|
17
|
+
|
|
18
|
+
# Lint
|
|
19
|
+
# TODO: your lint command
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Project Structure
|
|
23
|
+
|
|
24
|
+
<!-- TODO: Add your project's directory structure here -->
|
|
25
|
+
|
|
26
|
+
## Coding Standards
|
|
27
|
+
|
|
28
|
+
<!-- TODO: Add your project's coding standards here -->
|
|
29
|
+
|
|
30
|
+
### Copyright Header Update
|
|
31
|
+
When modifying any file with a copyright header, update the year:
|
|
32
|
+
1. Run `date +%Y` to get the current year (never hardcode)
|
|
33
|
+
2. Update format: `2024-2025` -> `2024-2026` (assuming current year is 2026)
|
|
34
|
+
|
|
35
|
+
### Branch Naming
|
|
36
|
+
Use project prefix: `{{project}}-feature-xxx`, `{{project}}-bugfix-yyy`
|
|
37
|
+
|
|
38
|
+
## Testing
|
|
39
|
+
|
|
40
|
+
<!-- TODO: Add your project's test framework and commands here -->
|
|
41
|
+
|
|
42
|
+
## Commit & PR Conventions
|
|
43
|
+
|
|
44
|
+
### Commit Message Format (Conventional Commits)
|
|
45
|
+
```
|
|
46
|
+
<type>(<scope>): <subject>
|
|
47
|
+
```
|
|
48
|
+
- **type**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
|
|
49
|
+
- **scope**: module name (optional)
|
|
50
|
+
- **subject**: English, imperative mood, max 50 characters
|
|
51
|
+
|
|
52
|
+
### Claude commit signature
|
|
53
|
+
```
|
|
54
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### PR Checklist
|
|
58
|
+
- [ ] Tests pass
|
|
59
|
+
- [ ] Lint passes
|
|
60
|
+
- [ ] Build succeeds
|
|
61
|
+
- [ ] Public APIs documented
|
|
62
|
+
- [ ] Copyright headers updated
|
|
63
|
+
|
|
64
|
+
## Claude-Specific Rules
|
|
65
|
+
|
|
66
|
+
### Critical Rules
|
|
67
|
+
1. **No auto-commit**: Never execute `git commit`/`git add` automatically. Remind user to use `/commit`
|
|
68
|
+
2. **Copyright year update**: Run `date +%Y`, use Edit tool to update
|
|
69
|
+
3. **Task status management**: Update `task.md` fields after each command
|
|
70
|
+
|
|
71
|
+
### Important Rules
|
|
72
|
+
4. **Task semantic recognition**: Auto-detect user intent (e.g., "analyze issue 207" -> `/import-issue 207`; "analyze task TASK-20260306-143022" -> `/analyze-task TASK-20260306-143022`)
|
|
73
|
+
5. **PR conventions**: Add generation marker when creating PRs
|
|
74
|
+
|
|
75
|
+
**Detailed rules**: `.claude/project-rules.md`
|
|
76
|
+
|
|
77
|
+
## Tool Usage
|
|
78
|
+
|
|
79
|
+
| Operation | Recommended | Avoid |
|
|
80
|
+
|-----------|-------------|-------|
|
|
81
|
+
| File search | `Glob` | `find`, `ls` |
|
|
82
|
+
| Content search | `Grep` | `grep`, `rg` |
|
|
83
|
+
| Read files | `Read` | `cat`, `head`, `tail` |
|
|
84
|
+
| Edit files | `Edit` | `sed`, `awk` |
|
|
85
|
+
| Create files | `Write` | `echo >`, `cat <<EOF` |
|
|
86
|
+
|
|
87
|
+
**Bash only for**: Git operations, build/test, system info
|
|
88
|
+
|
|
89
|
+
## Slash Commands
|
|
90
|
+
|
|
91
|
+
### Development
|
|
92
|
+
```bash
|
|
93
|
+
/commit [message] # Commit code
|
|
94
|
+
/create-pr [branch] # Create PR
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Task Management
|
|
98
|
+
```bash
|
|
99
|
+
/create-task <description> # Create task from description
|
|
100
|
+
/import-issue <number> # Import GitHub Issue as task
|
|
101
|
+
/analyze-task <task-id> # Analyze task requirements
|
|
102
|
+
/plan-task <task-id> # Design technical plan
|
|
103
|
+
/implement-task <task-id> # Implement task
|
|
104
|
+
/review-task <task-id> # Code review
|
|
105
|
+
/complete-task <task-id> # Complete task
|
|
106
|
+
/check-task <task-id> # Check status
|
|
107
|
+
/block-task <task-id> # Block task
|
|
108
|
+
/refine-task <task-id> # Handle review feedback
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### PR and Sync
|
|
112
|
+
```bash
|
|
113
|
+
/sync-issue <number> # Sync progress to Issue
|
|
114
|
+
/sync-pr <number> # Sync progress to PR
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Testing and Release
|
|
118
|
+
```bash
|
|
119
|
+
/test # Run tests
|
|
120
|
+
/test-integration # Run integration tests
|
|
121
|
+
/release <version> # Version release
|
|
122
|
+
/create-release-note # Generate release notes
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Security
|
|
126
|
+
```bash
|
|
127
|
+
/import-dependabot <number> # Import Dependabot alert
|
|
128
|
+
/close-dependabot # Close Dependabot alert
|
|
129
|
+
/import-codescan <number> # Import Code Scanning alert
|
|
130
|
+
/close-codescan # Close Code Scanning alert
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Tools
|
|
134
|
+
```bash
|
|
135
|
+
/init-milestones # Initialize GitHub Milestones
|
|
136
|
+
/init-labels # Initialize GitHub Labels
|
|
137
|
+
/refine-title # Reformat Issue/PR title
|
|
138
|
+
/upgrade-dependency # Upgrade dependency
|
|
139
|
+
/update-agent-infra # Update AI collaboration config
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Language Conventions
|
|
143
|
+
|
|
144
|
+
| Context | Language |
|
|
145
|
+
|---------|----------|
|
|
146
|
+
| Code identifiers, docs | English |
|
|
147
|
+
| Git commit messages | English (Conventional Commits) |
|
|
148
|
+
| Project documentation | English (primary) + Chinese translation |
|
|
149
|
+
| AI responses | Follow user's input language |
|
|
150
|
+
|
|
151
|
+
## Multi-AI Collaboration
|
|
152
|
+
|
|
153
|
+
This project supports Claude Code, Codex, Gemini CLI, OpenCode.
|
|
154
|
+
|
|
155
|
+
- `.agents/` - Shared collaboration config
|
|
156
|
+
- `.agent-workspace/` - Task workspace (git-ignored)
|
|
157
|
+
|
|
158
|
+
**Collaboration guide**: `.agents/README.md`
|
|
159
|
+
|
|
160
|
+
## Security
|
|
161
|
+
|
|
162
|
+
- Do not commit: `.env`, credentials, keys
|
|
163
|
+
- Security issues: follow `SECURITY.md`
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
- `.agent-workspace/` - 任务工作区(已被 git ignore)
|
|
157
|
+
|
|
158
|
+
**协作指南**:`.agents/README.md`
|
|
159
|
+
|
|
160
|
+
## 安全注意事项
|
|
161
|
+
|
|
162
|
+
- 不要提交:`.env`、credentials、密钥
|
|
163
|
+
- 安全问题请按 `SECURITY.md` 指引
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Analyze an existing task and output a requirement analysis document"
|
|
3
|
+
usage: "/analyze-task <task-id>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the analyze-task skill from `.agents/skills/analyze-task/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Close Dependabot security alert with documented reason"
|
|
3
|
+
usage: "/close-dependabot <alert-number>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the close-dependabot skill from `.agents/skills/close-dependabot/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Auto-generate structured Release Notes from PR/commit and optionally create GitHub Draft Release"
|
|
3
|
+
usage: "/create-release-note <ver> [prev]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the create-release-note skill from `.agents/skills/create-release-note/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Create task from natural language description and generate requirement analysis document"
|
|
3
|
+
usage: "/create-task <description>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the create-task skill from `.agents/skills/create-task/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Implement task based on technical plan and output implementation report"
|
|
3
|
+
usage: "/implement-task <task-id>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the implement-task skill from `.agents/skills/implement-task/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Import a Code Scanning alert and create a remediation task"
|
|
3
|
+
usage: "/import-codescan <alert-number>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the import-codescan skill from `.agents/skills/import-codescan/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Import a Dependabot alert and create a remediation task"
|
|
3
|
+
usage: "/import-dependabot <alert-number>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the import-dependabot skill from `.agents/skills/import-dependabot/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Initialize the repository's standard GitHub Milestones taxonomy and optionally backfill historical milestones with --history"
|
|
3
|
+
usage: "/init-milestones [--history]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the init-milestones skill from `.agents/skills/init-milestones/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|