@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,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Deep-analyze Issue or PR content and reformat its title to Conventional Commits format"
|
|
3
|
+
usage: "/refine-title <number>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the refine-title skill from `.agents/skills/refine-title/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Update project AI collaboration config by re-rendering latest templates/"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Read and execute the update-agent-infra skill from `.agents/skills/update-agent-infra/SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Follow all steps defined in the skill exactly, including rendering from `templates/` before applying managed or merged updates.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Upgrade dependency package to new version"
|
|
3
|
+
usage: "/upgrade-dependency <pkg> <from> <to>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and execute the upgrade-dependency skill from `.agents/skills/upgrade-dependency/SKILL.md`.
|
|
7
|
+
|
|
8
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(tree:*)",
|
|
5
|
+
"Bash(date:*)",
|
|
6
|
+
"Bash(git:*)",
|
|
7
|
+
"Bash(gh:*)",
|
|
8
|
+
"Bash(ls:*)",
|
|
9
|
+
"Bash(pwd:*)",
|
|
10
|
+
"Bash(echo:*)",
|
|
11
|
+
"Bash(mkdir:*)",
|
|
12
|
+
"WebSearch",
|
|
13
|
+
"WebFetch"
|
|
14
|
+
],
|
|
15
|
+
"deny": [
|
|
16
|
+
"Bash(sudo rm:*)",
|
|
17
|
+
"Bash(rm -rf /:*)"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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/`.
|
|
@@ -0,0 +1,37 @@
|
|
|
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/` 中的对应文件。
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Analyze an existing task and output a requirement analysis document"
|
|
2
|
+
prompt = """
|
|
3
|
+
Analyze task {{args}}.
|
|
4
|
+
|
|
5
|
+
Read and execute the analyze-task skill from `.agents/skills/analyze-task/SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Follow all steps defined in the skill exactly.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Close Dependabot security alert with documented reason"
|
|
2
|
+
prompt = """
|
|
3
|
+
Close Dependabot alert #{{args}}.
|
|
4
|
+
|
|
5
|
+
Read and execute the close-dependabot skill from `.agents/skills/close-dependabot/SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Follow all steps defined in the skill exactly.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Auto-generate structured Release Notes from PR/commit and optionally create GitHub Draft Release"
|
|
2
|
+
prompt = """
|
|
3
|
+
Generate release note: {{args}}
|
|
4
|
+
|
|
5
|
+
Read and execute the create-release-note skill from `.agents/skills/create-release-note/SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Follow all steps defined in the skill exactly.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Create task from natural language description and generate requirement analysis document"
|
|
2
|
+
prompt = """
|
|
3
|
+
Task description: {{args}}
|
|
4
|
+
|
|
5
|
+
Read and execute the create-task skill from `.agents/skills/create-task/SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Follow all steps defined in the skill exactly.
|
|
8
|
+
"""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
description = "Implement task based on technical plan and output implementation report"
|
|
2
|
+
prompt = """
|
|
3
|
+
Implement task {{args}}.
|
|
4
|
+
|
|
5
|
+
Read and execute the implement-task skill from `.agents/skills/implement-task/SKILL.md`.
|
|
6
|
+
|
|
7
|
+
Follow all steps defined in the skill exactly.
|
|
8
|
+
"""
|