@wwkit/harness 1.0.43 → 1.0.44

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.
@@ -0,0 +1,31 @@
1
+ Epic No: {{epic_no}}
2
+ Epic Work Dir: {{epic_dir}}
3
+ Title: <Epic标题>
4
+ Value Statement: 作为<用户或角色>,我想<采取这样的行动>,以便<获得这样的益处>
5
+
6
+ ## Epic Increment (交付给用户的产物;类型可选:直接答复/方案设计/文件/代码修改/SQL写入/API调用,类型定义、交付方式与 DoD 见 Skill Step1 · Define Increment Types)
7
+ - <类型>:Deliverable 1
8
+ - <类型>:Deliverable 2
9
+
10
+ ## In Scope (包含的功能)
11
+ - feature1
12
+ - feature2
13
+
14
+ ## Out of Scope (可选,不包含的功能)
15
+ - feature3
16
+ - feature4
17
+
18
+ ## Constraints (可选,Epic约束条件)
19
+ - condition1
20
+ - condition2
21
+
22
+ ## Assumptions & Defaults (可选,本次采用的缺省规则)
23
+ - <用户未明确的项>:<采用的缺省规则>
24
+
25
+ ## Acceptance Criteria (Epic级验收标准,从用户输入提取,须包含用户明确提出的验收规则)
26
+ - Definition of Done1
27
+ - Definition of Done2
28
+
29
+ ## Notes (可选,其他补充信息)
30
+ - additional1
31
+ - additional2
@@ -0,0 +1,45 @@
1
+ Epic No.: {{epic_no}}
2
+ Release Goal: <Release Goal Description>
3
+ Release Increment: <Epic Increment + optional intermediate artifacts>
4
+
5
+ Failure Strategy: <fast fail | continue>
6
+
7
+ ## Sprint List
8
+ 每个Sprint完成后,更新其状态(pending/in_progress/completed/failed)和重试次数
9
+
10
+ |Sprint No.|user story Title|Developer|Parallel|us doc|Status|Retry|Failure Info|
11
+ |-----|-----|:--|:--|:--|:--|:--|:--|
12
+ |sprint_001|us_001 Title|Alice|false|`{{epic_dir}}/us_001.md`|Pending|0|-|
13
+ |sprint_002|us_002 Title|Bob|true|`{{epic_dir}}/us_002.md`|Pending|0|-|
14
+ |sprint_003|us_003 Title|Carol|true|`{{epic_dir}}/us_003.md`|Pending|0|-|
15
+ |sprint_004|us_004 Title|David|false|`{{epic_dir}}/us_004.md`|Pending|0|-|
16
+
17
+ ## Sprint DAG
18
+ 使用DAG表示 user story 之间的依赖与并行关系:
19
+ ```
20
+ us_001 --> us_002 # 顺序依赖:前者完成后后者才执行
21
+ us_001 --> [us_002, us_003] # 并行:前者完成后,方括号内的 US 并行执行 (最多并行5个)
22
+ [us_002, us_003] --> us_004 # 汇聚:方括号内的 US 全部完成后,后者才执行
23
+ ```
24
+
25
+ ## Release Retrospective
26
+ Release结束后,填写下表:
27
+
28
+ |Item|Entries|
29
+ |-----|-----|
30
+ |做得好的|- <条目1><br>- <条目2>|
31
+ |需改进的|- <条目1>|
32
+ |改进计划|- <条目1>|
33
+
34
+ ## Release Announcement
35
+ Release结束后,填写下表并向用户宣布:
36
+
37
+ |Item|Value|
38
+ |-----|-----|
39
+ |Epic Title|<Epic标题>|
40
+ |Epic Status|<completed \| failed \| partial>|
41
+ |Epic Duration|<Epic开发耗时>分钟|
42
+ |Epic Increment|<已交付的 Increment 清单>|
43
+ |Epic Error|<失败原因,无则填 ->|
44
+
45
+ <若有「直接答复」或「方案设计」类 Increment,在此处(Announcement 表之后)完整展示其内容;无则删除本行>
@@ -0,0 +1,40 @@
1
+ US No: <us_001> (编号从001开始)
2
+ US Work Dir: {{epic_dir}}/{{us_no}}
3
+ Title: <US标题>
4
+ Value Statement: 作为<用户或角色>,我想<采取这样的行动>,以便<获得这样的益处>
5
+ Parallel: <是否可并行执行>
6
+
7
+ ## US Increment: (Intermediate Deliverable 或 Epic Increment)
8
+ - Deliverable 1
9
+ - Deliverable 2
10
+
11
+ ## In Scope (包含的功能)
12
+ - Feature1
13
+ - Feature2
14
+
15
+ ## Out of Scope (可选,不在本 US 范围)
16
+ - <越界行为,如:不合并其他 US 的产物、不写入最终交付目录>
17
+
18
+ ## Dependencies (可选,仅插件 / 包 / 特殊系统服务,常规工具不列)
19
+ | Type | Name | Notes |
20
+ |---|---|---|
21
+ | plugin / package / service | `<名称>` | `<用途、版本或调用方式;不可用时如何降级>` |
22
+
23
+ ## Constraints (可选,技术性约束)
24
+ - <编码 / 格式 / 行宽 / 性能 / 网络许可 / 路径边界等>
25
+
26
+ ## Resources (自包含:开发本 US 所需的全部资源)
27
+ 以下为参考条目,根据具体需求设计:
28
+ | Variable | Value | Description |
29
+ |---|---|---|
30
+ | `input_path` | `<本 US 的输入素材路径>` | 开发所需的源文件/原始资料 |
31
+ | `shared_asset` | `<跨 US 复用的共享资源路径>` | 如术语表、公共规范;无则删除本行 |
32
+ | `output_path` | `<本 US 产出文件路径>` | 落盘位置 |
33
+
34
+ ## Acceptance Criteria (US级验收标准)
35
+ - Given <场景>, When <操作>, Then <预期结果>
36
+ - Given <场景>, When <操作>, Then <预期结果>
37
+
38
+ ## Notes (可选,其他补充信息)
39
+ - additional1
40
+ - additional2
@@ -0,0 +1,108 @@
1
+ 使用场景:分块 → 批量 subagent → 合并
2
+
3
+ ---
4
+
5
+ # Sprint Backlog for <name>
6
+
7
+ ## Sprint Goal
8
+
9
+ <one-sentence goal, typically: chunk the source, process chunks by batch via subagents, then merge the results>
10
+
11
+ ## Sprint Increment
12
+ <list of Increment>
13
+
14
+ ## Sprint Backlog Items
15
+
16
+ ### Item1: Define variables
17
+
18
+ #### Implement
19
+ Define the following variables and reference them as `{{var}}` in later items:
20
+
21
+ | Variable | Value | Description |
22
+ |---|---|---|
23
+ | `us_work_dir` | `US Work Dir` | US work directory, from the US document |
24
+ | `results_dir` | `{{us_work_dir}}/results` | Iteration results directory |
25
+ | `chunks_dir` | `{{us_work_dir}}/chunks` | Chunk files directory |
26
+ | `max_parallel` | `5` | Max chunks dispatched in parallel per batch (default: 5) |
27
+ | `source_dir` | `Source Dir` | Source material / resource document directory, from the US document |
28
+ | `chunk_id` | `chunk_001`, `chunk_002`, ... | Per-chunk identifier, in chunk order |
29
+ | `status` | `pending` / `completed` / `failed` | Per-chunk status, stored in `progress.csv` |
30
+ | `retry` | `0` | Retry count per row; a failed row is retried while `retry < 3` |
31
+
32
+ #### DoD check
33
+ All eight variables defined and resolvable
34
+
35
+ ### Item2: Create chunks
36
+
37
+ #### Implement
38
+ 1. Split the source `{{source_dir}}/<source>` into chunks according to <chunking rule>.
39
+ 2. Save each chunk as `{{chunks_dir}}/{{chunk_id}}.<ext>`, where `{{chunk_id}}` runs `chunk_001`, `chunk_002`, ... in chunk order.
40
+
41
+ #### DoD check
42
+ Chunk files are saved to `{{chunks_dir}}`
43
+
44
+ ### Item3: Prepare loop resources
45
+
46
+ #### Implement
47
+ 1. Create `{{us_work_dir}}/progress.csv` with one row per chunk file created in Item2, all starting as `pending` with `retry = 0`:
48
+ ```
49
+ chunk_id,status,retry
50
+ chunk_001,pending,0
51
+ chunk_002,pending,0
52
+ ...
53
+ ```
54
+ 2. Prepare the subagent dispatch parameters:
55
+
56
+ | Parameter | Value |
57
+ |---|---|
58
+ | `subagent_type` | `general` |
59
+ | `description` | `<action> {{chunk_id}}` |
60
+ | `prompt` | self-contained task prompt (input: chunk file `{{chunks_dir}}/{{chunk_id}}.<ext>`, output: result file `{{results_dir}}/{{chunk_id}}.<ext>`) |
61
+
62
+ #### DoD check
63
+ `{{us_work_dir}}/progress.csv` created with all chunks pending; subagent dispatch parameters ready
64
+
65
+ ### Item4: Batch process loop
66
+
67
+ #### Implement
68
+ ```
69
+ # resources prepared in Item3
70
+ while true:
71
+ # take the first batch of chunks not completed and retry < 3
72
+ batch = first {{max_parallel}} rows from {{us_work_dir}}/progress.csv where status != completed and retry < 3
73
+
74
+ # exit when no chunk is left to process
75
+ if batch is empty:
76
+ break
77
+
78
+ # adjust prompt for failed chunks
79
+ for chunk in batch:
80
+ if chunk.status == failed:
81
+ adjust prompt based on the failure reason
82
+
83
+ # dispatch one subagent per chunk in the batch, all in a single message (parallel, not serial), using the parameters prepared in Item3 (prompt adjusted as above for retried chunks)
84
+ parallel dispatch_subagent(for each chunk in batch)
85
+
86
+ # update status; any failure (including an error) counts as one retry
87
+ for chunk in batch:
88
+ if {{results_dir}}/{{chunk_id}}.<ext> exists and valid:
89
+ update {{us_work_dir}}/progress.csv → completed
90
+ else:
91
+ update {{us_work_dir}}/progress.csv → failed, retry+1
92
+
93
+ print batch N status: [{{chunk_id}}:{{status}}, ...]
94
+ ```
95
+
96
+ #### DoD check
97
+ - All chunks in `{{us_work_dir}}/progress.csv` are either `completed` or `failed` with `retry >= 3`
98
+ - Every completed chunk has a corresponding `{{results_dir}}/{{chunk_id}}.<ext>`
99
+
100
+ ### Item5: Merge output
101
+
102
+ #### Implement
103
+ 1. Merge the results of all `completed` chunks in `{{results_dir}}/`, ordered by their row order in `{{us_work_dir}}/progress.csv`, into `{{us_work_dir}}/result.<ext>`
104
+ 2. Report the chunks that ended `failed` (retry >= 3); they are excluded from the merged result
105
+
106
+ #### DoD check
107
+ - `{{us_work_dir}}/result.<ext>` generated from all completed results
108
+ - Excluded failed chunks are reported
@@ -0,0 +1,111 @@
1
+ 使用场景:初始优化 → [评估 → 判停 → 优化]循环 → 终审优化 → 报告
2
+
3
+ ---
4
+
5
+ # Sprint Backlog for <name>
6
+
7
+ ## Sprint Goal
8
+
9
+ <one-sentence goal, typically: optimize the target in place until the score passes or max rounds reached, then report>
10
+
11
+ ## Sprint Increment
12
+ <list of Increment>
13
+
14
+ ## Sprint Backlog Items
15
+
16
+ ### Item1: Define variables
17
+
18
+ #### Implement
19
+ Define the following variables and reference them as `{{var}}` in later items:
20
+
21
+ | Variable | Value | Description |
22
+ |---|---|---|
23
+ | `us_work_dir` | `US Work Dir` | US work directory, from the US document |
24
+ | `max_rounds` | `3` | Max evaluate-optimize rounds (default: 3) |
25
+ | `target_score` | `<score the target must reach>` | Pass threshold of the evaluation score |
26
+ | `round` | `1`, `2`, ... | Per-round number, in round order |
27
+ | `score` | `<number>` | Evaluation score of the target in this round |
28
+ | `status` | `pending` / `completed` / `max_reached` / `failed` | Per-round status, stored in `progress.csv` |
29
+
30
+ #### DoD check
31
+ All six variables defined and resolvable
32
+
33
+ ### Item2: Initial optimize
34
+
35
+ #### Implement
36
+ Optimize the target in place (first pass)
37
+
38
+ #### DoD check
39
+ Target optimized in place
40
+
41
+ ### Item3: Prepare loop resources
42
+
43
+ #### Implement
44
+ 1. Create `{{us_work_dir}}/progress.csv` with one row per round `1` to `{{max_rounds}}`, all starting as `pending` with an empty score:
45
+ ```
46
+ round,status,score
47
+ 1,pending,
48
+ 2,pending,
49
+ ...
50
+ ```
51
+ 2. Define the explicit scoring rules (required), described in text: how the score is computed — the scored dimensions, their weights, and the deduction rules for unmet points — together with the evaluation tool to use and the pass threshold `{{target_score}}`
52
+
53
+ #### DoD check
54
+ `{{us_work_dir}}/progress.csv` created with all rounds pending; explicit scoring rules described in text
55
+
56
+ ### Item4: Evaluate-optimize loop
57
+
58
+ #### Implement
59
+ ```
60
+ # resources prepared in Item3
61
+ while true:
62
+ # take the first pending round
63
+ round = first row from {{us_work_dir}}/progress.csv where status == pending
64
+
65
+ # exit when no round is left to process
66
+ if round is empty:
67
+ break
68
+
69
+ # score the target
70
+ score = run the evaluation tool on the target
71
+
72
+ # decide this round's status
73
+ if score meets {{target_score}}:
74
+ status = completed
75
+ elif round >= {{max_rounds}}:
76
+ status = max_reached
77
+ else:
78
+ <optimize the target in place based on the items that did not pass>
79
+ status = completed if the target was modified else failed
80
+
81
+ update {{us_work_dir}}/progress.csv where round == {{round}} → score = {{score}}, status = {{status}}
82
+
83
+ print round {{round}} score: {{score}} status: {{status}}
84
+
85
+ # stop once the target passes or the last round is reached
86
+ if score meets {{target_score}} or status == max_reached:
87
+ break
88
+ ```
89
+
90
+ #### DoD check
91
+ - Every round is `completed`, `max_reached`, or `failed`; rounds left `pending` only when the loop stopped on a pass
92
+ - Every round with a non-`pending` status has a recorded score
93
+
94
+ ### Item5: Final optimize
95
+
96
+ #### Implement
97
+ Short-circuit: skip this item when the last round score already passes.
98
+
99
+ Final optimization pass on the target in place
100
+
101
+ #### DoD check
102
+ Target optimized in place at the final state
103
+
104
+ ### Item6: Report
105
+
106
+ #### Implement
107
+ Generate `{{us_work_dir}}/report.md` with the score history per round (read from `progress.csv`) and the final status
108
+
109
+ #### DoD check
110
+ - `report.md` generated with the score history table
111
+ - Final status recorded: `completed` when the last score met `{{target_score}}`, otherwise `NOT_REACHED`
@@ -0,0 +1,85 @@
1
+ 使用场景:条目 → 逐条循环处理 → 汇总
2
+
3
+ ---
4
+
5
+ # Sprint Backlog for <name>
6
+
7
+ ## Sprint Goal
8
+
9
+ <one-sentence goal, typically: process items one by one in a loop and produce final output>
10
+
11
+ ## Sprint Increment
12
+ <list of Increment>
13
+
14
+ ## Sprint Backlog Items
15
+
16
+ ### Item1: Define variables
17
+
18
+ #### Implement
19
+ Define the following variables and reference them as `{{var}}` in later items:
20
+
21
+ | Variable | Value | Description |
22
+ |---|---|---|
23
+ | `us_work_dir` | `US Work Dir` | US work directory, from the US document |
24
+ | `results_dir` | `{{us_work_dir}}/results` | Iteration results directory |
25
+ | `item_id` | `item_001`, `item_002`, ... | Per-item identifier, in item order |
26
+ | `status` | `pending` / `completed` / `failed` | Per-item status, stored in `progress.csv` |
27
+ | `retry` | `0` | Retry count per row; a failed row is retried while `retry < 3` |
28
+
29
+ Note: if the requirement produces no file output, `results_dir` need not be created; in that case, Item3 judges each item by its own result instead of a file, and Item4 is skipped.
30
+
31
+ #### DoD check
32
+ All five variables defined and resolvable
33
+
34
+ ### Item2: Prepare loop resources
35
+
36
+ #### Implement
37
+ 1. Create `{{us_work_dir}}/progress.csv`:
38
+ ```
39
+ item_id,status,retry
40
+ item_001,pending,0
41
+ item_002,pending,0
42
+ ...
43
+ ```
44
+ 2. <prepare other resources needed by the loop>
45
+
46
+ #### DoD check
47
+ `{{us_work_dir}}/progress.csv` created with all items pending; loop resources ready
48
+
49
+ ### Item3: Process loop
50
+
51
+ #### Implement
52
+ ```
53
+ # resources prepared in Item2
54
+ while true:
55
+ # take the first row not completed and retry < 3
56
+ item = first row from {{us_work_dir}}/progress.csv where status != completed and retry < 3
57
+
58
+ # exit when no item is left to process
59
+ if item is empty:
60
+ break
61
+
62
+ # process the single item, overwrite its process file
63
+ <process item, write output to {{results_dir}}/item_{{item_id}}.<ext>>
64
+
65
+ # update status; any failure (including an error) counts as one retry
66
+ if {{results_dir}}/item_{{item_id}}.<ext> exists and valid:
67
+ update {{us_work_dir}}/progress.csv → completed
68
+ else:
69
+ update {{us_work_dir}}/progress.csv → failed, retry+1
70
+
71
+ print item {{item_id}} status: {{status}}
72
+ ```
73
+
74
+ #### DoD check
75
+ - All items in `{{us_work_dir}}/progress.csv` are either `completed` or `failed` with `retry >= 3`
76
+ - Every completed item has a corresponding `{{results_dir}}/item_{{item_id}}.<ext>`
77
+
78
+ ### Item4: Merge output
79
+
80
+ #### Implement
81
+ Short-circuit: skip this item when the requirement produces no file output.
82
+ 1. Merge/aggregate the process files of all `completed` items in `{{results_dir}}/`, ordered by their row order in `{{us_work_dir}}/progress.csv`, into `{{us_work_dir}}/result.<ext>`
83
+
84
+ #### DoD check
85
+ - `{{us_work_dir}}/result.<ext>` generated from all completed results
@@ -0,0 +1,51 @@
1
+ 使用场景:步骤 → 顺序执行 → 完成
2
+
3
+ ---
4
+
5
+ # Sprint Backlog for <name>
6
+
7
+ ## Sprint Goal
8
+ <one-sentence goal>
9
+
10
+ ## Sprint Increment
11
+ <list of Increment>
12
+
13
+ ## Sprint Backlog Items
14
+
15
+ ### Item1: Define variables
16
+
17
+ #### Implement
18
+ Define the following variables and reference them as `{{var}}` in later items:
19
+
20
+ | Variable | Value | Description |
21
+ |---|---|---|
22
+ | `us_work_dir` | `US Work Dir` | US work directory, from the US document |
23
+
24
+ #### DoD check
25
+ The variable is defined and resolvable
26
+
27
+ ### Item2: <title>
28
+
29
+ #### Implement
30
+ <action>
31
+
32
+ #### DoD check
33
+ <verifiable criteria>
34
+
35
+ ### Item3: <title>
36
+
37
+ #### Implement
38
+ <action>
39
+
40
+ #### DoD check
41
+ <verifiable criteria>
42
+
43
+ ### Item4: <title>
44
+
45
+ #### Implement
46
+ Short-circuit: skip when <condition>
47
+
48
+ <action>
49
+
50
+ #### DoD check
51
+ <verifiable criteria>