@fitlab-ai/agent-infra 0.8.2 → 0.8.4
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.zh-CN.md +10 -0
- package/bin/cli.ts +1 -1
- package/dist/bin/cli.js +2 -2
- package/dist/lib/cp.js +57 -16
- package/dist/lib/decide.js +2 -2
- package/dist/lib/defaults.json +2 -0
- package/dist/lib/init.js +7 -7
- package/dist/lib/merge.js +1 -1
- package/dist/lib/prompt.js +1 -1
- package/dist/lib/run/index.js +7 -7
- package/dist/lib/run/prompt.js +1 -1
- package/dist/lib/sandbox/capture.js +10 -8
- package/dist/lib/sandbox/clipboard/bridge.js +59 -21
- package/dist/lib/sandbox/clipboard/inbox.js +82 -0
- package/dist/lib/sandbox/clipboard/index.js +5 -6
- package/dist/lib/sandbox/clipboard/linux.js +91 -0
- package/dist/lib/sandbox/clipboard/paths.js +1 -1
- package/dist/lib/sandbox/clipboard/win32.js +144 -0
- package/dist/lib/sandbox/commands/create.js +106 -88
- package/dist/lib/sandbox/commands/enter.js +9 -9
- package/dist/lib/sandbox/commands/list-running.js +2 -2
- package/dist/lib/sandbox/commands/ls.js +7 -7
- package/dist/lib/sandbox/commands/prune.js +8 -8
- package/dist/lib/sandbox/commands/rebuild.js +38 -50
- package/dist/lib/sandbox/commands/refresh.js +2 -2
- package/dist/lib/sandbox/commands/rm.js +11 -11
- package/dist/lib/sandbox/commands/show.js +4 -4
- package/dist/lib/sandbox/commands/start.js +4 -4
- package/dist/lib/sandbox/commands/vm.js +4 -4
- package/dist/lib/sandbox/config.js +10 -4
- package/dist/lib/sandbox/constants.js +4 -1
- package/dist/lib/sandbox/credentials.js +1 -1
- package/dist/lib/sandbox/dotfiles.js +1 -1
- package/dist/lib/sandbox/engine.js +3 -3
- package/dist/lib/sandbox/engines/index.js +5 -5
- package/dist/lib/sandbox/engines/wsl2-paths.js +1 -1
- package/dist/lib/sandbox/image-build.js +80 -0
- package/dist/lib/sandbox/image-prune.js +2 -2
- package/dist/lib/sandbox/index.js +10 -10
- package/dist/lib/sandbox/managed-fs.js +1 -1
- package/dist/lib/sandbox/readme-scaffold.js +1 -1
- package/dist/lib/sandbox/runtimes/base.dockerfile +3 -0
- package/dist/lib/sandbox/shell.js +9 -1
- package/dist/lib/sandbox/tools.js +4 -4
- package/dist/lib/server/adapters/feishu/index.js +10 -3
- package/dist/lib/server/adapters/feishu/renderer.js +88 -0
- package/dist/lib/server/adapters/feishu/transport.js +2 -13
- package/dist/lib/server/daemon.js +64 -43
- package/dist/lib/server/display.js +83 -0
- package/dist/lib/server/index.js +2 -2
- package/dist/lib/server/process-control.js +2 -2
- package/dist/lib/server/protocol.js +2 -2
- package/dist/lib/server/streamer.js +5 -4
- package/dist/lib/task/commands/cat.js +2 -2
- package/dist/lib/task/commands/decisions.js +4 -4
- package/dist/lib/task/commands/files.js +3 -3
- package/dist/lib/task/commands/grep.js +3 -3
- package/dist/lib/task/commands/issue-body.js +4 -4
- package/dist/lib/task/commands/log.js +5 -5
- package/dist/lib/task/commands/ls.js +3 -3
- package/dist/lib/task/commands/show.js +1 -1
- package/dist/lib/task/commands/status.js +71 -25
- package/dist/lib/task/index.js +9 -9
- package/dist/lib/task/resolve-ref.js +1 -1
- package/dist/lib/task/workflow-warnings.js +94 -0
- package/dist/lib/update.js +4 -4
- package/lib/cp.ts +56 -15
- package/lib/defaults.json +2 -0
- package/lib/sandbox/capture.ts +5 -3
- package/lib/sandbox/clipboard/bridge.ts +62 -18
- package/lib/sandbox/clipboard/inbox.ts +83 -0
- package/lib/sandbox/clipboard/index.ts +5 -6
- package/lib/sandbox/clipboard/linux.ts +124 -0
- package/lib/sandbox/clipboard/win32.ts +173 -0
- package/lib/sandbox/commands/create.ts +132 -88
- package/lib/sandbox/commands/rebuild.ts +42 -54
- package/lib/sandbox/config.ts +13 -1
- package/lib/sandbox/constants.ts +4 -0
- package/lib/sandbox/image-build.ts +134 -0
- package/lib/sandbox/runtimes/base.dockerfile +3 -0
- package/lib/sandbox/shell.ts +11 -2
- package/lib/sandbox/tools.ts +5 -5
- package/lib/server/adapters/_contract.ts +3 -0
- package/lib/server/adapters/feishu/index.ts +11 -3
- package/lib/server/adapters/feishu/renderer.ts +99 -0
- package/lib/server/adapters/feishu/transport.ts +5 -18
- package/lib/server/daemon.ts +74 -38
- package/lib/server/display.ts +136 -0
- package/lib/server/streamer.ts +5 -4
- package/lib/task/commands/log.ts +3 -3
- package/lib/task/commands/status.ts +102 -21
- package/lib/task/workflow-warnings.ts +121 -0
- package/package.json +2 -2
- package/templates/.agents/README.en.md +3 -0
- package/templates/.agents/README.zh-CN.md +3 -0
- package/templates/.agents/rules/create-issue.github.en.md +4 -4
- package/templates/.agents/rules/create-issue.github.zh-CN.md +4 -4
- package/templates/.agents/rules/issue-pr-commands.github.en.md +7 -2
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +7 -2
- package/templates/.agents/rules/issue-sync.github.en.md +13 -0
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +13 -0
- package/templates/.agents/rules/next-step-output.en.md +15 -1
- package/templates/.agents/rules/next-step-output.zh-CN.md +15 -1
- package/templates/.agents/rules/pr-sync.github.en.md +17 -2
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +17 -2
- package/templates/.agents/rules/review-handshake.en.md +2 -2
- package/templates/.agents/rules/review-handshake.zh-CN.md +2 -2
- package/templates/.agents/rules/task-management.en.md +1 -1
- package/templates/.agents/rules/task-management.zh-CN.md +1 -1
- package/templates/.agents/rules/testing-discipline.en.md +3 -41
- package/templates/.agents/rules/testing-discipline.zh-CN.md +3 -41
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +57 -0
- package/templates/.agents/scripts/validate-artifact.js +213 -0
- package/templates/.agents/scripts/workflow-warnings.js +290 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +1 -1
- package/templates/.agents/skills/block-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +9 -9
- package/templates/.agents/skills/close-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/branch-management.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +2 -2
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/SKILL.en.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +6 -6
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +6 -6
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +142 -0
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +142 -0
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +49 -0
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +49 -0
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.en.md +48 -0
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.zh-CN.md +48 -0
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +60 -0
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +87 -0
- package/templates/.agents/skills/complete-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +6 -4
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +6 -4
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +1 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +6 -3
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +9 -6
- package/templates/.agents/skills/import-codescan/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-issue/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -2
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.github.sh +165 -41
- package/templates/.agents/skills/plan-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/SKILL.en.md +8 -4
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +6 -3
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/reference/report-template.en.md +2 -2
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/test/SKILL.zh-CN.md +26 -8
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +36 -6
- package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +8 -1
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +8 -1
- package/templates/.agents/templates/task.en.md +7 -0
- package/templates/.agents/templates/task.zh-CN.md +7 -0
- package/templates/.claude/commands/complete-manual-validation.en.md +9 -0
- package/templates/.claude/commands/complete-manual-validation.zh-CN.md +9 -0
- package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +8 -0
- package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +8 -0
- package/templates/.github/workflows/metadata-sync.yml +5 -0
- package/templates/.opencode/commands/complete-manual-validation.en.md +11 -0
- package/templates/.opencode/commands/complete-manual-validation.zh-CN.md +11 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "complete-manual-validation",
|
|
3
|
+
"checks": {
|
|
4
|
+
"task-meta": {
|
|
5
|
+
"required_fields": [
|
|
6
|
+
"id",
|
|
7
|
+
"type",
|
|
8
|
+
"workflow",
|
|
9
|
+
"status",
|
|
10
|
+
"created_at",
|
|
11
|
+
"updated_at",
|
|
12
|
+
"agent_infra_version",
|
|
13
|
+
"current_step",
|
|
14
|
+
"assigned_to"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"artifact": {
|
|
18
|
+
"file_pattern": "manual-validation.md|manual-validation-r{N}.md",
|
|
19
|
+
"required_sections": [
|
|
20
|
+
"状态核对",
|
|
21
|
+
"验证结论",
|
|
22
|
+
"验证范围",
|
|
23
|
+
"验证详情",
|
|
24
|
+
"PR 摘要同步"
|
|
25
|
+
],
|
|
26
|
+
"freshness_minutes": 30,
|
|
27
|
+
"required_patterns": [
|
|
28
|
+
"^\\$ "
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"activity-log": {
|
|
32
|
+
"expected_action_pattern": "Complete Manual Validation",
|
|
33
|
+
"freshness_minutes": 30
|
|
34
|
+
},
|
|
35
|
+
"review-ledger": {
|
|
36
|
+
"stage_scope": ["analysis", "plan", "code"]
|
|
37
|
+
},
|
|
38
|
+
"platform-sync": {
|
|
39
|
+
"when": "pr_number_exists",
|
|
40
|
+
"expected_pr_comment_marker_key": "prSummary",
|
|
41
|
+
"expected_pr_comment_required_patterns": [
|
|
42
|
+
"^### ✅ 人工验证已通过$"
|
|
43
|
+
],
|
|
44
|
+
"verify_task_comment_content": true,
|
|
45
|
+
"verify_issue_type": true,
|
|
46
|
+
"verify_issue_fields": false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Manual Validation Completion Report Template
|
|
2
|
+
|
|
3
|
+
Read this file before creating `manual-validation.md` / `manual-validation-r{N}.md`.
|
|
4
|
+
|
|
5
|
+
````markdown
|
|
6
|
+
# Manual Validation Completion Report
|
|
7
|
+
|
|
8
|
+
- **Validation Round**: Round {N}
|
|
9
|
+
- **Artifact File**: `manual-validation.md`
|
|
10
|
+
|
|
11
|
+
## State Check
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
$ git status -s
|
|
15
|
+
$ ls -la .agents/workspace/active/{task-id}/
|
|
16
|
+
$ tail .agents/workspace/active/{task-id}/task.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Validation Verdict
|
|
20
|
+
|
|
21
|
+
- Verdict: passed
|
|
22
|
+
- Validation time: {YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
23
|
+
- Operator: {agent}
|
|
24
|
+
|
|
25
|
+
## Validation Scope
|
|
26
|
+
|
|
27
|
+
- PR: #{pr-number}
|
|
28
|
+
- Summary comment: {comment-id or URL}
|
|
29
|
+
- Manual-validation items:
|
|
30
|
+
- {item-1}
|
|
31
|
+
|
|
32
|
+
## Validation Details
|
|
33
|
+
|
|
34
|
+
{verification-summary}
|
|
35
|
+
|
|
36
|
+
## PR Summary Sync
|
|
37
|
+
|
|
38
|
+
- Result: {summary-result}
|
|
39
|
+
- Summary comment: {comment-id or URL}
|
|
40
|
+
- Updated status: `### ✅ Manual Validation Passed`
|
|
41
|
+
````
|
|
42
|
+
|
|
43
|
+
## Filling Rules
|
|
44
|
+
|
|
45
|
+
- Keep `Validation Details` grounded in the user-provided validation notes.
|
|
46
|
+
- Derive `Validation Scope` from the PR summary's manual-verification section.
|
|
47
|
+
- `PR Summary Sync` must record success, skip, or failure.
|
|
48
|
+
- Only write a passing artifact after the summary comment is updated or skipped because there is no diff.
|
package/templates/.agents/skills/complete-manual-validation/reference/report-template.zh-CN.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# 人工验证完成报告模板
|
|
2
|
+
|
|
3
|
+
创建 `manual-validation.md` / `manual-validation-r{N}.md` 前先读取本文件。
|
|
4
|
+
|
|
5
|
+
````markdown
|
|
6
|
+
# 人工验证完成报告
|
|
7
|
+
|
|
8
|
+
- **验证轮次**:Round {N}
|
|
9
|
+
- **产物文件**:`manual-validation.md`
|
|
10
|
+
|
|
11
|
+
## 状态核对
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
$ git status -s
|
|
15
|
+
$ ls -la .agents/workspace/active/{task-id}/
|
|
16
|
+
$ tail .agents/workspace/active/{task-id}/task.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 验证结论
|
|
20
|
+
|
|
21
|
+
- 结论:通过
|
|
22
|
+
- 验证时间:{YYYY-MM-DD HH:mm:ss±HH:MM}
|
|
23
|
+
- 执行者:{agent}
|
|
24
|
+
|
|
25
|
+
## 验证范围
|
|
26
|
+
|
|
27
|
+
- PR:#{pr-number}
|
|
28
|
+
- 摘要评论:{comment-id 或 URL}
|
|
29
|
+
- 待人工校验项:
|
|
30
|
+
- {item-1}
|
|
31
|
+
|
|
32
|
+
## 验证详情
|
|
33
|
+
|
|
34
|
+
{verification-summary}
|
|
35
|
+
|
|
36
|
+
## PR 摘要同步
|
|
37
|
+
|
|
38
|
+
- 结果:{summary-result}
|
|
39
|
+
- 摘要评论:{comment-id 或 URL}
|
|
40
|
+
- 更新状态:`### ✅ 人工验证已通过`
|
|
41
|
+
````
|
|
42
|
+
|
|
43
|
+
## 填写规则
|
|
44
|
+
|
|
45
|
+
- `验证详情` 保留用户提供的人工验证说明,不改写成未经确认的结论。
|
|
46
|
+
- `验证范围` 来自 PR 摘要评论中的 `### ⚠️ 需人工校验` 段。
|
|
47
|
+
- `PR 摘要同步` 必须记录成功、跳过或失败结果。
|
|
48
|
+
- 只有在摘要评论已成功更新或无 diff 跳过时,才写入通过产物。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# PR Summary Manual Validation Update
|
|
2
|
+
|
|
3
|
+
Read this file before `complete-manual-validation` updates the PR summary comment.
|
|
4
|
+
|
|
5
|
+
## Responsibility Boundary
|
|
6
|
+
|
|
7
|
+
This file only describes PR summary comment updates. The manual-validation artifact schema lives in `reference/report-template.md`.
|
|
8
|
+
|
|
9
|
+
## PR Number Resolution
|
|
10
|
+
|
|
11
|
+
1. Resolve `{task-ref}` to the task directory and read `task.md`.
|
|
12
|
+
2. Prefer `task.md` frontmatter `pr_number`.
|
|
13
|
+
3. If `pr_number` is empty, parse `{pr-ref}` from user input: `#123`, `123`, or a full PR URL.
|
|
14
|
+
4. If `task.md` already has `pr_number` and the user also passed `{pr-ref}`, they must match.
|
|
15
|
+
5. If they differ, fail with `summary failed: pr_number mismatch`. Do not write an artifact or PATCH a comment.
|
|
16
|
+
6. If both are missing, fail with `summary failed: missing pr_number`. Do not write an artifact or PATCH a comment.
|
|
17
|
+
|
|
18
|
+
## Required Reads
|
|
19
|
+
|
|
20
|
+
Before remote operations, read:
|
|
21
|
+
- `.agents/rules/issue-sync.md` to resolve upstream repository and permissions.
|
|
22
|
+
- `.agents/rules/pr-sync.md` to reuse the PR summary hidden marker, Issues comments API, and shell safety rules.
|
|
23
|
+
|
|
24
|
+
## Comment Lookup
|
|
25
|
+
|
|
26
|
+
Fetch ordinary PR comments with the current platform's Issues comments API. Follow the concrete command pattern in `.agents/rules/pr-sync.md`.
|
|
27
|
+
|
|
28
|
+
Find the `<!-- sync-pr:{task-id}:summary -->` summary comment. If it is missing, fail with `summary failed: missing sync-pr summary`.
|
|
29
|
+
|
|
30
|
+
On failure, do not create an ordinary validation comment, do not create a partial summary comment, and do not write a `manual-validation*` artifact.
|
|
31
|
+
|
|
32
|
+
## Manual Validation Scope Extraction
|
|
33
|
+
|
|
34
|
+
- If a `### ⚠️ Manual Verification Required` section exists, take that section until the next `### ` heading.
|
|
35
|
+
- If the current summary already says `### ✅ Manual Validation Passed`, allow a new validation artifact round and update the details.
|
|
36
|
+
- If the current summary says `### ✅ No Manual Verification Needed`, stop and report that this PR does not need manual validation; do not mark it as passed.
|
|
37
|
+
|
|
38
|
+
## Three-Branch Rendering
|
|
39
|
+
|
|
40
|
+
The updated `{manual-validation-section}` is:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
### ✅ Manual Validation Passed
|
|
44
|
+
|
|
45
|
+
- Validation time: {time}
|
|
46
|
+
- Validation notes: {verification-summary}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Later `pr-sync` aggregation renders in this priority order:
|
|
50
|
+
1. latest `manual-validation.md` / `manual-validation-r{N}.md` has a passed verdict -> `### ✅ Manual Validation Passed`
|
|
51
|
+
2. no passed artifact and retained manual-validation items exist -> `### ⚠️ Manual Verification Required`
|
|
52
|
+
3. no passed artifact and no retained manual-validation items -> `### ✅ No Manual Verification Needed`
|
|
53
|
+
|
|
54
|
+
## PATCH Rules
|
|
55
|
+
|
|
56
|
+
Update existing comments with Issues comments PATCH and follow the heredoc safety rules in `.agents/rules/pr-sync.md`.
|
|
57
|
+
|
|
58
|
+
## Result Reporting
|
|
59
|
+
|
|
60
|
+
Return `summary updated`, `summary skipped (no diff)`, or `summary failed: <reason>`.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# PR 摘要人工验证更新
|
|
2
|
+
|
|
3
|
+
在 `complete-manual-validation` 更新 PR 摘要评论前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 职责边界
|
|
6
|
+
|
|
7
|
+
本文件只描述 PR 摘要评论更新流程。人工验证产物结构见 `reference/report-template.md`。
|
|
8
|
+
|
|
9
|
+
## PR 号解析
|
|
10
|
+
|
|
11
|
+
1. 从 `{task-ref}` 定位任务目录并读取 `task.md`。
|
|
12
|
+
2. 优先读取 `task.md` frontmatter 的 `pr_number`。
|
|
13
|
+
3. 如果 `pr_number` 为空,再从用户输入的 `{pr-ref}` 解析:
|
|
14
|
+
- `#123`
|
|
15
|
+
- `123`
|
|
16
|
+
- `{platform-host}/{owner}/{repo}/pull/123`
|
|
17
|
+
4. 如果 `task.md` 已有 `pr_number`,且用户也传入 `{pr-ref}`,两者必须一致。
|
|
18
|
+
5. 两者不一致时失败:`summary failed: pr_number mismatch`。不写 artifact,不 PATCH 评论。
|
|
19
|
+
6. 两者都缺失时失败:`summary failed: missing pr_number`。不写 artifact,不 PATCH 评论。
|
|
20
|
+
|
|
21
|
+
## 前置读取
|
|
22
|
+
|
|
23
|
+
执行远端操作前先读取:
|
|
24
|
+
- `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测。
|
|
25
|
+
- `.agents/rules/pr-sync.md`,复用 PR 摘要隐藏标记、Issues comments API 和 Shell 安全规则。
|
|
26
|
+
|
|
27
|
+
## 评论查找
|
|
28
|
+
|
|
29
|
+
使用当前平台的 Issues comments API 查询 PR 上的普通评论,具体命令遵循 `.agents/rules/pr-sync.md`。
|
|
30
|
+
|
|
31
|
+
查找以以下标记开头或包含该标记的评论:
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<!-- sync-pr:{task-id}:summary -->
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
找不到时失败:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
summary failed: missing sync-pr summary
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
失败时不创建普通验证留言,不创建部分摘要评论,不写 `manual-validation*` artifact。
|
|
44
|
+
|
|
45
|
+
## 待人工校验范围提取
|
|
46
|
+
|
|
47
|
+
从当前摘要评论中提取人工校验范围:
|
|
48
|
+
- 如果存在 `### ⚠️ 需人工校验` 段,取该段到下一个 `### ` heading 之前的内容。
|
|
49
|
+
- 如果当前摘要已是 `### ✅ 人工验证已通过`,允许再次写入新一轮验证产物并更新详情。
|
|
50
|
+
- 如果当前摘要是 `### ✅ 无需人工校验`,停止并提示当前 PR 无需人工校验;不误标为人工验证已通过。
|
|
51
|
+
|
|
52
|
+
## 三分支渲染
|
|
53
|
+
|
|
54
|
+
更新后的 `{manual-validation-section}` 为:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
### ✅ 人工验证已通过
|
|
58
|
+
|
|
59
|
+
- 验证时间:{time}
|
|
60
|
+
- 验证说明:{verification-summary}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
后续 `pr-sync` 聚合时按以下优先级渲染:
|
|
64
|
+
1. 最新 `manual-validation.md` / `manual-validation-r{N}.md` 结论为通过 -> `### ✅ 人工验证已通过`
|
|
65
|
+
2. 没有通过产物且仍有保留人工校验项 -> `### ⚠️ 需人工校验`
|
|
66
|
+
3. 没有通过产物且无保留人工校验项 -> `### ✅ 无需人工校验`
|
|
67
|
+
|
|
68
|
+
## PATCH 规则
|
|
69
|
+
|
|
70
|
+
更新已有评论时必须使用 Issues comments PATCH,具体命令遵循 `.agents/rules/pr-sync.md`。
|
|
71
|
+
|
|
72
|
+
Shell 安全规则:
|
|
73
|
+
- 先读取本地和远端正文,再构造完整正文。
|
|
74
|
+
- heredoc 使用单引号 `<<'EOF'`。
|
|
75
|
+
- 不在 heredoc 内执行变量展开或命令替换。
|
|
76
|
+
- 构造含 `<!-- -->` 的正文时不用 `echo`。
|
|
77
|
+
|
|
78
|
+
## 结果回传
|
|
79
|
+
|
|
80
|
+
返回以下结果之一:
|
|
81
|
+
- `summary updated`
|
|
82
|
+
- `summary skipped (no diff)`
|
|
83
|
+
- `summary failed: missing pr_number`
|
|
84
|
+
- `summary failed: pr_number mismatch`
|
|
85
|
+
- `summary failed: missing sync-pr summary`
|
|
86
|
+
- `summary failed: no manual validation required`
|
|
87
|
+
- `summary failed: <reason>`
|
|
@@ -123,7 +123,7 @@ If prerequisites are not met and the user did not explicitly provide `--force`,
|
|
|
123
123
|
Get the current time:
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
126
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -122,7 +122,7 @@ Please complete the missing steps first, or use --force to override.
|
|
|
122
122
|
获取当前时间:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
125
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -41,7 +41,7 @@ Branch on the result:
|
|
|
41
41
|
This project does not enable the PR flow (`.agents/.airc.json` sets `prFlow: "disabled"`).
|
|
42
42
|
No Pull Request is required; run instead:
|
|
43
43
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
44
|
-
- Gemini CLI: /
|
|
44
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
45
45
|
- Codex CLI: $complete-task {task-ref}
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -105,7 +105,7 @@ Aggregate a reviewer-facing summary from those artifacts and maintain a single i
|
|
|
105
105
|
Get the current time:
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
108
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
If `{task-id}` is available, update task.md with `pr_number`, `pr_status` (set to `created`), `updated_at`, `agent_infra_version`, and append the Create PR Activity Log entry including metadata-sync and summary results.
|
|
@@ -136,7 +136,7 @@ Explain the created PR URL, summarize metadata sync and summary-comment results,
|
|
|
136
136
|
```
|
|
137
137
|
Next step - Watch PR checks (auto self-heal until required checks are green):
|
|
138
138
|
- Claude Code / OpenCode: /watch-pr {task-ref}
|
|
139
|
-
- Gemini CLI: /
|
|
139
|
+
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
140
140
|
- Codex CLI: $watch-pr {task-ref}
|
|
141
141
|
```
|
|
142
142
|
|
|
@@ -145,7 +145,7 @@ Alternatively, to skip CI monitoring and archive the task right away, use `compl
|
|
|
145
145
|
```
|
|
146
146
|
Next step (alternative) - Skip monitoring and archive the task directly:
|
|
147
147
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
148
|
-
- Gemini CLI: /
|
|
148
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
149
149
|
- Codex CLI: $complete-task {task-ref}
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -165,3 +165,5 @@ Next step (alternative) - Skip monitoring and archive the task directly:
|
|
|
165
165
|
- Push rejected: suggest `git pull --rebase`
|
|
166
166
|
- Existing PR found: show the current PR URL and stop
|
|
167
167
|
- Inaccessible Issue metadata: skip inheritance and continue
|
|
168
|
+
- PR creation failed with an associated `{task-id}`: run `node .agents/scripts/workflow-warnings.js add .agents/workspace/active/{task-id} --step create-pr --severity ACTION_REQUIRED --code PR_CREATE_FAILED --target pr --message "{reason}" --action "Fix push, permission, or platform issues and rerun create-pr"` and do not write `pr_number`
|
|
169
|
+
- PR summary comment failed with an associated `{task-id}`: record a `COMMENT_SYNC_FAILED` warning per `.agents/rules/pr-sync.md`, without rolling back an already-created PR
|
|
@@ -41,7 +41,7 @@ description: >
|
|
|
41
41
|
当前项目未启用 PR 流程(`.agents/.airc.json` 中 `prFlow: "disabled"`)。
|
|
42
42
|
无需创建 Pull Request,请直接运行:
|
|
43
43
|
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
44
|
-
- Gemini CLI:/
|
|
44
|
+
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
45
45
|
- Codex CLI:$complete-task {task-ref}
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -105,7 +105,7 @@ description: >
|
|
|
105
105
|
获取当前时间:
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
108
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`pr_status`(设为 `created`)、`updated_at`、`agent_infra_version`,并追加 Create PR 的 Activity Log,记录元数据同步和摘要发布结果。
|
|
@@ -136,7 +136,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
136
136
|
```
|
|
137
137
|
下一步 - 监控 PR 检查(required checks 全绿前自动自愈):
|
|
138
138
|
- Claude Code / OpenCode:/watch-pr {task-ref}
|
|
139
|
-
- Gemini CLI:/
|
|
139
|
+
- Gemini CLI:/{{project}}:watch-pr {task-ref}
|
|
140
140
|
- Codex CLI:$watch-pr {task-ref}
|
|
141
141
|
```
|
|
142
142
|
|
|
@@ -145,7 +145,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
145
145
|
```
|
|
146
146
|
下一步(备选)- 跳过监控、直接归档任务:
|
|
147
147
|
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
148
|
-
- Gemini CLI:/
|
|
148
|
+
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
149
149
|
- Codex CLI:$complete-task {task-ref}
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -165,3 +165,5 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
165
165
|
- 推送被拒绝:建议执行 `git pull --rebase`
|
|
166
166
|
- 已存在 PR:直接输出当前 PR URL 并结束
|
|
167
167
|
- 无法访问 Issue 元数据:跳过继承并继续
|
|
168
|
+
- PR 创建失败且已关联 `{task-id}`:调用 `node .agents/scripts/workflow-warnings.js add .agents/workspace/active/{task-id} --step create-pr --severity ACTION_REQUIRED --code PR_CREATE_FAILED --target pr --message "{reason}" --action "修复推送、权限或平台问题后重跑 create-pr"`,不写 `pr_number`
|
|
169
|
+
- PR 摘要评论失败且已关联 `{task-id}`:按 `.agents/rules/pr-sync.md` 记录 `COMMENT_SYNC_FAILED` 告警,不回滚已创建 PR
|
|
@@ -70,6 +70,6 @@ Final user output should include this follow-up path:
|
|
|
70
70
|
Next steps:
|
|
71
71
|
- complete the task after the workflow truly finishes:
|
|
72
72
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
73
|
-
- Gemini CLI: /
|
|
73
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
74
74
|
- Codex CLI: $complete-task {task-ref}
|
|
75
75
|
```
|
|
@@ -70,6 +70,6 @@ Milestone 规则:
|
|
|
70
70
|
Next steps:
|
|
71
71
|
- complete the task after the workflow truly finishes:
|
|
72
72
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
73
|
-
- Gemini CLI: /
|
|
73
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
74
74
|
- Codex CLI: $complete-task {task-ref}
|
|
75
75
|
```
|
|
@@ -30,7 +30,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
30
30
|
|
|
31
31
|
## Step Start: Capture the Start Time
|
|
32
32
|
|
|
33
|
-
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S
|
|
33
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
- {started_at} — **Create Task [started]** by {agent} — started
|
|
@@ -109,7 +109,7 @@ priority / effort are required: the AI infers them from the task title and descr
|
|
|
109
109
|
Get the current time:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
112
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -135,7 +135,7 @@ The rule's content is determined by the configured code platform:
|
|
|
135
135
|
|
|
136
136
|
Handle the result:
|
|
137
137
|
- Rule successfully created the Issue: `issue_number` has been written back to task.md per the rule; continue by reading `.agents/rules/issue-sync.md`, completing upstream repository and permission detection, then sync the task comment and set `status: waiting-for-triage` by rule
|
|
138
|
-
- Rule failed (auth / network / template parse / etc.): do not roll back task.md; do NOT append an extra Activity Log entry;
|
|
138
|
+
- Rule failed (auth / network / template parse / etc.): do not roll back task.md; do NOT append an extra Activity Log entry; first run `node .agents/scripts/workflow-warnings.js add .agents/workspace/active/{task-id} --step create-task --severity ACTION_REQUIRED --code ISSUE_CREATE_FAILED --target issue --message "{error_code}: {error_message}" --action "Fix auth/network/template issues and manually retry Issue creation, or create/find an Issue and write issue_number"` to record a generic warning; then follow "Scenario C: Issue creation failed" output to surface `error_code` and `error_message`
|
|
139
139
|
- Rule was a no-op (custom or empty platform): do not create comments, do not block the workflow, and do not write an Activity Log entry
|
|
140
140
|
- task.md already has `issue_number`: the rule's prerequisite check skips creation; `create-task` proceeds directly to step 5
|
|
141
141
|
|
|
@@ -231,6 +231,9 @@ Next step - run requirements analysis:
|
|
|
231
231
|
- Codex CLI: $analyze-task {task-ref}
|
|
232
232
|
|
|
233
233
|
For later platform sync: after fixing auth / network / template issues, manually run the Issue creation flow in `.agents/rules/create-issue.md` for this task; or manually create/find an Issue and write `issue_number` into task.md so later skills can take over cascade sync.
|
|
234
|
+
|
|
235
|
+
[ACTION REQUIRED] Workflow warnings are open:
|
|
236
|
+
- WW-N ISSUE_CREATE_FAILED (issue): Fix auth/network/template issues and manually retry Issue creation, or create/find an Issue and write issue_number
|
|
234
237
|
```
|
|
235
238
|
|
|
236
239
|
|
|
@@ -30,7 +30,7 @@ description: >
|
|
|
30
30
|
|
|
31
31
|
## 步骤开始:记录开始时间
|
|
32
32
|
|
|
33
|
-
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S
|
|
33
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
- {started_at} — **Create Task [started]** by {agent} — started
|
|
@@ -108,7 +108,7 @@ priority / effort 必填:由 AI 从任务标题与描述推断后填入(候
|
|
|
108
108
|
获取当前时间:
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
111
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -134,7 +134,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
134
134
|
|
|
135
135
|
处理结果:
|
|
136
136
|
- 规则成功创建 Issue:`issue_number` 已按规则回写到 task.md;继续读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测,然后同步 task 评论并按规则设置 `status: waiting-for-triage`
|
|
137
|
-
- 规则失败(认证 / 网络 / 模板解析等):不回滚 task.md;不追加额外 Activity Log
|
|
137
|
+
- 规则失败(认证 / 网络 / 模板解析等):不回滚 task.md;不追加额外 Activity Log;先调用 `node .agents/scripts/workflow-warnings.js add .agents/workspace/active/{task-id} --step create-task --severity ACTION_REQUIRED --code ISSUE_CREATE_FAILED --target issue --message "{error_code}: {error_message}" --action "修复认证/网络/模板问题后手动重试 Issue 创建,或手动创建/找到 Issue 后写入 issue_number"` 记录通用告警;再按"场景 C:Issue 创建失败"输出向用户透出 `error_code` 与 `error_message`
|
|
138
138
|
- 规则为 no-op(自定义或空平台):不创建评论,不阻塞后续工作流,不写 Activity Log
|
|
139
139
|
- task.md 已存在 `issue_number`:规则中的前置检查会跳过;`create-task` 直接进入步骤 5
|
|
140
140
|
|
|
@@ -183,7 +183,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
183
183
|
|
|
184
184
|
下一步 - 执行需求分析:
|
|
185
185
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
186
|
-
- Gemini CLI:/
|
|
186
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
187
187
|
- Codex CLI:$analyze-task {task-ref}
|
|
188
188
|
```
|
|
189
189
|
|
|
@@ -202,7 +202,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
202
202
|
|
|
203
203
|
下一步 - 执行需求分析:
|
|
204
204
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
205
|
-
- Gemini CLI:/
|
|
205
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
206
206
|
- Codex CLI:$analyze-task {task-ref}
|
|
207
207
|
```
|
|
208
208
|
|
|
@@ -226,10 +226,13 @@ Issue 创建失败:
|
|
|
226
226
|
|
|
227
227
|
下一步 - 执行需求分析:
|
|
228
228
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
229
|
-
- Gemini CLI:/
|
|
229
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
230
230
|
- Codex CLI:$analyze-task {task-ref}
|
|
231
231
|
|
|
232
232
|
后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
|
|
233
|
+
|
|
234
|
+
[ACTION REQUIRED] Workflow warnings are open:
|
|
235
|
+
- WW-N ISSUE_CREATE_FAILED (issue): 修复认证/网络/模板问题后手动重试 Issue 创建,或手动创建/找到 Issue 后写入 issue_number
|
|
233
236
|
```
|
|
234
237
|
|
|
235
238
|
|
|
@@ -21,7 +21,7 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
|
|
|
21
21
|
|
|
22
22
|
## Step Start: Capture the Start Time
|
|
23
23
|
|
|
24
|
-
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S
|
|
24
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
@@ -61,7 +61,7 @@ codescan_alert_number: <alert-number>
|
|
|
61
61
|
Get the current time:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
64
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Update task.md: `current_step` -> `requirement-analysis`.
|
|
@@ -21,7 +21,7 @@ description: >
|
|
|
21
21
|
|
|
22
22
|
## 步骤开始:记录开始时间
|
|
23
23
|
|
|
24
|
-
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S
|
|
24
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
@@ -61,7 +61,7 @@ codescan_alert_number: <alert-number>
|
|
|
61
61
|
获取当前时间:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
64
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
更新 task.md:`current_step` -> `requirement-analysis`。
|
|
@@ -112,7 +112,7 @@ Code Scanning 告警 #{alert-number} 已导入。
|
|
|
112
112
|
|
|
113
113
|
下一步:
|
|
114
114
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
115
|
-
- Gemini CLI:/
|
|
115
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
116
116
|
- Codex CLI:$analyze-task {task-ref}
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -21,7 +21,7 @@ Import the specified Dependabot security alert and create a remediation task.
|
|
|
21
21
|
|
|
22
22
|
## Step Start: Capture the Start Time
|
|
23
23
|
|
|
24
|
-
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S
|
|
24
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
@@ -64,7 +64,7 @@ ghsa_id: <GHSA-ID>
|
|
|
64
64
|
Get the current time:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
67
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Update task.md: `current_step` -> `requirement-analysis`.
|
|
@@ -21,7 +21,7 @@ description: >
|
|
|
21
21
|
|
|
22
22
|
## 步骤开始:记录开始时间
|
|
23
23
|
|
|
24
|
-
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S
|
|
24
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
@@ -64,7 +64,7 @@ ghsa_id: <GHSA-ID>
|
|
|
64
64
|
获取当前时间:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
67
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
更新 task.md:`current_step` -> `requirement-analysis`。
|
|
@@ -118,7 +118,7 @@ node .agents/scripts/validate-artifact.js gate import-dependabot .agents/workspa
|
|
|
118
118
|
|
|
119
119
|
下一步:
|
|
120
120
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
121
|
-
- Gemini CLI:/
|
|
121
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
122
122
|
- Codex CLI:$analyze-task {task-ref}
|
|
123
123
|
```
|
|
124
124
|
|
|
@@ -21,7 +21,7 @@ Import the specified Issue and create a task. Argument: issue number.
|
|
|
21
21
|
|
|
22
22
|
## Step Start: Capture the Start Time
|
|
23
23
|
|
|
24
|
-
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S
|
|
24
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`). The base action must match the actual import scenario:
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
# Scenario B: new Issue import
|
|
@@ -127,7 +127,7 @@ Optional Issue field metadata should preserve recovered or explicit source value
|
|
|
127
127
|
Get the current time:
|
|
128
128
|
|
|
129
129
|
```bash
|
|
130
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
130
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
Update `.agents/workspace/active/{task-id}/task.md`:
|