@danmoisan/drm-copilot-mcp 1.0.0 → 1.0.7

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 (52) hide show
  1. package/out/mcp-server.js +814 -194
  2. package/package.json +1 -1
  3. package/resources/claude-customizations/.claude/agents/commit-message.md +42 -0
  4. package/resources/claude-customizations/.claude/agents/epic-orchestrator.md +127 -0
  5. package/resources/claude-customizations/.claude/agents/human-exception-runbook.md +48 -0
  6. package/resources/claude-customizations/.claude/agents/orchestrator.md +67 -2
  7. package/resources/claude-customizations/.claude/agents/pr-author.md +37 -21
  8. package/resources/claude-customizations/.claude/hooks/check-powershell-test-purity.ps1 +103 -65
  9. package/resources/claude-customizations/.claude/hooks/check-python-test-purity.ps1 +12 -9
  10. package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +24 -16
  11. package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +19 -13
  12. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +304 -0
  13. package/resources/claude-customizations/.claude/hooks/enforce-epic-wave-barrier.ps1 +304 -0
  14. package/resources/claude-customizations/.claude/hooks/enforce-epic-worktree-removal-gate.ps1 +237 -0
  15. package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +16 -12
  16. package/resources/claude-customizations/.claude/hooks/enforce-feature-folder-order.ps1 +14 -10
  17. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +35 -8
  18. package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +17 -14
  19. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1 +104 -0
  20. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +268 -93
  21. package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner.ps1 +19 -11
  22. package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +28 -6
  23. package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +17 -14
  24. package/resources/claude-customizations/.claude/hooks/validate-bash.ps1 +146 -36
  25. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +19 -7
  26. package/resources/claude-customizations/.claude/rules/orchestrator-state.md +36 -0
  27. package/resources/claude-customizations/.claude/settings.json +34 -1
  28. package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +252 -0
  29. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +42 -13
  30. package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +28 -0
  31. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +22 -18
  32. package/resources/claude-customizations/pack-manifests/core.json +8 -0
  33. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +6 -3
  34. package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +1 -1
  35. package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp/SKILL.md +65 -0
  36. package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +79 -0
  37. package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +66 -0
  38. package/resources/codex-and-agents-customizations/.codex/config.toml +1 -25
  39. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-pr-author-skill.ps1 +257 -93
  40. package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +98 -0
  41. package/resources/codex-and-agents-customizations/pack-manifests/core.json +24 -0
  42. package/resources/codex-and-agents-customizations/pack-manifests/csharp-legacy.json +11 -0
  43. package/resources/codex-and-agents-customizations/pack-manifests/csharp-modern.json +10 -0
  44. package/resources/codex-and-agents-customizations/pack-manifests/powershell.json +15 -0
  45. package/resources/codex-and-agents-customizations/pack-manifests/python.json +15 -0
  46. package/resources/codex-and-agents-customizations/pack-manifests/typescript.json +9 -0
  47. package/resources/config/orchestration-routing.json +92 -0
  48. package/resources/customizations/.github/agents/pr-author.agent.md +24 -18
  49. package/resources/icon.png +0 -0
  50. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +11 -0
  51. package/resources/codex-and-agents-customizations/.github/workflows/_validate-orchestrator-state.yml +0 -68
  52. package/resources/codex-and-agents-customizations/.github/workflows/validate-orchestrator-state.yml +0 -15
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "python",
3
+ "label": "Python",
4
+ "paths": [
5
+ ".agents/skills/python/SKILL.md",
6
+ ".agents/skills/python-suppressions/SKILL.md",
7
+ ".agents/skills/python-change-budget-router/SKILL.md",
8
+ ".agents/skills/python-qa-gate/SKILL.md",
9
+ ".agents/skills/invoke-python-engineer/SKILL.md",
10
+ ".codex/agents/python-typed-engineer.toml",
11
+ ".codex/agents/python-orchestrator.toml",
12
+ ".codex/agents/python-atomic-executor.toml",
13
+ ".codex/agents/python-atomic-planning.toml"
14
+ ]
15
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "typescript",
3
+ "label": "TypeScript",
4
+ "paths": [
5
+ ".agents/skills/typescript/SKILL.md",
6
+ ".agents/skills/typescript-suppressions/SKILL.md",
7
+ ".codex/agents/typescript-engineer.toml"
8
+ ]
9
+ }
@@ -71,6 +71,98 @@
71
71
  "collect_pr_context",
72
72
  "validate_orchestration_artifacts"
73
73
  ]
74
+ },
75
+ "epic": {
76
+ "description": "Epic path for scheduling a dependency graph of child features across parallel worktrees with fan-in via a shared integration branch.",
77
+ "requires_pr_gate": true,
78
+ "required_agents": [
79
+ "orchestrator",
80
+ "pr-author"
81
+ ],
82
+ "required_skills": [
83
+ "epic-orchestrate",
84
+ "orchestrate",
85
+ "feature-promotion-lifecycle",
86
+ "atomic-plan-contract",
87
+ "acceptance-criteria-tracking",
88
+ "evidence-and-timestamp-conventions",
89
+ "pr-context-artifacts",
90
+ "pr-base-branch-merge-base"
91
+ ],
92
+ "required_mcp_tools": [
93
+ "collect_pr_context",
94
+ "validate_orchestration_artifacts"
95
+ ]
96
+ }
97
+ },
98
+ "model_policy": {
99
+ "description": "Judgment-based complexity-band model selection. This block governs only the delegation model tier. It is not a route input, and route is not an input to model selection.",
100
+ "tier_order": [
101
+ "haiku",
102
+ "sonnet",
103
+ "opus",
104
+ "fable"
105
+ ],
106
+ "complexity": {
107
+ "scale": "C1 trivial or mechanical change with no behavior effect. C2 localized feature or bug change confined to a small surface. C3 cross-cutting change that alters an invariant, contract, or behavior across module boundaries. C4 novel, ambiguous, or research-heavy change requiring the most capable tier; C4 is reached only by judgment and is never floor-forced.",
108
+ "signals": [
109
+ {
110
+ "name": "classifier_or_model_logic",
111
+ "floor": true,
112
+ "anchor": "Changes to classifier engines, scoring, or model-affecting logic (T1 modules)."
113
+ },
114
+ {
115
+ "name": "auth_or_token_handling",
116
+ "floor": true,
117
+ "anchor": "Changes to authentication, token handling, or other security-sensitive paths."
118
+ },
119
+ {
120
+ "name": "concurrency_or_ordering",
121
+ "floor": true,
122
+ "anchor": "Introduces or modifies concurrency, ordering, or state-transition invariants."
123
+ },
124
+ {
125
+ "name": "cross_module_contract_change",
126
+ "floor": true,
127
+ "anchor": "Alters a public contract or schema consumed across module boundaries."
128
+ },
129
+ {
130
+ "name": "single_file_localized_edit",
131
+ "floor": false,
132
+ "anchor": "A localized edit confined to one file with no cross-cutting effect."
133
+ },
134
+ {
135
+ "name": "mechanical_rename_or_move",
136
+ "floor": false,
137
+ "anchor": "A mechanical rename, move, or formatting change with no behavior change."
138
+ },
139
+ {
140
+ "name": "docs_or_comment_only",
141
+ "floor": false,
142
+ "anchor": "A documentation-only or comment-only change."
143
+ }
144
+ ]
145
+ },
146
+ "complexity_to_model": {
147
+ "C1": "haiku",
148
+ "C2": "sonnet",
149
+ "C3": "opus",
150
+ "C4": "fable"
151
+ },
152
+ "preferred_overlay": {
153
+ "description": "Applied only under fable_policy preferred. Changes only the C3 cell to fable, and only for the listed agents. No other agent and no other band is affected.",
154
+ "agents": [
155
+ "atomic-planner",
156
+ "prd-feature",
157
+ "feature-review",
158
+ "task-researcher"
159
+ ],
160
+ "band": "C3",
161
+ "model": "fable"
74
162
  }
163
+ },
164
+ "model_budget": {
165
+ "description": "Session-level model budget. fable_policy is a three-way switch controlling whether the fable tier is disabled (removed and clamped to opus), available (used as-is), or preferred (applies the preferred_overlay).",
166
+ "fable_policy": "disabled"
75
167
  }
76
168
  }
@@ -137,27 +137,33 @@ Use these sections, in this order:
137
137
 
138
138
  That’s it. Produce the PR body.
139
139
 
140
- ## Authorization Sentinel Protocol (Documentation-Only in This Ecosystem)
140
+ ## PR Body and Receipt Protocol (Documentation-Only in This Ecosystem)
141
141
 
142
142
  When this agent opens or updates a pull request via `gh pr create` or `gh pr edit --body*`, it follows
143
- the cross-ecosystem authorization sentinel protocol:
144
-
145
- 1. Run `git rev-parse HEAD` to obtain `head_sha`.
146
- 2. Write `artifacts/pr_author_authorization.json` with exactly: `issued_by` set to `"pr-author"`,
147
- `issued_at` as a UTC ISO-8601 timestamp, `head_sha` from step 1, and `ttl_seconds` set to `120`.
148
- 3. Issue the `gh pr create` / `gh pr edit --body-file ...` command immediately, within the 120-second
149
- TTL. Pass the PR body via `--body-file`; inline `--body` is not used.
150
- 4. Delete `artifacts/pr_author_authorization.json` after the command completes (success or failure).
143
+ the cross-ecosystem PR body and receipt protocol:
144
+
145
+ 1. Write the PR body text to `artifacts/pr_body_<N>.md`, where `<N>` is the target issue or PR number.
146
+ 2. Compute the SHA-256 of the body file bytes and render it as lowercase hexadecimal.
147
+ 3. Write the sibling receipt `artifacts/pr_body_<N>.receipt.json` with exactly: `skill` set to
148
+ `"pr-author"`, `pr_body_path` set to `"artifacts/pr_body_<N>.md"`, `number` set to `<N>`, `sha256`
149
+ set to the lowercase-hex SHA-256 from step 2, `context_summary_path` set to
150
+ `"artifacts/pr_context.summary.txt"`, and `created_at` as a UTC ISO-8601 timestamp strictly newer
151
+ than the last-write time of `artifacts/pr_context.summary.txt`.
152
+ 4. Issue the `gh pr create --body-file artifacts/pr_body_<N>.md` (or
153
+ `gh pr edit --body-file ...`) command. Pass the PR body via `--body-file`; inline `--body` is not
154
+ used.
151
155
 
152
156
  After opening or updating the PR, report the resulting PR URL or PR number.
153
157
 
154
158
  Enforcement in the GitHub Copilot ecosystem is **documentation-only**: the Copilot ecosystem has no
155
- PreToolUse hook surface, so the sentinel protocol cannot be mechanically enforced here. The protocol
156
- is documented for consistency with the Claude and Codex ecosystems, where a PreToolUse hook verifies
157
- the sentinel.
158
-
159
- The authorization sentinel is a **policy guardrail, not a cryptographic or security control.** Any
160
- actor with write access to `artifacts/` can forge `artifacts/pr_author_authorization.json`, because
161
- all agents share the same filesystem and the runtime exposes no native agent-identity signal at tool
162
- pre-use time. The mechanism prevents accidental bypass and requires a deliberate, documented act to
163
- circumvent. It is not tamper-proof and is not a security boundary.
159
+ PreToolUse hook surface, so the receipt protocol cannot be mechanically enforced here. The protocol is
160
+ documented for consistency with the Claude and Codex ecosystems, where a PreToolUse hook verifies the
161
+ receipt in five ordered checks (canonical body-file path, receipt present, number match, SHA-256
162
+ match, and `created_at` newer than the context summary last-write).
163
+
164
+ The SHA-256 receipt is a **policy-level integrity check, not a cryptographic or security control.** It
165
+ binds the PR body bytes to the receipt. Any actor with write access to `artifacts/` can replace both
166
+ `artifacts/pr_body_<N>.md` and `artifacts/pr_body_<N>.receipt.json` together with a matching SHA-256,
167
+ because all agents share the same filesystem and the runtime exposes no native agent-identity signal
168
+ at tool pre-use time. The mechanism prevents accidental bypass and requires a deliberate, documented
169
+ act to circumvent. It is not tamper-proof and is not a security boundary.
Binary file
@@ -26,6 +26,9 @@
26
26
  '.claude/hooks/check-powershell-test-purity.ps1'
27
27
  '.claude/hooks/enforce-python-batch-budget.ps1'
28
28
  '.claude/hooks/enforce-powershell-batch-budget.ps1'
29
+ # Issue #272 hardened this PreToolUse hook with a new orchestrator-state preflight
30
+ # check; measured here so the change produces real per-file coverage evidence.
31
+ '.claude/hooks/enforce-pr-author-skill.ps1'
29
32
  # Issue #214 added/changed these four release scripts and provided dedicated
30
33
  # Pester suites; they are measured here to produce real per-file changed-line
31
34
  # coverage rather than relying on behavioral-only evidence.
@@ -33,6 +36,14 @@
33
36
  'scripts/dev-tools/Invoke-FullRelease.ps1'
34
37
  'scripts/dev-tools/Invoke-MarketplacePublish.ps1'
35
38
  'scripts/dev-tools/Invoke-ReleaseTagPush.ps1'
39
+ # Issue #275 remediation cycle 1 (fix #3): measure the epic-orchestrate hook set and
40
+ # its dot-sourced sibling module so no production hook is excluded from coverage.
41
+ '.claude/hooks/enforce-epic-merge-gate.ps1'
42
+ '.claude/hooks/enforce-epic-wave-barrier.ps1'
43
+ '.claude/hooks/enforce-epic-worktree-removal-gate.ps1'
44
+ '.claude/hooks/enforce-pr-author-skill.ps1'
45
+ '.claude/hooks/validate-orchestrator-output.ps1'
46
+ '.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1'
36
47
  )
37
48
  ExcludedPath = @(
38
49
  '.claude/hooks/validate-feature-review-coverage.ps1' # Feature-review wrapper around repository evidence; not deterministic in normal unit-test execution.
@@ -1,68 +0,0 @@
1
- name: Validate Orchestrator State
2
-
3
- on:
4
- workflow_call:
5
- inputs:
6
- state-path:
7
- description: Repository-relative orchestrator checkpoint path.
8
- required: false
9
- type: string
10
- default: artifacts/orchestration/orchestrator-state.json
11
- require-checkpoint:
12
- description: Fail when the checkpoint file is absent.
13
- required: false
14
- type: boolean
15
- default: true
16
- workflow_dispatch:
17
- inputs:
18
- state-path:
19
- description: Repository-relative orchestrator checkpoint path.
20
- required: false
21
- type: string
22
- default: artifacts/orchestration/orchestrator-state.json
23
- require-checkpoint:
24
- description: Fail when the checkpoint file is absent.
25
- required: false
26
- type: boolean
27
- default: true
28
-
29
- jobs:
30
- validate-orchestrator-state:
31
- name: Validate orchestrator checkpoint
32
- runs-on: ubuntu-latest
33
-
34
- steps:
35
- - name: Check out repository
36
- uses: actions/checkout@v4
37
-
38
- - name: Set up Python
39
- uses: actions/setup-python@v5
40
- with:
41
- python-version: "3.13"
42
-
43
- - name: Install Poetry
44
- uses: snok/install-poetry@v1
45
- with:
46
- version: latest
47
- virtualenvs-create: true
48
- virtualenvs-in-project: true
49
-
50
- - name: Install dependencies
51
- run: poetry install --no-interaction
52
-
53
- - name: Validate checkpoint
54
- env:
55
- STATE_PATH: ${{ inputs.state-path }}
56
- REQUIRE_CHECKPOINT: ${{ inputs.require-checkpoint }}
57
- run: |
58
- if [ ! -f "$STATE_PATH" ]; then
59
- if [ "$REQUIRE_CHECKPOINT" = "true" ]; then
60
- echo "ERROR: orchestrator checkpoint is required but was not found: $STATE_PATH" >&2
61
- exit 1
62
- fi
63
- echo "No orchestrator checkpoint found at $STATE_PATH; validation skipped."
64
- exit 0
65
- fi
66
-
67
- poetry run python -m scripts.dev_tools.validate_orchestration_artifacts \
68
- orchestrator-state "$STATE_PATH" --require-complete
@@ -1,15 +0,0 @@
1
- name: Orchestrator State Gate
2
-
3
- on:
4
- pull_request:
5
- branches: [main, development]
6
- push:
7
- branches: [main, development]
8
- workflow_dispatch:
9
-
10
- jobs:
11
- validate-orchestrator-state:
12
- uses: ./.github/workflows/_validate-orchestrator-state.yml
13
- with:
14
- state-path: artifacts/orchestration/orchestrator-state.json
15
- require-checkpoint: false