|
| 1 | +--- |
| 2 | +name: psmodule-module-development-orchestration |
| 3 | +description: Coordinate substantial PSModule development across a parent session and narrowly scoped child sessions while preserving trunk-based delivery, reviewability, and release readiness. |
| 4 | +--- |
| 5 | + |
| 6 | +# Orchestrate substantial PSModule development |
| 7 | + |
| 8 | +Use this skill when a module change is large enough to need several independent |
| 9 | +workstreams, explicit dependencies, or coordinated review. Use the repository |
| 10 | +[module development orchestration guide](../../../../../docs/content/guides/module-development-orchestration.md) |
| 11 | +as the detailed process reference. Do not copy organization-wide rules into |
| 12 | +this skill; follow the canonical [MSX Agentic Development](https://msx.no/docs/Ways-of-Working/Agentic-Development/), |
| 13 | +[Workflow](https://msx.no/docs/Ways-of-Working/Workflow/), and |
| 14 | +[Branching and Merging](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/) |
| 15 | +guidance. |
| 16 | + |
| 17 | +## Decide whether coordination is warranted |
| 18 | + |
| 19 | +Coordinate through a parent session when the work has two or more genuinely |
| 20 | +independent deliverables, crosses code/tests/documentation/workflow boundaries, |
| 21 | +has dependencies that need an explicit order, or needs parallel review and |
| 22 | +integration. Keep the work in one session when it is a small change, a single |
| 23 | +coherent function, a focused documentation correction, or a change one agent |
| 24 | +can implement and validate without handoffs. |
| 25 | + |
| 26 | +Before splitting work, inspect the repository README, local agent guidance, |
| 27 | +module layout, relevant tests, workflow, documentation, and existing |
| 28 | +validation commands. Establish the requested outcome, constraints, acceptance |
| 29 | +evidence, and files that are in scope. |
| 30 | + |
| 31 | +## Decompose and hand off |
| 32 | + |
| 33 | +The parent/orchestrator owns the overall outcome, scope, dependency order, |
| 34 | +integration decisions, release readiness, and final report. Decompose by |
| 35 | +coherent deliverable rather than by arbitrary file count. Each child handoff |
| 36 | +must state: |
| 37 | + |
| 38 | +- the narrow objective and acceptance criteria; |
| 39 | +- the allowed files and the files it must not change; |
| 40 | +- dependencies and the expected branch/PR target; |
| 41 | +- repository-native validation to run; |
| 42 | +- the expected report-back format, including changed files, validation, |
| 43 | + decisions, blockers, and draft PR URL. |
| 44 | + |
| 45 | +Children own their assigned deliverable end to end: inspect before editing, |
| 46 | +open a draft PR early, use small commits with the required Copilot co-author |
| 47 | +trailer, validate their scope, and report back. A child must stop and notify |
| 48 | +the parent when requirements conflict, its scope expands, a dependency is |
| 49 | +missing, validation exposes an unrelated failure, or the requested branch |
| 50 | +target is unclear. It must not silently absorb adjacent work. |
| 51 | + |
| 52 | +## Branch and pull-request policy |
| 53 | + |
| 54 | +For an existing module, use trunk-based development by default: |
| 55 | + |
| 56 | +1. Create a short-lived topic branch from the default branch. |
| 57 | +2. Open a draft PR targeting the default branch as soon as the first coherent |
| 58 | + increment is pushed. |
| 59 | +3. Keep independent child PRs separate and merge them through normal review. |
| 60 | +4. Use a stacked PR only when a real dependency makes a separate target branch |
| 61 | + necessary, and follow the canonical MSX stacked-PR procedure. |
| 62 | + |
| 63 | +Do not create a long-lived integration branch for ordinary feature work. The |
| 64 | +only exception is a brand-new module with no usable release whose |
| 65 | +load-bearing core has not landed. In that bootstrap case, use the |
| 66 | +[module bootstrap guide](../../../../../docs/content/get-started/module-bootstrap.md): |
| 67 | +keep one narrowly scoped integration branch for the core, let focused child |
| 68 | +PRs target it, and open the integration PR to the default branch when the core |
| 69 | +is coherent. Once the first release is on the default branch, return to the |
| 70 | +ordinary trunk-based policy. |
| 71 | + |
| 72 | +Never target an existing documentation PR, issue, or unrelated worktree |
| 73 | +instead of the agreed branch. Do not merge, close, retarget, or modify another |
| 74 | +session's PR or issue without explicit ownership from the parent. |
| 75 | + |
| 76 | +## Integrate and review |
| 77 | + |
| 78 | +The parent reviews each child PR against its acceptance criteria and the |
| 79 | +repository contract before integration. Confirm that: |
| 80 | + |
| 81 | +- the child diff stays within its handoff and preserves unrelated behavior; |
| 82 | +- dependent work is integrated in dependency order; |
| 83 | +- tests, lint, build/package, workflow, and documentation changes are wired |
| 84 | + together rather than merely passing in isolation; |
| 85 | +- generated files, permissions, release labels, and public module behavior |
| 86 | + receive deliberate review. |
| 87 | + |
| 88 | +Merge through the agreed PR flow; do not bypass review with direct default |
| 89 | +branch pushes. After each merge, refresh dependent branches and rerun affected |
| 90 | +checks before integrating the next dependent change. Resolve conflicts by |
| 91 | +preserving the repository's current source of truth, not by taking whichever |
| 92 | +branch happens to be newer. |
| 93 | + |
| 94 | +## Validate and assess release readiness |
| 95 | + |
| 96 | +Use the repository's own commands and local guidance. At minimum, run the |
| 97 | +smallest relevant checks for the changed surface, then escalate when results |
| 98 | +show a broader dependency: |
| 99 | + |
| 100 | +- build the module and run the affected Pester tests; |
| 101 | +- run the repository's PSScriptAnalyzer/lint and workflow validation; |
| 102 | +- build documentation when documentation or navigation changed; |
| 103 | +- review the final diff, PR checks, public exports, version/release labels, and |
| 104 | + required artifacts. |
| 105 | + |
| 106 | +Apply the PSModule |
| 107 | +[validation before review](../../../../../docs/content/guides/validating-before-review.md) |
| 108 | +checklist. A change is release-ready only when all child work is integrated, |
| 109 | +required checks are green or explicitly blocked and owned, documentation and |
| 110 | +tests match the delivered behavior, and the release intent follows |
| 111 | +[versioning and releases](../../../../../docs/content/guides/versioning-and-releases.md). |
| 112 | +For a bootstrap integration branch, release readiness means the minimum |
| 113 | +load-bearing core is coherent; do not expand the exception to unrelated v1 |
| 114 | +features. |
| 115 | + |
| 116 | +## Report back and stop |
| 117 | + |
| 118 | +The parent report must include the draft PR URL, files changed, commits, |
| 119 | +validation commands and outcomes, policy decisions (especially branch target |
| 120 | +and any bootstrap exception), unresolved blockers, and the next integration |
| 121 | +step. The parent should not mark the work complete or the PR ready for review |
| 122 | +until every child has reported and the combined result has passed the |
| 123 | +repository-native validation and review gates. |
| 124 | + |
| 125 | +Stop instead of guessing when scope, ownership, branch target, release intent, |
| 126 | +or acceptance evidence is ambiguous; when a required dependency or credential |
| 127 | +is unavailable; when validation fails without an understood owner; or when |
| 128 | +integration would modify unrelated work. Record the blocker and return control |
| 129 | +to the parent. |
| 130 | + |
| 131 | +## References |
| 132 | + |
| 133 | +- [Module development orchestration](../../../../../docs/content/guides/module-development-orchestration.md) |
| 134 | +- [PSModule repository standard](../../../../../docs/content/reference/repository-standard.md) |
| 135 | +- [Structuring your module](../../../../../docs/content/guides/structuring-your-module.md) |
| 136 | +- [MSX PR format](https://msx.no/docs/Ways-of-Working/PR-Format/) |
| 137 | +- [MSX Implement guidance](https://msx.no/docs/Agents/implement/) |
0 commit comments