PM Sequence Decision
Visibility
This is an internal analysis and routing micro-skill.
Public entry should remain at product-orchestrator, moonshot-phase-runner, or moonshot-orchestrator.
Shared contracts
Use these canonical files instead of re-embedding the full contract here:
<MOONSHOT_RELAY_HOME>/schemas/analysis-context.schema.yaml<MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml
This micro-skill must consume:
- the
analysisContextfield layout and defaults from the schema file - the bundle-selection matrix, bundle expansion map, overlays, and stage-order rules from the bundle registry
Phase rules
- productDefinitionRequest == true && productPackageReady == false -> planning (upstream redirect)
- hasPendingQuestions == true -> planning
- implementationComplete == true && (complexity == complex or (apiSpecConfirmed && hasMockImplementation)) -> integration
- implementationComplete == true -> verification
- planningReady == true && productPackageReady == true -> implementation
- executionReady == true -> implementation
- requirementsClear && hasContextMd && implementationReady -> implementation (migration fallback)
- otherwise -> planning
Migration rule:
- During rollout, derive
planningReadyandexecutionReadyfrom legacy signals only when the explicitreadiness.*fields are absent.
Bundle selection
Build the chain from bundles first, then expand into skillChain.
The canonical routing matrix lives in root rules/workflow-bundles.yaml and is installed under <MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml.
Analysis micro-skills are orchestrator-internal and should not be presented as standalone workflow entrypoints.
- If
signals.productDefinitionRequest == trueandsignals.productPackageReady == false:- route to
product-orchestrator - do not continue into build planning or implementation
- route to
- If
signals.productPackageReady == true:- treat
PLAN.mdandtasks/*.mdas the planning baseline - skip
requirements-analyzerandcontext-builder - validate the handoff package, then proceed to implementation
- for medium/complex work, require execution bridge artifacts for the active slice
- prefer
readiness.planningReadyoverhasExecutionPlanwhen both exist - prefer
readiness.executionReadyoverimplementationReadyfor active slice entry
- treat
Summary:
read_only: implementation bundles remain forbidden; review-only requests usereview-bundleproduct_project: use the registry branch forwithProductPackageorwithoutProductPackagemeta_harness: use the registry branch for simple vs medium/complex harness work
Bundle expansion
Bundle expansion is defined in <MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml.
Keep this skill focused on the decision logic, not the duplicated bundle contents.
Execution-bridge expectation for medium/complex product_project runs:
implementation-runnermust create or refreshartifacts.sprintContractPathbefore code edits- verification steps must update
artifacts.qaReportPath - retries, pauses, or context-boundary exits must update
artifacts.handoffPath
Overlay rules
Resolve overlays and stage-order rules from <MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml.
Minimum invariants:
workflowProfile == standardkeeps the base bundle chainworkflowProfile == strictdisables indeterminate completion and inserts the strict gates- meaningful code changes must preserve
review -> verify -> finish
Plane-specific rules
Use the plane-specific rules from <MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml.
Additional rules
Apply the registry-driven additional rules from <MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml, including:
frontend-designinsertion for React workcode-simplifierinsertion for non-trivial code changesmoonshot-phase-runnerinsertion when master-plan or phase docs are detectedbuild-error-resolverafter failed verification for refactor tasks- explicit review/verification/finish requirements for medium and complex work
Parallel execution guide
Allowed and forbidden parallel groups are defined in <MOONSHOT_RELAY_HOME>/rules/workflow-bundles.yaml.
Output (patch)
phase: planning
decisions:
bundleChain: []
skillChain:
- product-orchestrator
recommendedAgents:
- product-orchestrator
parallelGroups:
- - moonshot-evaluate-complexity
- moonshot-detect-uncertainty
notes:
- "phase=planning, plane=product_project, chain=product-upstream"
Alternate implementation-ready example:
phase: planning
decisions:
bundleChain:
- ready-isolate-bundle
- planning-bundle
skillChain:
- pre-flight-check
- project-contract-gate
- context-readiness-gate
- verification-contract-gate
- requirements-analyzer
- context-builder
- codex-validate-plan
notes:
- "phase=planning, plane=product_project, chain=medium"