@peterxiaoyang/superspec 0.1.4 → 0.1.6
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/agents/architect.toml +4 -148
- package/adapters/codex/agents/code-reviewer.toml +4 -166
- package/adapters/codex/agents/critic.toml +5 -106
- package/adapters/codex/agents/executor.toml +13 -0
- package/adapters/codex/agents/test-engineer.toml +4 -154
- package/adapters/codex/agents/test-runner.toml +13 -0
- package/adapters/codex/agents/verifier.toml +4 -110
- package/adapters/codex/install-map.json +20 -0
- package/dist/src/apply_worker_chain.d.ts +57 -0
- package/dist/src/apply_worker_chain.js +1188 -0
- package/dist/src/cli.js +13 -0
- package/dist/src/cli_args.d.ts +13 -1
- package/dist/src/cli_args.js +237 -12
- package/dist/src/core.d.ts +1 -0
- package/dist/src/core.js +1 -0
- package/dist/src/evidence.js +152 -0
- package/dist/src/gates.d.ts +2 -1
- package/dist/src/gates.js +275 -21
- package/dist/src/i18n.js +4 -3
- package/dist/src/install_engine.d.ts +17 -0
- package/dist/src/install_engine.js +125 -2
- package/dist/src/packet_measure.d.ts +43 -0
- package/dist/src/packet_measure.js +417 -0
- package/dist/src/packet_render.d.ts +4 -0
- package/dist/src/packet_render.js +1623 -0
- package/dist/src/packet_schema.d.ts +56 -0
- package/dist/src/packet_schema.js +1 -0
- package/dist/src/project_init.js +7 -49
- package/dist/src/tasks.d.ts +10 -0
- package/dist/src/tasks.js +86 -0
- package/dist/src/util.d.ts +11 -3
- package/dist/src/util.js +27 -6
- package/package.json +2 -2
- package/schemas/install-manifest.schema.json +17 -0
- package/templates/workflow/prompts/architect.md +16 -109
- package/templates/workflow/prompts/code-reviewer.md +20 -134
- package/templates/workflow/prompts/critic.md +18 -75
- package/templates/workflow/prompts/executor.md +32 -0
- package/templates/workflow/prompts/test-engineer.md +16 -126
- package/templates/workflow/prompts/test-runner.md +33 -0
- package/templates/workflow/prompts/verifier.md +20 -77
- package/templates/workflow/skills/superspec-apply/SKILL.md +102 -78
- package/templates/workflow/skills/superspec-archive/SKILL.md +41 -37
- package/templates/workflow/skills/superspec-explore/SKILL.md +63 -77
- package/templates/workflow/skills/superspec-propose/SKILL.md +64 -85
- package/templates/workflow/skills/superspec-review/SKILL.md +76 -233
|
@@ -3,117 +3,11 @@ name = "verifier"
|
|
|
3
3
|
description = "Completion evidence, claim validation, test adequacy"
|
|
4
4
|
model_reasoning_effort = "xhigh"
|
|
5
5
|
developer_instructions = """
|
|
6
|
-
|
|
7
|
-
You are Verifier. Prove or disprove completion with direct evidence.
|
|
8
|
-
</identity>
|
|
6
|
+
Role: Verifier. Prove or disprove completion claims with reproducible evidence; missing evidence is not a pass.
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
Turn claims into reproducible proof or proof gaps by checking code, diffs, commands, diagnostics, tests, artifacts, and acceptance criteria. Missing evidence is a gap, not a pass, and the main thread remains responsible for final adjudication.
|
|
12
|
-
</goal>
|
|
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.
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
<scope_guard>
|
|
16
|
-
- Verify claims against observable evidence; do not trust implementation summaries.
|
|
17
|
-
- Distinguish failed behavior from unavailable or missing proof.
|
|
18
|
-
- Prefer fresh command output when available.
|
|
19
|
-
</scope_guard>
|
|
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.
|
|
20
11
|
|
|
21
|
-
|
|
22
|
-
<!-- OMX:GUIDANCE:VERIFIER:CONSTRAINTS:START -->
|
|
23
|
-
- Default reports to outcome-first, evidence-dense verdicts: name the claim, success criteria, validation evidence, gaps, and stop condition before adding process detail.
|
|
24
|
-
- Keep collaboration style direct and concise; do not expand verification scope beyond what materially proves or disproves the claim.
|
|
25
|
-
- For multi-step verification, start with a concise preamble that names the first check; keep intermediate updates brief and evidence-based.
|
|
26
|
-
- AUTO-CONTINUE for clear, already-requested, low-risk, reversible, local inspect-test-verify work; keep inspecting, testing, and verifying without permission handoff.
|
|
27
|
-
- ASK only for destructive, irreversible, credential-gated, external-production, or materially scope-changing actions, or when missing authority blocks progress.
|
|
28
|
-
- On AUTO-CONTINUE branches, do not use permission-handoff phrasing; state the next verification action or evidence-backed verdict.
|
|
29
|
-
- Use absolute language only for true invariants: safety, security, side-effect boundaries, required output fields, workflow state transitions, and product contracts.
|
|
30
|
-
- Keep gathering evidence until the verdict is grounded or blocked by a missing acceptance target or unavailable proof source.
|
|
31
|
-
- If correctness depends on additional tests, diagnostics, or inspection, keep using those tools until the verdict is grounded; stop once enough evidence proves the core claim.
|
|
32
|
-
- More verification effort does not mean unrelated tool churn; gather the proof that matters, not every possible artifact.
|
|
33
|
-
<!-- OMX:GUIDANCE:VERIFIER:CONSTRAINTS:END -->
|
|
34
|
-
- Ask only when the acceptance target is materially unclear and cannot be derived from repo or task history.
|
|
35
|
-
</ask_gate>
|
|
36
|
-
</constraints>
|
|
37
|
-
|
|
38
|
-
<execution_loop>
|
|
39
|
-
1. State what must be proven.
|
|
40
|
-
2. Inspect relevant files, diffs, outputs, and artifacts.
|
|
41
|
-
3. Run or review the commands that directly prove the claim.
|
|
42
|
-
4. Report proof status, evidence, gaps, risks, and any blocked proof source.
|
|
43
|
-
</execution_loop>
|
|
44
|
-
|
|
45
|
-
<success_criteria>
|
|
46
|
-
- Acceptance criteria are checked directly.
|
|
47
|
-
- Evidence is concrete and reproducible.
|
|
48
|
-
- Missing proof is called out explicitly.
|
|
49
|
-
- The verdict is grounded and actionable.
|
|
50
|
-
</success_criteria>
|
|
51
|
-
|
|
52
|
-
<verification_loop>
|
|
53
|
-
<!-- OMX:GUIDANCE:VERIFIER:INVESTIGATION:START -->
|
|
54
|
-
5) If a newer user instruction only changes the current verification target or report shape, apply that override locally without discarding earlier non-conflicting acceptance criteria; preserve traceability from each claim to evidence, validation command, or explicit proof gap.
|
|
55
|
-
<!-- OMX:GUIDANCE:VERIFIER:INVESTIGATION:END -->
|
|
56
|
-
Keep gathering the required evidence until the verdict is grounded or the proof source is unavailable.
|
|
57
|
-
</verification_loop>
|
|
58
|
-
|
|
59
|
-
<tools>
|
|
60
|
-
Use Read/Grep/Glob for evidence, diagnostics/test/build commands for behavior, and diff/history inspection when scope depends on recent changes.
|
|
61
|
-
</tools>
|
|
62
|
-
|
|
63
|
-
<style>
|
|
64
|
-
<output_contract>
|
|
65
|
-
## Verdict
|
|
66
|
-
- PASS / FAIL / PARTIAL
|
|
67
|
-
|
|
68
|
-
## Evidence
|
|
69
|
-
- `command or artifact` — result
|
|
70
|
-
|
|
71
|
-
## Gaps
|
|
72
|
-
- Missing or inconclusive proof
|
|
73
|
-
|
|
74
|
-
## Risks
|
|
75
|
-
- Remaining uncertainty or follow-up needed
|
|
76
|
-
</output_contract>
|
|
77
|
-
|
|
78
|
-
<scenario_handling>
|
|
79
|
-
- If the user says `continue`, keep gathering the required evidence instead of restating a partial verdict.
|
|
80
|
-
- If the user says `merge if CI green`, check relevant statuses, confirm they are green, and report the gate outcome.
|
|
81
|
-
</scenario_handling>
|
|
82
|
-
|
|
83
|
-
<stop_rules>
|
|
84
|
-
Stop only when the verdict is evidence-backed or the needed proof source/authority is unavailable.
|
|
85
|
-
</stop_rules>
|
|
86
|
-
</style>
|
|
87
|
-
|
|
88
|
-
<posture_overlay>
|
|
89
|
-
|
|
90
|
-
You are operating in the frontier-orchestrator posture.
|
|
91
|
-
- Prioritize intent classification before implementation.
|
|
92
|
-
- Default to delegation and orchestration when specialists exist.
|
|
93
|
-
- Treat the first decision as a routing problem: research vs planning vs implementation vs verification.
|
|
94
|
-
- Challenge flawed user assumptions concisely before execution when the design is likely to cause avoidable problems.
|
|
95
|
-
- Preserve explicit executor handoff boundaries: do not absorb deep implementation work when a specialized executor is more appropriate.
|
|
96
|
-
|
|
97
|
-
</posture_overlay>
|
|
98
|
-
|
|
99
|
-
<model_class_guidance>
|
|
100
|
-
|
|
101
|
-
This role is tuned for standard-capability models.
|
|
102
|
-
- Balance autonomy with clear boundaries.
|
|
103
|
-
- Prefer explicit verification and narrow scope control over speculative reasoning.
|
|
104
|
-
|
|
105
|
-
</model_class_guidance>
|
|
106
|
-
|
|
107
|
-
<native_subagent_leaf_guard>
|
|
108
|
-
|
|
109
|
-
Leaf native subagent: do not call Task, spawn_agent, or native child agents.
|
|
110
|
-
Use local tools; report missing specialist coverage to the leader.
|
|
111
|
-
|
|
112
|
-
</native_subagent_leaf_guard>
|
|
113
|
-
|
|
114
|
-
## OMX Agent Metadata
|
|
115
|
-
- role: verifier
|
|
116
|
-
- posture: frontier-orchestrator
|
|
117
|
-
- model_class: standard
|
|
118
|
-
- routing_role: leader
|
|
12
|
+
Output: concise Simplified Chinese. State pass, fail, partial, or evidence gap first; list evidence, gaps, residual risk, and stop conditions.
|
|
119
13
|
"""
|
|
@@ -42,6 +42,16 @@
|
|
|
42
42
|
"source": "templates/workflow/prompts/critic.md",
|
|
43
43
|
"target": ".codex/prompts/critic.md"
|
|
44
44
|
},
|
|
45
|
+
{
|
|
46
|
+
"kind": "prompt",
|
|
47
|
+
"source": "templates/workflow/prompts/executor.md",
|
|
48
|
+
"target": ".codex/prompts/executor.md"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "prompt",
|
|
52
|
+
"source": "templates/workflow/prompts/test-runner.md",
|
|
53
|
+
"target": ".codex/prompts/test-runner.md"
|
|
54
|
+
},
|
|
45
55
|
{
|
|
46
56
|
"kind": "prompt",
|
|
47
57
|
"source": "templates/workflow/prompts/test-engineer.md",
|
|
@@ -67,6 +77,16 @@
|
|
|
67
77
|
"source": "adapters/codex/agents/critic.toml",
|
|
68
78
|
"target": ".codex/agents/critic.toml"
|
|
69
79
|
},
|
|
80
|
+
{
|
|
81
|
+
"kind": "agent",
|
|
82
|
+
"source": "adapters/codex/agents/executor.toml",
|
|
83
|
+
"target": ".codex/agents/executor.toml"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"kind": "agent",
|
|
87
|
+
"source": "adapters/codex/agents/test-runner.toml",
|
|
88
|
+
"target": ".codex/agents/test-runner.toml"
|
|
89
|
+
},
|
|
70
90
|
{
|
|
71
91
|
"kind": "agent",
|
|
72
92
|
"source": "adapters/codex/agents/test-engineer.toml",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { JsonMap, Reason } from "./util.ts";
|
|
2
|
+
export type ArtifactRefExpected = {
|
|
3
|
+
kind?: string;
|
|
4
|
+
role?: string;
|
|
5
|
+
taskId?: string;
|
|
6
|
+
chainId?: string | null;
|
|
7
|
+
};
|
|
8
|
+
export type ApplyWorkerArtifactMaterializeInput = {
|
|
9
|
+
taskId: string;
|
|
10
|
+
kind: "worker_report" | "raw_transcript" | "diff_transcript" | "status_report";
|
|
11
|
+
role: "test-runner" | "executor" | "code-reviewer" | "verifier";
|
|
12
|
+
content: string | Buffer | JsonMap;
|
|
13
|
+
path?: string;
|
|
14
|
+
refPath?: string;
|
|
15
|
+
filename?: string;
|
|
16
|
+
workerChainContext?: "none" | "executor_worker";
|
|
17
|
+
applyWorkerChainId?: string;
|
|
18
|
+
originPacketFingerprint?: string;
|
|
19
|
+
sourceImplementationFingerprint?: unknown;
|
|
20
|
+
producedImplementationFingerprint?: unknown;
|
|
21
|
+
observedImplementationFingerprint?: unknown;
|
|
22
|
+
inputRefDigest?: string;
|
|
23
|
+
command?: string;
|
|
24
|
+
cwd?: string;
|
|
25
|
+
phase?: string;
|
|
26
|
+
testId?: string;
|
|
27
|
+
exitCode?: number;
|
|
28
|
+
maxBytes?: number;
|
|
29
|
+
metadata?: JsonMap;
|
|
30
|
+
};
|
|
31
|
+
export declare const APPLY_WORKER_MAX_INLINE_REPORT_CHARS = 12000;
|
|
32
|
+
export declare const APPLY_TEST_RUNNER_REPORT_REQUIRED_FIELDS: readonly ["role", "command", "command_source", "cwd", "phase", "task_id", "test_id", "exit_code", "semantic_status_candidate", "result_summary", "runtime_raw_transcript_ref", "repo_head", "pre_dirty_state", "post_dirty_state", "changed_files", "untracked_files", "invariant_refs", "source_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "observed_implementation_fingerprint", "guard_fingerprint", "unverified_items"];
|
|
33
|
+
export declare const APPLY_EXECUTOR_REPORT_REQUIRED_FIELDS: readonly ["role", "task_id", "apply_worker_chain_id", "cwd", "repo_head", "guard_fingerprint", "changed_files", "suggested_green_checks", "test_invariant_mapping", "runtime_artifact_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "produced_implementation_fingerprint", "unverified_items", "risk_notes"];
|
|
34
|
+
export declare const APPLY_CODE_REVIEW_REPORT_REQUIRED_FIELDS: readonly ["role", "review_status_candidate", "cwd", "repo_head", "guard_fingerprint", "executor_report_ref", "actual_changed_files", "changed_files", "untracked_files", "implementation_dirty_file_list", "implementation_fingerprint", "guard_artifact_manifest_fingerprint", "scope_verdict", "protected_path_verdict", "executor_report_mismatch", "test_invariant_mapping_verdict", "suggested_green_test_ids", "risk_notes", "runtime_raw_git_status_transcript_ref", "runtime_raw_git_diff_name_status_transcript_ref", "runtime_path_scoped_diff_transcript_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "observed_implementation_fingerprint", "unverified_items"];
|
|
35
|
+
export declare const APPLY_VERIFIER_REPORT_REQUIRED_FIELDS: readonly ["role", "verification_status_candidate", "task_completion_verdict", "chain_consistency_verdict", "acceptance_coverage_verdict", "invariant_coverage_verdict", "test_coverage_verdict", "cwd", "repo_head", "guard_fingerprint", "expected_freshness_fingerprint", "observed_freshness_fingerprint", "freshness_verdict", "green_test_run_evidence_refs", "executor_report_ref", "task_code_review_report_ref", "actual_changed_files", "changed_files", "untracked_files", "implementation_dirty_file_list", "implementation_fingerprint", "guard_artifact_manifest_fingerprint", "unexpected_guard_owned_dirty_paths", "scope_verdict", "protected_path_verdict", "executor_code_review_mismatch", "test_evidence_mismatch", "runtime_raw_git_status_transcript_ref", "runtime_raw_git_diff_name_status_transcript_ref", "runtime_path_scoped_diff_transcript_refs", "diff_summary_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "observed_implementation_fingerprint", "risk_notes", "triggered_stop_conditions", "unverified_items"];
|
|
36
|
+
export declare function apply_worker_implementation_fingerprint(repoRoot: string, changeRoot: string, expectedGuardRefs?: unknown[], opts?: {
|
|
37
|
+
declaredTaskWriteScope?: string[];
|
|
38
|
+
protectedPathRefs?: unknown[];
|
|
39
|
+
}): JsonMap;
|
|
40
|
+
export declare function apply_worker_protected_path_refs(repoRoot: string, changeRoot: string, expectedGuardRefs?: unknown[]): JsonMap[];
|
|
41
|
+
export declare function worker_input_ref_digest(refs: unknown[]): string;
|
|
42
|
+
export declare function apply_worker_executor_input_ref_digest(evidences: JsonMap[], active: JsonMap): string;
|
|
43
|
+
export declare function apply_worker_guard_artifact_manifest_fingerprint(items: JsonMap): JsonMap;
|
|
44
|
+
export declare function fingerprint_digest(value: unknown): string;
|
|
45
|
+
export declare function fingerprint_matches(actual: unknown, expected: unknown): boolean;
|
|
46
|
+
export declare function read_pinned_artifact_json(changeRoot: string, refItem: unknown): JsonMap | null;
|
|
47
|
+
export declare function materialize_apply_worker_artifact_ref(changeRoot: string, input: ApplyWorkerArtifactMaterializeInput): JsonMap;
|
|
48
|
+
export declare function pinned_artifact_ref_reasons(changeRoot: string, refItem: unknown, label: string, expected?: ArtifactRefExpected, code?: string): Reason[];
|
|
49
|
+
export declare function worker_test_run_reasons(changeRoot: string, ev: JsonMap, taskId: string, chainId: string | null, code?: string): Reason[];
|
|
50
|
+
export declare function pre_edit_evidence_ref_reasons(evidences: JsonMap[], active: JsonMap | null | undefined, taskId: string, code?: string): Reason[];
|
|
51
|
+
export declare function compute_apply_worker_freshness(repoRoot: string, changeRoot: string, evidences: JsonMap[], taskId: string, chainId: string, refs: {
|
|
52
|
+
executor_report_ref: unknown;
|
|
53
|
+
task_code_review_report_ref: unknown;
|
|
54
|
+
green_test_run_evidence_ref: string;
|
|
55
|
+
green_test_run_evidence_refs?: string[];
|
|
56
|
+
verifier_report_ref?: unknown;
|
|
57
|
+
}): JsonMap;
|