Repo Automation Adapter
Use this skill to keep host-specific workflow execution rules in one place.
Canonical Rule
The drm-copilot MCP server is the only approved execution surface for canonical repository automation covered by this skill.
There is no fallback. If the server is unavailable, the required tool is unavailable, or the MCP call fails, the workflow must stop, persist blocked state when an orchestrator checkpoint is active, and report the missing dependency or failed MCP operation.
Do not replace a required MCP operation with local scripts, git reconstruction, direct filesystem synthesis, VS Code command IDs, or best-effort behavior.
When to Use This Skill
Use this skill when:
- a migrated workflow previously depended on
drmCopilotExtension.*commands, - a workflow needs PR-context collection, issue promotion, feature-folder creation, commit-context collection, customization publishing, hard-lock prompt resolution, or orchestration-artifact validation,
- multiple skills need the same MCP-required execution rule.
Published Codex Automation Surface
The required Codex automation dependency for this repo is the published MCP server:
drm-copilot
Downstream Codex skills must depend on the MCP server name drm-copilot, not on raw VS Code command IDs.
Published MCP Tool Surface
Use these semantic MCP tools when the corresponding operation is required:
collect_commit_contextcollect_pr_contextpush_down_copilot_customizationspush_down_codex_and_agents_customizationsnew_potential_bug_entrynew_potential_entrypotential_to_issuenew_active_feature_folderresolve_execute_hard_lock_promptresolve_atomic_plan_promptvalidate_orchestration_artifactsrun_poshqc_formatrun_poshqc_analyzerun_poshqc_analyze_autofixrun_poshqc_testresolve_orchestration_topologyresolve_provider_routingtransition_prepared_orchestration
Independent Expected Context for Portable Handoff Tools
The three portable prepared-orchestration tools bind a handoff to one specific
destination checkout. Every call to resolve_orchestration_topology,
resolve_provider_routing, and transition_prepared_orchestration must carry
the complete caller-controlled independent expected context:
expected_repository_idexpected_workspace_rootexpected_branchexpected_source_head_shaallowed_head_relationshipexpected_issue_numberexpected_feature_folderexpected_work_modeexpected_plan_pathexpected_plan_sha256
Derive each value from the destination checkout and the caller's own record. The envelope under validation is never the source of the values it is validated against. A call that omits a value, or that copies one from the envelope, is rejected before the service is invoked.
Legacy VS Code command IDs are historical source material only and must not be invoked:
drmCopilotExtension.collectCommitContextdrmCopilotExtension.collectPrContextdrmCopilotExtension.pushDownCopilotCustomizationsdrmCopilotExtension.pushDownCodexAndAgentsCustomizationsdrmCopilotExtension.newPotentialBugEntrydrmCopilotExtension.newPotentialEntrydrmCopilotExtension.potentialToIssuedrmCopilotExtension.newActiveFeatureFolderdrmCopilotExtension.resolveExecuteHardLockPrompt
Adapter Preconditions
Before starting any workflow that depends on this skill, the orchestrator must assume these prerequisites are mandatory:
- the Codex project is trusted so project
.codex/config.tomlloads, - the Codex client is configured with MCP server name
drm-copilot, - the
drm-copilotMCP server is active, - the required MCP tool is exposed by the active server,
- an open workspace folder exists for workspace-targeted operations.
If any prerequisite is missing, stop before mutating workflow state.
Execution Order
For any host-specific workflow step:
- Identify the required
drm-copilotMCP tool. - Call that MCP tool.
- Validate the MCP response according to the calling workflow's contract.
- If the tool is unavailable, the call fails, or the response does not satisfy the contract, stop and record blocked state. Do not execute a replacement path.
Current Adapter Guidance
PR context collection
- Required tool:
collect_pr_context. - When the caller already resolved a base branch, pass that base explicitly.
- For orchestrator remediation loops, PR-context refresh is mandatory after each remediation commit and before each re-review.
- If the tool is unavailable or fails, stop. Do not reconstruct PR context from local git commands.
Commit context collection
- Required tool:
collect_commit_context. - For orchestrator remediation loops, collect commit context only after
git add -Aand only when staged changes exist. - Do not continue to commit-message generation without an on-disk commit-context artifact path produced by the MCP tool.
- If the tool is unavailable or fails, stop. Do not replace it with staged-diff inspection.
Feature promotion and active feature folder creation
Required tools:
new_potential_entrynew_potential_bug_entrypotential_to_issuenew_active_feature_folder
Execute these lifecycle operations as one ordered chain:
- Verify route metadata and selected
${work-mode}are persisted in the canonical checkpoint. - Create or verify pre-issue branch
${promotion-type}/${short-name}beforenew_potential_entryornew_potential_bug_entry. - Create the potential entry with
new_potential_entryornew_potential_bug_entry. - Promote with
potential_to_issue. - Capture numeric issue number from promotion output.
- Rename the branch to
${promotion-type}/${short-name}-${issue-num}. - Create the active feature folder with
new_active_feature_folder.
new_active_feature_folder is not an allowed bootstrap substitute for missing promotion state. If ${issue-num} is missing, non-numeric, or placeholder text, stop before final branch rename or active folder creation. Do not synthesize GitHub issue state, active-folder scaffolding, or placeholder lifecycle variables.
Customization publishing and hard-lock resolution
Required tools:
push_down_copilot_customizationspush_down_codex_and_agents_customizationsresolve_execute_hard_lock_promptresolve_atomic_plan_prompt
If the required tool is unavailable or fails, stop.
Orchestration artifact validation
Required tool:
validate_orchestration_artifacts
Use this tool for canonical validation of plans, policy audits, code reviews, feature audits, and orchestrator state. For orchestrator completion, call it with artifact_type: "orchestrator-state" and require_complete: true.
If the tool is unavailable or fails, stop. Do not substitute direct CLI validation for canonical orchestrator completion.
PowerShell quality gates
Required tools:
run_poshqc_formatrun_poshqc_analyzerun_poshqc_analyze_autofixrun_poshqc_test
When a workflow requires PoshQC execution through MCP, use only these tools. If the required tool is unavailable or fails, stop.
Output Requirements
When this skill is used, the calling workflow must report:
- which MCP operation was required,
- which
drm-copilottool was called, - whether the MCP response satisfied the calling contract,
- the blocked-state reason when the MCP dependency is unavailable or fails.