|
| 1 | +--- |
| 2 | +title: Module development orchestration |
| 3 | +description: Coordinate substantial module work across an orchestrator session and narrowly scoped child sessions, then integrate it safely for release. |
| 4 | +--- |
| 5 | + |
| 6 | +# Module development orchestration |
| 7 | + |
| 8 | +Substantial module work is easier to review and integrate when it is split into |
| 9 | +small, independently verifiable changes. Use one parent (orchestrator) session |
| 10 | +to own the plan and integration, and use narrowly scoped child sessions for the |
| 11 | +work that can proceed independently. |
| 12 | + |
| 13 | +This complements [Module bootstrap](../get-started/module-bootstrap.md). During |
| 14 | +bootstrap, the shared branch is an **integration branch** for the load-bearing |
| 15 | +core. For an existing module, follow the repository's |
| 16 | +[trunk-based development](../specification/principles-and-practices.md#trunk-based-development) |
| 17 | +default: child pull requests use short-lived branches and target `main`. |
| 18 | +Use a stacked pull request only when a dependency requires it. |
| 19 | + |
| 20 | +## Roles and boundaries |
| 21 | + |
| 22 | +### Parent or orchestrator session |
| 23 | + |
| 24 | +The orchestrator: |
| 25 | + |
| 26 | +- defines the outcome, boundaries, dependencies, and acceptance criteria |
| 27 | +- creates the bootstrap integration branch and its draft pull request to |
| 28 | + `main` when the module needs one |
| 29 | +- gives each child one reviewable unit of work and the branch it must target |
| 30 | +- keeps shared design decisions, naming, and cross-cutting changes coherent |
| 31 | +- reviews each child pull request, runs the relevant validation, and integrates |
| 32 | + it into the shared branch |
| 33 | +- owns release readiness for the coordinated change set |
| 34 | + |
| 35 | +The orchestrator coordinates the work; it does not become a second place where |
| 36 | +the implementation is silently changed. Changes outside a child's scope should |
| 37 | +become a new child task or an explicitly recorded decision. |
| 38 | + |
| 39 | +### Child session |
| 40 | + |
| 41 | +A child session owns one cohesive change, such as one public function and its |
| 42 | +tests, one documentation page, or one focused fix. A child should be able to |
| 43 | +describe its change without referring to unrelated planned work. |
| 44 | + |
| 45 | +Each child: |
| 46 | + |
| 47 | +1. starts from `main`, or from the bootstrap integration branch when one is |
| 48 | + required |
| 49 | +2. opens a **draft pull request** targeting `main`, or the bootstrap integration |
| 50 | + branch when one is required |
| 51 | +3. implements and validates only its assigned scope |
| 52 | +4. updates the documentation and tests required by that scope |
| 53 | +5. reports the result to the orchestrator before asking for integration |
| 54 | + |
| 55 | +Use the repository's normal [branching and merging |
| 56 | +practice](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/) and the |
| 57 | +shared [workflow](https://msx.no/docs/Ways-of-Working/Workflow/) for the |
| 58 | +ordinary branch, draft PR, implementation, test, and review loop. This page |
| 59 | +only describes how to coordinate several such changes. |
| 60 | + |
| 61 | +## Coordination protocol |
| 62 | + |
| 63 | +### Give every child a complete handoff |
| 64 | + |
| 65 | +The orchestrator's handoff should include: |
| 66 | + |
| 67 | +- the user-visible outcome and the exact in-scope files or capability |
| 68 | +- the base branch and the child pull request's target branch |
| 69 | +- dependencies on other children, including what is deliberately out of scope |
| 70 | +- the relevant [module |
| 71 | + standards](../reference/module-development-foundations.md), test guidance, |
| 72 | + and existing implementation to follow |
| 73 | +- the validation expected before the child reports completion |
| 74 | +- the orchestrator session's identifier or communication channel |
| 75 | + |
| 76 | +If the child discovers a missing prerequisite or a conflicting design choice, |
| 77 | +it should stop at that boundary and report it rather than expanding its scope |
| 78 | +silently. |
| 79 | + |
| 80 | +### Require a useful completion report |
| 81 | + |
| 82 | +The child reports: |
| 83 | + |
| 84 | +- the draft pull request URL and target branch |
| 85 | +- what changed and what was intentionally left out |
| 86 | +- the tests, lint, documentation build, or other validation that ran, including |
| 87 | + failures |
| 88 | +- decisions or risks the orchestrator must review |
| 89 | +- follow-up issues for work that does not belong in the child pull request |
| 90 | + |
| 91 | +The orchestrator treats this as input to review, not as a substitute for |
| 92 | +review. Read the diff, verify the acceptance criteria, and run the smallest |
| 93 | +relevant checks before merging. Use |
| 94 | +[Validating before review](validating-before-review.md) for the PSModule |
| 95 | +specific validation pass. |
| 96 | + |
| 97 | +### Integrate deliberately |
| 98 | + |
| 99 | +Merge children only after their checks and review are complete. Merge |
| 100 | +independent children into `main` in any order. For dependent work, either wait |
| 101 | +for the prerequisite to merge or make the dependency explicit in a stacked |
| 102 | +branch arrangement; do not make a child appear independent by copying |
| 103 | +unreviewed changes. During bootstrap, merge children into the integration |
| 104 | +branch, then merge that branch to `main` when the load-bearing core is ready. |
| 105 | + |
| 106 | +Keep `main` or the bootstrap integration branch buildable. Resolve conflicts in |
| 107 | +the orchestrator's context, rerun affected checks after integration, and record |
| 108 | +any cross-cutting decision in the relevant pull request or issue. |
| 109 | + |
| 110 | +## Release readiness |
| 111 | + |
| 112 | +Release readiness is a property of the integrated change, not a reason to keep |
| 113 | +a long-lived release branch. Before marking a bootstrap integration pull |
| 114 | +request ready, or reporting a coordinated trunk-based change complete, confirm: |
| 115 | + |
| 116 | +- every child pull request is merged, closed with a documented reason, or |
| 117 | + explicitly deferred with a follow-up issue |
| 118 | +- the integrated branch passes the applicable build, test, lint, and |
| 119 | + documentation checks |
| 120 | +- the final tree still follows |
| 121 | + [Structuring your module](structuring-your-module.md), the module |
| 122 | + [repository standard](../reference/repository-standard.md), and the |
| 123 | + [test specification](../reference/test-specification.md) |
| 124 | +- user-facing documentation, examples, and generated-help inputs describe the |
| 125 | + integrated behavior |
| 126 | +- the parent or coordinating pull request records the outcome, links the child |
| 127 | + pull requests when one exists, and identifies related issues without claiming |
| 128 | + unrelated work |
| 129 | +- the version and prerelease intent match |
| 130 | + [Versioning and releases](versioning-and-releases.md) |
| 131 | + |
| 132 | +If the change is not ready, keep the relevant pull request in draft and create |
| 133 | +another focused child task or follow-up issue. Once it is ready, follow [Your |
| 134 | +first release](../get-started/your-first-release.md) and the canonical MSX |
| 135 | +[definition of ready for review](https://msx.no/docs/Ways-of-Working/Definition-of-Ready-and-Done/#definition-of-ready-for-review). |
| 136 | + |
| 137 | +## Relationship to other work |
| 138 | + |
| 139 | +- Use [Module bootstrap](../get-started/module-bootstrap.md) when a new module |
| 140 | + needs a load-bearing core before its first release. |
| 141 | +- For an existing module, use short-lived topic branches targeting `main`, as |
| 142 | + described in [Principles and practices](../specification/principles-and-practices.md). |
| 143 | +- Use a stacked pull request only when the changes genuinely depend on one |
| 144 | + another; see [MSX branching and |
| 145 | + merging](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/). |
0 commit comments