Skip to content

Orchestrator and worker bypass mandatory workflow phases — semantic traces never generated, worker bootstrap pre-digested #86

@m2ux

Description

@m2ux

Problem Statement

The workflow-server defines a mandatory orchestrator/worker execution model with specific phase requirements. In practice, both the orchestrator and worker routinely violate these requirements: the orchestrator pre-digests activity instructions instead of letting the worker self-bootstrap via next_activity and get_skills, and the worker skips mandatory phases — most critically the write-semantic-trace phase defined in the execute-activity skill, which has never produced a trace file in any work package execution.

Current state:

  • The orchestrator pre-processes and summarizes activity definitions, skill protocols, and resources before dispatching to the worker, rather than passing the session token and letting the worker call next_activity and get_skills itself
  • The write-semantic-trace phase (marked MANDATORY in the execute-activity skill) has never generated a trace file — the worker consistently skips it before calling report-completion
  • The worker does not follow the complete skill protocol sequence; phases are arbitrarily omitted without error or enforcement
  • The orchestrator selectively ignores its own discipline rules (e.g., rule docs: Schema documentation with usage examples #10: "The orchestrator MUST NOT execute activity steps, write code, review code, or produce artifacts")

Desired state:

  • The worker self-bootstraps by calling next_activity and get_skills with only a session token, receiving unprocessed activity definitions and skill protocols
  • All mandatory phases in skill protocols — including write-semantic-trace — are executed and produce their expected outputs
  • The orchestrator delegates cleanly without pre-digesting instructions or performing domain work
  • Violations of mandatory phases are observable and traceable

Goal

Ensure the orchestrator/worker execution model is followed faithfully, with all mandatory skill phases executed and the worker self-bootstrapping from workflow-server MCP calls rather than receiving pre-digested instructions.

Scope

In Scope

  • Orchestrator dispatch behavior: what it passes to the worker and what it pre-processes
  • Worker bootstrap protocol: how the worker discovers its activity and skills
  • Mandatory phase compliance: ensuring write-semantic-trace and other required phases produce outputs
  • Worker skill protocol execution order and completeness

Out of Scope

User Stories

US-1: Worker Self-Bootstrap

As a workflow operator, I want the worker to discover its own activity definition and skills via MCP calls so that the orchestrator cannot inadvertently filter, summarize, or distort the instructions.

Acceptance Criteria:

  • Worker receives only a session token and target context from the orchestrator (not pre-digested activity content)
  • Worker calls next_activity and get_skills to load its own instructions
  • Worker reads and follows skill protocols as returned by the server, not as paraphrased by the orchestrator

US-2: Mandatory Phase Execution

As a workflow operator, I want all mandatory skill phases to execute and produce their defined outputs so that I can verify the workflow was followed completely.

Acceptance Criteria:

  • The write-semantic-trace phase produces a trace file in the planning folder for every activity execution
  • No mandatory phase is skipped without an observable error or documented skip reason
  • The report-completion phase is only reached after all preceding mandatory phases have executed

US-3: Orchestrator Discipline

As a workflow operator, I want the orchestrator to limit itself to dispatching, checkpoint mediation, and transitions so that context separation is maintained and the worker operates from authoritative instructions.

Acceptance Criteria:

  • The orchestrator does not include activity step descriptions, skill protocol content, or resource text in worker dispatch
  • The orchestrator does not execute domain work (code review, artifact writing, implementation)
  • Checkpoint responses are relayed without the orchestrator interpreting or acting on them

References

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions