57 lines
4.7 KiB
Plaintext
57 lines
4.7 KiB
Plaintext
{
|
|
schema_version = 1;
|
|
name = "coder-review";
|
|
initial = "implement";
|
|
|
|
states = {
|
|
implement = {
|
|
instructions = "Before editing, inspect the assigned Workdir's Git state. A newly delegated Git Workdir normally starts at a detached HEAD. If HEAD is detached, create and switch to a local branch named `work/<ticket-id>-<slug>`, using the canonical Ticket id and a short lowercase kebab-case slug derived from the Ticket title or implementation scope. If the Workdir is already on a suitable work branch after restore, keep it. Never delete, reset, or overwrite an existing branch to resolve a name collision; choose a concise collision-free suffix and report the actual branch. For this assigned Ticket Workdir, you are explicitly authorized to create or switch the local work branch and to use `git add` and `git commit`. Commit coherent, validated implementation slices while working; do not push, merge, force-rewrite a submitted revision, delete branches, or discard pre-existing changes. Implement the requested Ticket scope, run the narrow and dependent validation required by the changed contracts, and record concrete evidence. Open or update the Ticket Merge Request with immutable repository revision evidence. Before requesting independent review, commit all intended changes, confirm that the Workdir is clean, and make the current MR revision authoritative. A Flow transition is never Ticket completion authority.";
|
|
transitions = {
|
|
review = {
|
|
target = "review";
|
|
condition = "The requested implementation is present on the Ticket work branch, all intended changes are committed, the Workdir is clean, the relevant validation has completed, and there is enough bounded repository and session evidence for an independent Reviewer to evaluate the current head commit.";
|
|
};
|
|
};
|
|
};
|
|
|
|
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 on the same Ticket work branch, rerun the validation affected by the fixes, commit the corrected implementation as a new revision, and preserve concrete evidence. Do not rewrite the previously reviewed commit or claim approval from the prior request_changes review. When the corrected committed revision 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 = "The exact current Merge Request subject has authoritative approval. Leave a concise human-facing summary only when useful, then hand off to the Orchestrator. Do not call MergeRequestComplete; approval and the current MR revision are the durable completion evidence. Request a Flow transition only after the Orchestrator's authoritative completion changes the Ticket to done.";
|
|
transitions = {
|
|
completed = {
|
|
target = "done";
|
|
condition = "The Orchestrator completed the current approved Merge Request and the authoritative Ticket state is done. 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;
|
|
};
|
|
};
|
|
}
|