@peterxiaoyang/superspec 0.1.51 → 0.1.52
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/dist/record.js +3 -3
- package/package.json +1 -1
- package/templates/workflow/agents/architect.toml +2 -1
- package/templates/workflow/agents/code-reviewer.toml +2 -1
- package/templates/workflow/agents/critic.toml +1 -0
- package/templates/workflow/agents/executor.toml +1 -0
- package/templates/workflow/agents/explore.toml +1 -0
- package/templates/workflow/agents/test-engineer.toml +1 -0
- package/templates/workflow/agents/test-runner.toml +1 -0
- package/templates/workflow/agents/verifier.toml +2 -1
- package/templates/workflow/prompts/code-reviewer.md +2 -1
- package/templates/workflow/skills/superspec-apply/SKILL.md +1 -1
package/dist/record.js
CHANGED
|
@@ -72,9 +72,9 @@ function previousRejectionInstruction(job) {
|
|
|
72
72
|
return `${reason}上一轮没有可复核的历史 finding;请按当前 gate 的完整范围独立审查,不要把拒绝原因当作需求或验收标准,`;
|
|
73
73
|
}
|
|
74
74
|
const identityRule = job.role === "code-reviewer"
|
|
75
|
-
? "逐项核对修复 task 的代码变化、scope_note 和验证证据;实现者用可核实证据说明被质疑实现确有必要时,独立验证后关闭原问题。证据不能支撑必要性且问题仍存在时复用原 finding ID;legacy finding 没有 ID 时沿用原始语义并补一个稳定 ID
|
|
75
|
+
? "逐项核对修复 task 的代码变化、scope_note 和验证证据;实现者用可核实证据说明被质疑实现确有必要时,独立验证后关闭原问题。证据不能支撑必要性且问题仍存在时复用原 finding ID;legacy finding 没有 ID 时沿用原始语义并补一个稳定 ID;同一批准行为的直接消费者若因本次修正暴露出新的遗漏,可以提出新的稳定 finding,但必须给出修正变化或直接消费者链路的因果证据;"
|
|
76
76
|
: "已解决或已由等价证据闭环的问题不要重复报告,不得通过更换标题或措辞重复同一问题;";
|
|
77
|
-
return `${reason}本轮是修复复核:逐项判断本工作项附带的上一次同角色 finding 是否仍成立。Finding 中的 recommendation 只是非绑定建议,不是需求或验收标准;先独立核对 underlying problem、直接证据和本次验收,不得因原建议指定了某种架构就要求照做。修正不得通过缩小已确认范围、改写用户决定或删除验收来让 finding 字面消失;这类偏离属于本次修正直接引入的回归。${identityRule}
|
|
77
|
+
return `${reason}本轮是修复复核:逐项判断本工作项附带的上一次同角色 finding 是否仍成立。Finding 中的 recommendation 只是非绑定建议,不是需求或验收标准;先独立核对 underlying problem、直接证据和本次验收,不得因原建议指定了某种架构就要求照做。修正不得通过缩小已确认范围、改写用户决定或删除验收来让 finding 字面消失;这类偏离属于本次修正直接引入的回归。${identityRule}默认围绕历史 finding 及其直接影响链路复核;新 blocker 必须能说明“本次修正或同一批准行为 → 当前问题”的因果链,不得展开无关的故障模型、消费者或架构议题。`;
|
|
78
78
|
}
|
|
79
79
|
function reviewScopeForJob(job) {
|
|
80
80
|
if (job.review_targets !== undefined || job.read_only_refs !== undefined) {
|
|
@@ -1237,7 +1237,7 @@ export function jobsPacket(projectRoot, change, jobId) {
|
|
|
1237
1237
|
? `格式骨架:{"role":"code-reviewer","verdict":"pass","review_scope":{"job_id":"${job.job_id}","packet_digest":"${job.packet_digest}","checked_paths":[],"checked_docs":[],"unchecked":[]},"findings":[],"reviewer":{"kind":"codex-subagent","id":"<thread-or-agent-id>"}}。提交前按真实审查结果填写数组;不得从 boundFiles 自动复制 checked_paths。verdict 只能为 pass 或 fail;审查覆盖范围(review_scope)用来说明本次审查覆盖了哪些文件和文档,已检查路径(checked_paths)与未检查项(unchecked)必须合起来覆盖全部绑定文件(boundFiles),unchecked 条目格式为 {"path":"<path>","reason":"<reason>"};pass 不允许仍有未检查的绑定文件。`
|
|
1238
1238
|
+ `报告结论为 fail 时,问题列表(findings)至少包含一个可处理、可追溯的阻塞问题,字段为 {"id":"<stable-id>","blocking":true,"type":"implementation|spec|mixed","description":"<what>","evidence":"<why>","source_refs":["<path:line>"],"impact":"<impact>","suggested_action":"apply|propose"}。问题类型(type)中 implementation 表示纯代码实现问题,spec 表示方案/需求文档问题,mixed 表示需要使用者判断的混合问题。`
|
|
1239
1239
|
+ (packetContext?.task_execution_index
|
|
1240
|
-
? `本工作项带任务执行索引(task_execution_index):按 task 对照其执行依据快照(contract)审查——实现路线对照 design 引用原文、累计 diff 对照 guard 边界、测试断言对照 tests 声明的 scenario;每项的 required_evidence 是 task-start 冻结的证据口径,red_required/green_required 分别说明是否需要 RED/GREEN;fix 非空表示状态机创建的实现修复,source、parent_task_id 和 reason 说明其归属,code_review 来源还需核对 review_finding;scope_note 既可能解释必要的范围扩大,也可能说明代码审查修复为何保留原实现,均需结合 Diff、调用链和验证证据独立判断;changed_paths 是归属线索不是结论(null 表示未知);unattributed_paths 中的无主改动逐个判断合理性;coverage_exemption_refs 解释未绑定 task 的 TEST
|
|
1240
|
+
? `本工作项带任务执行索引(task_execution_index):按 task 对照其执行依据快照(contract)审查——实现路线对照 design 引用原文、累计 diff 对照 guard 边界、测试断言对照 tests 声明的 scenario;每项的 required_evidence 是 task-start 冻结的证据口径,red_required/green_required 分别说明是否需要 RED/GREEN;fix 非空表示状态机创建的实现修复,source、parent_task_id 和 reason 说明其归属,code_review 来源还需核对 review_finding;scope_note 既可能解释必要的范围扩大,也可能说明代码审查修复为何保留原实现,均需结合 Diff、调用链和验证证据独立判断;changed_paths 是归属线索不是结论(null 表示未知);unattributed_paths 中的无主改动逐个判断合理性;coverage_exemption_refs 解释未绑定 task 的 TEST 豁免。当前 packet 的 boundFiles 是本轮冻结的审查范围;若它来自前一轮审查后的增量,只复核本轮变化及其直接影响链路,不要求重复审查未变化文件,但仍要判断批准行为是否完整闭合。`
|
|
1241
1241
|
: "")
|
|
1242
1242
|
: job.role === "verifier"
|
|
1243
1243
|
? `最小格式:{"role":"verifier","verdict":"pass","findings":[]${hasReviewScope ? `,"review_scope":{"checked_paths":${JSON.stringify(job.boundFiles.map(file => file.path))}}` : ""}}。verdict 只能为 pass 或 fail;核对代码审查记录(code_review_gate):passed 必须能追溯到已接受的代码审查工作项,skipped 必须能证明本次没有代码类改动。核对修复闭环:task_execution_index.fix.source=code_review 时必须核对 review_finding 对应问题是否关闭;source=self_test 时必须核对 parent_task_id、记录的自测原因、本次 attempt 验证和最新代码审查是否共同闭环。方案/混合问题必须有用户决策或后续修复证据。按 task_execution_index 的 required_evidence 核对测试证据:red_required 时需要同一 TEST 的 RED(expected_failure)后 GREEN;green_required 时每个声明 TEST 都需要允许的 GREEN 语义状态;测试运行证据应包含测试 ID(test_id)、命令(command)、工作目录(cwd)、退出码(exit_code)、语义状态(semantic_status)。修复 task 的回归测试运行可用回归覆盖任务列表(covers_task_ids)说明覆盖了哪些已完成任务;缺少任务尝试 ID(attempt_id)的旧证据只能弱引用。` +
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SuperSpec Codex agent: architect
|
|
2
2
|
name = "architect"
|
|
3
3
|
description = "System design, boundaries, interfaces, long-horizon tradeoffs"
|
|
4
|
-
|
|
4
|
+
model = "gpt-5.6-sol"
|
|
5
|
+
model_reasoning_effort = "high"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Architect. Review system boundaries, interface contracts, data flow, maintenance risk, rollback risk, and design tradeoffs.
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SuperSpec Codex agent: code-reviewer
|
|
2
2
|
name = "code-reviewer"
|
|
3
3
|
description = "Code-level review for spec fit, bugs, safety, and test gaps"
|
|
4
|
-
|
|
4
|
+
model = "gpt-5.6-sol"
|
|
5
|
+
model_reasoning_effort = "high"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Code Reviewer. Check spec fit, correctness, security, test adequacy, code quality, performance, and maintainability without making the workflow heavy.
|
|
7
8
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SuperSpec Codex agent: critic
|
|
2
2
|
name = "critic"
|
|
3
3
|
description = "Plan/design critical challenge and review"
|
|
4
|
+
model = "gpt-5.6-sol"
|
|
4
5
|
model_reasoning_effort = "medium"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Critic. Challenge demand clarification, plans, designs, implementations, and verification claims with source-backed skepticism.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SuperSpec Codex agent: executor
|
|
2
2
|
name = "executor"
|
|
3
3
|
description = "Bounded SuperSpec apply implementation worker"
|
|
4
|
+
model = "gpt-5.6-terra"
|
|
4
5
|
model_reasoning_effort = "medium"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Executor. Implement exactly one SuperSpec apply task from the current task instructions.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SuperSpec Codex agent: explore
|
|
2
2
|
name = "explore"
|
|
3
3
|
description = "Repo-local read-only factual scan for SuperSpec discovery"
|
|
4
|
+
model = "gpt-5.6-terra"
|
|
4
5
|
model_reasoning_effort = "medium"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Explore. Map repo-local implementation facts, source anchors, hidden contracts, and missing discovery coverage.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SuperSpec Codex agent: test-engineer
|
|
2
2
|
name = "test-engineer"
|
|
3
3
|
description = "Test strategy, coverage, flaky-test hardening"
|
|
4
|
+
model = "gpt-5.6-sol"
|
|
4
5
|
model_reasoning_effort = "medium"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Test Engineer. Review test strategy, coverage, RED/GREEN credibility, flaky-test risk, and acceptance mapping.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SuperSpec Codex agent: test-runner
|
|
2
2
|
name = "test-runner"
|
|
3
3
|
description = "Bounded SuperSpec apply test execution worker"
|
|
4
|
+
model = "gpt-5.6-terra"
|
|
4
5
|
model_reasoning_effort = "medium"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Test Runner. Execute exactly one SuperSpec apply test phase from the current task instructions and report an evidence candidate.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# SuperSpec Codex agent: verifier
|
|
2
2
|
name = "verifier"
|
|
3
3
|
description = "Completion evidence, claim validation, test adequacy"
|
|
4
|
-
|
|
4
|
+
model = "gpt-5.6-sol"
|
|
5
|
+
model_reasoning_effort = "high"
|
|
5
6
|
developer_instructions = """
|
|
6
7
|
Role: Verifier. Prove or disprove completion claims with reproducible evidence; missing evidence is not a pass.
|
|
7
8
|
|
|
@@ -13,7 +13,7 @@ argument-hint: "本次代码审查说明"
|
|
|
13
13
|
|
|
14
14
|
- 先读任务说明、指定代码范围和相关计划材料;范围和停止条件以任务说明为准。不要把未打开的材料当作审查依据。
|
|
15
15
|
- 只读;不实现修复、不修改计划或证据、不自行宣布完成。上下文不足时明确指出缺口。
|
|
16
|
-
-
|
|
16
|
+
- 修复复核优先关闭原问题,并审查本次变化及其直接影响链路。此前漏报的问题只有在当前代码中存在直接证据、影响既定验收或兼容边界,并且能够与本次修复或同一批准行为的直接消费者建立因果关系时,才能成为新 blocker;不要重新打开与本次修复无关、未变化的模块。
|
|
17
17
|
|
|
18
18
|
## 审查判断
|
|
19
19
|
|
|
@@ -24,6 +24,7 @@ argument-hint: "本次代码审查说明"
|
|
|
24
24
|
- 实现是否兑现当前任务的验收和边界,且与已批准的方案/规格一致。
|
|
25
25
|
- 是否引入功能、数据、一致性、安全、权限、性能或兼容问题,以及直接的边界条件遗漏。
|
|
26
26
|
- 从批准范围反查实现是否覆盖已确认的消费者、兼容路径和直接影响链路;任务勾选和测试通过不能替代完整性判断。
|
|
27
|
+
- 对当前审查范围内的 Diff,分别判断“是否漏实现”和“是否超出必要范围”:直接消费者没有实现或没有现有实现已满足验收的证据,属于完整性问题;新增共享语义、公共契约或无关生产逻辑没有直接必要性证据,属于范围问题。两者都应锚定当前批准行为和实际 Diff,不把消费者类别或可能性清单当成覆盖义务。
|
|
27
28
|
- 从实际 Diff 反查每项语义变化是否为当前验收所需。文件数量、新增方法或重载本身不是问题;若公共契约、共享行为或无关生产逻辑被扩大,而现有证据不能说明局部方案为何无法安全、完整地满足验收,应作为纯实现问题交回 Apply 收缩。
|
|
28
29
|
- 测试是否实际证明相关行为和直接回归风险,而非只存在一条通过记录。
|
|
29
30
|
- 需求源已更新时,代码是否仍在执行过期计划;此类问题按方案或需求缺口归因,不把旧材料当作当前依据。
|
|
@@ -31,7 +31,7 @@ metadata:
|
|
|
31
31
|
|
|
32
32
|
- 重构、清理或技术调整只有在其本身是兑现当前 task 的必要组成部分时才进入本次交付。
|
|
33
33
|
- 公共契约、共享行为、默认行为或兼容语义的变化需要当前 task 和真实调用链支持,并验证直接受影响的既有行为;局部实现已能完整满足验收时,保持公共边界稳定。
|
|
34
|
-
-
|
|
34
|
+
- 整体差异应能从已批准行为追溯到真实消费者:每个直接受影响的消费者都应有必要的实现变化,或有仓库事实证明现有实现已经满足验收。影响面最小不能以遗漏需求或验收路径为代价,也不要求为了“覆盖”而扩展到没有直接因果关系的模块。
|
|
35
35
|
|
|
36
36
|
### 保留得住的测试
|
|
37
37
|
|