ai-dev-requirements 0.1.9 → 0.1.10

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.
@@ -1,123 +1,174 @@
1
- # Task Types & Scheduling
1
+ # Harness Task Types & Scheduler
2
+
3
+ Task types are scheduling primitives for the agent harness. They define how work may run, what isolation is required, and what review level applies before handoff.
2
4
 
3
5
  ## Task Types
4
6
 
5
- | Type | ID | Strategy | Review Level | Description |
6
- |------|-----|---------|------------|------|
7
- | Code Development | `code:dev` | `isolated` | strict | Serial within module, parallel across modules |
8
- | Code Fix | `code:fix` | `isolated` | standard | Serial within file |
9
- | Code Refactor | `code:refactor` | `serial` | strict | Global serial, large impact |
10
- | Doc Writing | `doc:write` | `parallel` | light | Fully parallel |
11
- | Doc Translation | `doc:translate` | `parallel` | light | Fully parallel |
12
- | Research | `research` | `parallel` | light | Fully parallel, supports caching |
13
- | Data Processing | `data` | `isolated` | standard | Isolated by data source |
14
- | Testing | `test` | `parallel` | standard | Fully parallel |
7
+ | Type | ID | Scheduler | Review Level | Harness Use |
8
+ |------|----|-----------|--------------|-------------|
9
+ | Code Development | `code:dev` | `isolated` | strict | New behavior in a bounded module or feature area |
10
+ | Code Fix | `code:fix` | `isolated` | standard | Defect correction owned by a file, module, or failing gate |
11
+ | Code Refactor | `code:refactor` | `serial` | strict | Structure change with broad impact or shared contracts |
12
+ | Doc Writing | `doc:write` | `parallel` | light | New or updated documentation artifacts |
13
+ | Doc Translation | `doc:translate` | `parallel` | light | Translation work that preserves source meaning |
14
+ | Research | `research` | `parallel` | light | Context gathering, option comparison, or source analysis |
15
+ | Data Processing | `data` | `isolated` | standard | Fixture, migration, import, export, or data-source work |
16
+ | Testing | `test` | `parallel` | standard | Unit, integration, regression, or verification work |
15
17
 
16
- ## Scheduling Strategies
18
+ ## Scheduler Modes
17
19
 
18
- - **parallel** Fully parallel, no restrictions (bounded by parallel_limit)
19
- - **isolated** — Group by isolation key; serial within group, parallel between groups
20
- - **serial** Global lock, one task at a time
20
+ | Scheduler | Rule | Use When |
21
+ |-----------|------|----------|
22
+ | `parallel` | Tasks may run concurrently up to `parallel_limit` | Work touches independent artifacts |
23
+ | `isolated` | Tasks sharing an isolation key run serially; different keys may run concurrently | Work is safe across modules but unsafe inside the same module or file |
24
+ | `serial` | One task runs at a time under a global lock | Work changes shared contracts, architecture, or broad behavior |
21
25
 
22
- ## Max Parallelism: 5
26
+ Default `parallel_limit`: 5.
23
27
 
24
28
  ## Task Declaration Syntax
25
29
 
26
30
  ```markdown
27
- ## TaskGroup: <group name>
28
-
29
- ### Meta
30
- - parallel_limit: 5
31
- - review_level: standard
32
- - on_failure: continue | stop
33
-
34
- ### Tasks
35
- 1. [code:dev] Implement auth module @isolated(auth/)
36
- 2. [code:dev] Implement order module @isolated(order/)
37
- 3. [doc:write] Write API docs
38
- 4. [research] Research payment gateway @cache(7d)
31
+ ## HarnessTask: <task id> - <task name>
32
+
33
+ ### Control
34
+ - type: code:dev | code:fix | code:refactor | doc:write | doc:translate | research | data | test
35
+ - agent_role: implementer | reviewer | researcher | tester | documenter
36
+ - scheduler: parallel | isolated | serial
37
+ - isolation_key: <module-or-file-path>
38
+ - dependencies: []
39
+ - review_level: light | standard | strict
40
+ - feedback_mode: quiet_success | actionable_failure
41
+ - retry_limit: 2
42
+
43
+ ### Inputs
44
+ - Requirement: <requirement id or story id>
45
+ - Context: <artifact path or MCP source>
46
+
47
+ ### Outputs
48
+ - Artifact: <file path>
49
+ - Verification: <command or review gate>
50
+
51
+ ### Done When
52
+ - <observable completion condition>
39
53
  ```
40
54
 
41
- | Element | Format | Description |
42
- |---------|--------|-------------|
43
- | Task type | `[type:subtype]` | Type identifier in brackets |
44
- | Isolation key | `@isolated(key)` | Grouping key for isolation |
45
- | Cache | `@cache(duration)` | Cache TTL for research tasks |
46
- | Dependency | `@depends(task_id)` | Prerequisite task dependency |
55
+ ## Control Fields
47
56
 
48
- ## Fullstack Parallel Strategy
57
+ | Field | Required | Meaning |
58
+ |-------|:---:|---------|
59
+ | `type` | Yes | Work category and default review expectation |
60
+ | `agent_role` | Yes | Primary role responsible for the task |
61
+ | `scheduler` | Yes | Execution mode: `parallel`, `isolated`, or `serial` |
62
+ | `isolation_key` | Yes for `isolated`, optional for others | Module, file, data source, or shared contract boundary |
63
+ | `dependencies` | Yes | Task IDs that must finish first; use an empty list when none exist |
64
+ | `review_level` | Yes | `light`, `standard`, or `strict` |
65
+ | `feedback_mode` | Yes | How verification output is exposed to the agent |
66
+ | `retry_limit` | Yes | Maximum repair attempts before human escalation |
49
67
 
50
- ```
51
- ┌─────────────┐
52
- │ API Contract │
53
- └──────┬──────┘
54
-
55
- ┌─────────┴─────────┐
56
- ↓ ↓
57
- ┌─────────┐ ┌─────────┐
58
- │ Frontend │ │ Backend │
59
- │ (Mock) │ │ (API) │
60
- └────┬────┘ └────┬────┘
61
- └────────┬──────┘
62
-
63
- ┌─────────────┐
64
- │ Integration │
65
- └─────────────┘
66
- ```
68
+ ## Review Levels
67
69
 
68
- ## Templates
70
+ | Level | Applies To | Required Review |
71
+ |-------|------------|-----------------|
72
+ | `light` | Documentation, research, low-risk metadata | Check accuracy, links, scope, and consistency |
73
+ | `standard` | Fixes, tests, data work, bounded behavior | Check correctness, regression risk, and verification evidence |
74
+ | `strict` | New features, refactors, shared contracts | Check requirements coverage, architecture, edge cases, and full verification gates |
69
75
 
70
- ### Code Development
71
- ```markdown
72
- ## TaskGroup: [Feature Name]
73
- ### Meta
74
- - parallel_limit: 5
75
- - review_level: strict
76
- - on_failure: continue
77
- ### Tasks
78
- 1. [code:dev] Implement [module] core logic @isolated([module]/)
79
- 2. [code:dev] Implement [module] UI components @isolated([module]/)
80
- 3. [code:dev] Implement [module] API layer @isolated([module]/api/)
81
- 4. [test] Write [module] unit tests @isolated([module]/)
82
- ```
76
+ ## Backpressure
77
+
78
+ Verification output should act as backpressure:
79
+
80
+ - `quiet_success`: passing gates report only the gate name and pass status.
81
+ - `actionable_failure`: failing gates expose the command, key error, likely owner task, and repair instruction.
82
+ - Prefer targeted gates before full gates to keep feedback fast and relevant.
83
+ - Default `retry_limit` is 2 repair attempts before human escalation.
84
+ - Long logs belong in `execution-log.md`, not in the active agent context.
85
+
86
+ ## Scheduling Examples
87
+
88
+ ### Independent Documentation
83
89
 
84
- ### Code Fix
85
90
  ```markdown
86
- ## TaskGroup: [Bug Description]
87
- ### Meta
88
- - parallel_limit: 3
89
- - review_level: standard
90
- - on_failure: stop
91
- ### Tasks
92
- 1. [research] Root cause analysis @cache(1d)
93
- 2. [code:fix] Fix [bug] @isolated([file_path])
94
- 3. [test] Add regression tests @isolated([file_path])
91
+ ## HarnessTask: HT-DOC-1 - Update README quick start
92
+
93
+ ### Control
94
+ - type: doc:write
95
+ - agent_role: documenter
96
+ - scheduler: parallel
97
+ - isolation_key: docs/readme
98
+ - dependencies: []
99
+ - review_level: light
100
+ - feedback_mode: quiet_success | actionable_failure
101
+ - retry_limit: 2
102
+
103
+ ### Inputs
104
+ - Requirement: US-DOC-1
105
+ - Context: docs/plans/harness/requirements.md
106
+
107
+ ### Outputs
108
+ - Artifact: README.md
109
+ - Verification: content review plus `pnpm lint`
110
+
111
+ ### Done When
112
+ - README describes the current harness lifecycle and no stale public workflow wording remains.
95
113
  ```
96
114
 
97
- ### Code Refactor
115
+ ### Isolated Feature Work
116
+
98
117
  ```markdown
99
- ## TaskGroup: [Refactor Goal]
100
- ### Meta
101
- - parallel_limit: 1
118
+ ## HarnessTask: HT-FEAT-1 - Implement requirement search filter
119
+
120
+ ### Control
121
+ - type: code:dev
122
+ - agent_role: implementer
123
+ - scheduler: isolated
124
+ - isolation_key: src/tools/search-requirements.ts
125
+ - dependencies: [HT-PLAN-1]
102
126
  - review_level: strict
103
- - on_failure: stop
104
- ### Tasks
105
- 1. [research] Analyze dependencies
106
- 2. [code:refactor] Refactor core structure
107
- 3. [code:fix] Fix type errors from refactoring
108
- 4. [test] Run full test suite
127
+ - feedback_mode: quiet_success | actionable_failure
128
+ - retry_limit: 2
129
+
130
+ ### Inputs
131
+ - Requirement: US-2
132
+ - Context: docs/plans/search-filter/user-stories.md
133
+
134
+ ### Outputs
135
+ - Artifact: src/tools/search-requirements.ts
136
+ - Verification: `pnpm test:run tests/tools/search-requirements.test.ts`
137
+
138
+ ### Done When
139
+ - Search accepts the new filter, preserves existing behavior, and targeted tests pass.
109
140
  ```
110
141
 
111
- ### Research
142
+ ### Serial Refactor
143
+
112
144
  ```markdown
113
- ## TaskGroup: [Research Topic]
114
- ### Meta
115
- - parallel_limit: 5
116
- - review_level: light
117
- - on_failure: continue
118
- ### Tasks
119
- 1. [research] Research [option A] @cache(7d)
120
- 2. [research] Research [option B] @cache(7d)
121
- 3. [research] Compare A and B @depends(1,2)
122
- 4. [doc:write] Write conclusion document
145
+ ## HarnessTask: HT-REF-1 - Split adapter factory responsibilities
146
+
147
+ ### Control
148
+ - type: code:refactor
149
+ - agent_role: implementer
150
+ - scheduler: serial
151
+ - isolation_key: global
152
+ - dependencies: [HT-COVERAGE-1]
153
+ - review_level: strict
154
+ - feedback_mode: quiet_success | actionable_failure
155
+ - retry_limit: 2
156
+
157
+ ### Inputs
158
+ - Requirement: US-REF-1
159
+ - Context: docs/plans/adapter-refactor/implementation-plan.md
160
+
161
+ ### Outputs
162
+ - Artifact: src/adapters/
163
+ - Verification: `pnpm test:run && pnpm typecheck && pnpm build`
164
+
165
+ ### Done When
166
+ - Public adapter behavior is unchanged, contracts remain typed, and full verification gates pass.
123
167
  ```
168
+
169
+ ## Failure Handling
170
+
171
+ - If a `parallel` task conflicts with another task, stop both tasks and reclassify the boundary as `isolated`.
172
+ - If an `isolated` task conflicts within the same key, serialize that key and continue other keys.
173
+ - If a `serial` task fails, stop the harness and resolve the failure before scheduling more work.
174
+ - If verification is unavailable, record the reason and ask for confirmation before handoff.
@@ -1,29 +1,42 @@
1
- # 代码开发任务模板
1
+ # Code Development Harness Task Template
2
2
 
3
- ```markdown
4
- ## TaskGroup: [功能名称]
3
+ ## HarnessTask: HT-DEV-1 - Implement Feature Module
5
4
 
6
- ### Meta
7
- - parallel_limit: 5
5
+ ### Control
6
+ - type: code:dev
7
+ - agent_role: implementer
8
+ - scheduler: isolated
9
+ - isolation_key: src/<module>/
10
+ - dependencies: []
8
11
  - review_level: strict
9
- - on_failure: continue
12
+ - feedback_mode: quiet_success | actionable_failure
13
+ - retry_limit: 2
10
14
 
11
- ### Tasks
12
- 1. [code:dev] 实现 [模块名] 核心逻辑 @isolated([module]/)
13
- 2. [code:dev] 实现 [模块名] UI 组件 @isolated([module]/)
14
- 3. [code:dev] 实现 [模块名] API 接口层 @isolated([module]/api/)
15
- 4. [test] 编写 [模块名] 单元测试 @isolated([module]/)
16
- ```
15
+ ### Inputs
16
+ - Requirement: US-<number>
17
+ - Context: docs/plans/<feature-name>/user-stories.md
18
+ - Plan: docs/plans/<feature-name>/implementation-plan.md
17
19
 
18
- ## 使用说明
20
+ ### Steps
21
+ - Write or update the failing test that captures the acceptance criterion.
22
+ - Run the targeted test and record the failure.
23
+ - Implement the smallest production change inside the isolation key.
24
+ - Run the targeted test again and record the pass.
25
+ - Run the task verification gate declared below.
26
+ - Keep passing gate output concise; record only the gate name and pass status.
27
+ - On failure, record the command, key error, likely owner, and repair action.
28
+ - Stop after two repair attempts and ask for human direction.
19
29
 
20
- - **并行策略**: `isolated` — 同模块内串行执行,跨模块并行
21
- - **Review 级别**: `strict` — 新功能需严格审查
22
- - **隔离键**: 使用模块路径作为隔离键,如 `@isolated(auth/)`
30
+ ### Outputs
31
+ - Artifact: src/<module>/
32
+ - Test Artifact: tests/<module>/
33
+ - Execution Notes: docs/plans/<feature-name>/execution-log.md
23
34
 
24
- ## 注意事项
35
+ ### Verification
36
+ - Targeted: `pnpm test:run tests/<module>`
37
+ - Type safety: `pnpm typecheck`
25
38
 
26
- - 同一模块的 UI 和逻辑建议串行(共享隔离键)
27
- - 不同模块可并行开发
28
- - 确保接口契约在实现前确定
29
- - 新功能必须附带测试任务
39
+ ### Done When
40
+ - The user story acceptance criteria are covered by tests or explicit verification.
41
+ - The implementation stays within the declared isolation key unless the plan is revised.
42
+ - The targeted verification gate passes.
@@ -1,28 +1,42 @@
1
- # 代码修复任务模板
1
+ # Code Fix Harness Task Template
2
2
 
3
- ```markdown
4
- ## TaskGroup: [Bug 描述]
3
+ ## HarnessTask: HT-FIX-1 - Fix Defect
5
4
 
6
- ### Meta
7
- - parallel_limit: 3
5
+ ### Control
6
+ - type: code:fix
7
+ - agent_role: implementer
8
+ - scheduler: isolated
9
+ - isolation_key: <file-or-module-path>
10
+ - dependencies: []
8
11
  - review_level: standard
9
- - on_failure: stop
12
+ - feedback_mode: quiet_success | actionable_failure
13
+ - retry_limit: 2
10
14
 
11
- ### Tasks
12
- 1. [research] 定位 [Bug 描述] 根因 @cache(1d)
13
- 2. [code:fix] 修复 [Bug 描述] @isolated([file_path])
14
- 3. [test] 补充回归测试 @isolated([file_path])
15
- ```
15
+ ### Inputs
16
+ - Requirement: BUG-<number> or US-<number>
17
+ - Failure Evidence: docs/plans/<feature-name>/requirements.md
18
+ - Context: docs/plans/<feature-name>/execution-log.md
16
19
 
17
- ## 使用说明
20
+ ### Steps
21
+ - Reproduce or describe the failure from evidence.
22
+ - Add a regression test that fails for the defect.
23
+ - Make the smallest fix inside the isolation key.
24
+ - Rerun the regression test and record the result.
25
+ - Run any broader gate affected by the fix.
26
+ - Keep passing gate output concise; record only the gate name and pass status.
27
+ - On failure, record the command, key error, likely owner, and repair action.
28
+ - Stop after two repair attempts and ask for human direction.
18
29
 
19
- - **并行策略**: `isolated` — 同文件串行
20
- - **Review 级别**: `standard`
21
- - **on_failure**: `stop` — 修复失败应立即停止
30
+ ### Outputs
31
+ - Artifact: <file-or-module-path>
32
+ - Regression Test: tests/<affected-area>/
33
+ - Execution Notes: docs/plans/<feature-name>/execution-log.md
22
34
 
23
- ## 注意事项
35
+ ### Verification
36
+ - Regression: `pnpm test:run tests/<affected-area>`
37
+ - Quality: `pnpm lint`
24
38
 
25
- - 先调研再修复,避免盲目改代码
26
- - 修复和测试使用相同隔离键(同文件)
27
- - 修复后必须补充回归测试
28
- - 如涉及多文件,每个文件用独立隔离键
39
+ ### Done When
40
+ - The original failure is covered by a regression test or explicit reproduction check.
41
+ - The fix does not change unrelated behavior.
42
+ - The regression gate passes.
@@ -1,30 +1,42 @@
1
- # 代码重构任务模板
1
+ # Code Refactor Harness Task Template
2
2
 
3
- ```markdown
4
- ## TaskGroup: [重构目标]
3
+ ## HarnessTask: HT-REF-1 - Refactor Shared Structure
5
4
 
6
- ### Meta
7
- - parallel_limit: 1
5
+ ### Control
6
+ - type: code:refactor
7
+ - agent_role: implementer
8
+ - scheduler: serial
9
+ - isolation_key: global
10
+ - dependencies: []
8
11
  - review_level: strict
9
- - on_failure: stop
12
+ - feedback_mode: quiet_success | actionable_failure
13
+ - retry_limit: 2
10
14
 
11
- ### Tasks
12
- 1. [research] 分析当前 [模块] 的问题和依赖关系
13
- 2. [code:refactor] 重构 [模块] 核心结构
14
- 3. [code:fix] 修复重构引入的类型错误
15
- 4. [test] 运行全量测试确认无回归
16
- ```
15
+ ### Inputs
16
+ - Requirement: US-<number> or REF-<number>
17
+ - Context: docs/plans/<feature-name>/implementation-plan.md
18
+ - Coverage: docs/plans/<feature-name>/validation-report.md
17
19
 
18
- ## 使用说明
20
+ ### Steps
21
+ - Identify the public contracts that must remain stable.
22
+ - Add or confirm tests around existing behavior before changing structure.
23
+ - Refactor one bounded area at a time.
24
+ - Run typecheck and targeted tests after each meaningful step.
25
+ - Run full verification gates before review.
26
+ - Keep passing gate output concise; record only the gate name and pass status.
27
+ - On failure, record the command, key error, likely owner, and repair action.
28
+ - Stop after two repair attempts and ask for human direction.
19
29
 
20
- - **并行策略**: `serial` — 强制串行,影响范围大
21
- - **Review 级别**: `strict` — 重构需严格审查
22
- - **on_failure**: `stop` — 重构出错应立即停止
30
+ ### Outputs
31
+ - Artifact: <refactored-paths>
32
+ - Compatibility Notes: docs/plans/<feature-name>/execution-log.md
23
33
 
24
- ## 注意事项
34
+ ### Verification
35
+ - Tests: `pnpm test:run`
36
+ - Types: `pnpm typecheck`
37
+ - Build: `pnpm build`
25
38
 
26
- - 重构任务必须串行执行,避免冲突
27
- - 先分析依赖关系,确定影响范围
28
- - 重构后必须运行全量测试
29
- - 大范围重构建议拆分为多个小步骤
30
- - 每步重构后验证编译通过再继续
39
+ ### Done When
40
+ - Public behavior and contracts are preserved or intentionally changed in the plan.
41
+ - Full verification gates pass.
42
+ - Strict review has no blocking findings.
@@ -1,29 +1,41 @@
1
- # 文档编写任务模板
1
+ # Documentation Harness Task Template
2
2
 
3
- ```markdown
4
- ## TaskGroup: [文档主题]
3
+ ## HarnessTask: HT-DOC-1 - Write Documentation Artifact
5
4
 
6
- ### Meta
7
- - parallel_limit: 5
5
+ ### Control
6
+ - type: doc:write
7
+ - agent_role: documenter
8
+ - scheduler: parallel
9
+ - isolation_key: docs/<artifact-name>
10
+ - dependencies: []
8
11
  - review_level: light
9
- - on_failure: continue
12
+ - feedback_mode: quiet_success | actionable_failure
13
+ - retry_limit: 2
10
14
 
11
- ### Tasks
12
- 1. [doc:write] 编写 [模块] API 文档
13
- 2. [doc:write] 编写 [模块] 使用指南
14
- 3. [doc:write] 更新 README
15
- 4. [doc:write] 编写 CHANGELOG
16
- ```
15
+ ### Inputs
16
+ - Requirement: US-DOC-<number>
17
+ - Source Context: docs/plans/<feature-name>/requirements.md
18
+ - Plan Context: docs/plans/<feature-name>/implementation-plan.md
17
19
 
18
- ## 使用说明
20
+ ### Steps
21
+ - Identify the audience and required artifact.
22
+ - Update the target document using the repository's existing style.
23
+ - Keep terminology consistent with related docs.
24
+ - Check links, paths, commands, and examples.
25
+ - Record any assumptions in execution notes.
26
+ - Keep passing gate output concise; record only the gate name and pass status.
27
+ - On failure, record the command, key error, likely owner, and repair action.
28
+ - Stop after two repair attempts and ask for human direction.
19
29
 
20
- - **并行策略**: `parallel` — 完全并行,文档间无冲突
21
- - **Review 级别**: `light` — 快速检查即可
22
- - **on_failure**: `continue` — 单篇文档失败不影响其他
30
+ ### Outputs
31
+ - Artifact: <documentation-path>
32
+ - Execution Notes: docs/plans/<feature-name>/execution-log.md
23
33
 
24
- ## 注意事项
34
+ ### Verification
35
+ - Content Review: confirm the document matches source context and contains no stale workflow names.
36
+ - Repository Gate: `pnpm lint`
25
37
 
26
- - 文档任务可完全并行,无需隔离
27
- - 注意保持文档间的交叉引用一致性
28
- - 使用项目已有的文档格式和风格
29
- - 技术文档应包含代码示例
38
+ ### Done When
39
+ - The document accurately describes the implemented behavior or workflow.
40
+ - Cross-references point to existing files.
41
+ - Light review has no blocking findings.
@@ -1,30 +1,42 @@
1
- # 调研分析任务模板
1
+ # Research Harness Task Template
2
2
 
3
- ```markdown
4
- ## TaskGroup: [调研主题]
3
+ ## HarnessTask: HT-RES-1 - Research Decision Input
5
4
 
6
- ### Meta
7
- - parallel_limit: 5
5
+ ### Control
6
+ - type: research
7
+ - agent_role: researcher
8
+ - scheduler: parallel
9
+ - isolation_key: research/<topic>
10
+ - dependencies: []
8
11
  - review_level: light
9
- - on_failure: continue
12
+ - feedback_mode: quiet_success | actionable_failure
13
+ - retry_limit: 2
10
14
 
11
- ### Tasks
12
- 1. [research] 调研 [方案A] 的优劣势 @cache(7d)
13
- 2. [research] 调研 [方案B] 的优劣势 @cache(7d)
14
- 3. [research] 对比 [方案A] 和 [方案B] @depends(1,2)
15
- 4. [doc:write] 输出调研结论文档
16
- ```
15
+ ### Inputs
16
+ - Requirement: US-<number> or QUESTION-<number>
17
+ - Context Source: MCP source, repository file, official documentation, or user-provided text
18
+ - Decision Needed: <specific decision>
17
19
 
18
- ## 使用说明
20
+ ### Steps
21
+ - Identify primary sources and repository-local evidence.
22
+ - Gather only the context needed for the decision.
23
+ - Compare viable options with tradeoffs.
24
+ - State the recommendation and why it fits the current codebase.
25
+ - Record citations or file references.
26
+ - If a web or MCP source is blocked by verification, login, or access control, record `source_status` and request a fallback instead of inferring content.
27
+ - Keep passing gate output concise; record only the gate name and pass status.
28
+ - On failure, record the command, key error, likely owner, and repair action.
29
+ - Stop after two repair attempts and ask for human direction.
19
30
 
20
- - **并行策略**: `parallel` — 不同方向可同时调研
21
- - **Review 级别**: `light`
22
- - **缓存**: 调研结果可缓存,避免重复工作
31
+ ### Outputs
32
+ - Artifact: docs/plans/<feature-name>/research-<topic>.md
33
+ - Decision: recommendation with tradeoffs
23
34
 
24
- ## 注意事项
35
+ ### Verification
36
+ - Source Check: every factual claim is backed by a cited source or local file reference.
37
+ - Scope Check: recommendation answers the declared decision.
25
38
 
26
- - 使用 `@cache(duration)` 缓存调研结果
27
- - 多个方案可并行调研
28
- - 对比分析需等待各方案调研完成(使用 `@depends`)
29
- - 调研结论应输出为结构化文档
30
- - 注明信息来源和时效性
39
+ ### Done When
40
+ - The decision can be used directly by the harness plan.
41
+ - Unknowns and assumptions are explicit.
42
+ - Light review has no blocking findings.
@@ -1,30 +1,41 @@
1
- # 测试任务模板
1
+ # Test Harness Task Template
2
2
 
3
- ```markdown
4
- ## TaskGroup: [测试范围]
3
+ ## HarnessTask: HT-TEST-1 - Verify Behavior
5
4
 
6
- ### Meta
7
- - parallel_limit: 5
5
+ ### Control
6
+ - type: test
7
+ - agent_role: tester
8
+ - scheduler: parallel
9
+ - isolation_key: tests/<module>/
10
+ - dependencies: []
8
11
  - review_level: standard
9
- - on_failure: continue
12
+ - feedback_mode: quiet_success | actionable_failure
13
+ - retry_limit: 2
10
14
 
11
- ### Tasks
12
- 1. [test] 编写 [模块A] 单元测试
13
- 2. [test] 编写 [模块B] 单元测试
14
- 3. [test] 编写 [功能] 集成测试
15
- 4. [test] 运行全量测试并生成覆盖率报告
16
- ```
15
+ ### Inputs
16
+ - Requirement: US-<number>
17
+ - Implementation Artifact: <source-path>
18
+ - Acceptance Criteria: docs/plans/<feature-name>/user-stories.md
17
19
 
18
- ## 使用说明
20
+ ### Steps
21
+ - Identify the behavior, edge case, or regression to verify.
22
+ - Add the smallest test that proves the behavior.
23
+ - Run the test and confirm it fails when the implementation is absent or broken when practical.
24
+ - Restore or keep the implementation and confirm the test passes.
25
+ - Run the broader affected test gate.
26
+ - Keep passing gate output concise; record only the gate name and pass status.
27
+ - On failure, record the command, key error, likely owner, and repair action.
28
+ - Stop after two repair attempts and ask for human direction.
19
29
 
20
- - **并行策略**: `parallel` — 不同模块的测试可并行编写
21
- - **Review 级别**: `standard`
22
- - **on_failure**: `continue` — 单模块测试失败不阻塞其他
30
+ ### Outputs
31
+ - Artifact: tests/<module>/
32
+ - Execution Notes: docs/plans/<feature-name>/execution-log.md
23
33
 
24
- ## 注意事项
34
+ ### Verification
35
+ - Targeted: `pnpm test:run tests/<module>`
36
+ - Broader Gate: `pnpm test:run`
25
37
 
26
- - 不同模块的测试可完全并行编写
27
- - 集成测试可能依赖多个模块,注意声明依赖
28
- - 全量测试运行应在所有测试编写完成后
29
- - 关注测试覆盖率目标
30
- - 使用项目已有的测试框架和模式
38
+ ### Done When
39
+ - The test maps to an acceptance criterion or documented regression.
40
+ - The targeted gate passes.
41
+ - Standard review has no blocking findings.