| name | workflow-orchestration |
| description | Internal skill for the delivery-lead orchestrator. Manages end-to-end workflow state, decision tracking, phase transitions, and artifact checkpointing. Not invocable by users directly — consumed only by the delivery-lead agent. |
| user-invocable | false |
Skill: Workflow Orchestration & State Management
Purpose
Provide the delivery-lead agent with state tracking, decision logging, artifact checkpointing, and context flushing protocols for coordinating multi-agent Power BI development workflows.
This skill is NOT invocable by users directly. It is consumed exclusively by the delivery-lead orchestrator agent when operating in end-to-end workflow mode.
Core Principle: Disk as Long-Term Memory
ANTI-PATTERN: Relying on chat history for state across multi-agent workflows.
PATTERN: Persist ALL state and intermediate outputs to disk. Read from disk at the start of each phase.
This includes user-provided external artifacts passed through chat, such as screenshots, mockups, PDFs, Figma exports, and similar reference material. When such artifacts are relevant to the workflow, they must be archived under <ProjectName>/spec/ and referenced from disk in later phases.
References
.github/skills/workflow-orchestration/references/workflow-core.md — governance rules (context flushing, checkpointing, stop gate)
.github/skills/workflow-orchestration/references/workflow-state-management.md — workflow_state.json schema, lifecycle rules, decision point tracking
State Ownership Model
Two different persistence models exist and MUST NOT be conflated:
workflow_state.json — owned exclusively by delivery-lead during end-to-end orchestrated workflows.
agent_session_state.json — optional compact continuity state for standalone, on-demand specialist agent tasks.
workflow_state.json is never written by specialist agents. agent_session_state.json is never used as the source of truth for end-to-end phase progression.
Workflow State File
Location: <ProjectName>/workflow_state.json
The orchestrator MUST maintain this file throughout the entire workflow. It is the single source of truth for workflow progress.
Placeholder guardrail:
- The literal repository folder
[ProjectName]/ is an example only and MUST NOT be treated as the workflow target.
- Workflow start requires a real project folder created at repository root.
- If only
[ProjectName]/ exists, the orchestrator must create a new project folder and initialize that folder instead of reusing the placeholder.
Specialist workers MAY read this file when invoked by delivery-lead, but MUST NOT write it directly.
State Lifecycle Rules
- On workflow start: CREATE
workflow_state.json with currentPhase: "initialization".
- On phase start: UPDATE
pendingPhase with phase name, agent assignment, status "in-progress", and timestamp.
- On phase completion (after user approval): MOVE
pendingPhase into completedPhases, update currentPhase, clear pendingPhase.
- On phase failure/rejection: UPDATE
pendingPhase.status to "rejected" with feedback. Do NOT advance.
- On every decision point: APPEND an immutable record in
decisionLedger.
Canonical State Shape
{
"$schema": "workflow_state_schema",
"project": "<ProjectName>",
"specificationFile": "<ProjectName>/spec/<spec_file>.md",
"startedAt": "<ISO 8601>",
"lastUpdatedAt": "<ISO 8601>",
"currentPhase": "<phase-name>",
"decisionLedger": [],
"completedPhases": {},
"pendingPhase": null
}
Workflow Phases
The delivery-lead orchestrator coordinates the following phases, delegating execution to domain-specific agents:
| Phase | Agent | Skills Used | Primary Output |
|---|
| Initialization | delivery-lead | project-initialization | PBIP scaffold |
| Requirements | business-data-analyst | requirements-analysis | spec/requirements_summary.md |
| Semantic Model | pbi-semantic-model | logical-model, physical-model-tmdl, dax-development | TMDL files |
| Mock Data | data-generator | mock-data-generation | data/*.csv + updated partitions |
| Quality Assurance (Model) | pbi-qa | code-review, functional-testing | tests/quality_review.md, tests/tests_execution.md |
| Report Design & Impl | pbi-report | report-design, report-implementation | spec/report_blueprint.json, PBIR files |
| Quality Assurance (Report) | pbi-qa | report-quality-validation | tests/report_validation_execution.md |
Stop / Approval Gate
After each phase completion, the orchestrator MUST:
- Save all output artifacts to disk.
- Update
workflow_state.json.
- Present a summary to the user.
- STOP and wait for explicit user approval before delegating the next phase.
Context Flushing Protocol
When transitioning between phases:
- READ
workflow_state.json to determine current progress.
- READ specific artifact files from previous phases (NOT from chat memory).
- WRITE outputs to disk before presenting results.
- UPDATE
workflow_state.json after user approval.
If the user shared supporting evidence in chat rather than as existing project files:
- archive that evidence under
<ProjectName>/spec/ first;
- hand off the archived file paths, not a chat-only description;
- treat the archived copy as the canonical workflow input.
Specialist Handoff Rule
When delivery-lead delegates a workflow phase to a specialist agent, the handoff must be explicit and artifact-based.
The minimum handoff payload is:
projectName
- current phase name
- exact task objective
- required input artifact paths
- relevant
decisionLedger entries
- unresolved blocking clarifications, if any
If chat-provided supporting artifacts exist, the handoff must include the archived <ProjectName>/spec/ paths for those files.
Specialist agents must treat this payload plus project artifacts on disk as their source of task context. They must not assume full conversational history is available or authoritative.
Decision Point Tracking
Critical clarifications that are blocking for the workflow:
- Time/period semantics required by calculations.
- Classification and threshold semantics for status-style KPIs.
- Grain reconciliation semantics when compared datasets are at different granularity levels.
These MUST be explicitly resolved (or assumption-approved) before advancing past the Requirements phase.
Lessons Learned (Project-Scoped)
Create/update <ProjectName>/lessons-learned.md only when:
- The user reports a defect found in Power BI Desktop or model execution.
- The defect is a concrete malfunction.
- The user asks for diagnosis/fix.
Never create it during normal phase progression.
Standalone Agent Continuity State
For direct specialist-agent invocations outside delivery-lead, use a separate compact state file only when cross-task continuity is actually needed.
Location: <ProjectName>/agent_session_state.json
This file is optional and exists only to preserve relevant context across standalone invocations without relying on chat history.
Use it for:
- unresolved decisions or assumptions;
- open remediation items;
- partial work likely to be resumed;
- explicit handoff from one specialist agent to another;
- recent artifact-level activity that is not yet obvious from final project outputs alone.
Do NOT use it for:
- full audit logging;
- tool-by-tool execution history;
- complete prompt history;
- end-to-end workflow ownership;
- long retention of stale task history.
Retention policy:
- Keep
openItems until resolved.
- Keep only the most recent 10 persisted standalone tasks in
recentTasks.
- Summarize aggressively; never store verbose command output.
- Prefer accuracy and resumability over exhaustiveness.
Maintenance helper:
.github/skills/workflow-orchestration/scripts/compact_agent_session_state.py — trims recentTasks, removes closed openItems, and refreshes the summary block for agent_session_state.json.
.github/skills/workflow-orchestration/references/agent_session_state.template.json — initial template to create the file when standalone continuity state is needed for the first time.
Design choice:
- Default to bounded snapshot JSON (
agent_session_state.json).
- Do NOT use append-only JSONL for standalone continuity by default. Append-only logs grow without improving decision quality, consume context budget, and force later agents to reconstruct semantics from noise.