@danmoisan/drm-copilot-mcp 0.0.1 → 0.0.5

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 (156) hide show
  1. package/out/mcp-server.js +5 -1
  2. package/package.json +21 -5
  3. package/resources/claude-customizations/.claude/agent-memory/orchestrator/MEMORY.md +15 -3
  4. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_branch_base_check_unmerged_pr_deps.md +16 -0
  5. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_every_change_through_lifecycle.md +15 -0
  6. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_policy_compliance_not_optional.md +18 -0
  7. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_potential_to_issue_creates_github_issue.md +13 -0
  8. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_remediation_plan_em_dash_required.md +13 -0
  9. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_small_bug_uses_minor_audit.md +13 -0
  10. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_test_files_count_against_500_cap.md +13 -0
  11. package/resources/claude-customizations/.claude/agents/atomic-executor.md +7 -7
  12. package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +4 -5
  13. package/resources/claude-customizations/.claude/agents/feature-review.md +7 -3
  14. package/resources/claude-customizations/.claude/agents/orchestrator.md +16 -1
  15. package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +1 -1
  16. package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +245 -0
  17. package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +273 -0
  18. package/resources/claude-customizations/.claude/hooks/enforce-feature-folder-order.ps1 +148 -0
  19. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +190 -0
  20. package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner.ps1 +216 -0
  21. package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +84 -15
  22. package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +1 -1
  23. package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage.ps1 +75 -5
  24. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +93 -0
  25. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +68 -0
  26. package/resources/claude-customizations/.claude/rules/architecture-boundaries.md +46 -0
  27. package/resources/claude-customizations/.claude/rules/benchmark-baselines.md +35 -0
  28. package/resources/claude-customizations/.claude/rules/ci-workflows.md +36 -0
  29. package/resources/claude-customizations/.claude/rules/csharp.md +62 -16
  30. package/resources/claude-customizations/.claude/rules/general-code-change.md +12 -3
  31. package/resources/claude-customizations/.claude/rules/general-unit-test.md +47 -2
  32. package/resources/claude-customizations/.claude/rules/orchestrator-state.md +39 -0
  33. package/resources/claude-customizations/.claude/rules/powershell.md +5 -5
  34. package/resources/claude-customizations/.claude/rules/python.md +4 -3
  35. package/resources/claude-customizations/.claude/rules/quality-tiers.md +51 -0
  36. package/resources/claude-customizations/.claude/rules/typescript.md +37 -8
  37. package/resources/claude-customizations/.claude/settings.json +37 -12
  38. package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +2 -2
  39. package/resources/claude-customizations/.claude/skills/csharp-qa-gate/SKILL.md +25 -10
  40. package/resources/claude-customizations/.claude/skills/execute-hard-lock/SKILL.md +6 -6
  41. package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +8 -8
  42. package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +17 -6
  43. package/resources/claude-customizations/.claude/skills/human-exception-runbook/SKILL.md +52 -0
  44. package/resources/claude-customizations/.claude/skills/human-exception-runbook/example.runbook.md +36 -0
  45. package/resources/claude-customizations/.claude/skills/invoke-csharp-engineer/SKILL.md +4 -4
  46. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +96 -3
  47. package/resources/claude-customizations/.claude/skills/policy-audit-template-usage/SKILL.md +3 -3
  48. package/resources/claude-customizations/.claude/skills/powershell-qa-gate/SKILL.md +4 -4
  49. package/resources/claude-customizations/.claude/skills/pr-base-branch-merge-base/SKILL.md +3 -3
  50. package/resources/claude-customizations/.claude/skills/python-qa-gate/SKILL.md +1 -1
  51. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +90 -17
  52. package/resources/claude-dir-customizations/.mcp.json +3 -3
  53. package/resources/codex-and-agents-customizations/.agents/README.md +1 -1
  54. package/resources/codex-and-agents-customizations/.agents/skills/acceptance-criteria-tracking/SKILL.md +0 -5
  55. package/resources/codex-and-agents-customizations/.agents/skills/architecture-boundaries/SKILL.md +52 -0
  56. package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +16 -8
  57. package/resources/codex-and-agents-customizations/.agents/skills/benchmark-baselines/SKILL.md +44 -0
  58. package/resources/codex-and-agents-customizations/.agents/skills/ci-workflows/SKILL.md +45 -0
  59. package/resources/codex-and-agents-customizations/.agents/skills/commit-message/SKILL.md +3 -11
  60. package/resources/codex-and-agents-customizations/.agents/skills/csharp/SKILL.md +1 -5
  61. package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +1 -6
  62. package/resources/codex-and-agents-customizations/.agents/skills/csharp-orchestration-state-machine/SKILL.md +0 -5
  63. package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +0 -5
  64. package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +0 -5
  65. package/resources/codex-and-agents-customizations/.agents/skills/execute-hard-lock/SKILL.md +8 -17
  66. package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +13 -14
  67. package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +1 -6
  68. package/resources/codex-and-agents-customizations/.agents/skills/fill-feature-docs/SKILL.md +0 -5
  69. package/resources/codex-and-agents-customizations/.agents/skills/general-code-change/SKILL.md +86 -0
  70. package/resources/codex-and-agents-customizations/.agents/skills/general-unit-test/SKILL.md +111 -0
  71. package/resources/codex-and-agents-customizations/.agents/skills/human-exception-runbook/SKILL.md +57 -0
  72. package/resources/codex-and-agents-customizations/.agents/skills/human-exception-runbook/example.runbook.md +36 -0
  73. package/resources/codex-and-agents-customizations/.agents/skills/invoke-csharp-engineer/SKILL.md +0 -9
  74. package/resources/codex-and-agents-customizations/.agents/skills/invoke-powershell-engineer/SKILL.md +0 -9
  75. package/resources/codex-and-agents-customizations/.agents/skills/invoke-python-engineer/SKILL.md +0 -9
  76. package/resources/codex-and-agents-customizations/.agents/skills/make-skill-template/SKILL.md +0 -5
  77. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +93 -8
  78. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-state/SKILL.md +48 -0
  79. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +61 -2
  80. package/resources/codex-and-agents-customizations/.agents/skills/policy-audit-template-usage/SKILL.md +3 -8
  81. package/resources/codex-and-agents-customizations/.agents/skills/policy-compliance-order/SKILL.md +0 -10
  82. package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +4 -8
  83. package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +1 -6
  84. package/resources/codex-and-agents-customizations/.agents/skills/powershell-orchestration-state-machine/SKILL.md +0 -5
  85. package/resources/codex-and-agents-customizations/.agents/skills/powershell-qa-gate/SKILL.md +3 -9
  86. package/resources/codex-and-agents-customizations/.agents/skills/pr-author/SKILL.md +1 -9
  87. package/resources/codex-and-agents-customizations/.agents/skills/pr-base-branch-merge-base/SKILL.md +4 -9
  88. package/resources/codex-and-agents-customizations/.agents/skills/pr-context-artifacts/SKILL.md +0 -5
  89. package/resources/codex-and-agents-customizations/.agents/skills/python/SKILL.md +1 -5
  90. package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +1 -6
  91. package/resources/codex-and-agents-customizations/.agents/skills/python-qa-gate/SKILL.md +0 -5
  92. package/resources/codex-and-agents-customizations/.agents/skills/python-suppressions/SKILL.md +2 -6
  93. package/resources/codex-and-agents-customizations/.agents/skills/quality-tiers/SKILL.md +57 -0
  94. package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +0 -5
  95. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +91 -72
  96. package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/agents/openai.yaml +1 -1
  97. package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +0 -10
  98. package/resources/codex-and-agents-customizations/.agents/skills/review-epic/SKILL.md +0 -5
  99. package/resources/codex-and-agents-customizations/.agents/skills/review-feature/SKILL.md +0 -5
  100. package/resources/codex-and-agents-customizations/.agents/skills/review-staged/SKILL.md +0 -5
  101. package/resources/codex-and-agents-customizations/.agents/skills/self-explanatory-code-commenting/SKILL.md +2 -6
  102. package/resources/codex-and-agents-customizations/.agents/skills/skill-canonical-location-audit/SKILL.md +0 -5
  103. package/resources/codex-and-agents-customizations/.agents/skills/tonality/SKILL.md +86 -0
  104. package/resources/codex-and-agents-customizations/.agents/skills/translate-claude-to-codex/SKILL.md +297 -0
  105. package/resources/codex-and-agents-customizations/.agents/skills/translate-copilot-to-claude/SKILL.md +0 -22
  106. package/resources/codex-and-agents-customizations/.agents/skills/typescript/SKILL.md +1 -5
  107. package/resources/codex-and-agents-customizations/.agents/skills/typescript-suppressions/SKILL.md +2 -6
  108. package/resources/codex-and-agents-customizations/.agents/skills/update-status/SKILL.md +0 -5
  109. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +5 -5
  110. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +91 -63
  111. package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-executor.toml +1 -1
  112. package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
  113. package/resources/codex-and-agents-customizations/.codex/config.toml +51 -136
  114. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +1 -1
  115. package/resources/codex-and-agents-customizations/.codex/prompts/orchestrate-work.md +4 -3
  116. package/resources/codex-and-agents-customizations/.codex/scripts/post-codex-worktree-session.ps1 +5 -0
  117. package/resources/codex-and-agents-customizations/.github/workflows/_validate-orchestrator-state.yml +68 -0
  118. package/resources/codex-and-agents-customizations/.github/workflows/validate-orchestrator-state.yml +15 -0
  119. package/resources/config/orchestration-routing.json +84 -0
  120. package/resources/customizations/.github/agents/Powershell DI Unit Test Engineer.agent.md +1 -1
  121. package/resources/customizations/.github/agents/atomic_executor.agent.md +1 -1
  122. package/resources/customizations/.github/agents/atomic_planning.agent.md +10 -10
  123. package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +6 -2
  124. package/resources/customizations/.github/agents/feature-review.agent.md +2 -2
  125. package/resources/customizations/.github/agents/orchestrator.agent.md +6 -2
  126. package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +4 -4
  127. package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +10 -10
  128. package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +6 -2
  129. package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +2 -2
  130. package/resources/customizations/.github/agents/python-orchestrator.agent.md +6 -2
  131. package/resources/customizations/.github/agents/staged-review.agent.md +1 -1
  132. package/resources/customizations/.github/instructions/powershell-code-change.instructions.md +6 -6
  133. package/resources/customizations/.github/prompts/generate-commit-message-repo.prompt.md +1 -1
  134. package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +5 -3
  135. package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +5 -3
  136. package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +14 -1
  137. package/resources/customizations/.github/skills/feature-promotion-lifecycle/SKILL.md +11 -7
  138. package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +10 -1
  139. package/resources/customizations/.github/skills/pr-base-branch-merge-base/SKILL.md +2 -2
  140. package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +5 -0
  141. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +7 -0
  142. package/resources/scripts/dev_tools/_orchestrator_state_human_interaction.py +127 -0
  143. package/resources/scripts/dev_tools/_orchestrator_state_routing.py +216 -0
  144. package/resources/scripts/dev_tools/push_down_claude_customizations.py +191 -5
  145. package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +103 -411
  146. package/resources/scripts/dev_tools/validate_orchestration_review_artifacts.py +107 -0
  147. package/resources/scripts/dev_tools/validate_orchestrator_state.py +428 -0
  148. package/resources/scripts/dev_tools/validate_policy_audit_artifact.py +448 -0
  149. package/resources/templates/push_down_claude_customizations.py +227 -6
  150. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_repo_root_is_source_of_truth.md +0 -11
  151. package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_vsce_verify_package_location.md +0 -19
  152. package/resources/claude-customizations/.claude/agent-memory/orchestrator/project_extension_location.md +0 -11
  153. package/resources/claude-customizations/.claude/agent-memory/prd-feature/MEMORY.md +0 -1
  154. package/resources/claude-customizations/.claude/agent-memory/prd-feature/project_push_down_pattern.md +0 -13
  155. package/resources/claude-customizations/.claude/agent-memory/task-researcher/MEMORY.md +0 -3
  156. package/resources/claude-customizations/.claude/agent-memory/task-researcher/project_push_down_claude_dir.md +0 -11
@@ -0,0 +1,297 @@
1
+ ---
2
+ name: translate-claude-to-codex
3
+ description: Translate the native Claude Code runtime (CLAUDE.md, .claude/rules/*.md, .claude/skills/<name>/SKILL.md, .claude/agents/*.md, .claude/hooks/*.ps1, .claude/settings.json) into the native Codex ecosystem (AGENTS.md, .codex/config.toml, .codex/agents/*.toml, .agents/skills/<name>/SKILL.md, .codex/hooks.json). Classify each Claude surface into its Codex-native equivalent, preserve mechanical enforceability of every hardening element, diff against existing Codex state, produce a translation plan with an enforceability-preservation ledger for user approval, then apply.
4
+ ---
5
+
6
+ # Translate Claude to Codex
7
+
8
+ Deterministic translation workflow that ports the `.claude/` runtime into the Codex-native customization surface. The primary objective is preservation of mechanical enforceability: every Claude hardening element that blocks an action at the process or OS level must map to a Codex mechanism that blocks at the same level, or be explicitly flagged as a degraded gate with a compensating control.
9
+
10
+ This skill is the inverse of `translate-copilot-to-claude`. It does not modify or delete any `.claude/` source file. Translation is a copy-forward operation.
11
+
12
+ ## When to Use This Skill
13
+
14
+ Use this skill when:
15
+
16
+ - One or more `.claude/` runtime files must be mirrored into the Codex ecosystem.
17
+ - A Claude subagent persona needs to be re-expressed as a Codex agent definition.
18
+ - A batch of `.claude/rules/*.md` path-scoped rules must be re-grounded as Codex instruction or sandbox surfaces.
19
+ - A Claude `PreToolUse` or `SubagentStop` hook must be re-expressed with equivalent Codex blocking semantics.
20
+ - The user wants to know which hardening elements lose mechanical enforceability under Codex before any change is made.
21
+
22
+ ## Authoritative Inputs
23
+
24
+ This skill consumes the Codex ecosystem mapping recorded in `artifacts/research/codex-native-ecosystem.2026-06-16T13-32.md`. That artifact is the source of truth for Codex primitive behavior, discovery order, and enforceability. Do not restate Codex documentation from memory; cite the research artifact.
25
+
26
+ Required source paths under `.claude/` (one or more). Accepted types:
27
+
28
+ - `CLAUDE.md` (repo root standing instructions)
29
+ - `.claude/rules/<name>.md` (path-scoped rules with `paths:` frontmatter)
30
+ - `.claude/skills/<name>/SKILL.md`
31
+ - `.claude/agents/<name>.md`
32
+ - `.claude/hooks/<name>.ps1`
33
+ - `.claude/settings.json` (`permissions`, `hooks` blocks)
34
+
35
+ Optional inputs:
36
+
37
+ - `mode=plan-only` — emit the translation plan and the enforceability ledger, then stop. This is the default.
38
+ - `mode=apply` — apply the plan after it is produced and approved in the same turn.
39
+ - `target-scope=<instruction|skill|agent|hook|permission|all>` — restrict surfaces considered.
40
+ - `timestamp-override=<ISO-8601>` — override the auto-generated evidence-folder timestamp.
41
+
42
+ Apply requires explicit confirmation, either via `mode=apply` or a plain-text approval in the same turn after the plan is shown.
43
+
44
+ ## Codex Discovery Locations (Targets)
45
+
46
+ | Codex surface | Path | Trust precondition |
47
+ |---|---|---|
48
+ | Repo standing instructions | `AGENTS.md` at repo root | none (prompt-level) |
49
+ | Directory-scoped instructions | `<subdir>/AGENTS.md` | none (prompt-level) |
50
+ | Project configuration | `.codex/config.toml` | project `trust_level = "trusted"` |
51
+ | Permissions profiles | `[permissions.<name>]` in `.codex/config.toml` | trusted |
52
+ | Hooks | `[hooks]` in `.codex/config.toml` or `.codex/hooks.json` | trusted; first-run hook trust review |
53
+ | Agents | `.codex/agents/<name>.toml` | trusted |
54
+ | Skills | `.agents/skills/<name>/SKILL.md` | none (repo-wide discovery) |
55
+ | MCP servers | `[mcp_servers.<id>]` in `.codex/config.toml` | trusted |
56
+ | Enterprise managed hooks | `requirements.toml` (`managed_dir`) | admin file placement |
57
+
58
+ An untrusted project skips all `.codex/` layers (config, hooks, agents). Record the trust dependency for every target that requires it; the plan must state that `projects."<abs-path>".trust_level = "trusted"` is set in user-level `~/.codex/config.toml`.
59
+
60
+ ## Phase 1 — Intake and Surface Extraction
61
+
62
+ For each input file:
63
+
64
+ 1. Read the full file with `Read`.
65
+ 2. For Markdown sources, parse YAML frontmatter (`name`, `description`, `paths`, `allowed-tools`, `context`, `agent`, `tools`, `model`, `skills`, `memory`, `hooks`).
66
+ 3. For `.claude/settings.json`, parse the `permissions.allow`, `permissions.deny`, `permissions.additionalDirectories`, `hooks.PreToolUse`, and `hooks.SubagentStop` arrays.
67
+ 4. For `.claude/hooks/*.ps1`, identify the blocking semantics: non-zero `exit`, `Write-Error`, and any emitted `{"decision":"block"}` JSON. Record the matcher that registers the hook in `settings.json`.
68
+ 5. Record each surface element as `{source_path, element, kind, enforceability_class, raw_content}` where `enforceability_class` is one of `os-enforced`, `process-enforced`, `prompt-level`.
69
+
70
+ Never modify or delete source files.
71
+
72
+ ## Phase 2 — Classification Taxonomy
73
+
74
+ Apply these rules in order. Use the first rule that matches.
75
+
76
+ ### 2.1 Mechanical gate (process- or OS-enforced) -> Codex hooks, sandbox, or permissions
77
+
78
+ A Claude element is a mechanical gate when it blocks an action independent of model cooperation:
79
+
80
+ - `.claude/hooks/*.ps1` registered under `hooks.PreToolUse` that exit non-zero or emit `{"decision":"block"}`.
81
+ - `hooks.SubagentStop` validators that exit non-zero to reject subagent completion.
82
+ - `permissions.deny` entries (secret-path read/write blocks).
83
+ - `permissions.allow` tool and path allowlists.
84
+
85
+ Targets, by sub-kind:
86
+
87
+ - **PreToolUse blocker** -> `[hooks] PreToolUse` entry in `.codex/config.toml` (or `.codex/hooks.json`) with a `matcher` on `tool_name`. This is a direct mechanical equivalent. The hook script must block via **exit code `2`** or stdout `{"permissionDecision":"deny","stopReason":"..."}`. Translate the Claude convention (`exit 1` / `{"decision":"block"}`) to the Codex convention (`exit 2` / `permissionDecision: deny`). Preserve the script logic; only the exit/decision contract changes.
88
+ - **SubagentStop hard rejection** -> two targets are required because Codex `SubagentStop` with `{"decision":"block"}` forces continuation rather than rejecting output. (1) A `[hooks] SubagentStop` entry that re-prompts the agent to produce the missing artifact, and (2) a required GitHub Actions status check (`openai/codex-action` job or a `codex exec` wrapper) that runs the same validation and fails the merge if the artifact is absent. The CI check is the hard gate; the in-process hook is best-effort. Flag this as a **degraded gate** in the ledger.
89
+ - **`permissions.deny` path block** -> `[permissions.<name>.filesystem]` deny rule in `.codex/config.toml`, enforced by the OS sandbox. Secret-path denies map to filesystem deny globs and a `read-only` or `workspace-write` sandbox boundary.
90
+ - **`permissions.allow` tool allowlist** -> there is no per-tool allowlist in Codex equivalent to Claude `Skill(...)`/`Agent(...)`/`Bash(...)` allow entries. Re-ground in: `sandbox_mode`, `[permissions.<name>]` filesystem/network rules, MCP `enabled_tools`/`disabled_tools`, and where a built-in tool must be blocked outright, a `PreToolUse` hook with a `matcher` that denies it. Flag any allowlist element that cannot be fully reproduced as a **degraded gate**.
91
+
92
+ Hooks generated by this skill are validation-only unless the user explicitly authorizes state mutation.
93
+
94
+ ### 2.2 Path-scoped declarative rules -> AGENTS.md (with enforceability caveat)
95
+
96
+ `.claude/rules/<name>.md` files carry `paths:` file-extension globs (for example `**/*.py`). Codex has no frontmatter `paths:` glob. Targets:
97
+
98
+ - **Cross-cutting rule** (no narrow path scope, or repo-wide) -> append to repo-root `AGENTS.md`.
99
+ - **Directory-scoped rule** (scope maps cleanly to a directory) -> a nested `<subdir>/AGENTS.md`.
100
+ - **File-extension-scoped rule** (for example Python-only, scattered across directories) -> there is no mechanical Codex equivalent. Re-express as repo-root `AGENTS.md` guidance and, where the rule encodes an enforceable constraint (file-size limit, banned API, test-purity), pair it with the corresponding `PreToolUse` hook from section 2.1 rather than relying on the prose. Flag the loss of automatic glob scoping in the ledger.
101
+
102
+ A `.claude/rules` element that is enforced today only by prose (not by a hook) remains prompt-level in both runtimes; record it as `prompt-level` with no degradation.
103
+
104
+ ### 2.3 Reusable procedures -> Codex skills
105
+
106
+ `.claude/skills/<name>/SKILL.md` maps near-1:1 to `.agents/skills/<name>/SKILL.md`. Reconcile the frontmatter schema:
107
+
108
+ - Keep `name` and `description`.
109
+ - `allowed-tools` has **no** Codex frontmatter equivalent. Do not silently drop it. Re-ground the intended restriction in the agent's `sandbox_mode`, in `[permissions.<name>]`, in MCP `disabled_tools`, or in a `PreToolUse` hook, and record the re-grounding target in the ledger.
110
+ - `context: fork` with `agent:` routing has no Codex equivalent. Re-express the routing as an explicit instruction in the skill body that the orchestrator spawns the named `.codex/agents/<name>.toml` agent.
111
+ - Optional Codex `agents/openai.yaml` may carry UI metadata and tool-dependency hints; create it only if the user requests UI metadata.
112
+
113
+ ### 2.4 Agent personas -> Codex agent definitions
114
+
115
+ `.claude/agents/<name>.md` maps to `.codex/agents/<name>.toml`. Field mapping:
116
+
117
+ - `name` -> `name`; `description` -> `description`; persona body -> `developer_instructions`.
118
+ - `model` -> `model`; reasoning settings -> `model_reasoning_effort`.
119
+ - `tools:` allowlist -> **no direct equivalent.** Approximate via `sandbox_mode`, per-agent `mcp_servers`, and `skills.config` enable/disable toggles. Any tool that the Claude persona forbids and that cannot be removed from the Codex agent's reach via sandbox or MCP scoping must be blocked by a session-level `PreToolUse` hook. Flag every such element as a **degraded gate**.
120
+ - Preloaded `skills:` -> `skills.config` toggles enabling the corresponding `.agents/skills/<name>` packages.
121
+ - `hooks:` on the persona -> Codex hooks are session-level, not agent-definition-level. Re-express as `[hooks]` entries whose `matcher` filters the relevant `tool_name`; note that per-agent hook scoping is not mechanically available.
122
+
123
+ Normalize underscores to hyphens in target filenames (`python_typed_engineer` -> `python-typed-engineer.toml`).
124
+
125
+ ### 2.5 Standing instructions and tone -> AGENTS.md
126
+
127
+ `CLAUDE.md` (tone policy, policy-reading order, architecture overview) maps to repo-root `AGENTS.md`. Concatenation precedence is positional (closest-to-`$CWD` wins). Keep the tone policy near the top so it is not truncated by `project_doc_max_bytes` (default 32 KiB). Cross-reference rather than restate content already placed in nested `AGENTS.md` files.
128
+
129
+ ### 2.6 Out-of-scope content
130
+
131
+ Not translated by this skill:
132
+
133
+ - `.github/` Copilot or Actions surfaces (handled by `translate-copilot-to-claude` in the other direction).
134
+ - `.claude/agent-memory/**` runtime memory state.
135
+ - `artifacts/**` and `docs/**` evidence and feature artifacts.
136
+
137
+ List skipped inputs explicitly in the plan.
138
+
139
+ ## Phase 3 — Target Resolution
140
+
141
+ For each classified element, compute a concrete Codex target path:
142
+
143
+ 1. **PreToolUse hook**: a script under `.codex/hooks/<verb-noun>.ps1` (or reuse the existing `.claude/hooks/*.ps1` logic copied forward) plus a `[hooks] PreToolUse` registration with a `matcher`. Translate exit semantics to Codex (`exit 2` / `permissionDecision: deny`).
144
+ 2. **SubagentStop gate**: a `[hooks] SubagentStop` registration plus a required CI workflow job under `.github/workflows/` invoking `openai/codex-action` or a `codex exec` wrapper with a post-validation step.
145
+ 3. **Permissions**: `[permissions.<name>]` profile in `.codex/config.toml` with `filesystem`, `network`, and `extends` keys; sandbox boundary via `sandbox_mode`.
146
+ 4. **Instruction**: repo-root `AGENTS.md` or `<subdir>/AGENTS.md`.
147
+ 5. **Skill**: `.agents/skills/<kebab-case-name>/SKILL.md`.
148
+ 6. **Agent**: `.codex/agents/<kebab-case-name>.toml`.
149
+ 7. **Project config**: `.codex/config.toml` (`model`, `sandbox_mode`, `approval_policy`, `[agents]`, `[mcp_servers.*]`, `[features]`).
150
+
151
+ Record target paths in the plan. Do not write anything yet.
152
+
153
+ ## Phase 4 — Existing Codex State Diff
154
+
155
+ For every target path:
156
+
157
+ 1. `Read` the existing file when present.
158
+ 2. Compute a per-element delta: `add`, `replace`, `merge`, `skip`, or `conflict` (source and target disagree on substantive content; requires user decision).
159
+ 3. For `.codex/config.toml` tables, compute add-only updates to `[hooks]`, `[permissions.*]`, and `[mcp_servers.*]`. Never remove an existing permission or hook without explicit instruction.
160
+ 4. For `AGENTS.md`, prefer `merge` (append a delimited section) over `replace` to preserve hand-authored content and respect positional precedence.
161
+
162
+ Flag every `conflict` row. Conflicts stop Phase 6 for that row until resolved.
163
+
164
+ ## Phase 5 — Translation Plan and Enforceability Ledger
165
+
166
+ Write the plan to `artifacts/translation/<timestamp>/plan.md`. The timestamp is ISO-8601 UTC per `evidence-and-timestamp-conventions`.
167
+
168
+ Plan structure:
169
+
170
+ ```markdown
171
+ # Translation Plan: Claude -> Codex (<source basename(s)>)
172
+
173
+ Generated: <timestamp>
174
+ Mode: <plan-only | apply>
175
+ Research basis: artifacts/research/codex-native-ecosystem.2026-06-16T13-32.md
176
+
177
+ ## Inputs
178
+ - <source path 1>
179
+ - <source path 2>
180
+
181
+ ## Mapping Table
182
+ | Source Element | Kind | Codex Target | Action | Trust Required |
183
+ |---|---|---|---|---|
184
+ | .claude/hooks/validate-bash.ps1 | PreToolUse | .codex/hooks/validate-bash.ps1 + [hooks].PreToolUse | add | yes |
185
+ | .claude/settings.json deny secrets | permission | [permissions.base.filesystem] deny | add | yes |
186
+ | .claude/rules/python.md | rule | AGENTS.md + PreToolUse hook | merge | partial |
187
+ | .claude/agents/python-typed-engineer.md | agent | .codex/agents/python-typed-engineer.toml | add | yes |
188
+ | .claude/skills/python-qa-gate/SKILL.md | skill | .agents/skills/python-qa-gate/SKILL.md | add | no |
189
+
190
+ ## Enforceability Preservation Ledger
191
+ | Hardening element | Claude class | Codex class | Status | Compensating control |
192
+ |---|---|---|---|---|
193
+ | PreToolUse Bash validator | process-enforced | process-enforced | PRESERVED | exit 2 / permissionDecision deny |
194
+ | SubagentStop artifact gate | process-enforced | process-enforced (CI) | DEGRADED | required GitHub Actions status check |
195
+ | Skill allowed-tools | process-enforced | re-grounded | DEGRADED | sandbox_mode + MCP disabled_tools |
196
+ | rules paths: glob scoping | prompt-level | prompt-level | PRESERVED | per-directory AGENTS.md |
197
+ | Agent tools allowlist | process-enforced | re-grounded | DEGRADED | sandbox_mode + skills.config + PreToolUse hook |
198
+ | permissions.deny secrets | os-enforced | os-enforced | PRESERVED | filesystem deny glob + sandbox |
199
+
200
+ ## Conflicts (require user decision)
201
+ <one row per conflict, or "none">
202
+
203
+ ## New Files
204
+ <list>
205
+
206
+ ## Updated Files
207
+ <list>
208
+
209
+ ## Config Delta (.codex/config.toml)
210
+ - Hooks added: <list of matchers>
211
+ - Permissions profiles added: <list>
212
+ - MCP servers added: <list>
213
+ - Trust precondition: projects."<abs-path>".trust_level = "trusted"
214
+
215
+ ## CI Backstops (for DEGRADED gates)
216
+ - <workflow path : job name : gate enforced>
217
+
218
+ ## Evidence Paths
219
+ - artifacts/translation/<timestamp>/plan.md
220
+ - artifacts/translation/<timestamp>/diff.md (populated after apply)
221
+ ```
222
+
223
+ The Enforceability Preservation Ledger is mandatory. Every element classified `os-enforced` or `process-enforced` in Phase 1 must appear with a `PRESERVED`, `DEGRADED`, or `LOST` status. A `LOST` status (no mechanical Codex equivalent and no compensating control) blocks apply until the user accepts the risk or supplies a control. Always produce the plan artifact, even in `mode=apply`.
224
+
225
+ ## Phase 6 — Apply (only after explicit approval)
226
+
227
+ Execute only when the user invoked `mode=apply` or sent a plain-text approval ("proceed", "apply", "execute the plan") in the same turn after the plan was shown.
228
+
229
+ Apply order (to minimize breakage):
230
+
231
+ 1. **AGENTS.md** — add or merge repo-root and nested instruction files first so downstream agents read current standing instructions.
232
+ 2. **Skills** — write `.agents/skills/<name>/SKILL.md` packages.
233
+ 3. **Hook scripts** — copy hook logic into `.codex/hooks/<name>.ps1`, converting block semantics to `exit 2` / `permissionDecision: deny`. Parse-check each with `pwsh -NoProfile -Command "[System.Management.Automation.Language.Parser]::ParseFile(..., [ref]$null, [ref]$errors)"`.
234
+ 4. **Agents** — write `.codex/agents/<name>.toml`.
235
+ 5. **`.codex/config.toml`** — append `[hooks]`, `[permissions.*]`, `[mcp_servers.*]`, `sandbox_mode`, `approval_policy`, and `[agents]` tables with targeted edits. Never rewrite the whole file.
236
+ 6. **CI backstops** — for every `DEGRADED` SubagentStop gate, add the required GitHub Actions job that runs the equivalent validation and fails the merge.
237
+ 7. **Evidence** — write `artifacts/translation/<timestamp>/diff.md` and copy every new or modified target file under `artifacts/translation/<timestamp>/snapshots/`.
238
+
239
+ After apply, run a verification sweep:
240
+
241
+ - TOML-parse `.codex/config.toml` to confirm validity.
242
+ - Parse-check every `.codex/hooks/*.ps1`.
243
+ - Confirm each new skill `SKILL.md` has valid `name` and `description` frontmatter by reading back the first five lines.
244
+ - Confirm each `.codex/agents/*.toml` carries `name`, `description`, and `developer_instructions`.
245
+ - Re-read the Enforceability Preservation Ledger and confirm no row remains `LOST`.
246
+ - Report the final mapping table with `done` / `skipped` / `conflict-unresolved` statuses.
247
+
248
+ State that hook trust must be granted once via the Codex `/hooks` command, or bypassed in CI with `--dangerously-bypass-hook-trust`. State that the project must be trusted in user-level `~/.codex/config.toml` for `.codex/` layers to load.
249
+
250
+ ## Phase 7 — Reporting
251
+
252
+ Every completion response must include:
253
+
254
+ 1. **Inputs** — source files.
255
+ 2. **Mapping summary** — counts by Codex target kind (instruction, skill, agent, hook, permission, MCP).
256
+ 3. **Action summary** — counts by action (add, replace, merge, skip, conflict).
257
+ 4. **Enforceability summary** — counts by ledger status (PRESERVED, DEGRADED, LOST) with the compensating control for each non-preserved row.
258
+ 5. **Files changed** — explicit created and modified paths.
259
+ 6. **Config delta** — hooks, permissions, MCP servers added; trust precondition.
260
+ 7. **CI backstops** — workflow jobs added for degraded gates.
261
+ 8. **Evidence paths** — artifact locations.
262
+ 9. **Conflicts** — unresolved conflict rows, or "none".
263
+
264
+ ## Guarantees and Prohibitions
265
+
266
+ - **Enforceability accounting**: no mechanically-enforced Claude gate is dropped without an explicit ledger row and a stated status. A `LOST` status blocks apply.
267
+ - **Idempotency**: running the skill twice on the same input produces no new changes beyond the regenerated plan artifact.
268
+ - **No source deletion**: `.claude/` files are never modified or removed.
269
+ - **No silent overwrites**: existing Codex content is merged by default. Replace requires user instruction or a resolved `conflict` row.
270
+ - **No hook-based state mutation**: generated hooks are validation-only unless the user authorizes otherwise.
271
+ - **No `config.toml` rewrites**: only targeted edits that append tables.
272
+ - **No `notify` as a gate**: the Codex `notify` program is fire-and-forget and cannot block. Use `PreToolUse` / `PermissionRequest` hooks for blocking, never `notify`.
273
+ - **Trust dependency disclosed**: every target requiring `trust_level = "trusted"` is recorded; the skill never assumes silent trust.
274
+
275
+ ## Classification Quick Reference
276
+
277
+ | Claude source | Default Codex target | Enforceability note |
278
+ |---|---|---|
279
+ | `CLAUDE.md` | repo-root `AGENTS.md` | prompt-level both sides; positional precedence |
280
+ | `.claude/rules/*.md` (`paths:` glob) | `AGENTS.md` (+ per-directory) | no glob equivalent; pair enforceable rules with hooks |
281
+ | `.claude/skills/<name>/SKILL.md` | `.agents/skills/<name>/SKILL.md` | drop `allowed-tools`/`context`; re-ground in sandbox/MCP/hook |
282
+ | `.claude/agents/<name>.md` | `.codex/agents/<name>.toml` | model + sandbox OS-enforced; tools allowlist re-grounded |
283
+ | `.claude/settings.json` `permissions` | `[permissions.<name>]` in `config.toml` | OS-enforced via sandbox; more expressive than Claude |
284
+ | `.claude/hooks/*.ps1` (PreToolUse) | `[hooks] PreToolUse` + script | direct equivalent; exit 2 / permissionDecision deny |
285
+ | `.claude/hooks/*.ps1` (SubagentStop, exit 1) | `[hooks] SubagentStop` + required CI check | degraded; CI status check is the hard gate |
286
+ | `permissions.deny` (secrets) | `[permissions.<name>.filesystem]` deny | OS-enforced |
287
+
288
+ ## Invocation Examples
289
+
290
+ - Translate the settings enforcement surface, plan only:
291
+ `translate-claude-to-codex .claude/settings.json`
292
+ - Translate a hook with its registration and apply:
293
+ `translate-claude-to-codex .claude/hooks/validate-bash.ps1 .claude/settings.json mode=apply`
294
+ - Translate an agent persona bundle (persona + its rules + its hooks):
295
+ `translate-claude-to-codex .claude/agents/python-typed-engineer.md .claude/rules/python.md .claude/hooks/enforce-python-batch-budget.ps1 target-scope=all`
296
+ - Translate the full runtime:
297
+ `translate-claude-to-codex CLAUDE.md .claude/rules .claude/skills .claude/agents .claude/hooks .claude/settings.json mode=plan-only`
@@ -1,25 +1,3 @@
1
- # Converted skill
2
-
3
- Applied rewrites:
4
- - Rewrite merged standing-guidance source paths to the native AGENTS.md target.
5
- - Rewrite merged standing-guidance source paths to the native AGENTS.md target.
6
- - Rewrite GitHub Copilot standing guidance paths to AGENTS.md.
7
- - Rewrite GitHub Copilot path-scoped instructions to shared skill paths.
8
- - Rewrite GitHub Copilot agent manifest paths to Codex agent paths.
9
- - Rewrite GitHub Copilot instruction-directory references to the native skill root.
10
- - Rewrite GitHub Copilot skill-directory references to the native skill root.
11
- - Rewrite GitHub Copilot agent-directory references to the native agent root.
12
- - Rewrite Claude skill paths to shared skill paths.
13
- - Rewrite Claude agent manifest paths to Codex agent paths.
14
- - Rewrite Claude hook paths to Codex hook paths.
15
- - Rewrite Claude settings paths to Codex config paths.
16
- - Rewrite Claude rule paths to shared skill paths.
17
- - Rewrite Claude rules-directory references to the native skill root.
18
- - Rewrite Claude skill-directory references to the native skill root.
19
- - Rewrite Claude agent-directory references to the native agent root.
20
- - Rewrite Claude hook-directory references to the native hook root.
21
- - Rewrite GitHub prompt-directory references to the native shared skill root when repository prompt launchers are disabled.
22
-
23
1
  ---
24
2
  name: translate-copilot-to-claude
25
3
  description: Translate one or more GitHub Copilot native files (AGENTS.md, .agents/skills/*.instructions.md, .codex/agents/*.agent.md, .agents/skills/*.prompt.md, .agents/skills/<name>/SKILL.md) into the native Claude runtime. Classify each section into agent/rule/skill/hook surfaces, diff against existing .claude/ state, produce a translation plan for user approval, and then apply the plan.
@@ -1,9 +1,5 @@
1
- # Converted skill
2
-
3
- Applied rewrites:
4
- - Rewrite Claude skill-directory references to the native skill root.
5
-
6
1
  ---
2
+ name: typescript
7
3
  paths:
8
4
  - "**/*.ts"
9
5
  description: TypeScript-specific toolchain and coding standards.
@@ -1,12 +1,8 @@
1
- # Converted skill
2
-
3
- Applied rewrites:
4
- - None
5
-
6
1
  ---
2
+ name: typescript-suppressions
7
3
  paths:
8
4
  - "**/*.ts"
9
- description: Pre-authorized ESLint and TypeScript suppression patterns. Applies to TypeScript files.
5
+ description: TypeScript suppression policy for linting and type-checking exceptions.
10
6
  ---
11
7
 
12
8
  # TypeScript Suppression Policy
@@ -1,8 +1,3 @@
1
- # Converted skill
2
-
3
- Applied rewrites:
4
- - None
5
-
6
1
  ---
7
2
  name: update-status
8
3
  description: Invoke the status-updater worker to reconcile status artifacts and synchronized status outputs.
@@ -29,10 +29,10 @@ tools:
29
29
  - "Bash(npx jest *)"
30
30
  - "Bash(pwsh *)"
31
31
  - "Bash(git *)"
32
- - "mcp__drmCopilotExtension__run_poshqc_format"
33
- - "mcp__drmCopilotExtension__run_poshqc_analyze"
34
- - "mcp__drmCopilotExtension__run_poshqc_test"
35
- - "mcp__drmCopilotExtension__run_poshqc_analyze_autofix"
32
+ - "mcp__drm-copilot__run_poshqc_format"
33
+ - "mcp__drm-copilot__run_poshqc_analyze"
34
+ - "mcp__drm-copilot__run_poshqc_test"
35
+ - "mcp__drm-copilot__run_poshqc_analyze_autofix"
36
36
  skills:
37
37
  - policy-compliance-order
38
38
  - atomic-plan-contract
@@ -86,7 +86,7 @@ Use the scoped tool patterns for quality gates:
86
86
 
87
87
  - **Python**: `poetry run black`, `poetry run ruff`, `poetry run pyright`, `poetry run pytest`
88
88
  - **TypeScript**: `npx prettier`, `npx eslint`, `npx tsc`, `npx jest`
89
- - **PowerShell**: MCP server functions (`mcp__drmCopilotExtension__run_poshqc_format`, `mcp__drmCopilotExtension__run_poshqc_analyze`, `mcp__drmCopilotExtension__run_poshqc_test`, `mcp__drmCopilotExtension__run_poshqc_analyze_autofix`)
89
+ - **PowerShell**: MCP server functions (`mcp__drm-copilot__run_poshqc_format`, `mcp__drm-copilot__run_poshqc_analyze`, `mcp__drm-copilot__run_poshqc_test`, `mcp__drm-copilot__run_poshqc_analyze_autofix`)
90
90
  - **Git**: `git diff`, `git status`, `git log`
91
91
 
92
92
  Run toolchain in order: format, lint, type-check, test. Restart from step 1 if any step fails or changes files.
@@ -1,48 +1,14 @@
1
1
  name = "orchestrator"
2
- description = "Converted subagent"
2
+ description = "Deterministic repository orchestrator that estimates change budget, selects a workflow path, delegates to specialist subagents, persists checkpoint state, and enforces completion gates."
3
+ model_reasoning_effort = "high"
4
+ default_permissions = "orchestrator-workspace"
3
5
  developer_instructions = '''
4
- Applied rewrites:
5
- - Rewrite merged standing-guidance source paths to the native AGENTS.md target.
6
- - Rewrite Claude rules-directory references to the native skill root.
7
-
8
- Use the following repo-local skills as the canonical workflow source:
9
- - orchestrator-workflow
10
- - feature-promotion-lifecycle
11
- - atomic-plan-contract
12
- - acceptance-criteria-tracking
13
- - evidence-and-timestamp-conventions
14
-
15
- ---
16
- name: orchestrator
17
- description: Deterministic repository orchestrator that estimates change budget, selects small or large workflow path, delegates to specialist subagents, persists checkpoint state, and enforces completion gates proactively.
18
- tools:
19
- - "Agent(atomic-planner,atomic-executor,feature-review,task-researcher,prd-feature,staged-review,epic-review,status-updater,python-typed-engineer,powershell-typed-engineer,csharp-typed-engineer,typescript-engineer)"
20
- - Read
21
- - Grep
22
- - Glob
23
- - "Bash(git *)"
24
- - "Bash(poetry run *)"
25
- - "Bash(npx *)"
26
- - "Bash(pwsh *)"
27
- - "mcp__drmCopilotExtension__.*"
28
- skills:
29
- - policy-compliance-order
30
- - feature-promotion-lifecycle
31
- - atomic-plan-contract
32
- - acceptance-criteria-tracking
33
- - evidence-and-timestamp-conventions
34
- memory: project
35
- hooks:
36
- Stop:
37
- - matcher: ""
38
- body: "Block termination unless artifacts/orchestration/orchestrator-state.json has been updated with current completed_steps and next_step, and all required artifact paths for the selected workflow path have been confirmed on disk."
39
- ---
40
-
41
6
  # Orchestrator Agent
42
7
 
43
- You are an orchestration-only agent. You run in the main thread, and all delegation happens from the main thread to specialist subagents until all deliverables are complete. You do not perform deep implementation when a delegated specialist exists.
8
+ You are an orchestration-only agent. You run in the main thread, and all required delegation happens from the main thread to specialist subagents until all deliverables are complete. Do not perform deep implementation when a delegated specialist exists.
44
9
 
45
10
  Use the following repo-local skills as the canonical workflow source:
11
+ - orchestrate
46
12
  - orchestrator-workflow
47
13
  - feature-promotion-lifecycle
48
14
  - repo-automation-adapter
@@ -57,36 +23,53 @@ Use the following repo-local skills as the canonical workflow source:
57
23
  On every invocation:
58
24
 
59
25
  1. Read `AGENTS.md` for repository tone policy and architecture context.
60
- 2. Read applicable `.agents/skills/` files for languages in scope.
26
+ 2. Read applicable `.agents/skills/` files for the languages and workflow surfaces in scope.
61
27
  3. Read `artifacts/orchestration/orchestrator-state.json` to check for existing checkpoint state.
62
- 4. If a valid checkpoint exists with a matching objective, resume from the recorded `next_step`.
63
- 5. If no checkpoint exists or the objective is new, begin from change-budget estimation.
28
+ 4. Read `config/orchestration-routing.json`.
29
+ 5. If a valid checkpoint exists with a matching objective, resume from the recorded `next_step`.
30
+ 6. If no checkpoint exists or the objective is new, begin from change-budget estimation.
64
31
 
65
32
  ## Change Budget Routing
66
33
 
67
34
  The first action is always to estimate the change budget by identifying likely affected production files and tests:
68
35
 
69
- - **Small path** (13 production files + corresponding tests): promotion, active folder, minimal plan, implementation, QC, small-audit review.
70
- - **Large path** (4+ production files or cross-cutting changes): scope, promotion, research, spec, atomic planning, atomic execution, feature review.
36
+ - Small path: 1-3 production files plus corresponding tests.
37
+ - Large path: 4 or more production files, cross-cutting changes, mixed-language changes, or any request the applicable router cannot clear for the small path.
38
+
39
+ After selecting the path, persist `route_id`, `required_agents`, `required_skills`, and `required_mcp_tools` from `config/orchestration-routing.json`. These lists are validator-enforced. Do not hand-author a different list.
71
40
 
72
41
  ## Delegation Model
73
42
 
74
- Delegate exclusively through configured subagents:
43
+ Delegate exclusively through configured subagents for required specialist steps:
44
+
45
+ - `atomic-planner`: planning only.
46
+ - `atomic-executor`: preflight validation and execution only.
47
+ - `feature-review`: policy, code, and feature audit artifacts.
48
+ - `task-researcher`: research artifacts under `artifacts/research/`.
49
+ - `prd-feature`: issue, specification, and user-story authoring when full feature or bug workflow requires it.
50
+ - `staged-review`: staged-diff review when the workflow requires pre-commit inspection.
51
+ - `epic-review`: epic-level review when the promoted work item is an epic.
52
+ - `status-updater`: status and issue-update artifact production when the workflow requires status synchronization.
53
+ - `python-typed-engineer`: Python implementation specialist.
54
+ - `powershell-typed-engineer`: PowerShell implementation specialist.
55
+ - `csharp-typed-engineer`: C# implementation specialist.
56
+ - `typescript-engineer`: TypeScript implementation specialist.
57
+ - `commit-steward`: commit message generation from commit-context artifacts when available.
75
58
 
76
- - `atomic-planner` generates phased implementation plans (planning only)
77
- - `atomic-executor` — executes approved plans task-by-task (execution only)
78
- - `feature-review` — produces policy, code, and feature audit artifacts
79
- - `task-researcher` — performs deep research and writes findings to `artifacts/research/`
59
+ For required delegated steps, delegation is mandatory. If a handoff cannot be started, resumed, or completed with the required result contract, persist blocked state and stop. Do not perform the required delegated step locally.
80
60
 
81
- For required delegated steps, delegation is mandatory. If a handoff cannot be started, resumed, or completed, stop and report blocked state and do not perform the step locally.
61
+ Every agent named above must exist as a native Codex agent under `.codex/agents/`. If any required delegated agent is missing, treat that as `spawn_agent_unavailable`, persist blocked state, and stop.
82
62
 
83
63
  ## Mandatory Delegation Gates
84
64
 
85
65
  - Treat `spawn_agent` availability as the mechanical availability signal for required delegated specialists.
86
66
  - For required delegated steps, you must delegate or stop execution.
67
+ - If a required delegated step cannot complete, stop and report blocked state.
87
68
  - For planning steps, do not perform planning locally when delegation is required.
88
69
  - For delivery steps, do not perform preflight validation, execution, or post-delivery validation locally when delegation is required.
89
70
  - For review steps, do not perform post-implementation review locally when delegation is required.
71
+ - Do not infer unavailability from missing nicknames, missing prior agent instances, or lack of a dedicated launcher alias.
72
+ - Do not substitute local execution for a missing required delegated agent.
90
73
  - Do not treat a delegated step as complete until the delegate returns the required output contract for that step and the required on-disk artifacts exist.
91
74
  - Do not accept PASS outcomes that rely on stale PR-context artifacts, missing receipts, or missing required evidence-backed QA artifacts.
92
75
  - If the canonical checkpoint belongs to an unrelated in-progress mission, stop with `checkpoint_conflict`.
@@ -96,26 +79,71 @@ For required delegated steps, delegation is mandatory. If a handoff cannot be st
96
79
 
97
80
  ## Checkpoint Persistence
98
81
 
99
- Update `artifacts/orchestration/orchestrator-state.json` after every completed step with:
82
+ Use only this checkpoint path:
100
83
 
101
- - `objective`, `change_budget_estimate`, `path_selected` (small or large)
102
- - Variables: `promotion-type`, `short-name`, `issue-num`, `feature-folder`
84
+ - `artifacts/orchestration/orchestrator-state.json`
85
+
86
+ Update it after every completed step with:
87
+
88
+ - `objective`, `change_budget_estimate`, `path_selected`
89
+ - `route_id`, `required_agents`, `required_skills`, `required_mcp_tools`
90
+ - lifecycle variables including `promotion-type`, `short-name`, `issue-num`, `feature-folder`
103
91
  - `completed_steps`, `next_step`, `last_updated`
104
- - Step statuses: `step5_status` through `step10_status`
92
+ - `step5_status` through `step10_status`
105
93
  - `delegation_receipts`, `blocked_reason`
106
- - Persist raw promotion MCP receipts under:
107
- - `delegation_receipts.promotion.potential_entry`
108
- - `delegation_receipts.promotion.issue`
109
- - `delegation_receipts.promotion.feature_folder`
110
- - Each `delegation_receipts.promotion.*` field stores the raw MCP receipt payload from the matching promotion operation.
94
+ - `skill_receipts`, `mcp_call_receipts`
95
+ - `local_execution_overrides`, `delegation_bypasses`, `lifecycle_operations`
96
+ - raw promotion MCP receipts under `delegation_receipts.promotion.potential_entry`, `delegation_receipts.promotion.issue`, and `delegation_receipts.promotion.feature_folder`
97
+
98
+ Each required skill in the selected route must have a `skill_receipts[]` entry with `required = true` and non-empty `evidence`. Each required MCP tool must have an `mcp_call_receipts[]` entry with `ok = true` and non-empty `evidence`. `local_execution_overrides` and `delegation_bypasses` must remain empty at completion. Any lifecycle operation recorded in `lifecycle_operations[]` must use `surface = "mcp"`.
99
+
100
+ ## Native Automation Surface
101
+
102
+ Use the `drm-copilot` MCP server as the preferred host automation surface. Do not call VS Code command IDs such as `drmCopilotExtension.*` directly.
103
+
104
+ Required lifecycle and validation automation must use the native MCP tools when available:
105
+
106
+ - `new_potential_entry`
107
+ - `new_potential_bug_entry`
108
+ - `potential_to_issue`
109
+ - `new_active_feature_folder`
110
+ - `collect_commit_context`
111
+ - `collect_pr_context`
112
+ - `validate_orchestration_artifacts`
113
+ - `resolve_atomic_plan_prompt`
114
+ - `resolve_execute_hard_lock_prompt`
115
+
116
+ If the MCP server is unavailable for a step that requires it, stop and record the missing dependency instead of inventing equivalent state.
111
117
 
112
118
  ## Completion Requirements
113
119
 
114
120
  Do not report completion until:
115
121
 
116
122
  1. All required steps for the selected workflow path are complete.
117
- 2. All validation gates (toolchain, acceptance criteria, audit artifacts) have passed.
118
- 3. The checkpoint file reflects the completed state.
119
- 4. Acceptance criteria in AC source files have been checked off per the `acceptance-criteria-tracking` skill.
120
- 5. Do not claim mission completion unless all required delegations completed with receipts and the required orchestration artifacts exist on disk.
123
+ 2. All required delegations completed with receipts and required on-disk artifacts.
124
+ 3. Toolchain, acceptance criteria, audit, and review gates have passed.
125
+ 4. Acceptance criteria in AC source files have been checked off per `acceptance-criteria-tracking`.
126
+ 5. The checkpoint file reflects the final completed state.
127
+ 6. The checkpoint proves the selected routing matrix entry: all required agents have delegation receipts, all required skills have skill receipts, all required MCP tools have successful MCP receipts, and no local bypass list is populated.
128
+ 7. The deterministic MCP validator passes: `validate_orchestration_artifacts` with `artifact_type = "orchestrator-state"`, `artifact_path = "artifacts/orchestration/orchestrator-state.json"`, and `require_complete = true`.
129
+ 8. Required GitHub checks are green for the current PR head SHA before any PR/DONE transition.
130
+
131
+ The MCP validator and required CI checks are the hard completion boundary. There is no fallback. If the MCP server or validation tool is unavailable, stop and persist blocked state. Codex lifecycle hooks may provide local feedback, but they are not the authoritative completion gate.
132
+
133
+ Do not claim mission completion unless all required delegations completed with receipts and the required orchestration artifacts exist on disk.
121
134
  '''
135
+
136
+ [mcp_servers.drm-copilot]
137
+ enabled = true
138
+
139
+ [skills.config]
140
+ policy-compliance-order = true
141
+ orchestrate = true
142
+ orchestrator-workflow = true
143
+ feature-promotion-lifecycle = true
144
+ repo-automation-adapter = true
145
+ atomic-plan-contract = true
146
+ acceptance-criteria-tracking = true
147
+ evidence-and-timestamp-conventions = true
148
+ pr-context-artifacts = true
149
+ pr-base-branch-merge-base = true
@@ -1,5 +1,5 @@
1
1
  name = "powershell-atomic-executor"
2
- description = "Execute atomic_planner plans verbatim with atomic_executor rigor and PowerShell-specialized MCP quality gates (`mcp__drmCopilotExtension__run_poshqc_format`, `mcp__drmCopilotExtension__run_poshqc_analyze`, `mcp__drmCopilotExtension__run_poshqc_test`, `mcp__drmCopilotExtension__run_poshqc_analyze_autofix`), Pester, DI and mocking rules, and zero-regression deltas."
2
+ description = "Execute atomic_planner plans verbatim with atomic_executor rigor and PowerShell-specialized MCP quality gates (`mcp__drm-copilot__run_poshqc_format`, `mcp__drm-copilot__run_poshqc_analyze`, `mcp__drm-copilot__run_poshqc_test`, `mcp__drm-copilot__run_poshqc_analyze_autofix`), Pester, DI and mocking rules, and zero-regression deltas."
3
3
 
4
4
  developer_instructions = """
5
5
  You are a PowerShell-aware execution wrapper for atomic-plan execution in Codex.
@@ -33,7 +33,7 @@ tools:
33
33
  - Grep
34
34
  - Glob
35
35
  - "Bash(pwsh *)"
36
- - mcp__drmCopilotExtension__.*
36
+ - mcp__drm-copilot__.*
37
37
  - Write
38
38
  - Edit
39
39
  skills: