Files
yoi/resources/flows/coder-review.dcdl
T

57 lines
3.5 KiB
Plaintext

{
schema_version = 1;
name = "coder-review";
initial = "implement";
states = {
implement = {
instructions = "Open or update the Ticket Merge Request with immutable repository revision evidence, run the narrow and dependent validation required by the changed contracts, and record concrete evidence. When the current MR revision is ready for independent review, request a Flow transition. A Flow transition is never Ticket completion authority.";
transitions = {
review = {
target = "review";
condition = "The requested implementation is present, the relevant validation has completed, and there is enough bounded repository and session evidence for an independent Reviewer to evaluate the change.";
};
};
};
review = {
instructions = "Spawn one actual direct-child SubWorker with profile builtin:reviewer, read-only scope, and a structured review handoff bound to the current immutable Merge Request revision. The child must commit MergeRequestReviewSubmit; prose output and Worker observation are not approval authority. After the structured current-revision result exists, request a Flow transition.";
transitions = {
approved = {
target = "complete";
condition = "The authoritative Merge Request current revision has a structured approve result from its registered direct-child builtin:reviewer attempt, with no later unresolved request_changes finding. The Flow transition itself does not complete the Ticket.";
};
changes_requested = {
target = "fix";
condition = "The latest independent Reviewer attempt for the current implementation requested one or more concrete changes that remain unresolved.";
};
};
};
fix = {
instructions = "Resolve every open Reviewer finding, rerun the validation affected by the fixes, and preserve concrete evidence. Do not claim approval from the prior request_changes review. When the corrected implementation is ready for a new independent review, request a Flow transition.";
transitions = {
review = {
target = "review";
condition = "Every finding from the latest request_changes review has been addressed with relevant validation evidence, and the corrected implementation is ready for a fresh independent Reviewer attempt.";
};
};
};
complete = {
instructions = "Call MergeRequestComplete with a fresh operation_id and the approved current revision. The Server must revalidate current assignment, immutable revision, registered Reviewer attempt, and Ticket inprogress CAS. Only after the authoritative operation returns Ticket state done, request a Flow transition.";
transitions = {
completed = {
target = "done";
condition = "MergeRequestComplete durably returned done for this exact operation_id and current approved revision. A Flow state or prose report alone is never sufficient.";
};
};
};
done = {
instructions = "The guarded Merge Request completion operation committed Ticket state done. Flow terminal state only reflects that durable authority.";
terminal = true;
};
};
}