返回 CodeWhale
stopship.workflow.js
根目录 / .codewhale / workflows / stopship.workflow.js
1 export default workflow({
2 "id": "stopship-release-acceptance",
3 "goal": "Verify the current Codewhale Fleet, Workflow, Lane, Runtime, and gate receipt path without changing the workspace",
4 "description": "Version-neutral, read-only release acceptance fixture. Every Fleet role inspects checked-in runtime evidence; no step creates branches, edits files, installs dependencies, or publishes anything.",
5 "gates": [
6 {
7 "id": "explore-evidence",
8 "role": "explore",
9 "on": "role_complete",
10 "gate": "approve",
11 "on_fail": "block",
12 "blocks_role": "implement",
13 "max_retries": 0,
14 "artifact_kind": "source_evidence",
15 "require_explicit_verdict": true
16 },
17 {
18 "id": "implement-plan",
19 "role": "implement",
20 "on": "role_complete",
21 "gate": "approve",
22 "on_fail": "block",
23 "blocks_role": "reviewer",
24 "max_retries": 0,
25 "artifact_kind": "verification_plan",
26 "require_explicit_verdict": true
27 },
28 {
29 "id": "review-findings",
30 "role": "reviewer",
31 "on": "role_complete",
32 "gate": "review",
33 "on_fail": "block",
34 "blocks_role": "test",
35 "max_retries": 0,
36 "artifact_kind": "review_report",
37 "require_explicit_verdict": true
38 },
39 {
40 "id": "test-evidence",
41 "role": "test",
42 "on": "role_complete",
43 "gate": "verify",
44 "on_fail": "block",
45 "blocks_role": "release_lead",
46 "max_retries": 0,
47 "artifact_kind": "verification_report",
48 "require_explicit_verdict": true
49 },
50 {
51 "id": "release-receipt",
52 "role": "release_lead",
53 "on": "role_complete",
54 "gate": "approve",
55 "on_fail": "block",
56 "max_retries": 0,
57 "artifact_kind": "final_receipt",
58 "require_explicit_verdict": true
59 }
60 ],
61 "nodes": [
62 {
63 "sequence": {
64 "id": "acceptance-chain",
65 "children": [
66 {
67 "agent": {
68 "id": "explore-runtime",
69 "prompt": "Verify the runtime release-orchestration owners using only the five files in scope. The host's typed run_started receipt already owns the compiled Workflow id and source path; do not re-verify the Workflow alias. `grep_files` is available directly on your surface; call it without any activation step. Use `grep_files` with `path` set to `.`, `include` set exactly to [`.codewhale/fleets/stopship.toml`, `crates/cli/src/lib.rs`, `crates/workflow/src/role_resolve.rs`, `crates/engine/src/tools/workflow/mod.rs`, `crates/lane/src/runtime.rs`], and `pattern` set to this high-signal alternation: `name = \"stopship\"|load_named_fleet|start_lane|resolve_workflow_agent|record_task_started|WorkflowUiEventKind::GateUpdated|WorkflowUiEventKind::RunCompleted|terminal_completed_receipt|process_exit_receipt|lane_reconciled|tmux_reconcile_folds_detached_process_exit_into_lane_status|stopship_acceptance_fixture_emits_role_gate_and_terminal_receipts`. Set `max_results` to 80 and `context_lines` to 2. Matches outside that exact include list do not count. Do not add generic field names such as `resolved_profile` or `exit_code` to the pattern. Read and search these files as needed to establish each owner before returning your verdict. Treat an exact match naming a call site, typed event constructor, reconciliation branch, or test assertion in a scoped file as source-owner evidence. Apply this decision rule literally: if you can populate all seven required SOURCE EVIDENCE entries from the search result, return APPROVE; never return BLOCK after citing all seven. Return BLOCK only when at least one named owner has no matching citation, and identify each missing owner as MISSING. The first non-empty line of your response must be exactly APPROVE or exactly BLOCK. Do not put any words before that verdict: no confirmation, summary, heading, or phrase such as `Here is the verdict`. After the verdict, include a `SOURCE EVIDENCE` section with concise `path: symbol` evidence for named Fleet loading, role-to-profile resolution, tmux Lane launch, typed task_started, gate_updated, terminal run_completed, and tmux process-exit reconciliation receipts. The terminal run_completed entry must carry both the `WorkflowUiEventKind::RunCompleted` constructor and the `terminal_completed_receipt` integration assertion. A bare verdict is invalid. Do not edit files, create branches, run shell commands, access GitHub, or infer success where source evidence is absent.",
70 "agent_type": "explore",
71 "role": "explore",
72 "mode": "read_only",
73 "file_scope": [
74 ".codewhale/fleets/stopship.toml",
75 "crates/cli/src/lib.rs",
76 "crates/workflow/src/role_resolve.rs",
77 "crates/engine/src/tools/workflow/mod.rs",
78 "crates/lane/src/runtime.rs"
79 ]
80 }
81 },
82 {
83 "agent": {
84 "id": "plan-verification",
85 "prompt": "Act as the Fleet implement role for a verification-only acceptance run. Use only the promoted explore source_evidence handoff to produce a no-edit verification plan for the Fleet/Workflow/Lane/Runtime contract. Tools are intentionally unavailable because the promoted handoff is the evidence boundary; do not request source reads or gather new evidence. Return APPROVE or BLOCK after reviewing the promoted evidence. After that verdict, include a compact `PLAN` section that copies exact `path: symbol` citations for all seven owners from source_evidence: named Fleet loading, role-to-profile resolution, tmux Lane launch, typed task_started, gate_updated, terminal run_completed, and tmux process-exit reconciliation. Use one concise row per owner and no explanatory prose so the seven-owner matrix survives handoff compaction. The Workflow row must carry both the `WorkflowUiEventKind::RunCompleted` constructor and the `terminal_completed_receipt` integration assertion. The Lane-exit row must carry a `crates/lane/src/runtime.rs` citation for `process_exit_receipt`, `lane_reconciled`, or its reconciliation test; `start_lane` alone is not terminal evidence. A bare verdict is invalid. The first non-empty line of your response must be exactly APPROVE or exactly BLOCK. Do not put any words before that verdict: no confirmation, summary, heading, or phrase such as `Here is the verdict`. Use APPROVE only when that complete concrete plan can be produced from the handoff; otherwise use BLOCK. This is deliberately not an implementation task: do not edit files, create branches, run shell commands, or propose fixes unrelated to missing acceptance evidence.",
86 "agent_type": "implement",
87 "role": "implement",
88 "mode": "read_only",
89 "permissions": { "deny_all_tools": true },
90 "file_scope": [
91 ".codewhale/fleets/stopship.toml",
92 "crates/cli/src/lib.rs",
93 "crates/workflow/src/role_resolve.rs",
94 "crates/engine/src/tools/workflow/mod.rs",
95 "crates/lane/src/runtime.rs"
96 ]
97 }
98 },
99 {
100 "agent": {
101 "id": "review-contract",
102 "prompt": "Review only the promoted verification_plan handoff against the source_evidence citations it carries. Tools are intentionally unavailable because promoted handoffs are the evidence boundary; do not request source reads or gather new evidence. Return APPROVE or BLOCK after reviewing the promoted evidence. After that verdict, include a compact `EVIDENCE REVIEW` section that carries forward exact `path: symbol` citations for all seven owners: named Fleet loading, role-to-profile resolution, tmux Lane launch, typed task_started, gate_updated, terminal run_completed, and tmux process-exit reconciliation. Use one concise row per owner and no explanatory prose so the seven-owner matrix survives handoff compaction. Accept Workflow terminal evidence only when the plan carries both the `WorkflowUiEventKind::RunCompleted` constructor and the `terminal_completed_receipt` integration assertion. Accept tmux terminal evidence only when the plan carries a `crates/lane/src/runtime.rs` process-exit reconciliation or reconciliation-test citation alongside that Workflow evidence. A bare verdict is invalid. The first non-empty line of your response must be exactly APPROVE or exactly BLOCK. Do not put any words before that verdict: no confirmation, summary, heading, or phrase such as `Here is the verdict`. Use APPROVE only when every owner has a concrete source citation in the promoted evidence; otherwise use BLOCK and list the missing evidence. Remain read-only and do not run shell commands or edit anything.",
103 "agent_type": "reviewer",
104 "role": "reviewer",
105 "mode": "read_only",
106 "permissions": { "deny_all_tools": true },
107 "file_scope": [
108 ".codewhale/fleets/stopship.toml",
109 "crates/cli/src/lib.rs",
110 "crates/workflow/src/role_resolve.rs",
111 "crates/engine/src/tools/workflow/mod.rs",
112 "crates/lane/src/runtime.rs"
113 ]
114 }
115 },
116 {
117 "agent": {
118 "id": "verify-receipts",
119 "prompt": "Statically verify only the promoted review_report and the source-evidence citations it carries against the required receipt contract. Tools are intentionally unavailable because promoted handoffs are the evidence boundary; do not request source reads or gather new evidence. Return APPROVE or BLOCK after reviewing the promoted evidence. After that verdict, include a compact `EVIDENCE MATRIX` that carries forward exact test names or `path: symbol` citations for all seven owners: named Fleet loading, role-to-profile resolution, tmux Lane launch, typed task_started, gate_updated, terminal run_completed, and tmux process-exit reconciliation. Use one concise row per owner and no explanatory prose so the seven-owner matrix survives handoff compaction. The Workflow row must carry both the `WorkflowUiEventKind::RunCompleted` constructor and the `terminal_completed_receipt` integration assertion. The Lane-exit row must cite `crates/lane/src/runtime.rs` process-exit reconciliation rather than only `start_lane`. A bare verdict is invalid. The first non-empty line of your response must be exactly APPROVE or exactly BLOCK. Do not put any words before that verdict: no confirmation, summary, heading, or phrase such as `Here is the verdict`. Use APPROVE only when every required owner is covered; otherwise use BLOCK. Do not run commands, edit files, or create build artifacts; the host gate interprets the explicit first-line verdict.",
120 "agent_type": "test",
121 "role": "test",
122 "mode": "read_only",
123 "permissions": { "deny_all_tools": true },
124 "file_scope": [
125 ".codewhale/fleets/stopship.toml",
126 "crates/cli/src/lib.rs",
127 "crates/workflow/src/role_resolve.rs",
128 "crates/engine/src/tools/workflow/mod.rs",
129 "crates/lane/src/runtime.rs"
130 ]
131 }
132 },
133 {
134 "agent": {
135 "id": "release-receipt",
136 "prompt": "Use only the promoted verification_report handoff to produce the final acceptance receipt for the Fleet/Workflow/Lane/Runtime contract. Tools are intentionally unavailable because promoted handoffs are the evidence boundary; do not request source reads or gather new evidence. Return APPROVE or BLOCK after reviewing the promoted evidence. After that verdict, include a compact `FINAL RECEIPT` section that carries forward exact `path: symbol` citations for all seven owners: named Fleet loading, role-to-profile resolution, tmux Lane launch, typed task_started, gate_updated, terminal run_completed, and tmux process-exit reconciliation. Use one concise row per owner and no explanatory prose. The Workflow row must carry both the `WorkflowUiEventKind::RunCompleted` constructor and the `terminal_completed_receipt` integration assertion. A bare verdict is invalid. The first non-empty line of your response must be exactly APPROVE or exactly BLOCK. Do not put any words before that verdict: no confirmation, summary, heading, or phrase such as `Here is the verdict`. Use APPROVE only when that complete static receipt can be produced from the handoff; otherwise use BLOCK and name the closure blocker. Never claim that source inspection substitutes for the host's live Workflow or Lane terminal events; the host validates the actual run_completed and process-exit reconciliation receipts after this role completes. Do not edit, publish, close issues, run shell commands, or mutate the workspace.",
137 "agent_type": "general",
138 "role": "release_lead",
139 "mode": "read_only",
140 "permissions": { "deny_all_tools": true },
141 "file_scope": [
142 ".codewhale/fleets/stopship.toml",
143 "crates/cli/src/lib.rs",
144 "crates/workflow/src/role_resolve.rs",
145 "crates/engine/src/tools/workflow/mod.rs",
146 "crates/lane/src/runtime.rs"
147 ]
148 }
149 }
150 ]
151 }
152 }
153 ]
154 });
155
155 lines JAVASCRIPT