Skip to content

Commit 3a7a18b

Browse files
CodeCasterXcodexclaude
authored
refactor(meta): align task frontmatter metadata (#553)
- Align task template type, workflow, and status metadata with validator enums. - Remove unused frontmatter fields from task creation and import docs. - Keep task metadata fixtures and quickstart examples consistent with the cleaned schema. Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 778d2cd commit 3a7a18b

21 files changed

Lines changed: 19 additions & 41 deletions

File tree

.agents/QUICKSTART.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ cp .agents/templates/task.md .agents/workspace/active/task-001.md
4747

4848
```yaml
4949
id: task-001
50-
type: feature # feature | bugfix | refactor | docs | review
51-
status: open # open | in-progress | review | blocked | completed
50+
type: feature # feature | bugfix | refactor | docs | chore
51+
status: active # active | blocked | completed
5252
assigned_to: claude # claude | codex | gemini | opencode | human
5353
```
5454

.agents/rules/task-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- `create-pr`:更新 `pr_number``updated_at``agent_infra_version`
3636
- `commit`:更新 `updated_at``agent_infra_version`;必要时更新 `current_step`(详见 `commit/reference/task-status-update.md`
3737
- `complete-task`:更新 `status``current_step``completed_at``updated_at``agent_infra_version`
38-
- `block-task`:更新 `status``blocked_at``blocked_reason``updated_at``agent_infra_version`
38+
- `block-task`:更新 `status``blocked_at``updated_at``agent_infra_version`
3939
- `cancel-task`:更新 `status``cancelled_at``cancel_reason``updated_at``agent_infra_version`
4040

4141
## Activity Log started / done 双标记约定(单一事实源)

.agents/skills/create-task/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ status: active
9393
created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
9494
updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
9595
agent_infra_version: {agent_infra_version}
96-
created_by: human
9796
priority: # 必填;由 AI 从标题/描述推断;Urgent | High | Medium | Low
9897
effort: # 必填;由 AI 从标题/描述推断;High | Medium | Low
9998
start_date: # 可选;YYYY-MM-DD
@@ -102,7 +101,6 @@ current_step: requirement-analysis
102101
assigned_to: {当前 AI 代理}
103102
```
104103
105-
注意:`created_by` 为 `human`,因为任务来源于用户的描述。
106104
priority / effort 必填:由 AI 从任务标题与描述推断后填入(候选值见 `.agents/rules/issue-fields.md`;中文输入按本地化映射规范化)。start_date / target_date 创建时保持留空:`start_date` 由 analyze 阶段写入、`target_date` 由 complete 阶段写入;不要臆测日期。
107105

108106
### 3. 更新任务状态

.agents/skills/import-codescan/SKILL.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ description: >
5454
```yaml
5555
id: TASK-{yyyyMMdd-HHmmss}
5656
codescan_alert_number: <alert-number>
57-
severity: <critical/high/medium/low>
58-
rule_id: <rule-id>
59-
tool: <tool-name>
6057
```
6158
6259
### 3. 更新任务状态

.agents/skills/import-dependabot/SKILL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ description: >
5555
```yaml
5656
id: TASK-{yyyyMMdd-HHmmss}
5757
security_alert_number: <alert-number>
58-
severity: <critical/high/medium/low>
5958
cve_id: <CVE-ID>
6059
ghsa_id: <GHSA-ID>
6160
```

.agents/skills/import-issue/SKILL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ date +%Y%m%d-%H%M%S
9393

9494
- 创建目录:`.agents/workspace/active/{task-id}/`
9595
- 使用 `.agents/templates/task.md` 模板创建 `task.md`
96-
- 场景 C 优先沿用远端 frontmatter 中的 `type``workflow``branch``created_by``milestone`;缺失或损坏字段按 Issue 标签和当前规则重新推断
96+
- 场景 C 优先沿用远端 frontmatter 中的 `type``workflow``branch``milestone`;缺失或损坏字段按 Issue 标签和当前规则重新推断
9797
- `current_step` 始终写入 `requirement-analysis`,不要恢复为远端原 `current_step`
9898

9999
任务元数据:
@@ -107,7 +107,6 @@ status: active
107107
created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
108108
updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
109109
agent_infra_version: {agent_infra_version}
110-
created_by: human
111110
priority: # 可选;有来源/frontmatter 值时保留
112111
effort: # 可选;有来源/frontmatter 值时保留
113112
start_date: # 可选;有明确 YYYY-MM-DD 时保留

.agents/templates/task.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
id: task-XXX
3-
type: feature # feature | bugfix | refactor | docs | review
3+
type: feature # feature | bugfix | refactor | docs | chore
44
branch: # <project>-<type>-<slug>
5-
workflow: feature-development # feature-development | bug-fix | code-review | refactoring
6-
status: open # open | in-progress | review | blocked | completed
5+
workflow: feature-development # feature-development | bug-fix | refactoring
6+
status: active # active | blocked | completed
77
created_at: YYYY-MM-DDTHH:mm:ss±HH:MM
88
updated_at: YYYY-MM-DDTHH:mm:ss±HH:MM
99
agent_infra_version: v0.0.0 # 当前 agent-infra 版本;由工作流命令刷新

templates/.agents/QUICKSTART.zh-CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ cp .agents/templates/task.md .agents/workspace/active/task-001.md
4747

4848
```yaml
4949
id: task-001
50-
type: feature # feature | bugfix | refactor | docs | review
51-
status: open # open | in-progress | review | blocked | completed
50+
type: feature # feature | bugfix | refactor | docs | chore
51+
status: active # active | blocked | completed
5252
assigned_to: claude # claude | codex | gemini | opencode | human
5353
```
5454

templates/.agents/rules/task-management.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Map user intent to the corresponding workflow command:
3535
- `create-pr`: update `pr_number`, `updated_at`, `agent_infra_version`
3636
- `commit`: update `updated_at`, `agent_infra_version`; update `current_step` when needed (see `commit/reference/task-status-update.md`)
3737
- `complete-task`: update `status`, `current_step`, `completed_at`, `updated_at`, `agent_infra_version`
38-
- `block-task`: update `status`, `blocked_at`, `blocked_reason`, `updated_at`, `agent_infra_version`
38+
- `block-task`: update `status`, `blocked_at`, `updated_at`, `agent_infra_version`
3939
- `cancel-task`: update `status`, `cancelled_at`, `cancel_reason`, `updated_at`, `agent_infra_version`
4040

4141
## Activity Log started / done dual-marker convention (single source of truth)

templates/.agents/rules/task-management.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- `create-pr`:更新 `pr_number``updated_at``agent_infra_version`
3636
- `commit`:更新 `updated_at``agent_infra_version`;必要时更新 `current_step`(详见 `commit/reference/task-status-update.md`
3737
- `complete-task`:更新 `status``current_step``completed_at``updated_at``agent_infra_version`
38-
- `block-task`:更新 `status``blocked_at``blocked_reason``updated_at``agent_infra_version`
38+
- `block-task`:更新 `status``blocked_at``updated_at``agent_infra_version`
3939
- `cancel-task`:更新 `status``cancelled_at``cancel_reason``updated_at``agent_infra_version`
4040

4141
## Activity Log started / done 双标记约定(单一事实源)

0 commit comments

Comments
 (0)