@danmoisan/drm-copilot-mcp 1.1.6 → 1.1.8

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 (56) hide show
  1. package/out/mcp-server.js +73 -1
  2. package/package.json +1 -1
  3. package/resources/claude-customizations/.claude/agents/atomic-planner.md +2 -0
  4. package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +6 -5
  5. package/resources/claude-customizations/.claude/agents/parallel-planner.md +24 -7
  6. package/resources/claude-customizations/.claude/agents/prd-feature.md +5 -0
  7. package/resources/claude-customizations/.claude/agents/task-researcher.md +3 -0
  8. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-modes.ps1 +8 -5
  9. package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +186 -13
  10. package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +186 -13
  11. package/resources/claude-customizations/.claude/hooks/persist-session-id.ps1 +16 -5
  12. package/resources/claude-customizations/.claude/hooks/validate-planner-output.ps1 +122 -0
  13. package/resources/claude-customizations/.claude/hooks/validate-prd-feature-output.ps1 +91 -0
  14. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +69 -1
  15. package/resources/claude-customizations/.claude/lib/bash/parallel-lane-assertion.sh +495 -0
  16. package/resources/claude-customizations/.claude/lib/bash/report-lane-assertion.sh +169 -0
  17. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadius.psm1 +7 -5
  18. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusConfig.psm1 +4 -2
  19. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusExtraction.psm1 +4 -2
  20. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusGlob.psm1 +2 -0
  21. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusNormalization.psm1 +5 -3
  22. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusTokenShape.psm1 +2 -0
  23. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusValidation.psm1 +6 -4
  24. package/resources/claude-customizations/.claude/lib/codex-routing/CodexDeployment.psm1 +2 -0
  25. package/resources/claude-customizations/.claude/lib/codex-routing/CodexTopology.psm1 +2 -0
  26. package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryValidation.psm1 +16 -16
  27. package/resources/claude-customizations/.claude/lib/hook-payload/HookPayload.psm1 +2 -0
  28. package/resources/claude-customizations/.claude/lib/mermaid/MermaidGrammar.psm1 +2 -0
  29. package/resources/claude-customizations/.claude/lib/mermaid/MermaidLineScanner.psm1 +3 -1
  30. package/resources/claude-customizations/.claude/lib/mermaid/MermaidMarkdownFences.psm1 +2 -0
  31. package/resources/claude-customizations/.claude/lib/mermaid/MermaidValidation.psm1 +5 -3
  32. package/resources/claude-customizations/.claude/lib/model-routing/ModelRouting.psm1 +2 -0
  33. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorState.psm1 +11 -0
  34. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCheckpointValue.psm1 +2 -0
  35. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCodexModelReceipts.psm1 +4 -2
  36. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCodexTopologyReceipts.psm1 +4 -2
  37. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCompletion.psm1 +9 -7
  38. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateCompletionChecks.psm1 +4 -2
  39. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateModelReceipts.psm1 +4 -2
  40. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateReceipts.psm1 +3 -1
  41. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateRoutingContract.psm1 +4 -2
  42. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateRoutingMatrix.psm1 +3 -1
  43. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateUnconditional.psm1 +7 -5
  44. package/resources/claude-customizations/.claude/lib/requirements/GeneratedDocumentCounters.psm1 +44 -0
  45. package/resources/claude-customizations/.claude/settings.json +9 -0
  46. package/resources/claude-customizations/.claude/skills/acceptance-criteria-tracking/SKILL.md +2 -0
  47. package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +4 -0
  48. package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +4 -4
  49. package/resources/claude-customizations/.claude/skills/fill-feature-docs/SKILL.md +3 -0
  50. package/resources/claude-customizations/.claude/skills/parallel-add/SKILL.md +14 -9
  51. package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +3 -3
  52. package/resources/claude-customizations/.claude/skills/parallel-plan/SKILL.md +10 -3
  53. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +2 -0
  54. package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +3 -0
  55. package/resources/claude-customizations/pack-manifests/core.json +4 -0
  56. package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
@@ -292,10 +292,10 @@ Every field needed to re-derive state durably on resume (`worktree_path`, `branc
292
292
  and `gh pr view --json state,mergedAt,headRefOid` — the checkpoint is a cache of that durable
293
293
  state, not the source of truth.
294
294
 
295
- Validate the checkpoint via
296
- `python -m scripts.dev_tools.validate_orchestration_artifacts epic-orchestrator-state <path> --require-complete`
297
- (or the equivalent `mcp__drm-copilot__validate_orchestration_artifacts` call with
298
- `artifact_type: "epic-orchestrator-state"`), implemented in
295
+ Validate the checkpoint through the
296
+ `mcp__drm-copilot__validate_orchestration_artifacts` call with
297
+ `artifact_type: "epic-orchestrator-state"`, supplying the `require_complete` argument on
298
+ that same call at the completion gate. The validation is implemented in
299
299
  `scripts/dev_tools/validate_epic_orchestrator_state.py`.
300
300
 
301
301
  ## Completion Requirements
@@ -12,6 +12,8 @@ This direct-use wrapper delegates feature-document work to the `prd-feature` wor
12
12
  - Feature folder issue and research context
13
13
  - Existing spec and user-story files when present
14
14
 
15
+ For a numeric `spec.md` acceptance criterion, the research context must contain complete `## Numeric Derivation Evidence` with `Complete Family`, `Exhaustive Search Scope`, `Inclusion Rules`, `Exclusion Rules`, `Primary Search Strategy or Query Expression`, `Primary Member Set`, `Primary Count`, `Cross-check Search Strategy or Query Expression`, `Cross-check Member Set`, `Cross-check Count`, and `Member-set Comparison`. The two derivations must be non-empty, independently constructed, distinct in strategy or query expression, exhaustive across the complete family, independently enumerated, and explicitly compared. The worker must withhold a numeric assertion for missing, copied, incomplete, non-exhaustive, narrow, or disagreeing evidence; a single grep, a named-pattern-only query, matching totals, distinct query text, or equal member sets alone does not approve a number.
16
+
15
17
  ## Output Paths
16
18
 
17
19
  - `docs/features/active/<feature>/spec.md`
@@ -20,3 +22,4 @@ This direct-use wrapper delegates feature-document work to the `prd-feature` wor
20
22
  ## Worker Routing
21
23
 
22
24
  - Worker: `prd-feature`
25
+ - Require the worker to report the authoritative `research-path` when a numeric acceptance criterion is written.
@@ -21,6 +21,8 @@ this operation may and may not disturb. Read that section before applying anythi
21
21
 
22
22
  ## Prerequisites
23
23
 
24
+ - Reject a pending or not-started run with guidance to consolidate the initial set through `/parallel-plan`. Admit exactly one item only after execution has started in an open run; closed runs are not eligible.
25
+
24
26
  - A parallel run is in progress and `artifacts/orchestration/parallel-orchestrator-state.json`
25
27
  tracks its `parallel_slug`. This skill does not start a run; use `/parallel-plan` and
26
28
  `/parallel-run` for that.
@@ -59,15 +61,18 @@ re-derivation is mandatory and is not an optimization to skip when the checkpoin
59
61
  3. **Compute conflict edges over ALL items, including in-flight ones.** Invoke the contention
60
62
  relation `Test-BlastRadiusConflict` from the destination-runtime PowerShell port
61
63
  `.claude/lib/blast-radius/BlastRadius.psm1`, which is published by push-down and needs no Python
62
- interpreter (`Import-Module .claude/lib/blast-radius/BlastRadius.psm1 -Force`). Its two radius
63
- arguments are the two items' radius hashtables, not strings, and the third argument is the
64
- required parsed `config/blast-radius.json` mapping, which push-down publishes into the
65
- destination workspace. `conflicts(a, b, config)` in `scripts/dev_tools/compute_blast_radius.py`
66
- (defined in `scripts/dev_tools/_blast_radius_conflicts.py`) remains the repository authority and
67
- the parity reference. Read the verdict from the conflict key of the returned hashtable.
68
- The hashtable itself is always truthy, so a bare boolean test on the result treats every pair as
69
- conflicting. Map each conflicting pair onto an `(int, int)` conflict edge
70
- of `items[].issue_num` values, normalized so `a < b`. Do not reimplement the relation and do not
64
+ interpreter (the default PowerShell 5.1 execution policy blocks `Import-Module` of a `.psm1`
65
+ file, so `pwsh` is mandatory: run as `$repoRoot = git rev-parse --show-toplevel; Import-Module
66
+ (Join-Path $repoRoot '.claude/lib/blast-radius/BlastRadius.psm1') -Force -ErrorAction Stop`).
67
+ Its two radius arguments are the two items' radius hashtables, not strings, and the third
68
+ argument is the required parsed `config/blast-radius.json` mapping, which push-down publishes
69
+ into the destination workspace. `conflicts(a, b, config)` in
70
+ `scripts/dev_tools/compute_blast_radius.py` (defined in
71
+ `scripts/dev_tools/_blast_radius_conflicts.py`) remains the repository authority and the parity
72
+ reference. Read the verdict from `$result['conflict']`; do not test the returned hashtable
73
+ itself, since it is always truthy under PowerShell boolean coercion, so a bare `if ($result)`
74
+ check treats every pair as conflicting. Map each conflicting pair onto an `(int, int)` conflict
75
+ edge of `items[].issue_num` values, normalized so `a < b`. Do not reimplement the relation and do not
71
76
  compute edges over the unstarted subset only: an in-flight conflict is precisely what the
72
77
  admission decision turns on.
73
78
 
@@ -478,9 +478,9 @@ pull-request state, merge time, and merge commit. Where the checkpoint disagrees
478
478
  commands, the commands win and the checkpoint is rewritten from them.
479
479
 
480
480
  Validate through `mcp__drm-copilot__validate_orchestration_artifacts` with
481
- `artifact_type: "parallel-orchestrator-state"`, or the equivalent CLI invocation
482
- `poetry run python -m scripts.dev_tools.validate_orchestration_artifacts parallel-orchestrator-state <path>`,
483
- adding `--require-complete` at the completion gate.
481
+ `artifact_type: "parallel-orchestrator-state"`. At the completion gate, pass the
482
+ `require_complete` argument on that same MCP call; no repository-local Python
483
+ interpreter is required at a destination runtime.
484
484
 
485
485
  ## Completion Requirements
486
486
 
@@ -32,6 +32,8 @@ Before proceeding, `parallel-planner` must:
32
32
 
33
33
  ## Item Intake
34
34
 
35
+ Initial intake must provide the complete item set in one `/parallel-plan <slug> <item> [<item> ...]` invocation before waves are calculated. `/parallel-add` is not an initial-intake path.
36
+
35
37
  Invocation shape: `/parallel-plan <slug> <item> [<item> ...]`, where each `<item>` is either a
36
38
  GitHub issue number (already-promoted work) or a potential-entry path (unpromoted work). This is
37
39
  the same intake domain as `/parallel-add`, so initial intake here and F6's add operation accept
@@ -180,9 +182,13 @@ PowerShell port** under `.claude/lib/blast-radius/`, which is published by push-
180
182
  Python interpreter:
181
183
 
182
184
  ```powershell
183
- Import-Module .claude/lib/blast-radius/BlastRadius.psm1 -Force
185
+ $repoRoot = git rev-parse --show-toplevel
186
+ Import-Module (Join-Path $repoRoot '.claude/lib/blast-radius/BlastRadius.psm1') -Force -ErrorAction Stop
184
187
  ```
185
188
 
189
+ The default PowerShell 5.1 execution policy blocks `Import-Module` of a `.psm1` file, so `pwsh` is
190
+ mandatory here.
191
+
186
192
  The facade re-exports the five functions this skill needs: `Get-PlanPaths` (port of
187
193
  `extract_plan_paths`), `Get-BlastRadius` (port of `derive_blast_radius`),
188
194
  `Get-BlastRadiusFromObservedPaths` (port of `radius_from_observed_paths`), `Test-BlastRadius`
@@ -312,8 +318,9 @@ The library returns the partition; the planner supplies the record fields.
312
318
  emptiness is falsy, while this one returns a hashtable whose emptiness is not expressible at all.
313
319
  2. Immediately after the conflict-edge set is derived and before anything consumes it, run the
314
320
  lane-assertion diagnostic:
315
- `poetry run python -m scripts.dev_tools.parallel_lane_assertion --manifest docs/features/parallel/<slug>/parallel.md --edges "<a>:<b> ..."`
316
- (covered by the planner's existing `Bash(poetry run *)` grant). It compares the manifest's
321
+ `bash .claude/lib/bash/report-lane-assertion.sh --manifest docs/features/parallel/<slug>/parallel.md --edges "<a>:<b> ..."`
322
+ (a bash invocation against the published payload; it requires no Python interpreter at the
323
+ destination runtime). It compares the manifest's
317
324
  optional `expected_conflict_components` assertion (invariant M8) against the connected
318
325
  components of the DERIVED conflict graph and prints one `ADVISORY` line per finding in four
319
326
  classes: expected-together-but-derived-apart, expected-apart-but-derived-together, a member
@@ -106,6 +106,8 @@ After the plan is authored, `atomic-executor` runs preflight under the directive
106
106
 
107
107
  The orchestrator records the preflight outcome in `remediation_loop.cycles[current_cycle].preflight` with `iterations` (counter) and `final_status` (`clear|changes_requested|pending`).
108
108
 
109
+ For a well-scoped item where `preflight.iterations > 1`, record a process-defect investigation that identifies the incomplete planner internal-review dimension. Treat excess rounds as a process signal, not routine iteration.
110
+
109
111
  The exhaustive-pass, defect-enumeration, and delta-self-check rules that govern how `atomic-executor` conducts preflight are defined in the `## Preflight Validation (Planner ↔ Executor)` section of `.claude/skills/atomic-plan-contract/SKILL.md` and are not restated here.
110
112
 
111
113
  Alongside `iterations` and `final_status`, the orchestrator also records in `remediation_loop.cycles[current_cycle].preflight` the convergence line `atomic-executor` returned on that round, which is one of `CONVERGENCE: NO FURTHER ROUNDS EXPECTED` or `CONVERGENCE: FURTHER ROUNDS LIKELY`. This convergence field extends the field set already recorded at `remediation_loop.cycles[current_cycle].preflight` rather than replacing it: `iterations` and `final_status` continue to be recorded exactly as stated above, and the convergence field is written in addition to them.
@@ -55,6 +55,8 @@ Create or update a single research file at one of the two tracked research roots
55
55
 
56
56
  - Map acceptance criteria into a concrete design.
57
57
  - Propose state model, transitions, internal API boundaries, and required file changes.
58
+ - For every numeric count, enumeration, or population proposed for an approved `spec.md` acceptance criterion, add complete `## Numeric Derivation Evidence`. Each record must identify `Complete Family`, `Exhaustive Search Scope`, `Inclusion Rules`, `Exclusion Rules`, `Primary Search Strategy or Query Expression`, `Primary Member Set`, `Primary Count`, `Cross-check Search Strategy or Query Expression`, `Cross-check Member Set`, `Cross-check Count`, and `Member-set Comparison`.
59
+ - Both derivations must be non-empty and independently constructed. They must use distinct search strategies or query expressions, independently enumerate the member sets, and explicitly compare normalized member sets. The scope must cover the entire declared family, including all relevant overloads and members; reject a single grep, a narrow named-pattern search, or a query that covers only one family member even when totals and member sets appear equal. Withhold the numeric assertion if the records are incomplete, duplicated, non-exhaustive, narrow, or disagree.
58
60
 
59
61
  ### 5. Testing Implications
60
62
 
@@ -67,3 +69,4 @@ Create or update a single research file at one of the two tracked research roots
67
69
  - Ground all findings in verified evidence from the codebase and authoritative external sources.
68
70
  - Keep discussion of non-selected approaches brief.
69
71
  - Do not claim or perform nested worker delegation.
72
+ - Omit numeric acceptance-criterion facts when the numeric derivation record is absent, incomplete, or disagrees.
@@ -53,6 +53,7 @@
53
53
  ".claude/hooks/validate-feature-review-coverage.ps1",
54
54
  ".claude/hooks/validate-orchestrator-output.ps1",
55
55
  ".claude/hooks/validate-planner-output.ps1",
56
+ ".claude/hooks/validate-prd-feature-output.ps1",
56
57
  ".claude/hooks/validate-required-artifact-output.ps1",
57
58
  ".claude/hooks/validate-task-researcher-output.ps1",
58
59
  ".claude/rules/architecture-boundaries.md",
@@ -110,6 +111,7 @@
110
111
  ".claude/skills/translate-copilot-to-claude/SKILL.md",
111
112
  ".claude/skills/update-status/SKILL.md",
112
113
  ".claude/lib/hook-payload/HookPayload.psm1",
114
+ ".claude/lib/requirements/GeneratedDocumentCounters.psm1",
113
115
  ".claude/lib/model-routing/ModelRouting.psm1",
114
116
  ".claude/lib/orchestrator-state/OrchestratorState.psm1",
115
117
  ".claude/lib/orchestrator-state/OrchestratorStateCompletion.psm1",
@@ -139,9 +141,11 @@
139
141
  ".claude/lib/bash/parallel-cohorts.sh",
140
142
  ".claude/lib/bash/parallel-common.sh",
141
143
  ".claude/lib/bash/parallel-items-validate.sh",
144
+ ".claude/lib/bash/parallel-lane-assertion.sh",
142
145
  ".claude/lib/bash/parallel-manifest-validate.sh",
143
146
  ".claude/lib/bash/parallel-yaml-emit.sh",
144
147
  ".claude/lib/bash/parallel-yaml-scan.sh",
148
+ ".claude/lib/bash/report-lane-assertion.sh",
145
149
  ".claude/lib/bash/validate-parallel-manifest.sh",
146
150
  "config/orchestration-routing.json",
147
151
  "config/blast-radius.json",
@@ -2,7 +2,7 @@ default_permissions = ":danger-full-access"
2
2
 
3
3
  [mcp_servers.drm-copilot]
4
4
  command = "npx"
5
- args = ["-y", "@danmoisan/drm-copilot-mcp@1.1.6"]
5
+ args = ["-y", "@danmoisan/drm-copilot-mcp@1.1.8"]
6
6
  required = true
7
7
  enabled_tools = [
8
8
  "collect_commit_context",