Description
The standalone mc_pr tool (updated in #38) loads PR templates from .github/pull_request_template.md and 4 other candidate paths. The plan orchestrator's createPR() method in orchestrator.ts does not — it generates its own body with a job status table but completely ignores the project's PR template.
This means:
- Standalone jobs (
mc_launch → mc_pr): PR uses the project template ✅
- Plan jobs (
mc_plan → auto PR): PR ignores the project template ❌
Current Behavior
orchestrator.ts createPR() builds a hardcoded body:
const body = [
'## Summary',
`Orchestrated plan **${plan.name}** with ${plan.jobs.length} job(s).`,
'## Jobs',
// ... job table
'## Testing',
// ... test info
].join('\n');
No template loading. No awareness of .github/pull_request_template.md.
Expected Behavior
The orchestrator should:
- Load the PR template (using the same
loadPrTemplate() from src/tools/pr.ts or a shared utility)
- Populate the template sections with plan-specific data (job table, test results)
- Fall back to the current generated body if no template exists
Proposed Solution
- Extract
loadPrTemplate() from src/tools/pr.ts into a shared utility (e.g., src/lib/pr-template.ts)
- In
orchestrator.ts createPR():
- Load the template
- If template exists, populate
## Summary with plan description, ## Changes with job table, ## Testing with test results, ## Notes with integration metadata
- If no template, use the current generated body
- Import and use the shared utility in both
mc_pr and orchestrator.ts
Files
src/tools/pr.ts — extract loadPrTemplate() to shared utility
src/lib/orchestrator.ts — use template in createPR()
- New:
src/lib/pr-template.ts — shared template loading utility
Priority
P3 — cosmetic improvement. PRs still get created, just without the template structure.
Description
The standalone
mc_prtool (updated in #38) loads PR templates from.github/pull_request_template.mdand 4 other candidate paths. The plan orchestrator'screatePR()method inorchestrator.tsdoes not — it generates its own body with a job status table but completely ignores the project's PR template.This means:
mc_launch→mc_pr): PR uses the project template ✅mc_plan→ auto PR): PR ignores the project template ❌Current Behavior
orchestrator.tscreatePR()builds a hardcoded body:No template loading. No awareness of
.github/pull_request_template.md.Expected Behavior
The orchestrator should:
loadPrTemplate()fromsrc/tools/pr.tsor a shared utility)Proposed Solution
loadPrTemplate()fromsrc/tools/pr.tsinto a shared utility (e.g.,src/lib/pr-template.ts)orchestrator.tscreatePR():## Summarywith plan description,## Changeswith job table,## Testingwith test results,## Noteswith integration metadatamc_prandorchestrator.tsFiles
src/tools/pr.ts— extractloadPrTemplate()to shared utilitysrc/lib/orchestrator.ts— use template increatePR()src/lib/pr-template.ts— shared template loading utilityPriority
P3 — cosmetic improvement. PRs still get created, just without the template structure.