@danmoisan/drm-copilot-mcp 1.1.23 → 1.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/out/mcp-server.js +13347 -7926
  2. package/package.json +1 -1
  3. package/resources/claude-customizations/.claude/agents/discovery-capability-sentinel.md +34 -0
  4. package/resources/claude-customizations/.claude/agents/legacy-parity-analyst.md +101 -43
  5. package/resources/claude-customizations/.claude/agents/migration-coverage-reviewer.md +107 -43
  6. package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +14 -0
  7. package/resources/claude-customizations/.claude/agents/parallel-planner.md +21 -1
  8. package/resources/claude-customizations/.claude/agents/pr-author.md +17 -1
  9. package/resources/claude-customizations/.claude/agents/requirements-reconciler.md +117 -42
  10. package/resources/claude-customizations/.claude/agents/runtime-characterization-analyst.md +103 -43
  11. package/resources/claude-customizations/.claude/hooks/discovery-capability-probe.ps1 +102 -0
  12. package/resources/claude-customizations/.claude/hooks/enforce-discovery-artifact-gate.ps1 +69 -194
  13. package/resources/claude-customizations/.claude/hooks/enforce-discovery-planning-gate.ps1 +87 -0
  14. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +7 -1
  15. package/resources/claude-customizations/.claude/hooks/enforce-model-routing-receipt.ps1 +6 -3
  16. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +168 -48
  17. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +1 -1
  18. package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +59 -20
  19. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-command-allowlist.ps1 +44 -3
  20. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill-helpers.ps1 +60 -4
  21. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1 +4 -2
  22. package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +59 -20
  23. package/resources/claude-customizations/.claude/hooks/record-discovery-agent-start.ps1 +132 -0
  24. package/resources/claude-customizations/.claude/hooks/validate-discovery-artifact-gate.ps1 +56 -212
  25. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output-rejection.ps1 +172 -0
  26. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +9 -1
  27. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadius.psm1 +9 -3
  28. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusAggregate.psm1 +154 -0
  29. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusCombination.psm1 +228 -0
  30. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusExtraction.psm1 +1 -0
  31. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusNormalization.psm1 +4 -2
  32. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusScheduling.psm1 +63 -16
  33. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusTokenShape.psm1 +56 -1
  34. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusWriteIntent.psm1 +4 -1
  35. package/resources/claude-customizations/.claude/lib/codex-routing/CodexDeployment.psm1 +5 -1
  36. package/resources/claude-customizations/.claude/lib/codex-routing/CodexDiscoveryRouting.psm1 +161 -0
  37. package/resources/claude-customizations/.claude/lib/codex-routing/CodexTopology.psm1 +25 -2
  38. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthority.psd1 +90 -0
  39. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthority.psm1 +493 -0
  40. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthorization.psm1 +479 -0
  41. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryCapability.psm1 +468 -0
  42. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryEncoding.psm1 +156 -0
  43. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryManifest.psm1 +384 -0
  44. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryObservation.psm1 +217 -0
  45. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryPayload.psm1 +276 -0
  46. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryPlanning.psm1 +336 -0
  47. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryRootGrant.psm1 +164 -0
  48. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStart.psm1 +440 -0
  49. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStartRecord.psm1 +296 -0
  50. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStop.psm1 +336 -0
  51. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryToolRouting.psm1 +228 -0
  52. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryValidation.psm1 +188 -341
  53. package/resources/claude-customizations/.claude/lib/worktree-resolution/HookTargetWorktree.psm1 +391 -0
  54. package/resources/claude-customizations/.claude/rules/orchestrator-state.md +1 -0
  55. package/resources/claude-customizations/.claude/rules/parallel-orchestration.md +150 -18
  56. package/resources/claude-customizations/.claude/settings.json +32 -3
  57. package/resources/claude-customizations/.claude/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
  58. package/resources/claude-customizations/.claude/skills/characterize-runtime-behavior/SKILL.md +134 -0
  59. package/resources/claude-customizations/.claude/skills/discovery-behavior-reconciliation/SKILL.md +28 -47
  60. package/resources/claude-customizations/.claude/skills/discovery-coverage-ledger/SKILL.md +32 -48
  61. package/resources/claude-customizations/.claude/skills/discovery-parity-matrix/SKILL.md +28 -45
  62. package/resources/claude-customizations/.claude/skills/discovery-repo-inventory/SKILL.md +28 -62
  63. package/resources/claude-customizations/.claude/skills/discovery-runtime-characterization/SKILL.md +28 -45
  64. package/resources/claude-customizations/.claude/skills/discovery-validate-artifacts/SKILL.md +28 -61
  65. package/resources/claude-customizations/.claude/skills/discovery-workflow/SKILL.md +55 -139
  66. package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +24 -9
  67. package/resources/claude-customizations/.claude/skills/extract-feature-contract/SKILL.md +133 -0
  68. package/resources/claude-customizations/.claude/skills/generate-acceptance-scenarios/SKILL.md +132 -0
  69. package/resources/claude-customizations/.claude/skills/initialize-discovery-workspace/SKILL.md +131 -0
  70. package/resources/claude-customizations/.claude/skills/inventory-legacy-system/SKILL.md +131 -0
  71. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +5 -4
  72. package/resources/claude-customizations/.claude/skills/parallel-add/SKILL.md +21 -1
  73. package/resources/claude-customizations/.claude/skills/parallel-close/SKILL.md +11 -1
  74. package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +34 -0
  75. package/resources/claude-customizations/.claude/skills/parallel-plan/SKILL.md +69 -6
  76. package/resources/claude-customizations/.claude/skills/parallel-remove/SKILL.md +15 -0
  77. package/resources/claude-customizations/.claude/skills/parallel-run/SKILL.md +6 -0
  78. package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +21 -4
  79. package/resources/claude-customizations/.claude/skills/reconcile-parity-matrix/SKILL.md +131 -0
  80. package/resources/claude-customizations/.claude/skills/review-discovery-coverage/SKILL.md +129 -0
  81. package/resources/claude-customizations/.claude/skills/validate-discovery-artifacts/SKILL.md +127 -0
  82. package/resources/claude-customizations/config/blast-radius.json +6 -5
  83. package/resources/claude-customizations/config/orchestration-routing.json +61 -1
  84. package/resources/claude-customizations/pack-manifests/core.json +33 -1
  85. package/resources/codex-and-agents-customizations/.agents/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
  86. package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +7 -0
  87. package/resources/codex-and-agents-customizations/.agents/skills/characterize-runtime-behavior/SKILL.md +134 -0
  88. package/resources/codex-and-agents-customizations/.agents/skills/discovery-behavior-reconciliation/SKILL.md +46 -0
  89. package/resources/codex-and-agents-customizations/.agents/skills/discovery-coverage-ledger/SKILL.md +50 -0
  90. package/resources/codex-and-agents-customizations/.agents/skills/discovery-parity-matrix/SKILL.md +46 -0
  91. package/resources/codex-and-agents-customizations/.agents/skills/discovery-repo-inventory/SKILL.md +46 -0
  92. package/resources/codex-and-agents-customizations/.agents/skills/discovery-runtime-characterization/SKILL.md +46 -0
  93. package/resources/codex-and-agents-customizations/.agents/skills/discovery-validate-artifacts/SKILL.md +46 -0
  94. package/resources/codex-and-agents-customizations/.agents/skills/discovery-workflow/SKILL.md +62 -0
  95. package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +24 -9
  96. package/resources/codex-and-agents-customizations/.agents/skills/extract-feature-contract/SKILL.md +133 -0
  97. package/resources/codex-and-agents-customizations/.agents/skills/generate-acceptance-scenarios/SKILL.md +132 -0
  98. package/resources/codex-and-agents-customizations/.agents/skills/initialize-discovery-workspace/SKILL.md +131 -0
  99. package/resources/codex-and-agents-customizations/.agents/skills/inventory-legacy-system/SKILL.md +131 -0
  100. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +8 -0
  101. package/resources/codex-and-agents-customizations/.agents/skills/reconcile-parity-matrix/SKILL.md +131 -0
  102. package/resources/codex-and-agents-customizations/.agents/skills/review-discovery-coverage/SKILL.md +129 -0
  103. package/resources/codex-and-agents-customizations/.agents/skills/validate-discovery-artifacts/SKILL.md +127 -0
  104. package/resources/codex-and-agents-customizations/.codex/agents/discovery-capability-sentinel.toml +51 -0
  105. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c1.toml +148 -0
  106. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c2.toml +148 -0
  107. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c3-elevated.toml +148 -0
  108. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c3.toml +148 -0
  109. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c4.toml +148 -0
  110. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst.toml +148 -0
  111. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c1.toml +154 -0
  112. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c2.toml +154 -0
  113. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c3-elevated.toml +154 -0
  114. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c3.toml +154 -0
  115. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c4.toml +154 -0
  116. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer.toml +154 -0
  117. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c1.toml +164 -0
  118. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c2.toml +164 -0
  119. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c3-elevated.toml +164 -0
  120. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c3.toml +164 -0
  121. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c4.toml +164 -0
  122. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler.toml +164 -0
  123. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c1.toml +150 -0
  124. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c2.toml +150 -0
  125. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c3-elevated.toml +150 -0
  126. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c3.toml +150 -0
  127. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c4.toml +150 -0
  128. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst.toml +150 -0
  129. package/resources/codex-and-agents-customizations/.codex/config.toml +33 -3
  130. package/resources/codex-and-agents-customizations/.codex/hooks/codex-agent-profile-attestation.ps1 +22 -0
  131. package/resources/codex-and-agents-customizations/.codex/hooks/discovery-capability-probe.ps1 +97 -0
  132. package/resources/codex-and-agents-customizations/.codex/hooks/discovery-start-attestation.ps1 +171 -0
  133. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-codex-model-routing.ps1 +4 -1
  134. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-discovery-artifact-gate.ps1 +187 -0
  135. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-discovery-planning-gate.ps1 +149 -0
  136. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +239 -2
  137. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +6 -15
  138. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +54 -15
  139. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +54 -15
  140. package/resources/codex-and-agents-customizations/.codex/hooks/hook-target-worktree.ps1 +369 -0
  141. package/resources/codex-and-agents-customizations/.codex/hooks/record-subagent-routing-attestation.ps1 +8 -0
  142. package/resources/codex-and-agents-customizations/.codex/hooks/validate-codex-subagent-routing.ps1 +22 -1
  143. package/resources/codex-and-agents-customizations/.codex/hooks/validate-discovery-agent-output.ps1 +178 -0
  144. package/resources/codex-and-agents-customizations/.codex/scripts/Resolve-CodexTopology.ps1 +11 -1
  145. package/resources/codex-and-agents-customizations/pack-manifests/core.json +63 -1
  146. package/resources/config/orchestration-routing.json +61 -1
  147. package/resources/customizations/.github/agents/discovery-capability-sentinel.agent.md +34 -0
  148. package/resources/customizations/.github/agents/legacy-parity-analyst.agent.md +122 -0
  149. package/resources/customizations/.github/agents/migration-coverage-reviewer.agent.md +128 -0
  150. package/resources/customizations/.github/agents/requirements-reconciler.agent.md +138 -0
  151. package/resources/customizations/.github/agents/runtime-characterization-analyst.agent.md +124 -0
  152. package/resources/customizations/.github/hooks/discovery-agent-start.ps1 +139 -0
  153. package/resources/customizations/.github/hooks/discovery-agent-stop.ps1 +123 -0
  154. package/resources/customizations/.github/hooks/discovery-capability-probe.ps1 +98 -0
  155. package/resources/customizations/.github/hooks/discovery-planning.ps1 +91 -0
  156. package/resources/customizations/.github/hooks/discovery-pre-tool.ps1 +123 -0
  157. package/resources/customizations/.github/hooks/discovery.json +35 -0
  158. package/resources/customizations/.github/instructions/mermaid.instructions.md +85 -0
  159. package/resources/customizations/.github/prompts/execute-hard-lock.prompt.md +105 -0
  160. package/resources/customizations/.github/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
  161. package/resources/customizations/.github/skills/characterize-runtime-behavior/SKILL.md +134 -0
  162. package/resources/customizations/.github/skills/discovery-behavior-reconciliation/SKILL.md +46 -0
  163. package/resources/customizations/.github/skills/discovery-coverage-ledger/SKILL.md +50 -0
  164. package/resources/customizations/.github/skills/discovery-parity-matrix/SKILL.md +46 -0
  165. package/resources/customizations/.github/skills/discovery-repo-inventory/SKILL.md +46 -0
  166. package/resources/customizations/.github/skills/discovery-runtime-characterization/SKILL.md +46 -0
  167. package/resources/customizations/.github/skills/discovery-validate-artifacts/SKILL.md +46 -0
  168. package/resources/customizations/.github/skills/discovery-workflow/SKILL.md +62 -0
  169. package/resources/customizations/.github/skills/execution-environment/SKILL.md +24 -9
  170. package/resources/customizations/.github/skills/extract-feature-contract/SKILL.md +133 -0
  171. package/resources/customizations/.github/skills/generate-acceptance-scenarios/SKILL.md +132 -0
  172. package/resources/customizations/.github/skills/initialize-discovery-workspace/SKILL.md +131 -0
  173. package/resources/customizations/.github/skills/inventory-legacy-system/SKILL.md +131 -0
  174. package/resources/customizations/.github/skills/reconcile-parity-matrix/SKILL.md +131 -0
  175. package/resources/customizations/.github/skills/review-discovery-coverage/SKILL.md +129 -0
  176. package/resources/customizations/.github/skills/validate-discovery-artifacts/SKILL.md +127 -0
  177. package/resources/lib/codex-routing/CodexDeployment.psm1 +5 -1
  178. package/resources/lib/codex-routing/CodexDiscoveryRouting.psm1 +161 -0
  179. package/resources/lib/codex-routing/CodexTopology.psm1 +25 -2
  180. package/resources/lib/discovery-validation/DiscoveryAuthority.psd1 +90 -0
  181. package/resources/lib/discovery-validation/DiscoveryAuthority.psm1 +493 -0
  182. package/resources/lib/discovery-validation/DiscoveryAuthorization.psm1 +479 -0
  183. package/resources/lib/discovery-validation/DiscoveryCapability.psm1 +468 -0
  184. package/resources/lib/discovery-validation/DiscoveryEncoding.psm1 +156 -0
  185. package/resources/lib/discovery-validation/DiscoveryManifest.psm1 +384 -0
  186. package/resources/lib/discovery-validation/DiscoveryObservation.psm1 +217 -0
  187. package/resources/lib/discovery-validation/DiscoveryPayload.psm1 +276 -0
  188. package/resources/lib/discovery-validation/DiscoveryPlanning.psm1 +336 -0
  189. package/resources/lib/discovery-validation/DiscoveryRootGrant.psm1 +164 -0
  190. package/resources/lib/discovery-validation/DiscoveryStart.psm1 +440 -0
  191. package/resources/lib/discovery-validation/DiscoveryStartRecord.psm1 +296 -0
  192. package/resources/lib/discovery-validation/DiscoveryStop.psm1 +336 -0
  193. package/resources/lib/discovery-validation/DiscoveryToolRouting.psm1 +228 -0
  194. package/resources/powershell/PoshQC/PoshQC.Parallel.psm1 +452 -0
  195. package/resources/powershell/PoshQC/PoshQC.Shard.psm1 +106 -8
  196. package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +12 -0
  197. package/resources/powershell/PoshQC/PoshQC.psd1 +6 -1
  198. package/resources/powershell/PoshQC/PoshQC.psm1 +7 -1
  199. package/resources/powershell/PoshQC/README.md +20 -1
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: inventory-legacy-system
3
+ description: 'Inventory selected legacy repository surfaces with explicit analyzer scope and truthful coverage dispositions. Use when asked to inventory a legacy system or refresh selected discovery coverage.'
4
+ ---
5
+
6
+ # Inventory Legacy System
7
+
8
+ ## When to Use This Skill
9
+
10
+ Use for an explicit selected repository inventory or an incremental inventory refresh. Detection identifies candidates; it does not establish inspected behavior.
11
+
12
+ ## Inputs
13
+
14
+ These are human-facing workflow selections, not additional service-request fields.
15
+ Supply explicit selections; neither omitted inputs nor profile roots create authority.
16
+
17
+ | Input | Required contract |
18
+ | --- | --- |
19
+ | profile | Required validated profile and trusted workspace binding. |
20
+ | scope | Required confirmed or draft scope with selected component IDs and roots. |
21
+ | analyzer_ids | Required explicit supported analyzer selection; no arbitrary plugin or module. |
22
+ | write | Required explicit publication intent; it grants no paths by itself. |
23
+ | dry_run | Required explicit preview intent; preserve the request's no-write result. |
24
+
25
+ ## Routing
26
+
27
+ Logical role: `legacy-parity-analyst`.
28
+ The root owns preparation and launch; this skill never auto-launches a logical
29
+ role through frontmatter. The existing resolver selects the exact deployment,
30
+ model, effort and profile hash under the existing C1-C4 ceiling and execution
31
+ context. Do not choose a model, self-launch, create another scheduler or promote
32
+ an ordinary discovery action into an issue. The production-write count is zero.
33
+
34
+ ## Exact output boundary
35
+
36
+ These rows are maximum workflow caps, not instructions to create every kind.
37
+ Only the prepared required outputs may be created or replaced.
38
+
39
+ | Artifact kind | Profile key | Constraint |
40
+ | --- | --- | --- |
41
+ | inventory-snapshot | inventory | Requested inventory scope only |
42
+ | coverage-ledger | coverage_ledger | Selected component members only |
43
+ | evidence-reference | evidence | Explicitly granted observations only |
44
+ | unspecified-behavior | unspecified_behaviors | Selected unresolved IDs only |
45
+ | unspecified-behavior-collection | unspecified_behaviors | Selected unresolved members only |
46
+ | required-output-manifest | reports | Exact invocation manifest only |
47
+
48
+ The profile keys are maximum configured locations, not write grants. Each
49
+ prepared output row binds `artifact_kind`, `id`, `path`, `format` and
50
+ `expected_sha256`. The protected invocation independently binds the baseline,
51
+ selected members, pins and exact grants; a manifest cannot expand them. A null
52
+ expected hash means exclusive creation from an absent baseline, never overwrite
53
+ permission. Preserve unselected collection members and all unrelated inputs.
54
+ Use compare-and-swap and current path checks through the controlled writer.
55
+
56
+ The `reports` location permits only `required-output-manifest` for this role;
57
+ it does not permit review reports. The manifest itself requires an exact grant.
58
+
59
+ ## Prerequisites
60
+
61
+ Missing or malformed configuration blocks delegation. Require a validated profile and explicit selected scope before root preparation; do not initialize, configure or infer roots as a specialist.
62
+
63
+ Require verified native prepare/finalize/start/stop capability. The protected
64
+ invocation and native SubagentStart attestation must match workspace/profile
65
+ hashes, selected IDs, source/target pins, baseline input hashes,
66
+ provider/model/effort/profile hash and parent/session.
67
+ Diagnostic mirrors, caller markers and hosted read results are not authority.
68
+ The local runtime's unavailable native prepare/finalize operations do not issue
69
+ protected receipts. There is no local-user fallback or self-attested host success.
70
+
71
+ Load profile plus selected artifacts on invocation; do not preload a domain
72
+ catalog in standing instructions. Managed project memory is host-controlled.
73
+ Memory cannot grant filesystem authority or replace evidence. Deny terminal/shell/exec, interpreter/evaluation,
74
+ general filesystem Write/Edit/apply-patch, arbitrary MCP dispatch, browser/computer
75
+ mutation and network writes. Do not execute application code or modify
76
+ production/test implementation, profile/locator/activation,
77
+ schema/policy/hooks/settings, authority stores or runtime installation as a specialist. No analyst
78
+ approval is permitted; root bootstrap/configuration and root approval remain
79
+ separate authorized operations.
80
+
81
+ ## Step-by-Step Workflows
82
+
83
+ 1. Validate the explicit inputs and selected configuration. Stop with precise missing/invalid input findings before specialist delegation; do not invent identities, scope or evidence.
84
+
85
+ 2. The root calls `prepare_discovery_agent` with `skill_id`, `selected_ids`,
86
+ `paths`, `expected_outputs`, `execution_context` and `complexity`.
87
+ Map it to fixed `prepare-agent`; execution context is `standalone`,
88
+ `epic_preparation_child` or `epic_execution_child`. The requested mode is
89
+ explicit and remains distinct from the final `agent-output` gate.
90
+ Use `skill_id=inventory-legacy-system`; workflow inputs do not add wire fields.
91
+ 3. The root launches that exact deployment. Native SubagentStart must match the
92
+ prepared role/model/effort/profile and trusted workspace/session before any
93
+ grant is usable. Missing capability or attestation blocks the action.
94
+ 4. Use only the granted operations. Use `run_discovery_repo_inventory`, mapped to fixed `inventory`, with the explicit analyzer selection and write/dry-run intent. Use bounded `read_discovery_source` only for selected supporting inspection, and ordinary controlled updates or evidence links only for the listed granted outputs. Do not run application code, compiler evaluation, package restore or an arbitrary analyzer.
95
+ 5. Record detected paths, hashes, classifications and explicit analyzer limitations. Detection alone never marks a component inspected or dispositioned. Preserve unselected coverage members; do not silently shrink scope or infer a confirmed-empty inventory from a failed read. Missing facts or contradictory evidence become unresolved records. Inventory and coverage observations do not approve target requirements.
96
+ 6. Produce every exact required output and the stored `required-output-manifest`,
97
+ preserving its output array order for the digest. Validate claims, references,
98
+ pins and selected-ID accounting. Purpose-built tools supply authorized proposal
99
+ inputs for `input_path`/`evidence_path`; never invent a generic Write staging
100
+ step. Server-side role checks, exact one-use authorization and prospective
101
+ validation remain mandatory. Bounded source reads preserve content identity
102
+ and line ranges; truncation requires a narrower selection, not a completeness
103
+ claim or filesystem fallback.
104
+ 7. Call `finalize_discovery_agent` as the specialist, mapped to `finalize-agent`
105
+ with `mode=agent-output`, non-null `invocation_ref` and no operation inputs.
106
+ It validates the protected invocation's outputs, not final-message paths.
107
+ Native SubagentStop then verifies current output authority.
108
+ Missing final text cannot skip native stop validation.
109
+ 8. After native stop, the root records the explicit result, content-addressed artifact references,
110
+ selected-ID accounting and all findings. A successful tool call or generated
111
+ path alone is not evidence of completed discovery.
112
+
113
+ ## Stop and result
114
+
115
+ Account for each selected component and requested analyzer. If a dry-run leaves required stored outputs absent, finalization remains blocked; never fabricate writes or receipts. A valid incremental inventory is not discovery-complete, parity-complete or planning authority.
116
+
117
+ Structural success is not discovery, parity or planning completion.
118
+ Missing prepare/finalize/start/stop capability, missing outputs, invalid claims,
119
+ unresolved required work, wrong role/model/start context or a stale/missing
120
+ receipt blocks successful completion. Return explicit
121
+ PASS, FAIL or BLOCKED, distinguishing valid incremental outputs from a passing
122
+ completion gate. Missing native enforcement remains BLOCKED even when ordinary
123
+ local-user operations can run; do not substitute CLI success for native authority.
124
+
125
+ ## References
126
+
127
+ - [Canonical legacy-parity-analyst contract](../../../.claude/agents/legacy-parity-analyst.md)
128
+ - Installed v2 `service-request` and `required-output-manifest` schema contracts;
129
+ consume them through the authoritative runtime, with no checkout-schema fallback.
130
+ - The selected profile and pinned local artifacts supplied for this invocation;
131
+ references do not preload catalogs or grant access to unselected paths.
@@ -26,6 +26,7 @@ Before proceeding, the orchestrator must:
26
26
  2. Read applicable `.claude/rules/` files for the languages in scope.
27
27
  3. Read the policy files listed in the compliance reading order section of `CLAUDE.md`.
28
28
  4. Read the `execution-environment` skill (`.claude/skills/execution-environment/SKILL.md`) before delegating any worker. Delegation prompts and plans reference that brief instead of restating tool routes, command-text restrictions, the batch budget, hook context, or CI shape.
29
+ 5. In a workspace with an active discovery activation, expect the native planning gate (`.claude/hooks/enforce-discovery-planning-gate.ps1`) on every `atomic-planner` or orchestrator delegation: it admits the launch only when the session holds a current `planning`-mode validation receipt satisfying the profile's `completion_gates.planning_prerequisite`. A `DISCOVERY_PLANNING_GATE_BLOCKED:` denial means the discovery criteria are not current; run `validate-all --mode planning` through the installed gateway and re-delegate rather than bypassing. Discovery criteria gate planning and never substitute for the plan's own tests (`docs/engineering/legacy-discovery-and-parity/enforcement.md`).
29
30
 
30
31
  ## Checkpoint Handling
31
32
 
@@ -192,12 +193,12 @@ PR creation and PR body edits are delegated work, not orchestrator work. The orc
192
193
 
193
194
  The mandatory sequence is:
194
195
 
195
- 1. The orchestrator first refreshes the PR-context artifact via `mcp__drm-copilot__collect_pr_context` (or the equivalent context-collection mechanism), which writes `artifacts/pr_context.summary.txt`.
196
+ 1. The orchestrator first refreshes the PR-context artifact via `mcp__drm-copilot__collect_pr_context` (or the equivalent context-collection mechanism), which writes `artifacts/pr_context.summary.txt`. It calls the tool with `workspace_root` set to the item worktree and `target_ref` set to the head branch, so the summary is written beneath the item worktree even when the orchestrator runs in a coordinator session.
196
197
  2. The orchestrator runs the orchestrator-state validator (`mcp__drm-copilot__validate_orchestration_artifacts` or the equivalent repository-local validator CLI documented in `.claude/rules/orchestrator-state.md`) against `artifacts/orchestration/orchestrator-state.json --require-pr-creation-ready` and records the pass/fail result under a new `pr_author_preflight` field in the checkpoint, alongside `pr_author_receipt`: `{status ("pass"|"fail"), checked_at (ISO-8601 UTC), checkpoint_path, validator_command, output_summary}`. The orchestrator must not delegate to `Agent(pr-author)` when this preflight fails. The validator's full-lifecycle completion flag (`ci_gate`/`pr_gate`/routing-contract receipts) remains reserved for the post-PR/CI completion context (Step S9 / PR Creation Gate condition 6), not this pre-PR-creation preflight, because those values cannot exist before the first `gh pr create` of a branch.
197
- 3. The orchestrator then delegates PR creation and any PR body edits to `Agent(pr-author)`. The `pr-author` agent runs the `pr-author` skill to author the body, writes the body file `artifacts/pr_body_<N>.md` and the sibling receipt `artifacts/pr_body_<N>.receipt.json` with the shape `{skill, pr_body_path, number, sha256 (lowercase hex of the body bytes), context_summary_path, created_at (ISO-8601 UTC, strictly newer than `artifacts/pr_context.summary.txt` last-write)}`, issues `gh pr create --body-file artifacts/pr_body_<N>.md` (or `gh pr edit --body-file ...`), and reports the resulting PR URL or PR number. The delegation prompt MUST carry, on its own line, `Author-asserted autoclose issues: #<issue-num>`, where `<issue-num>` is the checkpoint `issue-num`, so the PR body emits `- Closes #<issue-num>` and the issue closes on merge. The line is omitted only when the checkpoint records no `issue-num`, or when `epic_mode` is true (an epic child whose integration PR owns the closing keyword). In every other case the `enforce-model-routing-receipt.ps1` Agent PreToolUse hook denies the `Agent(pr-author)` delegation with `MODEL_ROUTING_RECEIPT_BLOCKED: AUTHOR_ASSERTED_AUTOCLOSE_MISSING`.
198
+ 3. The orchestrator then delegates PR creation and any PR body edits to `Agent(pr-author)`. The `pr-author` agent runs the `pr-author` skill to author the body, writes the body file `artifacts/pr_body_<N>.md` and the sibling receipt `artifacts/pr_body_<N>.receipt.json` with the shape `{skill, pr_body_path, number, sha256 (lowercase hex of the body bytes), context_summary_path, created_at (ISO-8601 UTC, strictly newer than `artifacts/pr_context.summary.txt` last-write)}`, issues `gh pr create --body-file artifacts/pr_body_<N>.md` (or `gh pr edit --body-file ...`), and reports the resulting PR URL or PR number. The delegation prompt MUST carry, on its own line, `Author-asserted autoclose issues: #<issue-num>`, where `<issue-num>` is the checkpoint `issue-num`, so the PR body emits `- Closes #<issue-num>` and the issue closes on merge. When the parallel kickoff that started this run carries a `Combined issues:` line (a combined parallel item, issue #1013), the same author-asserted line also lists every issue named on that `Combined issues:` line, after `#<issue-num>`, so the one PR closes every member issue. The line is omitted only when the checkpoint records no `issue-num`, or when `epic_mode` is true (an epic child whose integration PR owns the closing keyword). In every other case the `enforce-model-routing-receipt.ps1` Agent PreToolUse hook denies the `Agent(pr-author)` delegation with `MODEL_ROUTING_RECEIPT_BLOCKED: AUTHOR_ASSERTED_AUTOCLOSE_MISSING`.
198
199
  4. The orchestrator records `pr_author_receipt` in the checkpoint, citing the body-file path and the receipt path that were verified.
199
200
 
200
- When the pr-author agent runs outside the item worktree (its process directory is not the worktree that holds the item's `artifacts/` tree), it passes the absolute canonical path `<item worktree>/artifacts/pr_body_<N>.md` to `--body-file`. The `enforce-pr-author-skill.ps1` hook resolves the item worktree from `--head` and reads the PR context summary, the body, and the receipt beneath it; in that topology it denies a relative `--body-file` with `PR_BODY_PATH_NONCANONICAL`, because `gh` would read the relative path from its own process directory.
201
+ When the pr-author agent runs outside the item worktree (its process directory is not the worktree that holds the item's `artifacts/` tree), it passes the absolute canonical path `<item worktree>/artifacts/pr_body_<N>.md` to `--body-file`. The `enforce-pr-author-skill.ps1` hook resolves the item worktree from `--head` and reads the PR context summary, the body, and the receipt beneath it; in that topology it denies a relative `--body-file` with `PR_BODY_PATH_NONCANONICAL`, because `gh` would read the relative path from its own process directory. In this coordinator-session topology the delegation prompt carries the line `branch: <branch>` naming the head branch, and pr-author derives the item worktree root itself from `git worktree list --porcelain` (the prompt carries no absolute path), following the `## Coordinator-Session Topology (issue #1011)` section of the pr-author agent and skill. The delegation runs without worktree isolation, because an isolated agent worktree refuses command text that names another worktree.
201
202
 
202
203
  `Agent(pr-author)` is the mandatory delegate for PR creation and PR body edits. Direct `gh pr create`/`gh pr edit --body*` from the main thread is prohibited and is blocked by the hook. Before the five receipt checks, the `enforce-pr-author-skill.ps1` PreToolUse hook independently re-validates the orchestrator-state checkpoint against `--require-pr-creation-ready` (via an injectable `$Invoker` subprocess seam) and blocks with `ORCHESTRATOR_STATE_PREFLIGHT_FAILED` when the checkpoint is missing or invalid — this is the local, hook-level enforcement mechanism that closes the bypass path (it runs inside the same hook that already intercepts `gh pr create`/`gh pr edit`, not as a CI check). The PreToolUse hook then verifies the receipt in five ordered checks: canonical body-file path, receipt present, `number` match, `sha256` match against the body bytes, and `created_at` strictly newer than the context summary last-write.
203
204
 
@@ -293,7 +294,7 @@ Each such prompt also carries a `branch: <name>` label naming the branch checked
293
294
 
294
295
  The same two lines are required on every delegation to an implementation agent (`python-typed-engineer`, `powershell-typed-engineer`, `typescript-engineer`, `csharp-typed-engineer`, and `atomic-executor`) and on every `Agent(orchestrator)` delegation that carries no epic-mode, parallel-mode, or preparation-mode kickoff marker. `enforce-orchestration-preimplementation-gate.ps1` resolves such a delegation's worktree from these lines and denies it with `TARGET_WORKTREE_NOT_DERIVABLE` when neither line is present, or with `TARGET_WORKTREE_AMBIGUOUS` when the lines disagree or match more than one live worktree.
295
296
 
296
- If a subagent artifact references a different issue number, the orchestrator rejects it, requests correction, and records the discrepancy under `artifact_errors` in the checkpoint.
297
+ If a subagent artifact references a different issue number, the orchestrator rejects it, requests correction, and records the discrepancy under `artifact_errors` in the checkpoint. Issue numbers named on a `Combined issues:` line of a parallel kickoff (issue #1013) are permitted cross-references to the combined item's member issues, not discrepancies.
297
298
 
298
299
  ## Step S9 — CI Green Gate
299
300
 
@@ -29,6 +29,17 @@ this operation may and may not disturb. Read that section before applying anythi
29
29
  - `$ARGUMENTS` names exactly one item: a GitHub issue number or reference, or a path to an entry
30
30
  under `docs/features/potential/`. An argument naming more than one item is rejected; admit one
31
31
  item per invocation so each admission decision and its mutation entry stay attributable.
32
+ - The run-existence check is evaluated first, before any argument-shape check: a pending or
33
+ not-started run, and a run whose `parallel_slug` no checkpoint tracks, are rejected before the
34
+ argument is examined.
35
+ - On either run-existence rejection, change no state and emit the rejection signal defined in
36
+ `## Mutation Rejection Signal (issue #1012)` of `.claude/rules/parallel-orchestration.md`: when
37
+ the run's slug is known, put the line `parallel_slug: <slug>` before the signal, and end the
38
+ final output with the literal line `PARALLEL_MUTATION_REJECTED: run_not_started` as its last
39
+ line, with no formatting and no trailing text.
40
+ - A closed run and an argument naming more than one item are rejected only after the run-existence
41
+ check, while the run's checkpoint exists; each of these rejections emits no rejection signal, and
42
+ the stop validates against that checkpoint.
32
43
 
33
44
  ## Re-Derive Durable State Before Applying Anything
34
45
 
@@ -106,7 +117,14 @@ re-derivation is mandatory and is not an optimization to skip when the checkpoin
106
117
  unstarted subset only: an in-flight conflict is precisely what the admission decision turns on.
107
118
  A tolerated overlap is not an edge: the two items run in the same or adjacent cohorts without a
108
119
  barrier, and the later-merging item merges `origin/main` under the existing per-item
109
- merge-conflict handling and re-passes CI before it merges.
120
+ merge-conflict handling and re-passes CI before it merges. The entry point applies the aggregate
121
+ cost cap (issue #1013) inside the same call, so the edges this step records are capped edges.
122
+ After the edges are computed, call Get-BlastRadiusCombination from the same facade over the
123
+ candidate plus the unstarted items, with the same `-Config` and `-Relation`, and report each
124
+ qualifying pair that involves the candidate with the text
125
+ `qualifies for combination; not combined (combination applies at planning time only)`. This
126
+ step never combines items: it adds no checkpoint field and makes no `mutations[]` change for a
127
+ qualifying pair.
110
128
 
111
129
  4. **Decide admission.** Call the bundled entry point, which needs no Python interpreter:
112
130
 
@@ -212,6 +230,8 @@ re-derivation is mandatory and is not an optimization to skip when the checkpoin
212
230
  - This operation never moves, restates, or re-derives an in-flight item's cohort or state.
213
231
  - This operation performs no destructive side effect: it closes no pull request and removes no
214
232
  worktree. Those belong to `/parallel-remove` with `--disposition abandon`.
233
+ - The step 5 stop and a failed preparation each emits no rejection signal: the run's checkpoint
234
+ already exists and state is already written, so the stop validates against that checkpoint.
215
235
 
216
236
  ## Completion Requirements
217
237
 
@@ -25,6 +25,14 @@ an `open`-mode run never auto-completes. Read that section before applying anyth
25
25
  - The run's `mode` is `open`. A `closed`-mode run completes through its completion predicate — every
26
26
  non-withdrawn item `merged` or `worktree_removed` — and needs no close. Report that and stop
27
27
  rather than closing a `closed`-mode run to force completion.
28
+ - The run-existence check is evaluated first. When no checkpoint tracks the `parallel_slug` named
29
+ in `$ARGUMENTS`, stop without changing state and emit the rejection signal defined in
30
+ `## Mutation Rejection Signal (issue #1012)` of `.claude/rules/parallel-orchestration.md`: put
31
+ the line `parallel_slug: <slug>` before the signal, and end the final output with the literal
32
+ line `PARALLEL_MUTATION_REJECTED: run_not_started` as its last line, with no formatting and no
33
+ trailing text.
34
+ - The `closed`-mode stop follows the run-existence check while the run's checkpoint exists, so it
35
+ emits no rejection signal and validates against that checkpoint.
28
36
 
29
37
  ## Re-Derive Durable State Before Applying Anything
30
38
 
@@ -56,7 +64,9 @@ which is exactly what the gate exists to prevent. The re-derivation is mandatory
56
64
  stderr line naming EVERY in-flight key, so the rejection names all the work that must finish
57
65
  first rather than one item at a time. On rejection: report the blocking keys and stop. A
58
66
  rejected close appends NO `mutations[]` entry and makes NO state change — do not record the
59
- attempt.
67
+ attempt. On that rejection, put the line `parallel_slug: <slug>` before the signal and end the
68
+ final output with the literal line `PARALLEL_MUTATION_REJECTED: items_in_flight` as its last
69
+ line, with no formatting and no trailing text, per `## Mutation Rejection Signal (issue #1012)`.
60
70
 
61
71
  3. **Append exactly one run-scoped `mutations[]` entry** for a successful close, built by the
62
72
  bundled entry point:
@@ -256,6 +256,11 @@ carries exactly these five elements.
256
256
  The child needs it for its own operation, and F7's Layer 1 hook resolves the target item by
257
257
  scanning the prompt for exactly that path shape, so the path is emitted as a bare path token.
258
258
  3. The canonical issue number line, which is the item key.
259
+ For a combined item (issue #1013), element 3 is followed by the line `Combined issues: #A #B`,
260
+ naming every other member issue of the combination recorded in the item's
261
+ `combined_issue_nums`, and the prompt instructs the child to carry every member on its pr-author
262
+ line, `Author-asserted autoclose issues: #A #B`, so the one pull request closes every member
263
+ issue. The added line is part of element 3, not a further element.
259
264
  4. The item's committed `plan-path`, together with the resume instruction: resume at atomic
260
265
  execution from that plan rather than re-running promotion, research, or planning. The item's
261
266
  prepared feature folder and approved atomic plan are already committed and preflight-clear on the
@@ -483,6 +488,16 @@ unattended. When `main` uses a merge queue, the queue replaces that `gh pr updat
483
488
  step 3 enqueues each green pull request, the queue validates it against the latest `main`
484
489
  together with the entries ahead of it, and step 3's confirmation polling waits for the merge.
485
490
 
491
+ **Resolution telemetry write (issue #1013).** When step 4 records `merge_status: merged` for an
492
+ item that is the later-merging item of a tolerated pair (an entry of the checkpoint's
493
+ `tolerated_overlaps` whose peer is already `merged` or `worktree_removed`), complete that entry's
494
+ `observed_resolution` object in the same checkpoint write. When a conflict was detected for the
495
+ pair, set `resolved_at` to the first `ci_green` confirmation that followed the detection,
496
+ `resolution_minutes` to the whole minutes between `conflict_detected_at` and `resolved_at`, and
497
+ `recorded_at`. When no conflict occurred, set `later_item`, `conflicted: false`,
498
+ `conflict_detected_at` and `resolved_at` to null, `resolution_minutes: 0`, and `recorded_at`.
499
+ Nothing reads `observed_resolution`; it is recorded for measurement only.
500
+
486
501
  ## Per-Item Merge-Conflict Handling
487
502
 
488
503
  Remediation is child-owned and parent-initiated. The conflict is always between one item's own
@@ -551,6 +566,19 @@ blast radius under-reported, and this feature records the child's blocked or rem
551
566
  only, leaving drift recording in `drift_events[]`, quiesce of admission, conflict recomputation
552
567
  against the observed radius, and requeue of the later-started item to F8.
553
568
 
569
+ **Detection telemetry write (issue #1013).** When the item whose merge conflicted is the
570
+ later-merging item of a tolerated pair whose peer is already `merged` or `worktree_removed`, set
571
+ `later_item`, `conflicted: true`, and `conflict_detected_at` on that `tolerated_overlaps` entry's
572
+ `observed_resolution` object, unless they are already set. Attribution is non-exclusive: the one
573
+ conflict episode is recorded on every such tolerated pair. The resolution fields are written in
574
+ `## Per-Item Merge to Main (Merge-on-Green)`.
575
+
576
+ **Combined item remediation (issue #1013).** A combined item, whose checkpoint entry carries
577
+ `combined_issue_nums`, remediates as one unit: one child, one `remediation_loop`, and one pull
578
+ request. A combined item that fails review or CI is remediated within that one child and pull
579
+ request, never splits back into separate pull requests, and is merged, blocked, or removed as a
580
+ whole.
581
+
554
582
  ## Worktree Cleanup
555
583
 
556
584
  After an item reaches `merge_status: merged` and that state is durably confirmed by
@@ -657,6 +685,11 @@ commit message, the pull-request body, and an evidence artifact at
657
685
  `docs/features/parallel/<slug>/evidence/other/mergeable-conflicts.<yyyy-MM-ddTHH-mm>.md` carrying
658
686
  `Timestamp`, `Command`, `EXIT_CODE`, and the script's JSON output verbatim.
659
687
 
688
+ The projection's `## Tolerated Overlaps` heading (issue #1013) renders `tolerated_overlaps[]`: one
689
+ row per entry with `a`, `b`, `reasons`, `cost`, `benefit`, and, from the entry's
690
+ `observed_resolution` object when present, `later_item`, `conflicted`, and `resolution_minutes`.
691
+ An entry without `observed_resolution` renders those three cells empty.
692
+
660
693
  Regeneration boundaries — regenerate at each of the following, not only at final completion:
661
694
 
662
695
  - Run kickoff, seeding the initial projection from the manifest and the seeded cohorts.
@@ -666,6 +699,7 @@ Regeneration boundaries — regenerate at each of the following, not only at fin
666
699
  - Every append to `mutations[]`.
667
700
  - Every append to `drift_events[]`.
668
701
  - Every append to an item's `mergeable_conflicts_resolved`.
702
+ - Every write of an `observed_resolution`.
669
703
  - Run completion in `closed` mode, or run close in `open` mode.
670
704
 
671
705
  Defining the `mutations[]` and `drift_events[]` appends as regeneration boundaries here means F6 and
@@ -172,9 +172,32 @@ explicitly not an integration branch: no item branch ever merges into it, it nev
172
172
  item branch, and it holds only `docs/features/parallel/<slug>/**`, a subtree no item's blast radius
173
173
  may include. Each item opens its own pull request against `main`.
174
174
 
175
- **Read access.** Readers — validators and the future `parallel-orchestrator` — reach both artifact
176
- classes by ref: `git fetch origin <branch>` followed by `git show <ref>:<path>`, without checking
177
- the ref out, per the technique documented in `.claude/skills/epic-run/SKILL.md`.
175
+ **Plan-home checkout.** After the last preparation child has terminated (the re-plan delegations
176
+ for a V1 or V2 failure count as preparation children) and before `## Manifest Authoring`, the
177
+ planner prepares the plan-home branch in its own session checkout: it runs `git fetch origin main`
178
+ and then `git checkout -b parallel/<slug>-plan origin/main`. When the branch already exists, as on
179
+ a resumed run, it runs `git checkout parallel/<slug>-plan` instead of recreating it. If the
180
+ checkout is refused, stop planning and report the refusal; do not stash, force, or reset. The run
181
+ folder is written in place, committed through the pathspec-bearing forms of
182
+ `### Integration Commit Form (issue #539)`, and pushed with
183
+ `git push -u origin parallel/<slug>-plan`. The checkout stays on `parallel/<slug>-plan` for the
184
+ remainder of the run.
185
+
186
+ **Read access.** Readers — validators, the planner itself, and the future `parallel-orchestrator` —
187
+ reach both artifact classes by ref: `git fetch origin <branch>` followed by `git show <ref>:<path>`,
188
+ without checking the ref out, per the technique documented in `.claude/skills/epic-run/SKILL.md`.
189
+ The planner reads each item's approved plan text and `spec.md` text for `### Planner procedure`, and
190
+ performs the git-integrity check, with `git fetch origin <branch>` followed by
191
+ `git show origin/<branch>:<path>` or `git cat-file -e`; it never checks an item branch out.
192
+
193
+ **No planner worktrees.** The planner runs no `git worktree add` for any step of planning: it
194
+ authors `parallel/<slug>-plan` in its own session checkout and reads item text by ref. The only
195
+ worktrees created during planning are the preparation children's `isolation: "worktree"` worktrees,
196
+ and the Claude Code runtime creates and removes them: it removes one immediately when the child
197
+ leaves no changes, and otherwise through its periodic sweep once the commits are pushed and the
198
+ tree is clean. A worktree the planner creates itself is outside every record the removal gates read
199
+ and outside the runtime sweep, so it stays registered after the run closes and only the
200
+ repository-wide cleanup apply mode can remove it.
178
201
 
179
202
  Three residual risks are recorded rather than eliminated:
180
203
 
@@ -258,9 +281,11 @@ any work: the policy rules, the tier map, and the process artifacts. A citation
258
281
  paths is evidence that the author obeyed the reading order, not evidence that the change will write
259
282
  the file, so `derive_blast_radius` drops it from the harvest and `validate_blast_radius` drops it
260
283
  from its plan-side extraction, which keeps V1 and V2 self-consistent. The extractor likewise rejects
261
- three token shapes that were never write claims: a wildcard-free token naming a directory rather
262
- than a file, a `docs/features/` glob whose wildcard spans every feature folder, and a contract token
263
- carrying no ASCII letter. These exclusions are part of the landed contract, so the prohibition now
284
+ five token shapes that were never write claims: a wildcard-free token naming a directory rather
285
+ than a file, a `docs/features/` glob whose wildcard occupies or truncates the feature-folder
286
+ segment, a contract token carrying no ASCII letter, a token containing a placeholder or
287
+ interpolation marker, and a contract token that is a default spreadsheet sheet name. These
288
+ exclusions are part of the landed contract, so the prohibition now
264
289
  reads: do not narrow a radius beyond the configured exclusions in order to suppress a conflict edge.
265
290
 
266
291
  **Appending an excluded path is the planner's obligation, not an exception.** An exclusion describes
@@ -331,6 +356,41 @@ The kickoff artifact's `## Item Summary` `complexity` cell for the item equals i
331
356
  derivation. It is distinct from the deliberately absent worthiness verdict: assessing a band never
332
357
  admits, rejects, or reorders an item.
333
358
 
359
+ ## Issue Combination
360
+
361
+ Combination (issue #1013) runs once, at planning time, after every item is prepared, its radius is
362
+ declared, and its band is assigned, and before cohort seeding. The rules are stated in
363
+ `### Integration-cost scheduling (issue #722)` of `.claude/rules/parallel-orchestration.md`; this
364
+ section states the planner's steps.
365
+
366
+ 1. **Find combinations.** Call Get-BlastRadiusCombination from the facade `BlastRadius.psm1` with
367
+ `-Item` (each item's key, declared radius, and band), `-Config` (the parsed truth table), and
368
+ `-Relation ${function:Test-BlastRadiusConflict}`. Combination proceeds without operator
369
+ approval. It returns nothing when `conflict_tolerance` is absent or tolerance_percent is 0.
370
+ 2. **P6 skip.** If applying every combination would leave fewer than two items (ready-gate
371
+ invariant P6), apply none, and report each qualifying pair as not combined with the reason
372
+ "applying the combinations would leave fewer than two items".
373
+ 3. **Re-plan on the primary branch.** For each combination, issue one follow-up preparation-mode
374
+ delegation on the primary item's pushed branch, the same re-plan posture as a V1 or V2 failure.
375
+ The delegation carries the unchanged preparation kickoff line, followed by the line
376
+ `Combined issues: #A #B` naming each other member by issue number and by branch name only.
377
+ 4. **Child work.** The child imports each other member's committed feature folder by path from that
378
+ member's pushed branch ref (a path checkout, not a branch merge, so there is still no fan-in
379
+ merge), authors one atomic plan in the primary feature folder covering every member's spec,
380
+ re-runs preflight, commits, and pushes.
381
+ 5. **Fresh assessment.** Re-derive the combined item's declared radius from the combined plan, read
382
+ by ref as `**Read access.**` describes, and run a fresh `## Complexity Assessment` for it.
383
+ 6. **Record.** Remove the non-primary members from `items[]`, record `combined_issue_nums` (the other
384
+ members' issue numbers) on the primary item, and add the combination (members, primary, pairs
385
+ with cost and benefit, `estimated_savings`) to the checkpoint's `combinations` list.
386
+ 7. **Capped scheduling.** Only then run the scheduling entry point over the post-combination item
387
+ set; its aggregate cap applies to every remaining item.
388
+
389
+ Each combination re-plan delegation is a preparation child, so the `**Plan-home checkout.**` of
390
+ `## Artifact Home` follows its termination. The planner reads the combined plan by ref and never
391
+ checks an item branch out. The non-primary members' preparation branches stay in place and are
392
+ reported, the same residual as risk 2 in `## Artifact Home`.
393
+
334
394
  ## Cohort Seeding
335
395
 
336
396
  Reach cohort computation through the **destination-runtime bash entry point** under
@@ -673,6 +733,9 @@ The final report to the operator must include:
673
733
  gate the report, does not change the cohort table, and no finding is escalated to Blocking.
674
734
  - Both kickoff artifact paths: `artifacts/orchestration/parallel-kickoff-<slug>.md` and
675
735
  `docs/features/parallel/<slug>/parallel-kickoff.md`.
736
+ - The combination listing (issue #1013): each combination with its members, primary, qualifying
737
+ pairs with cost and benefit, the `combination_threshold_percent` applied, and
738
+ `estimated_savings`; and each qualifying pair that was not combined, with the reason.
676
739
 
677
740
  End with the statement that execution has NOT started and begins only when the operator runs
678
741
  `/parallel-run <slug>` or replays the kickoff prompt from the main session.
@@ -25,6 +25,15 @@ this operation may disturb. Read that section before applying anything here.
25
25
  tracks its `parallel_slug`.
26
26
  - `$ARGUMENTS` names exactly one item key — an integer `items[].issue_num`. Item keys are integers
27
27
  throughout this surface; there is no string key.
28
+ - The run-existence check is evaluated first. When no checkpoint tracks the run's `parallel_slug`,
29
+ stop without changing state and emit the rejection signal defined in
30
+ `## Mutation Rejection Signal (issue #1012)` of `.claude/rules/parallel-orchestration.md`: when
31
+ the run's slug is known, put the line `parallel_slug: <slug>` before the signal, and end the
32
+ final output with the literal line `PARALLEL_MUTATION_REJECTED: run_not_started` as its last
33
+ line, with no formatting and no trailing text.
34
+ - An argument that is not exactly one integer key is rejected only after the run-existence check,
35
+ while the run's checkpoint exists; that rejection emits no rejection signal and validates against
36
+ that checkpoint.
28
37
 
29
38
  ## Re-Derive Durable State Before Applying Anything
30
39
 
@@ -55,6 +64,12 @@ Implement this table exactly, one branch per row:
55
64
  An item already `withdrawn` or `blocked` is not a live removal target and is rejected as an unknown
56
65
  item.
57
66
 
67
+ On a rejected row, put the line `parallel_slug: <slug>` before the signal and end the final output
68
+ with one literal signal line as its last line, with no formatting and no trailing text, per
69
+ `## Mutation Rejection Signal (issue #1012)`: `PARALLEL_MUTATION_REJECTED: items_in_flight` for an
70
+ `in_flight` item without `--disposition`, and `PARALLEL_MUTATION_REJECTED: unknown_item` for an
71
+ unknown, `withdrawn`, or `blocked` item. The `merged` rejection emits no rejection signal.
72
+
58
73
  ## No Default Disposition
59
74
 
60
75
  Removing an item that is `in_flight` without an explicit `--disposition` is REJECTED. No default is
@@ -27,6 +27,12 @@ $ARGUMENTS
27
27
  - STOP without delegating anything when that path does not exist. Report that the run has no
28
28
  committed kickoff artifact: the user must run `/parallel-plan` first (or, for a run whose
29
29
  manifest was authored manually, invoke `/parallel-orchestrate <manifest-path>` directly).
30
+ - On that STOP, emit the rejection signal defined in `## Mutation Rejection Signal (issue #1012)`
31
+ of `.claude/rules/parallel-orchestration.md`: put the line `parallel_slug: <parallel-slug>`
32
+ before the signal, and end the final output with the literal line
33
+ `PARALLEL_MUTATION_REJECTED: kickoff_artifact_missing` as its last line, with no formatting and
34
+ no trailing text. No run checkpoint exists for this run, so the stop hook releases the stop on
35
+ that line.
30
36
  - Do not synthesize a kickoff prompt, do not fall back to the planner's working copy under
31
37
  `artifacts/orchestration/`, and do not launch a partial run in place of the STOP.
32
38
  3. Execute the kickoff artifact's `## Invocation Prompt` section as the run objective, applying the
@@ -79,9 +79,10 @@ writes and the `gh pr create` / `gh pr edit --body-file` handoff.
79
79
  - Auto-close bullets must use exactly `- Closes #NNN` format. Three sources are valid:
80
80
  1. the PR-context "Issues to autoclose" list;
81
81
  2. the PR-context "Author-asserted autoclose issues" list (rendered from the PR Intent);
82
- 3. an issue named as author-asserted in the delegation prompt, on the line
83
- `Author-asserted autoclose issues: #NNN`. This source is valid even when the PR context
84
- lists no verified autoclose issues.
82
+ 3. each issue named on the line `Author-asserted autoclose issues: #NNN [#NNN ...]` in the
83
+ delegation prompt; a combined parallel item (issue #1013) names every member issue on that
84
+ one line, and each named issue gets its own `- Closes #NNN` bullet. This source is valid even
85
+ when the PR context lists no verified autoclose issues.
85
86
  - Emit the fallback `- None` bullet only when no source has an entry.
86
87
  - GitHub validation applies to the two PR-context lists: if it is unavailable or unverified for
87
88
  an entry on those lists, do not emit `Closes` for that entry. An issue named as author-asserted
@@ -122,4 +123,20 @@ an edit in one of two ways:
122
123
  - Run `gh pr edit <N> --body-file artifacts/pr_body_<N>.md` from the item worktree. The gate
123
124
  derives the branch from that worktree's checkout.
124
125
  - When running outside the item worktree, append the shell comment `# branch: <branch>` to the
125
- command, and pass the absolute canonical body path beneath the item worktree.
126
+ command, and pass the absolute canonical body path beneath the item worktree.
127
+
128
+ ## Coordinator-Session Topology (issue #1011)
129
+
130
+ When the process directory is not the item worktree (for example, when the orchestrator delegates
131
+ from a coordinator session rooted in another checkout), a relative `artifacts/` path resolves to the
132
+ wrong checkout. In that topology, use this procedure instead of the relative forms above:
133
+
134
+ 1. Run `git worktree list --porcelain` as a single command. Select the `worktree` entry whose `branch refs/heads/<branch>` line names the `--head` branch, and use that entry's absolute root, written with forward slashes, as `<item worktree>`. If zero or more than one entry matches, stop and report the result; do not choose a root.
135
+ 2. Confirm that the PR context summary already exists at `<item worktree>/artifacts/pr_context.summary.txt`. The orchestrator produces it; pr-author does not call `collect_pr_context`.
136
+ 3. Write the body to `<item worktree>/artifacts/pr_body_<N>.md` by absolute path.
137
+ 4. Run `sha256sum <item worktree>/artifacts/pr_body_<N>.md` as a single command and take the lowercase hexadecimal digest.
138
+ 5. Write the receipt to `<item worktree>/artifacts/pr_body_<N>.receipt.json` by absolute path. Keep `pr_body_path` and `context_summary_path` repo-relative (`artifacts/pr_body_<N>.md` and `artifacts/pr_context.summary.txt`), so no absolute path is recorded in the receipt. The receipt `created_at` must be strictly newer than the last-write time of the summary.
139
+ 6. Run `gh pr create --head <branch> --body-file <item worktree>/artifacts/pr_body_<N>.md`. The gate resolves the item worktree from `--head` and verifies the body and receipt beneath it; in this topology it denies a relative `--body-file` with `PR_BODY_PATH_NONCANONICAL`.
140
+
141
+ In this topology pr-author is delegated without worktree isolation, because an isolated agent
142
+ worktree refuses command text that names another worktree.