@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Labels, Issue Type, and Milestone Rules
|
|
2
|
+
|
|
3
|
+
Read this file before applying labels, Issue Type, milestone, or `in:` labels.
|
|
4
|
+
|
|
5
|
+
## Default Body Format (Fallback)
|
|
6
|
+
|
|
7
|
+
Recommended fallback:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
{task-description}
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- [ ] {requirement-1}
|
|
17
|
+
- [ ] {requirement-2}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Map task types to GitHub labels and Issue Types, but keep only labels that actually exist.
|
|
21
|
+
|
|
22
|
+
Fallback label mapping:
|
|
23
|
+
|
|
24
|
+
| task.md type | GitHub label |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `bug`, `bugfix` | `type: bug` |
|
|
27
|
+
| `feature` | `type: feature` |
|
|
28
|
+
| `enhancement` | `type: enhancement` |
|
|
29
|
+
| `docs`, `documentation` | `type: documentation` |
|
|
30
|
+
| `dependency-upgrade` | `type: dependency-upgrade` |
|
|
31
|
+
| `task`, `chore`, `refactor`, `refactoring` | `type: task` |
|
|
32
|
+
| other values | skip |
|
|
33
|
+
|
|
34
|
+
Issue Type fallback mapping:
|
|
35
|
+
|
|
36
|
+
| task.md type | GitHub Issue Type |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `bug`, `bugfix` | `Bug` |
|
|
39
|
+
| `feature`, `enhancement` | `Feature` |
|
|
40
|
+
| `task`, `documentation`, `dependency-upgrade`, `chore`, `docs`, `refactor`, `refactoring`, and all other values | `Task` |
|
|
41
|
+
|
|
42
|
+
## Create the Issue
|
|
43
|
+
|
|
44
|
+
Use:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
gh issue create --title "{title}" --body "{body}" --label "{label-1}" --label "{label-2}" --milestone "{milestone}"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If no valid labels remain, omit `--label`. If `milestone` is empty, fall back to `General Backlog`.
|
|
51
|
+
|
|
52
|
+
Issue Type setup:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
gh api "orgs/$owner/issue-types" --jq '.[].name'
|
|
56
|
+
gh api "repos/$repo/issues/{issue-number}" -X PATCH -f type="{issue-type}" --silent
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`in:` labels:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
gh label list --search "in:" --limit 50 --json name --jq '.[].name'
|
|
63
|
+
gh issue edit {issue-number} --add-label "in: {module}"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Only add relevant `in:` labels. Do not remove existing `in:` labels, and do not fail Issue creation when `in:` labels are unavailable or irrelevant.
|
|
67
|
+
|
|
68
|
+
Skip unavailable labels, Issue Types, or milestones without failing the Issue creation flow.
|
|
69
|
+
|
|
70
|
+
Final user output must include every TUI `sync-issue` command format:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Next step - sync progress to the Issue:
|
|
74
|
+
- Claude Code / OpenCode: /sync-issue {task-id}
|
|
75
|
+
- Gemini CLI: /agent-infra:sync-issue {task-id}
|
|
76
|
+
- Codex CLI: $sync-issue {task-id}
|
|
77
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Label、Issue Type 和 Milestone 规则
|
|
2
|
+
|
|
3
|
+
在应用 label、Issue Type、milestone 或 `in:` label 之前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 默认正文格式(Fallback)
|
|
6
|
+
|
|
7
|
+
推荐 fallback:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
{task-description}
|
|
13
|
+
|
|
14
|
+
## Requirements
|
|
15
|
+
|
|
16
|
+
- [ ] {requirement-1}
|
|
17
|
+
- [ ] {requirement-2}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
将任务类型映射到 GitHub label 和 Issue Type,但只保留仓库里实际存在的 label。
|
|
21
|
+
|
|
22
|
+
Fallback label 映射:
|
|
23
|
+
|
|
24
|
+
| task.md type | GitHub label |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `bug`, `bugfix` | `type: bug` |
|
|
27
|
+
| `feature` | `type: feature` |
|
|
28
|
+
| `enhancement` | `type: enhancement` |
|
|
29
|
+
| `docs`, `documentation` | `type: documentation` |
|
|
30
|
+
| `dependency-upgrade` | `type: dependency-upgrade` |
|
|
31
|
+
| `task`, `chore`, `refactor`, `refactoring` | `type: task` |
|
|
32
|
+
| 其他值 | 跳过 |
|
|
33
|
+
|
|
34
|
+
Issue Type fallback 映射:
|
|
35
|
+
|
|
36
|
+
| task.md type | GitHub Issue Type |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `bug`, `bugfix` | `Bug` |
|
|
39
|
+
| `feature`, `enhancement` | `Feature` |
|
|
40
|
+
| `task`, `documentation`, `dependency-upgrade`, `chore`, `docs`, `refactor`, `refactoring` 以及其他所有值 | `Task` |
|
|
41
|
+
|
|
42
|
+
## 创建 Issue
|
|
43
|
+
|
|
44
|
+
使用:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
gh issue create --title "{title}" --body "{body}" --label "{label-1}" --label "{label-2}" --milestone "{milestone}"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
如果最终没有有效 label,就省略 `--label`。如果 `milestone` 为空,则回退到 `General Backlog`。
|
|
51
|
+
|
|
52
|
+
Issue Type 设置:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
gh api "orgs/$owner/issue-types" --jq '.[].name'
|
|
56
|
+
gh api "repos/$repo/issues/{issue-number}" -X PATCH -f type="{issue-type}" --silent
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`in:` label:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
gh label list --search "in:" --limit 50 --json name --jq '.[].name'
|
|
63
|
+
gh issue edit {issue-number} --add-label "in: {module}"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
只添加相关的 `in:` label。不要移除已有的 `in:` label,并且当 `in:` label 不可用或不相关时,不要让创建 Issue 流程失败。
|
|
67
|
+
|
|
68
|
+
当 label、Issue Type 或 milestone 不可用时,应跳过并继续,不要让 Issue 创建失败。
|
|
69
|
+
|
|
70
|
+
最终给用户的输出必须包含所有 TUI 的 `sync-issue` 命令格式:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
下一步 - 同步进度到 Issue:
|
|
74
|
+
- Claude Code / OpenCode: /sync-issue {task-id}
|
|
75
|
+
- Gemini CLI: /agent-infra:sync-issue {task-id}
|
|
76
|
+
- Codex CLI: $sync-issue {task-id}
|
|
77
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Issue Template Matching
|
|
2
|
+
|
|
3
|
+
Read this file before deciding how to build the Issue body from `.github/ISSUE_TEMPLATE`.
|
|
4
|
+
|
|
5
|
+
## Detect Issue Templates
|
|
6
|
+
|
|
7
|
+
Search project templates with:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
rg --files .github/ISSUE_TEMPLATE -g '*.yml' -g '!config.yml'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
If templates exist, inspect their top-level `name:` fields and choose the best match for the task title and description.
|
|
14
|
+
|
|
15
|
+
Typical candidate templates:
|
|
16
|
+
- `bug_report.yml` for bug work
|
|
17
|
+
- `question.yml` for question or investigation work
|
|
18
|
+
- `feature_request.yml` for feature work
|
|
19
|
+
- `documentation.yml` for documentation work
|
|
20
|
+
- `other.yml` as the general fallback
|
|
21
|
+
|
|
22
|
+
If no template matches clearly, choose the nearest candidate. If templates are missing, unreadable, or parsing fails, fall back to the default body path.
|
|
23
|
+
|
|
24
|
+
## Build the Body from the Matched Template
|
|
25
|
+
|
|
26
|
+
Read the matched template's:
|
|
27
|
+
- `name`
|
|
28
|
+
- `type:`
|
|
29
|
+
- `labels:`
|
|
30
|
+
- `body:`
|
|
31
|
+
|
|
32
|
+
Field handling rules:
|
|
33
|
+
- `textarea` and `input`: use `attributes.label` as the markdown heading and fill values from task.md
|
|
34
|
+
- `markdown`: skip template explanation prose
|
|
35
|
+
- `dropdown` and `checkboxes`: skip
|
|
36
|
+
- when task.md lacks a suitable value, write `N/A`
|
|
37
|
+
|
|
38
|
+
Suggested field mapping:
|
|
39
|
+
|
|
40
|
+
| Template field hint | task.md source |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `summary`, `title` | task title |
|
|
43
|
+
| `description`, `problem`, `what happened`, `issue-description`, `current-content` | task description |
|
|
44
|
+
| `solution`, `requirements`, `steps`, `suggested-content`, `impact`, `context`, `alternatives`, `expected` | requirements list |
|
|
45
|
+
| other `textarea` / `input` fields | task description, otherwise `N/A` |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Issue 模板匹配
|
|
2
|
+
|
|
3
|
+
在决定如何从 `.github/ISSUE_TEMPLATE` 构建 Issue 正文之前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 探测 Issue 模板
|
|
6
|
+
|
|
7
|
+
用下面的命令搜索项目模板:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
rg --files .github/ISSUE_TEMPLATE -g '*.yml' -g '!config.yml'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
如果模板存在,检查其顶层 `name:` 字段,并为当前任务标题和描述选择最匹配的模板。
|
|
14
|
+
|
|
15
|
+
常见候选模板:
|
|
16
|
+
- `bug_report.yml`:用于 bug 类工作
|
|
17
|
+
- `question.yml`:用于问题排查或调研类工作
|
|
18
|
+
- `feature_request.yml`:用于功能类工作
|
|
19
|
+
- `documentation.yml`:用于文档类工作
|
|
20
|
+
- `other.yml`:通用 fallback
|
|
21
|
+
|
|
22
|
+
如果没有明显匹配的模板,选择最接近的候选项。如果模板缺失、不可读取或解析失败,就回退到默认正文路径。
|
|
23
|
+
|
|
24
|
+
## 使用匹配到的模板构建正文
|
|
25
|
+
|
|
26
|
+
读取匹配模板中的:
|
|
27
|
+
- `name`
|
|
28
|
+
- `type:`
|
|
29
|
+
- `labels:`
|
|
30
|
+
- `body:`
|
|
31
|
+
|
|
32
|
+
字段处理规则:
|
|
33
|
+
- `textarea` 和 `input`:使用 `attributes.label` 作为 Markdown 标题,并从 task.md 填充值
|
|
34
|
+
- `markdown`:跳过模板解释性文字
|
|
35
|
+
- `dropdown` 和 `checkboxes`:跳过
|
|
36
|
+
- 当 task.md 没有合适值时,写入 `N/A`
|
|
37
|
+
|
|
38
|
+
建议字段映射:
|
|
39
|
+
|
|
40
|
+
| 模板字段提示 | task.md 来源 |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `summary`, `title` | 任务标题 |
|
|
43
|
+
| `description`, `problem`, `what happened`, `issue-description`, `current-content` | 任务描述 |
|
|
44
|
+
| `solution`, `requirements`, `steps`, `suggested-content`, `impact`, `context`, `alternatives`, `expected` | 需求列表 |
|
|
45
|
+
| 其他 `textarea` / `input` 字段 | 优先使用任务描述,否则写 `N/A` |
|
|
@@ -1,202 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-pr
|
|
3
|
-
description:
|
|
4
|
-
Create a Pull Request to the specified or auto-detected target branch.
|
|
5
|
-
Triggered when the user requests PR creation.
|
|
6
|
-
Optional argument: target branch.
|
|
3
|
+
description: "Create a Pull Request to a target branch"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Create Pull Request
|
|
10
7
|
|
|
11
|
-
Create a Pull Request
|
|
8
|
+
Create a Pull Request and, when task-related, sync the essential metadata immediately.
|
|
12
9
|
|
|
13
10
|
## Execution Flow
|
|
14
11
|
|
|
15
|
-
### 1.
|
|
12
|
+
### 1. Parse Command Arguments
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
git branch --show-current
|
|
21
|
-
git log --oneline --decorate --first-parent -20
|
|
22
|
-
```
|
|
23
|
-
**Detection rules**:
|
|
24
|
-
- Currently on a main/trunk branch -> target is that branch
|
|
25
|
-
- Currently on a feature branch -> find the nearest parent branch from log decorations
|
|
26
|
-
- Cannot determine -> ask the user
|
|
14
|
+
Identify arguments from the command input:
|
|
15
|
+
- arguments matching `TASK-{yyyyMMdd-HHmmss}` -> `{task-id}`
|
|
16
|
+
- remaining arguments -> `{target-branch}`
|
|
27
17
|
|
|
28
|
-
|
|
18
|
+
If `{task-id}` is provided, read `.agents/workspace/active/{task-id}/task.md` to load task metadata such as `issue_number` and `type`.
|
|
19
|
+
If `{task-id}` is omitted, try to resolve it from the current session context; if it still cannot be determined, skip task-association logic in later steps.
|
|
29
20
|
|
|
30
|
-
|
|
21
|
+
### 2. Determine the Target Branch
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
Use the explicit argument when provided. Otherwise infer the target branch from Git history and branch topology.
|
|
33
24
|
|
|
34
|
-
|
|
25
|
+
> Detailed branch detection rules live in `reference/branch-strategy.md`. Read `reference/branch-strategy.md` before auto-detecting the base branch.
|
|
35
26
|
|
|
36
|
-
|
|
37
|
-
gh pr list --limit 3 --state merged --json number,title,body
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Use these as style and format reference.
|
|
41
|
-
|
|
42
|
-
### 4. Analyze Current Branch Changes
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
git status
|
|
46
|
-
git log <target-branch>..HEAD --oneline
|
|
47
|
-
git diff <target-branch>...HEAD --stat
|
|
48
|
-
git diff <target-branch>...HEAD
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Understand all commits and changes that will be in this PR. Look at ALL commits, not just the latest one.
|
|
52
|
-
|
|
53
|
-
### 5. Check Remote Branch Status
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 6. Push If Not Yet Pushed
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
git push -u origin <current-branch>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 7. Create PR
|
|
66
|
-
|
|
67
|
-
- If this work is associated with an active task, extract `issue_number` from task.md
|
|
68
|
-
- If `issue_number` exists, query Issue information on a best-effort basis and skip on failure:
|
|
69
|
-
```bash
|
|
70
|
-
gh issue view {issue-number} --json number,title --jq '.number' 2>/dev/null
|
|
71
|
-
```
|
|
72
|
-
- Follow `.github/PULL_REQUEST_TEMPLATE.md` format for all sections
|
|
73
|
-
- Reference recent merged PRs for style
|
|
74
|
-
- Use HEREDOC format to pass the body
|
|
75
|
-
- If `issue_number` exists:
|
|
76
|
-
- replace `{$IssueNumber}` in the template with the actual Issue number
|
|
77
|
-
- use `Closes #{issue_number}` in the `Related Issue` section
|
|
78
|
-
- If `issue_number` does not exist, keep the current behavior
|
|
79
|
-
- PR must end with: `Generated with AI assistance`
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
gh pr create --base <target-branch> --title "<title>" --assignee @me --body "$(cat <<'EOF'
|
|
83
|
-
<Complete PR description following template>
|
|
84
|
-
|
|
85
|
-
Generated with AI assistance
|
|
86
|
-
EOF
|
|
87
|
-
)"
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### 8. Sync PR Metadata (If Task-Related)
|
|
91
|
-
|
|
92
|
-
If this work is associated with an active task, sync the following metadata immediately after creating the PR.
|
|
93
|
-
|
|
94
|
-
**a) Check whether the label system has been initialized**
|
|
95
|
-
|
|
96
|
-
Run:
|
|
97
|
-
|
|
98
|
-
```bash
|
|
99
|
-
gh label list --search "type:" --limit 1 --json name --jq 'length'
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
- returns `0` -> run the `init-labels` skill first, then retry this step
|
|
103
|
-
- returns non-zero -> continue
|
|
104
|
-
|
|
105
|
-
**b) Query Issue metadata**
|
|
106
|
-
|
|
107
|
-
If task.md contains `issue_number`, query the Issue labels and milestone on a best-effort basis:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
gh issue view {issue-number} --json labels,milestone 2>/dev/null
|
|
111
|
-
```
|
|
27
|
+
### 3. Prepare the PR Body
|
|
112
28
|
|
|
113
|
-
|
|
29
|
+
Read `.github/PULL_REQUEST_TEMPLATE.md` when it exists, review recent merged PRs for style, and gather all commits between `<target-branch>` and `HEAD`.
|
|
114
30
|
|
|
115
|
-
|
|
116
|
-
- `{issue-labels}`: list of labels currently on the Issue
|
|
117
|
-
- `{issue-milestone}`: title of the Issue milestone, if present
|
|
31
|
+
> Template handling, HEREDOC body generation, and `Generated with AI assistance` requirements live in `reference/pr-body-template.md`. Read `reference/pr-body-template.md` before writing the PR body.
|
|
118
32
|
|
|
119
|
-
|
|
33
|
+
### 4. Check Remote Branch State
|
|
120
34
|
|
|
121
|
-
|
|
35
|
+
Confirm whether the current branch already has an upstream. Push with `git push -u origin <current-branch>` when required.
|
|
122
36
|
|
|
123
|
-
|
|
124
|
-
|---|---|
|
|
125
|
-
| bug, bugfix | `type: bug` |
|
|
126
|
-
| feature | `type: feature` |
|
|
127
|
-
| enhancement | `type: enhancement` |
|
|
128
|
-
| refactor, refactoring | `type: enhancement` |
|
|
129
|
-
| documentation | `type: documentation` |
|
|
130
|
-
| dependency-upgrade | `type: dependency-upgrade` |
|
|
131
|
-
| task | `type: task` |
|
|
132
|
-
| anything else | skip |
|
|
37
|
+
### 5. Create the PR
|
|
133
38
|
|
|
134
|
-
|
|
39
|
+
Create the PR with `gh pr create --base <target-branch> --title "<title>" --assignee @me --body ...`.
|
|
135
40
|
|
|
136
|
-
|
|
137
|
-
gh pr edit {pr-number} --add-label "{type-label}"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**d) Inherit Issue labels**
|
|
141
|
-
|
|
142
|
-
If `{issue-labels}` is not empty, filter labels that do not start with `type:` or `status:` and run the following for each label on a best-effort basis:
|
|
143
|
-
|
|
144
|
-
```bash
|
|
145
|
-
gh pr edit {pr-number} --add-label "{label-name}"
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Only add labels; do not remove any existing PR labels.
|
|
149
|
-
|
|
150
|
-
**e) Sync `in:` labels**
|
|
41
|
+
If `{task-id}` is available and the related task provides `issue_number`, keep `Closes #{issue-number}` in the PR body.
|
|
151
42
|
|
|
152
|
-
|
|
43
|
+
### 6. Sync PR Metadata
|
|
153
44
|
|
|
154
|
-
|
|
155
|
-
gh
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
**f) Sync the milestone**
|
|
161
|
-
|
|
162
|
-
Extend the `sync-pr` milestone inference strategy with Issue milestone priority:
|
|
163
|
-
- preserve an existing PR milestone
|
|
164
|
-
- otherwise respect explicit `milestone` from task.md
|
|
165
|
-
- otherwise use the Issue milestone when available (`{issue-milestone}`)
|
|
166
|
-
- otherwise infer from the current branch, release branches, or the latest tag
|
|
167
|
-
- finally fall back to `General Backlog`
|
|
168
|
-
|
|
169
|
-
Once the target is resolved, run:
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
gh pr edit {pr-number} --milestone "{milestone-title}"
|
|
173
|
-
```
|
|
45
|
+
For PRs where `{task-id}` is available, sync the core metadata immediately:
|
|
46
|
+
- run `gh label list --search "type:" --limit 1 --json name --jq 'length'`
|
|
47
|
+
- add the mapped type label with `gh pr edit {pr-number} --add-label "{type-label}"`
|
|
48
|
+
- add relevant `in: {module}` labels with `gh pr edit {pr-number} --add-label "in: {module}"`
|
|
49
|
+
- set the milestone with `gh pr edit {pr-number} --milestone "{milestone-title}"`
|
|
50
|
+
- keep Development linking in the PR body with `Closes #{issue-number}` when applicable
|
|
174
51
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
If task.md contains `issue_number`, read the PR body:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
gh pr view {pr-number} --json body --jq '.body // ""'
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
If the body does not contain any of:
|
|
184
|
-
- `Closes #{issue-number}`
|
|
185
|
-
- `Fixes #{issue-number}`
|
|
186
|
-
- `Resolves #{issue-number}`
|
|
187
|
-
|
|
188
|
-
append:
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
gh pr edit {pr-number} --body "$(cat <<'EOF'
|
|
192
|
-
{existing-body}
|
|
193
|
-
|
|
194
|
-
Closes #{issue-number}
|
|
195
|
-
EOF
|
|
196
|
-
)"
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### 9. Update Task Status (If Task-Related)
|
|
52
|
+
### 7. Update Task Status
|
|
200
53
|
|
|
201
54
|
Get the current time:
|
|
202
55
|
|
|
@@ -204,58 +57,23 @@ Get the current time:
|
|
|
204
57
|
date "+%Y-%m-%d %H:%M:%S"
|
|
205
58
|
```
|
|
206
59
|
|
|
207
|
-
If
|
|
208
|
-
- `pr_number`: {pr-number}
|
|
209
|
-
- `updated_at`: {current time}
|
|
210
|
-
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
211
|
-
```
|
|
212
|
-
- {yyyy-MM-dd HH:mm:ss} — **PR Created** by {agent} — PR #{pr-number} created
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### 10. Output Result
|
|
216
|
-
|
|
217
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
60
|
+
If `{task-id}` is available, update task.md with `pr_number`, `updated_at`, and append the PR Created Activity Log entry.
|
|
218
61
|
|
|
219
|
-
|
|
220
|
-
>
|
|
221
|
-
> - If `task.md` has a valid `issue_number` and the PR status or review summary should be synced back into task context, prioritize "Publish review summary (optional)"
|
|
222
|
-
> - If all workflow steps are complete, or the next action after PR creation is task archival, include "Complete task"
|
|
223
|
-
> - If both apply, make the order explicit: **sync PR progress first, then complete the task**
|
|
224
|
-
>
|
|
225
|
-
> **Do not present "Complete task" as the only next step when PR progress or context still needs to be synced.**
|
|
62
|
+
### 8. Inform the User
|
|
226
63
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
Metadata sync:
|
|
231
|
-
- Labels: {type-label-result}, {in-label-result}
|
|
232
|
-
- Milestone: {milestone-result}
|
|
233
|
-
- Development: {development-result}
|
|
234
|
-
|
|
235
|
-
Next steps (if in task workflow):
|
|
236
|
-
- Publish review summary (optional; recommended first when task/PR status still needs syncing):
|
|
237
|
-
- Claude Code / OpenCode: /sync-pr {task-id}
|
|
238
|
-
- Gemini CLI: /{{project}}:sync-pr {task-id}
|
|
239
|
-
- Codex CLI: $sync-pr {task-id}
|
|
240
|
-
- Complete task (after all workflow steps are complete):
|
|
241
|
-
- Claude Code / OpenCode: /complete-task {task-id}
|
|
242
|
-
- Gemini CLI: /{{project}}:complete-task {task-id}
|
|
243
|
-
- Codex CLI: $complete-task {task-id}
|
|
244
|
-
```
|
|
64
|
+
Explain the created PR URL, summarize metadata sync results, and present both follow-up commands in order:
|
|
65
|
+
- optional `sync-pr {task-id}` to publish reviewer-facing context
|
|
66
|
+
- `complete-task {task-id}` once the workflow is truly done
|
|
245
67
|
|
|
246
68
|
## Notes
|
|
247
69
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
4. **All commits matter**: Analyze ALL commits in the branch, not just the latest
|
|
252
|
-
5. **Sync metadata automatically**: When task-related, create-pr must immediately fill labels, milestone, and development linking after PR creation
|
|
70
|
+
- Review every commit in the branch, not only the latest one
|
|
71
|
+
- `create-pr` must not defer type-label mapping to `sync-pr`; inline the mapping here when `{task-id}` is available
|
|
72
|
+
- When metadata inheritance from the Issue fails, continue with task.md and branch-based fallbacks
|
|
253
73
|
|
|
254
74
|
## Error Handling
|
|
255
75
|
|
|
256
|
-
- No commits
|
|
257
|
-
- Push rejected:
|
|
258
|
-
- PR
|
|
259
|
-
- Issue
|
|
260
|
-
- Issue label unavailable: Skip that label and record "Label '{name}' not found, skipping"
|
|
261
|
-
- Issue milestone unavailable: Fall back to branch-based milestone inference
|
|
76
|
+
- No commits found between `{target}` and `HEAD`
|
|
77
|
+
- Push rejected: suggest `git pull --rebase`
|
|
78
|
+
- Existing PR found: show the current PR URL
|
|
79
|
+
- Inaccessible Issue metadata: skip inheritance and continue
|