agent-project-sdlc 0.1.21 → 0.1.23

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.
@@ -17,7 +17,7 @@ description: Use during TESTING to produce a test matrix, run regression, and do
17
17
 
18
18
  执行回归时,优先选择能证明阶段出口的 gate。测试无法运行、环境缺失或数据不可得时,不要宣布通过;如果已经进入 TESTING,应在 `TEST_REPORT.md` 中记录 `BLOCKED`、已完成检查和恢复条件。
19
19
 
20
- TESTING 只能调用 SPRINTING/REVIEWING 已确认 `PASS` 的入口做输入/输出验证。可以补充测试、fixture、mock、assertion helper 和测试文档,但不能在 TESTING 中新增或长期维护 product runtime、server/API/CLI/adapter、direct poller、cloud bootstrap、systemd unit、真实 provider adapter、package runtime script 或部署脚本。如果发现真实入口/出口不存在、implementation doc 缺少 `Development Evidence` 或 `Development Self-Test Report`、自测报告缺少从本地启动或调用入口到完成全部自测用例的 `Module Key Test Path`、或该路径没有覆盖本 task / 本模块承诺的入口、内部关键路径、关键边界、观察点和完成证据,live 模式不可调用、配置契约缺失、Review readiness checklist 不是全 `PASS`,或 `Evidence Level` / `Target Runtime Environment` / `self_test_contract` 与 task 或技术方案承诺不一致,应记录 `BLOCKED`、生成 RFC 或后续 dev task 建议,并停止把测试阶段扩大成开发/集成搭建。开发尚未交付可测试 entry/exit、目标运行环境、Development Self-Test Report 或 Testing Handoff Contract 时,不要在 `.docs/07_test/**` 提前生成正式测试用例或正式报告;验收思路应留在 PRD acceptance criteria、tech plan verification strategy 或非 `.docs/07_test/**` 的草稿说明里。`TEST_REPORT.md` 不能在描述缺少 entry/exit、缺少 Development Evidence、缺少 Development Self-Test Report、证据等级不匹配或未交付应用入口时给出 `PASS`。
20
+ TESTING 只能调用 SPRINTING/REVIEWING 已确认 `PASS` 的入口做输入/输出验证。可以补充测试、fixture、mock、assertion helper 和测试文档,但不能在 TESTING 中新增或长期维护 product runtime、server/API/CLI/adapter、direct poller、cloud bootstrap、systemd unit、真实 provider adapter、package runtime script 或部署脚本。如果发现真实入口/出口不存在、implementation doc 缺少 `Development Evidence` 或 `Development Self-Test Report`、自测报告缺少 `Report Status: PASS`、缺少从本地启动或调用入口到完成全部自测用例的 `Module Key Test Path`、缺少 `Evidence Index Refs`、或该路径没有覆盖本 task / 本模块承诺的入口、内部关键路径、关键边界、观察点和完成证据,live 模式不可调用、配置契约缺失、Review readiness checklist 不是全 `PASS`,或 `Evidence Level` / `Target Runtime Environment` / `self_test_contract` 与 task 或技术方案承诺不一致,应记录 `BLOCKED`、生成 RFC 或后续 dev task 建议,并停止把测试阶段扩大成开发/集成搭建。若 `self_test_contract` 设置 `graph_required: true` 或包含 `module_key_test_graph`,TESTING 必须按 `Module Key Test Graph` 选择入口、checkpoint、scenario 和 observable exit,不能重新发明 runtime 或把图扩成测试执行引擎。`Development Self-Test Report` 不是 debug log、operator log、runbook、evidence dump 或探索流水;测试只消费其模块入口、核心路径、出口和最小证据指针。high-risk runtime/live/remote-operator 验证要先读 `plan.yaml#resume_capsule`,再读 `.docs/09_runbooks/**` runbook 和 evidence index,最后才读 exploration appendix;测试只沿 canonical path 和 hard constraints 验证,不重新尝试 `do_not_retry` 中的失败路径。开发尚未交付可测试 entry/exit、目标运行环境、Development Self-Test Report 或 Testing Handoff Contract 时,不要在 `.docs/07_test/**` 提前生成正式测试用例或正式报告;验收思路应留在 PRD acceptance criteria、tech plan verification strategy 或非 `.docs/07_test/**` 的草稿说明里。`TEST_REPORT.md` 不能在描述缺少 entry/exit、缺少 Development Evidence、缺少 Development Self-Test Report、证据等级不匹配或未交付应用入口时给出 `PASS`。
21
21
 
22
22
  测试设计和回归证据产出本身也是 workflow task。开始测试前,先在 `<harnessRoot>/state/plan.yaml` 创建或选择一个足够小的 `TASK-*` open task,并设置 `phase: "TESTING"`;当前轮只产出一个测试策略 slice、测试用例 slice、回归批次、风险验证片区或一组 scoped test changes。`plan.yaml` 仍是唯一执行计划事实源,`.docs/07_test/**` 只记录当前方案的 test strategy、test cases、executed regression evidence、coverage gaps 和 final decision,不表达“下一步如何开发”,也不保留已被 RFC supersede 的旧测试结果。
23
23
 
@@ -67,7 +67,7 @@ TESTING 只能调用 SPRINTING/REVIEWING 已确认 `PASS` 的入口做输入/输
67
67
 
68
68
  ## 规则
69
69
 
70
- 1. 测试用例必须追溯到 PRD acceptance criteria 或 Review findings,并绑定 SPRINTING/REVIEWING 已确认的 runnable entry/exit、Development Evidence、Development Self-Test Report、Evidence Level、Target Runtime Environment 和 Testing Handoff Contract。
70
+ 1. 测试用例必须追溯到 PRD acceptance criteria 或 Review findings,并绑定 SPRINTING/REVIEWING 已确认的 runnable entry/exit、Development Evidence、Development Self-Test Report、Evidence Level、Target Runtime Environment 和 Testing Handoff Contract;复杂路径还要消费 Module Key Test Graph,而不是在 TESTING 中重新设计 runtime path
71
71
  2. 根据风险补充边界、负向、回归和集成测试。
72
72
  3. 如果有意延后覆盖,必须记录风险和 follow-up。
73
73
  4. 不得新增 product runtime、server/API/CLI/adapter、poller、cloud bootstrap、systemd unit、真实 provider adapter、package runtime script 或部署脚本;这些属于 SPRINTING/RFC。
@@ -87,7 +87,8 @@ TESTING 只能调用 SPRINTING/REVIEWING 已确认 `PASS` 的入口做输入/输
87
87
  - [ ] Regression checklist 已完成。
88
88
  - [ ] 测试只调用既有 runnable entry/exit;未在 TESTING 中新增 product runtime、bootstrap、provider adapter、deploy 或 package runtime script。
89
89
  - [ ] 已核对 implementation doc 中的 Development Evidence、Evidence Level、Target Runtime Environment 和 Testing Handoff Contract,并只基于已交付入口设计测试。
90
- - [ ] 已核对 Development Self-Test Report 中 scenario results、executed gates、Module Key Test Path 和 actual evidence。
90
+ - [ ] 已核对 Development Self-Test Report 中 Report Status、Module Application Entry、scenario results、executed gates、Module Key Test Path、Observable Exit、Current Blocker、Testing Handoff Readiness Evidence Index Refs;若存在 Module Key Test Graph,测试路径按图消费。
91
+ - [ ] high-risk runtime/live 验证已优先使用 `resume_capsule` 与 runbook/evidence index,未重复执行 exploration appendix 中的失败路径。
91
92
  - [ ] 已判断 test report / test matrix 的语义切片边界。
92
93
  - [ ] 未把测试计划、测试用例或待填内容写成 `TEST_REPORT.md`。
93
94
  - [ ] 已确认 `.docs/07_test/**` 只包含当前方案仍有效的测试事实。
@@ -0,0 +1,18 @@
1
+ # [Runtime / Live Smoke] Evidence Index
2
+
3
+ 本文件只保存证据指针和缺口,不把证据正文塞回 implementation doc 主线或 `Development Self-Test Report`。
4
+
5
+ | Scenario | Status | Evidence File / System | Gap / Next Action |
6
+ |---|---|---|---|
7
+ | | PASS / BLOCKED / GAP | | |
8
+
9
+ ## Evidence Retention
10
+
11
+ - Temporary evidence:
12
+ - Stable artifact / CI / release record:
13
+ - Evidence that must not be copied into main docs:
14
+ - Development Self-Test Report reference format:
15
+
16
+ ## Missing Evidence
17
+
18
+ -
@@ -0,0 +1,24 @@
1
+ # [Runtime / Operator Path] Exploration Appendix
2
+
3
+ ## Purpose
4
+
5
+ 记录失败尝试、诊断路径和不要重复踩坑的结论。本文件是记忆附录,不是恢复主线。
6
+ 不要把本文件的长日志复制进 `Development Self-Test Report`;主报告最多保留一句 fallback / diagnostic 总结。
7
+
8
+ ## Failed / Diagnostic Attempts
9
+
10
+ | Attempt | Result | Why It Failed Or Stayed Diagnostic | Do Not Retry Rule |
11
+ |---|---|---|---|
12
+ | | | | |
13
+
14
+ ## Useful Observations
15
+
16
+ -
17
+
18
+ ## Promoted Decisions
19
+
20
+ | Decision | Promoted To |
21
+ |---|---|
22
+ | | `plan.yaml#resume_capsule` / runbook / implementation doc |
23
+
24
+ 凡会改变下一步动作的判断,必须 promoted 到 `plan.yaml#resume_capsule.do_not_retry` 或 runbook 顶部 `Hard Constraints`;本 appendix 只能保留推导和历史背景。
@@ -51,23 +51,76 @@ Input
51
51
  - Testing Handoff Readiness:
52
52
  - Known Missing Runtime Boundaries:
53
53
  - Basic Self-test Evidence: See `Development Self-Test Report`.
54
+ - Resume Capsule / Runbook:
54
55
  - Not applicable:
55
56
 
56
- ## 7. Development Self-Test Report(开发自测报告,已执行)
57
+ ## 7. Current Operator Path(当前操作路径,仅 runtime/live/remote-operator 需要)
57
58
 
59
+ - Canonical path:
60
+ - Operator runbook: `.docs/09_runbooks/...`
61
+ - Credential reference: Keychain item name 或 secret reference name only;不要记录明文密钥。
62
+ - Command/UI channel:
63
+ - Hard Constraints: 会改变下一步动作的判断必须提升到这里和 `plan.yaml#resume_capsule.do_not_retry`;不要只埋在 evidence、notes 或 appendix。
64
+ - Do-not-retry summary: fallback / diagnostic 只写一句结论,详细内容进 exploration appendix 或 git history。
65
+
66
+ ## 8. Development Self-Test Report(开发自测报告)
67
+
68
+ 本节是开发阶段可执行交接卡,只证明模块应用入口、核心路径、出口和最小证据指针。目标控制在几十行;high-risk runtime/live 场景包含 `Gate Breakdown` 时也不要超过 120 行。本节不是 debug log、operator log、runbook、evidence dump 或探索流水。
69
+
70
+ - Report Status: PASS | BLOCKED | IN_PROGRESS | STALE
58
71
  - Contract Source:
72
+ - Module Application Entry:
73
+ - Module Key Test Path: local start / invocation -> all self-test scenarios -> all task/module promised runnable entries -> actual internal key paths / boundaries / checkpoints -> observable completion evidence
74
+ - Module Key Test Graph: required only when `self_test_contract.graph_required: true` or `module_key_test_graph` exists; keep it as a compact DAG pointer list/table covering entry, checkpoints, scenario nodes, observable exit, and evidence refs.
59
75
  - Scenario Results:
60
76
  - Executed Gates:
61
- - Module Key Test Path: local start / invocation -> all self-test scenarios -> all task/module promised runnable entries -> actual internal key paths / boundaries / checkpoints -> observable completion evidence
62
- - Actual Evidence:
63
- - Missing / Blockers:
77
+ - Observable Exit:
78
+ - Current Blocker:
64
79
  - Testing Handoff Readiness:
80
+ - Evidence Index Refs: `.docs/09_runbooks/..._evidence.md` 或外部 artifact / CI / command output path;不要复制证据正文。
81
+
82
+ 保留:
83
+ - Runnable Entry / Module Key Test Path / Observable Exit
84
+ - Scenario Results / Executed Gates / Evidence Index Refs
85
+ - Current Blocker / Testing Handoff Readiness
86
+
87
+ 不保留:
88
+ - 每次工具探索的完整流水
89
+ - debug log、operator log、历史操作日记或 runbook 正文
90
+ - fallback / diagnostic 的长篇命令、截图过程或 UI 细节
91
+ - 与当前恢复路径无关的旧失败通道;只在 appendix 或 git history 保留
92
+ - `Actual Evidence` 正文字段;证据正文进入 Evidence Index 或外部 artifact,本节只留 refs
93
+ - high-risk implementation doc 主线不得新增 `Evidence Dump`、`Operator Log`、`Failed Attempts`、`Screenshot Index` 等章节;这些只能进入 runbook / evidence index / exploration appendix
94
+
95
+ ### Gate Breakdown(Gate 分层)
96
+
97
+ | Gate Layer | Status | Evidence | Gap / Next Action |
98
+ |---|---|---|---|
99
+ | Local gate | | | |
100
+ | Cloud/service gate | | | |
101
+ | Executor/operator readiness | | | |
102
+ | Live smoke / handoff | | | |
65
103
 
66
104
  | Scenario ID | Result | Executed Entry | Actual Exit | Evidence |
67
105
  |---|---|---|---|---|
68
106
  | | | | | |
69
107
 
70
- ## 8. Testing Handoff Contract(测试交接合同)
108
+ ### Module Key Test Graph(复杂 / high-risk 路径需要)
109
+
110
+ 只记录实际 handoff path 的 DAG 骨架和 evidence pointer;不要放 command output、截图过程、operator log、debug log、runbook 正文、失败探索或历史流水。
111
+
112
+ | Node ID | Kind | Label | Scenario Ref | Expected Exit | Evidence Ref |
113
+ |---|---|---|---|---|---|
114
+ | entry-local-start | entry | | | | |
115
+ | scenario-st-001 | scenario | | ST-001 | | `.docs/09_runbooks/...#ST-001` |
116
+ | exit-observable | observable_exit | | | | |
117
+
118
+ | From | To |
119
+ |---|---|
120
+ | entry-local-start | scenario-st-001 |
121
+ | scenario-st-001 | exit-observable |
122
+
123
+ ## 9. Testing Handoff Contract(测试交接合同)
71
124
 
72
125
  - Entry:
73
126
  - Config:
@@ -77,7 +130,7 @@ Input
77
130
  - Cleanup / reset / idempotency:
78
131
  - Evidence Level:
79
132
 
80
- ## 9. 关键实现逻辑
133
+ ## 10. 关键实现逻辑
81
134
 
82
135
  - 输入校验(Input validation):
83
136
  - 核心分支(Core branches):
@@ -85,22 +138,22 @@ Input
85
138
  - 边界兜底(Boundary fallback):
86
139
  - 性能或并发注意事项(Performance or concurrency notes):
87
140
 
88
- ## 10. 与技术方案的偏移
141
+ ## 11. 与技术方案的偏移
89
142
 
90
143
  -
91
144
 
92
- ## 11. 测试覆盖(Test Coverage)
145
+ ## 12. 测试覆盖(Test Coverage)
93
146
 
94
147
  | 测试(Test) | 覆盖范围(Coverage) | 结果(Result) |
95
148
  |---|---|---|
96
149
  | | | |
97
150
 
98
- ## 12. 变更记录(Change Log)
151
+ ## 13. 变更记录(Change Log)
99
152
 
100
153
  | 日期(Date) | Task ID | Commit | 摘要(Summary) |
101
154
  |---|---|---|---|
102
155
  | | | | |
103
156
 
104
- ## 13. 后续维护注意事项
157
+ ## 14. 后续维护注意事项
105
158
 
106
159
  -
@@ -1,5 +1,21 @@
1
1
  current_task_id: "TASK-001"
2
2
  next_task_sequence: 2
3
+ # Required while the current SPRINTING task is high-risk runtime/live work
4
+ # (`external_provider_live`, `deployed_runtime`, `business_handoff_ready`, or
5
+ # target runtime `cloud_vm` / `managed_service` / `browser` / `worker`). Keep this
6
+ # short: 5-8 recovery facts, not a full attempt log.
7
+ # resume_capsule:
8
+ # task_id: "TASK-001"
9
+ # state: "in_progress | blocked | ready_for_gate"
10
+ # canonical_path: "operator/runtime path to continue from"
11
+ # next_step: "one concrete next action"
12
+ # blocker: "current blocker, or none with context"
13
+ # last_passed_gate: "last concrete PASS gate or checkpoint"
14
+ # do_not_retry:
15
+ # - "known failed path, repeated trap, or strategy-changing hard constraint; e.g. if PC WeChat shows QR after confirmed login, first classify rule_assumption_gap vs operator_induced_logout_or_session_reset before rescanning"
16
+ # recovery_refs:
17
+ # - ".docs/04_implementation/example.md"
18
+ # - ".docs/09_runbooks/example_live_smoke_runbook.md"
3
19
  # Optional top-level execution contract. Omit this block when the current task
4
20
  # stays serial after the default parallel eligibility check. Use
5
21
  # trigger: "workflow_default" when the workflow safely splits the task by
@@ -46,6 +62,7 @@ tasks:
46
62
  architecture: []
47
63
  tech_plan: []
48
64
  rfc: []
65
+ runbook: []
49
66
  allowed_paths:
50
67
  - ".docs/00_raw/**"
51
68
  - ".docs/01_product/**"
@@ -76,6 +93,36 @@ tasks:
76
93
  runnable_entry: "command / URL / endpoint / worker command"
77
94
  observable_exit: "response / page state / side effect / log / artifact"
78
95
  module_key_test_path: "local start command / URL -> all self-test scenarios -> all task/module promised runnable entries -> internal key paths / boundaries / checkpoints -> observable completion evidence"
96
+ # Set graph_required: true for complex/high-risk handoff paths:
97
+ # scenario >= 3, multiple branches/entries, runtime/live/provider/browser/worker,
98
+ # or paths that Review/Testing must consume explicitly. The graph is a
99
+ # lightweight DAG handoff skeleton, not an execution trace, runbook, log,
100
+ # evidence dump, or graph engine input.
101
+ graph_required: false
102
+ module_key_test_graph:
103
+ nodes:
104
+ - id: "entry-local-start"
105
+ kind: "entry"
106
+ label: "local start command / URL"
107
+ - id: "checkpoint-core-path"
108
+ kind: "checkpoint"
109
+ label: "core module boundary or checkpoint"
110
+ - id: "scenario-st-001"
111
+ kind: "scenario"
112
+ label: "ST-001 expected behavior"
113
+ scenario_ref: "ST-001"
114
+ expected_exit: "observable response / side effect / page state"
115
+ evidence_ref: ".docs/09_runbooks/example_evidence.md#ST-001"
116
+ - id: "exit-observable"
117
+ kind: "observable_exit"
118
+ label: "observable response / side effect / page state"
119
+ edges:
120
+ - from: "entry-local-start"
121
+ to: "checkpoint-core-path"
122
+ - from: "checkpoint-core-path"
123
+ to: "scenario-st-001"
124
+ - from: "scenario-st-001"
125
+ to: "exit-observable"
79
126
  required_gates:
80
127
  - "npm run smoke"
81
128
  scenarios:
@@ -85,6 +132,6 @@ tasks:
85
132
  evidence: "command/browser/API/log/screenshot/etc"
86
133
  not_applicable_reason: ""
87
134
  working_notes:
88
- - "执行现场备注只在 open task 保留。"
135
+ - "执行现场备注只保留恢复所需的短备注;目标 5-8 条,validator 上限 8 条;路径选择结论提升到 resume_capsule。"
89
136
  result_docs:
90
137
  - ".docs/01_product/example.md"
@@ -0,0 +1,52 @@
1
+ # [Runtime / Operator Path] Runbook
2
+
3
+ 本文件记录 operator/provisioning 恢复路径,不是 `Development Self-Test Report` 或 scenario evidence。
4
+
5
+ ## 1. Recovery Summary
6
+
7
+ - Canonical path:
8
+ - Current state:
9
+ - Next command channel:
10
+ - Last known good checkpoint:
11
+ - Primary blocker:
12
+
13
+ ## 2. Hard Constraints
14
+
15
+ - 会改变下一步动作的判断必须写在这里,并同步到 `plan.yaml#resume_capsule.do_not_retry` 或 implementation doc `Current Operator Path`。
16
+ - Example: PC 微信已登录后再次出现 QR 时,先判定 `rule_assumption_gap` vs `operator_induced_logout_or_session_reset`,不得直接进入重新扫码流程。
17
+
18
+ ## 3. Operator Path
19
+
20
+ ```txt
21
+ canonical:
22
+ credentials: Keychain item name or secret reference only
23
+ remote host:
24
+ command channel:
25
+ UI channel:
26
+ do not prefer:
27
+ ```
28
+
29
+ ## 4. Preconditions
30
+
31
+ - Required access:
32
+ - Required local tools:
33
+ - Required remote services:
34
+ - Safety / cleanup notes:
35
+
36
+ ## 5. Resume Steps
37
+
38
+ 1.
39
+ 2.
40
+ 3.
41
+
42
+ ## 6. Fallbacks And Diagnostics
43
+
44
+ - Preferred fallback:
45
+ - Diagnostic-only paths:
46
+ - Do not retry:
47
+
48
+ ## 7. Linked Evidence
49
+
50
+ - Evidence index:
51
+ - Exploration appendix:
52
+ - Implementation doc: