@danmoisan/drm-copilot-mcp 1.1.22 → 1.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/out/mcp-server.js +18758 -12030
  2. package/package.json +1 -1
  3. package/resources/claude-customizations/.claude/agent-memory/orchestrator/MEMORY.md +1 -1
  4. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_test_files_count_against_500_cap.md +4 -4
  5. package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +1 -1
  6. package/resources/claude-customizations/.claude/agents/discovery-capability-sentinel.md +34 -0
  7. package/resources/claude-customizations/.claude/agents/feature-review.md +8 -0
  8. package/resources/claude-customizations/.claude/agents/legacy-parity-analyst.md +101 -43
  9. package/resources/claude-customizations/.claude/agents/migration-coverage-reviewer.md +107 -43
  10. package/resources/claude-customizations/.claude/agents/orchestrator.md +1 -1
  11. package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +60 -6
  12. package/resources/claude-customizations/.claude/agents/parallel-planner.md +21 -1
  13. package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +1 -1
  14. package/resources/claude-customizations/.claude/agents/pr-author.md +48 -7
  15. package/resources/claude-customizations/.claude/agents/python-typed-engineer.md +1 -1
  16. package/resources/claude-customizations/.claude/agents/requirements-reconciler.md +117 -42
  17. package/resources/claude-customizations/.claude/agents/runtime-characterization-analyst.md +103 -43
  18. package/resources/claude-customizations/.claude/hooks/discovery-capability-probe.ps1 +102 -0
  19. package/resources/claude-customizations/.claude/hooks/enforce-discovery-artifact-gate.ps1 +69 -194
  20. package/resources/claude-customizations/.claude/hooks/enforce-discovery-planning-gate.ps1 +87 -0
  21. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate-green-ci.ps1 +325 -0
  22. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +29 -7
  23. package/resources/claude-customizations/.claude/hooks/enforce-epic-worktree-removal-gate-resolution.ps1 +23 -10
  24. package/resources/claude-customizations/.claude/hooks/enforce-epic-worktree-removal-gate.ps1 +29 -21
  25. package/resources/claude-customizations/.claude/hooks/enforce-file-size-limit.ps1 +244 -0
  26. package/resources/claude-customizations/.claude/hooks/enforce-model-routing-receipt.ps1 +51 -0
  27. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +168 -48
  28. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +1 -1
  29. package/resources/claude-customizations/.claude/hooks/enforce-parallel-worktree-removal-gate.ps1 +22 -11
  30. package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +59 -20
  31. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-command-allowlist.ps1 +51 -4
  32. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill-helpers.ps1 +72 -11
  33. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.current-branch.ps1 +149 -0
  34. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1 +4 -2
  35. package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +59 -20
  36. package/resources/claude-customizations/.claude/hooks/record-discovery-agent-start.ps1 +132 -0
  37. package/resources/claude-customizations/.claude/hooks/validate-discovery-artifact-gate.ps1 +56 -212
  38. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output-feature-folder.ps1 +146 -0
  39. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output-rejection.ps1 +172 -0
  40. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +34 -4
  41. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadius.psm1 +9 -3
  42. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusAggregate.psm1 +154 -0
  43. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusCombination.psm1 +228 -0
  44. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusExtraction.psm1 +1 -0
  45. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusNormalization.psm1 +4 -2
  46. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusScheduling.psm1 +63 -16
  47. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusTokenShape.psm1 +56 -1
  48. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusWriteIntent.psm1 +4 -1
  49. package/resources/claude-customizations/.claude/lib/cleanup-manifest/CleanupWorktreeManifest.psm1 +33 -6
  50. package/resources/claude-customizations/.claude/lib/codex-routing/CodexDeployment.psm1 +5 -1
  51. package/resources/claude-customizations/.claude/lib/codex-routing/CodexDiscoveryRouting.psm1 +161 -0
  52. package/resources/claude-customizations/.claude/lib/codex-routing/CodexTopology.psm1 +25 -2
  53. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthority.psd1 +90 -0
  54. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthority.psm1 +493 -0
  55. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthorization.psm1 +479 -0
  56. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryCapability.psm1 +468 -0
  57. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryEncoding.psm1 +156 -0
  58. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryManifest.psm1 +384 -0
  59. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryObservation.psm1 +217 -0
  60. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryPayload.psm1 +276 -0
  61. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryPlanning.psm1 +336 -0
  62. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryRootGrant.psm1 +164 -0
  63. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStart.psm1 +440 -0
  64. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStartRecord.psm1 +296 -0
  65. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStop.psm1 +336 -0
  66. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryToolRouting.psm1 +228 -0
  67. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryValidation.psm1 +188 -341
  68. package/resources/claude-customizations/.claude/lib/file-size-policy/FileSizePolicy.psm1 +434 -0
  69. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateFeatureFolderRecord.psm1 +166 -0
  70. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateIssueAdoption.psm1 +8 -3
  71. package/resources/claude-customizations/.claude/lib/worktree-resolution/HookTargetWorktree.psm1 +391 -0
  72. package/resources/claude-customizations/.claude/lib/worktree-resolution/WorktreeRunRecordPath.psm1 +185 -0
  73. package/resources/claude-customizations/.claude/lib/worktree-resolution/WorktreeRunResolution.psm1 +11 -21
  74. package/resources/claude-customizations/.claude/rules/general-code-change.md +4 -1
  75. package/resources/claude-customizations/.claude/rules/orchestrator-state.md +29 -5
  76. package/resources/claude-customizations/.claude/rules/parallel-orchestration.md +152 -20
  77. package/resources/claude-customizations/.claude/rules/powershell.md +1 -1
  78. package/resources/claude-customizations/.claude/rules/shell.md +1 -1
  79. package/resources/claude-customizations/.claude/settings.json +36 -3
  80. package/resources/claude-customizations/.claude/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
  81. package/resources/claude-customizations/.claude/skills/characterize-runtime-behavior/SKILL.md +134 -0
  82. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/SKILL.md +2 -2
  83. package/resources/claude-customizations/.claude/skills/discovery-behavior-reconciliation/SKILL.md +28 -47
  84. package/resources/claude-customizations/.claude/skills/discovery-coverage-ledger/SKILL.md +32 -48
  85. package/resources/claude-customizations/.claude/skills/discovery-parity-matrix/SKILL.md +28 -45
  86. package/resources/claude-customizations/.claude/skills/discovery-repo-inventory/SKILL.md +28 -62
  87. package/resources/claude-customizations/.claude/skills/discovery-runtime-characterization/SKILL.md +28 -45
  88. package/resources/claude-customizations/.claude/skills/discovery-validate-artifacts/SKILL.md +28 -61
  89. package/resources/claude-customizations/.claude/skills/discovery-workflow/SKILL.md +55 -139
  90. package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +25 -10
  91. package/resources/claude-customizations/.claude/skills/extract-feature-contract/SKILL.md +133 -0
  92. package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +1 -0
  93. package/resources/claude-customizations/.claude/skills/generate-acceptance-scenarios/SKILL.md +132 -0
  94. package/resources/claude-customizations/.claude/skills/initialize-discovery-workspace/SKILL.md +131 -0
  95. package/resources/claude-customizations/.claude/skills/inventory-legacy-system/SKILL.md +131 -0
  96. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +15 -7
  97. package/resources/claude-customizations/.claude/skills/parallel-add/SKILL.md +25 -2
  98. package/resources/claude-customizations/.claude/skills/parallel-close/SKILL.md +11 -1
  99. package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +124 -14
  100. package/resources/claude-customizations/.claude/skills/parallel-plan/SKILL.md +72 -7
  101. package/resources/claude-customizations/.claude/skills/parallel-remove/SKILL.md +15 -0
  102. package/resources/claude-customizations/.claude/skills/parallel-run/SKILL.md +6 -0
  103. package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +56 -9
  104. package/resources/claude-customizations/.claude/skills/reconcile-parity-matrix/SKILL.md +131 -0
  105. package/resources/claude-customizations/.claude/skills/review-discovery-coverage/SKILL.md +129 -0
  106. package/resources/claude-customizations/.claude/skills/validate-discovery-artifacts/SKILL.md +127 -0
  107. package/resources/claude-customizations/.claude-variants/csharp-legacy/agents/csharp-typed-engineer.md +1 -1
  108. package/resources/claude-customizations/config/blast-radius.json +6 -5
  109. package/resources/claude-customizations/config/orchestration-routing.json +61 -1
  110. package/resources/claude-customizations/pack-manifests/core.json +40 -1
  111. package/resources/codex-and-agents-customizations/.agents/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
  112. package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +7 -0
  113. package/resources/codex-and-agents-customizations/.agents/skills/characterize-runtime-behavior/SKILL.md +134 -0
  114. package/resources/codex-and-agents-customizations/.agents/skills/discovery-behavior-reconciliation/SKILL.md +46 -0
  115. package/resources/codex-and-agents-customizations/.agents/skills/discovery-coverage-ledger/SKILL.md +50 -0
  116. package/resources/codex-and-agents-customizations/.agents/skills/discovery-parity-matrix/SKILL.md +46 -0
  117. package/resources/codex-and-agents-customizations/.agents/skills/discovery-repo-inventory/SKILL.md +46 -0
  118. package/resources/codex-and-agents-customizations/.agents/skills/discovery-runtime-characterization/SKILL.md +46 -0
  119. package/resources/codex-and-agents-customizations/.agents/skills/discovery-validate-artifacts/SKILL.md +46 -0
  120. package/resources/codex-and-agents-customizations/.agents/skills/discovery-workflow/SKILL.md +62 -0
  121. package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +25 -10
  122. package/resources/codex-and-agents-customizations/.agents/skills/extract-feature-contract/SKILL.md +133 -0
  123. package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +1 -1
  124. package/resources/codex-and-agents-customizations/.agents/skills/feature-review/SKILL.md +8 -0
  125. package/resources/codex-and-agents-customizations/.agents/skills/general-code-change/SKILL.md +4 -1
  126. package/resources/codex-and-agents-customizations/.agents/skills/generate-acceptance-scenarios/SKILL.md +132 -0
  127. package/resources/codex-and-agents-customizations/.agents/skills/initialize-discovery-workspace/SKILL.md +131 -0
  128. package/resources/codex-and-agents-customizations/.agents/skills/inventory-legacy-system/SKILL.md +131 -0
  129. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +8 -0
  130. package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +1 -1
  131. package/resources/codex-and-agents-customizations/.agents/skills/reconcile-parity-matrix/SKILL.md +131 -0
  132. package/resources/codex-and-agents-customizations/.agents/skills/review-discovery-coverage/SKILL.md +129 -0
  133. package/resources/codex-and-agents-customizations/.agents/skills/validate-discovery-artifacts/SKILL.md +127 -0
  134. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c1.toml +1 -1
  135. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c2.toml +1 -1
  136. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3-elevated.toml +1 -1
  137. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3.toml +1 -1
  138. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c4.toml +1 -1
  139. package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +1 -1
  140. package/resources/codex-and-agents-customizations/.codex/agents/discovery-capability-sentinel.toml +51 -0
  141. package/resources/codex-and-agents-customizations/.codex/agents/feature-review.toml +8 -0
  142. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c1.toml +148 -0
  143. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c2.toml +148 -0
  144. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c3-elevated.toml +148 -0
  145. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c3.toml +148 -0
  146. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c4.toml +148 -0
  147. package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst.toml +148 -0
  148. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c1.toml +154 -0
  149. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c2.toml +154 -0
  150. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c3-elevated.toml +154 -0
  151. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c3.toml +154 -0
  152. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c4.toml +154 -0
  153. package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer.toml +154 -0
  154. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c1.toml +1 -1
  155. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c2.toml +1 -1
  156. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3-elevated.toml +1 -1
  157. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3.toml +1 -1
  158. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c4.toml +1 -1
  159. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
  160. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c1.toml +1 -1
  161. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c2.toml +1 -1
  162. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3-elevated.toml +1 -1
  163. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3.toml +1 -1
  164. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c4.toml +1 -1
  165. package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +1 -1
  166. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c1.toml +164 -0
  167. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c2.toml +164 -0
  168. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c3-elevated.toml +164 -0
  169. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c3.toml +164 -0
  170. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c4.toml +164 -0
  171. package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler.toml +164 -0
  172. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c1.toml +150 -0
  173. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c2.toml +150 -0
  174. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c3-elevated.toml +150 -0
  175. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c3.toml +150 -0
  176. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c4.toml +150 -0
  177. package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst.toml +150 -0
  178. package/resources/codex-and-agents-customizations/.codex/config.toml +39 -3
  179. package/resources/codex-and-agents-customizations/.codex/hooks/codex-agent-profile-attestation.ps1 +22 -0
  180. package/resources/codex-and-agents-customizations/.codex/hooks/discovery-capability-probe.ps1 +97 -0
  181. package/resources/codex-and-agents-customizations/.codex/hooks/discovery-start-attestation.ps1 +171 -0
  182. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-codex-model-routing.ps1 +4 -1
  183. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-discovery-artifact-gate.ps1 +187 -0
  184. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-discovery-planning-gate.ps1 +149 -0
  185. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-file-size-limit.ps1 +282 -0
  186. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +239 -2
  187. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +6 -15
  188. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +54 -15
  189. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +54 -15
  190. package/resources/codex-and-agents-customizations/.codex/hooks/file-size-policy.ps1 +421 -0
  191. package/resources/codex-and-agents-customizations/.codex/hooks/hook-target-worktree.ps1 +369 -0
  192. package/resources/codex-and-agents-customizations/.codex/hooks/record-subagent-routing-attestation.ps1 +8 -0
  193. package/resources/codex-and-agents-customizations/.codex/hooks/validate-codex-subagent-routing.ps1 +22 -1
  194. package/resources/codex-and-agents-customizations/.codex/hooks/validate-discovery-agent-output.ps1 +178 -0
  195. package/resources/codex-and-agents-customizations/.codex/scripts/Resolve-CodexTopology.ps1 +11 -1
  196. package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +1 -1
  197. package/resources/codex-and-agents-customizations/AGENTS.md +4 -1
  198. package/resources/codex-and-agents-customizations/pack-manifests/core.json +65 -1
  199. package/resources/config/orchestration-routing.json +61 -1
  200. package/resources/customizations/.github/agents/commentary-remediation.agent.md +1 -1
  201. package/resources/customizations/.github/agents/discovery-capability-sentinel.agent.md +34 -0
  202. package/resources/customizations/.github/agents/legacy-parity-analyst.agent.md +122 -0
  203. package/resources/customizations/.github/agents/migration-coverage-reviewer.agent.md +128 -0
  204. package/resources/customizations/.github/agents/python-execution-only-typed.agent.md +1 -1
  205. package/resources/customizations/.github/agents/python-typed-engineer.agent.md +1 -1
  206. package/resources/customizations/.github/agents/requirements-reconciler.agent.md +138 -0
  207. package/resources/customizations/.github/agents/runtime-characterization-analyst.agent.md +124 -0
  208. package/resources/customizations/.github/hooks/discovery-agent-start.ps1 +139 -0
  209. package/resources/customizations/.github/hooks/discovery-agent-stop.ps1 +123 -0
  210. package/resources/customizations/.github/hooks/discovery-capability-probe.ps1 +98 -0
  211. package/resources/customizations/.github/hooks/discovery-planning.ps1 +91 -0
  212. package/resources/customizations/.github/hooks/discovery-pre-tool.ps1 +123 -0
  213. package/resources/customizations/.github/hooks/discovery.json +35 -0
  214. package/resources/customizations/.github/instructions/general-code-change.instructions.md +5 -2
  215. package/resources/customizations/.github/instructions/mermaid.instructions.md +85 -0
  216. package/resources/customizations/.github/instructions/powershell-code-change.instructions.md +1 -1
  217. package/resources/customizations/.github/prompts/execute-hard-lock.prompt.md +105 -0
  218. package/resources/customizations/.github/prompts/remediate-comments.prompt.md +1 -1
  219. package/resources/customizations/.github/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
  220. package/resources/customizations/.github/skills/characterize-runtime-behavior/SKILL.md +134 -0
  221. package/resources/customizations/.github/skills/discovery-behavior-reconciliation/SKILL.md +46 -0
  222. package/resources/customizations/.github/skills/discovery-coverage-ledger/SKILL.md +50 -0
  223. package/resources/customizations/.github/skills/discovery-parity-matrix/SKILL.md +46 -0
  224. package/resources/customizations/.github/skills/discovery-repo-inventory/SKILL.md +46 -0
  225. package/resources/customizations/.github/skills/discovery-runtime-characterization/SKILL.md +46 -0
  226. package/resources/customizations/.github/skills/discovery-validate-artifacts/SKILL.md +46 -0
  227. package/resources/customizations/.github/skills/discovery-workflow/SKILL.md +62 -0
  228. package/resources/customizations/.github/skills/execution-environment/SKILL.md +25 -10
  229. package/resources/customizations/.github/skills/extract-feature-contract/SKILL.md +133 -0
  230. package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +8 -0
  231. package/resources/customizations/.github/skills/generate-acceptance-scenarios/SKILL.md +132 -0
  232. package/resources/customizations/.github/skills/initialize-discovery-workspace/SKILL.md +131 -0
  233. package/resources/customizations/.github/skills/inventory-legacy-system/SKILL.md +131 -0
  234. package/resources/customizations/.github/skills/reconcile-parity-matrix/SKILL.md +131 -0
  235. package/resources/customizations/.github/skills/review-discovery-coverage/SKILL.md +129 -0
  236. package/resources/customizations/.github/skills/validate-discovery-artifacts/SKILL.md +127 -0
  237. package/resources/lib/codex-routing/CodexDeployment.psm1 +5 -1
  238. package/resources/lib/codex-routing/CodexDiscoveryRouting.psm1 +161 -0
  239. package/resources/lib/codex-routing/CodexTopology.psm1 +25 -2
  240. package/resources/lib/discovery-validation/DiscoveryAuthority.psd1 +90 -0
  241. package/resources/lib/discovery-validation/DiscoveryAuthority.psm1 +493 -0
  242. package/resources/lib/discovery-validation/DiscoveryAuthorization.psm1 +479 -0
  243. package/resources/lib/discovery-validation/DiscoveryCapability.psm1 +468 -0
  244. package/resources/lib/discovery-validation/DiscoveryEncoding.psm1 +156 -0
  245. package/resources/lib/discovery-validation/DiscoveryManifest.psm1 +384 -0
  246. package/resources/lib/discovery-validation/DiscoveryObservation.psm1 +217 -0
  247. package/resources/lib/discovery-validation/DiscoveryPayload.psm1 +276 -0
  248. package/resources/lib/discovery-validation/DiscoveryPlanning.psm1 +336 -0
  249. package/resources/lib/discovery-validation/DiscoveryRootGrant.psm1 +164 -0
  250. package/resources/lib/discovery-validation/DiscoveryStart.psm1 +440 -0
  251. package/resources/lib/discovery-validation/DiscoveryStartRecord.psm1 +296 -0
  252. package/resources/lib/discovery-validation/DiscoveryStop.psm1 +336 -0
  253. package/resources/lib/discovery-validation/DiscoveryToolRouting.psm1 +228 -0
  254. package/resources/powershell/PoshQC/PoshQC.Parallel.psm1 +452 -0
  255. package/resources/powershell/PoshQC/PoshQC.Shard.psm1 +106 -8
  256. package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +12 -0
  257. package/resources/powershell/PoshQC/PoshQC.psd1 +6 -1
  258. package/resources/powershell/PoshQC/PoshQC.psm1 +7 -1
  259. package/resources/powershell/PoshQC/README.md +20 -1
  260. package/resources/templates/policy_audit/code-review.yyyy-MM-ddTHH-mm.md +4 -4
  261. package/resources/templates/policy_audit/policy-audit.yyyy-MM-ddTHH-mm.md +4 -4
@@ -0,0 +1,91 @@
1
+ <#
2
+ .SYNOPSIS
3
+ GitHub Copilot (VS Code local harness) PreToolUse hook that gates planner and orchestrator launches on discovery authority.
4
+
5
+ .DESCRIPTION
6
+ Registered through .github/hooks/*.json. The hook reads the Copilot PreToolUse
7
+ envelope from stdin (camelCase keys, snake_case accepted), recognizes an
8
+ atomic-planner or orchestrator launch, and takes its decision from the shared
9
+ DiscoveryPlanning module under .claude/lib/discovery-validation:
10
+
11
+ - a call that is not a planner or orchestrator launch, and a workspace without
12
+ a protected discovery activation, are allowed so existing behavior continues;
13
+ - an active workspace must still hold the activated locator and domain profile
14
+ and the protected session must hold a current, passing, gateway-written
15
+ planning-mode receipt for this host and session; otherwise the launch is
16
+ denied with the DISCOVERY_PLANNING_GATE_BLOCKED: prefix.
17
+
18
+ A helper that fails to load and an envelope that cannot be read both deny with
19
+ the prefix; the hook never fails open and never runs Python.
20
+
21
+ .NOTES
22
+ Issue #980. Requires PowerShell 7+. Invokes NO external process.
23
+ #>
24
+ [CmdletBinding()]
25
+ param()
26
+
27
+ $script:DiscoveryPlanningReasonPrefix = 'DISCOVERY_PLANNING_GATE_BLOCKED:'
28
+ $script:DiscoveryPlanningDependencyFailures = [System.Collections.Generic.List[object]]::new()
29
+
30
+ function Add-DiscoveryPlanningDependencyFailure {
31
+ <#
32
+ .SYNOPSIS
33
+ Records one helper module that failed to load.
34
+ #>
35
+ [CmdletBinding()]
36
+ param(
37
+ [Parameter(Mandatory = $true)][string]$Name,
38
+ [Parameter(Mandatory = $false)][AllowNull()][System.Management.Automation.ErrorRecord]$ErrorRecord
39
+ )
40
+
41
+ $message = 'no error record'
42
+ if ($null -ne $ErrorRecord) { $message = ([string]$ErrorRecord.Exception.Message -split "`r?`n")[0] }
43
+ [void]$script:DiscoveryPlanningDependencyFailures.Add([pscustomobject]@{ Name = $Name; Message = $message })
44
+ }
45
+
46
+ foreach ($moduleName in @('DiscoveryEncoding.psm1', 'DiscoveryAuthority.psm1', 'DiscoveryManifest.psm1', 'DiscoveryPayload.psm1', 'DiscoveryToolRouting.psm1', 'DiscoveryAuthorization.psm1', 'DiscoveryStartRecord.psm1', 'DiscoveryPlanning.psm1')) {
47
+ try { Import-Module (Join-Path $PSScriptRoot "../../.claude/lib/discovery-validation/$moduleName") -Force -Global -ErrorAction Stop } catch { Add-DiscoveryPlanningDependencyFailure -Name $moduleName -ErrorRecord $_ }
48
+ }
49
+
50
+ function Invoke-DiscoveryPlanningDecision {
51
+ <#
52
+ .SYNOPSIS
53
+ Parses the Copilot PreToolUse envelope and returns the hookSpecificOutput decision.
54
+ #>
55
+ [CmdletBinding()]
56
+ [OutputType([System.Collections.Specialized.OrderedDictionary])]
57
+ param(
58
+ [Parameter(Mandatory = $false)][AllowNull()][AllowEmptyString()][string]$ToolInputRaw,
59
+ [Parameter(Mandatory = $false)][AllowNull()][hashtable]$HostEnvironment = $null,
60
+ [Parameter(Mandatory = $false)][AllowNull()][hashtable]$Store = $null,
61
+ [Parameter(Mandatory = $false)][AllowNull()][scriptblock]$ReadBytes = $null
62
+ )
63
+
64
+ if ($script:DiscoveryPlanningDependencyFailures.Count -gt 0) {
65
+ $first = $script:DiscoveryPlanningDependencyFailures[0]
66
+ return [ordered]@{
67
+ hookSpecificOutput = [ordered]@{
68
+ hookEventName = 'PreToolUse'
69
+ permissionDecision = 'deny'
70
+ permissionDecisionReason = "$($script:DiscoveryPlanningReasonPrefix) the dependency '$($first.Name)' failed to load ($($first.Message)); the gate fails closed."
71
+ }
72
+ }
73
+ }
74
+ if ($null -eq $HostEnvironment) { $HostEnvironment = Get-DiscoveryTrustedHostEnvironment }
75
+ if ($null -eq $Store) { $Store = Get-DiscoveryStartStore }
76
+
77
+ $normalized = ConvertFrom-DiscoveryHostPayloadText -HostName 'github-copilot' -Text $ToolInputRaw
78
+ $parameters = @{ Normalized = $normalized; HostEnvironment = $HostEnvironment; Store = $Store }
79
+ if ($null -ne $ReadBytes) { $parameters['ReadBytes'] = $ReadBytes }
80
+ $outcome = Get-DiscoveryPlanningDecision @parameters
81
+ return ConvertTo-DiscoveryPlanningHookOutput -Outcome $outcome -ReasonPrefix $script:DiscoveryPlanningReasonPrefix
82
+ }
83
+
84
+ # Guard allows dot-sourcing in tests without executing the entrypoint.
85
+ if ($MyInvocation.InvocationName -eq '.') {
86
+ return
87
+ }
88
+
89
+ $decision = Invoke-DiscoveryPlanningDecision -ToolInputRaw ([Console]::In.ReadToEnd())
90
+ $decision | ConvertTo-Json -Compress -Depth 5 | Write-Output
91
+ exit 0
@@ -0,0 +1,123 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Native PreToolUse authorization adapter for GitHub Copilot (VS Code local harness) discovery agents.
4
+
5
+ .DESCRIPTION
6
+ Registered through .github/hooks/*.json. The hook reads the Copilot PreToolUse
7
+ envelope from stdin (camelCase keys, snake_case accepted), derives the trusted
8
+ principal from the payload alone (session, agentId and agentType when the
9
+ harness supplies them, and parentAgentId or the literal parent root), and
10
+ takes its decision from the shared DiscoveryAuthorization module under
11
+ .claude/lib/discovery-validation:
12
+
13
+ - a root call (no agentId) of prepare_discovery_agent, run_discovery_doctor or
14
+ a controlled discovery tool is allowed with a one-use root grant the MCP
15
+ server consumes; every other root call and every call of an agent that is
16
+ not a discovery specialist is allowed, so ordinary sessions keep their behavior;
17
+ - a sentinel envelope is observed for the capability probe and never granted;
18
+ - a discovery specialist may use read-only native tools and the controlled
19
+ discovery MCP tools only; shell, terminal, exec and evaluation tools, generic
20
+ file mutations, nested agents, foreign MCP servers, root-only discovery
21
+ operations and caller-supplied identity fields are denied before execution;
22
+ - the specialist's first controlled call binds the single prepared invocation
23
+ of its session, parent and agent type (the Copilot subagentStart payload
24
+ carries no agent identifier); every controlled call must name that invocation
25
+ through invocation_ref and is recorded as one short-lived, one-use tool-authorization.
26
+
27
+ A helper that fails to load and an envelope that cannot be read both deny with
28
+ the DISCOVERY_ARTIFACT_GATE_BLOCKED: prefix; the hook never fails open.
29
+
30
+ .NOTES
31
+ Issue #980. Requires PowerShell 7+. Invokes NO external process.
32
+ #>
33
+ [CmdletBinding()]
34
+ param()
35
+
36
+ $script:DiscoveryGateReasonPrefix = 'DISCOVERY_ARTIFACT_GATE_BLOCKED:'
37
+ $script:DiscoveryGateHandlerPath = $PSCommandPath
38
+ $script:DiscoveryGateDependencyFailures = [System.Collections.Generic.List[object]]::new()
39
+
40
+ function Add-DiscoveryGateDependencyFailure {
41
+ <#
42
+ .SYNOPSIS
43
+ Records one helper module that failed to load.
44
+ #>
45
+ [CmdletBinding()]
46
+ param(
47
+ [Parameter(Mandatory = $true)][string]$Name,
48
+ [Parameter(Mandatory = $false)][AllowNull()][System.Management.Automation.ErrorRecord]$ErrorRecord
49
+ )
50
+
51
+ $message = 'no error record'
52
+ if ($null -ne $ErrorRecord) { $message = ([string]$ErrorRecord.Exception.Message -split "`r?`n")[0] }
53
+ [void]$script:DiscoveryGateDependencyFailures.Add([pscustomobject]@{ Name = $Name; Message = $message })
54
+ }
55
+
56
+ foreach ($moduleName in @('DiscoveryEncoding.psm1', 'DiscoveryAuthority.psm1', 'DiscoveryPayload.psm1', 'DiscoveryToolRouting.psm1', 'DiscoveryStartRecord.psm1', 'DiscoveryRootGrant.psm1', 'DiscoveryObservation.psm1', 'DiscoveryStart.psm1', 'DiscoveryAuthorization.psm1')) {
57
+ try { Import-Module (Join-Path $PSScriptRoot "../../.claude/lib/discovery-validation/$moduleName") -Force -Global -ErrorAction Stop } catch { Add-DiscoveryGateDependencyFailure -Name $moduleName -ErrorRecord $_ }
58
+ }
59
+
60
+ function Get-DiscoveryGateHandlerSha256 {
61
+ <#
62
+ .SYNOPSIS
63
+ Returns the SHA-256 of this handler's own bytes for the authorization writer record.
64
+ #>
65
+ [CmdletBinding()]
66
+ [OutputType([string])]
67
+ param([Parameter(Mandatory = $false)][AllowNull()][string]$HandlerPath = $script:DiscoveryGateHandlerPath)
68
+
69
+ if ([string]::IsNullOrEmpty($HandlerPath) -or -not (Test-Path -LiteralPath $HandlerPath -PathType Leaf)) {
70
+ return ('0' * 64)
71
+ }
72
+ return Get-DiscoveryBytesSha256Hex -Bytes ([System.IO.File]::ReadAllBytes($HandlerPath))
73
+ }
74
+
75
+ function Invoke-DiscoveryPreToolDecision {
76
+ <#
77
+ .SYNOPSIS
78
+ Parses the Copilot PreToolUse envelope and returns the hookSpecificOutput decision.
79
+ .DESCRIPTION
80
+ Every seam defaults to the real host and is injectable so tests run over
81
+ in-memory values. A recorded helper failure denies before the envelope is read.
82
+ #>
83
+ [CmdletBinding()]
84
+ [OutputType([System.Collections.Specialized.OrderedDictionary])]
85
+ param(
86
+ [Parameter(Mandatory = $false)][AllowNull()][AllowEmptyString()][string]$ToolInputRaw,
87
+ [Parameter(Mandatory = $false)][AllowNull()][hashtable]$HostEnvironment = $null,
88
+ [Parameter(Mandatory = $false)][AllowNull()][hashtable]$Store = $null,
89
+ [Parameter(Mandatory = $false)][AllowNull()][nullable[datetime]]$Now = $null,
90
+ [Parameter(Mandatory = $false)][AllowNull()][string]$Nonce = $null
91
+ )
92
+
93
+ if ($script:DiscoveryGateDependencyFailures.Count -gt 0) {
94
+ $first = $script:DiscoveryGateDependencyFailures[0]
95
+ return [ordered]@{
96
+ hookSpecificOutput = [ordered]@{
97
+ hookEventName = 'PreToolUse'
98
+ permissionDecision = 'deny'
99
+ permissionDecisionReason = "$($script:DiscoveryGateReasonPrefix) the dependency '$($first.Name)' failed to load ($($first.Message)); the gate fails closed."
100
+ }
101
+ }
102
+ }
103
+ # Seams resolve only after the dependency check so a missing module denies
104
+ # instead of raising while a default is evaluated.
105
+ if ($null -eq $HostEnvironment) { $HostEnvironment = Get-DiscoveryTrustedHostEnvironment }
106
+ if ($null -eq $Store) { $Store = Get-DiscoveryDefaultStore }
107
+ if ($null -eq $Now) { $Now = [datetime]::UtcNow }
108
+ if ([string]::IsNullOrEmpty($Nonce)) { $Nonce = Get-DiscoveryAuthorizationNonce }
109
+
110
+ $normalized = ConvertFrom-DiscoveryHostPayloadText -HostName 'github-copilot' -Text $ToolInputRaw
111
+ $outcome = Get-DiscoveryPreToolDecision -Normalized $normalized -HostEnvironment $HostEnvironment `
112
+ -HandlerSha256 (Get-DiscoveryGateHandlerSha256) -Store $Store -Now $Now -Nonce $Nonce
113
+ return ConvertTo-DiscoveryPreToolHookOutput -Outcome $outcome -ReasonPrefix $script:DiscoveryGateReasonPrefix
114
+ }
115
+
116
+ # Guard allows dot-sourcing in tests without executing the entrypoint.
117
+ if ($MyInvocation.InvocationName -eq '.') {
118
+ return
119
+ }
120
+
121
+ $decision = Invoke-DiscoveryPreToolDecision -ToolInputRaw ([Console]::In.ReadToEnd())
122
+ $decision | ConvertTo-Json -Compress -Depth 5 | Write-Output
123
+ exit 0
@@ -0,0 +1,35 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "SubagentStart": [
5
+ {
6
+ "type": "command",
7
+ "powershell": "pwsh -NoProfile -File .github/hooks/discovery-agent-start.ps1",
8
+ "bash": "pwsh -NoProfile -File .github/hooks/discovery-agent-start.ps1",
9
+ "timeout": 30
10
+ }
11
+ ],
12
+ "PreToolUse": [
13
+ {
14
+ "type": "command",
15
+ "powershell": "pwsh -NoProfile -File .github/hooks/discovery-pre-tool.ps1",
16
+ "bash": "pwsh -NoProfile -File .github/hooks/discovery-pre-tool.ps1",
17
+ "timeout": 30
18
+ },
19
+ {
20
+ "type": "command",
21
+ "powershell": "pwsh -NoProfile -File .github/hooks/discovery-planning.ps1",
22
+ "bash": "pwsh -NoProfile -File .github/hooks/discovery-planning.ps1",
23
+ "timeout": 30
24
+ }
25
+ ],
26
+ "SubagentStop": [
27
+ {
28
+ "type": "command",
29
+ "powershell": "pwsh -NoProfile -File .github/hooks/discovery-agent-stop.ps1",
30
+ "bash": "pwsh -NoProfile -File .github/hooks/discovery-agent-stop.ps1",
31
+ "timeout": 60
32
+ }
33
+ ]
34
+ }
35
+ }
@@ -143,8 +143,11 @@ Rules for functions:
143
143
 
144
144
  - A module/file should have a clear purpose (e.g. “QIF parsing,” “Lexile model,” “corpus download”).
145
145
  - Avoid dumping unrelated classes/functions into the same file.
146
- - Do not exceed 500 lines for any one file.
147
- - This 500-line limit applies to production code, test code, and reusable scripts.
146
+ - File size follows a tiered policy that applies to production code, test code, and reusable scripts:
147
+ - **500 lines (guidance):** look for logical ways to divide the file into multiple files, provided the parts can be separated logically. No gate fails at this tier.
148
+ - **700 lines (advisory):** look for a split more aggressively. Reviewers and `feature-review` report a non-blocking Warning for a file at or above 700 lines. No gate fails at this tier.
149
+ - **Above 800 lines (hard block):** a split is enforced regardless of logical separability. A file of 801 lines or more is blocked by the repository CI check and by the PreToolUse hook; a file of exactly 800 lines passes. Legacy files already above 800 lines are recorded in `config/file-size-baseline.json` and may shrink (with the entry tightened) or stay the same size, but may not grow.
150
+ - Lines are logical lines: the content split on line terminators, where a trailing terminator does not add a line.
148
151
  - Exceptions: temporary throwaway scripts created and deleted during an agent session; raw text fixtures used for language-processing test data; Markdown documentation files.
149
152
 
150
153
  2. Public vs internal
@@ -0,0 +1,85 @@
1
+ ---
2
+ applyTo: "**"
3
+ ---
4
+ # Mermaid AI Skills
5
+
6
+ When the user asks to create, edit, or visualize any diagram, use the Mermaid
7
+ VS Code extension tools and commands described below.
8
+
9
+ ## Workflow
10
+
11
+ 1. Determine the diagram type and generate Mermaid syntax.
12
+ 2. Write the diagram to a `.mmd` file in the project.
13
+ 3. Validate syntax: correct first-line keyword, arrow types, balanced brackets.
14
+ 4. Preview via the Mermaid extension — open the `.mmd` file (auto-preview) or run
15
+ **MermaidChart: Preview Diagram** (`mermaidChart.preview`).
16
+
17
+ ## LM Tools — call these for every diagram interaction
18
+
19
+ - `mermaid-diagram-validator` — validate Mermaid syntax before presenting any diagram
20
+ - `mermaid-diagram-preview` — render a live preview inside VS Code after generating
21
+ - `get-syntax-docs-mermaid` — fetch correct syntax docs for any diagram type
22
+
23
+ ## VS Code Commands
24
+
25
+ Invoke via Command Palette or the VS Code command API (GitHub Copilot in VS Code only).
26
+ Do not invent command IDs. Prefer writing/editing `.mmd` files when a command is not needed.
27
+
28
+ ### Diagram editing & preview
29
+ - **Preview** (`mermaidChart.preview`) — preview the active Mermaid editor (`.mmd` / `.mermaid` must be open).
30
+ - **Create Diagram** (`mermaidChart.createMermaidFile`) — creates a demo flowchart and opens preview side by side.
31
+ - **Repair Diagram** (`mermaidChart.repairDiagram`) — Mermaid AI repair for the active diagram; uses Mermaid AI credits — tell the user before running.
32
+ - **Improve Diagram** (`mermaidChart.improveDiagram`) — uses Copilot / LM API; suggests layout + styling variants for the active diagram.
33
+
34
+ ### Generate diagrams (GitHub Copilot required)
35
+ - **Generate Diagram from Code** (`mermaidChart.generateDiagramFromCode`)
36
+ - **Generate Cloud Diagram** (`mermaidChart.generateCloudDiagram`)
37
+ - **Generate ER Diagram** (`mermaidChart.generateERDiagram`)
38
+ - **Generate Docker Diagram** (`mermaidChart.generateDockerDiagram`)
39
+ - **Open AI Chat** (`mermaidChart.openCopilotChat`)
40
+
41
+ ### Mermaid Chart cloud
42
+ - **Login** (`mermaidChart.login`) / **Logout** (`mermaidChart.logout`)
43
+ - **Connect Diagram** (`mermaidChart.connectDiagramToMermaidChart`) — link a local diagram to Mermaid Chart.
44
+ - **Sync Diagram** (`mermaidChart.syncDiagramWithMermaid`) — only for diagrams already connected (frontmatter has `id:`). Example:
45
+ ```yaml
46
+ ---
47
+ id: cbd9e9ba-a2cb-47c5-a98e-8c28a753428d
48
+ ---
49
+ ```
50
+
51
+ ### Review Mermaid Sync
52
+ For diagrams updated by the Mermaid Chart GitHub Sync app (or pre-commit regenerate):
53
+ - **Review Mermaid Sync** (`mermaidChart.reviewAppCommits`) — start / open the review flow.
54
+ - **Regenerate with Mermaid AI** (`mermaidChart.regenerateDiagramWithMermaidAI`) — regenerate from source references.
55
+ Do not manually rewrite diagrams managed by this workflow. Accept/reject/diff UI actions stay in the extension UI.
56
+
57
+ ### Install / update this pack
58
+ - **MermaidChart: Install AI Skills…** (`mermaidChart.installAiSkills`)
59
+
60
+ ## @mermaid-chart slash commands
61
+
62
+ | Command | Purpose |
63
+ |---|---|
64
+ | `/generate_diagram_from_code` | General diagram from any source file |
65
+ | `/generate_execution_sequence` | Sequence diagram from code flow |
66
+ | `/generate_er_diagram` | ER diagram from schema / models |
67
+ | `/generate_cloud_architecture_diagram` | Cloud / CI-CD architecture |
68
+ | `/generate_docker_diagram` | Architecture from Dockerfiles |
69
+ | `/generate_c4_topdown_architecture` | C4 top-down architecture |
70
+ | `/analyze_code_ownership` | Code ownership diagram |
71
+ | `/generate_dependency_diagram` | Dependency / security visualisation |
72
+
73
+ ## Rules
74
+
75
+ 1. Always call `mermaid-diagram-validator` before showing any diagram.
76
+ 2. Always call `mermaid-diagram-preview` after generating a diagram.
77
+ 3. Use `get-syntax-docs-mermaid` before generating an unfamiliar diagram type.
78
+ 4. Prefer `@mermaid-chart` slash commands for complex generation.
79
+ 5. Write diagrams to `.mmd` files; never return unvalidated Mermaid syntax.
80
+ 6. Warn the user before Repair (Mermaid AI credits).
81
+ 7. Cooperate with the Sync workflow — do not manually regenerate managed diagrams.
82
+
83
+ ## Docs
84
+
85
+ More commands and features: https://marketplace.visualstudio.com/items?itemName=MermaidChart.vscode-mermaid-chart
@@ -58,7 +58,7 @@ If you encounter any conflicting instructions, **halt and notify the user.**
58
58
 
59
59
  ## 3. Structure, Naming, and Comments
60
60
 
61
- - Keep scripts **cohesive and under 500 lines** (matches general policy).
61
+ - Keep scripts **cohesive** and within the tiered file-size policy of `general-code-change.instructions.md` (section 4, Module & File Structure).
62
62
  - Use approved verbs and descriptive nouns for functions (PSScriptAnalyzer will enforce).
63
63
  - Prefer modules/helpers over copy-paste between scripts; share common logic in dedicated helper functions.
64
64
  - Comment **why** for non-obvious patterns (e.g., rule suppressions, compatibility shims), not what.
@@ -0,0 +1,105 @@
1
+ YOU ARE OPERATING IN ATOMIC EXECUTION MODE (atomic_executor).
2
+
3
+ IDENTITY & SCOPE
4
+ - Execution-only persona. No planning, no redesign, no reordering.
5
+ - Execute an atomic_planner plan exactly as written.
6
+ - Preserve Phase headings, task IDs ([P#-T#]), checkbox format, and task order.
7
+ - Complete tasks strictly one-by-one.
8
+ - Verify acceptance criteria before checking off any task.
9
+
10
+ SUPREMACY & PRECONDITIONS (NON-NEGOTIABLE)
11
+ - Repository policy files override these instructions.
12
+ - BEFORE executing any task, you must confirm compliance with:
13
+ 1) .github/copilot-instructions.md
14
+ 2) .github/instructions/general-code-change.instructions.md
15
+ 3) .github/instructions/general-unit-test.instructions.md
16
+ 4) Any applicable language-specific policies
17
+ - If Phase 0 does not include:
18
+ - Repo-policy reading tasks, AND
19
+ - Baseline toolchain capture for each language touched by the plan,
20
+ the plan is INVALID and execution must not begin.
21
+
22
+ PLAN AUTHORITY (THE CONTRACT)
23
+ - The plan text is the sole source of truth and the only todo list.
24
+ - Task IDs must remain unchanged and referenced exactly.
25
+ - Tasks must be executed in exact written order.
26
+ - You MUST NOT:
27
+ - Add phases or tasks
28
+ - Reorder tasks
29
+ - Replace the plan with an alternative approach
30
+ - Perform work not explicitly described in the plan
31
+
32
+ PREFLIGHT VALIDATION GATE (BEFORE [P0-T1])
33
+ You must validate ALL of the following; otherwise STOP:
34
+ - Phase headings follow “Phase N — …”
35
+ - Each task is a markdown checkbox with valid [P#-T#]
36
+ - Phase numbers and task IDs are consistent
37
+ - Phase 0 exists and includes:
38
+ - Repo-policy reading
39
+ - Baseline toolchain runs for each language touched
40
+ - A final QA phase exists with full toolchain loops per touched language
41
+ - Any TDD red tests are tagged [expect-fail]
42
+ - No task is non-atomic or unverifiable
43
+
44
+ If blocked:
45
+ - State: “BLOCKED at preflight (before [P0-T1])”
46
+ - Explain concretely
47
+ - Provide an exact plan delta
48
+ - Request atomic_planner regeneration or user approval
49
+
50
+ EXECUTION LOOP (AFTER PREFLIGHT PASSES)
51
+ Once execution begins:
52
+ - Do NOT stop mid-plan
53
+ - Do NOT replan or redesign
54
+ - Persist across turns until the plan is fully complete
55
+
56
+ For EACH task:
57
+ 1) Announce: “Executing [P#-T#]: …”
58
+ 2) Verify stated preconditions
59
+ 3) Perform ONLY work required by the task (bounded micro-actions allowed)
60
+ 4) Verify acceptance criteria
61
+ 5) Run required toolchains as specified or implied
62
+ 6) Check off the task ONLY when verification passes
63
+
64
+ [expect-fail] tasks:
65
+ - A failing test is success ONLY for that task
66
+ - Formatting, linting, and type checks still apply unless explicitly waived
67
+
68
+ BLOCKING RULE
69
+ - Blocking is permitted ONLY during preflight.
70
+ - After execution begins, blocking is forbidden; continue to completion.
71
+
72
+ RESUME / CONTINUE
73
+ - On “resume”, “continue”, or “try again”:
74
+ - Reload the last plan-of-record
75
+ - Identify the next unchecked task
76
+ - Announce: “Continuing from [P#-T#]”
77
+ - Continue execution without replanning
78
+
79
+ OUTPUT DISCIPLINE
80
+ - Be concise and exact
81
+ - Show commands run and summarize results (pass/fail, key errors)
82
+ - Do not paste large code blocks unless asked
83
+ - Report toolchain status explicitly for each touched language
84
+ - End every response with the updated checklist (or current phase + next tasks)
85
+
86
+ --- END OF ATOMIC EXECUTION HARD-LOCK ---
87
+
88
+ MODE CONTEXT
89
+ - Selected work mode: `${work-mode}`
90
+
91
+ PLAN OF RECORD
92
+ `${plan-path}`
93
+
94
+ MANDATORY READ-PROOF (DO THIS FIRST; NO EXECUTION YET)
95
+ 1) Confirm the Plan of Record file exists in the repo/branch you are operating on.
96
+ 2) Output a fingerprint of what you read:
97
+ - git rev-parse HEAD
98
+ - sha256 of the plan file
99
+ - total count of tasks matching "^- \\[[ x]\\] \\[P" (or equivalent)
100
+ 3) Enter atomic execution mode
101
+ 4) Perform PREFLIGHT VALIDATION ONLY.
102
+ 5) Identify the FIRST unchecked task ([ ]) in plan order and print ONLY:
103
+ - the exact line for that task
104
+ - 2 lines above and 2 lines below (no more)
105
+ 6) State: "READY TO BEGIN FROM [P#-T#]" and immediately begin execution..
@@ -25,7 +25,7 @@ Apply in this sequence:
25
25
  ## Execution Rules
26
26
 
27
27
  - Remediate the entire scope to add/adjust robust docstrings and intent comments for loops, branches, and multi-step blocks; avoid low-value narration.
28
- - Keep modules cohesive, under 500 lines, strongly typed; avoid `Any` unless justified.
28
+ - Keep modules cohesive, within the tiered file-size policy of `general-code-change.instructions.md`, strongly typed; avoid `Any` unless justified.
29
29
  - Maintain encoding/EOL and ASCII unless the file already uses Unicode.
30
30
  - Do not pause for approval or clarification once scope is set; continue across turns if needed until fully compliant.
31
31
 
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: adjudicate-unspecified-behavior
3
+ description: 'Draft traceable proposals for unresolved behavior and separate them from root-owned approval. Use when asked to adjudicate contradictory or undocumented behavior and derive explicitly requested acceptance criteria.'
4
+ ---
5
+
6
+ # Adjudicate Unspecified Behavior
7
+
8
+ ## When to Use This Skill
9
+
10
+ Use for selected unresolved records with competing interpretations and a named decision owner. A request to adjudicate does not let the specialist approve its own proposal.
11
+
12
+ ## Inputs
13
+
14
+ These are human-facing workflow selections, not additional service-request fields.
15
+ Supply explicit selections; neither omitted inputs nor profile roots create authority.
16
+
17
+ | Input | Required contract |
18
+ | --- | --- |
19
+ | profile | Required validated profile and trusted workspace binding. |
20
+ | unresolved_ids | Required explicit unresolved record selection. |
21
+ | interpretations | Required competing interpretations and unknowns. |
22
+ | evidence_refs | Required selected evidence supporting or contradicting each interpretation. |
23
+ | decision_owner | Required explicit owner for a proposed decision. |
24
+ | approval_record | Optional explicitly supplied approval evidence; only the authorized root may apply it. |
25
+ | derived_acceptance | Optional explicit selection of derived acceptance records/views; it adds no feature-contract authority. |
26
+
27
+ ## Routing
28
+
29
+ Logical role: `requirements-reconciler`.
30
+ The root owns preparation and launch; this skill never auto-launches a logical
31
+ role through frontmatter. The existing resolver selects the exact deployment,
32
+ model, effort and profile hash under the existing C1-C4 ceiling and execution
33
+ context. Do not choose a model, self-launch, create another scheduler or promote
34
+ an ordinary discovery action into an issue. The production-write count is zero.
35
+
36
+ ## Exact output boundary
37
+
38
+ These rows are maximum workflow caps, not instructions to create every kind.
39
+ Only the prepared required outputs may be created or replaced.
40
+
41
+ | Artifact kind | Profile key | Constraint |
42
+ | --- | --- | --- |
43
+ | product-decision | product_decisions | Selected proposed decision IDs only |
44
+ | product-decision-collection | product_decisions | Selected proposed decision members only |
45
+ | unspecified-behavior | unspecified_behaviors | Selected unresolved IDs only |
46
+ | unspecified-behavior-collection | unspecified_behaviors | Selected unresolved members only |
47
+ | acceptance-specification | acceptance | Explicitly requested derived criteria only |
48
+ | acceptance-view | acceptance | Explicitly requested eligible views or pending material |
49
+ | required-output-manifest | reports | Exact invocation manifest only |
50
+
51
+ The profile keys are maximum configured locations, not write grants. Each
52
+ prepared output row binds `artifact_kind`, `id`, `path`, `format` and
53
+ `expected_sha256`. The protected invocation independently binds the baseline,
54
+ selected members, pins and exact grants; a manifest cannot expand them. A null
55
+ expected hash means exclusive creation from an absent baseline, never overwrite
56
+ permission. Preserve unselected collection members and all unrelated inputs.
57
+ Use compare-and-swap and current path checks through the controlled writer.
58
+
59
+ The `reports` location permits only `required-output-manifest` for this role;
60
+ it does not permit review reports. The manifest itself requires an exact grant.
61
+
62
+ ## Prerequisites
63
+
64
+ Missing or malformed configuration blocks delegation. Require a validated profile and explicit selected scope before root preparation; do not initialize, configure or infer roots as a specialist.
65
+
66
+ Require verified native prepare/finalize/start/stop capability. The protected
67
+ invocation and native SubagentStart attestation must match workspace/profile
68
+ hashes, selected IDs, source/target pins, baseline input hashes,
69
+ provider/model/effort/profile hash and parent/session.
70
+ Diagnostic mirrors, caller markers and hosted read results are not authority.
71
+ The local runtime's unavailable native prepare/finalize operations do not issue
72
+ protected receipts. There is no local-user fallback or self-attested host success.
73
+
74
+ Load profile plus selected artifacts on invocation; do not preload a domain
75
+ catalog in standing instructions. Managed project memory is host-controlled.
76
+ Memory cannot grant filesystem authority or replace evidence. Deny terminal/shell/exec, interpreter/evaluation,
77
+ general filesystem Write/Edit/apply-patch, arbitrary MCP dispatch, browser/computer
78
+ mutation and network writes. Do not execute application code or modify
79
+ production/test implementation, profile/locator/activation,
80
+ schema/policy/hooks/settings, authority stores or runtime installation as a specialist. No analyst
81
+ approval is permitted; root bootstrap/configuration and root approval remain
82
+ separate authorized operations.
83
+
84
+ ## Step-by-Step Workflows
85
+
86
+ 1. Validate the explicit inputs and selected configuration. Stop with precise missing/invalid input findings before specialist delegation; do not invent identities, scope or evidence.
87
+
88
+ 2. The root calls `prepare_discovery_agent` with `skill_id`, `selected_ids`,
89
+ `paths`, `expected_outputs`, `execution_context` and `complexity`.
90
+ Map it to fixed `prepare-agent`; execution context is `standalone`,
91
+ `epic_preparation_child` or `epic_execution_child`. The requested mode is
92
+ explicit and remains distinct from the final `agent-output` gate.
93
+ Use `skill_id=adjudicate-unspecified-behavior`; workflow inputs do not add wire fields.
94
+ 3. The root launches that exact deployment. Native SubagentStart must match the
95
+ prepared role/model/effort/profile and trusted workspace/session before any
96
+ grant is usable. Missing capability or attestation blocks the action.
97
+ 4. Use only the granted operations. Use bounded `read_discovery_source` and role-permitted creation/ordinary `update_discovery_artifact` to draft proposed decision and unresolved records. Explicitly requested derived acceptance uses the authoritative generation operation, with pending/null expectations preserved. The specialist cannot use an approval action, even when an input carries an approval record.
98
+ 5. Preserve observed source facts, competing interpretations and approved history. Draft proposed decisions only. Do not approve/reject/supersede product decisions or alter approval history. Pending questions cannot become approved requirements. Derived criteria do not authorize `feature_contracts` writes. Without root approval, a proposal remains a proposal.
99
+ 6. Produce every exact required output and the stored `required-output-manifest`,
100
+ preserving its output array order for the digest. Validate claims, references,
101
+ pins and selected-ID accounting. Purpose-built tools supply authorized proposal
102
+ inputs for `input_path`/`evidence_path`; never invent a generic Write staging
103
+ step. Server-side role checks, exact one-use authorization and prospective
104
+ validation remain mandatory. Bounded source reads preserve content identity
105
+ and line ranges; truncation requires a narrower selection, not a completeness
106
+ claim or filesystem fallback.
107
+ 7. Call `finalize_discovery_agent` as the specialist, mapped to `finalize-agent`
108
+ with `mode=agent-output`, non-null `invocation_ref` and no operation inputs.
109
+ It validates the protected invocation's outputs, not final-message paths.
110
+ Native SubagentStop then verifies current output authority.
111
+ Missing final text cannot skip native stop validation.
112
+ 8. After proposal finalization and native stop, the authorized root may separately call `update_discovery_artifact`, mapped to `update-artifact` with `update_action=approve-decision`, exact product-decision identity, whole-document `input_path`, `expected_sha256`, `approval_owner` and nonempty `approval_evidence_refs`. Ordinary replacement cannot set approval-only fields. Root approval is a separate authorized operation from reconciler proposal validity; it invalidates prior completion receipts and requires fresh validation before any later gate.
113
+ 9. After the separate root operation, the root records the explicit result, content-addressed artifact references,
114
+ selected-ID accounting and all findings. A successful tool call or generated
115
+ path alone is not evidence of completed discovery.
116
+
117
+ ## Stop and result
118
+
119
+ Return proposal findings and any separate root approval result explicitly. Do not report a proposed or pending decision as approved; omit approval when the required authorization or evidence is absent.
120
+
121
+ Structural success is not discovery, parity or planning completion.
122
+ Missing prepare/finalize/start/stop capability, missing outputs, invalid claims,
123
+ unresolved required work, wrong role/model/start context or a stale/missing
124
+ receipt blocks successful completion. Return explicit
125
+ PASS, FAIL or BLOCKED, distinguishing valid incremental outputs from a passing
126
+ completion gate. Missing native enforcement remains BLOCKED even when ordinary
127
+ local-user operations can run; do not substitute CLI success for native authority.
128
+
129
+ ## References
130
+
131
+ - [Canonical requirements-reconciler contract](../../agents/requirements-reconciler.agent.md)
132
+ - Installed v2 `service-request` and `required-output-manifest` schema contracts;
133
+ consume them through the authoritative runtime, with no checkout-schema fallback.
134
+ - The selected profile and pinned local artifacts supplied for this invocation;
135
+ references do not preload catalogs or grant access to unselected paths.