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