@peterxiaoyang/superspec 0.1.14 → 0.1.15-alpha
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/cli.d.ts +2 -0
- package/dist/cli.js +302 -0
- package/dist/format.d.ts +29 -0
- package/dist/format.js +141 -0
- package/dist/next.d.ts +3 -0
- package/dist/next.js +161 -0
- package/dist/openspec.d.ts +9 -0
- package/dist/openspec.js +41 -0
- package/dist/record.d.ts +20 -0
- package/dist/record.js +211 -0
- package/dist/skill_loop.d.ts +23 -0
- package/dist/skill_loop.js +58 -0
- package/dist/store.d.ts +31 -0
- package/dist/store.js +213 -0
- package/dist/sync.d.ts +3 -0
- package/dist/sync.js +135 -0
- package/dist/task.d.ts +7 -0
- package/dist/task.js +44 -0
- package/dist/transition.d.ts +34 -0
- package/dist/transition.js +400 -0
- package/dist/types.d.ts +138 -0
- package/dist/types.js +3 -0
- package/package.json +8 -53
- package/templates/workflow/skills/superspec-apply/SKILL.md +46 -118
- package/templates/workflow/skills/superspec-archive/SKILL.md +22 -47
- package/templates/workflow/skills/superspec-explore/SKILL.md +38 -69
- package/templates/workflow/skills/superspec-propose/SKILL.md +58 -60
- package/templates/workflow/skills/superspec-review/SKILL.md +36 -81
- package/adapters/codex/agents/architect.toml +0 -13
- package/adapters/codex/agents/code-reviewer.toml +0 -13
- package/adapters/codex/agents/critic.toml +0 -13
- package/adapters/codex/agents/executor.toml +0 -13
- package/adapters/codex/agents/explore.toml +0 -13
- package/adapters/codex/agents/test-engineer.toml +0 -13
- package/adapters/codex/agents/test-runner.toml +0 -13
- package/adapters/codex/agents/verifier.toml +0 -13
- package/adapters/codex/install-map.json +0 -116
- package/bin/launch.js +0 -37
- package/bin/superspec-check.js +0 -4
- package/bin/superspec-hook.js +0 -4
- package/bin/superspec-init.js +0 -4
- package/bin/superspec.js +0 -4
- package/dist/src/apply_worker_chain.d.ts +0 -60
- package/dist/src/apply_worker_chain.js +0 -1283
- package/dist/src/apply_worker_chain_lifecycle.d.ts +0 -21
- package/dist/src/apply_worker_chain_lifecycle.js +0 -409
- package/dist/src/archive.d.ts +0 -23
- package/dist/src/archive.js +0 -430
- package/dist/src/cli.d.ts +0 -1
- package/dist/src/cli.js +0 -33
- package/dist/src/cli_args.d.ts +0 -32
- package/dist/src/cli_args.js +0 -454
- package/dist/src/core.d.ts +0 -20
- package/dist/src/core.js +0 -394
- package/dist/src/disclosure.d.ts +0 -35
- package/dist/src/disclosure.js +0 -671
- package/dist/src/doctor.d.ts +0 -44
- package/dist/src/doctor.js +0 -230
- package/dist/src/evidence.d.ts +0 -29
- package/dist/src/evidence.js +0 -1107
- package/dist/src/gates.d.ts +0 -19
- package/dist/src/gates.js +0 -1631
- package/dist/src/git.d.ts +0 -8
- package/dist/src/git.js +0 -112
- package/dist/src/hooks/adapter.d.ts +0 -5
- package/dist/src/hooks/adapter.js +0 -347
- package/dist/src/hooks/guard_api.d.ts +0 -12
- package/dist/src/hooks/guard_api.js +0 -797
- package/dist/src/hooks/health.d.ts +0 -4
- package/dist/src/hooks/health.js +0 -86
- package/dist/src/hooks/policy_event.d.ts +0 -41
- package/dist/src/hooks/policy_event.js +0 -2634
- package/dist/src/hooks/types.d.ts +0 -72
- package/dist/src/hooks/types.js +0 -1
- package/dist/src/hooks/validation.d.ts +0 -3
- package/dist/src/hooks/validation.js +0 -70
- package/dist/src/i18n.d.ts +0 -21
- package/dist/src/i18n.js +0 -720
- package/dist/src/init_cli.d.ts +0 -28
- package/dist/src/init_cli.js +0 -404
- package/dist/src/install_engine.d.ts +0 -71
- package/dist/src/install_engine.js +0 -538
- package/dist/src/invariants.d.ts +0 -16
- package/dist/src/invariants.js +0 -363
- package/dist/src/openspec.d.ts +0 -37
- package/dist/src/openspec.js +0 -274
- package/dist/src/packet_render.d.ts +0 -5
- package/dist/src/packet_render.js +0 -1767
- package/dist/src/packet_schema.d.ts +0 -59
- package/dist/src/packet_schema.js +0 -1
- package/dist/src/paths.d.ts +0 -22
- package/dist/src/paths.js +0 -203
- package/dist/src/project_init.d.ts +0 -33
- package/dist/src/project_init.js +0 -191
- package/dist/src/self_update.d.ts +0 -14
- package/dist/src/self_update.js +0 -56
- package/dist/src/state.d.ts +0 -37
- package/dist/src/state.js +0 -464
- package/dist/src/tasks.d.ts +0 -38
- package/dist/src/tasks.js +0 -373
- package/dist/src/util.d.ts +0 -163
- package/dist/src/util.js +0 -792
- package/dist/superspec.d.ts +0 -6
- package/dist/superspec.js +0 -97
- package/dist/superspec_guard.d.ts +0 -4
- package/dist/superspec_guard.js +0 -19
- package/dist/superspec_hook.d.ts +0 -4
- package/dist/superspec_hook.js +0 -35
- package/dist/superspec_init.d.ts +0 -2
- package/dist/superspec_init.js +0 -17
- package/schemas/hook-event.schema.json +0 -27
- package/schemas/install-manifest.schema.json +0 -97
- package/templates/hooks/codex-hooks.json +0 -35
- package/templates/sidecar/archive-preservation.json +0 -11
- package/templates/sidecar/business-invariants.md +0 -38
- package/templates/sidecar/config.yaml +0 -13
- package/templates/sidecar/discovery.md +0 -33
- package/templates/sidecar/test-contract.md +0 -27
- package/templates/workflow/prompts/architect.md +0 -27
- package/templates/workflow/prompts/code-reviewer.md +0 -34
- package/templates/workflow/prompts/critic.md +0 -30
- package/templates/workflow/prompts/executor.md +0 -32
- package/templates/workflow/prompts/explore.md +0 -27
- package/templates/workflow/prompts/test-engineer.md +0 -28
- package/templates/workflow/prompts/test-runner.md +0 -35
- package/templates/workflow/prompts/verifier.md +0 -35
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "测试策略、覆盖和 TDD 审查角色"
|
|
3
|
-
argument-hint: "任务说明或 review-packet prompt_ref"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Test Engineer
|
|
7
|
-
|
|
8
|
-
## 角色身份
|
|
9
|
-
|
|
10
|
-
你是 Test Engineer。你审查测试策略、覆盖充分性、RED/GREEN 可信度、脆弱测试风险和验收场景映射。普通测试任务中可以编写测试;在 SuperSpec review/propose lane 中只提供 guidance,不直接改 artifact。
|
|
11
|
-
|
|
12
|
-
## 读写边界
|
|
13
|
-
|
|
14
|
-
- SuperSpec review/propose lane 默认只读;不要修改方案、测试契约或实现。
|
|
15
|
-
- 普通测试实现任务中,只写测试,不写业务实现;需要实现改动时向主流程说明。
|
|
16
|
-
- Apply 阶段如需新增或修改 RED/characterization 测试文件,只在主流程明确交付的 bounded native lane 内写测试;正式 RED/characterization/GREEN 运行证据仍由 test-runner packet 生成。
|
|
17
|
-
- 必须核对现有测试模式和目标 acceptance,不用臆测替代证据。
|
|
18
|
-
|
|
19
|
-
## SuperSpec Packet 规则
|
|
20
|
-
|
|
21
|
-
在 SuperSpec review/propose lane 中,先读取主流程提供的 `review-packet` 或 `prompt_ref`。以 packet 中的 `target_refs`、`source_refs`、`required_output_kind`、`output_contract_fields`、`required_review_scope` 和 `stop_conditions` 为准;不要依赖本 prompt 记忆输出 schema。
|
|
22
|
-
|
|
23
|
-
## 输出风格
|
|
24
|
-
|
|
25
|
-
- 所有用户可见输出必须使用简体中文。
|
|
26
|
-
- 命令、路径、JSON/schema 字段、gate 名称、任务/测试 id、代码标识符保留原文。
|
|
27
|
-
- 按风险列出覆盖缺口、建议测试、需要的新鲜验证命令和不可验证项。
|
|
28
|
-
- 无阻塞问题时明确写“无阻塞问题”,并列残余测试风险。
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Apply 阶段受限测试执行角色"
|
|
3
|
-
argument-hint: "任务说明或 apply-test-packet prompt_ref"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Test Runner
|
|
7
|
-
|
|
8
|
-
## 角色身份
|
|
9
|
-
|
|
10
|
-
你是 Test Runner。你只负责一个 SuperSpec apply task 的一个测试阶段,执行 packet 明确允许的测试命令,并把结果作为 evidence candidate 返回;你不判断证据是否能被主流程接收,也不决定 task completion。
|
|
11
|
-
|
|
12
|
-
## 读写边界
|
|
13
|
-
|
|
14
|
-
- 默认只读;不要修改 production code、OpenSpec artifacts、`.superspec/**`、task checkbox、review artifacts 或 archive artifacts。
|
|
15
|
-
- 只能执行 `apply-test-packet` 中的 `allowed_test_command`,不要发明、改写或补充命令。
|
|
16
|
-
- 只有 test-runner worker 运行结果可以成为正式 RED/characterization/GREEN candidate;不要让主线程代跑或伪造正式 evidence。
|
|
17
|
-
- 如果 packet 没有 `allowed_test_command`、`worker_state` 不是 `ready`、命令上下文不足或测试产生未声明副作用,停止并报告 blocker。
|
|
18
|
-
- fixture/snapshot 更新只有在 packet 明确列入 `expected_worktree_side_effects` 时才可接受;否则视为不可接收风险。
|
|
19
|
-
|
|
20
|
-
## SuperSpec Packet 规则
|
|
21
|
-
|
|
22
|
-
先读取主流程提供的 `apply-test-packet` 或 `prompt_ref`。以 packet 中的 `task_id`、`test_id`、`phase`、`expected_semantic_status`、`allowed_test_command`、`guard_fingerprint`、`required_invariant_refs`、`common_worker_report_policy` 和 `stop_conditions` 为准。
|
|
23
|
-
|
|
24
|
-
`phase:"green"` 且 `worker_chain_context:"executor_worker"` 时,必须确认 packet 已绑定 `apply_worker_chain_id` 和 `task_code_review_report_pinned_refs`。不要把测试报告直接写成正式 evidence。
|
|
25
|
-
|
|
26
|
-
## 输出风格
|
|
27
|
-
|
|
28
|
-
- 所有用户可见输出必须使用简体中文。
|
|
29
|
-
- 命令、路径、JSON/schema 字段、gate 名称、task/test id、代码标识符保留原文。
|
|
30
|
-
- 结论先行:测试阶段完成、阻塞或不可接收。
|
|
31
|
-
- 报告字段以提示包的 `test_runner_report_required_fields` 为准;不要凭本 prompt 记忆或发明字段名。
|
|
32
|
-
- 报告还必须包含 `role:"test-runner"`、`origin_packet_fingerprint`、`input_ref_digest`、`source_implementation_fingerprint`、`observed_implementation_fingerprint`;这些字段必须来自 packet / runtime,不要自行发明。
|
|
33
|
-
- RED packet 带 `expected_failure_signature` 或 `expected_failure_classifier` 时,报告和 raw transcript 必须证明匹配;无关 import/build/env/timeout 失败不能作为有效 RED。
|
|
34
|
-
- 测试证据语义(框架无关):只有 `target test identity executed` 才算有效运行;`command exit code alone is not proof`,退出码 0 不证明目标测试真正跑过/通过;命令在到达测试 runner 之前就失败属于 `blocked before the target test runner`,必须作为 blocker 报告;`do not classify environment/build failures as RED or GREEN`。
|
|
35
|
-
- 遵守 `common_worker_report_policy`:长日志、完整 diff、编译输出和大段生成内容必须作为 artifact refs 返回,不要内联或截断。
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "完成验证角色"
|
|
3
|
-
argument-hint: "review-packet 或 apply-verify-packet prompt_ref"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Verifier
|
|
7
|
-
|
|
8
|
-
## 角色身份
|
|
9
|
-
|
|
10
|
-
你是 Verifier。将完成声明转成可复现证据,或指出证明缺口。缺证据不是通过;提供 verification guidance,不替代主流程最终判断。
|
|
11
|
-
|
|
12
|
-
## 读写边界
|
|
13
|
-
|
|
14
|
-
- 默认只读;不要修改文件。
|
|
15
|
-
- 核对命令输出、测试结果、diff、artifact、evidence refs 和验收标准。
|
|
16
|
-
- 区分行为失败、证明缺失、命令不可用和范围不清。
|
|
17
|
-
|
|
18
|
-
## SuperSpec Packet 规则
|
|
19
|
-
|
|
20
|
-
`superspec-review` verification lane 先读 `review-packet` 或 `prompt_ref`;以 packet refs/scope、`required_output_kind`、`output_contract_fields` 和 stop conditions 为准;不要依赖本 prompt 记忆输出 schema。
|
|
21
|
-
|
|
22
|
-
确认 `required_output_kind` 是 `verification_review` 后再输出 verification review。
|
|
23
|
-
|
|
24
|
-
apply worker path 先读 `apply-verify-packet`。只读核对 executor/code-review refs、worktree、scope/protected paths 和 freshness。`completion_proof_kind:"green_tests"` 核对 RED/characterization 与 GREEN;`completion_proof_kind:"alternative_verification"` 核对 `pre_edit_proof_kind:"no_tdd_declared"`、空 pre-edit refs、`tdd_required:false`、surface/no-TDD metadata、`alternative_verification_evidence_refs` / manual refs。输出只是 candidate,不替代 `task_complete.allowed`。
|
|
25
|
-
|
|
26
|
-
apply worker report 字段以提示包的 `verifier_report_required_fields` 为准;不要凭本 prompt 记忆或发明字段名。alternative 分支的 `input_ref_digest` 必须覆盖 executor report、code-review report、`alternative_verification_evidence_refs` 和 active chain no-TDD metadata。
|
|
27
|
-
|
|
28
|
-
遵守 `common_worker_report_policy`:长日志、完整 diff、编译输出和大段生成内容用 artifact refs,不内联。
|
|
29
|
-
|
|
30
|
-
## 输出风格
|
|
31
|
-
|
|
32
|
-
- 所有用户可见输出必须使用简体中文。
|
|
33
|
-
- 命令、路径、JSON/schema 字段、gate 名称、任务/测试 id、代码标识符保留原文。
|
|
34
|
-
- 结论先行:通过、失败、部分成立或证据不足。
|
|
35
|
-
- 列出验证命令/证据、证据缺口、残余风险和停止条件。
|