@danmoisan/drm-copilot-mcp 0.0.6 → 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 (62) hide show
  1. package/out/mcp-server.js +10213 -398
  2. package/package.json +2 -2
  3. package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +127 -17
  4. package/resources/claude-customizations/.claude/hooks/enforce-completion-helpers.ps1 +163 -0
  5. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +0 -12
  6. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +68 -1
  7. package/resources/config/orchestration-routing.json +3 -3
  8. package/resources/codex-and-agents-customizations/.codex/scripts/post-codex-worktree-session.ps1 +0 -5
  9. package/resources/scripts/dev_tools/__init__.py +0 -0
  10. package/resources/scripts/dev_tools/_orchestrator_state_human_interaction.py +0 -127
  11. package/resources/scripts/dev_tools/_orchestrator_state_routing.py +0 -216
  12. package/resources/scripts/dev_tools/agentic_sync.py +0 -819
  13. package/resources/scripts/dev_tools/codex_native_converter/__init__.py +0 -11
  14. package/resources/scripts/dev_tools/codex_native_converter/__main__.py +0 -6
  15. package/resources/scripts/dev_tools/codex_native_converter/cli.py +0 -11
  16. package/resources/scripts/dev_tools/new_active_feature_folder.py +0 -79
  17. package/resources/scripts/dev_tools/new_active_feature_folder_docs.py +0 -268
  18. package/resources/scripts/dev_tools/new_active_feature_folder_flow.py +0 -366
  19. package/resources/scripts/dev_tools/new_active_feature_folder_io.py +0 -306
  20. package/resources/scripts/dev_tools/new_active_feature_folder_markdown.py +0 -252
  21. package/resources/scripts/dev_tools/new_active_feature_folder_models.py +0 -136
  22. package/resources/scripts/dev_tools/new_potential_bug_entry.py +0 -465
  23. package/resources/scripts/dev_tools/potential_to_issue.py +0 -421
  24. package/resources/scripts/dev_tools/potential_to_issue_content.py +0 -212
  25. package/resources/scripts/dev_tools/pr_context/__init__.py +0 -0
  26. package/resources/scripts/dev_tools/pr_context/collector.py +0 -619
  27. package/resources/scripts/dev_tools/pr_context/feature_docs.py +0 -349
  28. package/resources/scripts/dev_tools/pr_context/git.py +0 -153
  29. package/resources/scripts/dev_tools/pr_context/github.py +0 -549
  30. package/resources/scripts/dev_tools/pr_context/models.py +0 -198
  31. package/resources/scripts/dev_tools/pr_context/render.py +0 -342
  32. package/resources/scripts/dev_tools/pr_context/render_feature_excerpts.py +0 -256
  33. package/resources/scripts/dev_tools/pr_context/render_pr_helpers.py +0 -291
  34. package/resources/scripts/dev_tools/pr_context/summary_helpers.py +0 -386
  35. package/resources/scripts/dev_tools/pr_context/verification_evidence.py +0 -171
  36. package/resources/scripts/dev_tools/prompt_mode_contract.py +0 -152
  37. package/resources/scripts/dev_tools/push_down_claude_customizations.py +0 -403
  38. package/resources/scripts/dev_tools/push_down_claude_filesystem.py +0 -472
  39. package/resources/scripts/dev_tools/push_down_claude_pack_selection.py +0 -401
  40. package/resources/scripts/dev_tools/push_down_codex_and_agents_customizations.py +0 -139
  41. package/resources/scripts/dev_tools/push_down_copilot_customizations.py +0 -504
  42. package/resources/scripts/dev_tools/push_down_copilot_customizations_filesystem.py +0 -217
  43. package/resources/scripts/dev_tools/push_down_copilot_customizations_rewrites.py +0 -293
  44. package/resources/scripts/dev_tools/resolve_file_prompt.py +0 -457
  45. package/resources/scripts/dev_tools/resolve_hard_lock_prompt.py +0 -444
  46. package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +0 -246
  47. package/resources/scripts/dev_tools/validate_orchestration_review_artifacts.py +0 -107
  48. package/resources/scripts/dev_tools/validate_orchestrator_state.py +0 -505
  49. package/resources/scripts/dev_tools/validate_policy_audit_artifact.py +0 -472
  50. package/resources/templates/codex_native_converter.py +0 -35
  51. package/resources/templates/collect_commit_context.py +0 -212
  52. package/resources/templates/collect_pr_context.py +0 -74
  53. package/resources/templates/hello_python.py +0 -11
  54. package/resources/templates/new_active_feature_folder.py +0 -67
  55. package/resources/templates/new_potential_bug_entry.py +0 -54
  56. package/resources/templates/potential_to_issue.py +0 -55
  57. package/resources/templates/push_down_claude_customizations.py +0 -233
  58. package/resources/templates/push_down_codex_and_agents_customizations.py +0 -95
  59. package/resources/templates/push_down_copilot_customizations.py +0 -124
  60. package/resources/templates/resolve_atomic_plan_prompt.py +0 -75
  61. package/resources/templates/resolve_hard_lock_prompt.py +0 -65
  62. 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, ""