@peterxiaoyang/superspec 0.1.14 → 0.1.16-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.
Files changed (131) hide show
  1. package/README.md +37 -36
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.js +301 -0
  4. package/dist/format.d.ts +29 -0
  5. package/dist/format.js +141 -0
  6. package/dist/install.d.ts +18 -0
  7. package/dist/install.js +161 -0
  8. package/dist/next.d.ts +3 -0
  9. package/dist/next.js +161 -0
  10. package/dist/openspec.d.ts +9 -0
  11. package/dist/openspec.js +41 -0
  12. package/dist/record.d.ts +20 -0
  13. package/dist/record.js +266 -0
  14. package/dist/skill_loop.d.ts +23 -0
  15. package/dist/skill_loop.js +58 -0
  16. package/dist/store.d.ts +31 -0
  17. package/dist/store.js +213 -0
  18. package/dist/sync.d.ts +3 -0
  19. package/dist/sync.js +135 -0
  20. package/dist/task.d.ts +7 -0
  21. package/dist/task.js +44 -0
  22. package/dist/transition.d.ts +34 -0
  23. package/dist/transition.js +400 -0
  24. package/dist/types.d.ts +141 -0
  25. package/dist/types.js +3 -0
  26. package/package.json +8 -53
  27. package/templates/workflow/agents/architect.toml +13 -0
  28. package/{adapters/codex → templates/workflow}/agents/code-reviewer.toml +2 -2
  29. package/templates/workflow/agents/critic.toml +13 -0
  30. package/{adapters/codex → templates/workflow}/agents/executor.toml +2 -2
  31. package/{adapters/codex → templates/workflow}/agents/explore.toml +3 -3
  32. package/templates/workflow/agents/final-audit.toml +13 -0
  33. package/templates/workflow/agents/proposal-auditor.toml +13 -0
  34. package/{adapters/codex → templates/workflow}/agents/test-engineer.toml +4 -4
  35. package/{adapters/codex → templates/workflow}/agents/test-runner.toml +2 -2
  36. package/{adapters/codex → templates/workflow}/agents/verifier.toml +2 -2
  37. package/templates/workflow/prompts/architect.md +16 -0
  38. package/templates/workflow/prompts/critic.md +16 -0
  39. package/templates/workflow/prompts/explore.md +1 -1
  40. package/templates/workflow/prompts/final-audit.md +32 -0
  41. package/templates/workflow/prompts/proposal-auditor.md +34 -0
  42. package/templates/workflow/prompts/test-engineer.md +16 -0
  43. package/templates/workflow/skills/superspec-apply/SKILL.md +39 -121
  44. package/templates/workflow/skills/superspec-archive/SKILL.md +17 -49
  45. package/templates/workflow/skills/superspec-explore/SKILL.md +34 -70
  46. package/templates/workflow/skills/superspec-propose/SKILL.md +57 -60
  47. package/templates/workflow/skills/superspec-review/SKILL.md +18 -85
  48. package/adapters/codex/agents/architect.toml +0 -13
  49. package/adapters/codex/agents/critic.toml +0 -13
  50. package/adapters/codex/install-map.json +0 -116
  51. package/bin/launch.js +0 -37
  52. package/bin/superspec-check.js +0 -4
  53. package/bin/superspec-hook.js +0 -4
  54. package/bin/superspec-init.js +0 -4
  55. package/bin/superspec.js +0 -4
  56. package/dist/src/apply_worker_chain.d.ts +0 -60
  57. package/dist/src/apply_worker_chain.js +0 -1283
  58. package/dist/src/apply_worker_chain_lifecycle.d.ts +0 -21
  59. package/dist/src/apply_worker_chain_lifecycle.js +0 -409
  60. package/dist/src/archive.d.ts +0 -23
  61. package/dist/src/archive.js +0 -430
  62. package/dist/src/cli.d.ts +0 -1
  63. package/dist/src/cli.js +0 -33
  64. package/dist/src/cli_args.d.ts +0 -32
  65. package/dist/src/cli_args.js +0 -454
  66. package/dist/src/core.d.ts +0 -20
  67. package/dist/src/core.js +0 -394
  68. package/dist/src/disclosure.d.ts +0 -35
  69. package/dist/src/disclosure.js +0 -671
  70. package/dist/src/doctor.d.ts +0 -44
  71. package/dist/src/doctor.js +0 -230
  72. package/dist/src/evidence.d.ts +0 -29
  73. package/dist/src/evidence.js +0 -1107
  74. package/dist/src/gates.d.ts +0 -19
  75. package/dist/src/gates.js +0 -1631
  76. package/dist/src/git.d.ts +0 -8
  77. package/dist/src/git.js +0 -112
  78. package/dist/src/hooks/adapter.d.ts +0 -5
  79. package/dist/src/hooks/adapter.js +0 -347
  80. package/dist/src/hooks/guard_api.d.ts +0 -12
  81. package/dist/src/hooks/guard_api.js +0 -797
  82. package/dist/src/hooks/health.d.ts +0 -4
  83. package/dist/src/hooks/health.js +0 -86
  84. package/dist/src/hooks/policy_event.d.ts +0 -41
  85. package/dist/src/hooks/policy_event.js +0 -2634
  86. package/dist/src/hooks/types.d.ts +0 -72
  87. package/dist/src/hooks/types.js +0 -1
  88. package/dist/src/hooks/validation.d.ts +0 -3
  89. package/dist/src/hooks/validation.js +0 -70
  90. package/dist/src/i18n.d.ts +0 -21
  91. package/dist/src/i18n.js +0 -720
  92. package/dist/src/init_cli.d.ts +0 -28
  93. package/dist/src/init_cli.js +0 -404
  94. package/dist/src/install_engine.d.ts +0 -71
  95. package/dist/src/install_engine.js +0 -538
  96. package/dist/src/invariants.d.ts +0 -16
  97. package/dist/src/invariants.js +0 -363
  98. package/dist/src/openspec.d.ts +0 -37
  99. package/dist/src/openspec.js +0 -274
  100. package/dist/src/packet_render.d.ts +0 -5
  101. package/dist/src/packet_render.js +0 -1767
  102. package/dist/src/packet_schema.d.ts +0 -59
  103. package/dist/src/packet_schema.js +0 -1
  104. package/dist/src/paths.d.ts +0 -22
  105. package/dist/src/paths.js +0 -203
  106. package/dist/src/project_init.d.ts +0 -33
  107. package/dist/src/project_init.js +0 -191
  108. package/dist/src/self_update.d.ts +0 -14
  109. package/dist/src/self_update.js +0 -56
  110. package/dist/src/state.d.ts +0 -37
  111. package/dist/src/state.js +0 -464
  112. package/dist/src/tasks.d.ts +0 -38
  113. package/dist/src/tasks.js +0 -373
  114. package/dist/src/util.d.ts +0 -163
  115. package/dist/src/util.js +0 -792
  116. package/dist/superspec.d.ts +0 -6
  117. package/dist/superspec.js +0 -97
  118. package/dist/superspec_guard.d.ts +0 -4
  119. package/dist/superspec_guard.js +0 -19
  120. package/dist/superspec_hook.d.ts +0 -4
  121. package/dist/superspec_hook.js +0 -35
  122. package/dist/superspec_init.d.ts +0 -2
  123. package/dist/superspec_init.js +0 -17
  124. package/schemas/hook-event.schema.json +0 -27
  125. package/schemas/install-manifest.schema.json +0 -97
  126. package/templates/hooks/codex-hooks.json +0 -35
  127. package/templates/sidecar/archive-preservation.json +0 -11
  128. package/templates/sidecar/business-invariants.md +0 -38
  129. package/templates/sidecar/config.yaml +0 -13
  130. package/templates/sidecar/discovery.md +0 -33
  131. package/templates/sidecar/test-contract.md +0 -27
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- export * from "./src/init_cli.ts";
3
- export * from "./src/cli.ts";
4
- export * from "./src/doctor.ts";
5
- export * from "./src/self_update.ts";
6
- export declare function main_superspec(argv?: string[]): Promise<number>;
package/dist/superspec.js DELETED
@@ -1,97 +0,0 @@
1
- #!/usr/bin/env node
2
- import { realpathSync } from "node:fs";
3
- import { resolve } from "node:path";
4
- export * from "./src/init_cli.js";
5
- export * from "./src/cli.js";
6
- export * from "./src/doctor.js";
7
- export * from "./src/self_update.js";
8
- import { main } from "./src/cli.js";
9
- import { main_doctor, superspec_package_version } from "./src/doctor.js";
10
- import { main_init_async } from "./src/init_cli.js";
11
- import { update_self_then_rerun } from "./src/self_update.js";
12
- function realpathMaybe(filePath) {
13
- try {
14
- return realpathSync(filePath);
15
- }
16
- catch {
17
- return resolve(filePath);
18
- }
19
- }
20
- function help() {
21
- return [
22
- "usage: superspec <command> [options]",
23
- "",
24
- "commands:",
25
- " init install SuperSpec Codex surfaces (asks project/user; default project)",
26
- " update update SuperSpec CLI, then update manifest-managed surfaces",
27
- " uninstall remove manifest-managed SuperSpec surfaces",
28
- " check run the SuperSpec check command surface",
29
- " doctor diagnose SuperSpec/OpenSpec/npm/PATH wiring",
30
- " version print SuperSpec CLI version",
31
- "",
32
- "examples:",
33
- " superspec init --scope project",
34
- " superspec init --scope user",
35
- " superspec check check-init --change <change> --format agent",
36
- " superspec doctor",
37
- "",
38
- ].join("\n");
39
- }
40
- function updateHelp() {
41
- return [
42
- "usage: superspec update [--scope {project,user}] [--path PATH] [--codex-home PATH] [--format {json,agent,user}] [--local-only]",
43
- "",
44
- "updates the global SuperSpec CLI from npm, then updates manifest-managed SuperSpec surfaces.",
45
- "",
46
- "options:",
47
- " --scope {project,user} update project .codex surfaces or user Codex home surfaces (default: project)",
48
- " --project equivalent to --scope project",
49
- " --user, --global equivalent to --scope user",
50
- " --path PATH project root for project scope (default: current directory)",
51
- " --codex-home PATH Codex user home for user scope (default: $CODEX_HOME or ~/.codex)",
52
- " --format {json,agent,user} output format (default: user); use json for diagnostics/automation",
53
- " --local-only skip npm self-update and use the currently installed package",
54
- " -h, --help show this help",
55
- "",
56
- ].join("\n");
57
- }
58
- export async function main_superspec(argv = process.argv.slice(2)) {
59
- const [command, ...rest] = argv;
60
- if (command === undefined || command === "-h" || command === "--help") {
61
- process.stdout.write(help());
62
- return 0;
63
- }
64
- if (command === "-v" || command === "--version" || command === "version") {
65
- process.stdout.write(`${superspec_package_version()}\n`);
66
- return 0;
67
- }
68
- if (command === "init")
69
- return main_init_async(rest);
70
- if (command === "update") {
71
- if (rest.includes("-h") || rest.includes("--help")) {
72
- process.stdout.write(updateHelp());
73
- return 0;
74
- }
75
- const localOnly = rest.includes("--local-only") || rest.includes("--skip-self-update");
76
- const updateArgs = rest.filter((arg) => arg !== "--local-only" && arg !== "--skip-self-update");
77
- if (!localOnly)
78
- return update_self_then_rerun({ args: updateArgs });
79
- return main_init_async([...updateArgs, "--update"]);
80
- }
81
- if (command === "uninstall")
82
- return main_init_async([...rest, "--uninstall"]);
83
- if (command === "check" || command === "guard")
84
- return main(rest);
85
- if (command === "doctor")
86
- return main_doctor(rest);
87
- // Convenience fallback: `superspec check-init ...` behaves like `superspec check check-init ...`.
88
- if (command.startsWith("check-") || command === "status" || command === "recompute" || command === "init") {
89
- return main(argv);
90
- }
91
- process.stderr.write(`superspec: unknown command ${JSON.stringify(command)}\n\n${help()}`);
92
- return 2;
93
- }
94
- const currentFile = realpathMaybe(process.argv[1] ?? "");
95
- if (currentFile === realpathMaybe(new URL(import.meta.url).pathname)) {
96
- process.exitCode = await main_superspec();
97
- }
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- export * from "./src/core.ts";
3
- export * from "./src/cli.ts";
4
- export * from "./src/cli_args.ts";
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
- import { realpathSync } from "node:fs";
3
- import { resolve } from "node:path";
4
- export * from "./src/core.js";
5
- export * from "./src/cli.js";
6
- export * from "./src/cli_args.js";
7
- import { main } from "./src/cli.js";
8
- function realpathMaybe(filePath) {
9
- try {
10
- return realpathSync(filePath);
11
- }
12
- catch {
13
- return resolve(filePath);
14
- }
15
- }
16
- const currentFile = realpathMaybe(process.argv[1] ?? "");
17
- if (currentFile === realpathMaybe(new URL(import.meta.url).pathname)) {
18
- process.exitCode = main();
19
- }
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./src/core.ts";
3
- export * from "./src/hooks/adapter.ts";
4
- export declare function main_hook(argv?: string[]): number;
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./src/core.js";
3
- export * from "./src/hooks/adapter.js";
4
- import { readFileSync, realpathSync } from "node:fs";
5
- import { resolve } from "node:path";
6
- import { runHookAdapter } from "./src/hooks/adapter.js";
7
- function realpathMaybe(filePath) {
8
- try {
9
- return realpathSync(filePath);
10
- }
11
- catch {
12
- return resolve(filePath);
13
- }
14
- }
15
- const currentFile = realpathMaybe(process.argv[1] ?? "");
16
- export function main_hook(argv = process.argv.slice(2)) {
17
- const stdin = readStdin();
18
- const result = runHookAdapter(argv, stdin);
19
- if (result.stdout)
20
- process.stdout.write(result.stdout);
21
- if (result.stderr)
22
- process.stderr.write(result.stderr);
23
- return result.code;
24
- }
25
- function readStdin() {
26
- try {
27
- return readFileSync(0, "utf8");
28
- }
29
- catch {
30
- return "";
31
- }
32
- }
33
- if (currentFile === realpathMaybe(new URL(import.meta.url).pathname)) {
34
- process.exitCode = main_hook();
35
- }
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export * from "./src/init_cli.ts";
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- import { realpathSync } from "node:fs";
3
- import { resolve } from "node:path";
4
- export * from "./src/init_cli.js";
5
- import { main_init_async } from "./src/init_cli.js";
6
- function realpathMaybe(filePath) {
7
- try {
8
- return realpathSync(filePath);
9
- }
10
- catch {
11
- return resolve(filePath);
12
- }
13
- }
14
- const currentFile = realpathMaybe(process.argv[1] ?? "");
15
- if (currentFile === realpathMaybe(new URL(import.meta.url).pathname)) {
16
- process.exitCode = await main_init_async();
17
- }
@@ -1,27 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://superspec.local/schemas/hook-event.schema.json",
4
- "title": "SuperSpec Codex Hook Event",
5
- "type": "object",
6
- "required": ["hook_event_name", "cwd"],
7
- "properties": {
8
- "session_id": { "type": "string" },
9
- "turn_id": { "type": "string" },
10
- "transcript_path": { "type": ["string", "null"] },
11
- "cwd": { "type": "string" },
12
- "hook_event_name": {
13
- "type": "string",
14
- "enum": ["PreToolUse", "PostToolUse", "SubagentStart", "SubagentStop"]
15
- },
16
- "permission_mode": { "type": "string" },
17
- "tool_name": { "type": "string" },
18
- "tool_use_id": { "type": "string" },
19
- "tool_input": { "type": "object" },
20
- "tool_response": { "type": ["object", "array", "string", "number", "boolean", "null"] },
21
- "agent_id": { "type": "string" },
22
- "agent_type": { "type": "string" },
23
- "agent_transcript_path": { "type": ["string", "null"] },
24
- "last_assistant_message": { "type": ["string", "null"] }
25
- },
26
- "additionalProperties": true
27
- }
@@ -1,97 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://irenshi.local/superspec/install-manifest.schema.json",
4
- "title": "SuperSpec install manifest",
5
- "type": "object",
6
- "additionalProperties": false,
7
- "required": [
8
- "superspecVersion",
9
- "installedAt",
10
- "guardSchemaVersion",
11
- "guardWiring",
12
- "files",
13
- "createdDirs",
14
- "dataGlobs"
15
- ],
16
- "properties": {
17
- "superspecVersion": {
18
- "type": "string",
19
- "minLength": 1
20
- },
21
- "packageSpec": {
22
- "type": "string",
23
- "minLength": 1
24
- },
25
- "installedAt": {
26
- "type": "string",
27
- "format": "date-time"
28
- },
29
- "guardSchemaVersion": {
30
- "type": "integer",
31
- "minimum": 1
32
- },
33
- "guardWiring": {
34
- "type": "string",
35
- "enum": ["global-bin", "npm-bin", "repo-wrapper"]
36
- },
37
- "installScope": {
38
- "type": "string",
39
- "enum": ["project", "user"]
40
- },
41
- "files": {
42
- "type": "array",
43
- "items": {
44
- "type": "object",
45
- "additionalProperties": false,
46
- "required": ["path", "sha256", "managed", "preexisting"],
47
- "properties": {
48
- "path": {
49
- "type": "string",
50
- "minLength": 1
51
- },
52
- "sha256": {
53
- "type": "string",
54
- "pattern": "^sha256:[0-9a-f]{64}$"
55
- },
56
- "managed": {
57
- "type": "boolean"
58
- },
59
- "preexisting": {
60
- "type": "boolean"
61
- }
62
- }
63
- }
64
- },
65
- "createdDirs": {
66
- "type": "array",
67
- "items": {
68
- "type": "string",
69
- "minLength": 1
70
- }
71
- },
72
- "dataGlobs": {
73
- "type": "array",
74
- "items": {
75
- "type": "string",
76
- "minLength": 1
77
- }
78
- },
79
- "configPatch": {
80
- "type": "object",
81
- "additionalProperties": false,
82
- "required": ["path", "retainedOnUninstall", "managed"],
83
- "properties": {
84
- "path": {
85
- "type": "string",
86
- "minLength": 1
87
- },
88
- "retainedOnUninstall": {
89
- "const": true
90
- },
91
- "managed": {
92
- "const": false
93
- }
94
- }
95
- }
96
- }
97
- }
@@ -1,35 +0,0 @@
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
- "SubagentStart": [
9
- {
10
- "matcher": ".*",
11
- "hooks": [
12
- {
13
- "type": "command",
14
- "command": "superspec-hook --change \"$SUPERSPEC_CHANGE\"",
15
- "timeout": 120,
16
- "statusMessage": "SuperSpec 子智能体启动记录"
17
- }
18
- ]
19
- }
20
- ],
21
- "SubagentStop": [
22
- {
23
- "matcher": ".*",
24
- "hooks": [
25
- {
26
- "type": "command",
27
- "command": "superspec-hook --change \"$SUPERSPEC_CHANGE\"",
28
- "timeout": 120,
29
- "statusMessage": "SuperSpec 子智能体停止记录"
30
- }
31
- ]
32
- }
33
- ]
34
- }
35
- }
@@ -1,11 +0,0 @@
1
- {
2
- "schema_version": 1,
3
- "change_id": "<change>",
4
- "kind": "superspec_archive_preservation",
5
- "entries": [
6
- {
7
- "path": ".superspec/config.yaml",
8
- "sha256": "sha256:<digest>"
9
- }
10
- ]
11
- }
@@ -1,38 +0,0 @@
1
- <!-- SuperSpec sidecar: write to openspec/changes/<change>/.superspec/artifacts/business-invariants.md
2
- This is not an OpenSpec artifact and must not enter the OpenSpec graph. -->
3
-
4
- # 业务不变量
5
-
6
- ## Source Anchor Policy
7
-
8
- - 每条 `INV-*` 必须有 `source_anchors`。
9
- - `confirmed` / `source-backed` 可进入 test-contract 硬映射。
10
- - `inferred` 只能进入 review checklist,除非补充 human confirmation。
11
- - 实现开始后新增或重写不变量,必须标记 `created_after_implementation: true` 并重新触发相关 gate。
12
- - `test-contract.md` 只映射 `INV-*`,不重复承载完整不变量正文。
13
-
14
- ## Invariants
15
-
16
- | INV-ID | statement | scope | source_anchors | acceptance_refs | risk_refs | confidence | enforcement_level | test_refs_or_review_only_reason | verification | risk_if_broken | invalidation_triggers | created_after_implementation |
17
- |---|---|---|---|---|---|---|---|---|---|---|---|---|
18
- | INV-001 | | | | REQ-001 | RISK-001 | source-backed | automated-test | TEST-001 | automated-test | | | false |
19
-
20
- ## Non-invariants / Rejected Candidates
21
-
22
- | candidate | reason_rejected | reviewer |
23
- |---|---|---|
24
- | | | |
25
-
26
- ## Mapping
27
-
28
- | INV-ID | REQ/Scenario refs | risk refs | TEST refs | REVIEW refs | task refs |
29
- |---|---|---|---|---|---|
30
- | INV-001 | REQ-001 | RISK-001 | TEST-001 | | TASK-001 |
31
-
32
- ## Review Notes
33
-
34
- ```yaml
35
- business_invariants_verified: []
36
- broken_or_weak_invariants: []
37
- human_confirmations_required: []
38
- ```
@@ -1,13 +0,0 @@
1
- # superspec config.yaml template
2
- # Project path: .superspec/config.yaml
3
- # Change path: openspec/changes/<change>/.superspec/config.yaml
4
-
5
- preset: full
6
- commands:
7
- validate: openspec validate <change>
8
- test: ""
9
- roles: {}
10
- rules: {}
11
- trust:
12
- v1_evidence: audit-only
13
- archive: {}
@@ -1,33 +0,0 @@
1
- <!-- SuperSpec sidecar:写入 openspec/changes/<change>/.superspec/artifacts/discovery.md -->
2
-
3
- ## 调查范围
4
-
5
- - change: `<change>`
6
- - repo refs:
7
- - source anchors:
8
-
9
- ## 现有实现事实
10
-
11
- -
12
-
13
- ## 隐性合约
14
-
15
- -
16
-
17
- ## 风险与歧义
18
-
19
- -
20
-
21
- ## 待确认问题
22
-
23
- <!-- 需要用户拍板的问题逐条列在此处:未决用 "- [ ]",已确认用 "- [x]"。
24
- explore_complete 检查在所有项变成 "- [x]"(或标注「已确认」)之前不会通过,也不会进入 propose。
25
- 段标题包含「确认」字样即可被识别(待确认 / 需要用户确认 等)。 -->
26
-
27
- - [ ] <待确认问题 1>
28
- - [ ] <待确认问题 2>
29
-
30
- ## Subagent Evidence
31
-
32
- - explore:
33
- - critic:
@@ -1,27 +0,0 @@
1
- <!-- SuperSpec sidecar:写入 openspec/changes/<change>/.superspec/artifacts/test-contract.md
2
- 不是 OpenSpec artifact,不进 openspec status graph。 -->
3
-
4
- ## 测试覆盖矩阵
5
-
6
- | TEST-ID | 关联 REQ/Scenario | 关联 INV | 维度 | 测试意图(断言什么行为) | 预期 RED 原因 |
7
- |---|---|---|---|---|---|
8
- | TEST-001 | <REQ-xxx / Scenario 名> | INV-xxx | 正常路径 | | |
9
-
10
- ## 红绿灯契约
11
-
12
- ### TEST-001
13
- - `invariant_refs`: INV-xxx
14
- - `expected_red`: <实现前因何失败>
15
- - `expected_green`: <实现后通过的判据>
16
- - `test_command`: <framework-agnostic command that runs exactly the target test identity>
17
-
18
- ## Iron Law
19
-
20
- - 没有正在失败的测试,不准写实现代码。
21
- - 每个实现型 task:先有 RED evidence 才能改实现代码,先有 GREEN evidence 才能勾选。
22
- - 测试证据语义(框架无关):`target test identity executed` 才算有效运行;`command exit code alone is not proof`,退出码 0 不等于目标测试跑过/通过;命令在到达测试 runner 之前失败属于 `blocked before the target test runner`,不是 RED/GREEN;`do not classify environment/build failures as RED or GREEN`。
23
-
24
- ## 与 tasks 的映射约定
25
-
26
- <!-- 每个 TEST-ID 必须在 tasks.md 至少一个 task 的 test_refs 中出现;guard 交叉校验。 -->
27
- <!-- 每个 hard INV-ID 必须在 test-contract.md 至少一个 TEST-ID 的 关联 INV 中出现,并在 tasks.md 至少一个 task 的 invariant_refs 中出现。 -->