Executes a single phase within a CPM initiative by routing to the appropriate execution engine
Handles the full lifecycle of phase execution: setup, delegation, artifact collection, verification, and completion reporting. Returns a structured completion report to CWK-034 (CPM Orchestrator) for phase transition processing.
Cowork CPM Phase Runner
TL;DR
How To Start
STEP 1Define Phase and Execution Mode
-
phase_id
· string · required
Phase identifier matching the CPM state. -
execution_mode
· string · required
How to execute this phase: “CV_WORKFLOW”, “SUB_AGENT”, “DIRECT”, or “CUSTOM”. -
target_project_path
· string · required
Path to the child project workspace. -
deliverables
· list · required
Expected deliverable names for artifact verification. -
scope_description
· string · required
What work this phase must accomplish. -
success_criteria
· string · required
How to verify phase completion. -
content_type
· string · required for CV_WORKFLOW
Content type passed to CWK-030. -
content_name
· string · required for CV_WORKFLOW
Deliverable name passed to CWK-030. -
max_cv_cycles
· integer · optional · default: 3
Maximum Creator/Validator cycles for CV_WORKFLOW. -
delegation_pattern
· string · required for SUB_AGENT
CWK-008 delegation pattern: “parallel_research”, “sequential_handoff”, “builder_validator”, or “single_delegate”. -
direct_prompt
· string · required for DIRECT
Prompt for inline execution. -
custom_prompt_file
· string · required for CUSTOM
Path to file containing the custom prompt. -
output_dir
· string · optional
Phase output directory. Defaults to {target_project_path}/.cpmPhase-{phase_id}/. -
enable_git_checkpoint
· boolean · optional · default: true
Call CWK-005 after completion. -
phase_context
· dict · optional · default: {}
Extra context including prior phase artifacts and references.
Usage Examples
EXAMPLE 1CV_WORKFLOW phase execution
EXAMPLE 2SUB_AGENT phase execution
EXAMPLE 3DIRECT phase execution
How AI Reads This Recipe
- Pre-Flight (Step 0). Validate phase_id and target_project_path. Load CPM state if .cpmrc.json exists and verify phase status is READY or IN_PROGRESS. Validate execution_mode and its mode-specific required parameters. Set up output directory. Collect prior phase artifacts from phase_context.
- Mode-Specific Setup (Step 1). Build parameters for the execution engine. CV_WORKFLOW: map phase definition to CWK-030 parameters including scope as requirements, success criteria, prior artifacts as research files. SUB_AGENT: map deliverables to CWK-008 delegation tasks with self-contained context block (sub-agents do not read CLAUDE.md). DIRECT: render prompt with phase variable substitution. CUSTOM: read prompt file, validate self-containment.
- Execute (Step 2). Update CPM state to IN_PROGRESS. Dispatch to the execution engine. CV_WORKFLOW calls CWK-030. SUB_AGENT calls CWK-008. DIRECT and CUSTOM execute inline.
- Collect Artifacts (Step 3). Scan output directory for files. Match against expected deliverables. Flag missing items. Write artifact inventory JSON. Determine preliminary status: all present → PASSED, partial → PASSED_WITH_NOTES, none → REVISION_NEEDED.
- Verification Gate (Step 4). Build verification claims from deliverables and success criteria. Call CWK-024 with claims and evidence files. Adjust phase status based on confidence score: above threshold → keep status, 50–threshold → PASSED_WITH_NOTES, below 50 → REVISION_NEEDED.
- Completion Report (Step 5). Build structured report with phase_id, status, execution details, artifact list, missing deliverables, verification confidence, and notes. Write to completion-report.json. Display summary. Instruct user to pass report to CWK-034 transition mode.
- Git Checkpoint (Step 6). If enabled, call CWK-005 with phase completion message.
When To Use This Recipe
Recipe FAQ
What is the difference between CWK-035 and CWK-030?
Can I use CWK-035 without CWK-034?
What are the four delegation patterns for SUB_AGENT mode?
How does artifact collection work?
What determines the final phase status?
Version History
Get this recipe with CRAFT for Claude Cowork
Cowork recipes ship bundled with CRAFT for Claude Cowork — there’s no separate download. Clone the framework once, and your AI runs every recipe automatically when invoked.
Pull anytime to stay on the latest version — free to clone, no login or email required.
Then start your session
Once CRAFT is in your project folder, open a new Cowork session and ask Claude to initialize. For example:
You
Claude
Not familiar with Git? Download as a ZIP
No command line needed. Just download, move, and unzip:
- Open the CRAFT framework repo on GitHub.
- Click the green Code button, then choose Download ZIP.
- Move the downloaded ZIP into your Claude Cowork project folder.
- Unzip it: double-click on Mac, or right-click → Extract All on Windows.
