@danmoisan/drm-copilot-mcp 0.0.5 → 1.0.0

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 (96) hide show
  1. package/out/mcp-server.js +10268 -380
  2. package/package.json +2 -2
  3. package/resources/claude-customizations/.claude/agents/orchestrator.md +6 -2
  4. package/resources/claude-customizations/.claude/agents/pr-author.md +78 -0
  5. package/resources/claude-customizations/.claude/agents/task-researcher.md +10 -6
  6. package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +68 -10
  7. package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +148 -11
  8. package/resources/claude-customizations/.claude/hooks/enforce-completion-helpers.ps1 +163 -0
  9. package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +40 -14
  10. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +198 -0
  11. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +153 -10
  12. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +68 -1
  13. package/resources/claude-customizations/.claude/hooks/validate-pr-author-output.ps1 +136 -0
  14. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +22 -6
  15. package/resources/claude-customizations/.claude/settings.json +22 -0
  16. package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +0 -1
  17. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +76 -2
  18. package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +5 -3
  19. package/resources/claude-customizations/.claude-variants/csharp-legacy/agents/csharp-typed-engineer.md +69 -0
  20. package/resources/claude-customizations/.claude-variants/csharp-legacy/rules/csharp.md +96 -0
  21. package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +77 -0
  22. package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +64 -0
  23. package/resources/claude-customizations/pack-manifests/core.json +65 -0
  24. package/resources/claude-customizations/pack-manifests/csharp-legacy.json +11 -0
  25. package/resources/claude-customizations/pack-manifests/csharp-modern.json +12 -0
  26. package/resources/claude-customizations/pack-manifests/powershell.json +14 -0
  27. package/resources/claude-customizations/pack-manifests/python.json +14 -0
  28. package/resources/claude-customizations/pack-manifests/typescript.json +9 -0
  29. package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +30 -13
  30. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +113 -10
  31. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +33 -8
  32. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +12 -7
  33. package/resources/codex-and-agents-customizations/.codex/config.toml +65 -6
  34. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-checkpoint-monotonic.ps1 +303 -0
  35. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +300 -0
  36. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +148 -0
  37. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-pr-author-skill.ps1 +336 -0
  38. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +83 -17
  39. package/resources/config/orchestration-routing.json +5 -13
  40. package/resources/customizations/.github/agents/pr-author.agent.md +25 -0
  41. package/resources/customizations/.github/agents/task-researcher.agent.md +4 -4
  42. package/resources/customizations/.github/prompts/fillout-prd-feature.prompt.md +1 -1
  43. package/resources/customizations/.github/prompts/research-issue.prompt.md +4 -3
  44. package/resources/codex-and-agents-customizations/.codex/scripts/post-codex-worktree-session.ps1 +0 -5
  45. package/resources/scripts/dev_tools/__init__.py +0 -0
  46. package/resources/scripts/dev_tools/_orchestrator_state_human_interaction.py +0 -127
  47. package/resources/scripts/dev_tools/_orchestrator_state_routing.py +0 -216
  48. package/resources/scripts/dev_tools/agentic_sync.py +0 -819
  49. package/resources/scripts/dev_tools/codex_native_converter/__init__.py +0 -11
  50. package/resources/scripts/dev_tools/codex_native_converter/__main__.py +0 -6
  51. package/resources/scripts/dev_tools/codex_native_converter/cli.py +0 -11
  52. package/resources/scripts/dev_tools/new_active_feature_folder.py +0 -79
  53. package/resources/scripts/dev_tools/new_active_feature_folder_docs.py +0 -268
  54. package/resources/scripts/dev_tools/new_active_feature_folder_flow.py +0 -366
  55. package/resources/scripts/dev_tools/new_active_feature_folder_io.py +0 -306
  56. package/resources/scripts/dev_tools/new_active_feature_folder_markdown.py +0 -252
  57. package/resources/scripts/dev_tools/new_active_feature_folder_models.py +0 -136
  58. package/resources/scripts/dev_tools/new_potential_bug_entry.py +0 -465
  59. package/resources/scripts/dev_tools/potential_to_issue.py +0 -421
  60. package/resources/scripts/dev_tools/potential_to_issue_content.py +0 -212
  61. package/resources/scripts/dev_tools/pr_context/__init__.py +0 -0
  62. package/resources/scripts/dev_tools/pr_context/collector.py +0 -619
  63. package/resources/scripts/dev_tools/pr_context/feature_docs.py +0 -349
  64. package/resources/scripts/dev_tools/pr_context/git.py +0 -153
  65. package/resources/scripts/dev_tools/pr_context/github.py +0 -549
  66. package/resources/scripts/dev_tools/pr_context/models.py +0 -198
  67. package/resources/scripts/dev_tools/pr_context/render.py +0 -342
  68. package/resources/scripts/dev_tools/pr_context/render_feature_excerpts.py +0 -256
  69. package/resources/scripts/dev_tools/pr_context/render_pr_helpers.py +0 -291
  70. package/resources/scripts/dev_tools/pr_context/summary_helpers.py +0 -386
  71. package/resources/scripts/dev_tools/pr_context/verification_evidence.py +0 -171
  72. package/resources/scripts/dev_tools/prompt_mode_contract.py +0 -152
  73. package/resources/scripts/dev_tools/push_down_claude_customizations.py +0 -374
  74. package/resources/scripts/dev_tools/push_down_codex_and_agents_customizations.py +0 -139
  75. package/resources/scripts/dev_tools/push_down_copilot_customizations.py +0 -504
  76. package/resources/scripts/dev_tools/push_down_copilot_customizations_filesystem.py +0 -217
  77. package/resources/scripts/dev_tools/push_down_copilot_customizations_rewrites.py +0 -293
  78. package/resources/scripts/dev_tools/resolve_file_prompt.py +0 -457
  79. package/resources/scripts/dev_tools/resolve_hard_lock_prompt.py +0 -444
  80. package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +0 -246
  81. package/resources/scripts/dev_tools/validate_orchestration_review_artifacts.py +0 -107
  82. package/resources/scripts/dev_tools/validate_orchestrator_state.py +0 -428
  83. package/resources/scripts/dev_tools/validate_policy_audit_artifact.py +0 -448
  84. package/resources/templates/codex_native_converter.py +0 -35
  85. package/resources/templates/collect_commit_context.py +0 -212
  86. package/resources/templates/collect_pr_context.py +0 -74
  87. package/resources/templates/hello_python.py +0 -11
  88. package/resources/templates/new_active_feature_folder.py +0 -67
  89. package/resources/templates/new_potential_bug_entry.py +0 -54
  90. package/resources/templates/potential_to_issue.py +0 -55
  91. package/resources/templates/push_down_claude_customizations.py +0 -409
  92. package/resources/templates/push_down_codex_and_agents_customizations.py +0 -95
  93. package/resources/templates/push_down_copilot_customizations.py +0 -124
  94. package/resources/templates/resolve_atomic_plan_prompt.py +0 -75
  95. package/resources/templates/resolve_hard_lock_prompt.py +0 -65
  96. package/resources/templates/validate_orchestration_artifacts.py +0 -55
@@ -1,11 +0,0 @@
1
- """Bridge the bundled extension runner to the authoritative converter package.
2
-
3
- Purpose:
4
- Expose the bundled ``dev_tools.codex_native_converter`` import path that the
5
- extension wrapper expects while delegating to the authoritative repository
6
- implementation.
7
- """
8
-
9
- from scripts.dev_tools.codex_native_converter.cli import main
10
-
11
- __all__ = ["main"]
@@ -1,6 +0,0 @@
1
- """Run the bundled extension converter bridge as a module."""
2
-
3
- from dev_tools.codex_native_converter.cli import main
4
-
5
- if __name__ == "__main__":
6
- raise SystemExit(main())
@@ -1,11 +0,0 @@
1
- """Delegate the bundled extension converter import path to the root package.
2
-
3
- Purpose:
4
- Preserve the extension-side import contract at
5
- ``dev_tools.codex_native_converter.cli`` while reusing the authoritative
6
- converter CLI implemented under ``scripts.dev_tools``.
7
- """
8
-
9
- from scripts.dev_tools.codex_native_converter.cli import app, apply, main, review
10
-
11
- __all__ = ["main", "app", "apply", "review"]
@@ -1,79 +0,0 @@
1
- """Create an active feature folder from templates and optional potential files."""
2
-
3
- from __future__ import annotations
4
-
5
- from dev_tools.new_active_feature_folder_docs import (
6
- should_use_minor_audit_mode,
7
- update_feature_docs,
8
- )
9
- from dev_tools.new_active_feature_folder_flow import (
10
- create_active_folder,
11
- main,
12
- parse_args,
13
- )
14
- from dev_tools.new_active_feature_folder_io import (
15
- build_folder_slug,
16
- copy_feature_template_for_minor_audit,
17
- copy_template,
18
- default_code_launcher,
19
- default_issue_fetcher,
20
- find_potential_file,
21
- materialize_plan_file,
22
- parse_issue_number,
23
- )
24
- from dev_tools.new_active_feature_folder_markdown import (
25
- format_checklist,
26
- get_section,
27
- set_header_placeholder,
28
- set_section,
29
- upsert_work_mode_marker,
30
- )
31
- from dev_tools.new_active_feature_folder_models import (
32
- EXCLUDED_POTENTIAL_NAMES,
33
- NAME_PATTERN,
34
- PLACEHOLDERS,
35
- PLAN_TIMESTAMP_TEMPLATE_NAME,
36
- ActiveFolderResult,
37
- FileSystem,
38
- IssueMeta,
39
- RealFileSystem,
40
- extract_date_from_timestamp,
41
- resolve_workspace,
42
- validate_feature_name,
43
- )
44
-
45
- __all__ = [
46
- "ActiveFolderResult",
47
- "EXCLUDED_POTENTIAL_NAMES",
48
- "FileSystem",
49
- "IssueMeta",
50
- "NAME_PATTERN",
51
- "PLACEHOLDERS",
52
- "PLAN_TIMESTAMP_TEMPLATE_NAME",
53
- "RealFileSystem",
54
- "build_folder_slug",
55
- "copy_feature_template_for_minor_audit",
56
- "copy_template",
57
- "create_active_folder",
58
- "default_code_launcher",
59
- "default_issue_fetcher",
60
- "extract_date_from_timestamp",
61
- "find_potential_file",
62
- "format_checklist",
63
- "get_section",
64
- "main",
65
- "materialize_plan_file",
66
- "parse_args",
67
- "parse_issue_number",
68
- "resolve_workspace",
69
- "set_header_placeholder",
70
- "set_section",
71
- "should_use_minor_audit_mode",
72
- "update_feature_docs",
73
- "upsert_work_mode_marker",
74
- "validate_feature_name",
75
- ]
76
-
77
-
78
- if __name__ == "__main__":
79
- main()
@@ -1,268 +0,0 @@
1
- """Document update helpers for active feature folder creation."""
2
-
3
- from __future__ import annotations
4
-
5
- from typing import TYPE_CHECKING
6
-
7
- from dev_tools.new_active_feature_folder_markdown import (
8
- format_checklist,
9
- prepend_to_section_body,
10
- set_header_placeholder,
11
- set_section,
12
- update_section_body,
13
- )
14
-
15
- if TYPE_CHECKING:
16
- from pathlib import Path
17
-
18
- from dev_tools.new_active_feature_folder_models import FileSystem
19
-
20
-
21
- def _apply_header_and_sections(
22
- path: Path,
23
- feature_name: str,
24
- issue_field: str,
25
- owner_field: str,
26
- updated_field: str,
27
- parent_field: str,
28
- status_field: str,
29
- version_field: str,
30
- fs: FileSystem,
31
- updates: list[tuple[str, str]],
32
- ) -> None:
33
- """Apply header metadata and optional section overrides to a doc file."""
34
- if not fs.exists(path):
35
- return
36
- content = fs.read_text(path)
37
- content = set_header_placeholder(
38
- content,
39
- feature_name,
40
- issue_field,
41
- owner_field,
42
- updated_field,
43
- status_field=status_field,
44
- parent_field=parent_field,
45
- version_field=version_field,
46
- )
47
- for section_name, body in updates:
48
- content = set_section(content, section_name, body)
49
- fs.write_text(path, content)
50
-
51
-
52
- def update_feature_docs(
53
- feature_type: str,
54
- feature_name: str,
55
- target_dir: Path,
56
- issue_field: str,
57
- owner_field: str,
58
- updated_field: str,
59
- parent_field: str,
60
- status_field: str,
61
- version_field: str,
62
- plan_updated_field: str,
63
- fs: FileSystem,
64
- sections: dict[str, str],
65
- plan_path: Path | None = None,
66
- ) -> list[Path]:
67
- """Populate active docs with header metadata and seeded content."""
68
- files_to_open: list[Path] = []
69
- if feature_type == "feature":
70
- user_story = target_dir / "user-story.md"
71
- spec = target_dir / "spec.md"
72
- plan = plan_path or target_dir / "plan.md"
73
- _apply_header_and_sections(
74
- user_story,
75
- feature_name,
76
- issue_field,
77
- owner_field,
78
- updated_field,
79
- parent_field,
80
- status_field,
81
- version_field,
82
- fs,
83
- [
84
- ("Problem / Why", sections.get("problem", "")),
85
- ("Acceptance Criteria", format_checklist(sections.get("criteria", ""))),
86
- ],
87
- )
88
- _apply_header_and_sections(
89
- spec,
90
- feature_name,
91
- issue_field,
92
- owner_field,
93
- updated_field,
94
- parent_field,
95
- status_field,
96
- version_field,
97
- fs,
98
- [
99
- ("Overview", sections.get("problem", "")),
100
- ("Behavior", sections.get("behavior", "")),
101
- ("Constraints & Risks", sections.get("constraints", "")),
102
- (
103
- "Seeded Test Conditions (from potential)",
104
- format_checklist(sections.get("tests", "")),
105
- ),
106
- ],
107
- )
108
- _apply_header_and_sections(
109
- plan,
110
- feature_name,
111
- issue_field,
112
- owner_field,
113
- plan_updated_field,
114
- parent_field,
115
- status_field,
116
- version_field,
117
- fs,
118
- [],
119
- )
120
- files_to_open.extend([user_story, spec, plan])
121
- elif feature_type == "refactor":
122
- spec = target_dir / "spec.md"
123
- plan = plan_path or target_dir / "plan.md"
124
- _apply_header_and_sections(
125
- spec,
126
- feature_name,
127
- issue_field,
128
- owner_field,
129
- updated_field,
130
- parent_field,
131
- status_field,
132
- version_field,
133
- fs,
134
- [
135
- ("Intent & Outcomes", sections.get("problem", "")),
136
- ("Scope (structural changes)", sections.get("behavior", "")),
137
- ("Risks & Mitigations", sections.get("constraints", "")),
138
- (
139
- "Seeded Test Conditions (from potential)",
140
- format_checklist(sections.get("tests", "")),
141
- ),
142
- ],
143
- )
144
- _apply_header_and_sections(
145
- plan,
146
- feature_name,
147
- issue_field,
148
- owner_field,
149
- plan_updated_field,
150
- parent_field,
151
- status_field,
152
- version_field,
153
- fs,
154
- [],
155
- )
156
- files_to_open.extend([spec, plan])
157
- elif feature_type == "epic":
158
- initiative = target_dir / "initiative.md"
159
- _apply_header_and_sections(
160
- initiative,
161
- feature_name,
162
- issue_field,
163
- owner_field,
164
- updated_field,
165
- parent_field,
166
- status_field,
167
- version_field,
168
- fs,
169
- [],
170
- )
171
- files_to_open.append(initiative)
172
- elif feature_type == "bug":
173
- spec = target_dir / "spec.md"
174
- plan = plan_path or target_dir / "plan.md"
175
-
176
- context_parts: list[str] = []
177
- if sections.get("bug_summary"):
178
- context_parts.append(sections["bug_summary"])
179
- if sections.get("bug_environment"):
180
- context_parts.append(f"Environment:\n{sections['bug_environment']}")
181
- if sections.get("bug_impact"):
182
- context_parts.append(f"Impact / Severity:\n{sections['bug_impact']}")
183
- context_body = "\n\n".join(context_parts)
184
-
185
- repro_parts: list[str] = []
186
- if sections.get("bug_steps"):
187
- repro_parts.append(f"Steps to Reproduce:\n{sections['bug_steps']}")
188
- expected_actual: list[str] = []
189
- if sections.get("bug_expected"):
190
- expected_actual.append(f"Expected:\n{sections['bug_expected']}")
191
- if sections.get("bug_actual"):
192
- expected_actual.append(f"Actual:\n{sections['bug_actual']}")
193
- if expected_actual:
194
- repro_parts.append("\n\n".join(expected_actual))
195
- if sections.get("bug_logs"):
196
- repro_parts.append(f"Logs / Screenshots:\n{sections['bug_logs']}")
197
- repro_body = "\n\n".join(repro_parts)
198
-
199
- updates: list[tuple[str, str]] = []
200
- if context_body:
201
- updates.append(("Context", context_body))
202
- if repro_body:
203
- updates.append(("Repro & Evidence", repro_body))
204
- if sections.get("bug_cause"):
205
- updates.append(("Root Cause Analysis", sections["bug_cause"]))
206
-
207
- bug_validation = sections.get("bug_validation", "").strip()
208
-
209
- _apply_header_and_sections(
210
- spec,
211
- feature_name,
212
- issue_field,
213
- owner_field,
214
- updated_field,
215
- parent_field,
216
- status_field,
217
- version_field,
218
- fs,
219
- updates,
220
- )
221
-
222
- if bug_validation:
223
- spec_content = fs.read_text(spec)
224
-
225
- def update_test_strategy(body: str) -> str:
226
- return prepend_to_section_body(
227
- body,
228
- prefix=f"Seeded from issue:\n\n{bug_validation}",
229
- )
230
-
231
- spec_content, _ = update_section_body(
232
- spec_content,
233
- "Test Strategy",
234
- update_test_strategy,
235
- )
236
- fs.write_text(spec, spec_content)
237
-
238
- _apply_header_and_sections(
239
- plan,
240
- feature_name,
241
- issue_field,
242
- owner_field,
243
- plan_updated_field,
244
- parent_field,
245
- status_field,
246
- version_field,
247
- fs,
248
- [],
249
- )
250
- files_to_open.extend([spec, plan])
251
-
252
- return files_to_open
253
-
254
-
255
- def should_use_minor_audit_mode(
256
- work_mode: str,
257
- feature_type: str,
258
- potential_content: str,
259
- ) -> tuple[bool, str]:
260
- """Return whether minor-audit path should be used and fallback reason."""
261
- del feature_type, potential_content
262
- if work_mode not in ("minor-audit", "full-feature", "full-bug", "full"):
263
- raise ValueError(
264
- "work_mode must be one of: minor-audit, full-feature, full-bug, full"
265
- )
266
- if work_mode != "minor-audit":
267
- return False, ""
268
- return True, ""