agent-project-sdlc 0.1.12 → 0.1.14
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.md +11 -1
- package/assets/agents/AGENTS_CORE.md +3 -3
- package/assets/docs/README.md +10 -2
- package/assets/make/sdlc-harness.mk +4 -6
- package/assets/policies/allowed_paths.yaml +1 -0
- package/assets/policies/gates.yaml +2 -2
- package/assets/policies/phase_contracts.yaml +10 -7
- package/assets/skills/pjsdlc_dev_sprint/SKILL.md +20 -14
- package/assets/skills/pjsdlc_implementation_doc/SKILL.md +6 -2
- package/assets/skills/pjsdlc_manager/SKILL.md +2 -2
- package/assets/skills/pjsdlc_release_manager/SKILL.md +16 -16
- package/assets/skills/pjsdlc_reviewer/SKILL.md +8 -2
- package/assets/skills/pjsdlc_rfc_recalibrate/SKILL.md +7 -2
- package/assets/skills/pjsdlc_tester/SKILL.md +31 -16
- package/assets/templates/IMPLEMENTATION_DOC_TEMPLATE.md +13 -5
- package/assets/templates/RELEASE_TEMPLATE.md +8 -1
- package/assets/templates/REVIEW_TEMPLATE.md +9 -1
- package/assets/templates/RFC_TEMPLATE.md +8 -1
- package/assets/templates/TEST_CASES_TEMPLATE.md +24 -0
- package/assets/templates/TEST_REPORT_TEMPLATE.md +41 -0
- package/assets/templates/TEST_STRATEGY_TEMPLATE.md +27 -0
- package/dist/lib/sync-engine.js +1 -1
- package/dist/lib/validators.js +262 -17
- package/package.json +1 -1
- package/assets/templates/TEST_PLAN_TEMPLATE.md +0 -29
|
@@ -7,17 +7,19 @@ description: Use during TESTING to produce a test matrix, run regression, and do
|
|
|
7
7
|
|
|
8
8
|
## 目的
|
|
9
9
|
|
|
10
|
-
把 PRD、技术方案、实现事实和 Review findings
|
|
10
|
+
把 PRD、技术方案、实现事实和 Review findings 转成可执行测试设计与执行后的回归证据。
|
|
11
11
|
|
|
12
12
|
## 角色提示词
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
你是测试负责人,目标是把需求、风险和实现变化转成可执行、可追踪、可复用的测试产物。必须严格区分三类文档:`TEST_STRATEGY.md` 描述范围、环境、优先级和执行策略;`TEST_CASES.md` 描述要测什么、前置条件、步骤和预期结果;`TEST_REPORT.md` 只记录 TESTING 阶段实际执行后的结果、证据、覆盖缺口和最终结论。不要把测试用例、测试计划或待填报告命名为 `TEST_REPORT.md`。
|
|
15
15
|
|
|
16
16
|
开始测试规划前,先建立映射关系:PRD acceptance criteria、技术方案关键接口/数据模型、implementation doc 的真实改动、Review findings 和现有测试。对每个测试项说明它覆盖的需求或风险;对暂不覆盖的内容说明原因、残余风险和 follow-up。
|
|
17
17
|
|
|
18
|
-
执行回归时,优先选择能证明阶段出口的 gate
|
|
18
|
+
执行回归时,优先选择能证明阶段出口的 gate。测试无法运行、环境缺失或数据不可得时,不要宣布通过;如果已经进入 TESTING,应在 `TEST_REPORT.md` 中记录 `BLOCKED`、已完成检查和恢复条件。
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
TESTING 只能调用 SPRINTING 已经交付的入口做输入/输出验证。可以补充测试、fixture、mock、assertion helper 和测试文档,但不能在 TESTING 中新增或长期维护 product runtime、server/API/CLI/adapter、direct poller、cloud bootstrap、systemd unit、真实 provider adapter、package runtime script 或部署脚本。如果发现真实入口/出口不存在、live 模式不可调用、配置契约缺失或用户目标与已实现通道不一致,应记录 `BLOCKED`、生成 RFC 或后续 dev task 建议,并停止把测试阶段扩大成开发/集成搭建。开发尚未交付可测试 entry/exit 时,不要在 `.docs/07_test/**` 提前生成正式测试用例或正式报告;验收思路应留在 PRD acceptance criteria、tech plan verification strategy 或非 `.docs/07_test/**` 的草稿说明里。
|
|
21
|
+
|
|
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 的旧测试结果。
|
|
21
23
|
|
|
22
24
|
如果用户明确要求并行、多 agent 或多 worktree,测试阶段可以启用 `parallel_execution`,让 worker 分别执行互不依赖的回归片区、smoke、兼容性或风险验证。worker 只提交证据和必要的 scoped test changes;最终 `.docs/07_test/**`、coverage gaps、PASS/BLOCKED 决策和阶段 gate 由主 Agent 汇总。没有用户显式要求时,测试 workflow 保持串行。
|
|
23
25
|
|
|
@@ -29,22 +31,27 @@ description: Use during TESTING to produce a test matrix, run regression, and do
|
|
|
29
31
|
- `.docs/04_implementation/`
|
|
30
32
|
- `.docs/06_review/REVIEW_REPORT.md`
|
|
31
33
|
- 现有测试
|
|
32
|
-
- `<harnessRoot>/pjsdlc_managed/templates/
|
|
34
|
+
- `<harnessRoot>/pjsdlc_managed/templates/TEST_STRATEGY_TEMPLATE.md`
|
|
35
|
+
- `<harnessRoot>/pjsdlc_managed/templates/TEST_CASES_TEMPLATE.md`
|
|
36
|
+
- `<harnessRoot>/pjsdlc_managed/templates/TEST_REPORT_TEMPLATE.md`
|
|
33
37
|
|
|
34
38
|
## 输出
|
|
35
39
|
|
|
36
|
-
- `.docs/07_test/
|
|
40
|
+
- `.docs/07_test/TEST_STRATEGY.md`(可选,仅在 TESTING 中生成)
|
|
41
|
+
- `.docs/07_test/TEST_CASES.md`(可选,仅在 TESTING 中绑定真实 entry/exit 后生成)
|
|
42
|
+
- `.docs/07_test/TEST_REPORT.md`(执行后必备)
|
|
37
43
|
- 必要时在 `tests/` 下补充测试
|
|
38
44
|
- 更新后的 `<harnessRoot>/state/plan.yaml`
|
|
39
|
-
-
|
|
45
|
+
- 回归证据记录
|
|
40
46
|
- 覆盖缺口清单
|
|
47
|
+
- `BLOCKED` 时的 RFC/dev follow-up 建议和恢复条件
|
|
41
48
|
|
|
42
49
|
## 语义切片
|
|
43
50
|
|
|
44
|
-
- `.docs/07_test/`
|
|
51
|
+
- `.docs/07_test/` 默认按测试策略、测试用例、执行报告、回归批次或领域测试范围切片。
|
|
45
52
|
- Test matrix 的语义原子是 PRD acceptance criteria、Review findings 和关键风险路径。
|
|
46
|
-
- 如果多个领域的测试范围互不依赖,应拆成多个
|
|
47
|
-
- 如果新增测试只是覆盖同一验收标准,应更新原 test slice
|
|
53
|
+
- 如果多个领域的测试范围互不依赖,应拆成多个 strategy/cases/evidence slices,并在主 `TEST_REPORT.md` 汇总实际执行结论。
|
|
54
|
+
- 如果新增测试只是覆盖同一验收标准,应更新原 test slice,不要创建重复测试报告;测试报告只能在有实际执行证据后更新。
|
|
48
55
|
- 每次新增、拆分或合并 test slice 后,都要更新 `.docs/INDEX.md`。
|
|
49
56
|
|
|
50
57
|
## Plan Protocol
|
|
@@ -53,19 +60,24 @@ description: Use during TESTING to produce a test matrix, run regression, and do
|
|
|
53
60
|
|
|
54
61
|
1. 没有 open task 时,先创建一个最小 `TASK-*` task,设置 `phase: "TESTING"` 和 `current_task_id`。
|
|
55
62
|
2. open task 必须包含 `phase`、`docs`、`allowed_paths`、`required_gates`、`acceptance_criteria` 和 `result_docs`;`result_docs` 指向本 task 计划产出的 `.docs/07_test/**` 文件,必要时也列出 scoped test files。
|
|
56
|
-
3. 单个 task
|
|
63
|
+
3. 单个 task 的目标应足够小:一个测试策略 slice、一个测试用例 slice、一个回归批次、一个风险验证片区,或一组紧密相关的测试变更。
|
|
57
64
|
4. 执行当前 task 时只编辑 `allowed_paths` 中的测试、测试文档、`.docs/INDEX.md`、overview 和 `plan.yaml`。
|
|
58
65
|
5. 完成后运行 `make validate-plan` 和 task required gates;阶段出口前运行 `make validate-test`。
|
|
59
66
|
6. task 完成后从 `plan.yaml.tasks` 移除;如果还有 pending testing task,下一轮 `/test` 或 `/next` 再继续。
|
|
60
67
|
|
|
61
68
|
## 规则
|
|
62
69
|
|
|
63
|
-
1. 测试用例必须追溯到 PRD acceptance criteria 或 Review findings。
|
|
70
|
+
1. 测试用例必须追溯到 PRD acceptance criteria 或 Review findings,并绑定 SPRINTING/REVIEWING 已确认的 runnable entry/exit。
|
|
64
71
|
2. 根据风险补充边界、负向、回归和集成测试。
|
|
65
72
|
3. 如果有意延后覆盖,必须记录风险和 follow-up。
|
|
66
|
-
4.
|
|
67
|
-
5.
|
|
68
|
-
6.
|
|
73
|
+
4. 不得新增 product runtime、server/API/CLI/adapter、poller、cloud bootstrap、systemd unit、真实 provider adapter、package runtime script 或部署脚本;这些属于 SPRINTING/RFC。
|
|
74
|
+
5. 测试发现入口/出口缺失时,Final decision 必须为 `BLOCKED`,并指出回到 SPRINTING/RFC 的具体条件。
|
|
75
|
+
6. 新测试策略使用 `.docs/07_test/TEST_STRATEGY.md`,新测试用例使用 `.docs/07_test/TEST_CASES.md`,执行报告使用 `.docs/07_test/TEST_REPORT.md`;不要新建或继续依赖 `.docs/07_test/TEST_PLAN.md`。
|
|
76
|
+
7. `TEST_REPORT.md` 不得包含 `pending`、`TBD`、`待填`、`TODO` 或占位结论;未执行或不可执行时 Final decision 必须为 `BLOCKED` 并给出恢复条件。
|
|
77
|
+
8. RFC 改变技术路线、entry/exit 或验收边界后,必须确认 `.docs/07_test/**` 中旧路线测试证据已删除或不再从 `.docs/INDEX.md` 暴露。
|
|
78
|
+
9. 并行测试必须使用 `parallel_execution.trigger: "user_requested"`;`runtime_managed` 只在当前 runtime 支持 subagent 时使用,否则输出 `user_orchestrated` worker prompt。
|
|
79
|
+
10. 宣布阶段完成前运行 `make test-all`。
|
|
80
|
+
11. 测试阶段一次只执行一个 `TASK-*` task。
|
|
69
81
|
|
|
70
82
|
## 完成检查
|
|
71
83
|
|
|
@@ -73,7 +85,10 @@ description: Use during TESTING to produce a test matrix, run regression, and do
|
|
|
73
85
|
- [ ] 当前测试工作已绑定 `plan.yaml` 中一个最小 `TASK-*` task,并设置 `phase: "TESTING"`。
|
|
74
86
|
- [ ] 当前 task 已从 `plan.yaml` 移除,或因中断/blocker 保留为可恢复 open task。
|
|
75
87
|
- [ ] Regression checklist 已完成。
|
|
76
|
-
- [ ]
|
|
88
|
+
- [ ] 测试只调用既有 runnable entry/exit;未在 TESTING 中新增 product runtime、bootstrap、provider adapter、deploy 或 package runtime script。
|
|
89
|
+
- [ ] 已判断 test report / test matrix 的语义切片边界。
|
|
90
|
+
- [ ] 未把测试计划、测试用例或待填内容写成 `TEST_REPORT.md`。
|
|
91
|
+
- [ ] 已确认 `.docs/07_test/**` 只包含当前方案仍有效的测试事实。
|
|
77
92
|
- [ ] Coverage gaps 已明确。
|
|
78
93
|
- [ ] 如果启用了并行测试,worker evidence 已由主 Agent 汇总到测试产物。
|
|
79
94
|
- [ ] 已运行 `make docs-overview` 刷新 `.docs/<stage>/overview.md`。
|
|
@@ -32,7 +32,15 @@ Input
|
|
|
32
32
|
-> Output
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
## 5.
|
|
35
|
+
## 5. Runnable Entry/Exit(可运行入口/出口)
|
|
36
|
+
|
|
37
|
+
- Entry points:
|
|
38
|
+
- Exit / side effects:
|
|
39
|
+
- Config contract:
|
|
40
|
+
- Fixture/live boundary:
|
|
41
|
+
- Missing runtime boundaries:
|
|
42
|
+
|
|
43
|
+
## 6. 关键实现逻辑
|
|
36
44
|
|
|
37
45
|
- 输入校验(Input validation):
|
|
38
46
|
- 核心分支(Core branches):
|
|
@@ -40,22 +48,22 @@ Input
|
|
|
40
48
|
- 边界兜底(Boundary fallback):
|
|
41
49
|
- 性能或并发注意事项(Performance or concurrency notes):
|
|
42
50
|
|
|
43
|
-
##
|
|
51
|
+
## 7. 与技术方案的偏移
|
|
44
52
|
|
|
45
53
|
-
|
|
46
54
|
|
|
47
|
-
##
|
|
55
|
+
## 8. 测试覆盖(Test Coverage)
|
|
48
56
|
|
|
49
57
|
| 测试(Test) | 覆盖范围(Coverage) | 结果(Result) |
|
|
50
58
|
|---|---|---|
|
|
51
59
|
| | | |
|
|
52
60
|
|
|
53
|
-
##
|
|
61
|
+
## 9. 变更记录(Change Log)
|
|
54
62
|
|
|
55
63
|
| 日期(Date) | Task ID | Commit | 摘要(Summary) |
|
|
56
64
|
|---|---|---|---|
|
|
57
65
|
| | | | |
|
|
58
66
|
|
|
59
|
-
##
|
|
67
|
+
## 10. 后续维护注意事项
|
|
60
68
|
|
|
61
69
|
-
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# Release
|
|
1
|
+
# Current Release Status(当前发布状态)
|
|
2
|
+
|
|
3
|
+
本文件是 `.docs/08_release/CURRENT_RELEASE.md` 的模板。每次发布更新当前状态;历史发布证据通过 git tag、npm registry、CI、release commit 或外部发布系统追溯。
|
|
2
4
|
|
|
3
5
|
## 1. Release Summary(发布摘要)
|
|
4
6
|
|
|
@@ -6,6 +8,7 @@
|
|
|
6
8
|
- Milestone:
|
|
7
9
|
- Date:
|
|
8
10
|
- Owner:
|
|
11
|
+
- Status:
|
|
9
12
|
|
|
10
13
|
## 2. Included Changes(包含变更)
|
|
11
14
|
|
|
@@ -32,3 +35,7 @@
|
|
|
32
35
|
- 步骤(Steps):
|
|
33
36
|
- 数据注意事项(Data considerations):
|
|
34
37
|
- 负责人(Owner):
|
|
38
|
+
|
|
39
|
+
## 7. Known Issues(已知限制)
|
|
40
|
+
|
|
41
|
+
-
|
|
@@ -25,7 +25,15 @@
|
|
|
25
25
|
|
|
26
26
|
-
|
|
27
27
|
|
|
28
|
-
## 6.
|
|
28
|
+
## 6. Runnable Entry/Exit Readiness(可运行入口/出口)
|
|
29
|
+
|
|
30
|
+
- Entry points:
|
|
31
|
+
- Exit / side effects:
|
|
32
|
+
- Config contract:
|
|
33
|
+
- Fixture/live boundary:
|
|
34
|
+
- Blocking gaps before TESTING:
|
|
35
|
+
|
|
36
|
+
## 7. Gate Result(阶段结论)
|
|
29
37
|
|
|
30
38
|
- Decision: `PASS` / `BLOCKED`
|
|
31
39
|
- Required before testing:
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Test Cases(测试用例)
|
|
2
|
+
|
|
3
|
+
## 1. Scope(范围)
|
|
4
|
+
|
|
5
|
+
- PRD:
|
|
6
|
+
- Technical design:
|
|
7
|
+
- Runnable entry/exit under test:
|
|
8
|
+
|
|
9
|
+
## 2. Cases(用例)
|
|
10
|
+
|
|
11
|
+
| ID | Requirement | Preconditions | Steps | Expected Result |
|
|
12
|
+
|---|---|---|---|---|
|
|
13
|
+
| TC-001 | | | | |
|
|
14
|
+
|
|
15
|
+
## 3. Traceability(追溯)
|
|
16
|
+
|
|
17
|
+
- PRD acceptance criteria:
|
|
18
|
+
- Review findings:
|
|
19
|
+
- Risk paths:
|
|
20
|
+
|
|
21
|
+
## 4. Notes(备注)
|
|
22
|
+
|
|
23
|
+
- Fixture/live boundary:
|
|
24
|
+
- Data setup:
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Test Report(测试报告)
|
|
2
|
+
|
|
3
|
+
> `TEST_REPORT.md` 只记录 TESTING 阶段已经执行过的验证。测试计划、测试策略或待填内容请使用 `TEST_STRATEGY.md` / `TEST_CASES.md`,不要放在本文件。
|
|
4
|
+
|
|
5
|
+
## 1. Scope(范围)
|
|
6
|
+
|
|
7
|
+
- PRD:
|
|
8
|
+
- Technical design:
|
|
9
|
+
- Implementation docs:
|
|
10
|
+
- Review report:
|
|
11
|
+
- Executed at:
|
|
12
|
+
|
|
13
|
+
## 2. Test Matrix(测试矩阵)
|
|
14
|
+
|
|
15
|
+
| 需求(Requirement) | 场景(Scenario) | 测试类型(Test Type) | 测试用例(Test Case) | 结果(Result) |
|
|
16
|
+
|---|---|---|---|---|
|
|
17
|
+
| | | unit/integration/e2e/regression | | PASS/BLOCKED |
|
|
18
|
+
|
|
19
|
+
## 3. Regression Evidence(回归证据)
|
|
20
|
+
|
|
21
|
+
-
|
|
22
|
+
|
|
23
|
+
## 4. Runnable Entry/Exit Coverage(可运行入口/出口覆盖)
|
|
24
|
+
|
|
25
|
+
- Existing entry points under test:
|
|
26
|
+
- Expected exits / side effects:
|
|
27
|
+
- Config contract used:
|
|
28
|
+
- Fixture/live boundary:
|
|
29
|
+
- Missing entry/exit blocker:
|
|
30
|
+
|
|
31
|
+
## 5. Coverage Gaps(覆盖缺口)
|
|
32
|
+
|
|
33
|
+
| 缺口(Gap) | 风险(Risk) | 后续动作(Follow-up) |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| | | |
|
|
36
|
+
|
|
37
|
+
## 6. Final Decision(最终结论)
|
|
38
|
+
|
|
39
|
+
- Decision: `PASS` / `BLOCKED`
|
|
40
|
+
- Evidence:
|
|
41
|
+
- Recovery condition when `BLOCKED`:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Test Strategy(测试策略)
|
|
2
|
+
|
|
3
|
+
## 1. Scope(范围)
|
|
4
|
+
|
|
5
|
+
- In scope:
|
|
6
|
+
- Out of scope:
|
|
7
|
+
- Target release/module:
|
|
8
|
+
|
|
9
|
+
## 2. Environment(环境)
|
|
10
|
+
|
|
11
|
+
- Runnable entry points:
|
|
12
|
+
- Expected exits / side effects:
|
|
13
|
+
- Config contract:
|
|
14
|
+
- Fixture/live boundary:
|
|
15
|
+
|
|
16
|
+
## 3. Priority(优先级)
|
|
17
|
+
|
|
18
|
+
| Area | Priority | Reason |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| | P0/P1/P2 | |
|
|
21
|
+
|
|
22
|
+
## 4. Execution Strategy(执行策略)
|
|
23
|
+
|
|
24
|
+
- Automated checks:
|
|
25
|
+
- Manual checks:
|
|
26
|
+
- Regression gates:
|
|
27
|
+
- Blocker handling:
|
package/dist/lib/sync-engine.js
CHANGED
|
@@ -300,7 +300,7 @@ function renderSkillWithOverride(baseContent, override) {
|
|
|
300
300
|
"",
|
|
301
301
|
`${guidance} Keep package-managed Skill files unchanged; edit the override source instead.`,
|
|
302
302
|
"",
|
|
303
|
-
"After sync, review the merged Skill for semantic conflicts between the package base and local override, especially phase boundaries, `allowed_paths`, `required_gates`, commit/release rules and completion checks.",
|
|
303
|
+
"After sync, review the merged Skill for semantic conflicts between the package base and local override, especially phase boundaries, `allowed_paths`, `required_gates`, commit/release rules and completion checks. Package-managed phase boundaries stay authoritative; overrides may narrow local behavior but must not expand TESTING, REVIEWING or other roles into implementation/runtime ownership.",
|
|
304
304
|
""
|
|
305
305
|
].join("\n");
|
|
306
306
|
return `${renderedBase.trimEnd()}${header}\n${override.content.trim()}\n`;
|