Repo: motir-ai. One PR. The CONSUMER half of the contract whose producer half is the motir-core card this is blocked_by — that card puts generateExplanations on the re-plan job envelope; this one makes the handler act on it.
src/jobs/handlers/replan.ts never mentions generateExplanations (verified on origin/main, 2026-08-04 — searched with python, since grep finds nothing in these long-line files). It calls runGenerationPass({ grounding, plan, situationPrompt: REPLAN_SITUATION_PROMPT }, sink) with no explanation option, so:
EXPLANATION_INSTRUCTION is never appended to the composed system prompt, andbuildGenerationTools never adds the explanationMd property to propose_node (it is added, and made REQUIRED, only when the flag is set),meaning every node a re-plan proposes lands with no explanation, whatever the project's setting says. generateTree.ts is the working reference: it reads req?.context?.generateExplanations === true off the job envelope and spreads ...(generateExplanations ? { generateExplanations: true } : {}) into every runGenerationPass call.
replan.ts reads the flag off the job envelope exactly as generateTree.ts does (same defensive read of requestJson.context, same strict === true) and passes it to runGenerationPass.propose_node proposals carry explanationMd and explanationSource: 'ai_draft' (the AI_DRAFT_EXPLANATION_SOURCE constant) through to addProposals — asserted by a test, not by inspection.generate_tree keeps.explanationSource lockstep with motir-core's enum).MOTIR-<id>.src/jobs/handlers/replan.ts — the handler edited; its single runGenerationPass call site.src/jobs/handlers/generateTree.ts — the working reference for both the envelope read and the option spread.src/llm/treeGeneration.ts — buildGenerationSystemPrompt / EXPLANATION_INSTRUCTION / buildGenerationTools / AI_DRAFT_EXPLANATION_SOURCE (why the flag changes both prompt and tool surface).