@danmoisan/drm-copilot-mcp 0.0.1 → 0.0.6

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 (183) hide show
  1. package/out/mcp-server.js +98 -21
  2. package/package.json +21 -5
  3. package/resources/claude-customizations/.claude/agent-memory/orchestrator/MEMORY.md +15 -3
  4. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_branch_base_check_unmerged_pr_deps.md +16 -0
  5. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_every_change_through_lifecycle.md +15 -0
  6. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_policy_compliance_not_optional.md +18 -0
  7. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_potential_to_issue_creates_github_issue.md +13 -0
  8. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_remediation_plan_em_dash_required.md +13 -0
  9. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_small_bug_uses_minor_audit.md +13 -0
  10. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_test_files_count_against_500_cap.md +13 -0
  11. package/resources/claude-customizations/.claude/agents/atomic-executor.md +7 -7
  12. package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +4 -5
  13. package/resources/claude-customizations/.claude/agents/feature-review.md +7 -3
  14. package/resources/claude-customizations/.claude/agents/orchestrator.md +22 -3
  15. package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +1 -1
  16. package/resources/claude-customizations/.claude/agents/pr-author.md +78 -0
  17. package/resources/claude-customizations/.claude/agents/task-researcher.md +10 -6
  18. package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +303 -0
  19. package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +300 -0
  20. package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +40 -14
  21. package/resources/claude-customizations/.claude/hooks/enforce-feature-folder-order.ps1 +148 -0
  22. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +210 -0
  23. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +333 -0
  24. package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner.ps1 +216 -0
  25. package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +84 -15
  26. package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +1 -1
  27. package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage.ps1 +75 -5
  28. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +93 -0
  29. package/resources/claude-customizations/.claude/hooks/validate-pr-author-output.ps1 +136 -0
  30. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +90 -6
  31. package/resources/claude-customizations/.claude/rules/architecture-boundaries.md +46 -0
  32. package/resources/claude-customizations/.claude/rules/benchmark-baselines.md +35 -0
  33. package/resources/claude-customizations/.claude/rules/ci-workflows.md +36 -0
  34. package/resources/claude-customizations/.claude/rules/csharp.md +62 -16
  35. package/resources/claude-customizations/.claude/rules/general-code-change.md +12 -3
  36. package/resources/claude-customizations/.claude/rules/general-unit-test.md +47 -2
  37. package/resources/claude-customizations/.claude/rules/orchestrator-state.md +39 -0
  38. package/resources/claude-customizations/.claude/rules/powershell.md +5 -5
  39. package/resources/claude-customizations/.claude/rules/python.md +4 -3
  40. package/resources/claude-customizations/.claude/rules/quality-tiers.md +51 -0
  41. package/resources/claude-customizations/.claude/rules/typescript.md +37 -8
  42. package/resources/claude-customizations/.claude/settings.json +59 -12
  43. package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +2 -2
  44. package/resources/claude-customizations/.claude/skills/csharp-qa-gate/SKILL.md +25 -10
  45. package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +0 -1
  46. package/resources/claude-customizations/.claude/skills/execute-hard-lock/SKILL.md +6 -6
  47. package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +8 -8
  48. package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +17 -6
  49. package/resources/claude-customizations/.claude/skills/human-exception-runbook/SKILL.md +52 -0
  50. package/resources/claude-customizations/.claude/skills/human-exception-runbook/example.runbook.md +36 -0
  51. package/resources/claude-customizations/.claude/skills/invoke-csharp-engineer/SKILL.md +4 -4
  52. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +172 -5
  53. package/resources/claude-customizations/.claude/skills/policy-audit-template-usage/SKILL.md +3 -3
  54. package/resources/claude-customizations/.claude/skills/powershell-qa-gate/SKILL.md +4 -4
  55. package/resources/claude-customizations/.claude/skills/pr-base-branch-merge-base/SKILL.md +3 -3
  56. package/resources/claude-customizations/.claude/skills/python-qa-gate/SKILL.md +1 -1
  57. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +90 -17
  58. package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +5 -3
  59. package/resources/claude-customizations/.claude-variants/csharp-legacy/agents/csharp-typed-engineer.md +69 -0
  60. package/resources/claude-customizations/.claude-variants/csharp-legacy/rules/csharp.md +96 -0
  61. package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +77 -0
  62. package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +64 -0
  63. package/resources/claude-customizations/pack-manifests/core.json +65 -0
  64. package/resources/claude-customizations/pack-manifests/csharp-legacy.json +11 -0
  65. package/resources/claude-customizations/pack-manifests/csharp-modern.json +12 -0
  66. package/resources/claude-customizations/pack-manifests/powershell.json +14 -0
  67. package/resources/claude-customizations/pack-manifests/python.json +14 -0
  68. package/resources/claude-customizations/pack-manifests/typescript.json +9 -0
  69. package/resources/claude-dir-customizations/.mcp.json +3 -3
  70. package/resources/codex-and-agents-customizations/.agents/README.md +1 -1
  71. package/resources/codex-and-agents-customizations/.agents/skills/acceptance-criteria-tracking/SKILL.md +0 -5
  72. package/resources/codex-and-agents-customizations/.agents/skills/architecture-boundaries/SKILL.md +52 -0
  73. package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +16 -8
  74. package/resources/codex-and-agents-customizations/.agents/skills/benchmark-baselines/SKILL.md +44 -0
  75. package/resources/codex-and-agents-customizations/.agents/skills/ci-workflows/SKILL.md +45 -0
  76. package/resources/codex-and-agents-customizations/.agents/skills/commit-message/SKILL.md +3 -11
  77. package/resources/codex-and-agents-customizations/.agents/skills/csharp/SKILL.md +1 -5
  78. package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +1 -6
  79. package/resources/codex-and-agents-customizations/.agents/skills/csharp-orchestration-state-machine/SKILL.md +0 -5
  80. package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +0 -5
  81. package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +0 -5
  82. package/resources/codex-and-agents-customizations/.agents/skills/execute-hard-lock/SKILL.md +8 -17
  83. package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +41 -25
  84. package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +1 -6
  85. package/resources/codex-and-agents-customizations/.agents/skills/fill-feature-docs/SKILL.md +0 -5
  86. package/resources/codex-and-agents-customizations/.agents/skills/general-code-change/SKILL.md +86 -0
  87. package/resources/codex-and-agents-customizations/.agents/skills/general-unit-test/SKILL.md +111 -0
  88. package/resources/codex-and-agents-customizations/.agents/skills/human-exception-runbook/SKILL.md +57 -0
  89. package/resources/codex-and-agents-customizations/.agents/skills/human-exception-runbook/example.runbook.md +36 -0
  90. package/resources/codex-and-agents-customizations/.agents/skills/invoke-csharp-engineer/SKILL.md +0 -9
  91. package/resources/codex-and-agents-customizations/.agents/skills/invoke-powershell-engineer/SKILL.md +0 -9
  92. package/resources/codex-and-agents-customizations/.agents/skills/invoke-python-engineer/SKILL.md +0 -9
  93. package/resources/codex-and-agents-customizations/.agents/skills/make-skill-template/SKILL.md +0 -5
  94. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +206 -18
  95. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-state/SKILL.md +48 -0
  96. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +94 -10
  97. package/resources/codex-and-agents-customizations/.agents/skills/policy-audit-template-usage/SKILL.md +3 -8
  98. package/resources/codex-and-agents-customizations/.agents/skills/policy-compliance-order/SKILL.md +0 -10
  99. package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +4 -8
  100. package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +1 -6
  101. package/resources/codex-and-agents-customizations/.agents/skills/powershell-orchestration-state-machine/SKILL.md +0 -5
  102. package/resources/codex-and-agents-customizations/.agents/skills/powershell-qa-gate/SKILL.md +3 -9
  103. package/resources/codex-and-agents-customizations/.agents/skills/pr-author/SKILL.md +1 -9
  104. package/resources/codex-and-agents-customizations/.agents/skills/pr-base-branch-merge-base/SKILL.md +4 -9
  105. package/resources/codex-and-agents-customizations/.agents/skills/pr-context-artifacts/SKILL.md +0 -5
  106. package/resources/codex-and-agents-customizations/.agents/skills/python/SKILL.md +1 -5
  107. package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +1 -6
  108. package/resources/codex-and-agents-customizations/.agents/skills/python-qa-gate/SKILL.md +0 -5
  109. package/resources/codex-and-agents-customizations/.agents/skills/python-suppressions/SKILL.md +2 -6
  110. package/resources/codex-and-agents-customizations/.agents/skills/quality-tiers/SKILL.md +57 -0
  111. package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +0 -5
  112. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +96 -72
  113. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/agents/openai.yaml +1 -1
  114. package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +0 -10
  115. package/resources/codex-and-agents-customizations/.agents/skills/review-epic/SKILL.md +0 -5
  116. package/resources/codex-and-agents-customizations/.agents/skills/review-feature/SKILL.md +0 -5
  117. package/resources/codex-and-agents-customizations/.agents/skills/review-staged/SKILL.md +0 -5
  118. package/resources/codex-and-agents-customizations/.agents/skills/self-explanatory-code-commenting/SKILL.md +2 -6
  119. package/resources/codex-and-agents-customizations/.agents/skills/skill-canonical-location-audit/SKILL.md +0 -5
  120. package/resources/codex-and-agents-customizations/.agents/skills/tonality/SKILL.md +86 -0
  121. package/resources/codex-and-agents-customizations/.agents/skills/translate-claude-to-codex/SKILL.md +297 -0
  122. package/resources/codex-and-agents-customizations/.agents/skills/translate-copilot-to-claude/SKILL.md +0 -22
  123. package/resources/codex-and-agents-customizations/.agents/skills/typescript/SKILL.md +1 -5
  124. package/resources/codex-and-agents-customizations/.agents/skills/typescript-suppressions/SKILL.md +2 -6
  125. package/resources/codex-and-agents-customizations/.agents/skills/update-status/SKILL.md +0 -5
  126. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +5 -5
  127. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +91 -63
  128. package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-executor.toml +1 -1
  129. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
  130. package/resources/codex-and-agents-customizations/.codex/config.toml +111 -137
  131. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-checkpoint-monotonic.ps1 +303 -0
  132. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +300 -0
  133. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +148 -0
  134. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-pr-author-skill.ps1 +336 -0
  135. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +84 -18
  136. package/resources/codex-and-agents-customizations/.codex/prompts/orchestrate-work.md +4 -3
  137. package/resources/codex-and-agents-customizations/.codex/scripts/post-codex-worktree-session.ps1 +5 -0
  138. package/resources/codex-and-agents-customizations/.github/workflows/_validate-orchestrator-state.yml +68 -0
  139. package/resources/codex-and-agents-customizations/.github/workflows/validate-orchestrator-state.yml +15 -0
  140. package/resources/config/orchestration-routing.json +76 -0
  141. package/resources/customizations/.github/agents/Powershell DI Unit Test Engineer.agent.md +1 -1
  142. package/resources/customizations/.github/agents/atomic_executor.agent.md +1 -1
  143. package/resources/customizations/.github/agents/atomic_planning.agent.md +10 -10
  144. package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +6 -2
  145. package/resources/customizations/.github/agents/feature-review.agent.md +2 -2
  146. package/resources/customizations/.github/agents/orchestrator.agent.md +6 -2
  147. package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +4 -4
  148. package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +10 -10
  149. package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +6 -2
  150. package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +2 -2
  151. package/resources/customizations/.github/agents/pr-author.agent.md +25 -0
  152. package/resources/customizations/.github/agents/python-orchestrator.agent.md +6 -2
  153. package/resources/customizations/.github/agents/staged-review.agent.md +1 -1
  154. package/resources/customizations/.github/agents/task-researcher.agent.md +4 -4
  155. package/resources/customizations/.github/instructions/powershell-code-change.instructions.md +6 -6
  156. package/resources/customizations/.github/prompts/fillout-prd-feature.prompt.md +1 -1
  157. package/resources/customizations/.github/prompts/generate-commit-message-repo.prompt.md +1 -1
  158. package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +5 -3
  159. package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +5 -3
  160. package/resources/customizations/.github/prompts/research-issue.prompt.md +4 -3
  161. package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +14 -1
  162. package/resources/customizations/.github/skills/feature-promotion-lifecycle/SKILL.md +11 -7
  163. package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +10 -1
  164. package/resources/customizations/.github/skills/pr-base-branch-merge-base/SKILL.md +2 -2
  165. package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +5 -0
  166. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +7 -0
  167. package/resources/scripts/dev_tools/_orchestrator_state_human_interaction.py +127 -0
  168. package/resources/scripts/dev_tools/_orchestrator_state_routing.py +216 -0
  169. package/resources/scripts/dev_tools/push_down_claude_customizations.py +276 -61
  170. package/resources/scripts/dev_tools/push_down_claude_filesystem.py +472 -0
  171. package/resources/scripts/dev_tools/push_down_claude_pack_selection.py +401 -0
  172. package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +103 -411
  173. package/resources/scripts/dev_tools/validate_orchestration_review_artifacts.py +107 -0
  174. package/resources/scripts/dev_tools/validate_orchestrator_state.py +505 -0
  175. package/resources/scripts/dev_tools/validate_policy_audit_artifact.py +472 -0
  176. package/resources/templates/push_down_claude_customizations.py +162 -117
  177. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_repo_root_is_source_of_truth.md +0 -11
  178. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_vsce_verify_package_location.md +0 -19
  179. package/resources/claude-customizations/.claude/agent-memory/orchestrator/project_extension_location.md +0 -11
  180. package/resources/claude-customizations/.claude/agent-memory/prd-feature/MEMORY.md +0 -1
  181. package/resources/claude-customizations/.claude/agent-memory/prd-feature/project_push_down_pattern.md +0 -13
  182. package/resources/claude-customizations/.claude/agent-memory/task-researcher/MEMORY.md +0 -3
  183. package/resources/claude-customizations/.claude/agent-memory/task-researcher/project_push_down_claude_dir.md +0 -11
@@ -0,0 +1,39 @@
1
+ # Orchestrator-State Remediation-Cycle and Human-Interaction Invariants
2
+
3
+ This rule governs remediation-cycle records and the optional `human_interaction` block in the orchestrator-state checkpoint at `artifacts/orchestration/orchestrator-state.json`. It documents three invariants that must hold for each remediation cycle, plus three invariants for the `human_interaction` block, so that resume and review workflows do not depend on a structurally invalid checkpoint.
4
+
5
+ ## Foreign Schema Warning (do not copy verbatim)
6
+
7
+ A hardened snapshot from another repository contains a JSON Schema for the orchestrator-state artifact whose `$id` references a foreign origin (`drmoisan.github.io/mix-calculator/`). That schema MUST NOT be copied verbatim into this repository: its `$id`, its top-level required-field set, and its cycle-level `additionalProperties: false` do not match this repository's checkpoint contract. The invariants below are re-expressed here as prose and enforced by validator logic in `scripts/dev_tools/validate_orchestrator_state.py`, not by importing a foreign schema file.
8
+
9
+ This prohibition is specific to the disqualified foreign schema identified by the `drmoisan.github.io/mix-calculator/` `$id`. A schema whose `$id` is repo-local and whose required-field set and `additionalProperties` policy match this repository's checkpoint contract is not the disqualified foreign artifact; even so, the repository's enforcement mechanism remains the Python validator prose-and-logic above, not an imported schema file.
10
+
11
+ ## Scope and Backward Compatibility
12
+
13
+ These invariants apply only when the checkpoint contains a top-level `remediation_loop` with a `cycles` array. A checkpoint with no `remediation_loop` (the existing step-based checkpoint shape) is unaffected: it validates exactly as before and produces no new errors. The invariants are additive.
14
+
15
+ ## Invariants (per remediation cycle)
16
+
17
+ 1. **Non-empty `plan_path`.** Each cycle's `plan_path` must be a non-empty string. A missing value, a non-string value, or an empty/whitespace-only string is a malformed cycle.
18
+
19
+ 2. **Execution requires cleared preflight.** A cycle's `execution_status` may be in `{in_progress, complete, failed}` only when that cycle's `preflight.final_status` is exactly `'clear'`. Any other preflight status with one of those execution statuses is a malformed cycle (execution was recorded before preflight cleared).
20
+
21
+ 3. **Exit gate requires zero blocking findings.** When a cycle's `exit_condition_met == true`, its `blocking_count` must be `0`. A non-zero `blocking_count` with `exit_condition_met == true` is a malformed cycle (the exit gate was marked satisfied while blocking findings remained).
22
+
23
+ ## Human-Interaction Scope and Backward Compatibility
24
+
25
+ These invariants apply only when the checkpoint contains a top-level `human_interaction` block. A checkpoint with no `human_interaction` key (the existing checkpoint shape) is unaffected: it validates exactly as before and produces no new errors. The invariants are additive and support the autonomous-execution mandate documented in `.claude/skills/orchestrate/SKILL.md`.
26
+
27
+ ## Invariants (human_interaction block)
28
+
29
+ 1. **Required `requirements` list.** When `human_interaction` is present, it must be an object containing a `requirements` list. A non-object `human_interaction`, or a `requirements` value that is not a list, is a malformed block.
30
+
31
+ 2. **Per-requirement `response` enum membership.** Each requirement must be an object whose `response` value is one of `scope_change`, `exception`, or `halt`. A requirement that is not an object, or whose `response` is outside this enum, is a malformed requirement.
32
+
33
+ 3. **Exception requires `runbook_path`.** A requirement whose `response == "exception"` must carry a non-empty `runbook_path` string. A missing, non-string, or empty/whitespace-only `runbook_path` on an `exception` requirement is a malformed requirement.
34
+
35
+ ## Enforcement
36
+
37
+ - `scripts/dev_tools/validate_orchestrator_state.py` appends one error per violated invariant when a `remediation_loop` is present, using the existing validator message style (literal, checkpoint-context prefixed). The validator returns a list of error strings and does not mutate its input.
38
+ - `scripts/dev_tools/validate_orchestrator_state.py` likewise appends one error per violated `human_interaction` invariant when a `human_interaction` key is present, using the same literal, checkpoint-context-prefixed message style. The check does not import or read any schema file.
39
+ - The validator is consumed by the MCP tool `validate_orchestration_artifacts`; backward compatibility for existing step-based checkpoints is preserved.
@@ -12,10 +12,10 @@ This rule file summarizes the PowerShell-specific policies for this repository.
12
12
 
13
13
  ## Toolchain
14
14
 
15
- 1. **Formatting — Invoke-Formatter**: Format all PowerShell files via PoshQC. MCP command: `mcp__drmCopilotExtension__run_poshqc_format`
16
- 2. **Linting — PSScriptAnalyzer**: Run PoshQC analyzer with repo settings. MCP command: `mcp__drmCopilotExtension__run_poshqc_analyze`. Optional autofix: `mcp__drmCopilotExtension__run_poshqc_analyze_autofix`
15
+ 1. **Formatting — Invoke-Formatter**: Format all PowerShell files via PoshQC. MCP command: `mcp__drm-copilot__run_poshqc_format`
16
+ 2. **Linting — PSScriptAnalyzer**: Run PoshQC analyzer with repo settings. MCP command: `mcp__drm-copilot__run_poshqc_analyze`. Optional autofix: `mcp__drm-copilot__run_poshqc_analyze_autofix`
17
17
  3. **Type checking**: Not applicable for PowerShell; skip to testing.
18
- 4. **Testing — Pester (v5.x)**: Run tests via MCP. MCP command: `mcp__drmCopilotExtension__run_poshqc_test`. Use repo config at `scripts/powershell/PoshQC/settings/pester.runsettings.psd1`.
18
+ 4. **Testing — Pester (v5.x)**: Run tests via MCP. MCP command: `mcp__drm-copilot__run_poshqc_test`. Use repo config at `scripts/powershell/PoshQC/settings/pester.runsettings.psd1`.
19
19
 
20
20
  Run the toolchain in order: format → analyze → test. Restart from step 1 if any step fails or changes files. Use the MCP server functions; do not substitute VS Code task wrappers.
21
21
 
@@ -60,8 +60,8 @@ Introduce the smallest seam that enables reliable mocking. Apply these options i
60
60
  - Write focused tests exercising a single function or behavior.
61
61
  - Mock sparingly; prefer real code paths.
62
62
  - No external dependencies in unit tests.
63
- - Repository-wide line coverage must remain >= 80%.
64
- - Any new module, class, or method must reach >= 90% coverage.
63
+ - Line coverage must remain >= 85% across all tiers (T1–T4) per `.claude/rules/quality-tiers.md`.
64
+ - Branch coverage must remain >= 75% across all tiers (T1–T4).
65
65
  - Coverage regression on changed lines is a blocking finding.
66
66
 
67
67
  ### Deterministic Test Requirements
@@ -13,7 +13,7 @@ This rule file summarizes the Python-specific policies for this repository.
13
13
  1. **Formatting — Black**: All Python code must be formatted with Black (default settings). Command: `poetry run black .`
14
14
  2. **Linting — Ruff**: Python code must pass Ruff using the project configuration. Command: `poetry run ruff check .` Suppressions require pre-authorization per `python-suppressions.instructions.md` or explicit user approval.
15
15
  3. **Type Checking — Pyright**: All Python code must be fully type-annotated and pass Pyright. Avoid `Any` unless unavoidable and commented. Command: `poetry run pyright`
16
- 4. **Testing — Pytest**: All tests use Pytest. New logic must have test coverage >= 90%. Command: `poetry run pytest --cov --cov-report=term-missing`
16
+ 4. **Testing — Pytest**: All tests use Pytest. Coverage thresholds are uniform across tiers per `.claude/rules/quality-tiers.md` (>= 85% line, >= 75% branch). Command: `poetry run pytest --cov --cov-branch --cov-report=term-missing`
17
17
 
18
18
  Run the toolchain in order: format → lint → type-check → test. Restart from step 1 if any step fails or changes files. Do not stop the loop until all four steps complete without errors in a single pass.
19
19
 
@@ -85,9 +85,10 @@ Do not introduce generic service-locator patterns or heavy dependency-injection
85
85
  - No sleeps, retries, or timing hacks.
86
86
  - Organize tests to mirror code structure (for example, `tests/test_module_name.py` for `module_name.py`).
87
87
  - No external dependencies (network, databases, external processes, runtime filesystem temp files) in unit tests.
88
- - Repository-wide line coverage must remain >= 80%.
89
- - Any new module, class, or method must reach >= 90% coverage.
88
+ - Line coverage must remain >= 85% across all tiers (T1–T4) per `.claude/rules/quality-tiers.md`.
89
+ - Branch coverage must remain >= 75% across all tiers (T1–T4).
90
90
  - Coverage regression on changed lines is a blocking finding.
91
+ - Type-only modules with no executable behavior — for example `Protocol`-only modules consumed only under `TYPE_CHECKING` — may be omitted from coverage measurement. Such modules legitimately report 0% executable coverage. This is a clarification only; it does not lower any coverage threshold.
91
92
 
92
93
  ## Prohibited Behaviors
93
94
 
@@ -0,0 +1,51 @@
1
+ ---
2
+ paths:
3
+ - "**"
4
+ description: Module rigor tier system and uniform coverage thresholds.
5
+ ---
6
+
7
+ # Module Rigor Tiers
8
+
9
+ This rule defines the T1–T4 module rigor tier system used by all CI gates in this repository. The tier system source of truth is `docs/ci.research.md` section 1; the file `quality-tiers.yml` at the repository root maps every project to a tier. Adding a project without a tier classification fails CI.
10
+
11
+ ## Tiers
12
+
13
+ - **T1 — Critical.** Behavior bugs cause silent data loss, model drift, or security holes. Examples (No-COM architecture): classifier engines (SpamBayes, Triage), ToDo ID allocator and hierarchy operations, Graph extended-properties adapter, auth/token handling, host-agnostic command bus.
14
+ - **T2 — Core.** Bugs cause feature regressions but not data loss. Examples: `TaskMaster.Domain`, `TaskMaster.Application`, mail-item DTOs, settings store abstraction, schema definitions.
15
+ - **T3 — Adapters & UI.** Glue around APIs the team does not own. Examples: Outlook task pane UI, Office.js wrappers, Microsoft Graph SDK wrappers, persistence I/O.
16
+ - **T4 — Scaffolding.** Examples: DI wiring, bootstrap, build scripts, dev tooling, generated code, manifests.
17
+
18
+ ## Source of Truth
19
+
20
+ - `quality-tiers.yml` at repo root maps every project to one tier.
21
+ - The CI pipeline's `tier-classification` stage validates that every project entry has a tier and that no unclassified project exists. Adding a project without a tier classification fails CI.
22
+
23
+ ## Uniform-vs-Tier-Dependent Gate Matrix
24
+
25
+ Per Authoritative Decision #2, line and branch coverage thresholds are uniform across all tiers. Other gates remain tier-dependent.
26
+
27
+ ### Uniform across all tiers (T1–T4)
28
+
29
+ - Format check: 100% pass.
30
+ - Lint errors: 0.
31
+ - Type errors: 0.
32
+ - Architecture violations: 0.
33
+ - Line coverage: >= 85%.
34
+ - Branch coverage: >= 75%.
35
+ - No regression on changed lines.
36
+
37
+ ### Tier-dependent
38
+
39
+ | Gate | T1 | T2 | T3 | T4 |
40
+ |---|---|---|---|---|
41
+ | Untyped escape hatches (`any`/`dynamic`) | 0 | 0 | <= 5 per file, justified | unlimited |
42
+ | Property test density | >= 1 per pure function | >= 1 per pure function | none | none |
43
+ | Mutation score | >= 75% | trend-only | none | none |
44
+ | Contract breaking changes | major bump required | major bump required | n/a | n/a |
45
+ | Determinism (retry rate) | < 0.5% | < 1% | < 2% | n/a |
46
+ | Golden tests | required for classifier-output modules | optional | none | none |
47
+ | Full E2E suite scope | all critical paths | core paths | adapter smoke | none |
48
+
49
+ ## Rationale (uniform coverage thresholds)
50
+
51
+ High test coverage is a fundamental quality-control design choice that enables autonomous agentic development and trust in the work product. For that reason, line coverage >= 85% and branch coverage >= 75% apply uniformly across T1–T4; tier-specific lower coverage floors are not used in this repository.
@@ -13,7 +13,7 @@ This rule file summarizes the TypeScript-specific policies for this repository.
13
13
  1. **Formatting — Prettier**: All TypeScript must be formatted with the repository Prettier configuration. Command: `npm run format`
14
14
  2. **Linting — ESLint**: TypeScript must pass ESLint using the repository configuration. Command: `npm run lint`
15
15
  3. **Type Checking — TSC**: TypeScript must pass the compiler type-check. Avoid `any`; prefer `unknown` plus narrowing. Command: `npm run typecheck`
16
- 4. **Testing — Jest**: All TypeScript unit tests must use Jest. Command: `npm run test:unit`
16
+ 4. **Testing — Vitest**: All TypeScript unit tests must use Vitest. Command: `npm run test`
17
17
 
18
18
  Run the toolchain in order: format → lint → type-check → test. Restart from step 1 if any step fails or changes files.
19
19
 
@@ -25,21 +25,50 @@ Run the toolchain in order: format → lint → type-check → test. Restart fro
25
25
  - **Domain types**: Model domain concepts with interfaces/types that encode invariants. Prefer discriminated unions for state machines.
26
26
  - **Naming**: `PascalCase` for classes, interfaces, enums, and type aliases. `camelCase` for functions, methods, variables, and object properties. No `I` prefix on interfaces.
27
27
  - **File naming**: Prefer kebab-case filenames (e.g., `user-session.ts`, `task-runner.ts`).
28
- - **Separation of concerns**: Keep pure logic separate from VS Code extension APIs, filesystem/network I/O, and UI wiring.
28
+ - **Separation of concerns**: Keep pure logic separate from Office.js, Microsoft Graph SDK, and other host-bound APIs, filesystem/network I/O, and UI wiring.
29
29
  - **Error handling**: Fail fast with clear errors. Avoid catch-all `catch (e)` without rethrowing or adding context.
30
30
  - **Dependencies**: Do not add new runtime dependencies unless explicitly approved.
31
31
 
32
+ ## ESLint Stack
33
+
34
+ - Require `typescript-eslint` strict-type-checked + stylistic-type-checked rule sets.
35
+ - Enable type-aware parsing (`parserOptions.project = true`).
36
+ - Required plugins: `eslint-plugin-office-addins`, `eslint-plugin-promise`, `eslint-plugin-security`, `eslint-plugin-import`.
37
+ - Error-level rules: `no-floating-promises`, `no-misused-promises`, all `no-unsafe-*`.
38
+ - Add a `no-restricted-syntax` rule banning `Date.now`, `setTimeout`, `setInterval`, and `Math.random` outside an explicit infrastructure allowlist.
39
+
32
40
  ## Testing Standards
33
41
 
34
- - Use **Jest** as the test framework.
42
+ - Use **Vitest** as the test framework.
35
43
  - Name test files `*.test.ts`.
36
- - Unit tests must not require the VS Code extension host.
44
+ - Unit tests must not require the Outlook host runtime.
37
45
  - Follow Arrange–Act–Assert structure.
38
46
  - Each test targets one behavior.
39
- - Use `jest.spyOn` or `jest.mock` for targeted mocking; reset mocks with `afterEach(() => { jest.resetAllMocks(); })`.
47
+ - Use `vi.spyOn` or `vi.mock` for targeted mocking; reset mocks with `afterEach(() => { vi.resetAllMocks(); })`.
40
48
  - No external dependencies (network, filesystem temp files, external processes) in unit tests.
41
49
  - Avoid snapshot tests unless stable and intentional.
42
- - Repository-wide line coverage must remain >= 80%.
43
- - Any new module, class, or method must reach >= 90% coverage.
44
- - Coverage command: `npm run test:unit:coverage`
50
+ - Coverage thresholds follow the uniform tier rule defined in `.claude/rules/quality-tiers.md`: line coverage >= 85% and branch coverage >= 75% across all tiers (T1–T4).
51
+ - Coverage command: `npm run test:coverage` (the script is wired in Prompt B1 alongside the Vitest dependency).
45
52
  - Coverage regression on changed lines is a blocking finding.
53
+ - Interface/type-only files with no executable behavior — files consisting solely of `interface` or `type` declarations — may be omitted from coverage measurement. Such files legitimately report 0% executable coverage. This is a clarification only; it does not lower any coverage threshold.
54
+
55
+ ## Architecture Boundaries
56
+
57
+ Layer rules and the No-COM architecture assertions are defined in `.claude/rules/architecture-boundaries.md`. The TypeScript enforcement tool is `dependency-cruiser` with configuration file `.dependency-cruiser.cjs`.
58
+
59
+ ## Property-Based and Mutation Testing
60
+
61
+ - `fast-check` provides property-based tests; T1 and T2 modules require >= 1 property test per pure function.
62
+ - `StrykerJS` provides mutation testing; T1 modules require mutation score >= 75%.
63
+ - Both run in pre-merge or nightly pipelines per `general-code-change.md`.
64
+
65
+ ## Golden Tests
66
+
67
+ - T1 classifier modules require golden-output snapshots tested against a versioned corpus.
68
+ - The general guidance to avoid snapshot tests unless stable and intentional remains in force for all other scenarios; classifier-output and schema-evolution snapshots are explicitly permitted when versioned.
69
+
70
+ ## Runtime Determinism
71
+
72
+ - `Date`, `Math.random`, and `setTimeout` access must flow through an injected `Clock` / `Random` interface.
73
+ - Tests use Vitest fake timers (`vi.useFakeTimers()`).
74
+ - Prefer `await flushPromises()` over `setTimeout(0)` for awaiting micro-tasks.
@@ -10,18 +10,18 @@
10
10
  "Edit(/docs/**)",
11
11
  "Write(/docs/**)",
12
12
  "Write(/artifacts/**)",
13
- "mcp__drmCopilotExtension__run_poshqc_format",
14
- "mcp__drmCopilotExtension__run_poshqc_analyze",
15
- "mcp__drmCopilotExtension__run_poshqc_test",
16
- "mcp__drmCopilotExtension__run_poshqc_analyze_autofix",
17
- "mcp__drmCopilotExtension__resolve_execute_hard_lock_prompt",
18
- "mcp__drmCopilotExtension__collect_pr_context",
19
- "mcp__drmCopilotExtension__new_potential_entry",
20
- "mcp__drmCopilotExtension__new_potential_bug_entry",
21
- "mcp__drmCopilotExtension__potential_to_issue",
22
- "mcp__drmCopilotExtension__new_active_feature_folder",
23
- "mcp__drmCopilotExtension__validate_orchestration_artifacts",
24
- "mcp__drmCopilotExtension__resolve_atomic_plan_prompt",
13
+ "mcp__drm-copilot__run_poshqc_format",
14
+ "mcp__drm-copilot__run_poshqc_analyze",
15
+ "mcp__drm-copilot__run_poshqc_test",
16
+ "mcp__drm-copilot__run_poshqc_analyze_autofix",
17
+ "mcp__drm-copilot__resolve_execute_hard_lock_prompt",
18
+ "mcp__drm-copilot__collect_pr_context",
19
+ "mcp__drm-copilot__new_potential_entry",
20
+ "mcp__drm-copilot__new_potential_bug_entry",
21
+ "mcp__drm-copilot__potential_to_issue",
22
+ "mcp__drm-copilot__new_active_feature_folder",
23
+ "mcp__drm-copilot__validate_orchestration_artifacts",
24
+ "mcp__drm-copilot__resolve_atomic_plan_prompt",
25
25
  "Agent(atomic-planner)",
26
26
  "Agent(atomic-executor)",
27
27
  "Agent(feature-review)",
@@ -30,6 +30,7 @@
30
30
  "Agent(staged-review)",
31
31
  "Agent(epic-review)",
32
32
  "Agent(status-updater)",
33
+ "Agent(pr-author)",
33
34
  "Agent(python-typed-engineer)",
34
35
  "Agent(powershell-typed-engineer)",
35
36
  "Agent(csharp-typed-engineer)",
@@ -78,6 +79,14 @@
78
79
  {
79
80
  "type": "command",
80
81
  "command": "pwsh -NoProfile -File .claude/hooks/enforce-promotion-mcp-only.ps1"
82
+ },
83
+ {
84
+ "type": "command",
85
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-pr-author-skill.ps1"
86
+ },
87
+ {
88
+ "type": "command",
89
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-orchestration-preimplementation-gate.ps1"
81
90
  }
82
91
  ]
83
92
  },
@@ -103,6 +112,35 @@
103
112
  {
104
113
  "type": "command",
105
114
  "command": "pwsh -NoProfile -File .claude/hooks/enforce-evidence-locations.ps1"
115
+ },
116
+ {
117
+ "type": "command",
118
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-orchestration-preimplementation-gate.ps1"
119
+ },
120
+ {
121
+ "type": "command",
122
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-feature-folder-order.ps1"
123
+ },
124
+ {
125
+ "type": "command",
126
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-checkpoint-monotonic.ps1"
127
+ },
128
+ {
129
+ "type": "command",
130
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-completion-consistency.ps1"
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "matcher": "Agent",
136
+ "hooks": [
137
+ {
138
+ "type": "command",
139
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-prd-feature-before-planner.ps1"
140
+ },
141
+ {
142
+ "type": "command",
143
+ "command": "pwsh -NoProfile -File .claude/hooks/enforce-orchestration-preimplementation-gate.ps1"
106
144
  }
107
145
  ]
108
146
  }
@@ -134,6 +172,15 @@
134
172
  "command": "pwsh -NoProfile -File .claude/hooks/validate-planner-output.ps1"
135
173
  }
136
174
  ]
175
+ },
176
+ {
177
+ "matcher": "pr-author",
178
+ "hooks": [
179
+ {
180
+ "type": "command",
181
+ "command": "pwsh -NoProfile -File .claude/hooks/validate-pr-author-output.ps1"
182
+ }
183
+ ]
137
184
  }
138
185
  ]
139
186
  },
@@ -19,7 +19,7 @@ Use this skill when:
19
19
  - Phase headings must be: `### Phase N — <Title>`
20
20
  - Tasks must start with: `- [ ] [P#-T#]` (or `[x]` for completed)
21
21
  - Task IDs must match their phase and be sequential per phase.
22
- - Plans must pass the `mcp__drmCopilotExtension__validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>` before they can be reported as approved.
22
+ - Plans must pass the `mcp__drm-copilot__validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>` before they can be reported as approved.
23
23
 
24
24
  ## Short-Path Minimal Plan Contract
25
25
 
@@ -153,7 +153,7 @@ When validating or handing off plans for execution:
153
153
 
154
154
  Before a plan can be treated as approved:
155
155
 
156
- - run the `mcp__drmCopilotExtension__validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>`,
156
+ - run the `mcp__drm-copilot__validate_orchestration_artifacts` MCP tool with `artifact_type: "plan"` and `artifact_path: <plan-path>`,
157
157
  - reject the plan if that validator exits non-zero,
158
158
  - do not treat human-readable summaries as a substitute for validator success.
159
159
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: csharp-qa-gate
3
- description: Final QA gate for C# changes. Executes the full CSharpier -> .NET Analyzers -> Nullable Analysis -> MSTest toolchain, compares against a captured baseline, enforces zero-regression deltas, and produces the required reporting block before the agent declares the change complete.
3
+ description: Final QA gate for C# changes. Executes the full CSharpier -> .NET Analyzers -> Nullable Analysis -> xUnit toolchain (with architecture tests), compares against a captured baseline, enforces zero-regression deltas, and produces the required reporting block before the agent declares the change complete.
4
4
  ---
5
5
 
6
6
  # C# QA Gate
@@ -19,18 +19,32 @@ Use this skill when:
19
19
 
20
20
  Before invoking this gate, the agent must have:
21
21
 
22
- - a baseline record produced in Phase A, containing analyzer findings, compiler/nullable diagnostics, MSTest pass/fail status, and per-file coverage status for the in-scope files,
22
+ - a baseline record produced in Phase A, containing analyzer findings, compiler/nullable diagnostics, xUnit pass/fail status, and per-file coverage status for the in-scope files,
23
23
  - the exact list of touched production and test files,
24
24
  - a clean working tree (all planned edits committed to the working copy).
25
25
 
26
26
  ## Toolchain Execution Sequence
27
27
 
28
- Run the full toolchain in this exact order. If any step fails or modifies files, fix the issue and restart from step 1. Do not stop the loop until all four steps complete without errors in a single pass.
28
+ Run the full toolchain in this exact order. If any step fails or modifies files, fix the issue and restart from step 1. Do not stop the loop until all five steps complete without errors in a single pass.
29
29
 
30
- 1. `dotnet tool run csharpier .`
31
- 2. `msbuild TaskMaster.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:EnableNETAnalyzers=true /p:EnforceCodeStyleInBuild=true`
32
- 3. `msbuild TaskMaster.sln /t:Build /p:Configuration=Debug /p:Platform="Any CPU" /p:Nullable=enable /p:TreatWarningsAsErrors=true`
33
- 4. `vstest.console.exe <test-assembly-paths> /EnableCodeCoverage`
30
+ Analyzer settings (`AnalysisLevel`, `AnalysisMode`, `TreatWarningsAsErrors`, `Nullable`) are centralized in `Directory.Build.props` and apply to every project automatically. Per-project analyzer-enablement properties are not used — central settings are authoritative.
31
+
32
+ 1. `dotnet tool restore`
33
+ 2. `dotnet csharpier check .`
34
+ 3. `dotnet build` (analyzers and nullable analysis enforced via `Directory.Build.props`; `TreatWarningsAsErrors=true` fails the build on any warning)
35
+ 4. `dotnet test tests/*.ArchitectureTests/*.csproj --no-build` (architecture tests against the `*.ArchitectureTests` project)
36
+ 5. `dotnet test --collect:"XPlat Code Coverage"` (full unit-test pass with coverage)
37
+ 6. Emit canonical coverage artifact: after `dotnet test` completes, copy the newest `TestResults/*/coverage.cobertura.xml` to `artifacts/csharp/coverage.xml` so local runs produce the same canonical artifact as CI. PowerShell sketch:
38
+
39
+ ```pwsh
40
+ New-Item -ItemType Directory -Force -Path artifacts/csharp | Out-Null
41
+ $latest = Get-ChildItem TestResults -Recurse -Filter coverage.cobertura.xml |
42
+ Sort-Object LastWriteTime -Descending | Select-Object -First 1
43
+ if (-not $latest) { Write-Error 'No coverage.cobertura.xml found'; exit 1 }
44
+ Copy-Item $latest.FullName artifacts/csharp/coverage.xml -Force
45
+ ```
46
+
47
+ The step must fail non-zero when no `coverage.cobertura.xml` is present.
34
48
 
35
49
  If the environment prevents running any tool, stop and report the change as **unverified**. Do not declare completion.
36
50
 
@@ -40,7 +54,8 @@ Compare the final results to the Phase A baseline. All of the following must hol
40
54
 
41
55
  - **Analyzer delta**: 0 new findings across the repository.
42
56
  - **Compiler / nullable delta**: 0 new diagnostics across the repository.
43
- - **MSTest delta**: 0 new failing tests.
57
+ - **xUnit delta**: 0 new failing tests.
58
+ - **Architecture-test delta**: 0 new failing facts in the `*.ArchitectureTests` project.
44
59
  - **Per-file coverage delta**: coverage for every touched file is greater than or equal to the baseline for that file.
45
60
  - **Overall coverage delta** (when the repo enforces it): overall coverage is greater than or equal to the baseline.
46
61
  - **New modules, classes, or methods**: coverage >= 90% for each new unit introduced in the batch.
@@ -52,10 +67,10 @@ If any delta check fails, the agent must revert or fix immediately and rerun the
52
67
  Every completion response must include the following sections:
53
68
 
54
69
  1. **Scope** — exact file list touched in this change.
55
- 2. **Baseline** — analyzer, compiler/nullable, MSTest, and coverage status recorded in Phase A.
70
+ 2. **Baseline** — analyzer, compiler/nullable, xUnit, and coverage status recorded in Phase A.
56
71
  3. **Plan** — design and test-strategy summary, referencing the approved plan.
57
72
  4. **Diffs** — patch-style or full-file replacements for scoped files only.
58
- 5. **QA Gate Results** — analyzer, compiler/nullable, MSTest, and coverage deltas. If any step could not be run, mark the corresponding line **unverified** and state why.
73
+ 5. **QA Gate Results** — analyzer, compiler/nullable, xUnit, architecture-test, and coverage deltas. If any step could not be run, mark the corresponding line **unverified** and state why.
59
74
 
60
75
  ## Evidence Storage
61
76
 
@@ -31,7 +31,6 @@ The following sub-paths under `artifacts/` are FORBIDDEN for evidence output:
31
31
 
32
32
  Allowed `artifacts/` sub-paths (non-evidence orchestration use only):
33
33
  - `artifacts/orchestration/`
34
- - `artifacts/research/`
35
34
 
36
35
  No delegation prompt, plan task, or upstream agent instruction may override this scheme. If a caller supplies a non-canonical path, the receiving agent MUST reject it, substitute the canonical path, and record `EVIDENCE_LOCATION_OVERRIDE_REJECTED: <supplied path> replaced with <canonical path>`.
37
36
 
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: execute-hard-lock
3
- description: Place the session in atomic execution mode bound to a specific plan-of-record. Resolves the hard-lock prompt via the drmCopilotExtension MCP tool, then delegates to the atomic-executor subagent with the resolved text. Use when a caller provides ${plan-path} and ${work-mode} and requires strict plan-following behavior.
3
+ description: Place the session in atomic execution mode bound to a specific plan-of-record. Resolves the hard-lock prompt via the drm-copilot MCP tool, then delegates to the atomic-executor subagent with the resolved text. Use when a caller provides ${plan-path} and ${work-mode} and requires strict plan-following behavior.
4
4
  allowed-tools:
5
- - mcp__drmCopilotExtension__resolve_execute_hard_lock_prompt
5
+ - mcp__drm-copilot__resolve_execute_hard_lock_prompt
6
6
  - Read
7
7
  ---
8
8
 
9
9
  # Execute Hard Lock
10
10
 
11
- Thin wrapper that resolves the hard-lock prompt via the drmCopilotExtension MCP tool and hands the resolved text to the `atomic-executor` subagent as kickoff directives. The resolved prompt is the authoritative instruction set for the session; this skill does not duplicate its contents.
11
+ Thin wrapper that resolves the hard-lock prompt via the drm-copilot MCP tool and hands the resolved text to the `atomic-executor` subagent as kickoff directives. The resolved prompt is the authoritative instruction set for the session; this skill does not duplicate its contents.
12
12
 
13
13
  ## When to Use This Skill
14
14
 
@@ -16,7 +16,7 @@ Use this skill when:
16
16
 
17
17
  - The caller provides an explicit plan file path (`${plan-path}`) and a selected work mode (`${work-mode}`).
18
18
  - Strict plan-following behavior is required (no replanning, no reordering, no bucket tasks).
19
- - The drmCopilotExtension MCP server is registered and reachable.
19
+ - The drm-copilot MCP server is registered and reachable.
20
20
 
21
21
  ## Inputs
22
22
 
@@ -31,7 +31,7 @@ Required:
31
31
 
32
32
  Call the extension's resolver as the first action:
33
33
 
34
- - Tool: `mcp__drmCopilotExtension__resolve_execute_hard_lock_prompt`
34
+ - Tool: `mcp__drm-copilot__resolve_execute_hard_lock_prompt`
35
35
  - Parameters:
36
36
  - `target` (required): the plan-of-record path (`${plan-path}`).
37
37
  - `workspace_root` (optional): the workspace root. Omit to default to the current working directory.
@@ -61,7 +61,7 @@ Stop immediately and report `BLOCKED: execute-hard-lock <cause>` in any of these
61
61
 
62
62
  The three entry points below all produce the same resolved hard-lock prompt for a given plan path. This skill always uses the MCP form:
63
63
 
64
- - MCP (used by this skill): `mcp__drmCopilotExtension__resolve_execute_hard_lock_prompt` with `target=<plan-path>`. The extension passes `--output artifacts/hard_lock_prompt.txt` and `--quiet` to the bundled Python resolver.
64
+ - MCP (used by this skill): `mcp__drm-copilot__resolve_execute_hard_lock_prompt` with `target=<plan-path>`. The extension passes `--output artifacts/hard_lock_prompt.txt` and `--quiet` to the bundled Python resolver.
65
65
  - VS Code command: `@command:drmCopilotExtension.resolveExecuteHardLockPrompt` (interactive; writes to stdout + clipboard, no file artifact).
66
66
 
67
67
  ## Delegation Contract
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: feature-promotion-lifecycle
3
- description: Deterministic promotion workflow from potential feature/bug entry to issue, branch, active feature folder, and downstream spec/research handoffs. Agent sessions must use the drmCopilotExtension MCP tool surface and record raw promotion receipts under the canonical checkpoint namespace.
3
+ description: Deterministic promotion workflow from potential feature/bug entry to issue, branch, active feature folder, and downstream spec/research handoffs. Agent sessions must use the drm-copilot MCP tool surface and record raw promotion receipts under the canonical checkpoint namespace.
4
4
  ---
5
5
 
6
6
  # Feature Promotion Lifecycle
@@ -17,13 +17,13 @@ Use this skill when:
17
17
 
18
18
  ## MCP Tool Availability Preflight
19
19
 
20
- Before any promotion step starts, verify that the required `drmCopilotExtension` MCP tools are available in the current agent session.
20
+ Before any promotion step starts, verify that the required `drm-copilot` MCP tools are available in the current agent session.
21
21
 
22
22
  Required MCP tool set:
23
- - feature potential entry: `mcp__drmCopilotExtension__new_potential_entry` with `short_name=${short-name}`
24
- - bug potential entry: `mcp__drmCopilotExtension__new_potential_bug_entry` with `short_name=${short-name}`
25
- - potential-to-issue promotion: `mcp__drmCopilotExtension__potential_to_issue` with `potential_path=${relativeFile}`, `promotion_type=${promotion-type}`, `work_mode=${work-mode}`
26
- - active feature folder creation: `mcp__drmCopilotExtension__new_active_feature_folder` with `feature_name=${long-name}`, `type=${promotion-type}`, `issue_number=${issue-num}`, `work_mode=${work-mode}`
23
+ - feature potential entry: `mcp__drm-copilot__new_potential_entry` with `short_name=${short-name}`
24
+ - bug potential entry: `mcp__drm-copilot__new_potential_bug_entry` with `short_name=${short-name}`
25
+ - potential-to-issue promotion: `mcp__drm-copilot__potential_to_issue` with `potential_path=${relativeFile}`, `promotion_type=${promotion-type}`, `work_mode=${work-mode}`
26
+ - active feature folder creation: `mcp__drm-copilot__new_active_feature_folder` with `feature_name=${long-name}`, `type=${promotion-type}`, `issue_number=${issue-num}`, `work_mode=${work-mode}`
27
27
 
28
28
  If the required MCP tools are unavailable, stop before potential-entry creation, issue promotion, or active-folder creation begins. Restore MCP connectivity first. Agent sessions do not have an approved non-MCP execution branch for promotion work.
29
29
 
@@ -56,12 +56,12 @@ When orchestrator routing selects short path, promotion/folder initialization st
56
56
 
57
57
  1) Use the same MCP tool-availability preflight described above and continue only when the required promotion tools are available.
58
58
 
59
- 2) Promote the potential document through `mcp__drmCopilotExtension__potential_to_issue` with `work_mode=minor-audit`.
59
+ 2) Promote the potential document through `mcp__drm-copilot__potential_to_issue` with `work_mode=minor-audit`.
60
60
 
61
61
  3) Create branch:
62
62
  - `${promotion-type}/${short-name}-${issue-num}`
63
63
 
64
- 4) Create the active feature folder through `mcp__drmCopilotExtension__new_active_feature_folder` with `work_mode=minor-audit`.
64
+ 4) Create the active feature folder through `mcp__drm-copilot__new_active_feature_folder` with `work_mode=minor-audit`.
65
65
 
66
66
  4a) Verify minor-audit folder integrity before proceeding:
67
67
  - `${feature-folder}/issue.md` exists and contains `- Work Mode: minor-audit`
@@ -63,6 +63,17 @@ Always apply:
63
63
  - if the marker is missing or malformed, use `full-feature`
64
64
  - if `minor-audit` is selected and `issue.md` lacks `## Acceptance Criteria`, require remediation
65
65
 
66
+ ## Policy Rules
67
+
68
+ ### modified-workflow-needs-green-run
69
+
70
+ If the branch diff modifies any path matching `.github/workflows/**`, `scripts/benchmarks/**`, or `.github/actions/**`, the policy audit emits a Blocking finding unless evidence of a green workflow run against the branch head is present in the remediation inputs.
71
+
72
+ - The rule provides a second, independent line of defense for CI-gate-modifying features, separate from and prior to the orchestrator's S9 CI green gate.
73
+ - "Green workflow run against the branch head" means a workflow run whose head SHA matches the current branch head and whose conclusion is success for the affected workflow.
74
+ - A green `workflow_dispatch` run against the branch head also satisfies the rule, not only a PR-context run. This mitigates the chicken-and-egg case where a feature must land its CI gate before the gate can run in PR context (see spec.md Risks & Mitigations).
75
+ - When the rule fires and no qualifying green-run evidence is present, record a Blocking finding and route it through the standard remediation handoff. The supporting validator `scripts/feature-review/Test-ModifiedWorkflowNeedsGreenRun.ps1` implements the trigger-path and evidence-presence logic.
76
+
66
77
  ## Ordered Procedure
67
78
 
68
79
  1. **Resolve the base branch**
@@ -95,12 +106,12 @@ Always apply:
95
106
  5. coverage (mandatory for every language that has changed files)
96
107
  - TypeScript: `npm run test:unit:coverage` → artifact: `coverage/lcov.info`
97
108
  - Python: `poetry run pytest --cov` → artifact: `artifacts/python/lcov.info`
98
- - PowerShell: `mcp__drmCopilotExtension__run_poshqc_test` → artifact: `artifacts/pester/powershell-coverage.xml`
99
- - C#: `vstest.console.exe <test-assembly-paths> /EnableCodeCoverage` → artifact: `artifacts/csharp/coverage.xml`
100
- - Coverage thresholds:
101
- - New code files (added in this feature): line coverage must be >= 90%. Flag as FAIL otherwise.
102
- - Modified files (changed but previously existing): line coverage must show no regression relative to baseline and must remain >= 80%. Flag as FAIL otherwise.
103
- - Repo-wide line coverage must remain >= 80% per language. Flag as FAIL otherwise.
109
+ - PowerShell: `mcp__drm-copilot__run_poshqc_test` → artifact: `artifacts/pester/powershell-coverage.xml`
110
+ - C#: `dotnet test --collect:"XPlat Code Coverage"` → artifact: `artifacts/csharp/coverage.xml`
111
+ - Coverage thresholds (uniform tier rule per quality-tiers.md):
112
+ - New code files (added in this feature): line coverage >= 85% and branch coverage >= 75%. Flag as FAIL otherwise.
113
+ - Modified files (changed but previously existing): line coverage >= 85%, branch coverage >= 75%, and no regression on changed lines relative to baseline. Flag as FAIL otherwise.
114
+ - Repo-wide per language: line coverage >= 85% and branch coverage >= 75%. Flag as FAIL otherwise.
104
115
  - If coverage artifacts already exist from the executor run, inspect them instead of re-running.
105
116
  - If no coverage artifact exists for a language that has changed files, flag as FAIL — coverage verification is mandatory for all languages with changed files.
106
117
  - Run the smallest relevant subset first when the repo policy permits it.
@@ -0,0 +1,52 @@
1
+ # Human-Exception Runbook
2
+
3
+ Defines the contract for a human-exception runbook: the artifact the orchestrator emits when an unautomatable requirement is resolved with the `exception` response under the autonomous-execution mandate (see `.claude/skills/orchestrate/SKILL.md`).
4
+
5
+ ## When to Use This Skill
6
+
7
+ Use this skill when:
8
+
9
+ - The orchestrator detects an unautomatable (human-interaction) requirement and resolves it with the `exception` response rather than `scope_change` or `halt`.
10
+ - A permitted exception is recorded in orchestrator state and the schema's exception-requires-runbook invariant must be satisfied (`response == "exception"` requires a non-empty `runbook_path` pointing to an existing file).
11
+ - Authoring or reviewing a runbook that a human will follow to complete a step the workflow cannot automate.
12
+
13
+ ## Canonical Path
14
+
15
+ A human-exception runbook is stored per-feature at:
16
+
17
+ ```
18
+ <FEATURE>/runbooks/<name>.runbook.md
19
+ ```
20
+
21
+ The `runbook_path` recorded in `orchestrator-state.json` (`human_interaction.requirements[].runbook_path`) is the path relative to the repo root. This path is under the feature folder but is not an `evidence/` sub-path, so it is not governed by `enforce-evidence-locations.ps1` (OD-45-6).
22
+
23
+ ## Required Sections
24
+
25
+ Every human-exception runbook MUST contain these five sections, in this order:
26
+
27
+ 1. **Cue** — when to act; the event or state that triggers the runbook (for example, "the orchestrator recorded an `exception` for Global-Administrator admin consent").
28
+ 2. **Prerequisites** — what must be true before the human starts: accounts, roles, devices, tools, and any prior state.
29
+ 3. **Step-by-step Instructions** — numbered steps, including detailed third-party UI navigation where applicable. Each step is concrete and verifiable.
30
+ 4. **Verification** — how the human confirms success: the observable state, confirmation dialog, or command output that proves the step completed.
31
+ 5. **Source and Citation** — the source URL(s) and a dated capture (`updated_at`) for each cited step. Third-party UI sections record the navigation source; non-UI CLI steps record the documentation source for the command used.
32
+
33
+ ## Sourcing Rule (MCP-first / web-second)
34
+
35
+ Third-party UI steps (for example Azure portal / Entra admin center, Outlook desktop or mobile, the Microsoft 365 admin center) MUST be sourced **MCP-first, web-second**:
36
+
37
+ 1. Prefer an MCP documentation source (for example a Microsoft Learn MCP query) as the primary source.
38
+ 2. Use a web source (the vendor's current published documentation) only when no MCP source is available.
39
+ 3. Training data is NOT an acceptable sole source for any third-party UI step, because vendor UIs drift and stale navigation produces incorrect instructions.
40
+
41
+ Per OD-45-5, the MCP-first / web-second ordering is mandatory for third-party UI navigation. Non-UI CLI steps (for example `az` commands) do not require the UI ordering, but every step type — UI and CLI alike — MUST carry a current, dated citation in the Source-and-Citation section. A runbook step without a dated source is not contract-conformant.
42
+
43
+ ## Conformance
44
+
45
+ A runbook is contract-conformant when:
46
+
47
+ - it lives at `<FEATURE>/runbooks/<name>.runbook.md`,
48
+ - it contains all five required sections (Cue, Prerequisites, Step-by-step Instructions, Verification, Source and Citation),
49
+ - its Source-and-Citation section records at least one source URL and a capture date,
50
+ - third-party UI steps were sourced MCP-first / web-second.
51
+
52
+ A self-contained, conformant example is provided at `.claude/skills/human-exception-runbook/example.runbook.md`.