@danmoisan/drm-copilot-mcp 1.1.19 → 1.1.21

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 (170) hide show
  1. package/out/mcp-server.js +172 -11
  2. package/package.json +1 -1
  3. package/resources/claude-customizations/.claude/agents/atomic-executor.md +17 -6
  4. package/resources/claude-customizations/.claude/agents/atomic-planner.md +10 -2
  5. package/resources/claude-customizations/.claude/agents/epic-orchestrator.md +5 -0
  6. package/resources/claude-customizations/.claude/agents/orchestrator.md +4 -1
  7. package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +4 -0
  8. package/resources/claude-customizations/.claude/agents/task-researcher.md +8 -0
  9. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate-command.ps1 +190 -0
  10. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +22 -53
  11. package/resources/claude-customizations/.claude/hooks/hook-docs-only-diff.ps1 +5 -1
  12. package/resources/claude-customizations/.claude/hooks/premortem-section.ps1 +149 -0
  13. package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +210 -84
  14. package/resources/claude-customizations/.claude/hooks/validate-planner-output.ps1 +13 -1
  15. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +24 -5
  16. package/resources/claude-customizations/.claude/lib/ci-gate/Invoke-MergeConfirmationParser.ps1 +203 -0
  17. package/resources/claude-customizations/.claude/lib/codex-routing/CodexDeployment.psm1 +10 -10
  18. package/resources/claude-customizations/.claude/rules/plan-acceptance-gates.md +46 -10
  19. package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +48 -16
  20. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/SKILL.md +7 -3
  21. package/resources/claude-customizations/.claude/skills/csharp-change-budget-router/SKILL.md +2 -2
  22. package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +12 -3
  23. package/resources/claude-customizations/.claude/skills/epic-plan/SKILL.md +4 -2
  24. package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +134 -0
  25. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +22 -9
  26. package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +29 -5
  27. package/resources/claude-customizations/.claude/skills/powershell-change-budget-router/SKILL.md +1 -1
  28. package/resources/claude-customizations/.claude/skills/python-change-budget-router/SKILL.md +1 -1
  29. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +14 -6
  30. package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +6 -0
  31. package/resources/claude-customizations/config/orchestration-routing.json +7 -7
  32. package/resources/claude-customizations/pack-manifests/core.json +4 -0
  33. package/resources/codex-and-agents-customizations/.agents/skills/README.md +1 -0
  34. package/resources/codex-and-agents-customizations/.agents/skills/atomic-executor/SKILL.md +8 -7
  35. package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +39 -4
  36. package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +8 -6
  37. package/resources/codex-and-agents-customizations/.agents/skills/codex-model-routing/SKILL.md +6 -6
  38. package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +2 -2
  39. package/resources/codex-and-agents-customizations/.agents/skills/epic-orchestrate/SKILL.md +15 -8
  40. package/resources/codex-and-agents-customizations/.agents/skills/epic-plan/SKILL.md +2 -2
  41. package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +134 -0
  42. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +16 -6
  43. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +1 -1
  44. package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +1 -1
  45. package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +1 -1
  46. package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +7 -3
  47. package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +6 -0
  48. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c1.toml +11 -7
  49. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c2.toml +11 -7
  50. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3-elevated.toml +11 -7
  51. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3.toml +11 -7
  52. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c4.toml +11 -7
  53. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +11 -7
  54. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c1.toml +6 -3
  55. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c2.toml +6 -3
  56. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3-elevated.toml +6 -3
  57. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3.toml +6 -3
  58. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c4.toml +6 -3
  59. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +6 -3
  60. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planning.toml +1 -1
  61. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c1.toml +1 -1
  62. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c2.toml +1 -1
  63. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c3-elevated.toml +1 -1
  64. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c3.toml +1 -1
  65. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c4.toml +1 -1
  66. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward.toml +1 -1
  67. package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-planning.toml +1 -1
  68. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c1.toml +1 -1
  69. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c2.toml +1 -1
  70. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3-elevated.toml +1 -1
  71. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3.toml +1 -1
  72. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c4.toml +1 -1
  73. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +1 -1
  74. package/resources/codex-and-agents-customizations/.codex/agents/epic-orchestrator.toml +4 -2
  75. package/resources/codex-and-agents-customizations/.codex/agents/epic-planner.toml +2 -2
  76. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c1.toml +1 -1
  77. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c2.toml +1 -1
  78. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3-elevated.toml +1 -1
  79. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3.toml +1 -1
  80. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c4.toml +1 -1
  81. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +1 -1
  82. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c1.toml +8 -5
  83. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c2.toml +8 -5
  84. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3-elevated.toml +8 -5
  85. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3.toml +8 -5
  86. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c4.toml +8 -5
  87. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +8 -5
  88. package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-planning.toml +1 -1
  89. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c1.toml +1 -1
  90. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c2.toml +1 -1
  91. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3-elevated.toml +1 -1
  92. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3.toml +1 -1
  93. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c4.toml +1 -1
  94. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
  95. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c1.toml +1 -1
  96. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c2.toml +1 -1
  97. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3-elevated.toml +1 -1
  98. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3.toml +1 -1
  99. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c4.toml +1 -1
  100. package/resources/codex-and-agents-customizations/.codex/agents/pr-author.toml +1 -1
  101. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c1.toml +1 -1
  102. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c2.toml +1 -1
  103. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3-elevated.toml +1 -1
  104. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3.toml +1 -1
  105. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c4.toml +1 -1
  106. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature.toml +1 -1
  107. package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-planning.toml +1 -1
  108. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c1.toml +1 -1
  109. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c2.toml +1 -1
  110. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3-elevated.toml +1 -1
  111. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3.toml +1 -1
  112. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c4.toml +1 -1
  113. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +1 -1
  114. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c1.toml +7 -1
  115. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c2.toml +7 -1
  116. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3-elevated.toml +7 -1
  117. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3.toml +7 -1
  118. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c4.toml +7 -1
  119. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher.toml +7 -1
  120. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c1.toml +1 -1
  121. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c2.toml +1 -1
  122. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3-elevated.toml +1 -1
  123. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3.toml +1 -1
  124. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c4.toml +1 -1
  125. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer.toml +1 -1
  126. package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
  127. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate-command.ps1 +190 -0
  128. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate.ps1 +17 -38
  129. package/resources/codex-and-agents-customizations/.codex/hooks/hook-docs-only-diff.ps1 +5 -1
  130. package/resources/codex-and-agents-customizations/.codex/hooks/record-subagent-routing-attestation.ps1 +82 -70
  131. package/resources/codex-and-agents-customizations/.codex/prompts/feature-review-remediate.md +6 -4
  132. package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +1 -1
  133. package/resources/codex-and-agents-customizations/pack-manifests/core.json +2 -0
  134. package/resources/config/orchestration-routing.json +7 -7
  135. package/resources/customizations/.github/agents/atomic_executor.agent.md +21 -11
  136. package/resources/customizations/.github/agents/atomic_planning.agent.md +8 -3
  137. package/resources/customizations/.github/agents/csharp-atomic-executor.agent.md +13 -9
  138. package/resources/customizations/.github/agents/csharp-atomic-planning.agent.md +2 -2
  139. package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +2 -2
  140. package/resources/customizations/.github/agents/csharp-typed-engineer.agent.md +3 -3
  141. package/resources/customizations/.github/agents/orchestrator.agent.md +8 -5
  142. package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +13 -9
  143. package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +2 -2
  144. package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +2 -2
  145. package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +3 -3
  146. package/resources/customizations/.github/agents/python-atomic-executor.agent.md +13 -9
  147. package/resources/customizations/.github/agents/python-atomic-planning.agent.md +2 -2
  148. package/resources/customizations/.github/agents/python-orchestrator.agent.md +2 -2
  149. package/resources/customizations/.github/agents/task-researcher.agent.md +6 -0
  150. package/resources/customizations/.github/prompts/generate-atomic-plan.prompt.md +16 -10
  151. package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +2 -2
  152. package/resources/customizations/.github/prompts/orchestrate-powershell-work.prompt.md +1 -1
  153. package/resources/customizations/.github/prompts/orchestrate-python-work.prompt.md +1 -1
  154. package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +2 -2
  155. package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +39 -4
  156. package/resources/customizations/.github/skills/csharp-change-budget-router/SKILL.md +1 -1
  157. package/resources/customizations/.github/skills/execution-environment/SKILL.md +134 -0
  158. package/resources/customizations/.github/skills/powershell-change-budget-router/SKILL.md +1 -1
  159. package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +7 -3
  160. package/resources/feature-templates/bug/plan.yyyy-MM-ddTHH-mm.md +10 -0
  161. package/resources/feature-templates/feature/plan.yyyy-MM-ddTHH-mm.md +11 -0
  162. package/resources/feature-templates/refactor/plan.yyyy-MM-ddTHH-mm.md +11 -0
  163. package/resources/lib/codex-routing/CodexDeployment.psm1 +10 -10
  164. package/resources/powershell/PoshQC/PoshQC.CoverageMerge.psm1 +163 -0
  165. package/resources/powershell/PoshQC/PoshQC.Shard.psm1 +296 -0
  166. package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +23 -4
  167. package/resources/powershell/PoshQC/PoshQC.psd1 +7 -1
  168. package/resources/powershell/PoshQC/PoshQC.psm1 +17 -5
  169. package/resources/powershell/PoshQC/README.md +13 -1
  170. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +3 -0
@@ -1,6 +1,6 @@
1
1
  name = "python-typed-engineer-c4"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-sol"
3
+ model = "gpt-6-astra"
4
4
  model_reasoning_effort = "max"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/python-typed-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "python-typed-engineer"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/python-typed-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "task-researcher-c1"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-luna"
3
+ model = "gpt-6-luna"
4
4
  model_reasoning_effort = "low"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/task-researcher.agent.md
@@ -13,6 +13,10 @@ Do not weaken validation-only preflight loops, QA gates, remediation triggers, r
13
13
  Applied rewrites:
14
14
  - Rewrite Claude skill paths to shared skill paths.
15
15
 
16
+ Use the following repo-local skills as the canonical workflow source:
17
+ - evidence-and-timestamp-conventions
18
+ - execution-environment
19
+
16
20
  Canonical migration source:
17
21
  - .github/agents/task-researcher.agent.md
18
22
 
@@ -33,7 +37,9 @@ tools:
33
37
  - Glob
34
38
  - WebFetch
35
39
  - "Write(/artifacts/research/**)"
40
+ skills:
36
41
  - evidence-and-timestamp-conventions
42
+ - execution-environment
37
43
  memory: project
38
44
  hooks:
39
45
  Stop:
@@ -1,6 +1,6 @@
1
1
  name = "task-researcher-c2"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "medium"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/task-researcher.agent.md
@@ -13,6 +13,10 @@ Do not weaken validation-only preflight loops, QA gates, remediation triggers, r
13
13
  Applied rewrites:
14
14
  - Rewrite Claude skill paths to shared skill paths.
15
15
 
16
+ Use the following repo-local skills as the canonical workflow source:
17
+ - evidence-and-timestamp-conventions
18
+ - execution-environment
19
+
16
20
  Canonical migration source:
17
21
  - .github/agents/task-researcher.agent.md
18
22
 
@@ -33,7 +37,9 @@ tools:
33
37
  - Glob
34
38
  - WebFetch
35
39
  - "Write(/artifacts/research/**)"
40
+ skills:
36
41
  - evidence-and-timestamp-conventions
42
+ - execution-environment
37
43
  memory: project
38
44
  hooks:
39
45
  Stop:
@@ -1,6 +1,6 @@
1
1
  name = "task-researcher-c3-elevated"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-sol"
3
+ model = "gpt-6-astra"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/task-researcher.agent.md
@@ -13,6 +13,10 @@ Do not weaken validation-only preflight loops, QA gates, remediation triggers, r
13
13
  Applied rewrites:
14
14
  - Rewrite Claude skill paths to shared skill paths.
15
15
 
16
+ Use the following repo-local skills as the canonical workflow source:
17
+ - evidence-and-timestamp-conventions
18
+ - execution-environment
19
+
16
20
  Canonical migration source:
17
21
  - .github/agents/task-researcher.agent.md
18
22
 
@@ -33,7 +37,9 @@ tools:
33
37
  - Glob
34
38
  - WebFetch
35
39
  - "Write(/artifacts/research/**)"
40
+ skills:
36
41
  - evidence-and-timestamp-conventions
42
+ - execution-environment
37
43
  memory: project
38
44
  hooks:
39
45
  Stop:
@@ -1,6 +1,6 @@
1
1
  name = "task-researcher-c3"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/task-researcher.agent.md
@@ -13,6 +13,10 @@ Do not weaken validation-only preflight loops, QA gates, remediation triggers, r
13
13
  Applied rewrites:
14
14
  - Rewrite Claude skill paths to shared skill paths.
15
15
 
16
+ Use the following repo-local skills as the canonical workflow source:
17
+ - evidence-and-timestamp-conventions
18
+ - execution-environment
19
+
16
20
  Canonical migration source:
17
21
  - .github/agents/task-researcher.agent.md
18
22
 
@@ -33,7 +37,9 @@ tools:
33
37
  - Glob
34
38
  - WebFetch
35
39
  - "Write(/artifacts/research/**)"
40
+ skills:
36
41
  - evidence-and-timestamp-conventions
42
+ - execution-environment
37
43
  memory: project
38
44
  hooks:
39
45
  Stop:
@@ -1,6 +1,6 @@
1
1
  name = "task-researcher-c4"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-sol"
3
+ model = "gpt-6-astra"
4
4
  model_reasoning_effort = "max"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/task-researcher.agent.md
@@ -13,6 +13,10 @@ Do not weaken validation-only preflight loops, QA gates, remediation triggers, r
13
13
  Applied rewrites:
14
14
  - Rewrite Claude skill paths to shared skill paths.
15
15
 
16
+ Use the following repo-local skills as the canonical workflow source:
17
+ - evidence-and-timestamp-conventions
18
+ - execution-environment
19
+
16
20
  Canonical migration source:
17
21
  - .github/agents/task-researcher.agent.md
18
22
 
@@ -33,7 +37,9 @@ tools:
33
37
  - Glob
34
38
  - WebFetch
35
39
  - "Write(/artifacts/research/**)"
40
+ skills:
36
41
  - evidence-and-timestamp-conventions
42
+ - execution-environment
37
43
  memory: project
38
44
  hooks:
39
45
  Stop:
@@ -1,6 +1,6 @@
1
1
  name = "task-researcher"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/task-researcher.agent.md
@@ -13,6 +13,10 @@ Do not weaken validation-only preflight loops, QA gates, remediation triggers, r
13
13
  Applied rewrites:
14
14
  - Rewrite Claude skill paths to shared skill paths.
15
15
 
16
+ Use the following repo-local skills as the canonical workflow source:
17
+ - evidence-and-timestamp-conventions
18
+ - execution-environment
19
+
16
20
  Canonical migration source:
17
21
  - .github/agents/task-researcher.agent.md
18
22
 
@@ -33,7 +37,9 @@ tools:
33
37
  - Glob
34
38
  - WebFetch
35
39
  - "Write(/artifacts/research/**)"
40
+ skills:
36
41
  - evidence-and-timestamp-conventions
42
+ - execution-environment
37
43
  memory: project
38
44
  hooks:
39
45
  Stop:
@@ -1,6 +1,6 @@
1
1
  name = "typescript-engineer-c1"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-luna"
3
+ model = "gpt-6-luna"
4
4
  model_reasoning_effort = "low"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/typescript-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "typescript-engineer-c2"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "medium"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/typescript-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "typescript-engineer-c3-elevated"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-sol"
3
+ model = "gpt-6-astra"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/typescript-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "typescript-engineer-c3"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/typescript-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "typescript-engineer-c4"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-sol"
3
+ model = "gpt-6-astra"
4
4
  model_reasoning_effort = "max"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/typescript-engineer.agent.md
@@ -1,6 +1,6 @@
1
1
  name = "typescript-engineer"
2
2
  description = "Converted subagent"
3
- model = "gpt-5.6-terra"
3
+ model = "gpt-6.1-sol"
4
4
  model_reasoning_effort = "high"
5
5
  developer_instructions = '''
6
6
  Canonical migration source: .github/agents/typescript-engineer.agent.md
@@ -2,7 +2,7 @@ default_permissions = ":danger-full-access"
2
2
 
3
3
  [mcp_servers.drm-copilot]
4
4
  command = "npx"
5
- args = ["-y", "@danmoisan/drm-copilot-mcp@1.1.19"]
5
+ args = ["-y", "@danmoisan/drm-copilot-mcp@1.1.21"]
6
6
  required = true
7
7
  enabled_tools = [
8
8
  "collect_commit_context",
@@ -0,0 +1,190 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Scope predicate and pull-request selector reader for the epic merge gate (issue #952).
4
+ .DESCRIPTION
5
+ Dot-sourced by enforce-epic-merge-gate.ps1 on both runtimes; this file is byte-identical in
6
+ .claude/hooks and .codex/hooks. Under a merge queue every gh pr merge spelling (--merge, -m,
7
+ --squash, -s, --rebase, -r, --auto, --admin, or no method flag) adds the pull request to the
8
+ queue, and the gh api mutations enqueuePullRequest, enablePullRequestAutoMerge, and
9
+ mergePullRequest and the REST pulls/<n>/merge endpoint also reach the base branch. All of
10
+ them are in scope. A gh pr merge whose only action flag is --disable-auto is out of scope.
11
+
12
+ Pure string logic only: no disk, process, network, clock, or environment access. The file
13
+ dot-sources and imports nothing; it consumes Get-CommandLineInvocation and
14
+ Get-CommandLineStructuralMatch, which the gate loads from hook-command-invocation.ps1 first.
15
+
16
+ Known limitation (issue #952 code review CR-5): the gh api scope reads the command text
17
+ only. A GraphQL mutation supplied from a file (gh api graphql -F query=@mutation.graphql,
18
+ or gh api --input payload.json) is not visible to this text-based scope and is not gated.
19
+ #>
20
+
21
+ # gh pr merge flags that perform or schedule a merge. Any of them keeps a command in scope even
22
+ # when it also carries --disable-auto.
23
+ $script:EpicMergeGateActionFlags = @('--merge', '-m', '--squash', '-s', '--rebase', '-r', '--auto', '--admin')
24
+
25
+ # gh pr merge flags, including the inherited --repo, that consume the following token as a value.
26
+ $script:EpicMergeGateValueFlags = @('-b', '--body', '-F', '--body-file', '-t', '--subject', '-A', '--author-email', '--match-head-commit', '-R', '--repo')
27
+
28
+ # GraphQL mutations that merge, enqueue, or schedule the merge of a pull request.
29
+ $script:EpicMergeGateMutationNames = @('enqueuePullRequest', 'enablePullRequestAutoMerge', 'mergePullRequest')
30
+
31
+ # The REST merge endpoint path; group 1 is the pull-request number.
32
+ $script:EpicMergeGateRestMergePattern = '(?:^|/)pulls/(\d+)/merge(?:$|[^\w-])'
33
+
34
+ function Get-EpicMergeGateFlagName {
35
+ <#
36
+ .SYNOPSIS
37
+ Return the flag name of a dash-led token without any '=value' suffix.
38
+ .OUTPUTS
39
+ System.String
40
+ #>
41
+ [CmdletBinding()]
42
+ [OutputType([string])]
43
+ param([Parameter(Mandatory)][AllowEmptyString()][string] $Token)
44
+
45
+ $split = $Token.IndexOf('=')
46
+ if ($split -gt 0) { return $Token.Substring(0, $split) }
47
+ return $Token
48
+ }
49
+
50
+ function ConvertFrom-EpicMergeGateSelector {
51
+ <#
52
+ .SYNOPSIS
53
+ Convert a gh pr merge selector to a pull-request number, or $null.
54
+ .DESCRIPTION
55
+ Accepts an all-digit selector or a URL whose path ends in /pull/<n>. A branch-name
56
+ selector carries no number and yields $null.
57
+ .OUTPUTS
58
+ System.Nullable[int]
59
+ #>
60
+ [CmdletBinding()]
61
+ [OutputType([int])]
62
+ param([Parameter(Mandatory)][AllowEmptyString()][string] $Selector)
63
+
64
+ $digits = $null
65
+ if ($Selector -match '^\d+$') {
66
+ $digits = $Selector
67
+ } elseif ($Selector -match '/pull/(\d+)/?(?:[?#].*)?$') {
68
+ $digits = $Matches[1]
69
+ }
70
+ $number = 0
71
+ if ($null -ne $digits -and [int]::TryParse($digits, [ref] $number)) { return $number }
72
+ return $null
73
+ }
74
+
75
+ function Test-EpicMergeGateDisableAutoOnly {
76
+ <#
77
+ .SYNOPSIS
78
+ Report whether a Structural gh pr merge match carries --disable-auto and no action flag.
79
+ .OUTPUTS
80
+ System.Boolean
81
+ #>
82
+ [CmdletBinding()]
83
+ [OutputType([bool])]
84
+ param([Parameter(Mandatory)][pscustomobject] $Match)
85
+
86
+ $tokens = [string[]]@($Match.Segment.Tokens)
87
+ $hasDisableAuto = $false
88
+ for ($index = $Match.OperandIndex; $index -lt $tokens.Count; $index++) {
89
+ $name = Get-EpicMergeGateFlagName -Token $tokens[$index]
90
+ if ($script:EpicMergeGateActionFlags -ccontains $name) { return $false }
91
+ if ($name -ceq '--disable-auto') { $hasDisableAuto = $true }
92
+ }
93
+ return $hasDisableAuto
94
+ }
95
+
96
+ function Test-EpicMergeGateApiMutationText {
97
+ <#
98
+ .SYNOPSIS
99
+ Report whether gh api text names a merge or enqueue mutation or the REST merge endpoint.
100
+ .OUTPUTS
101
+ System.Boolean
102
+ #>
103
+ [CmdletBinding()]
104
+ [OutputType([bool])]
105
+ param([Parameter(Mandatory)][AllowEmptyString()][AllowNull()][string] $Text)
106
+
107
+ if ([string]::IsNullOrEmpty($Text)) { return $false }
108
+ foreach ($name in $script:EpicMergeGateMutationNames) {
109
+ if ($Text.IndexOf($name, [System.StringComparison]::OrdinalIgnoreCase) -ge 0) { return $true }
110
+ }
111
+ return [regex]::IsMatch($Text, $script:EpicMergeGateRestMergePattern)
112
+ }
113
+
114
+ function Test-EpicMergeGateCommandInScope {
115
+ <#
116
+ .SYNOPSIS
117
+ Report whether a command line is a gated merge or enqueue action (issue #952).
118
+ .DESCRIPTION
119
+ True for any gh pr merge match, Structural or Indeterminate, unless the match is Structural
120
+ and its only action flag is --disable-auto; true for any gh api match whose tokens name a
121
+ merge or enqueue mutation or a pulls/<n>/merge path. Text that only mentions these words
122
+ produces no match and stays out of scope. An Indeterminate gh pr merge match stays in scope
123
+ (fail closed).
124
+ .OUTPUTS
125
+ System.Boolean
126
+ #>
127
+ [CmdletBinding()]
128
+ [OutputType([bool])]
129
+ param([Parameter(Mandatory)][AllowEmptyString()][AllowNull()][string] $CommandText)
130
+
131
+ foreach ($match in @(Get-CommandLineInvocation -CommandText $CommandText -CommandWord 'gh' -SubcommandPath @('pr', 'merge'))) {
132
+ if ($match.Status -ne 'Structural' -or -not (Test-EpicMergeGateDisableAutoOnly -Match $match)) { return $true }
133
+ }
134
+ foreach ($match in @(Get-CommandLineInvocation -CommandText $CommandText -CommandWord 'gh' -SubcommandPath @('api'))) {
135
+ if (Test-EpicMergeGateApiMutationText -Text (@($match.Segment.Tokens) -join ' ')) { return $true }
136
+ }
137
+ return $false
138
+ }
139
+
140
+ function Get-EpicMergeGateSelectorPrNumber {
141
+ <#
142
+ .SYNOPSIS
143
+ Resolve the pull-request number of a gated merge or enqueue command, or $null.
144
+ .DESCRIPTION
145
+ For gh pr merge, only the first Structural match is read. Value flags are skipped with
146
+ their values, other flags are skipped, an equals-joined --merge=<digits> yields its
147
+ digits (an equals-joined value that is not a number is skipped like any other flag),
148
+ and the first non-flag token (or the token after a bare '--') is the selector.
149
+ For gh api, the number comes from a pulls/<n>/merge token. Any other command yields
150
+ $null, which the gate handles through its no-number branches.
151
+ .OUTPUTS
152
+ System.Nullable[int]
153
+ #>
154
+ [CmdletBinding()]
155
+ [OutputType([int])]
156
+ param([Parameter(Mandatory)][AllowEmptyString()][AllowNull()][string] $CommandText)
157
+
158
+ $match = Get-CommandLineStructuralMatch -CommandText $CommandText -CommandWord 'gh' -SubcommandPath @('pr', 'merge')
159
+ if ($null -ne $match) {
160
+ $tokens = [string[]]@($match.Segment.Tokens)
161
+ $index = $match.OperandIndex
162
+ while ($index -lt $tokens.Count) {
163
+ $token = $tokens[$index]
164
+ if ($token -ceq '--') {
165
+ if ($index + 1 -lt $tokens.Count) { return ConvertFrom-EpicMergeGateSelector -Selector $tokens[$index + 1] }
166
+ return $null
167
+ }
168
+ if ($token.StartsWith('-') -and $token.Length -gt 1) {
169
+ $name = Get-EpicMergeGateFlagName -Token $token
170
+ if ($name -ceq '--merge' -and $token.Length -gt $name.Length) {
171
+ $equalsNumber = ConvertFrom-EpicMergeGateSelector -Selector $token.Substring($name.Length + 1)
172
+ if ($null -ne $equalsNumber) { return $equalsNumber }
173
+ }
174
+ $index += if ($script:EpicMergeGateValueFlags -ccontains $token) { 2 } else { 1 }
175
+ continue
176
+ }
177
+ return ConvertFrom-EpicMergeGateSelector -Selector $token
178
+ }
179
+ return $null
180
+ }
181
+
182
+ foreach ($apiMatch in @(Get-CommandLineInvocation -CommandText $CommandText -CommandWord 'gh' -SubcommandPath @('api'))) {
183
+ foreach ($token in @($apiMatch.Segment.Tokens)) {
184
+ $rest = [regex]::Match([string]$token, $script:EpicMergeGateRestMergePattern)
185
+ $number = 0
186
+ if ($rest.Success -and [int]::TryParse($rest.Groups[1].Value, [ref] $number)) { return $number }
187
+ }
188
+ }
189
+ return $null
190
+ }
@@ -3,6 +3,11 @@
3
3
  Gates epic child and integration PR merges behind checkpointed green state.
4
4
 
5
5
  .DESCRIPTION
6
+ Trigger scope (issue #952): every gh pr merge invocation (any merge method, --auto, --admin,
7
+ or no method flag) and every gh api merge or enqueue mutation is gated, because under a merge
8
+ queue each of them reaches the base branch; only a pure --disable-auto is out of scope. The
9
+ predicate and the PR selector reader live in enforce-epic-merge-gate-command.ps1.
10
+
6
11
  Docs-only branch (issue #927): after the standalone branch denies an explicit PR number,
7
12
  and only when no checkpoint is present at the repository root (both checkpoint texts are
8
13
  blank; operator decision OD-1, stricter than the Claude per-PR rule), the gate calls
@@ -25,6 +30,9 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
25
30
  # the two runtimes on one implementation of the same concern.
26
31
  try { . (Join-Path $PSScriptRoot 'hook-command-scanner.ps1') } catch { Add-HookDependencyFailure -Name 'hook-command-scanner.ps1' -ErrorRecord $_ }
27
32
  try { . (Join-Path $PSScriptRoot 'hook-command-invocation.ps1') } catch { Add-HookDependencyFailure -Name 'hook-command-invocation.ps1' -ErrorRecord $_ }
33
+ # Merge and enqueue scope predicate and the PR selector reader (issue #952), byte-identical to the
34
+ # Claude copy.
35
+ try { . (Join-Path $PSScriptRoot 'enforce-epic-merge-gate-command.ps1') } catch { Add-HookDependencyFailure -Name 'enforce-epic-merge-gate-command.ps1' -ErrorRecord $_ }
28
36
  # Shared docs-only diff classification and the merge-side docs-only exemption (issue #927).
29
37
  try { . (Join-Path $PSScriptRoot 'hook-docs-only-diff.ps1') } catch { Add-HookDependencyFailure -Name 'hook-docs-only-diff.ps1' -ErrorRecord $_ }
30
38
 
@@ -61,15 +69,11 @@ function Get-CodexMergeCommandPrNumber {
61
69
  .SYNOPSIS
62
70
  Resolve the explicit pull-request number of a gh pr merge invocation, or $null.
63
71
  .DESCRIPTION
64
- The number is taken from the segment that structurally invokes `gh pr merge` and
65
- from nowhere else: the positional spelling through Get-CommandLineOperand, the
66
- flag-led and equals-joined spellings through Get-CommandLineFlagValue. A leading
67
- `cd <path>` segment contributes no operand and no flag value, so no digit run
72
+ The number is resolved by Get-EpicMergeGateSelectorPrNumber in
73
+ enforce-epic-merge-gate-command.ps1 (issue #952), the file shared byte-identically with
74
+ the Claude runtime, from the segment that structurally invokes gh pr merge or gh api and
75
+ from nowhere else. A leading cd <path> segment contributes no selector, so no digit run
68
76
  outside the merge segment can be mistaken for a pull-request number.
69
-
70
- This copy has never carried the Claude copy's unanchored whole-text digit scan and
71
- deliberately does not acquire one. No regular expression matching a bare digit run
72
- is introduced here; the only pattern below anchors an all-digit token end to end.
73
77
  .OUTPUTS
74
78
  System.Nullable[int]
75
79
  #>
@@ -77,18 +81,7 @@ function Get-CodexMergeCommandPrNumber {
77
81
  [OutputType([int])]
78
82
  param([Parameter(Mandatory)][string] $Command)
79
83
 
80
- foreach ($operand in @(Get-CommandLineOperand -CommandText $Command -CommandWord 'gh' -SubcommandPath @('pr', 'merge'))) {
81
- if ($operand -match '^\d+$') {
82
- return [int]$operand
83
- }
84
- }
85
-
86
- $flagValue = Get-CommandLineFlagValue -CommandText $Command -CommandWord 'gh' -SubcommandPath @('pr', 'merge') -FlagName '--merge'
87
- if ($null -ne $flagValue -and $flagValue -match '^\d+$') {
88
- return [int]$flagValue
89
- }
90
-
91
- return $null
84
+ return Get-EpicMergeGateSelectorPrNumber -CommandText $Command
92
85
  }
93
86
 
94
87
  function Test-CodexChildMergeReady {
@@ -153,23 +146,9 @@ function Invoke-CodexEpicMergeDecision {
153
146
  return $null
154
147
  }
155
148
  $command = [string]$payload.tool_input.command
156
- # Both legs are read structurally from the segment that invokes the command, so a
157
- # quoted mention of the phrase no longer brings a command into scope. The flag leg needs
158
- # a raw-scan fallback: a wrapper's quoted argument collapses into ONE token, so a flag
159
- # inside it is never read as a token, and the token-only read took
160
- # bash -c "gh pr merge --merge 688" out of scope.
161
- $isMergeInvocation = Test-CommandLineInvocation -CommandText $command -CommandWord 'gh' -SubcommandPath @('pr', 'merge')
162
- $hasMergeFlag = Test-CommandLineFlag -CommandText $command -CommandWord 'gh' -SubcommandPath @('pr', 'merge') -FlagName '--merge'
163
- if (-not $hasMergeFlag) {
164
- foreach ($segment in @(Read-CommandLineSegment -CommandText $command)) {
165
- if ((Test-CommandLineSegmentRawScan -Segment $segment) -and
166
- $segment.ScanText.IndexOf('--merge', [System.StringComparison]::OrdinalIgnoreCase) -ge 0) {
167
- $hasMergeFlag = $true
168
- break
169
- }
170
- }
171
- }
172
- if (-not $isMergeInvocation -or -not $hasMergeFlag) {
149
+ # Scope (issue #952): every gh pr merge invocation except a pure --disable-auto, and every gh api
150
+ # merge or enqueue mutation, is gated; Test-EpicMergeGateCommandInScope holds the predicate.
151
+ if (-not (Test-EpicMergeGateCommandInScope -CommandText $command)) {
173
152
  return $null
174
153
  }
175
154
 
@@ -214,7 +193,7 @@ function Invoke-CodexEpicMergeDecision {
214
193
  hookSpecificOutput = [ordered]@{
215
194
  hookEventName = 'PreToolUse'
216
195
  permissionDecision = 'deny'
217
- permissionDecisionReason = 'EPIC_MERGE_GATE_BLOCKED: gh pr merge --merge requires a safe epic child checkpoint or a successful final epic CI gate with a matching PR number.'
196
+ permissionDecisionReason = 'EPIC_MERGE_GATE_BLOCKED: a pull-request merge or merge-queue enqueue (gh pr merge with any method, --auto, or --admin, or a gh api merge or enqueue mutation) requires a safe epic child checkpoint or a successful final epic CI gate with a matching PR number.'
218
197
  }
219
198
  }
220
199
  }
@@ -19,7 +19,8 @@
19
19
  is balanced; a structural gh pr merge; no inline
20
20
  VAR= prefix token (GH_REPO=, GH_HOST=); no
21
21
  single-dash token containing R; no --repo or
22
- --repo= token; no --auto token.
22
+ --repo= token; no --auto token; no token
23
+ containing /pull/ (a URL selector).
23
24
  M2 DOCS_ONLY_EXEMPTION_PR_UNRESOLVED - the worktree root is an existing directory.
24
25
  M3 DOCS_ONLY_EXEMPTION_PR_UNRESOLVED - gh pr view <N> --json baseRefName,headRefOid
25
26
  exits 0 and returns a JSON object; headRefOid
@@ -368,6 +369,9 @@ function Get-DocsOnlyMergeShapeViolation {
368
369
  if ($text -eq '--repo' -or $text.StartsWith('--repo=', [System.StringComparison]::OrdinalIgnoreCase)) {
369
370
  return $prefix + "the repository override '$text' is not accepted."
370
371
  }
372
+ if ($text.Contains('/pull/')) {
373
+ return $prefix + "the URL selector '$text' is not accepted."
374
+ }
371
375
  if ($text -eq '--auto' -or $text.StartsWith('--auto=', [System.StringComparison]::OrdinalIgnoreCase)) {
372
376
  return $prefix + 'auto-merge (--auto) is not eligible.'
373
377
  }