@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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superspec-propose
|
|
3
|
-
description: "
|
|
3
|
+
description: "编写计划文档(proposal/specs/design/tasks + 不变量 + 测试契约);通过 transition 推进到 propose_ready。"
|
|
4
4
|
metadata:
|
|
5
5
|
author: SuperSpec
|
|
6
6
|
source: SuperSpec
|
|
@@ -8,87 +8,85 @@ metadata:
|
|
|
8
8
|
|
|
9
9
|
# SuperSpec Propose
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
你是计划阶段。职责:把探索结论转化为可执行的计划——写 proposal.md / specs / design.md / tasks.md + business-invariants.md + test-contract.md。
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- 用户可见文案不得使用“裁决”描述用户动作;统一说“确认”“范围取舍”“处理方式选择”或“用户确认记录”。
|
|
15
|
-
- 不把内部证据种类、reason code、JSON 字段大全直接转述给用户;需要诊断时才引用原文。
|
|
16
|
-
- 普通 workflow 命令使用 `--format agent`;`--format json` 只用于诊断,不作为默认上下文。
|
|
13
|
+
## 驱动方式
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
所有状态由 transition engine 管理。循环:
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
1. `superspec transition next --change "<change>"` 获取下一步
|
|
18
|
+
2. 执行返回的命令
|
|
19
|
+
3. 登记结果
|
|
20
|
+
4. 回到 1
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
next 返回 `required_job` 说明需要审查工作项——跑 `superspec jobs packet` 拿到工作说明,执行审查,`superspec record job-submit --change "<change>" --job <JOB> --report <FILE>`。
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
当前 CLI surface:
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
- 用 `openspec status --change "<change>" --json` 确认 OpenSpec 当前状态。
|
|
27
|
+
- 通过 `openspec instructions <artifact> --change "<change>" --json` 获取 proposal、spec、design、tasks 等 artifact 的写法约束。
|
|
28
|
+
- 基础计划文档齐全后,执行 `superspec transition propose-ready --change "<change>" --risk strict`;`minimal`、`normal`、`strict` 分别控制需要的审查 job 数量。
|
|
29
|
+
- `normal` 至少可能创建 `proposal-auditor`;`strict` 可能创建 `proposal-auditor`、`critic-review`、`architect-review`、`test-engineer-review`。
|
|
30
|
+
- 有 open job 时,用 `superspec jobs packet --change "<change>" --job "<job-id>"` 取包,再用 `superspec record job-submit --change "<change>" --job "<job-id>" --report <report.json>` 提交报告。
|
|
31
|
+
- 不要把 `superspec status` 的 job 计数当 propose 审查真相;以 transition 返回的 required_job 和 job packet 为准。
|
|
32
|
+
- 不要绕过 `openspec instructions` 徒手另造一套 OpenSpec artifact 写法。
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
superspec check workflow-packet --change "<change>" --gate explore_complete --format agent
|
|
31
|
-
```
|
|
34
|
+
## 本阶段做什么
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
### proposal.md
|
|
37
|
+
需求陈述、方案概述、影响范围。
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
### specs/
|
|
40
|
+
OpenSpec 能力规范增量(`openspec instructions specs` 格式)。
|
|
36
41
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- OpenSpec 标准文件必须通过 `openspec instructions` 生成,不要手写绕过:
|
|
42
|
+
### design.md
|
|
43
|
+
技术方案、关键决策、替代方案。
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```
|
|
45
|
+
### tasks.md
|
|
46
|
+
任务列表,格式:
|
|
44
47
|
|
|
45
|
-
|
|
48
|
+
```markdown
|
|
49
|
+
# Tasks
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
- [ ] TASK-001 实现登录功能 tdd_required:true
|
|
52
|
+
- [ ] TASK-002 更新文档 tdd_required:false no_tdd_reason:documentation-only
|
|
53
|
+
- [ ] TASK-003 配置变更 tdd_required:false no_tdd_reason:configuration-only
|
|
54
|
+
```
|
|
48
55
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
4. 辅助文档(`.superspec/artifacts/business-invariants.md`、`.superspec/artifacts/test-contract.md`)如果尚不存在,就按 SuperSpec 内置模板在 change 内 `.superspec/artifacts/` 新建;已存在则基于当前阶段要求更新。
|
|
53
|
-
5. `invariants_reviewed` 的 `workflow-packet` 会下发 `business_invariants_template` 与 `business_invariants_rules`;必须按该骨架直接填写,不得改成段落/列表。
|
|
54
|
-
6. `test_contract_drafted` 的 `workflow-packet` 会下发 `test_contract_template` 与 `test_contract_rules`;必须按该骨架直接填写,不得改成段落/列表。
|
|
55
|
-
7. `business-invariants.md` 的 `## Invariants` / `## Mapping` 和 `test-contract.md` 的 `## 测试覆盖矩阵` 必须保持 Markdown 表格,列名原样保留。
|
|
56
|
+
规则:
|
|
57
|
+
- `tdd_required:true`(默认)——改运行时代码/业务逻辑/数据迁移/权限/外部接口
|
|
58
|
+
- `tdd_required:false` 和 `no_tdd_reason` 必须写在同一条 `TASK-*` 任务行里——纯文档/配置/机械改名/生成物,例如 `no_tdd_reason:documentation-only`
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
### business-invariants.md
|
|
61
|
+
格式:
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
```markdown
|
|
64
|
+
# Business Invariants
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
superspec check workflow-packet --change "<change>" --gate design_complete --format agent
|
|
64
|
-
superspec check workflow-packet --change "<change>" --gate invariants_reviewed --format agent
|
|
65
|
-
superspec check workflow-packet --change "<change>" --gate test_contract_drafted --format agent
|
|
66
|
-
superspec check workflow-packet --change "<change>" --gate test_contract_honored --format agent
|
|
67
|
-
superspec check workflow-packet --change "<change>" --gate tasks_complete --format agent
|
|
68
|
-
superspec check workflow-packet --change "<change>" --gate propose_complete --format agent
|
|
69
|
-
superspec check workflow-packet --change "<change>" --gate apply_ready --format agent
|
|
66
|
+
- INV-001 用户密码必须加密存储
|
|
67
|
+
- INV-002 订单金额不能为负数
|
|
70
68
|
```
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## 专用代理边界
|
|
70
|
+
### test-contract.md
|
|
71
|
+
格式:
|
|
75
72
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- business-invariants 和 test-contract review 使用 repo-local `critic` / `test-engineer`。
|
|
79
|
-
- reviewer prompt 一律由 `review-packet --format prompt` 生成;主线程 digest 输入一律由 `review-packet --role main-thread --format agent` 读取。
|
|
80
|
-
- 第二轮及以后的审查,必须由检查命令把上一轮的问题注入提示,不手写历史 finding 清单。
|
|
73
|
+
```markdown
|
|
74
|
+
# Test Contract
|
|
81
75
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
| test_id | invariant | scenario |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| TEST-001 | INV-001 | 注册时密码被加密 |
|
|
79
|
+
| TEST-002 | INV-002 | 订单金额为负时拒绝 |
|
|
80
|
+
```
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
## 完成条件
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
tasks.md 作为计划文档就绪(不是复选框全完成)+ 基础职责文档齐全 → next 返回 propose-ready 命令。
|
|
89
85
|
|
|
90
|
-
|
|
91
|
-
superspec check workflow-packet --change "<change>" --gate apply_ready --format agent
|
|
92
|
-
```
|
|
86
|
+
## Guardrails
|
|
93
87
|
|
|
94
|
-
|
|
88
|
+
- tasks.md 只列任务,不实现
|
|
89
|
+
- 不改业务代码
|
|
90
|
+
- tdd_required 标注真实
|
|
91
|
+
- 不跳过 transition
|
|
92
|
+
- `boundFiles` 不包含 `specs/**/*.md` 时,不要把该 job 当成 specs 变更的新鲜审查证据
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: superspec-review
|
|
3
|
-
description: "
|
|
3
|
+
description: "执行最终审查,处理 final-audit 工作项,推进到 accept。"
|
|
4
4
|
metadata:
|
|
5
5
|
author: SuperSpec
|
|
6
6
|
source: SuperSpec
|
|
@@ -8,95 +8,50 @@ metadata:
|
|
|
8
8
|
|
|
9
9
|
# SuperSpec Review
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
你是审查阶段。职责:最终审查——验证实现质量、处理最终审查工作项、推进到 accept。
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- 用户可见文案不得使用“裁决”描述用户动作;统一说“确认”“范围取舍”“处理方式选择”或“用户确认记录”。
|
|
15
|
-
- 不把内部证据种类、reason code、JSON 字段大全直接转述给用户;需要诊断时才引用原文。
|
|
16
|
-
- 普通 workflow 命令使用 `--format agent`;`--format json` 只用于诊断,不作为默认上下文。
|
|
13
|
+
## 驱动方式
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
所有状态由 transition engine 管理。循环:
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
1. `superspec transition next --change "<change>"` 获取下一步
|
|
18
|
+
2. 执行返回的命令
|
|
19
|
+
3. 登记结果
|
|
20
|
+
4. 回到 1
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
next 返回 `required_job` 说明需要 final-audit——跑 `superspec jobs packet` 拿工作说明,执行审查,`superspec record job-submit --change "<change>" --job <JOB> --report <FILE>`。
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
当前 CLI surface:
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
- 用 `openspec validate <change>` 验证 OpenSpec artifact。
|
|
27
|
+
- 所有任务完成后执行 `superspec transition review-ready --change "<change>"`。
|
|
28
|
+
- 有 final-audit job 时,用 `superspec jobs packet --change "<change>" --job "<job-id>"` 取包。
|
|
29
|
+
- 审查由 `code-reviewer`、`critic`、`architect`、`verifier` 视角覆盖;报告写入 `<final-audit.json>` 后执行 `superspec record job-submit --change "<change>" --job "<job-id>" --report <final-audit.json>`。
|
|
30
|
+
- final-audit accepted 后,执行 `superspec transition accept --change "<change>"`。
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
superspec check check-init --change "<change>" --format agent
|
|
31
|
-
```
|
|
32
|
+
## 本阶段做什么
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
1. **确认所有任务完成**:review-ready 会检查 tasks.md 无未完成项
|
|
35
|
+
2. **处理 final-audit**:审查 proposal + 实现 + 测试契约一致性
|
|
36
|
+
3. **accept**:`superspec transition accept --change "<change>"`
|
|
34
37
|
|
|
35
|
-
|
|
36
|
-
superspec check check-review-ready --change "<change>" --format agent
|
|
37
|
-
```
|
|
38
|
+
## 当前限制
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
- 当前分支没有 `verify_failure_handling` record surface。
|
|
41
|
+
- 当前分支没有 review -> apply 的返回 transition。
|
|
42
|
+
- 不要对已经终态的旧 job 反复提交新 report。
|
|
43
|
+
- open job 还在时它不会发新 job。
|
|
44
|
+
- 旧 job 才会因为 `boundFiles` 失配被拒绝终态化。
|
|
45
|
+
- 不要指望 report 内容本身能帮你回退。
|
|
46
|
+
- 不绑定源码文件或测试文件的 job,不是源码 / 测试 freshness 证明。
|
|
47
|
+
- 如果这次修复只改了源码或测试,而没改任何 `boundFiles`,当前 engine 没有自动 invalidation 路径。
|
|
48
|
+
- 源码 / 测试-only 修复不能靠旧 job 的 `boundFiles` 失配来解锁。
|
|
49
|
+
- 如果旧 `final-audit` job 已经因为 `boundFiles` 失配或 report 拒绝而进入终态,重新执行 review-ready 获取新的 open job。
|
|
40
50
|
|
|
41
|
-
##
|
|
51
|
+
## Guardrails
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
- `.codex/agents/architect.toml` / `.codex/prompts/architect.md`
|
|
49
|
-
- `.codex/agents/critic.toml` / `.codex/prompts/critic.md`
|
|
50
|
-
- `.codex/agents/verifier.toml` / `.codex/prompts/verifier.md`
|
|
51
|
-
|
|
52
|
-
每个审查提示都先由检查命令产出:
|
|
53
|
-
|
|
54
|
-
```text
|
|
55
|
-
superspec check review-packet --change "<change>" --gate review_complete --role code-reviewer --round 1 --format prompt
|
|
56
|
-
superspec check review-packet --change "<change>" --gate review_complete --role architect --round 1 --format prompt
|
|
57
|
-
superspec check review-packet --change "<change>" --gate review_complete --role critic --round 1 --format prompt
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Final Verification 边界
|
|
61
|
-
|
|
62
|
-
只在 allow 评估路径运行 final verification:
|
|
63
|
-
|
|
64
|
-
```text
|
|
65
|
-
openspec validate "<change>"
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
然后执行 test contract 要求的最终测试,启动本仓库 `verifier` 和 `critic` 做验证审查。验证提示也必须由检查命令产出:
|
|
69
|
-
|
|
70
|
-
```text
|
|
71
|
-
superspec check review-packet --change "<change>" --gate review_complete --role verifier --round 1 --format prompt
|
|
72
|
-
superspec check review-packet --change "<change>" --gate review_complete --role critic --round 1 --kind verification_review --format prompt
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
verification 只提供 proof/gap,不替代主流程最终判断。
|
|
76
|
-
|
|
77
|
-
## 主线程最终判断边界
|
|
78
|
-
|
|
79
|
-
主线程写最终判断前读取:
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
superspec check review-packet --change "<change>" --gate review_complete --role main-thread --round 1 --format agent
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
`review_complete` 是只允许通过的阶段检查。通过路径由主线程写本轮审查结论(主线程直接写,不携带代理字段)。
|
|
86
|
-
|
|
87
|
-
`request_changes` 不是 review_complete allow。它必须写清 `request_changes_route`:
|
|
88
|
-
|
|
89
|
-
- `reopen_tasks`:回 `superspec-apply` 修复既有 task。
|
|
90
|
-
- `change_update`:回 propose/change update。
|
|
91
|
-
|
|
92
|
-
request-changes round 不生成 allow-path verification,也不调用 `check-review-complete`。
|
|
93
|
-
|
|
94
|
-
## 完成检查
|
|
95
|
-
|
|
96
|
-
仅 allow path 运行:
|
|
97
|
-
|
|
98
|
-
```text
|
|
99
|
-
superspec check workflow-packet --change "<change>" --gate review_complete --format agent
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
只有检查结果显示通过后,才进入 `superspec-archive`。
|
|
53
|
+
- 不改业务代码(审查阶段只读)
|
|
54
|
+
- 不跳过 final-audit 直接 accept
|
|
55
|
+
- 审查报告必须真实引用文件内容,不编造
|
|
56
|
+
- 不跳过 transition
|
|
57
|
+
- 不要发明当前分支没有的 `source_guidance` / `verification_review` / `main_adjudication` / `superspec check`
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: architect
|
|
2
|
-
name = "architect"
|
|
3
|
-
description = "System design, boundaries, interfaces, long-horizon tradeoffs"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Architect. Review system boundaries, interface contracts, data flow, maintenance risk, rollback risk, and design tradeoffs.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/architect.md` first, then read the provided `review-packet` or `prompt_ref`. The packet's refs, output kind, contract fields, review scope, and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: read-only. Do not edit files or judge materials you have not opened. Report missing context upward instead of guessing.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese. Put the conclusion first, cite file:line evidence, and write `无阻塞问题` when no blocking issue is found.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: code-reviewer
|
|
2
|
-
name = "code-reviewer"
|
|
3
|
-
description = "Comprehensive review across all concerns"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Code Reviewer. Review spec fit, correctness, security, test adequacy, code quality, performance, and maintainability.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/code-reviewer.md` first, then read the provided `review-packet`, `apply-code-review-packet`, or `prompt_ref`. The packet's refs, output kind, contract fields, review scope, declared write scope, executor report refs, and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: read-only. Do not implement fixes, write evidence, mark tasks complete, decide GREEN, or replace main-thread workflow decisions. Start from diff plus relevant specs/tasks/tests, and report missing context upward instead of guessing.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese. Findings first, severity ordered, with file:line evidence and concrete fixes. Write `无阻塞问题` when no blocking issue is found.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: critic
|
|
2
|
-
name = "critic"
|
|
3
|
-
description = "Plan/design critical challenge and review"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Critic. Challenge plans, designs, implementations, and verification claims with source-backed skepticism.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/critic.md` first, then read the provided `review-packet` or `prompt_ref`. The packet's refs, output kind, contract fields, review scope, and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: read-only by default. Do not edit files, invent issues, or widen scope silently. Report missing source refs or claim gaps upward.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese. State pass or reject first, distinguish defects from proof gaps and residual risk, and cite concrete evidence.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: executor
|
|
2
|
-
name = "executor"
|
|
3
|
-
description = "Bounded SuperSpec apply implementation worker"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Executor. Implement exactly one SuperSpec apply task from the apply-executor packet.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/executor.md` first, then read the provided `apply-executor-packet` or `prompt_ref`. The packet's task id, declared write scope, guard fingerprint, worker chain id, stop conditions, and report policy override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: mutating but bounded. Edit only paths listed in `declared_task_write_scope`; do not edit OpenSpec artifacts, `.superspec/**`, task checkboxes, evidence, review reports, or archives. Stop and report blockers when scope or context is insufficient.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese implementation report with changed files, task/test/invariant mapping, suggested GREEN checks, artifact refs, and residual risk.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: explore
|
|
2
|
-
name = "explore"
|
|
3
|
-
description = "Repo-local read-only factual scan for SuperSpec discovery"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Explore. Map repo-local implementation facts, source anchors, hidden contracts, and missing discovery coverage.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/explore.md` first, then read the task prompt, `workflow-packet`, or `prompt_ref`. Packet refs and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: read-only. Do not edit files, write OpenSpec/SuperSpec artifacts, create evidence, approve scope, or replace main-thread workflow decisions. Report findings upward with concrete anchors.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese. Summarize relevant source facts, cite file/line evidence, and call out unknowns or missing refs.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: test-engineer
|
|
2
|
-
name = "test-engineer"
|
|
3
|
-
description = "Test strategy, coverage, flaky-test hardening"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Test Engineer. Review test strategy, coverage, RED/GREEN credibility, flaky-test risk, and acceptance mapping.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/test-engineer.md` first for SuperSpec review/propose lanes, then read the provided `review-packet` or `prompt_ref`. The packet's refs, output kind, contract fields, review scope, and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: SuperSpec review/propose lanes are read-only. In ordinary testing tasks, write tests only and report implementation needs upward.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese. List coverage gaps, suggested tests, fresh validation commands, unverifiable items, and residual risk.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: test-runner
|
|
2
|
-
name = "test-runner"
|
|
3
|
-
description = "Bounded SuperSpec apply test execution worker"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Test Runner. Execute exactly one SuperSpec apply test phase from the apply-test packet and report an evidence candidate.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/test-runner.md` first, then read the provided `apply-test-packet` or `prompt_ref`. The packet's task id, test id, phase, allowed command, expected semantic status, guard fingerprint, report policy, and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: read-only by default. Do not edit production code, OpenSpec artifacts, `.superspec/**`, task checkboxes, evidence, review reports, or archives. Run only the packet's allowed command and report blockers for missing command, unsafe side effects, or incomplete raw transcript refs.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese test report with command, cwd, phase, task/test id, exit status, semantic status candidate, result summary, raw transcript ref, repo head, dirty-state summary, invariant refs, guard fingerprint, and unverified items.
|
|
13
|
-
"""
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# oh-my-codex agent: verifier
|
|
2
|
-
name = "verifier"
|
|
3
|
-
description = "Completion evidence, claim validation, test adequacy"
|
|
4
|
-
model_reasoning_effort = "xhigh"
|
|
5
|
-
developer_instructions = """
|
|
6
|
-
Role: Verifier. Prove or disprove completion claims with reproducible evidence; missing evidence is not a pass.
|
|
7
|
-
|
|
8
|
-
Prompt binding: load `.codex/prompts/verifier.md` first, then read the provided `review-packet`, `apply-verify-packet`, or `prompt_ref`. The packet's refs, output kind, contract fields, review scope, evidence/report refs, freshness fingerprints, and stop conditions override static prompt memory.
|
|
9
|
-
|
|
10
|
-
Boundary: read-only. Check commands, test output, diff, artifacts, evidence refs, acceptance criteria, and freshness without editing files, writing evidence, marking tasks complete, or replacing main-thread workflow decisions.
|
|
11
|
-
|
|
12
|
-
Output: concise Simplified Chinese. State pass, fail, partial, or evidence gap first; list evidence, gaps, residual risk, and stop conditions.
|
|
13
|
-
"""
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"adapter": "codex",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"mappings": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "skill",
|
|
7
|
-
"source": "templates/workflow/skills/superspec-explore/SKILL.md",
|
|
8
|
-
"target": ".codex/skills/superspec-explore/SKILL.md"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"kind": "skill",
|
|
12
|
-
"source": "templates/workflow/skills/superspec-propose/SKILL.md",
|
|
13
|
-
"target": ".codex/skills/superspec-propose/SKILL.md"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"kind": "skill",
|
|
17
|
-
"source": "templates/workflow/skills/superspec-apply/SKILL.md",
|
|
18
|
-
"target": ".codex/skills/superspec-apply/SKILL.md"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "skill",
|
|
22
|
-
"source": "templates/workflow/skills/superspec-review/SKILL.md",
|
|
23
|
-
"target": ".codex/skills/superspec-review/SKILL.md"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"kind": "skill",
|
|
27
|
-
"source": "templates/workflow/skills/superspec-archive/SKILL.md",
|
|
28
|
-
"target": ".codex/skills/superspec-archive/SKILL.md"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"kind": "hook",
|
|
32
|
-
"source": "templates/hooks/codex-hooks.json",
|
|
33
|
-
"target": ".codex/hooks.json"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"kind": "prompt",
|
|
37
|
-
"source": "templates/workflow/prompts/architect.md",
|
|
38
|
-
"target": ".codex/prompts/architect.md"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"kind": "prompt",
|
|
42
|
-
"source": "templates/workflow/prompts/code-reviewer.md",
|
|
43
|
-
"target": ".codex/prompts/code-reviewer.md"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"kind": "prompt",
|
|
47
|
-
"source": "templates/workflow/prompts/critic.md",
|
|
48
|
-
"target": ".codex/prompts/critic.md"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"kind": "prompt",
|
|
52
|
-
"source": "templates/workflow/prompts/executor.md",
|
|
53
|
-
"target": ".codex/prompts/executor.md"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"kind": "prompt",
|
|
57
|
-
"source": "templates/workflow/prompts/explore.md",
|
|
58
|
-
"target": ".codex/prompts/explore.md"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"kind": "prompt",
|
|
62
|
-
"source": "templates/workflow/prompts/test-runner.md",
|
|
63
|
-
"target": ".codex/prompts/test-runner.md"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"kind": "prompt",
|
|
67
|
-
"source": "templates/workflow/prompts/test-engineer.md",
|
|
68
|
-
"target": ".codex/prompts/test-engineer.md"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"kind": "prompt",
|
|
72
|
-
"source": "templates/workflow/prompts/verifier.md",
|
|
73
|
-
"target": ".codex/prompts/verifier.md"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"kind": "agent",
|
|
77
|
-
"source": "adapters/codex/agents/architect.toml",
|
|
78
|
-
"target": ".codex/agents/architect.toml"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"kind": "agent",
|
|
82
|
-
"source": "adapters/codex/agents/code-reviewer.toml",
|
|
83
|
-
"target": ".codex/agents/code-reviewer.toml"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"kind": "agent",
|
|
87
|
-
"source": "adapters/codex/agents/critic.toml",
|
|
88
|
-
"target": ".codex/agents/critic.toml"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"kind": "agent",
|
|
92
|
-
"source": "adapters/codex/agents/explore.toml",
|
|
93
|
-
"target": ".codex/agents/explore.toml"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"kind": "agent",
|
|
97
|
-
"source": "adapters/codex/agents/executor.toml",
|
|
98
|
-
"target": ".codex/agents/executor.toml"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"kind": "agent",
|
|
102
|
-
"source": "adapters/codex/agents/test-runner.toml",
|
|
103
|
-
"target": ".codex/agents/test-runner.toml"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"kind": "agent",
|
|
107
|
-
"source": "adapters/codex/agents/test-engineer.toml",
|
|
108
|
-
"target": ".codex/agents/test-engineer.toml"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"kind": "agent",
|
|
112
|
-
"source": "adapters/codex/agents/verifier.toml",
|
|
113
|
-
"target": ".codex/agents/verifier.toml"
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
}
|
package/bin/launch.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export const REQUIRED_NODE_VERSION = "20.19.0";
|
|
2
|
-
const REQUIRED_NODE_PARTS = REQUIRED_NODE_VERSION.split(".").map((part) => Number.parseInt(part, 10));
|
|
3
|
-
|
|
4
|
-
function compareNodeVersion(version) {
|
|
5
|
-
const parts = String(version).split(".").map((part) => Number.parseInt(part, 10));
|
|
6
|
-
for (let index = 0; index < REQUIRED_NODE_PARTS.length; index += 1) {
|
|
7
|
-
const actual = parts[index] ?? 0;
|
|
8
|
-
const required = REQUIRED_NODE_PARTS[index] ?? 0;
|
|
9
|
-
if (!Number.isFinite(actual)) return -1;
|
|
10
|
-
if (actual > required) return 1;
|
|
11
|
-
if (actual < required) return -1;
|
|
12
|
-
}
|
|
13
|
-
return 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function nodeVersionError(version = process.versions.node) {
|
|
17
|
-
if (compareNodeVersion(version) >= 0) return null;
|
|
18
|
-
return `SuperSpec requires Node.js >=${REQUIRED_NODE_VERSION}. Current Node.js is ${version}. Upgrade Node.js, then rerun the command.`;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function assertSupportedNode(version = process.versions.node) {
|
|
22
|
-
const message = nodeVersionError(version);
|
|
23
|
-
if (message === null) return;
|
|
24
|
-
console.error(message);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export async function runEntry(entryPath, exportName, argv = process.argv.slice(2)) {
|
|
29
|
-
assertSupportedNode();
|
|
30
|
-
const mod = await import(new URL(entryPath, import.meta.url).href);
|
|
31
|
-
const main = mod[exportName];
|
|
32
|
-
if (typeof main !== "function") {
|
|
33
|
-
console.error(`SuperSpec internal error: ${entryPath} does not export ${exportName}`);
|
|
34
|
-
process.exit(2);
|
|
35
|
-
}
|
|
36
|
-
process.exitCode = await main(argv);
|
|
37
|
-
}
|
package/bin/superspec-check.js
DELETED
package/bin/superspec-hook.js
DELETED
package/bin/superspec-init.js
DELETED
package/bin/superspec.js
DELETED