feat: scope merge request tools by profile flags
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
};
|
||||
|
||||
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.";
|
||||
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 MergeRequestReview; prose output and Worker observation are not approval authority. After the structured current-revision result exists, request a Flow transition.";
|
||||
transitions = {
|
||||
approved = {
|
||||
target = "complete";
|
||||
@@ -39,17 +39,17 @@
|
||||
};
|
||||
|
||||
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.";
|
||||
instructions = "Leave concise implementation and validation evidence on the Ticket, then hand off the exact approved Merge Request revision to the Orchestrator for readiness and integration. Do not call MergeRequestComplete; Coder approval handoff is not Ticket completion authority. After durable handoff evidence exists, 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.";
|
||||
condition = "The exact approved Merge Request revision and implementation evidence have been durably handed off to the Orchestrator. A Flow state or prose report alone is never Ticket completion authority.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
done = {
|
||||
instructions = "The guarded Merge Request completion operation committed Ticket state done. Flow terminal state only reflects that durable authority.";
|
||||
instructions = "The approved implementation has been handed off for Orchestrator-owned readiness and integration. Flow terminal state only reflects that handoff.";
|
||||
terminal = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -30,6 +30,13 @@ feature = {
|
||||
worker = { enabled = false; };
|
||||
objective = { enabled = true; };
|
||||
ticket = { enabled = true; authoring = true; thread = true; };
|
||||
merge_request = {
|
||||
show = false;
|
||||
open = false;
|
||||
review = false;
|
||||
readiness_check = false;
|
||||
complete = false;
|
||||
};
|
||||
};
|
||||
|
||||
memory = {
|
||||
|
||||
@@ -12,5 +12,12 @@ import "./base.dcdl" // {
|
||||
flow = { enabled = true; };
|
||||
worker = { enabled = true; };
|
||||
ticket = { enabled = true; thread = true; };
|
||||
merge_request = {
|
||||
show = true;
|
||||
open = true;
|
||||
review = false;
|
||||
readiness_check = false;
|
||||
complete = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -12,6 +12,13 @@ import "./base.dcdl" // {
|
||||
worker = { enabled = true; direct_spawn = false; };
|
||||
manage_workdir = { enabled = true; };
|
||||
ticket = { enabled = true; thread = true; workflow = true; };
|
||||
merge_request = {
|
||||
show = true;
|
||||
open = false;
|
||||
review = false;
|
||||
readiness_check = true;
|
||||
complete = true;
|
||||
};
|
||||
orchestration = { enabled = true; };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,5 +11,12 @@ import "./base.dcdl" // {
|
||||
sub_worker = { enabled = false; };
|
||||
worker = { enabled = false; };
|
||||
ticket = { enabled = true; thread = false; };
|
||||
merge_request = {
|
||||
show = true;
|
||||
open = false;
|
||||
review = true;
|
||||
readiness_check = false;
|
||||
complete = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ let
|
||||
defaultDocument = import "./default.md";
|
||||
commonLanguage = import "./common/language.md";
|
||||
commonGit = import "./common/git.md";
|
||||
commonMergeRequest = import "./common/merge-request.md";
|
||||
commonTickets = import "./common/tickets.md";
|
||||
commonToolUsage = import "./common/tool-usage.md";
|
||||
commonWorkerObservation = import "./common/worker-observation.md";
|
||||
@@ -36,6 +37,7 @@ in
|
||||
common = {
|
||||
git = commonGit.content;
|
||||
language = commonLanguage.content;
|
||||
merge_request = commonMergeRequest.content;
|
||||
tickets = commonTickets.content;
|
||||
tool_usage = commonToolUsage.content;
|
||||
worker_observation = commonWorkerObservation.content;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
## Merge Request workflow
|
||||
|
||||
Use only the exposed Merge Request operations; their availability expresses this Worker's workflow responsibility, not authorization to bypass Backend validation.
|
||||
{% if "MergeRequestShow" in tools %}
|
||||
- Reread the current Merge Request and append-only thread with `MergeRequestShow` before making review or integration decisions.
|
||||
{% endif %}
|
||||
{% if "MergeRequestOpen" in tools %}
|
||||
- Open the Merge Request only after all intended changes are committed and the Workdir is clean. Use immutable source and target selectors; do not infer target authority from a branch name or cwd.
|
||||
- Before requesting independent review, make the exact current MR revision authoritative.
|
||||
{% endif %}
|
||||
{% if "MergeRequestReview" in tools %}
|
||||
- Review the exact current immutable MR revision independently. Submit the authoritative verdict through `MergeRequestReview`; prose alone is not approval.
|
||||
{% endif %}
|
||||
{% if "MergeRequestReadinessCheck" in tools %}
|
||||
- Use `MergeRequestReadinessCheck` to resolve current refs and authoritative review readiness before integration.
|
||||
{% endif %}
|
||||
{% if "MergeRequestComplete" in tools %}
|
||||
- Complete integration only after readiness confirms approval for the exact current revision and all target/ref guards pass. Merge completion is separate from implementation and review evidence.
|
||||
{% endif %}
|
||||
@@ -4,6 +4,6 @@ Treat the first committed user message as the bounded Ticket/action context and
|
||||
|
||||
{% include "common.git" %}
|
||||
|
||||
Before review, open a Merge Request with immutable `selector_from` / `selector_to`. Spawn the Reviewer only as your actual direct-child `builtin:reviewer` SubWorker, delegate read-only scope, and pass only the Ticket id in the structured review handoff. The host resolves `selector_from`, captures the immutable `subject_ref`, appends `ReviewRequested`, and injects the review capability; commit/ref identity is not model input. Reviewer prose is not approval: the child must commit `MergeRequestReviewSubmit` through its injected capability authority.
|
||||
Before review, open a Merge Request with immutable `selector_from` / `selector_to`. Spawn the Reviewer only as your actual direct-child `builtin:reviewer` SubWorker, delegate read-only scope, and pass only the Ticket id in the structured review handoff. The host resolves `selector_from`, captures the immutable `subject_ref`, appends `ReviewRequested`, and injects the review capability; commit/ref identity is not model input. Reviewer prose is not approval: the child must commit `MergeRequestReview` through its injected capability authority.
|
||||
|
||||
A request-changes result requires a fresh Reviewer child request. Flow terminal state is not Ticket completion authority. Complete only through `MergeRequestComplete` with a unique operation id, the approved `Review` event id, and final target-ref evidence; the Server re-resolves selectors, revalidates assignment, and fences Ticket state side effects.
|
||||
A request-changes result requires a fresh Reviewer child request. Flow terminal state is not Ticket completion authority. After the exact current Merge Request revision has authoritative approval, leave concise implementation evidence on the Ticket and hand off integration to the Orchestrator. Do not call `MergeRequestComplete`.
|
||||
|
||||
@@ -2,6 +2,6 @@ You are the Ticket Reviewer role running as an actual Runtime-owned direct child
|
||||
|
||||
Keep role behavior here and treat the first committed user message as bounded Ticket/Merge Request context only. Review the host-captured `ReviewRequested.subject_ref` against Ticket intent, binding decisions/invariants, acceptance criteria, and project design boundaries. Use read-only inspection and focused validation; do not merge, close, mutate the Workdir, or take over implementation.
|
||||
|
||||
Your prose response is not review authority. Before finishing, call `MergeRequestReviewSubmit` exactly once with `approve` or `request_changes`, a bounded evidence summary, and concrete structured findings. Capability authority and subject identity are injected by your child Workspace client and are not model inputs. The Server re-resolves `selector_from`; if it moved, submission records cancellation and fails rather than approving stale work.
|
||||
Your prose response is not review authority. Before finishing, call `MergeRequestReview` exactly once with `approve` or `request_changes`, a bounded evidence summary, and concrete structured findings. Capability authority and subject identity are injected by your child Workspace client and are not model inputs. The Server re-resolves `selector_from`; if it moved, submission records cancellation and fails rather than approving stale work.
|
||||
|
||||
Review more than the diff: verify the implementation satisfies the Ticket intent and acceptance criteria, remains coherent with the codebase design, and does not introduce unnecessary compatibility.
|
||||
|
||||
Reference in New Issue
Block a user