@danmoisan/drm-copilot-mcp 0.0.1

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 (380) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/out/mcp-server.js +17323 -0
  4. package/package.json +36 -0
  5. package/resources/claude-customizations/.claude/agent-memory/orchestrator/MEMORY.md +3 -0
  6. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_repo_root_is_source_of_truth.md +11 -0
  7. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_vsce_verify_package_location.md +19 -0
  8. package/resources/claude-customizations/.claude/agent-memory/orchestrator/project_extension_location.md +11 -0
  9. package/resources/claude-customizations/.claude/agent-memory/prd-feature/MEMORY.md +1 -0
  10. package/resources/claude-customizations/.claude/agent-memory/prd-feature/project_push_down_pattern.md +13 -0
  11. package/resources/claude-customizations/.claude/agent-memory/task-researcher/MEMORY.md +3 -0
  12. package/resources/claude-customizations/.claude/agent-memory/task-researcher/project_push_down_claude_dir.md +11 -0
  13. package/resources/claude-customizations/.claude/agents/atomic-executor.md +135 -0
  14. package/resources/claude-customizations/.claude/agents/atomic-planner.md +71 -0
  15. package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +69 -0
  16. package/resources/claude-customizations/.claude/agents/epic-review.md +40 -0
  17. package/resources/claude-customizations/.claude/agents/feature-review.md +136 -0
  18. package/resources/claude-customizations/.claude/agents/orchestrator.md +83 -0
  19. package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +80 -0
  20. package/resources/claude-customizations/.claude/agents/prd-feature.md +42 -0
  21. package/resources/claude-customizations/.claude/agents/python-typed-engineer.md +72 -0
  22. package/resources/claude-customizations/.claude/agents/staged-review.md +41 -0
  23. package/resources/claude-customizations/.claude/agents/status-updater.md +41 -0
  24. package/resources/claude-customizations/.claude/agents/task-researcher.md +81 -0
  25. package/resources/claude-customizations/.claude/agents/typescript-engineer.md +24 -0
  26. package/resources/claude-customizations/.claude/hooks/check-powershell-test-purity.ps1 +111 -0
  27. package/resources/claude-customizations/.claude/hooks/check-python-test-purity.ps1 +146 -0
  28. package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +150 -0
  29. package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +238 -0
  30. package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +147 -0
  31. package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +235 -0
  32. package/resources/claude-customizations/.claude/hooks/validate-bash.ps1 +69 -0
  33. package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +296 -0
  34. package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage.ps1 +389 -0
  35. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +141 -0
  36. package/resources/claude-customizations/.claude/hooks/validate-planner-output.ps1 +288 -0
  37. package/resources/claude-customizations/.claude/hooks/validate-required-artifact-output.ps1 +171 -0
  38. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +142 -0
  39. package/resources/claude-customizations/.claude/rules/csharp.md +62 -0
  40. package/resources/claude-customizations/.claude/rules/general-code-change.md +71 -0
  41. package/resources/claude-customizations/.claude/rules/general-unit-test.md +60 -0
  42. package/resources/claude-customizations/.claude/rules/powershell.md +97 -0
  43. package/resources/claude-customizations/.claude/rules/python-suppressions.md +143 -0
  44. package/resources/claude-customizations/.claude/rules/python.md +99 -0
  45. package/resources/claude-customizations/.claude/rules/self-explanatory-code-commenting.md +97 -0
  46. package/resources/claude-customizations/.claude/rules/tonality.md +80 -0
  47. package/resources/claude-customizations/.claude/rules/typescript-suppressions.md +66 -0
  48. package/resources/claude-customizations/.claude/rules/typescript.md +45 -0
  49. package/resources/claude-customizations/.claude/settings.json +144 -0
  50. package/resources/claude-customizations/.claude/skills/acceptance-criteria-tracking/SKILL.md +102 -0
  51. package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +189 -0
  52. package/resources/claude-customizations/.claude/skills/commit-message/SKILL.md +65 -0
  53. package/resources/claude-customizations/.claude/skills/csharp-change-budget-router/SKILL.md +90 -0
  54. package/resources/claude-customizations/.claude/skills/csharp-orchestration-state-machine/SKILL.md +58 -0
  55. package/resources/claude-customizations/.claude/skills/csharp-qa-gate/SKILL.md +77 -0
  56. package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +164 -0
  57. package/resources/claude-customizations/.claude/skills/execute-hard-lock/SKILL.md +82 -0
  58. package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +115 -0
  59. package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +167 -0
  60. package/resources/claude-customizations/.claude/skills/fill-feature-docs/SKILL.md +22 -0
  61. package/resources/claude-customizations/.claude/skills/invoke-csharp-engineer/SKILL.md +64 -0
  62. package/resources/claude-customizations/.claude/skills/invoke-powershell-engineer/SKILL.md +65 -0
  63. package/resources/claude-customizations/.claude/skills/invoke-python-engineer/SKILL.md +64 -0
  64. package/resources/claude-customizations/.claude/skills/make-skill-template/SKILL.md +147 -0
  65. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +132 -0
  66. package/resources/claude-customizations/.claude/skills/policy-audit-template-usage/SKILL.md +49 -0
  67. package/resources/claude-customizations/.claude/skills/policy-compliance-order/SKILL.md +40 -0
  68. package/resources/claude-customizations/.claude/skills/powershell-change-budget-router/SKILL.md +49 -0
  69. package/resources/claude-customizations/.claude/skills/powershell-orchestration-state-machine/SKILL.md +58 -0
  70. package/resources/claude-customizations/.claude/skills/powershell-qa-gate/SKILL.md +77 -0
  71. package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +50 -0
  72. package/resources/claude-customizations/.claude/skills/pr-base-branch-merge-base/SKILL.md +56 -0
  73. package/resources/claude-customizations/.claude/skills/pr-context-artifacts/SKILL.md +30 -0
  74. package/resources/claude-customizations/.claude/skills/python-change-budget-router/SKILL.md +79 -0
  75. package/resources/claude-customizations/.claude/skills/python-qa-gate/SKILL.md +77 -0
  76. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +40 -0
  77. package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +67 -0
  78. package/resources/claude-customizations/.claude/skills/review-epic/SKILL.md +21 -0
  79. package/resources/claude-customizations/.claude/skills/review-feature/SKILL.md +25 -0
  80. package/resources/claude-customizations/.claude/skills/review-staged/SKILL.md +21 -0
  81. package/resources/claude-customizations/.claude/skills/skill-canonical-location-audit/SKILL.md +49 -0
  82. package/resources/claude-customizations/.claude/skills/translate-copilot-to-claude/SKILL.md +295 -0
  83. package/resources/claude-customizations/.claude/skills/update-status/SKILL.md +21 -0
  84. package/resources/claude-dir-customizations/.mcp.json +8 -0
  85. package/resources/codex-and-agents-customizations/.agents/README.md +86 -0
  86. package/resources/codex-and-agents-customizations/.agents/skills/README.md +49 -0
  87. package/resources/codex-and-agents-customizations/.agents/skills/acceptance-criteria-tracking/SKILL.md +107 -0
  88. package/resources/codex-and-agents-customizations/.agents/skills/atomic-executor/SKILL.md +73 -0
  89. package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +194 -0
  90. package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +87 -0
  91. package/resources/codex-and-agents-customizations/.agents/skills/commit-message/SKILL.md +70 -0
  92. package/resources/codex-and-agents-customizations/.agents/skills/commit-message-conventions/SKILL.md +95 -0
  93. package/resources/codex-and-agents-customizations/.agents/skills/csharp/SKILL.md +67 -0
  94. package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +94 -0
  95. package/resources/codex-and-agents-customizations/.agents/skills/csharp-orchestration-state-machine/SKILL.md +64 -0
  96. package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +82 -0
  97. package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +168 -0
  98. package/resources/codex-and-agents-customizations/.agents/skills/execute-hard-lock/SKILL.md +88 -0
  99. package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +129 -0
  100. package/resources/codex-and-agents-customizations/.agents/skills/feature-review/SKILL.md +106 -0
  101. package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +181 -0
  102. package/resources/codex-and-agents-customizations/.agents/skills/fill-feature-docs/SKILL.md +27 -0
  103. package/resources/codex-and-agents-customizations/.agents/skills/invoke-csharp-engineer/SKILL.md +73 -0
  104. package/resources/codex-and-agents-customizations/.agents/skills/invoke-powershell-engineer/SKILL.md +74 -0
  105. package/resources/codex-and-agents-customizations/.agents/skills/invoke-python-engineer/SKILL.md +73 -0
  106. package/resources/codex-and-agents-customizations/.agents/skills/make-skill-template/SKILL.md +152 -0
  107. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +143 -0
  108. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +317 -0
  109. package/resources/codex-and-agents-customizations/.agents/skills/policy-audit-template-usage/SKILL.md +53 -0
  110. package/resources/codex-and-agents-customizations/.agents/skills/policy-compliance-order/SKILL.md +49 -0
  111. package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +102 -0
  112. package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +53 -0
  113. package/resources/codex-and-agents-customizations/.agents/skills/powershell-orchestration-state-machine/SKILL.md +64 -0
  114. package/resources/codex-and-agents-customizations/.agents/skills/powershell-qa-gate/SKILL.md +83 -0
  115. package/resources/codex-and-agents-customizations/.agents/skills/pr-author/SKILL.md +55 -0
  116. package/resources/codex-and-agents-customizations/.agents/skills/pr-authoring/SKILL.md +124 -0
  117. package/resources/codex-and-agents-customizations/.agents/skills/pr-base-branch-merge-base/SKILL.md +60 -0
  118. package/resources/codex-and-agents-customizations/.agents/skills/pr-context-artifacts/SKILL.md +34 -0
  119. package/resources/codex-and-agents-customizations/.agents/skills/python/SKILL.md +104 -0
  120. package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +84 -0
  121. package/resources/codex-and-agents-customizations/.agents/skills/python-qa-gate/SKILL.md +82 -0
  122. package/resources/codex-and-agents-customizations/.agents/skills/python-suppressions/SKILL.md +148 -0
  123. package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +49 -0
  124. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +142 -0
  125. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/agents/openai.yaml +5 -0
  126. package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +72 -0
  127. package/resources/codex-and-agents-customizations/.agents/skills/review-epic/SKILL.md +26 -0
  128. package/resources/codex-and-agents-customizations/.agents/skills/review-feature/SKILL.md +30 -0
  129. package/resources/codex-and-agents-customizations/.agents/skills/review-staged/SKILL.md +26 -0
  130. package/resources/codex-and-agents-customizations/.agents/skills/self-explanatory-code-commenting/SKILL.md +102 -0
  131. package/resources/codex-and-agents-customizations/.agents/skills/skill-canonical-location-audit/SKILL.md +52 -0
  132. package/resources/codex-and-agents-customizations/.agents/skills/translate-copilot-to-claude/SKILL.md +317 -0
  133. package/resources/codex-and-agents-customizations/.agents/skills/typescript/SKILL.md +50 -0
  134. package/resources/codex-and-agents-customizations/.agents/skills/typescript-suppressions/SKILL.md +71 -0
  135. package/resources/codex-and-agents-customizations/.agents/skills/update-status/SKILL.md +26 -0
  136. package/resources/codex-and-agents-customizations/.codex/agents/5.1-beast-adjusted.toml +23 -0
  137. package/resources/codex-and-agents-customizations/.codex/agents/5.1-thinking-beast-mode-adjusted.toml +23 -0
  138. package/resources/codex-and-agents-customizations/.codex/agents/api-architect.toml +23 -0
  139. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +151 -0
  140. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +93 -0
  141. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planning.toml +24 -0
  142. package/resources/codex-and-agents-customizations/.codex/agents/commentary-remediation.toml +23 -0
  143. package/resources/codex-and-agents-customizations/.codex/agents/commit-steward.toml +20 -0
  144. package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-executor.toml +24 -0
  145. package/resources/codex-and-agents-customizations/.codex/agents/csharp-atomic-planning.toml +25 -0
  146. package/resources/codex-and-agents-customizations/.codex/agents/csharp-orchestrator.toml +56 -0
  147. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +97 -0
  148. package/resources/codex-and-agents-customizations/.codex/agents/epic-review.toml +52 -0
  149. package/resources/codex-and-agents-customizations/.codex/agents/expert-nextjs-developer.toml +23 -0
  150. package/resources/codex-and-agents-customizations/.codex/agents/expert-react-frontend-engineer.toml +23 -0
  151. package/resources/codex-and-agents-customizations/.codex/agents/feature-review.toml +149 -0
  152. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +60 -0
  153. package/resources/codex-and-agents-customizations/.codex/agents/gpt-5-beast-mode.toml +23 -0
  154. package/resources/codex-and-agents-customizations/.codex/agents/hlbpa.toml +23 -0
  155. package/resources/codex-and-agents-customizations/.codex/agents/mentor.toml +23 -0
  156. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +121 -0
  157. package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-executor.toml +24 -0
  158. package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-planning.toml +25 -0
  159. package/resources/codex-and-agents-customizations/.codex/agents/powershell-di-unit-test-engineer.toml +24 -0
  160. package/resources/codex-and-agents-customizations/.codex/agents/powershell-orchestrator.toml +56 -0
  161. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +108 -0
  162. package/resources/codex-and-agents-customizations/.codex/agents/pr-author.toml +26 -0
  163. package/resources/codex-and-agents-customizations/.codex/agents/prd-feature.toml +53 -0
  164. package/resources/codex-and-agents-customizations/.codex/agents/prd.toml +23 -0
  165. package/resources/codex-and-agents-customizations/.codex/agents/pytest-unit-test-coding.toml +24 -0
  166. package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-executor.toml +24 -0
  167. package/resources/codex-and-agents-customizations/.codex/agents/python-atomic-planning.toml +25 -0
  168. package/resources/codex-and-agents-customizations/.codex/agents/python-execution-only-typed.toml +24 -0
  169. package/resources/codex-and-agents-customizations/.codex/agents/python-orchestrator.toml +54 -0
  170. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +100 -0
  171. package/resources/codex-and-agents-customizations/.codex/agents/staged-review.toml +53 -0
  172. package/resources/codex-and-agents-customizations/.codex/agents/status-updater.toml +53 -0
  173. package/resources/codex-and-agents-customizations/.codex/agents/task-researcher.toml +103 -0
  174. package/resources/codex-and-agents-customizations/.codex/agents/tdd-green.toml +23 -0
  175. package/resources/codex-and-agents-customizations/.codex/agents/tdd-red.toml +23 -0
  176. package/resources/codex-and-agents-customizations/.codex/agents/tdd-refactor.toml +23 -0
  177. package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer.toml +48 -0
  178. package/resources/codex-and-agents-customizations/.codex/agents/voidbeast-gpt41enhanced.toml +23 -0
  179. package/resources/codex-and-agents-customizations/.codex/codex-web-setup.plan.md +26 -0
  180. package/resources/codex-and-agents-customizations/.codex/codex-web-setup.sh +384 -0
  181. package/resources/codex-and-agents-customizations/.codex/config.toml +137 -0
  182. package/resources/codex-and-agents-customizations/.codex/hooks/check-powershell-test-purity.ps1 +113 -0
  183. package/resources/codex-and-agents-customizations/.codex/hooks/check-python-test-purity.ps1 +149 -0
  184. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-evidence-locations.ps1 +153 -0
  185. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +241 -0
  186. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +150 -0
  187. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +238 -0
  188. package/resources/codex-and-agents-customizations/.codex/hooks/validate-bash.ps1 +72 -0
  189. package/resources/codex-and-agents-customizations/.codex/hooks/validate-feature-review-coverage.ps1 +265 -0
  190. package/resources/codex-and-agents-customizations/.codex/prompts/feature-review-remediate.md +10 -0
  191. package/resources/codex-and-agents-customizations/.codex/prompts/generate-commit-message-repo.md +11 -0
  192. package/resources/codex-and-agents-customizations/.codex/prompts/generate-pr.md +15 -0
  193. package/resources/codex-and-agents-customizations/.codex/prompts/orchestrate-work.md +22 -0
  194. package/resources/codex-and-agents-customizations/AGENTS.md +317 -0
  195. package/resources/customizations/.github/agents/5.1-Beast-adjusted.agent.md +181 -0
  196. package/resources/customizations/.github/agents/5.1-Thinking-Beast-Mode-adjusted.agent.md +361 -0
  197. package/resources/customizations/.github/agents/Powershell DI Unit Test Engineer.agent.md +192 -0
  198. package/resources/customizations/.github/agents/api-architect.agent.md +40 -0
  199. package/resources/customizations/.github/agents/atomic_executor.agent.md +251 -0
  200. package/resources/customizations/.github/agents/atomic_planning.agent.md +658 -0
  201. package/resources/customizations/.github/agents/commentary-remediation.agent.md +35 -0
  202. package/resources/customizations/.github/agents/commit-steward.agent.md +200 -0
  203. package/resources/customizations/.github/agents/csharp-atomic-executor.agent.md +288 -0
  204. package/resources/customizations/.github/agents/csharp-atomic-planning.agent.md +354 -0
  205. package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +375 -0
  206. package/resources/customizations/.github/agents/csharp-typed-engineer.agent.md +285 -0
  207. package/resources/customizations/.github/agents/epic-review.agent.md +374 -0
  208. package/resources/customizations/.github/agents/expert-nextjs-developer.agent.md +477 -0
  209. package/resources/customizations/.github/agents/expert-react-frontend-engineer.agent.md +739 -0
  210. package/resources/customizations/.github/agents/feature-review.agent.md +49 -0
  211. package/resources/customizations/.github/agents/gpt-5-beast-mode.agent.md +116 -0
  212. package/resources/customizations/.github/agents/hlbpa.agent.md +219 -0
  213. package/resources/customizations/.github/agents/mentor.agent.md +32 -0
  214. package/resources/customizations/.github/agents/orchestrator.agent.md +449 -0
  215. package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +287 -0
  216. package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +647 -0
  217. package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +382 -0
  218. package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +293 -0
  219. package/resources/customizations/.github/agents/pr-author.agent.md +138 -0
  220. package/resources/customizations/.github/agents/prd-feature.agent.md +52 -0
  221. package/resources/customizations/.github/agents/prd.agent.md +202 -0
  222. package/resources/customizations/.github/agents/pytest-unit-test-coding.agent.md +202 -0
  223. package/resources/customizations/.github/agents/python-atomic-executor.agent.md +289 -0
  224. package/resources/customizations/.github/agents/python-atomic-planning.agent.md +429 -0
  225. package/resources/customizations/.github/agents/python-execution-only-typed.agent.md +217 -0
  226. package/resources/customizations/.github/agents/python-orchestrator.agent.md +380 -0
  227. package/resources/customizations/.github/agents/python-typed-engineer.agent.md +271 -0
  228. package/resources/customizations/.github/agents/staged-review.agent.md +246 -0
  229. package/resources/customizations/.github/agents/status_updater.agent.md +279 -0
  230. package/resources/customizations/.github/agents/task-researcher.agent.md +298 -0
  231. package/resources/customizations/.github/agents/tdd-green.agent.md +60 -0
  232. package/resources/customizations/.github/agents/tdd-red.agent.md +66 -0
  233. package/resources/customizations/.github/agents/tdd-refactor.agent.md +94 -0
  234. package/resources/customizations/.github/agents/typescript-engineer.agent.md +167 -0
  235. package/resources/customizations/.github/agents/voidbeast-gpt41enhanced.agent.md +230 -0
  236. package/resources/customizations/.github/codex/execute-hard-lock.prompt.md +105 -0
  237. package/resources/customizations/.github/codex/resume-hard-lock.prompt.md +92 -0
  238. package/resources/customizations/.github/copilot-instructions.md +7 -0
  239. package/resources/customizations/.github/instructions/csharp-code-change.instructions.md +184 -0
  240. package/resources/customizations/.github/instructions/csharp-unit-test.instructions.md +52 -0
  241. package/resources/customizations/.github/instructions/general-code-change.instructions.md +290 -0
  242. package/resources/customizations/.github/instructions/general-unit-test.instructions.md +106 -0
  243. package/resources/customizations/.github/instructions/github-actions-ci-cd-best-practices.instructions.md +607 -0
  244. package/resources/customizations/.github/instructions/github-actions.instructions.md +23 -0
  245. package/resources/customizations/.github/instructions/powershell-code-change.instructions.md +81 -0
  246. package/resources/customizations/.github/instructions/powershell-unit-test.instructions.md +69 -0
  247. package/resources/customizations/.github/instructions/python-code-change.instructions.md +232 -0
  248. package/resources/customizations/.github/instructions/python-suppressions.instructions.md +609 -0
  249. package/resources/customizations/.github/instructions/python-unit-test.instructions.md +71 -0
  250. package/resources/customizations/.github/instructions/self-explanatory-code-commenting.instructions.md +238 -0
  251. package/resources/customizations/.github/instructions/tonality.instructions.md +133 -0
  252. package/resources/customizations/.github/instructions/typescript-code-change.instructions.md +203 -0
  253. package/resources/customizations/.github/instructions/typescript-suppressions.instructions.md +157 -0
  254. package/resources/customizations/.github/instructions/typescript-unit-test.instructions.md +112 -0
  255. package/resources/customizations/.github/prompts/add-educational-comments.prompt.md +129 -0
  256. package/resources/customizations/.github/prompts/breakdown-bug-prd.prompt.md +29 -0
  257. package/resources/customizations/.github/prompts/breakdown-epic-arch.prompt.md +66 -0
  258. package/resources/customizations/.github/prompts/breakdown-epic-pm.prompt.md +58 -0
  259. package/resources/customizations/.github/prompts/breakdown-feature-implementation.prompt.md +128 -0
  260. package/resources/customizations/.github/prompts/breakdown-feature-prd.prompt.md +61 -0
  261. package/resources/customizations/.github/prompts/code-exemplars-blueprint-generator.prompt.md +126 -0
  262. package/resources/customizations/.github/prompts/drafts/create-github-issues-feature-from-implementation-plan.prompt.md +28 -0
  263. package/resources/customizations/.github/prompts/drafts/create-implementation-plan.prompt.md +158 -0
  264. package/resources/customizations/.github/prompts/drafts/create-technical-spike.prompt.md +231 -0
  265. package/resources/customizations/.github/prompts/drafts/potential-feature-prd.prompt.md +19 -0
  266. package/resources/customizations/.github/prompts/drafts/update-implementation-plan.prompt.md +158 -0
  267. package/resources/customizations/.github/prompts/execute-plan-template.md +21 -0
  268. package/resources/customizations/.github/prompts/export-chat.prompt.md +7 -0
  269. package/resources/customizations/.github/prompts/fillout-prd-feature.prompt.md +46 -0
  270. package/resources/customizations/.github/prompts/generate-atomic-plan.prompt.md +96 -0
  271. package/resources/customizations/.github/prompts/generate-commit-message-repo.prompt.md +108 -0
  272. package/resources/customizations/.github/prompts/generate-pr.prompt.md +151 -0
  273. package/resources/customizations/.github/prompts/javascript-typescript-jest.prompt.md +44 -0
  274. package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +66 -0
  275. package/resources/customizations/.github/prompts/orchestrate-powershell-work.prompt.md +50 -0
  276. package/resources/customizations/.github/prompts/orchestrate-python-work.prompt.md +50 -0
  277. package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +66 -0
  278. package/resources/customizations/.github/prompts/remediate-comments.prompt.md +53 -0
  279. package/resources/customizations/.github/prompts/research-issue.prompt.md +125 -0
  280. package/resources/customizations/.github/prompts/review-epic.prompt.md +94 -0
  281. package/resources/customizations/.github/prompts/review-feature.prompt.md +130 -0
  282. package/resources/customizations/.github/prompts/review-staged.prompt.md +43 -0
  283. package/resources/customizations/.github/prompts/update_status.prompt.md +68 -0
  284. package/resources/customizations/.github/skills/README.md +26 -0
  285. package/resources/customizations/.github/skills/acceptance-criteria-tracking/SKILL.md +102 -0
  286. package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +174 -0
  287. package/resources/customizations/.github/skills/csharp-change-budget-router/SKILL.md +48 -0
  288. package/resources/customizations/.github/skills/csharp-orchestration-state-machine/SKILL.md +57 -0
  289. package/resources/customizations/.github/skills/evidence-and-timestamp-conventions/SKILL.md +135 -0
  290. package/resources/customizations/.github/skills/feature-promotion-lifecycle/SKILL.md +121 -0
  291. package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +153 -0
  292. package/resources/customizations/.github/skills/make-skill-template/SKILL.md +147 -0
  293. package/resources/customizations/.github/skills/policy-audit-template-usage/SKILL.md +48 -0
  294. package/resources/customizations/.github/skills/policy-compliance-order/SKILL.md +37 -0
  295. package/resources/customizations/.github/skills/powershell-change-budget-router/SKILL.md +48 -0
  296. package/resources/customizations/.github/skills/powershell-orchestration-state-machine/SKILL.md +57 -0
  297. package/resources/customizations/.github/skills/pr-base-branch-merge-base/SKILL.md +55 -0
  298. package/resources/customizations/.github/skills/pr-context-artifacts/SKILL.md +29 -0
  299. package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +39 -0
  300. package/resources/customizations/.github/skills/skill-canonical-location-audit/SKILL.md +48 -0
  301. package/resources/feature-templates/bug/plan.yyyy-MM-ddTHH-mm.md +44 -0
  302. package/resources/feature-templates/bug/potential_bug.md +59 -0
  303. package/resources/feature-templates/bug/spec.md +99 -0
  304. package/resources/feature-templates/epic/initiative.md +43 -0
  305. package/resources/feature-templates/feature/plan.yyyy-MM-ddTHH-mm.md +53 -0
  306. package/resources/feature-templates/feature/spec.md +66 -0
  307. package/resources/feature-templates/feature/user-story.md +42 -0
  308. package/resources/feature-templates/potential/template.md +33 -0
  309. package/resources/feature-templates/refactor/plan.yyyy-MM-ddTHH-mm.md +52 -0
  310. package/resources/feature-templates/refactor/spec.md +69 -0
  311. package/resources/powershell/PoshQC/PoshQC.Analyzer.psm1 +254 -0
  312. package/resources/powershell/PoshQC/PoshQC.FileDiscovery.psm1 +138 -0
  313. package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +409 -0
  314. package/resources/powershell/PoshQC/PoshQC.psd1 +31 -0
  315. package/resources/powershell/PoshQC/PoshQC.psm1 +101 -0
  316. package/resources/powershell/PoshQC/README.md +80 -0
  317. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +59 -0
  318. package/resources/powershell/PoshQC/settings/pssa.settings.psd1 +55 -0
  319. package/resources/scripts/dev_tools/__init__.py +0 -0
  320. package/resources/scripts/dev_tools/agentic_sync.py +819 -0
  321. package/resources/scripts/dev_tools/codex_native_converter/__init__.py +11 -0
  322. package/resources/scripts/dev_tools/codex_native_converter/__main__.py +6 -0
  323. package/resources/scripts/dev_tools/codex_native_converter/cli.py +11 -0
  324. package/resources/scripts/dev_tools/new_active_feature_folder.py +79 -0
  325. package/resources/scripts/dev_tools/new_active_feature_folder_docs.py +268 -0
  326. package/resources/scripts/dev_tools/new_active_feature_folder_flow.py +366 -0
  327. package/resources/scripts/dev_tools/new_active_feature_folder_io.py +306 -0
  328. package/resources/scripts/dev_tools/new_active_feature_folder_markdown.py +252 -0
  329. package/resources/scripts/dev_tools/new_active_feature_folder_models.py +136 -0
  330. package/resources/scripts/dev_tools/new_potential_bug_entry.py +465 -0
  331. package/resources/scripts/dev_tools/potential_to_issue.py +421 -0
  332. package/resources/scripts/dev_tools/potential_to_issue_content.py +212 -0
  333. package/resources/scripts/dev_tools/pr_context/__init__.py +0 -0
  334. package/resources/scripts/dev_tools/pr_context/collector.py +619 -0
  335. package/resources/scripts/dev_tools/pr_context/feature_docs.py +349 -0
  336. package/resources/scripts/dev_tools/pr_context/git.py +153 -0
  337. package/resources/scripts/dev_tools/pr_context/github.py +549 -0
  338. package/resources/scripts/dev_tools/pr_context/models.py +198 -0
  339. package/resources/scripts/dev_tools/pr_context/render.py +342 -0
  340. package/resources/scripts/dev_tools/pr_context/render_feature_excerpts.py +256 -0
  341. package/resources/scripts/dev_tools/pr_context/render_pr_helpers.py +291 -0
  342. package/resources/scripts/dev_tools/pr_context/summary_helpers.py +386 -0
  343. package/resources/scripts/dev_tools/pr_context/verification_evidence.py +171 -0
  344. package/resources/scripts/dev_tools/prompt_mode_contract.py +152 -0
  345. package/resources/scripts/dev_tools/push_down_claude_customizations.py +188 -0
  346. package/resources/scripts/dev_tools/push_down_codex_and_agents_customizations.py +139 -0
  347. package/resources/scripts/dev_tools/push_down_copilot_customizations.py +504 -0
  348. package/resources/scripts/dev_tools/push_down_copilot_customizations_filesystem.py +217 -0
  349. package/resources/scripts/dev_tools/push_down_copilot_customizations_rewrites.py +293 -0
  350. package/resources/scripts/dev_tools/resolve_file_prompt.py +457 -0
  351. package/resources/scripts/dev_tools/resolve_hard_lock_prompt.py +444 -0
  352. package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +554 -0
  353. package/resources/templates/codex_native_converter.py +35 -0
  354. package/resources/templates/collect_commit_context.py +212 -0
  355. package/resources/templates/collect_pr_context.py +74 -0
  356. package/resources/templates/hello_pwsh.ps1 +3 -0
  357. package/resources/templates/hello_python.py +11 -0
  358. package/resources/templates/link-parent-child.ps1 +480 -0
  359. package/resources/templates/new-claude-worktree-session.ps1 +232 -0
  360. package/resources/templates/new-potential-entry.ps1 +187 -0
  361. package/resources/templates/new_active_feature_folder.py +67 -0
  362. package/resources/templates/new_potential_bug_entry.py +54 -0
  363. package/resources/templates/policy_audit/AGENTS.md +117 -0
  364. package/resources/templates/policy_audit/code-review.yyyy-MM-ddTHH-mm.md +165 -0
  365. package/resources/templates/policy_audit/feature-audit.yyyy-MM-ddTHH-mm.md +124 -0
  366. package/resources/templates/policy_audit/policy-audit.yyyy-MM-ddTHH-mm.md +649 -0
  367. package/resources/templates/potential_to_issue.py +55 -0
  368. package/resources/templates/push_down_claude_customizations.py +188 -0
  369. package/resources/templates/push_down_codex_and_agents_customizations.py +95 -0
  370. package/resources/templates/push_down_copilot_customizations.py +124 -0
  371. package/resources/templates/resolve_atomic_plan_prompt.py +75 -0
  372. package/resources/templates/resolve_hard_lock_prompt.py +65 -0
  373. package/resources/templates/run-poshqc-analyze-autofix.ps1 +16 -0
  374. package/resources/templates/run-poshqc-analyze.ps1 +26 -0
  375. package/resources/templates/run-poshqc-format.ps1 +26 -0
  376. package/resources/templates/run-poshqc-suite.ps1 +24 -0
  377. package/resources/templates/run-poshqc-test.ps1 +32 -0
  378. package/resources/templates/sync-agents-from-instructions.ps1 +400 -0
  379. package/resources/templates/validate_orchestration_artifacts.py +55 -0
  380. package/resources/templates/vscode-cli.helpers.ps1 +63 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ paths:
3
+ - "**"
4
+ description: Cross-language code change policy. Applies to all files.
5
+ ---
6
+
7
+ # General Code Change Policy
8
+
9
+ This rule file summarizes the cross-language code change policy for this repository.
10
+
11
+ ## Design Principles
12
+
13
+ Apply these priorities in order when designing or changing code:
14
+
15
+ 1. **Simplicity first** — Prefer the simplest design that works and is readable. Avoid cleverness and deep indirection.
16
+ 2. **Reusability** — Factor out logic that is clearly reusable. Avoid copy-paste; share behavior via composition or helper methods.
17
+ 3. **Extensibility** — Design public APIs so they can be extended without breaking callers. Prefer keyword-style parameters with defaults. Prefer composition over inheritance. Use interfaces/abstract types/protocols to support multiple implementations.
18
+ 4. **Separation of concerns** — Keep pure logic (transforms, calculations, parsing) separate from I/O (disk, network, DB), UI/CLI, and framework-specific glue.
19
+
20
+ ## Classes, Functions, and APIs
21
+
22
+ - Create a class when: there is a clear domain concept with data + behavior, state and invariants must travel together, multiple implementations behind an interface are expected, or a multi-step workflow shares context.
23
+ - Create a standalone function when: the operation is pure, stateless, and simple; it is a small helper that does not naturally belong on a domain class; or it is a simple transformation from inputs to outputs.
24
+ - Keep methods small and focused. Avoid god objects.
25
+ - Use interfaces/abstract types/protocols when multiple implementations are likely.
26
+
27
+ ## Mandatory Toolchain Loop
28
+
29
+ Run the full toolchain in this exact order and repeat until all steps pass in a single pass:
30
+
31
+ 1. **Formatting** (e.g., Black, Prettier, CSharpier, Invoke-Formatter)
32
+ 2. **Linting** (e.g., Ruff, ESLint, PSScriptAnalyzer, .NET analyzers)
33
+ 3. **Type checking** (e.g., Pyright, TSC, nullable analysis; skip for PowerShell)
34
+ 4. **Testing** (e.g., Pytest, Jest, MSTest, Pester)
35
+
36
+ **Restart from step 1** if any step fails or auto-fixes any files. Do not stop the loop until all four steps complete without errors in a single pass.
37
+
38
+ ## File Size Limit
39
+
40
+ - No production code, test code, or reusable script file may exceed **500 lines**.
41
+ - Exceptions: temporary throwaway scripts created and deleted within an agent session; raw text fixtures for language-processing test data; Markdown documentation files.
42
+
43
+ ## Error Handling and Logging
44
+
45
+ - **Fail fast and explicitly**: raise or return clear, specific errors when invariants are violated.
46
+ - Do not silently ignore errors. Do not use broad catch-all handlers unless you immediately re-raise or propagate with added context.
47
+ - Use the project's established logging pattern. Log at appropriate levels (`debug`, `info`, `warning`, `error`).
48
+ - Enforce invariants at construction/initialization time.
49
+ - Use assertions only for internal sanity checks, not user-facing error handling.
50
+
51
+ ## Naming
52
+
53
+ - Names must be descriptive. Abbreviations are acceptable only when they are standard (`id`, `url`, `db`).
54
+ - Language-specific conventions: `snake_case` for Python functions/variables, `PascalCase` for Python classes, `camelCase` for TypeScript/C# locals, `PascalCase` for TypeScript/C# types and public members.
55
+
56
+ ## Public APIs and Compatibility
57
+
58
+ - Prefer keyword-style parameters with defaults.
59
+ - Prefer composition over inheritance when possible.
60
+ - Avoid breaking public APIs. If a breaking change is necessary, update all callers in-repo and call it out clearly in the change description.
61
+
62
+ ## Dependencies
63
+
64
+ - Use only libraries already approved in the project unless explicitly told to add more.
65
+ - If adding a dependency is unavoidable, choose a well-maintained, widely used package and document why it is required.
66
+
67
+ ## I/O Boundaries
68
+
69
+ - Isolate I/O (disk, network, APIs) into specific classes or modules.
70
+ - Core domain logic must be testable without touching the network or filesystem.
71
+ - Use of temporary files within tests is strictly prohibited.
@@ -0,0 +1,60 @@
1
+ ---
2
+ paths:
3
+ - "**"
4
+ description: Cross-language unit test policy. Applies to all files.
5
+ ---
6
+
7
+ # General Unit Test Policy
8
+
9
+ This rule file summarizes the cross-language unit test policy for this repository.
10
+
11
+ ## Core Principles
12
+
13
+ Every unit test must satisfy all five of these properties:
14
+
15
+ 1. **Independence** — Tests must be able to run in any order without impacting each other.
16
+ 2. **Isolation** — Each unit test targets a single function, method, or unit of behavior so failures clearly identify the faulty unit.
17
+ 3. **Fast execution** — Tests must be fast enough to support frequent runs and rapid feedback loops.
18
+ 4. **Determinism** — Given the same inputs and environment, tests must produce the same results. Avoid flakiness.
19
+ 5. **Readability and maintainability** — Test names, structure, and assertions must be clear and easy to understand.
20
+
21
+ ## Coverage Requirements
22
+
23
+ - **Repository-wide line coverage must remain >= 80%.**
24
+ - **Any new module, class, or method must target >= 90% coverage.**
25
+ - Code changes or refactors must not reduce coverage for the lines that were changed.
26
+ - Coverage is a supporting metric, not the sole quality gate. Untested critical behavior is not acceptable even if the overall percentage looks good.
27
+ - Configure coverage tooling to exclude test files (e.g., `tests/`) so metrics reflect application code, not tests.
28
+
29
+ ## Scenario Completeness
30
+
31
+ For each unit or behavior, tests must cover:
32
+
33
+ - Positive flows with valid inputs
34
+ - Negative flows for invalid or missing inputs
35
+ - Edge cases and boundary conditions
36
+ - Error-handling behavior
37
+ - Concurrency behavior when relevant
38
+ - State transitions for stateful components
39
+
40
+ ## Test Structure — Arrange–Act–Assert
41
+
42
+ Organize each test into three sections:
43
+
44
+ - **Arrange** — set up inputs, environment, and dependencies
45
+ - **Act** — execute the behavior under test
46
+ - **Assert** — verify outcomes via assertions
47
+
48
+ Assertions must produce clear, actionable failure messages.
49
+
50
+ ## External Dependencies
51
+
52
+ - Unit tests must not depend on external services (databases, networks, remote APIs, external processes).
53
+ - Use mocks, stubs, or fakes to isolate the unit under test when code interacts with external systems.
54
+ - **Creation and use of temporary files in tests is strictly prohibited.**
55
+ - Tests must not rely on mutable global state or external configuration that can change between runs.
56
+
57
+ ## Documentation
58
+
59
+ - Each test must clearly communicate its purpose via a descriptive name and/or a short docstring or comment summarizing the scenario and expected outcome.
60
+ - Group related tests logically within the same file or test class.
@@ -0,0 +1,97 @@
1
+ ---
2
+ paths:
3
+ - "**/*.ps1"
4
+ - "**/*.psm1"
5
+ - "**/*.psd1"
6
+ description: PowerShell-specific toolchain and coding standards.
7
+ ---
8
+
9
+ # PowerShell Code Standards
10
+
11
+ This rule file summarizes the PowerShell-specific policies for this repository.
12
+
13
+ ## Toolchain
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`
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`.
19
+
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
+
22
+ ## Compatibility
23
+
24
+ - All scripts must be compatible with **PowerShell 7+** (enforced via PSScriptAnalyzer settings).
25
+
26
+ ## Coding Standards
27
+
28
+ - Prefer **advanced functions** with `CmdletBinding()` and named parameters.
29
+ - Add `[Parameter(Mandatory = $true)]` and validation attributes where appropriate.
30
+ - Implement **ShouldProcess/SupportsShouldProcess** for state-changing actions.
31
+ - Avoid global state and mutable script-scoped variables; pass data explicitly.
32
+ - Avoid `Invoke-Expression`, plaintext secrets, and hard-coded credentials/paths.
33
+ - Use `Write-Error`/`throw` for failures; avoid silent catch-alls.
34
+ - Use approved verbs and descriptive nouns for function names (PSScriptAnalyzer enforces this).
35
+ - Keep scripts cohesive and under 500 lines.
36
+
37
+ ## Change Budget
38
+
39
+ - Direct-mode overall scope: up to 2 production PowerShell files (plus corresponding tests). Requests exceeding this must be routed to `powershell-orchestrator` per `powershell-change-budget-router`.
40
+ - Per-batch cap in all modes: at most 3 production files and 3 test files unless an explicit override has been approved.
41
+ - If a batch would exceed the cap, split the work into smaller batches.
42
+
43
+ ## Design Seams (Minimal DI)
44
+
45
+ Introduce the smallest seam that enables reliable mocking. Apply these options in order:
46
+
47
+ 1. **Wrapper function seam (preferred)** — extract external executable calls into a wrapper function:
48
+ - Signature: `Invoke-<Tool>Exe -<Tool>Args <string[]>` (for example `Invoke-GitExe -GitArgs <string[]>`).
49
+ - The wrapper accepts a single array parameter and splats into the executable: `git @GitArgs 2>&1`.
50
+ - Parameter names must not be `Args` (automatic variable collision). Use `GitArgs`, `ToolArgs`, or `Arguments`.
51
+ 2. **Injectable delegate / ScriptBlock seam** — only when a wrapper is insufficient, add a narrowly-scoped optional delegate or `ScriptBlock` parameter with a safe default. Do not introduce generic runner frameworks.
52
+ 3. **Adapter seams for non-executable boundaries** — for filesystem, environment, or clock dependencies, introduce tiny helpers or narrow injectable parameters rather than threading raw I/O through domain logic.
53
+
54
+ ## Testing Standards
55
+
56
+ - Use **Pester** (v5.x) as the test framework.
57
+ - Organize tests to mirror code structure (e.g., `tests/scripts/dev-tools/ScriptName.Tests.ps1`).
58
+ - Name test files `*.Tests.ps1`.
59
+ - Use `Describe`/`Context`/`It` blocks; one behavior per `It`.
60
+ - Write focused tests exercising a single function or behavior.
61
+ - Mock sparingly; prefer real code paths.
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.
65
+ - Coverage regression on changed lines is a blocking finding.
66
+
67
+ ### Deterministic Test Requirements
68
+
69
+ Tests must not depend on:
70
+
71
+ - network access,
72
+ - mutable machine PATH or profile state,
73
+ - implicit working-directory assumptions,
74
+ - external services or live executables.
75
+
76
+ Tests must produce identical results in Terminal and the VS Code Test Explorer. Assume a different PATH, current working directory, profile, and host when tests are run from Test Explorer; do not rely on ambient environment resolution.
77
+
78
+ ### Mocking Rules
79
+
80
+ 1. **External executable mocking** — never mock `git`, `gh`, `actionlint`, or other executables directly. Mock the wrapper function (for example `Invoke-GitExe`) instead.
81
+ 2. **Mock signature parity** — mock signatures must match production named parameters exactly. Example:
82
+ - production: `Invoke-GitExe -GitArgs $gitArgs`
83
+ - test mock: `param([string[]]$GitArgs)`
84
+ 3. **Mock registration order** — register mocks before the code under test can resolve commands, so Test Explorer parity is preserved.
85
+ 4. **AST/ScriptBlock import order** — when importing script functions via AST or `ScriptBlock` patterns:
86
+ - dot-source the returned `ScriptBlock` in the test scope,
87
+ - import dependencies in the correct order,
88
+ - import wrapper seams before mocking them when executable calls exist.
89
+
90
+ ## Prohibited Behaviors
91
+
92
+ - Broad refactors across unrelated scripts or modules.
93
+ - Introducing generic process-runner frameworks to replace the wrapper seam pattern.
94
+ - Creating PSScriptAnalyzer debt and deferring cleanup.
95
+ - Weakening assertions merely to make tests pass.
96
+ - Adding sleeps, retries, or timing hacks to stabilize flaky tests.
97
+ - Claiming success without running the required toolchain.
@@ -0,0 +1,143 @@
1
+ ---
2
+ paths:
3
+ - "**/*.py"
4
+ description: Pre-authorized Python Ruff and Pyright suppression patterns. Applies to Python files.
5
+ ---
6
+
7
+ # Python Suppression Policy
8
+
9
+ This rule file summarizes the suppression authorization policy for Python code.
10
+
11
+ ## Authorization Requirement
12
+
13
+ All `# noqa` and `# type: ignore` suppressions must either:
14
+ 1. **Match a pre-authorized pattern** defined in this file, OR
15
+ 2. **Have explicit user approval** for that specific suppression.
16
+
17
+ **Escalation path before requesting approval:**
18
+ 1. First, attempt to resolve the error without a suppression (refactor, restructure, use approved patterns).
19
+ 2. If that fails, try at least five more distinct approaches.
20
+ 3. Continue iterating until you solve the problem or clearly demonstrate why each approach fails.
21
+ 4. Only after multiple documented failed attempts may you request user approval, providing: the specific rule/error code, each approach tried and why it failed, and why a suppression is the only remaining option.
22
+
23
+ ## Pre-Authorized `# noqa` Patterns
24
+
25
+ ### S603 — Subprocess with validated executable
26
+
27
+ **When authorized:** Subprocess calls where the executable is validated via `shutil.which()` before use.
28
+
29
+ **Required comment format:** `# noqa: S603 - static analysis can't verify runtime validation`
30
+
31
+ **Rationale:** Cross-platform compatibility requires runtime PATH resolution. Static analysis cannot trace the runtime validation, but the code is safe because the executable path is resolved from PATH (not user input), existence is verified before use, and hardcoding platform-specific paths would break portability.
32
+
33
+ ---
34
+
35
+ ### ARG002 — Unused method argument in test mocks
36
+
37
+ **When authorized:** Test mock/stub implementations that must match interface signatures but do not use all parameters. Must be in test code (`tests/` directory) implementing a known interface.
38
+
39
+ **Required comment format:** `# noqa: ARG002 - mock API signature` or `# noqa: ARG002 - match [InterfaceName] API`
40
+
41
+ ---
42
+
43
+ ### B008 — Function call in default argument (Typer)
44
+
45
+ **When authorized:** Typer CLI option declarations where `Option()` must be evaluated at import time for CLI metadata. Must be a Typer option declaration in a CLI function signature.
46
+
47
+ **Required comment format:** `# noqa: B008 - Typer framework pattern`
48
+
49
+ ---
50
+
51
+ ### TCH002 / TCH003 — Type checking block violations
52
+
53
+ **When authorized:** Modules used for both runtime and type hints (pytest fixtures, Typer type hints, runtime `isinstance` checks). The module must be used at runtime and cannot be moved to a `TYPE_CHECKING` block without breaking functionality.
54
+
55
+ **Required comment format:** `# noqa: TCH002 - [module] required at runtime for [reason]` or `# noqa: TCH003 - [module] required at runtime for [reason]`
56
+
57
+ ---
58
+
59
+ ### S310 — URL open with urllib (trusted endpoints)
60
+
61
+ **When authorized:** Accessing documented, trusted HTTPS API endpoints with timeout. URL must be a validated HTTPS endpoint, domain must be a documented trusted source, timeout must be set, and the URL must not come from user input.
62
+
63
+ **Required comment format:** `# noqa: S310 - trusted HTTPS endpoint: [domain]`
64
+
65
+ ---
66
+
67
+ ### S314 — XML parsing with ElementTree (trusted sources)
68
+
69
+ **When authorized:** Parsing user's own local files (EPUB, configuration) or known-safe data sources (Wikipedia dumps, curated datasets). Must NOT be parsing untrusted network data.
70
+
71
+ **Required comment format:** `# noqa: S314 - parsing trusted [source type]`
72
+
73
+ ---
74
+
75
+ ### BLE001 — Blind except (CLI entry points only)
76
+
77
+ **When authorized:** Top-level CLI exception handlers for user-friendly error messages and clean exits. Must be at a CLI entry point, must log or display the error with context, and must exit cleanly. NOT allowed in library or internal code.
78
+
79
+ **Required comment format:** `# noqa: BLE001 - CLI top-level error handling`
80
+
81
+ ---
82
+
83
+ ### S301 — Pickle deserialization (trusted model artifacts)
84
+
85
+ **When authorized:** Loading known model artifacts from hardcoded trusted local paths. Path must be hardcoded or validated (not from user input or CLI args). Only for ML model/artifact loading.
86
+
87
+ **Required comment format:** `# noqa: S301 - trusted model artifact from hardcoded path`
88
+
89
+ ---
90
+
91
+ ### S108 / S105 — Hardcoded paths/passwords in tests only
92
+
93
+ **When authorized:** Test fixtures with example paths and test data literals. Must be in test code only. Not actual secrets or production paths.
94
+
95
+ **Required comment format:** `# noqa: S108 - test fixture path` or `# noqa: S105 - test fixture data`
96
+
97
+ ---
98
+
99
+ ## Pre-Authorized `# type: ignore` Patterns
100
+
101
+ ### import-untyped — Optional third-party dependency without stubs
102
+
103
+ **When authorized:** Optional third-party dependencies that lack type stubs or `py.typed` marker. Import must be in a `try/except ImportError` block; library must be optional; no type stubs available; library lacks `py.typed` marker.
104
+
105
+ **Required comment format:** `# type: ignore[import-untyped]` with a comment on the same or adjacent line explaining the library and why stubs are absent.
106
+
107
+ ---
108
+
109
+ ## Explicitly Not Authorized (with Required Workarounds)
110
+
111
+ ### S110 — `try`-`except`-`pass` fallback chains
112
+
113
+ **Not authorized.** Use explicit platform detection via `shutil.which()` or environment variable checks instead. `try`-`except`-`pass` chains hide lazy design and make behavior unpredictable.
114
+
115
+ **Workaround:** Resolve the correct method at design time using `shutil.which()` for executables or explicit platform detection. Cache the result to avoid repeated detection overhead.
116
+
117
+ ---
118
+
119
+ ### TID252 — Relative imports beyond top-level package
120
+
121
+ **Not authorized.** Use absolute imports (`from project.module import Thing`) instead of parent-relative imports (`from ..module import`).
122
+
123
+ ---
124
+
125
+ ### S607 — Starting process with partial executable path
126
+
127
+ **Not authorized.** Resolve executables via `shutil.which()` first; use the full path returned by `which()`. This satisfies both S607 and the pre-authorized S603 pattern.
128
+
129
+ ---
130
+
131
+ ### D401, F401, UP017
132
+
133
+ **Not authorized.** Fix the root cause: rewrite docstrings in imperative mood (D401), remove unused imports (F401), and use timezone-aware datetime (UP017).
134
+
135
+ ---
136
+
137
+ ## Policy Enforcement Checklist
138
+
139
+ Before using any suppression, verify:
140
+ - [ ] Pattern exactly matches a pre-authorized pattern above.
141
+ - [ ] Required comment format is used verbatim.
142
+ - [ ] All contextual requirements are met (e.g., in tests/, validated path, try/except block).
143
+ - [ ] Suppression scope is as narrow as possible (single line, not file-level).
@@ -0,0 +1,99 @@
1
+ ---
2
+ paths:
3
+ - "**/*.py"
4
+ description: Python-specific toolchain and coding standards.
5
+ ---
6
+
7
+ # Python Code Standards
8
+
9
+ This rule file summarizes the Python-specific policies for this repository.
10
+
11
+ ## Toolchain
12
+
13
+ 1. **Formatting — Black**: All Python code must be formatted with Black (default settings). Command: `poetry run black .`
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
+ 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`
17
+
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
+
20
+ If the environment prevents running tools, stop implementation and provide a plan and proposed diffs only, clearly marked **unverified**.
21
+
22
+ ## Coding Standards
23
+
24
+ - **PEP 8 naming**: `snake_case` for functions/methods/variables, `PascalCase` for classes/exceptions, `CONSTANT_CASE` for module constants.
25
+ - **Strong typing**: All public functions and methods must have full type hints for parameters and return values.
26
+ - **Dataclasses**: Prefer `@dataclass` for value objects. Use `frozen=True` where appropriate. Enforce invariants in `__post_init__` (dataclasses) or `__init__`.
27
+ - **Protocols**: Use `typing.Protocol` or `abc.ABC` when multiple implementations are expected.
28
+ - **Imports**: Prefer absolute imports. Avoid circular dependencies.
29
+ - **Error handling**: Fail fast with specific exceptions. Avoid broad `except:` or `except Exception:` without context. Reserve broad handlers for well-defined boundaries (CLI/entrypoints) with context logging.
30
+ - **Assertions**: Use `assert` only for internal sanity checks, not for user-facing validation.
31
+ - **Logging**: Use the standard `logging` module. No ad-hoc `print` statements for permanent behavior.
32
+
33
+ ## Python Design Rules
34
+
35
+ ### Small, cohesive modules
36
+
37
+ - Each class or module has one clear purpose. Avoid grab-bag utilities.
38
+ - Prefer explicit names and straightforward control flow.
39
+ - Keep the public surface area small. Internal helpers are `_prefixed` or live in `_internal` modules.
40
+
41
+ ### Classes vs functions
42
+
43
+ Create a class when at least one of the following is true:
44
+
45
+ - A clear domain concept with data and behavior.
46
+ - State and invariants must travel together.
47
+ - Multiple implementations behind a common interface are expected.
48
+ - A multi-step workflow shares context across steps.
49
+
50
+ Create a standalone function when:
51
+
52
+ - The operation is pure, stateless, and simple.
53
+ - It is a small helper that does not naturally belong on a specific domain class.
54
+ - It is a simple transformation from inputs to outputs.
55
+
56
+ Keep methods small and focused. Avoid god objects that know about too many unrelated concerns. Avoid long, deeply branching functions; factor logic into smaller helpers.
57
+
58
+ ### Strong typing by default (Pyright-clean)
59
+
60
+ - All public functions, methods, and constructors must have complete type hints.
61
+ - Avoid `Any`. If unavoidable, isolate it by wrapping untyped libraries behind small typed adapters.
62
+ - Use line-specific `# type: ignore[...]` only when justified with a brief comment.
63
+ - Prefer `typing.Protocol` (or `abc.ABC`) only when multiple implementations are expected.
64
+
65
+ ### Dependency seams (testability without frameworks)
66
+
67
+ Introduce the smallest seam that enables reliable testing:
68
+
69
+ - Inject collaborators via constructor parameters (preferred).
70
+ - Accept optional callables with sensible defaults for time/randomness (for example, `clock: Callable[[], datetime] = datetime.now`).
71
+ - Extract boundary interactions into a tiny helper function and patch that helper in tests.
72
+
73
+ Do not introduce generic service-locator patterns or heavy dependency-injection frameworks.
74
+
75
+ ## Pytest Rules
76
+
77
+ - Use **Pytest** as the test runner.
78
+ - One behavior per test. Follow Arrange–Act–Assert structure.
79
+ - Use descriptive `test_...` function names.
80
+ - Prefer behavioral assertions over implementation detail.
81
+ - Use `pytest.mark.parametrize` for boundary matrices.
82
+ - Fixtures should be narrow by default (function scope unless justified).
83
+ - Mock sparingly; prefer real pure code paths. Use `monkeypatch` for environment variables and module attributes.
84
+ - Patch at the **import location used by the unit under test**, not where a symbol originated.
85
+ - No sleeps, retries, or timing hacks.
86
+ - Organize tests to mirror code structure (for example, `tests/test_module_name.py` for `module_name.py`).
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.
90
+ - Coverage regression on changed lines is a blocking finding.
91
+
92
+ ## Prohibited Behaviors
93
+
94
+ - Broad refactors across multiple modules outside the approved scope.
95
+ - Adding new dependencies without explicit user instruction.
96
+ - Reducing typing strictness to make Pyright pass.
97
+ - Weakening tests to make them pass (removing assertions, overbroad exception checks).
98
+ - Using runtime temp files or external services in unit tests.
99
+ - Claiming success without running the toolchain.
@@ -0,0 +1,97 @@
1
+ ---
2
+ paths:
3
+ - "**/*.py"
4
+ description: Intent-first docstring and commenting standards. Applies to Python files.
5
+ ---
6
+
7
+ # Code Commenting and Docstring Policy
8
+
9
+ This rule file summarizes the code commenting and docstring requirements for Python code in this repository.
10
+
11
+ ## Core Principle
12
+
13
+ Write code that is readable, but assume the maintainer may not know the intent. Docstrings are mandatory for classes and functions. Inline comments explain intent, flow, and decision logic — especially around iteration and branching. Avoid low-value comments that merely narrate the obvious.
14
+
15
+ ## Mandatory Class Docstrings
16
+
17
+ Every class must have a docstring covering, at minimum:
18
+
19
+ - **Purpose**: what the class represents or coordinates.
20
+ - **Responsibilities**: what it does and does not do (scope boundaries).
21
+ - **Usage**: lifecycle, typical call pattern, and collaboration with other objects.
22
+ - **High-level flow**: the main steps the class performs or orchestrates.
23
+ - **Key invariants/constraints**: expectations that must hold (e.g., sorted inputs, caching semantics).
24
+ - **Important side effects**: I/O, persistence, network calls, mutation, concurrency.
25
+ - **Attributes** (when non-obvious): what the stored fields mean and how they are populated.
26
+
27
+ Preferred docstring style: Google-style with `Args:`, `Returns:`, `Raises:`, and `Attributes:` sections where applicable.
28
+
29
+ ## Mandatory Function and Method Docstrings
30
+
31
+ Every function and method (including private helpers) must have a docstring that includes:
32
+
33
+ - **Purpose and behavior**: what it accomplishes.
34
+ - **Parameters**: meaning, constraints, and how used (types included, even when type hints are present).
35
+ - **Returns**: meaning and shape of the return value (or explicitly state `None` for procedures).
36
+ - **Raises**: key exceptions that are part of the contract (not every incidental exception, but contract-relevant ones).
37
+ - **Side effects**: if it mutates inputs, writes to disk/DB, emits events, etc.
38
+
39
+ Keep docstrings accurate and contract-oriented. If behavior changes, docstrings must be updated. If a method is a thin wrapper, say so explicitly and explain why the wrapper exists.
40
+
41
+ ## Loops and Comprehensions — Intent Comments Required
42
+
43
+ Every `for` loop, `while` loop, and non-trivial list/dict/set comprehension must have an **intent comment immediately above it** explaining what the loop accomplishes and why.
44
+
45
+ - If the intent of a comprehension cannot be explained clearly in one short comment, prefer expanding to an explicit loop with a comment.
46
+ - Line-by-line narration of trivial loop counters is not required; explain the purpose of the iteration as a whole.
47
+
48
+ ## Branching — Decision-Logic Comments Required
49
+
50
+ For any conditional branching beyond a trivial guard clause, add a comment that explains:
51
+
52
+ - The decision criteria (what distinguishes branches).
53
+ - Why the ordering matters (if it does).
54
+ - The business/system rationale for why this branching exists.
55
+
56
+ This applies to `if`/`elif`/`else` chains and `match`/`case` statements. For `match/case`, include a short "routing table" explanation of what each case handle.
57
+
58
+ ## Multi-Step Blocks — Meta-What Comments
59
+
60
+ When a sequence of tactical lines collectively accomplishes a larger goal, precede the block with a **meta-what + why comment** that describes the overall purpose of the block and the rationale for its approach.
61
+
62
+ If the block is substantial, strongly prefer extracting it into a helper method with its own docstring.
63
+
64
+ ## 6) Do not number notes
65
+
66
+ In code comments and docstrings, **do not** use fragile numbered notes like:
67
+
68
+ * `NOTE 1: ...`
69
+ * `NOTE 2: ...`
70
+
71
+ Prefer comments without tags for general explanations. But if a tag is necessary (e.g. follow-up is needed), use unnumbered tags instead:
72
+
73
+ * `TODO: ...`
74
+ * `WARNING: ...`
75
+ * `PERF: ...`
76
+ * `SECURITY: ...`
77
+
78
+ ## Meta-What vs. Narration
79
+
80
+ - **Allowed:** Comments that describe the intent and purpose of a loop, branch, or multi-step block.
81
+ - **Prohibited:** Line-by-line narration that merely restates what a single obvious line does.
82
+
83
+ Example of prohibited narration: `# increment counter` above `count += 1`
84
+
85
+ Example of allowed meta-what: `# Walk all changed files and collect those that exceed the size limit for the report` above a filtering loop.
86
+
87
+ ## Quality Checklist
88
+
89
+ Before finalizing code:
90
+
91
+ - [ ] Docstrings exist for every class and every function/method.
92
+ - [ ] Docstrings explain purpose, usage, flow, args, returns, and contract-level raises/side effects.
93
+ - [ ] Loops and comprehensions have intent comments (or are expanded for clarity).
94
+ - [ ] Branching has decision-logic comments.
95
+ - [ ] Multi-step blocks have meta-what + rationale comments above them.
96
+ - [ ] No numbered notes (`NOTE 1:`, `NOTE 2:`) appear in comments or docstrings.
97
+ - [ ] Comments remain accurate and add real explanatory value.
@@ -0,0 +1,80 @@
1
+ ---
2
+ paths:
3
+ - "**"
4
+ description: Required communication tone policy. Applies to all files and responses.
5
+ ---
6
+
7
+ # Tonality Policy
8
+
9
+ This rule file summarizes the required tone policy for all agent-authored content in this repository.
10
+
11
+ ## Required Professional Tone
12
+
13
+ All written output must use a professional tone. Professional tone means:
14
+
15
+ - Clear, direct, and factual language.
16
+ - Neutral businesslike phrasing.
17
+ - Measured statements that match the available evidence.
18
+ - Concise explanations that prioritize clarity over personality.
19
+ - Respectful wording, even when reporting defects, regressions, or disagreements.
20
+
21
+ Preferred characteristics: specific rather than vague; literal rather than theatrical; calm rather than excited; precise rather than promotional.
22
+
23
+ ## Humor and Joking — Prohibited
24
+
25
+ Do not use jokes, banter, playful remarks, sarcasm, puns, or comedic phrasing.
26
+
27
+ This prohibition includes:
28
+ - Lighthearted commentary intended to entertain.
29
+ - Winking or self-aware jokes about tools, code, bugs, or the development process.
30
+ - Casual filler that weakens a formal or operational message.
31
+ - Mocking, teasing, or exaggerated "fun" framing, even when mild.
32
+
33
+ When deciding between a playful sentence and a plain sentence, use the plain sentence.
34
+
35
+ ## Hyperbole — Prohibited
36
+
37
+ Do not use hyperbolic, inflated, or sensational language. Avoid:
38
+
39
+ - Claims that something is perfect, flawless, amazing, incredible, revolutionary, or world-class (unless directly quoting an authoritative source and clearly marking it as a quotation).
40
+ - Overstated certainty that goes beyond the verified evidence.
41
+ - Dramatic framing that overstates urgency, difficulty, simplicity, risk, or impact.
42
+
43
+ Use measured alternatives: replace absolute praise with evidence-based descriptions; replace dramatic warnings with specific risks and consequences; replace sweeping claims with concrete observations.
44
+
45
+ ## Metaphors — Tightly Restricted
46
+
47
+ Metaphor, analogy, and figurative language are not the default style. They may be used only when ALL of the following are true:
48
+
49
+ 1. The metaphor is strictly utilitarian.
50
+ 2. It is required to explain a technical concept that would otherwise be less clear.
51
+ 3. It improves accuracy or comprehension for the intended audience.
52
+ 4. It is brief, literal in effect, and not decorative.
53
+
54
+ If a concept can be explained clearly without metaphor, do not use metaphor.
55
+
56
+ ## Evidence-First Wording
57
+
58
+ Match the strength of the wording to the strength of the evidence:
59
+
60
+ - If something was verified, say it was verified and state how.
61
+ - If something is likely but unconfirmed, say that it is likely or appears to be the case.
62
+ - If something is unknown, say that it is unknown.
63
+ - Do not imply certainty, completion, safety, or correctness without support.
64
+
65
+ ## Difficult Messages
66
+
67
+ When reporting failures, defects, or policy violations:
68
+ - State the issue directly.
69
+ - Describe the impact without dramatizing it.
70
+ - Identify the next corrective action when available.
71
+ - Avoid blame-oriented or emotionally charged wording.
72
+
73
+ When giving recommendations:
74
+ - Prefer imperative, concrete language.
75
+ - Explain the rationale briefly when it is not obvious.
76
+ - Avoid motivational language, sales language, or celebratory phrasing.
77
+
78
+ ## Final Rule
79
+
80
+ When tone is uncertain, choose the more restrained phrasing. The repository default is professionalism, clarity, and accuracy — not entertainment, flourish, or hype.