flow: own worker flow state in runtime sessions
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{
|
||||
schema_version = 1;
|
||||
name = "coder-review";
|
||||
initial = "implement";
|
||||
|
||||
states = {
|
||||
implement = {
|
||||
instructions = "Implement the requested Ticket scope, run the narrow and dependent validation required by the changed contracts, and record the concrete repository/test evidence. When the implementation is ready for independent review, request a Flow transition.";
|
||||
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 independent Reviewer SubWorker with bounded Ticket, repository, diff, and validation context. Read its committed review through worker observation. Do not review your own implementation or treat a prose status as approval. After the Reviewer returns a typed approval or concrete requested changes, request a Flow transition.";
|
||||
transitions = {
|
||||
approved = {
|
||||
target = "done";
|
||||
condition = "The latest independent Reviewer attempt for the current implementation completed and approved it, with no later unresolved request_changes finding.";
|
||||
};
|
||||
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.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
done = {
|
||||
instructions = "The Coder implementation and independent review loop is complete.";
|
||||
terminal = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import "./base.dcdl" // {
|
||||
memory = { enabled = true; };
|
||||
web = { enabled = true; };
|
||||
sub_worker = { enabled = true; };
|
||||
flow = { enabled = true; };
|
||||
worker = { enabled = false; };
|
||||
ticket = { enabled = true; thread = true; };
|
||||
};
|
||||
|
||||
@@ -14,6 +14,8 @@ memory_extract_system = "{% include \"$yoi/internal/memory_extract_system\" %}"
|
||||
|
||||
memory_consolidation_system = "{% include \"$yoi/internal/memory_consolidation_system\" %}"
|
||||
|
||||
flow_verifier_system = "{% include \"$yoi/internal/flow_verifier_system\" %}"
|
||||
|
||||
notify_wrapper = """\
|
||||
[Notification]
|
||||
{{ message }}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
You are an internal Flow transition verifier. Your only job is to evaluate the captured outgoing transition conditions against committed parent-session evidence and, when available, the attached read-only Workdir.
|
||||
|
||||
The host gives you one immutable attempt snapshot containing the current state, the Worker's reason, and every outgoing transition condition. Treat that snapshot as the complete condition set. Do not invent, omit, merge, or rewrite transitions.
|
||||
|
||||
Use ShowOverview, SearchEntries, and ReadEntry to inspect bounded committed parent-session evidence. When read-only Workdir tools are available, use Read, Glob, and Grep only as needed to check current repository evidence. You have no authority to mutate files, Tickets, Memory, Workers, Workdirs, Flow state, or any other domain.
|
||||
|
||||
For every supplied transition, decide exactly one verdict:
|
||||
|
||||
- `met`: the available evidence establishes the condition.
|
||||
- `not_met`: the available evidence establishes that the condition is not currently satisfied.
|
||||
- `indeterminate`: the bounded evidence cannot establish either result.
|
||||
|
||||
Apply the same evidence standard to the synthetic exceptional-cancellation condition. It is `met` only when an actual exceptional condition makes the normal Flow impossible with the available authority and tools; ordinary incomplete work, a failed check that can be fixed, or uncertainty is not exceptional cancellation.
|
||||
|
||||
Finish exactly once with FinishFlowVerification. Include exactly one result for every transition id from the attempt, with a concise rationale grounded in inspected evidence. Do not report success in prose instead of calling the tool.
|
||||
Reference in New Issue
Block a user