Skip to content

feat(coding-agent/modes): upgraded the workflowz keyword into a delegate-first DAG execution mode#2671

Open
metaphorics wants to merge 1 commit into
can1357:mainfrom
metaphorics:ultra/workflowz
Open

feat(coding-agent/modes): upgraded the workflowz keyword into a delegate-first DAG execution mode#2671
metaphorics wants to merge 1 commit into
can1357:mainfrom
metaphorics:ultra/workflowz

Conversation

@metaphorics

@metaphorics metaphorics commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Rewrites the workflowz magic keyword's hidden notice into a delegate-first DAG execution contract: decompose the task and fan the work over subagents as an acyclic graph (via the eval pipeline/parallel runtime with handle piping), with certainty-before-code, a skill survey, a plan-agent gate, a scenario contract, evidence-bound manual QA, TDD, and a reviewer gate. It references only bundled agents and does NOT change thinking effort.

Tests

Detection / highlight / notice-contract regression test; bun check green.

Depends on #2662.
Closes #2670.

…ate-first DAG execution mode

- Rewrote the `workflowz` hidden notice into a delegate-first DAG execution contract: decompose the task and fan the work over subagents as an acyclic graph (certainty-before-code, skill survey, plan-agent gate, delegate-as-a-DAG via the eval pipeline/parallel runtime with handle piping, scenario contract, evidence-bound manual QA, TDD, reviewer gate). It references only bundled agents and does NOT change thinking effort.
- No new magic-keyword names: the keyword remains `workflowz` only (detection, highlighter, and fast-path unchanged in surface).
- Updated the magicKeywords.workflow setting description and the detection + notice-contract regression test.
Copilot AI review requested due to automatic review settings June 15, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the workflowz keyword’s hidden system notice to a more explicit delegate-first DAG execution contract and aligns tests/docs accordingly.

Changes:

  • Rewrote WORKFLOW_NOTICE content to a DAG/discipline contract (plan gate, scenario contract, evidence-bound QA, reviewer gate, etc.) and documented that it does not change thinking effort.
  • Updated workflow notice tests to assert the new contract text and agent references.
  • Refreshed related inline documentation / settings schema description.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/coding-agent/test/modes/workflow.test.ts Adjusts tests for keyword detection and the updated workflow notice contract.
packages/coding-agent/src/prompts/system/workflow-notice.md Replaces the hidden notice with a structured delegate-first DAG execution contract.
packages/coding-agent/src/modes/workflow.ts Updates docstrings to match the new notice semantics.
packages/coding-agent/src/modes/magic-keywords.ts Minor comment tweak describing the fast-path check.
packages/coding-agent/src/config/settings-schema.ts Updates the setting description to reflect the new workflow contract.
packages/coding-agent/CHANGELOG.md Notes the workflow notice change under Unreleased.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +11 to 14
it("matches the standalone workflowz keyword delimited by whitespace", () => {
expect(containsWorkflow("workflowz")).toBe(true);
expect(containsWorkflow("please workflowz this rollout")).toBe(true);
expect(containsWorkflow("design the workflowz")).toBe(true);
expect(containsWorkflow("run these workflowz")).toBe(true);
});
Comment on lines +56 to +61
it("references only bundled agents (no critic / deep_task)", () => {
expect(WORKFLOW_NOTICE).toContain("agent: plan");
expect(WORKFLOW_NOTICE).toContain("agent: reviewer");
expect(WORKFLOW_NOTICE).not.toContain("critic");
expect(WORKFLOW_NOTICE).not.toContain("deep_task");
});

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39fc979fc4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Keep going until the task is closed — a returned fan-out is a step, not a stopping point.
</execution>
## 9. Fan-out toolkit
The delegation mechanism is the `eval` runtime (full helper reference lives in the `eval` tool description): `agent()` (one subagent; `schema=` to branch on a validated object; `return_handle` for a DAG node carrying the `agent://` handle), `parallel()` (one wave), `pipeline()` (staged waves, barrier between stages), `completion()` (cheap stateless scoring inside a fan-out), plus `budget`/`log`/`phase`. Compose the harness the task calls for — **adversarial-verify** (N skeptics per finding, each prompted to refute, keep on majority survive), **judge-panel** (N approaches scored by parallel judges, synthesize the winner), **loop-until-dry** (keep spawning finders until K rounds surface nothing new, dedup against everything seen). Scale fan-out to the ask. A returned fan-out is a step, not a stopping point — keep going until every scenario passes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the unsupported return_handle contract

When a workflowz turn follows this new DAG guidance, the notice tells the model to use agent(..., return_handle=...), but the eval helper only accepts prompt, agent_type, model, label, and schema (as shown in src/prompts/tools/eval.md and implemented in src/eval/py/prelude.py). In Python eval this raises TypeError: agent() got an unexpected keyword argument 'return_handle' before any subagent can spawn, so handle-piped DAG workflows break precisely in the mode this notice is meant to enable.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

modes: upgrade workflowz into a delegate-first DAG execution mode

2 participants