@peterxiaoyang/superspec 0.1.6 → 0.1.8
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/adapters/codex/install-map.json +5 -0
- package/bin/superspec-hook.js +4 -0
- package/dist/src/apply_worker_chain_lifecycle.d.ts +19 -0
- package/dist/src/apply_worker_chain_lifecycle.js +278 -0
- package/dist/src/archive.js +2 -0
- package/dist/src/cli_args.d.ts +5 -0
- package/dist/src/cli_args.js +41 -0
- package/dist/src/core.js +36 -0
- package/dist/src/evidence.js +3 -0
- package/dist/src/gates.js +8 -258
- package/dist/src/hooks/adapter.d.ts +5 -0
- package/dist/src/hooks/adapter.js +311 -0
- package/dist/src/hooks/guard_api.d.ts +12 -0
- package/dist/src/hooks/guard_api.js +797 -0
- package/dist/src/hooks/health.d.ts +4 -0
- package/dist/src/hooks/health.js +98 -0
- package/dist/src/hooks/policy_event.d.ts +41 -0
- package/dist/src/hooks/policy_event.js +2624 -0
- package/dist/src/hooks/types.d.ts +72 -0
- package/dist/src/hooks/types.js +1 -0
- package/dist/src/hooks/validation.d.ts +3 -0
- package/dist/src/hooks/validation.js +70 -0
- package/dist/src/packet_measure.js +67 -102
- package/dist/src/packet_render.js +4 -85
- package/dist/superspec_hook.d.ts +4 -0
- package/dist/superspec_hook.js +35 -0
- package/package.json +7 -2
- package/schemas/hook-event.schema.json +27 -0
- package/templates/hooks/codex-hooks.json +61 -0
- package/templates/workflow/skills/superspec-apply/SKILL.md +7 -0
- package/templates/workflow/skills/superspec-archive/SKILL.md +8 -0
- package/templates/workflow/skills/superspec-explore/SKILL.md +7 -0
- package/templates/workflow/skills/superspec-propose/SKILL.md +7 -0
- package/templates/workflow/skills/superspec-review/SKILL.md +7 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"superspec": {
|
|
3
|
+
"managed": true,
|
|
4
|
+
"adapter_version": "superspec-hook@2",
|
|
5
|
+
"strict_profile_default": "audit-only-until-r1-provenance-passes"
|
|
6
|
+
},
|
|
7
|
+
"hooks": {
|
|
8
|
+
"PreToolUse": [
|
|
9
|
+
{
|
|
10
|
+
"matcher": "Bash|apply_patch|Edit|Write|mcp__.*",
|
|
11
|
+
"hooks": [
|
|
12
|
+
{
|
|
13
|
+
"type": "command",
|
|
14
|
+
"command": "superspec-hook --change \"$SUPERSPEC_CHANGE\"",
|
|
15
|
+
"timeout": 10,
|
|
16
|
+
"statusMessage": "SuperSpec hook write policy"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"PostToolUse": [
|
|
22
|
+
{
|
|
23
|
+
"matcher": "Bash",
|
|
24
|
+
"hooks": [
|
|
25
|
+
{
|
|
26
|
+
"type": "command",
|
|
27
|
+
"command": "superspec-hook --change \"$SUPERSPEC_CHANGE\"",
|
|
28
|
+
"timeout": 30,
|
|
29
|
+
"statusMessage": "SuperSpec hook runtime evidence"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"SubagentStart": [
|
|
35
|
+
{
|
|
36
|
+
"matcher": ".*",
|
|
37
|
+
"hooks": [
|
|
38
|
+
{
|
|
39
|
+
"type": "command",
|
|
40
|
+
"command": "superspec-hook --change \"$SUPERSPEC_CHANGE\"",
|
|
41
|
+
"timeout": 30,
|
|
42
|
+
"statusMessage": "SuperSpec hook subagent start"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"SubagentStop": [
|
|
48
|
+
{
|
|
49
|
+
"matcher": ".*",
|
|
50
|
+
"hooks": [
|
|
51
|
+
{
|
|
52
|
+
"type": "command",
|
|
53
|
+
"command": "superspec-hook --change \"$SUPERSPEC_CHANGE\"",
|
|
54
|
+
"timeout": 30,
|
|
55
|
+
"statusMessage": "SuperSpec hook subagent stop"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -26,6 +26,13 @@ Apply 按 OpenSpec tasks 执行实现,负责 RED/GREEN 证据、任务勾选
|
|
|
26
26
|
|
|
27
27
|
## 第一条必跑命令
|
|
28
28
|
|
|
29
|
+
先尝试建立当前 change 的 SuperSpec hook session。R-1/provenance 未通过时该命令只会记录 audit-only lease 和降级诊断,不代表 mechanical enforcement 已启用:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
superspec guard hook-session-begin --change "<change>" --workflow superspec-apply --entrypoint-token "<fresh-entrypoint-token>" --format agent
|
|
33
|
+
superspec guard hook-session-status --change "<change>" --format agent
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
```text
|
|
30
37
|
superspec guard workflow-packet --change "<change>" --gate apply_ready --format agent
|
|
31
38
|
```
|
|
@@ -26,6 +26,13 @@ Archive 在 `review_complete` allowed 后收尾:确认 archive readiness、保
|
|
|
26
26
|
|
|
27
27
|
## 第一条必跑命令
|
|
28
28
|
|
|
29
|
+
先尝试建立当前 change 的 SuperSpec hook session。R-1/provenance 未通过时该命令只会记录 audit-only lease 和降级诊断,不代表 mechanical enforcement 已启用:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
superspec guard hook-session-begin --change "<change>" --workflow superspec-archive --entrypoint-token "<fresh-entrypoint-token>" --format agent
|
|
33
|
+
superspec guard hook-session-status --change "<change>" --format agent
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
```text
|
|
30
37
|
superspec guard workflow-packet --change "<change>" --gate archive_ready --format agent
|
|
31
38
|
```
|
|
@@ -60,6 +67,7 @@ openspec archive -y "<change>"
|
|
|
60
67
|
|
|
61
68
|
```text
|
|
62
69
|
superspec guard check-archived --change "<change>" --format agent
|
|
70
|
+
superspec guard hook-session-end --change "<change>" --reason archived --format agent
|
|
63
71
|
```
|
|
64
72
|
|
|
65
73
|
`.superspec/artifacts/business-invariants.md`、`.superspec/artifacts/test-contract.md`、review/verification evidence、RED/GREEN evidence 和 archive evidence 必须能从 preservation manifest 追溯。
|
|
@@ -26,6 +26,13 @@ Explore 只做需求澄清、代码事实调查、范围边界和风险记录。
|
|
|
26
26
|
|
|
27
27
|
## 第一条必跑命令
|
|
28
28
|
|
|
29
|
+
先尝试建立当前 change 的 SuperSpec hook session。R-1/provenance 未通过时该命令只会记录 audit-only lease 和降级诊断,不代表 mechanical enforcement 已启用:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
superspec guard hook-session-begin --change "<change>" --workflow superspec-explore --entrypoint-token "<fresh-entrypoint-token>" --format agent
|
|
33
|
+
superspec guard hook-session-status --change "<change>" --format agent
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
```text
|
|
30
37
|
superspec init --scope project --format agent
|
|
31
38
|
```
|
|
@@ -26,6 +26,13 @@ Propose 把 discovery 转成 OpenSpec proposal package,并补 SuperSpec 业务
|
|
|
26
26
|
|
|
27
27
|
## 第一条必跑命令
|
|
28
28
|
|
|
29
|
+
先尝试建立当前 change 的 SuperSpec hook session。R-1/provenance 未通过时该命令只会记录 audit-only lease 和降级诊断,不代表 mechanical enforcement 已启用:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
superspec guard hook-session-begin --change "<change>" --workflow superspec-propose --entrypoint-token "<fresh-entrypoint-token>" --format agent
|
|
33
|
+
superspec guard hook-session-status --change "<change>" --format agent
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
```text
|
|
30
37
|
superspec guard workflow-packet --change "<change>" --gate explore_complete --format agent
|
|
31
38
|
```
|
|
@@ -26,6 +26,13 @@ Review 合并实现审查、架构审查、SuperSpec critic、final verification
|
|
|
26
26
|
|
|
27
27
|
## 第一条必跑命令
|
|
28
28
|
|
|
29
|
+
先尝试建立当前 change 的 SuperSpec hook session。R-1/provenance 未通过时该命令只会记录 audit-only lease 和降级诊断,不代表 mechanical enforcement 已启用:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
superspec guard hook-session-begin --change "<change>" --workflow superspec-review --entrypoint-token "<fresh-entrypoint-token>" --format agent
|
|
33
|
+
superspec guard hook-session-status --change "<change>" --format agent
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
```text
|
|
30
37
|
superspec guard check-init --change "<change>" --format agent
|
|
31
38
|
```
|