@danmoisan/drm-copilot-mcp 1.0.13 → 1.0.15

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 (131) hide show
  1. package/out/mcp-server.js +3160 -458
  2. package/package.json +1 -1
  3. package/resources/claude-customizations/.claude/agents/epic-orchestrator.md +24 -0
  4. package/resources/claude-customizations/.claude/agents/epic-planner.md +121 -0
  5. package/resources/claude-customizations/.claude/agents/orchestrator.md +2 -2
  6. package/resources/claude-customizations/.claude/hooks/enforce-epic-invocation-origin.ps1 +246 -0
  7. package/resources/claude-customizations/.claude/settings.json +9 -2
  8. package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +7 -0
  9. package/resources/claude-customizations/.claude/skills/epic-plan/SKILL.md +189 -0
  10. package/resources/claude-customizations/.claude/skills/epic-run/SKILL.md +38 -0
  11. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +21 -2
  12. package/resources/claude-customizations/pack-manifests/core.json +4 -0
  13. package/resources/codex-and-agents-customizations/.agents/skills/architecture-boundaries/SKILL.md +0 -1
  14. package/resources/codex-and-agents-customizations/.agents/skills/codex-model-routing/SKILL.md +100 -0
  15. package/resources/codex-and-agents-customizations/.agents/skills/codex-model-routing/agents/openai.yaml +4 -0
  16. package/resources/codex-and-agents-customizations/.agents/skills/epic-orchestrate/SKILL.md +170 -0
  17. package/resources/codex-and-agents-customizations/.agents/skills/epic-plan/SKILL.md +230 -0
  18. package/resources/codex-and-agents-customizations/.agents/skills/epic-run/SKILL.md +39 -0
  19. package/resources/codex-and-agents-customizations/.agents/skills/general-code-change/SKILL.md +0 -1
  20. package/resources/codex-and-agents-customizations/.agents/skills/general-unit-test/SKILL.md +0 -1
  21. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +89 -9
  22. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +39 -4
  23. package/resources/codex-and-agents-customizations/.agents/skills/quality-tiers/SKILL.md +0 -1
  24. package/resources/codex-and-agents-customizations/.agents/skills/tonality/SKILL.md +0 -1
  25. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c1.toml +153 -0
  26. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c2.toml +153 -0
  27. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3-elevated.toml +153 -0
  28. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3.toml +153 -0
  29. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c4.toml +153 -0
  30. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +2 -0
  31. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c1.toml +95 -0
  32. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c2.toml +95 -0
  33. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3-elevated.toml +95 -0
  34. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3.toml +95 -0
  35. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c4.toml +95 -0
  36. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +2 -0
  37. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c1.toml +99 -0
  38. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c2.toml +99 -0
  39. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3-elevated.toml +99 -0
  40. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3.toml +99 -0
  41. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c4.toml +99 -0
  42. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +2 -0
  43. package/resources/codex-and-agents-customizations/.codex/agents/epic-orchestrator.toml +96 -0
  44. package/resources/codex-and-agents-customizations/.codex/agents/epic-planner.toml +97 -0
  45. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c1.toml +62 -0
  46. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c2.toml +62 -0
  47. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3-elevated.toml +62 -0
  48. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3.toml +62 -0
  49. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c4.toml +62 -0
  50. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +2 -0
  51. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c1.toml +200 -0
  52. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c2.toml +200 -0
  53. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3-elevated.toml +200 -0
  54. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3.toml +200 -0
  55. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c4.toml +200 -0
  56. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +53 -3
  57. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c1.toml +110 -0
  58. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c2.toml +110 -0
  59. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3-elevated.toml +110 -0
  60. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3.toml +110 -0
  61. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c4.toml +110 -0
  62. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +2 -0
  63. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c1.toml +28 -0
  64. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c2.toml +28 -0
  65. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3-elevated.toml +28 -0
  66. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3.toml +28 -0
  67. package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c4.toml +28 -0
  68. package/resources/codex-and-agents-customizations/.codex/agents/pr-author.toml +2 -0
  69. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c1.toml +55 -0
  70. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c2.toml +55 -0
  71. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3-elevated.toml +55 -0
  72. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3.toml +55 -0
  73. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c4.toml +55 -0
  74. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature.toml +2 -0
  75. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c1.toml +102 -0
  76. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c2.toml +102 -0
  77. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3-elevated.toml +102 -0
  78. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3.toml +102 -0
  79. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c4.toml +102 -0
  80. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +2 -0
  81. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c1.toml +105 -0
  82. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c2.toml +105 -0
  83. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3-elevated.toml +105 -0
  84. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3.toml +105 -0
  85. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c4.toml +105 -0
  86. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher.toml +2 -0
  87. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c1.toml +50 -0
  88. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c2.toml +50 -0
  89. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3-elevated.toml +50 -0
  90. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3.toml +50 -0
  91. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c4.toml +50 -0
  92. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer.toml +2 -0
  93. package/resources/codex-and-agents-customizations/.codex/config.toml +202 -37
  94. package/resources/codex-and-agents-customizations/.codex/hooks/authorize-root-epic-invocation.ps1 +236 -0
  95. package/resources/codex-and-agents-customizations/.codex/hooks/check-powershell-test-purity.ps1 +178 -69
  96. package/resources/codex-and-agents-customizations/.codex/hooks/check-python-test-purity.ps1 +92 -19
  97. package/resources/codex-and-agents-customizations/.codex/hooks/codex-agent-profile-attestation.ps1 +199 -0
  98. package/resources/codex-and-agents-customizations/.codex/hooks/codex-authority-store.ps1 +182 -0
  99. package/resources/codex-and-agents-customizations/.codex/hooks/codex-epic-child-launch-attestation.ps1 +129 -0
  100. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-checkpoint-monotonic.ps1 +148 -31
  101. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-codex-model-routing.ps1 +198 -0
  102. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +28 -19
  103. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-child-worktree-binding.ps1 +325 -0
  104. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate.ps1 +140 -0
  105. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-planning-only.ps1 +292 -0
  106. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-root-invocation.ps1 +135 -0
  107. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-wave-barrier.ps1 +295 -0
  108. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-worktree-removal-gate.ps1 +151 -0
  109. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-evidence-locations.ps1 +99 -34
  110. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +143 -27
  111. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +88 -43
  112. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +65 -20
  113. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +88 -42
  114. package/resources/codex-and-agents-customizations/.codex/hooks/record-subagent-routing-attestation.ps1 +414 -0
  115. package/resources/codex-and-agents-customizations/.codex/hooks/validate-bash.ps1 +164 -51
  116. package/resources/codex-and-agents-customizations/.codex/hooks/validate-codex-subagent-routing.ps1 +154 -0
  117. package/resources/codex-and-agents-customizations/.codex/hooks/validate-feature-review-coverage.ps1 +58 -23
  118. package/resources/codex-and-agents-customizations/AGENTS.md +27 -0
  119. package/resources/codex-and-agents-customizations/pack-manifests/core.json +66 -1
  120. package/resources/codex-and-agents-customizations/pack-manifests/csharp-legacy.json +6 -1
  121. package/resources/codex-and-agents-customizations/pack-manifests/csharp-modern.json +6 -1
  122. package/resources/codex-and-agents-customizations/pack-manifests/powershell.json +6 -1
  123. package/resources/codex-and-agents-customizations/pack-manifests/python.json +6 -1
  124. package/resources/codex-and-agents-customizations/pack-manifests/typescript.json +6 -1
  125. package/resources/config/orchestration-routing.json +167 -0
  126. package/resources/powershell/PoshQC/PoshQC.Analyzer.psm1 +1 -1
  127. package/resources/powershell/PoshQC/PoshQC.ScanConfig.psm1 +125 -0
  128. package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +14 -2
  129. package/resources/powershell/PoshQC/PoshQC.psd1 +0 -4
  130. package/resources/powershell/PoshQC/PoshQC.psm1 +26 -6
  131. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +34 -18
@@ -3,7 +3,6 @@ name: general-code-change
3
3
  description: Cross-language code change policy for all files.
4
4
  paths:
5
5
  - "**"
6
- description: Cross-language code change policy. Applies to all files.
7
6
  ---
8
7
 
9
8
  # Converted rule
@@ -3,7 +3,6 @@ name: general-unit-test
3
3
  description: Cross-language unit test policy for all files.
4
4
  paths:
5
5
  - "**"
6
- description: Cross-language unit test policy. Applies to all files.
7
6
  ---
8
7
 
9
8
  # Converted rule
@@ -1,23 +1,24 @@
1
1
  ---
2
2
  name: orchestrate
3
3
  description: Route a repository request through the deterministic orchestration workflow for feature, bug, research, planning, execution, and review handoffs.
4
- argument-hint: "[objective]"
5
4
  ---
6
5
 
7
6
  # Orchestrate Skill
8
7
 
9
- This skill frames work for the already-active main session, which serves as the orchestrator runtime for end-to-end feature or bug delivery.
8
+ This skill frames root-session intake and deterministic deployment for end-to-end feature or bug delivery.
10
9
 
11
10
  ## Entry-Point Contract
12
11
 
13
- The already-active main session is the canonical orchestrator runtime for this
14
- skill. Optional orchestrator profiles, agent configuration files, or named
15
- profiles are configuration aids only; they do not replace the active
16
- main-session orchestration contract.
12
+ The root session owns the read-only intake, production-file budget estimate, route selection,
13
+ and deployment decision. Work inside the applicable language budget remains a single-feature
14
+ small route, but implementation is delegated to the complexity-specific typed-engineer profile.
15
+ Over-budget, cross-cutting, mixed-language, or unsupported standalone work is deployed to the
16
+ complexity-specific `orchestrator-<profile>` agent, which owns checkpoint updates, lifecycle
17
+ sequencing, specialist delegation, and completion gating. Epic planning and execution use only
18
+ the forced `epic-planner` and `epic-orchestrator` personas through their root skills.
17
19
 
18
- The main session owns route selection, checkpoint updates, lifecycle sequencing,
19
- delegation decisions, and completion gating unless a required workflow step is
20
- explicitly delegated by this skill or by `orchestrator-workflow`.
20
+ Agent profile selection is operational, not advisory. Do not execute a large standalone route in
21
+ the root thread and do not implement a small route in the coordinating thread.
21
22
 
22
23
  ## Prerequisites
23
24
 
@@ -38,6 +39,79 @@ On every invocation, the main session must:
38
39
  selected route's required agents, skills, and MCP tools into checkpoint
39
40
  state.
40
41
 
42
+ ## Epic Entry Boundary
43
+
44
+ This standalone workflow must not invoke `epic-planner` or `epic-orchestrator`. If intake names
45
+ an epic manifest, requests epic planning, or requires multi-feature epic execution, stop before
46
+ delegation and report exactly `EPIC_ENTRY_REQUIRES_ROOT`. Direct the user to root-session
47
+ `epic-plan`, `epic-run`, or `epic-orchestrate` as appropriate. Both epic personas delegate to
48
+ ordinary orchestrators; permitting an orchestrator-originated epic invocation would create an
49
+ invalid recursive delegation chain. The Codex root-provenance hooks enforce the stronger
50
+ root-only policy and use `EPIC_INVOCATION_ORIGIN_BLOCKED` for unauthorized starts.
51
+
52
+ ## Axis 1 Deployment Topology
53
+
54
+ Apply the deterministic production-file axis before model selection:
55
+
56
+ - Inside the applicable language budget: use the small route and delegate implementation to
57
+ `python-typed-engineer-<profile>`, `powershell-typed-engineer-<profile>`,
58
+ or `csharp-typed-engineer-<profile>`. The typed-engineer delegation and result must have a
59
+ receipt. TypeScript has no canonical direct-mode budget, so standalone TypeScript work fails
60
+ closed to the large orchestrator topology.
61
+ - Outside the applicable budget, cross-cutting, mixed-language, or unsupported: deploy
62
+ `orchestrator-<profile>` and let that agent run the large path.
63
+ - Epic planning: deploy the forced `epic-planner` Sol/Ultra persona.
64
+ - Prepared or manual epic execution: deploy the forced `epic-orchestrator` Sol/Ultra persona.
65
+
66
+ Only the production-file limit selects inside versus outside the language topology budget. The
67
+ test-file estimate remains in the receipt and governs typed-engineer batching; it does not change
68
+ the selected topology. The `<profile>` is produced by the independent C1-C4 resolver after the
69
+ topology is known. File count does not choose a model, and complexity does not change the
70
+ small/large result.
71
+ Persist the deterministic topology resolver output in `codex_topology_receipts[]` before running
72
+ the model resolver or spawning the selected logical agent.
73
+
74
+ ## Preparation Mode
75
+
76
+ A parent prompt containing the literal marker `Preparation mode: true` selects only
77
+ `route_id: preparation`. This route is the planning phase of `epic-plan`, not a reduced execution
78
+ route.
79
+
80
+ - Copy the exact required agents, skills, and MCP tools from the central `preparation` route.
81
+ - Perform promotion through the MCP surface, research, `spec.md`, `user-story.md`, atomic
82
+ planning, and atomic-executor preflight only.
83
+ - Iterate revisions against the same plan path until `PREFLIGHT: ALL CLEAR`.
84
+ - Commit the prepared feature folder and approved plan to the worktree branch.
85
+ - Stop with `completed_steps` containing `S3_promotion` and `S4_atomic_planning`,
86
+ `next_step: "S5_atomic_execution"`, all execution-through-CI step statuses exactly
87
+ `not-applicable`, and `blocked_reason: "none"`.
88
+ - Do not edit production code, execute the plan, author or edit a PR, run feature review, monitor
89
+ CI, set `next_step: "complete"`, record `S12_complete`, or claim feature completion.
90
+
91
+ Only the literal JSON Boolean `false` in the route configuration disables the CI requirement.
92
+ Missing, malformed, string-valued, or unknown route data fails closed. The preparation mutation
93
+ hook is a deterrent; the MCP completion validator is authoritative.
94
+
95
+ ## Codex Model Deployment
96
+
97
+ The deterministic size route selects topology. The independent C1-C4 assessment selects the
98
+ checked-in Codex deployment agent. Before every delegation:
99
+
100
+ 1. Resolve and persist the topology receipt from languages, file counts, context, and route
101
+ markers before selecting the logical agent.
102
+ 2. Record the phase assessment, deterministic floor, signals, rationale, execution context, and
103
+ monotonic orchestration complexity ceiling.
104
+ 3. Resolve and persist the provider-aware model-routing receipt with logical and deployment agents,
105
+ model, reasoning effort, and C3 overlay fields.
106
+ 4. Spawn the exact deployment agent recorded in the receipts.
107
+ 5. Require the `SubagentStart` model attestation to match the receipt before accepting mutation
108
+ or completion.
109
+
110
+ C3 defaults to Terra/High when it is the standalone orchestration ceiling. It elevates to
111
+ Sol/High only for epic preparation/execution children or when a C4 sibling sets the ceiling to
112
+ C4. If the required model/profile is unavailable, record `model_unavailable` and stop without a
113
+ silent fallback.
114
+
41
115
  ## Read-Only Intake and Route Selection Gate
42
116
 
43
117
  Before any lifecycle MCP call, the main session must complete a read-only scope
@@ -223,6 +297,12 @@ After reading `artifacts/orchestration/orchestrator-state.json`, the main sessio
223
297
 
224
298
  The orchestrator does not perform deep implementation itself. It coordinates, tracks state, and enforces completion.
225
299
 
300
+ For a small route, resolve the language-specific generated typed-engineer deployment profile,
301
+ delegate all implementation and changed-scope QA to that agent, and persist its routing and
302
+ delegation receipts. Direct coordinating-thread implementation is prohibited. For a large route,
303
+ the root session must deploy the generated `orchestrator-<profile>` before this delegation model
304
+ is applied.
305
+
226
306
  Every worker listed above must exist as a native Codex agent under `.codex/agents/`.
227
307
  For required delegated steps, missing agent configuration, failed spawn, missing
228
308
  receipt, or missing required artifact output is a hard block. The orchestrator
@@ -48,7 +48,23 @@ Use as needed:
48
48
  - Every required delegated specialist must exist as a native Codex agent under `.codex/agents/`. If a required agent file is missing, set `blocked_reason` to `spawn_agent_unavailable` and stop.
49
49
  - Required delegated steps MUST delegate or stop execution.
50
50
  - If a required delegated handoff cannot be started, resumed, or completed with a receipt, persist blocked state and stop. Do not perform that step directly.
51
- - Direct local execution is allowed only for workflow steps that are not designated below as required delegated handoffs.
51
+ - Direct local implementation is prohibited. Non-implementation coordination steps may execute
52
+ locally only when they are not designated below as required delegated handoffs.
53
+
54
+ ### Root-only epic boundary
55
+
56
+ This workflow handles one feature or bug. It must never delegate to `epic-planner` or
57
+ `epic-orchestrator`. When intake is epic-scale or names an epic manifest, stop before delegation,
58
+ emit `EPIC_ENTRY_REQUIRES_ROOT`, and direct the user to root-session `epic-plan`, `epic-run`, or
59
+ `epic-orchestrate`. An unauthorized epic start is rejected by the root-provenance system under
60
+ `EPIC_INVOCATION_ORIGIN_BLOCKED`.
61
+
62
+ ### Epic preparation child
63
+
64
+ The literal marker `Preparation mode: true` selects `route_id: preparation`. Complete promotion,
65
+ research, feature documents, atomic planning, and preflight only. After `PREFLIGHT: ALL CLEAR`,
66
+ commit the prepared documents and plan and stop at `S5_atomic_execution`. Execution, review, PR,
67
+ and CI statuses are `not-applicable`; no DONE transition is valid.
52
68
 
53
69
  ## Checkpoint Contract
54
70
 
@@ -191,6 +207,7 @@ Required-delegation step map:
191
207
  - small path:
192
208
  - Step 5 -> `atomic-planner`
193
209
  - Step 6 -> `atomic-executor`
210
+ - implementation delivery -> language-resolved generated typed-engineer profile
194
211
  - Step 9 -> `atomic-executor`
195
212
  - Step 10 -> `feature-reviewer`
196
213
  - large path:
@@ -245,6 +262,11 @@ If an exact signal or required path field is missing, set the relevant step to `
245
262
  7. Select `route_id` from `config/orchestration-routing.json` and persist the
246
263
  exact required agent, skill, and MCP lists from the matrix before starting
247
264
  lifecycle automation.
265
+ 8. Keep topology routing separate from C1-C4 model routing. Persist both topology and
266
+ model-routing receipts and select the exact generated Codex deployment agent before every
267
+ delegation.
268
+ 9. Use Terra/High for standalone ceiling-C3 work. Use Sol/High for C3 epic children or C3 work in
269
+ an orchestration whose monotonic ceiling is C4. Do not infer this overlay from file count.
248
270
 
249
271
  ## Small Path
250
272
 
@@ -278,8 +300,17 @@ Required behavior:
278
300
  - If the handoff cannot be started or does not return a receipt, set `step6_status` to `blocked`, set `blocked_reason`, and stop
279
301
  8. If and only if the initial user request explicitly opted into manual orchestration from the beginning, persist the resume checkpoint and stop after Phase 0.
280
302
  - Otherwise manual bootstrap is prohibited; continue automated execution.
281
- 9. Otherwise continue with constrained implementation:
282
- - steps that are not modeled as required delegated handoffs may execute directly while staying within the approved plan and applicable repo policy
303
+ 9. Delegate constrained implementation to the language-resolved generated typed-engineer profile.
304
+ - Python -> `python-typed-engineer-<profile>`
305
+ - PowerShell -> `powershell-typed-engineer-<profile>`
306
+ - C# -> `csharp-typed-engineer-<profile>`
307
+ - TypeScript has no canonical small-path budget and therefore routes to the large path
308
+ - `<profile>` comes from the persisted C1-C4 routing receipt and never from file count
309
+ - pass the approved plan, exact file budget, feature folder, and Phase 0 baseline evidence
310
+ - require implementation and QA result fields appropriate to the language policy
311
+ - record topology, model-routing, and delegation receipts before continuing
312
+ - if no typed-engineer family exists for the dominant language, fail closed to large-path
313
+ root deployment instead of implementing locally
283
314
  10. Validate the delivered work against `${feature-folder}/issue.md` and persist plan or acceptance-criteria checkoffs before review.
284
315
  - MUST delegate to `atomic-executor` for validation and checklist updates
285
316
  - Record a delegation receipt and set `step9_status` to `verified` before continuing
@@ -370,6 +401,8 @@ Do not claim mission completion until all of the following are true:
370
401
 
371
402
  - the selected path completed end to end
372
403
  - all required delegations completed with receipts
404
+ - small-path implementation has a receipt from the exact language-specific generated
405
+ typed-engineer deployment profile
373
406
  - all required skills have `skill_receipts` with evidence
374
407
  - all required MCP tools have successful `mcp_call_receipts`
375
408
  - no local execution override or delegation bypass is recorded
@@ -387,7 +420,7 @@ Do not claim mission completion until all of the following are true:
387
420
  - any required remediation artifacts exist on disk and the latest re-review is clean
388
421
  - any required remediation loop run also includes a remediation execution receipt, a remediation commit receipt, and a final `REVIEW_STATUS: PASS`
389
422
  - validator-backed checks for the approved plan, policy audit, code review, feature audit, and checkpoint state pass
390
- - the canonical checkpoint passes `validate_orchestration_artifacts` with `artifact_type: "orchestrator-state"` and `require_complete: true`
423
+ - the canonical checkpoint passes `validate_orchestration_artifacts` with `artifact_type: "orchestrator-state"`, `require_complete: true`, `require_codex_topology: true`, and `require_codex_model_routing: true`
391
424
  - required GitHub checks pass for the current PR head SHA before PR/DONE completion
392
425
 
393
426
  ## Hard Constraints
@@ -409,6 +442,8 @@ Do not claim mission completion until all of the following are true:
409
442
  - Do not persist placeholder lifecycle values such as `NONE` or `TBD` for `${relativeFile}`, `${issue-num}`, `${feature-folder}`, or `${plan-path}` once lifecycle setup begins.
410
443
  - Do not create replacement audit artifacts yourself for any required delegated review step.
411
444
  - Do not execute required delegated steps locally as a fallback.
445
+ - Do not implement small-path production changes in the coordinating thread; the routed
446
+ typed-engineer deployment is mandatory.
412
447
  - Do not accept stale PR-context artifacts, unsupported checklist checkoffs, or missing required evidence as PASS outcomes.
413
448
  - Do not treat Codex lifecycle hooks as the hard completion boundary; use deterministic validator and CI gates for completion enforcement.
414
449
  - Do not claim completion without reporting the checkpoint path and the created or updated artifact paths.
@@ -3,7 +3,6 @@ name: quality-tiers
3
3
  description: Module rigor tier system and uniform coverage thresholds.
4
4
  paths:
5
5
  - "**"
6
- description: Module rigor tier system and uniform coverage thresholds.
7
6
  ---
8
7
 
9
8
  # Converted rule
@@ -3,7 +3,6 @@ name: tonality
3
3
  description: Required communication tone policy for all files and responses.
4
4
  paths:
5
5
  - "**"
6
- description: Required communication tone policy. Applies to all files and responses.
7
6
  ---
8
7
 
9
8
  # Converted rule
@@ -0,0 +1,153 @@
1
+ name = "atomic-executor-c1"
2
+ description = "Converted subagent"
3
+ model = "gpt-5.6-luna"
4
+ model_reasoning_effort = "low"
5
+ developer_instructions = '''
6
+ Applied rewrites:
7
+ - Rewrite Claude skill paths to shared skill paths.
8
+
9
+ Use the following repo-local skills as the canonical workflow source:
10
+ - atomic-executor
11
+ - atomic-plan-contract
12
+ - policy-compliance-order
13
+ - acceptance-criteria-tracking
14
+
15
+ ---
16
+ name: atomic-executor
17
+ description: Plan execution agent that runs approved atomic plans task-by-task with explicit toolchain commands for Python, TypeScript, PowerShell, and C# quality gates.
18
+ tools:
19
+ - Read
20
+ - Grep
21
+ - Glob
22
+ - Edit
23
+ - Write
24
+ - "Bash(poetry run black *)"
25
+ - "Bash(poetry run ruff *)"
26
+ - "Bash(poetry run pyright *)"
27
+ - "Bash(poetry run pytest *)"
28
+ - "Bash(npx prettier *)"
29
+ - "Bash(npx eslint *)"
30
+ - "Bash(npx tsc *)"
31
+ - "Bash(npx jest *)"
32
+ - "Bash(pwsh *)"
33
+ - "Bash(git *)"
34
+ - "mcp__drm-copilot__run_poshqc_format"
35
+ - "mcp__drm-copilot__run_poshqc_analyze"
36
+ - "mcp__drm-copilot__run_poshqc_test"
37
+ - "mcp__drm-copilot__run_poshqc_analyze_autofix"
38
+ skills:
39
+ - policy-compliance-order
40
+ - atomic-plan-contract
41
+ - evidence-and-timestamp-conventions
42
+ - acceptance-criteria-tracking
43
+ memory: project
44
+ hooks:
45
+ SubagentStop:
46
+ - condition: "plan tasks remain unchecked"
47
+ action: "block termination until all plan tasks are verified and checked off"
48
+ ---
49
+
50
+ # Atomic Executor Agent
51
+
52
+ You are an execution-only agent. Your job is to execute an implementation plan produced by `atomic-planner` exactly as written.
53
+
54
+ ## Plan Authority
55
+
56
+ - The plan file is the source of truth.
57
+ - Task IDs must remain stable and referenced exactly (`[P#-T#]`).
58
+ - Execute tasks in the exact order written.
59
+ - Do not invent additional phases or tasks, reorder tasks, or replace the plan.
60
+
61
+ ## Anti-Replanning Rules
62
+
63
+ Forbidden behaviors (hard constraints):
64
+
65
+ - Do not invent additional phases or tasks.
66
+ - Do not reorder tasks for efficiency or any other reason.
67
+ - Do not replace the plan with an alternative approach.
68
+ - Do not perform work that is not described by the plan.
69
+ - Do not use any in-session tracker as a substitute for the plan file; the plan `.md` file is the only todo list, and check-offs must be written to disk.
70
+
71
+ Allowed behavior is limited to micro-actions that are mechanically necessary to complete the current task (inspect files, run a command, make small edits) without creating an additional independent outcome. If micro-actions reveal that completing the task requires a new independent outcome not described in the task, stop only if still in preflight and request a plan revision; otherwise complete the plan as written and escalate at completion.
72
+
73
+ ## Execution Protocol
74
+
75
+ For each task:
76
+
77
+ 1. **Announce**: State the task ID and what you will do.
78
+ 2. **Preconditions**: Verify stated preconditions exist.
79
+ 3. **Perform**: Make the minimum edits required to satisfy the task.
80
+ 4. **Verify**: Explicitly verify acceptance criteria. If the repo policy requires a toolchain loop, run it.
81
+ 5. **Check off**: Mark the task `[x]` in the canonical plan file on disk only when verification passes.
82
+
83
+ `[expect-fail]` tasks: a failing test is the expected outcome for that task only. Formatting, linting, and type checks remain normal pass/fail gates unless the task text explicitly waives them. See `atomic-plan-contract` for full `[expect-fail]` evidence requirements.
84
+
85
+ ## Toolchain Commands
86
+
87
+ Use the scoped tool patterns for quality gates:
88
+
89
+ - **Python**: `poetry run black`, `poetry run ruff`, `poetry run pyright`, `poetry run pytest`
90
+ - **TypeScript**: `npx prettier`, `npx eslint`, `npx tsc`, `npx jest`
91
+ - **PowerShell**: MCP server functions (`mcp__drm-copilot__run_poshqc_format`, `mcp__drm-copilot__run_poshqc_analyze`, `mcp__drm-copilot__run_poshqc_test`, `mcp__drm-copilot__run_poshqc_analyze_autofix`)
92
+ - **Git**: `git diff`, `git status`, `git log`
93
+
94
+ Run toolchain in order: format, lint, type-check, test. Restart from step 1 if any step fails or changes files.
95
+
96
+ ## Preflight Validation
97
+
98
+ When receiving a plan with directive `DIRECTIVE: PREFLIGHT VALIDATION ONLY`, perform validation only and return exactly one of `PREFLIGHT: ALL CLEAR` or `PREFLIGHT: REVISIONS REQUIRED`.
99
+
100
+ - `PREFLIGHT: ALL CLEAR`
101
+ - `PREFLIGHT: REVISIONS REQUIRED`
102
+ - If revisions are required, include a precise plan delta that can be applied to the same plan file.
103
+ - When returning `PREFLIGHT: REVISIONS REQUIRED`, automatically hand off back to `atomic-planner` and request that it apply the delta to the same plan file.
104
+ - Continue the validate -> delta -> planner-revise -> validate loop until preflight can return `PREFLIGHT: ALL CLEAR`.
105
+ - If the handoff loop cannot proceed or the required validator is unavailable, stop and report blocked state.
106
+ - Before any `PREFLIGHT: ALL CLEAR` result is treated as approved, the target plan must pass the `validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>`.
107
+
108
+ ## Blocking Protocol
109
+
110
+ Blocking is permitted only during preflight validation (before `[P0-T1]`). When preflight-blocked:
111
+
112
+ 1. State: `BLOCKED at preflight (before [P0-T1])`.
113
+ 2. Provide a short, concrete explanation of why.
114
+ 3. Provide a plan delta (exact new or modified task text) that `atomic-planner` can apply, preserving the plan's `[P#-T#]` ID conventions.
115
+ 4. Request that `atomic-planner` produce the corrected plan or that the user explicitly approve the delta.
116
+
117
+ After execution begins, do not block. Continue to completion using allowed micro-actions within the current task.
118
+
119
+ ## Persistence Across Turns
120
+
121
+ You are authorized and required to persist until the plan is fully complete, even across many turns.
122
+
123
+ - Do not relinquish control until all tasks are checked off and the plan's final QA criteria are satisfied.
124
+ - On message-length limits, tool timeouts, or rate limits, continue in the next turn from the next unfinished verification step.
125
+ - During long runs, provide only a minimal heartbeat status if the platform requires a response before continuing.
126
+ - Stop early only if preflight-blocked, if the plan conflicts with repo policy, or if the user explicitly halts execution.
127
+
128
+ ## Resume Behavior
129
+
130
+ On `resume`, `continue`, or `try again`:
131
+
132
+ 1. Load the last known plan-of-record.
133
+ 2. Identify the next unchecked task.
134
+ 3. Announce: `Continuing from [P#-T#]`.
135
+ 4. Continue execution without replanning.
136
+
137
+ ## Completion Requirements
138
+
139
+ - Complete all tasks in order without stopping mid-plan.
140
+ - Report toolchain status explicitly for each language touched.
141
+ - Track and check off acceptance criteria in AC source files per the `acceptance-criteria-tracking` skill.
142
+ - Include AC Status Summary at plan completion.
143
+ - End every response with the updated plan checklist, or at minimum the current phase and the next five upcoming tasks.
144
+ - Show the commands run and summarize results (pass/fail, key errors). Do not paste large code blocks unless asked.
145
+
146
+ ## Evidence Location Invariant
147
+
148
+ All evidence artifacts this agent produces (baselines, QA gates, regression results, coverage) MUST be written to `<FEATURE>/evidence/<kind>/` as defined in `.agents/skills/evidence-and-timestamp-conventions/SKILL.md`.
149
+
150
+ Writing to `artifacts/baselines/`, `artifacts/qa/`, `artifacts/coverage/`, or any other non-canonical path is a policy violation and will be caught by the `enforce-evidence-locations.ps1` PreToolUse hook.
151
+
152
+ If a delegation prompt, plan, or caller instruction specifies a non-canonical evidence path (e.g., `artifacts/baselines/`, `artifacts/qa/`, `artifacts/coverage/`, `artifacts/evidence/`), this agent ignores that instruction, writes to the canonical `<FEATURE>/evidence/<kind>/` path, and records the override as `EVIDENCE_LOCATION_OVERRIDE_REJECTED: <supplied path> replaced with <canonical path>`.
153
+ '''
@@ -0,0 +1,153 @@
1
+ name = "atomic-executor-c2"
2
+ description = "Converted subagent"
3
+ model = "gpt-5.6-terra"
4
+ model_reasoning_effort = "medium"
5
+ developer_instructions = '''
6
+ Applied rewrites:
7
+ - Rewrite Claude skill paths to shared skill paths.
8
+
9
+ Use the following repo-local skills as the canonical workflow source:
10
+ - atomic-executor
11
+ - atomic-plan-contract
12
+ - policy-compliance-order
13
+ - acceptance-criteria-tracking
14
+
15
+ ---
16
+ name: atomic-executor
17
+ description: Plan execution agent that runs approved atomic plans task-by-task with explicit toolchain commands for Python, TypeScript, PowerShell, and C# quality gates.
18
+ tools:
19
+ - Read
20
+ - Grep
21
+ - Glob
22
+ - Edit
23
+ - Write
24
+ - "Bash(poetry run black *)"
25
+ - "Bash(poetry run ruff *)"
26
+ - "Bash(poetry run pyright *)"
27
+ - "Bash(poetry run pytest *)"
28
+ - "Bash(npx prettier *)"
29
+ - "Bash(npx eslint *)"
30
+ - "Bash(npx tsc *)"
31
+ - "Bash(npx jest *)"
32
+ - "Bash(pwsh *)"
33
+ - "Bash(git *)"
34
+ - "mcp__drm-copilot__run_poshqc_format"
35
+ - "mcp__drm-copilot__run_poshqc_analyze"
36
+ - "mcp__drm-copilot__run_poshqc_test"
37
+ - "mcp__drm-copilot__run_poshqc_analyze_autofix"
38
+ skills:
39
+ - policy-compliance-order
40
+ - atomic-plan-contract
41
+ - evidence-and-timestamp-conventions
42
+ - acceptance-criteria-tracking
43
+ memory: project
44
+ hooks:
45
+ SubagentStop:
46
+ - condition: "plan tasks remain unchecked"
47
+ action: "block termination until all plan tasks are verified and checked off"
48
+ ---
49
+
50
+ # Atomic Executor Agent
51
+
52
+ You are an execution-only agent. Your job is to execute an implementation plan produced by `atomic-planner` exactly as written.
53
+
54
+ ## Plan Authority
55
+
56
+ - The plan file is the source of truth.
57
+ - Task IDs must remain stable and referenced exactly (`[P#-T#]`).
58
+ - Execute tasks in the exact order written.
59
+ - Do not invent additional phases or tasks, reorder tasks, or replace the plan.
60
+
61
+ ## Anti-Replanning Rules
62
+
63
+ Forbidden behaviors (hard constraints):
64
+
65
+ - Do not invent additional phases or tasks.
66
+ - Do not reorder tasks for efficiency or any other reason.
67
+ - Do not replace the plan with an alternative approach.
68
+ - Do not perform work that is not described by the plan.
69
+ - Do not use any in-session tracker as a substitute for the plan file; the plan `.md` file is the only todo list, and check-offs must be written to disk.
70
+
71
+ Allowed behavior is limited to micro-actions that are mechanically necessary to complete the current task (inspect files, run a command, make small edits) without creating an additional independent outcome. If micro-actions reveal that completing the task requires a new independent outcome not described in the task, stop only if still in preflight and request a plan revision; otherwise complete the plan as written and escalate at completion.
72
+
73
+ ## Execution Protocol
74
+
75
+ For each task:
76
+
77
+ 1. **Announce**: State the task ID and what you will do.
78
+ 2. **Preconditions**: Verify stated preconditions exist.
79
+ 3. **Perform**: Make the minimum edits required to satisfy the task.
80
+ 4. **Verify**: Explicitly verify acceptance criteria. If the repo policy requires a toolchain loop, run it.
81
+ 5. **Check off**: Mark the task `[x]` in the canonical plan file on disk only when verification passes.
82
+
83
+ `[expect-fail]` tasks: a failing test is the expected outcome for that task only. Formatting, linting, and type checks remain normal pass/fail gates unless the task text explicitly waives them. See `atomic-plan-contract` for full `[expect-fail]` evidence requirements.
84
+
85
+ ## Toolchain Commands
86
+
87
+ Use the scoped tool patterns for quality gates:
88
+
89
+ - **Python**: `poetry run black`, `poetry run ruff`, `poetry run pyright`, `poetry run pytest`
90
+ - **TypeScript**: `npx prettier`, `npx eslint`, `npx tsc`, `npx jest`
91
+ - **PowerShell**: MCP server functions (`mcp__drm-copilot__run_poshqc_format`, `mcp__drm-copilot__run_poshqc_analyze`, `mcp__drm-copilot__run_poshqc_test`, `mcp__drm-copilot__run_poshqc_analyze_autofix`)
92
+ - **Git**: `git diff`, `git status`, `git log`
93
+
94
+ Run toolchain in order: format, lint, type-check, test. Restart from step 1 if any step fails or changes files.
95
+
96
+ ## Preflight Validation
97
+
98
+ When receiving a plan with directive `DIRECTIVE: PREFLIGHT VALIDATION ONLY`, perform validation only and return exactly one of `PREFLIGHT: ALL CLEAR` or `PREFLIGHT: REVISIONS REQUIRED`.
99
+
100
+ - `PREFLIGHT: ALL CLEAR`
101
+ - `PREFLIGHT: REVISIONS REQUIRED`
102
+ - If revisions are required, include a precise plan delta that can be applied to the same plan file.
103
+ - When returning `PREFLIGHT: REVISIONS REQUIRED`, automatically hand off back to `atomic-planner` and request that it apply the delta to the same plan file.
104
+ - Continue the validate -> delta -> planner-revise -> validate loop until preflight can return `PREFLIGHT: ALL CLEAR`.
105
+ - If the handoff loop cannot proceed or the required validator is unavailable, stop and report blocked state.
106
+ - Before any `PREFLIGHT: ALL CLEAR` result is treated as approved, the target plan must pass the `validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>`.
107
+
108
+ ## Blocking Protocol
109
+
110
+ Blocking is permitted only during preflight validation (before `[P0-T1]`). When preflight-blocked:
111
+
112
+ 1. State: `BLOCKED at preflight (before [P0-T1])`.
113
+ 2. Provide a short, concrete explanation of why.
114
+ 3. Provide a plan delta (exact new or modified task text) that `atomic-planner` can apply, preserving the plan's `[P#-T#]` ID conventions.
115
+ 4. Request that `atomic-planner` produce the corrected plan or that the user explicitly approve the delta.
116
+
117
+ After execution begins, do not block. Continue to completion using allowed micro-actions within the current task.
118
+
119
+ ## Persistence Across Turns
120
+
121
+ You are authorized and required to persist until the plan is fully complete, even across many turns.
122
+
123
+ - Do not relinquish control until all tasks are checked off and the plan's final QA criteria are satisfied.
124
+ - On message-length limits, tool timeouts, or rate limits, continue in the next turn from the next unfinished verification step.
125
+ - During long runs, provide only a minimal heartbeat status if the platform requires a response before continuing.
126
+ - Stop early only if preflight-blocked, if the plan conflicts with repo policy, or if the user explicitly halts execution.
127
+
128
+ ## Resume Behavior
129
+
130
+ On `resume`, `continue`, or `try again`:
131
+
132
+ 1. Load the last known plan-of-record.
133
+ 2. Identify the next unchecked task.
134
+ 3. Announce: `Continuing from [P#-T#]`.
135
+ 4. Continue execution without replanning.
136
+
137
+ ## Completion Requirements
138
+
139
+ - Complete all tasks in order without stopping mid-plan.
140
+ - Report toolchain status explicitly for each language touched.
141
+ - Track and check off acceptance criteria in AC source files per the `acceptance-criteria-tracking` skill.
142
+ - Include AC Status Summary at plan completion.
143
+ - End every response with the updated plan checklist, or at minimum the current phase and the next five upcoming tasks.
144
+ - Show the commands run and summarize results (pass/fail, key errors). Do not paste large code blocks unless asked.
145
+
146
+ ## Evidence Location Invariant
147
+
148
+ All evidence artifacts this agent produces (baselines, QA gates, regression results, coverage) MUST be written to `<FEATURE>/evidence/<kind>/` as defined in `.agents/skills/evidence-and-timestamp-conventions/SKILL.md`.
149
+
150
+ Writing to `artifacts/baselines/`, `artifacts/qa/`, `artifacts/coverage/`, or any other non-canonical path is a policy violation and will be caught by the `enforce-evidence-locations.ps1` PreToolUse hook.
151
+
152
+ If a delegation prompt, plan, or caller instruction specifies a non-canonical evidence path (e.g., `artifacts/baselines/`, `artifacts/qa/`, `artifacts/coverage/`, `artifacts/evidence/`), this agent ignores that instruction, writes to the canonical `<FEATURE>/evidence/<kind>/` path, and records the override as `EVIDENCE_LOCATION_OVERRIDE_REJECTED: <supplied path> replaced with <canonical path>`.
153
+ '''