@danmoisan/drm-copilot-mcp 0.0.1 → 0.0.6
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.
- package/out/mcp-server.js +98 -21
- package/package.json +21 -5
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/MEMORY.md +15 -3
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_branch_base_check_unmerged_pr_deps.md +16 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_every_change_through_lifecycle.md +15 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_policy_compliance_not_optional.md +18 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_potential_to_issue_creates_github_issue.md +13 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_remediation_plan_em_dash_required.md +13 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_small_bug_uses_minor_audit.md +13 -0
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_test_files_count_against_500_cap.md +13 -0
- package/resources/claude-customizations/.claude/agents/atomic-executor.md +7 -7
- package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +4 -5
- package/resources/claude-customizations/.claude/agents/feature-review.md +7 -3
- package/resources/claude-customizations/.claude/agents/orchestrator.md +22 -3
- package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +1 -1
- package/resources/claude-customizations/.claude/agents/pr-author.md +78 -0
- package/resources/claude-customizations/.claude/agents/task-researcher.md +10 -6
- package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +303 -0
- package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +300 -0
- package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +40 -14
- package/resources/claude-customizations/.claude/hooks/enforce-feature-folder-order.ps1 +148 -0
- package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +210 -0
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +333 -0
- package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner.ps1 +216 -0
- package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +84 -15
- package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +1 -1
- package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage.ps1 +75 -5
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +93 -0
- package/resources/claude-customizations/.claude/hooks/validate-pr-author-output.ps1 +136 -0
- package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +90 -6
- package/resources/claude-customizations/.claude/rules/architecture-boundaries.md +46 -0
- package/resources/claude-customizations/.claude/rules/benchmark-baselines.md +35 -0
- package/resources/claude-customizations/.claude/rules/ci-workflows.md +36 -0
- package/resources/claude-customizations/.claude/rules/csharp.md +62 -16
- package/resources/claude-customizations/.claude/rules/general-code-change.md +12 -3
- package/resources/claude-customizations/.claude/rules/general-unit-test.md +47 -2
- package/resources/claude-customizations/.claude/rules/orchestrator-state.md +39 -0
- package/resources/claude-customizations/.claude/rules/powershell.md +5 -5
- package/resources/claude-customizations/.claude/rules/python.md +4 -3
- package/resources/claude-customizations/.claude/rules/quality-tiers.md +51 -0
- package/resources/claude-customizations/.claude/rules/typescript.md +37 -8
- package/resources/claude-customizations/.claude/settings.json +59 -12
- package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +2 -2
- package/resources/claude-customizations/.claude/skills/csharp-qa-gate/SKILL.md +25 -10
- package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +0 -1
- package/resources/claude-customizations/.claude/skills/execute-hard-lock/SKILL.md +6 -6
- package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +8 -8
- package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +17 -6
- package/resources/claude-customizations/.claude/skills/human-exception-runbook/SKILL.md +52 -0
- package/resources/claude-customizations/.claude/skills/human-exception-runbook/example.runbook.md +36 -0
- package/resources/claude-customizations/.claude/skills/invoke-csharp-engineer/SKILL.md +4 -4
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +172 -5
- package/resources/claude-customizations/.claude/skills/policy-audit-template-usage/SKILL.md +3 -3
- package/resources/claude-customizations/.claude/skills/powershell-qa-gate/SKILL.md +4 -4
- package/resources/claude-customizations/.claude/skills/pr-base-branch-merge-base/SKILL.md +3 -3
- package/resources/claude-customizations/.claude/skills/python-qa-gate/SKILL.md +1 -1
- package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +90 -17
- package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +5 -3
- package/resources/claude-customizations/.claude-variants/csharp-legacy/agents/csharp-typed-engineer.md +69 -0
- package/resources/claude-customizations/.claude-variants/csharp-legacy/rules/csharp.md +96 -0
- package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +77 -0
- package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +64 -0
- package/resources/claude-customizations/pack-manifests/core.json +65 -0
- package/resources/claude-customizations/pack-manifests/csharp-legacy.json +11 -0
- package/resources/claude-customizations/pack-manifests/csharp-modern.json +12 -0
- package/resources/claude-customizations/pack-manifests/powershell.json +14 -0
- package/resources/claude-customizations/pack-manifests/python.json +14 -0
- package/resources/claude-customizations/pack-manifests/typescript.json +9 -0
- package/resources/claude-dir-customizations/.mcp.json +3 -3
- package/resources/codex-and-agents-customizations/.agents/README.md +1 -1
- package/resources/codex-and-agents-customizations/.agents/skills/acceptance-criteria-tracking/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/architecture-boundaries/SKILL.md +52 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +16 -8
- package/resources/codex-and-agents-customizations/.agents/skills/benchmark-baselines/SKILL.md +44 -0
- package/resources/codex-and-agents-customizations/.agents/skills/ci-workflows/SKILL.md +45 -0
- package/resources/codex-and-agents-customizations/.agents/skills/commit-message/SKILL.md +3 -11
- package/resources/codex-and-agents-customizations/.agents/skills/csharp/SKILL.md +1 -5
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-change-budget-router/SKILL.md +1 -6
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-orchestration-state-machine/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/execute-hard-lock/SKILL.md +8 -17
- package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +41 -25
- package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +1 -6
- package/resources/codex-and-agents-customizations/.agents/skills/fill-feature-docs/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/general-code-change/SKILL.md +86 -0
- package/resources/codex-and-agents-customizations/.agents/skills/general-unit-test/SKILL.md +111 -0
- package/resources/codex-and-agents-customizations/.agents/skills/human-exception-runbook/SKILL.md +57 -0
- package/resources/codex-and-agents-customizations/.agents/skills/human-exception-runbook/example.runbook.md +36 -0
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-csharp-engineer/SKILL.md +0 -9
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-powershell-engineer/SKILL.md +0 -9
- package/resources/codex-and-agents-customizations/.agents/skills/invoke-python-engineer/SKILL.md +0 -9
- package/resources/codex-and-agents-customizations/.agents/skills/make-skill-template/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +206 -18
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-state/SKILL.md +48 -0
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +94 -10
- package/resources/codex-and-agents-customizations/.agents/skills/policy-audit-template-usage/SKILL.md +3 -8
- package/resources/codex-and-agents-customizations/.agents/skills/policy-compliance-order/SKILL.md +0 -10
- package/resources/codex-and-agents-customizations/.agents/skills/powershell/SKILL.md +4 -8
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-change-budget-router/SKILL.md +1 -6
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-orchestration-state-machine/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/powershell-qa-gate/SKILL.md +3 -9
- package/resources/codex-and-agents-customizations/.agents/skills/pr-author/SKILL.md +1 -9
- package/resources/codex-and-agents-customizations/.agents/skills/pr-base-branch-merge-base/SKILL.md +4 -9
- package/resources/codex-and-agents-customizations/.agents/skills/pr-context-artifacts/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/python/SKILL.md +1 -5
- package/resources/codex-and-agents-customizations/.agents/skills/python-change-budget-router/SKILL.md +1 -6
- package/resources/codex-and-agents-customizations/.agents/skills/python-qa-gate/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/python-suppressions/SKILL.md +2 -6
- package/resources/codex-and-agents-customizations/.agents/skills/quality-tiers/SKILL.md +57 -0
- package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +96 -72
- package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/agents/openai.yaml +1 -1
- package/resources/codex-and-agents-customizations/.agents/skills/research-issue/SKILL.md +0 -10
- package/resources/codex-and-agents-customizations/.agents/skills/review-epic/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/review-feature/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/review-staged/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/self-explanatory-code-commenting/SKILL.md +2 -6
- package/resources/codex-and-agents-customizations/.agents/skills/skill-canonical-location-audit/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.agents/skills/tonality/SKILL.md +86 -0
- package/resources/codex-and-agents-customizations/.agents/skills/translate-claude-to-codex/SKILL.md +297 -0
- package/resources/codex-and-agents-customizations/.agents/skills/translate-copilot-to-claude/SKILL.md +0 -22
- package/resources/codex-and-agents-customizations/.agents/skills/typescript/SKILL.md +1 -5
- package/resources/codex-and-agents-customizations/.agents/skills/typescript-suppressions/SKILL.md +2 -6
- package/resources/codex-and-agents-customizations/.agents/skills/update-status/SKILL.md +0 -5
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +5 -5
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +91 -63
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-atomic-executor.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/config.toml +111 -137
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-checkpoint-monotonic.ps1 +303 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +300 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +148 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-pr-author-skill.ps1 +336 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +84 -18
- package/resources/codex-and-agents-customizations/.codex/prompts/orchestrate-work.md +4 -3
- package/resources/codex-and-agents-customizations/.codex/scripts/post-codex-worktree-session.ps1 +5 -0
- package/resources/codex-and-agents-customizations/.github/workflows/_validate-orchestrator-state.yml +68 -0
- package/resources/codex-and-agents-customizations/.github/workflows/validate-orchestrator-state.yml +15 -0
- package/resources/config/orchestration-routing.json +76 -0
- package/resources/customizations/.github/agents/Powershell DI Unit Test Engineer.agent.md +1 -1
- package/resources/customizations/.github/agents/atomic_executor.agent.md +1 -1
- package/resources/customizations/.github/agents/atomic_planning.agent.md +10 -10
- package/resources/customizations/.github/agents/csharp-orchestrator.agent.md +6 -2
- package/resources/customizations/.github/agents/feature-review.agent.md +2 -2
- package/resources/customizations/.github/agents/orchestrator.agent.md +6 -2
- package/resources/customizations/.github/agents/powershell-atomic-executor.agent.md +4 -4
- package/resources/customizations/.github/agents/powershell-atomic-planning.agent.md +10 -10
- package/resources/customizations/.github/agents/powershell-orchestrator.agent.md +6 -2
- package/resources/customizations/.github/agents/powershell-typed-engineer.agent.md +2 -2
- package/resources/customizations/.github/agents/pr-author.agent.md +25 -0
- package/resources/customizations/.github/agents/python-orchestrator.agent.md +6 -2
- package/resources/customizations/.github/agents/staged-review.agent.md +1 -1
- package/resources/customizations/.github/agents/task-researcher.agent.md +4 -4
- package/resources/customizations/.github/instructions/powershell-code-change.instructions.md +6 -6
- package/resources/customizations/.github/prompts/fillout-prd-feature.prompt.md +1 -1
- package/resources/customizations/.github/prompts/generate-commit-message-repo.prompt.md +1 -1
- package/resources/customizations/.github/prompts/orchestrate-csharp-work.prompt.md +5 -3
- package/resources/customizations/.github/prompts/orchestrate-work.prompt.md +5 -3
- package/resources/customizations/.github/prompts/research-issue.prompt.md +4 -3
- package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +14 -1
- package/resources/customizations/.github/skills/feature-promotion-lifecycle/SKILL.md +11 -7
- package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +10 -1
- package/resources/customizations/.github/skills/pr-base-branch-merge-base/SKILL.md +2 -2
- package/resources/customizations/.github/skills/remediation-handoff-atomic-planner/SKILL.md +5 -0
- package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +7 -0
- package/resources/scripts/dev_tools/_orchestrator_state_human_interaction.py +127 -0
- package/resources/scripts/dev_tools/_orchestrator_state_routing.py +216 -0
- package/resources/scripts/dev_tools/push_down_claude_customizations.py +276 -61
- package/resources/scripts/dev_tools/push_down_claude_filesystem.py +472 -0
- package/resources/scripts/dev_tools/push_down_claude_pack_selection.py +401 -0
- package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +103 -411
- package/resources/scripts/dev_tools/validate_orchestration_review_artifacts.py +107 -0
- package/resources/scripts/dev_tools/validate_orchestrator_state.py +505 -0
- package/resources/scripts/dev_tools/validate_policy_audit_artifact.py +472 -0
- package/resources/templates/push_down_claude_customizations.py +162 -117
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_repo_root_is_source_of_truth.md +0 -11
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/feedback_vsce_verify_package_location.md +0 -19
- package/resources/claude-customizations/.claude/agent-memory/orchestrator/project_extension_location.md +0 -11
- package/resources/claude-customizations/.claude/agent-memory/prd-feature/MEMORY.md +0 -1
- package/resources/claude-customizations/.claude/agent-memory/prd-feature/project_push_down_pattern.md +0 -13
- package/resources/claude-customizations/.claude/agent-memory/task-researcher/MEMORY.md +0 -3
- package/resources/claude-customizations/.claude/agent-memory/task-researcher/project_push_down_claude_dir.md +0 -11
package/out/mcp-server.js
CHANGED
|
@@ -7,7 +7,11 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
-
|
|
10
|
+
try {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw mod = 0, e;
|
|
14
|
+
}
|
|
11
15
|
};
|
|
12
16
|
var __export = (target, all) => {
|
|
13
17
|
for (var name in all)
|
|
@@ -15886,7 +15890,24 @@ var REPO_AUTOMATION_TOOL_DEFINITIONS = [
|
|
|
15886
15890
|
inputSchema: {
|
|
15887
15891
|
type: "object",
|
|
15888
15892
|
properties: {
|
|
15889
|
-
workspace_root: workspaceRootProperty
|
|
15893
|
+
workspace_root: workspaceRootProperty,
|
|
15894
|
+
packs: {
|
|
15895
|
+
type: "array",
|
|
15896
|
+
items: {
|
|
15897
|
+
type: "string"
|
|
15898
|
+
},
|
|
15899
|
+
description: "Optional language pack names to publish (for example 'core', 'typescript'). When omitted, the full tree is published. 'core' is always included."
|
|
15900
|
+
},
|
|
15901
|
+
csharp_variant: {
|
|
15902
|
+
type: "string",
|
|
15903
|
+
enum: ["modern", "legacy"],
|
|
15904
|
+
description: "Optional C# toolchain variant to source ('modern' default or 'legacy')."
|
|
15905
|
+
},
|
|
15906
|
+
memory_mode: {
|
|
15907
|
+
type: "string",
|
|
15908
|
+
enum: ["overwrite", "merge", "skip"],
|
|
15909
|
+
description: "Optional agent-memory handling mode: 'overwrite' (default), 'merge', or 'skip'."
|
|
15910
|
+
}
|
|
15890
15911
|
},
|
|
15891
15912
|
additionalProperties: false
|
|
15892
15913
|
}
|
|
@@ -16199,6 +16220,56 @@ var REPO_AUTOMATION_TOOLS = [
|
|
|
16199
16220
|
"validate_orchestration_artifacts"
|
|
16200
16221
|
];
|
|
16201
16222
|
|
|
16223
|
+
// ../../extensions/drm-copilot/src/mcp-tool-inputs-push-down.ts
|
|
16224
|
+
function resolveClaudePacksField(rawValue) {
|
|
16225
|
+
if (rawValue === void 0) {
|
|
16226
|
+
return void 0;
|
|
16227
|
+
}
|
|
16228
|
+
if (!Array.isArray(rawValue)) {
|
|
16229
|
+
throw new Error("Field 'packs' must be an array of strings when provided.");
|
|
16230
|
+
}
|
|
16231
|
+
return rawValue.map(
|
|
16232
|
+
(entry, index) => normalizeRequiredText(entry, `packs[${index}]`)
|
|
16233
|
+
);
|
|
16234
|
+
}
|
|
16235
|
+
function resolveCsharpVariantField(rawValue) {
|
|
16236
|
+
if (rawValue === void 0) {
|
|
16237
|
+
return void 0;
|
|
16238
|
+
}
|
|
16239
|
+
const variant = normalizeRequiredText(rawValue, "csharp_variant");
|
|
16240
|
+
if (variant !== "modern" && variant !== "legacy") {
|
|
16241
|
+
throw new Error("Field 'csharp_variant' must be 'modern' or 'legacy'.");
|
|
16242
|
+
}
|
|
16243
|
+
return variant;
|
|
16244
|
+
}
|
|
16245
|
+
function resolveMemoryModeField(rawValue) {
|
|
16246
|
+
if (rawValue === void 0) {
|
|
16247
|
+
return void 0;
|
|
16248
|
+
}
|
|
16249
|
+
const mode = normalizeRequiredText(rawValue, "memory_mode");
|
|
16250
|
+
if (mode !== "overwrite" && mode !== "merge" && mode !== "skip") {
|
|
16251
|
+
throw new Error(
|
|
16252
|
+
"Field 'memory_mode' must be 'overwrite', 'merge', or 'skip'."
|
|
16253
|
+
);
|
|
16254
|
+
}
|
|
16255
|
+
return mode;
|
|
16256
|
+
}
|
|
16257
|
+
function resolvePushDownClaudeCustomizationsToolInput(rawInput, fallbackWorkspaceRoot) {
|
|
16258
|
+
const args = asToolArgumentObject(rawInput);
|
|
16259
|
+
const packs = resolveClaudePacksField(args["packs"]);
|
|
16260
|
+
const csharpVariant = resolveCsharpVariantField(args["csharp_variant"]);
|
|
16261
|
+
const memoryMode = resolveMemoryModeField(args["memory_mode"]);
|
|
16262
|
+
return {
|
|
16263
|
+
workspaceRoot: normalizeWorkspaceRoot(
|
|
16264
|
+
args["workspace_root"],
|
|
16265
|
+
fallbackWorkspaceRoot
|
|
16266
|
+
),
|
|
16267
|
+
...packs === void 0 ? {} : { packs },
|
|
16268
|
+
...csharpVariant === void 0 ? {} : { csharpVariant },
|
|
16269
|
+
...memoryMode === void 0 ? {} : { memoryMode }
|
|
16270
|
+
};
|
|
16271
|
+
}
|
|
16272
|
+
|
|
16202
16273
|
// ../../extensions/drm-copilot/src/mcp-tool-inputs.ts
|
|
16203
16274
|
function asToolArgumentObject(rawInput) {
|
|
16204
16275
|
if (rawInput === void 0) {
|
|
@@ -16335,15 +16406,6 @@ function resolvePushDownCodexAndAgentsCustomizationsToolInput(rawInput, fallback
|
|
|
16335
16406
|
)
|
|
16336
16407
|
};
|
|
16337
16408
|
}
|
|
16338
|
-
function resolvePushDownClaudeCustomizationsToolInput(rawInput, fallbackWorkspaceRoot) {
|
|
16339
|
-
const args = asToolArgumentObject(rawInput);
|
|
16340
|
-
return {
|
|
16341
|
-
workspaceRoot: normalizeWorkspaceRoot(
|
|
16342
|
-
args["workspace_root"],
|
|
16343
|
-
fallbackWorkspaceRoot
|
|
16344
|
-
)
|
|
16345
|
-
};
|
|
16346
|
-
}
|
|
16347
16409
|
function resolveNewPotentialBugEntryToolInput(rawInput, fallbackWorkspaceRoot) {
|
|
16348
16410
|
const args = asToolArgumentObject(rawInput);
|
|
16349
16411
|
return {
|
|
@@ -16849,6 +16911,30 @@ function buildValidateOrchestrationArtifactsArgs(input) {
|
|
|
16849
16911
|
return args;
|
|
16850
16912
|
}
|
|
16851
16913
|
|
|
16914
|
+
// ../../extensions/drm-copilot/src/repo-automation-service-push-down.ts
|
|
16915
|
+
function buildPushDownClaudeCustomizationsOptions(input) {
|
|
16916
|
+
const args = ["--destination", input.workspaceRoot];
|
|
16917
|
+
if (input.packs !== void 0 && input.packs.length > 0) {
|
|
16918
|
+
args.push("--packs", input.packs.join(","));
|
|
16919
|
+
}
|
|
16920
|
+
if (input.csharpVariant !== void 0) {
|
|
16921
|
+
args.push("--csharp-variant", input.csharpVariant);
|
|
16922
|
+
}
|
|
16923
|
+
if (input.memoryMode !== void 0) {
|
|
16924
|
+
args.push("--memory-mode", input.memoryMode);
|
|
16925
|
+
}
|
|
16926
|
+
return {
|
|
16927
|
+
tool: "push_down_claude_customizations",
|
|
16928
|
+
runtimeKind: "python",
|
|
16929
|
+
bundledRelativePath: "resources/templates/push_down_claude_customizations.py",
|
|
16930
|
+
workspaceRoot: input.workspaceRoot,
|
|
16931
|
+
invocationId: input.invocationId ?? "push_down_claude_customizations",
|
|
16932
|
+
args,
|
|
16933
|
+
summary: "Pushed bundled Claude Code customizations into the destination workspace.",
|
|
16934
|
+
stdoutArtifactPattern: /Wrote push-down summary artifact to:\s*(.+)/i
|
|
16935
|
+
};
|
|
16936
|
+
}
|
|
16937
|
+
|
|
16852
16938
|
// ../../extensions/drm-copilot/src/repo-automation-service-workflows.ts
|
|
16853
16939
|
var path5 = __toESM(require("node:path"));
|
|
16854
16940
|
|
|
@@ -17087,16 +17173,7 @@ var DefaultRepoAutomationService = class {
|
|
|
17087
17173
|
});
|
|
17088
17174
|
}
|
|
17089
17175
|
async pushDownClaudeCustomizations(input) {
|
|
17090
|
-
return this.executeScript(
|
|
17091
|
-
tool: "push_down_claude_customizations",
|
|
17092
|
-
runtimeKind: "python",
|
|
17093
|
-
bundledRelativePath: "resources/templates/push_down_claude_customizations.py",
|
|
17094
|
-
workspaceRoot: input.workspaceRoot,
|
|
17095
|
-
invocationId: input.invocationId ?? "push_down_claude_customizations",
|
|
17096
|
-
args: ["--destination", input.workspaceRoot],
|
|
17097
|
-
summary: "Pushed bundled Claude Code customizations into the destination workspace.",
|
|
17098
|
-
stdoutArtifactPattern: /Wrote push-down summary artifact to:\s*(.+)/i
|
|
17099
|
-
});
|
|
17176
|
+
return this.executeScript(buildPushDownClaudeCustomizationsOptions(input));
|
|
17100
17177
|
}
|
|
17101
17178
|
async newPotentialBugEntry(input) {
|
|
17102
17179
|
return this.executeScript({
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danmoisan/drm-copilot-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Stdio MCP server exposing drm-copilot repo-automation tools.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"bin": {
|
|
8
|
-
"drm-copilot-mcp": "
|
|
8
|
+
"drm-copilot-mcp": "out/mcp-server.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"out/mcp-server.js",
|
|
@@ -16,17 +16,33 @@
|
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "https://github.com/drmoisan/drm-copilot.git",
|
|
19
|
+
"url": "git+https://github.com/drmoisan/drm-copilot.git",
|
|
20
20
|
"directory": "packages/mcp-server"
|
|
21
21
|
},
|
|
22
|
-
"bugs": {
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/drmoisan/drm-copilot/issues"
|
|
24
|
+
},
|
|
23
25
|
"homepage": "https://github.com/drmoisan/drm-copilot#readme",
|
|
24
|
-
"keywords": [
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"copilot",
|
|
29
|
+
"claude",
|
|
30
|
+
"codex",
|
|
31
|
+
"automation",
|
|
32
|
+
"workflow",
|
|
33
|
+
"stdio"
|
|
34
|
+
],
|
|
25
35
|
"author": "Dan Moisan",
|
|
26
36
|
"scripts": {
|
|
27
37
|
"build": "node esbuild-mcp-server.cjs",
|
|
28
38
|
"prepack": "node -e \"const{cpSync}=require('fs');cpSync('../../extensions/drm-copilot/resources','./resources',{recursive:true,force:true})\""
|
|
29
39
|
},
|
|
40
|
+
"overrides": {
|
|
41
|
+
"fast-uri": "^3.1.2",
|
|
42
|
+
"hono": "^4.12.25",
|
|
43
|
+
"ip-address": "^10.2.0",
|
|
44
|
+
"qs": "^6.15.2"
|
|
45
|
+
},
|
|
30
46
|
"devDependencies": {
|
|
31
47
|
"esbuild": "^0.28.0"
|
|
32
48
|
},
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator-memory-index
|
|
3
|
+
description: Index of orchestrator agent memories.
|
|
4
|
+
metadata:
|
|
5
|
+
type: index
|
|
6
|
+
scope: repo
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
- [Policy requirements are not optional gaps](feedback_policy_compliance_not_optional.md) — never frame skipped policy requirements as "known gaps" or defer them; comply before reporting completion.
|
|
10
|
+
- [test-files-count-against-500-cap](feedback_test_files_count_against_500_cap.md) — the 500-line file cap applies to test files too; QA must scan changed/created production AND test files.
|
|
11
|
+
- [every-change-through-lifecycle](feedback_every_change_through_lifecycle.md) — every change, including small tooling changes, goes through issue promotion, an active feature folder, and feature-review before commit.
|
|
12
|
+
- [remediation-plan-em-dash-required](feedback_remediation_plan_em_dash_required.md) — the plan validator rejects any token between "Phase N" and the em-dash; only `### Phase N — <Title>` passes.
|
|
13
|
+
- [branch-base-check-unmerged-pr-deps](feedback_branch_base_check_unmerged_pr_deps.md) — verify required symbols/files exist on the chosen branch base; if they only exist in an open PR, stack or merge first.
|
|
14
|
+
- [potential-to-issue-creates-github-issue](feedback_potential_to_issue_creates_github_issue.md) — potential-to-issue creates the GitHub issue as a side effect; do not also run gh issue create.
|
|
15
|
+
- [small-bug-uses-minor-audit](feedback_small_bug_uses_minor_audit.md) — a ~1-3 production-file bug fix uses the small path with Work Mode minor-audit, not full-bug.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: branch-base-check-unmerged-pr-deps
|
|
3
|
+
description: Before choosing a branch base, verify the plan's required symbols and files exist on that base; if they only exist in an open PR, stack on it or merge it first.
|
|
4
|
+
metadata:
|
|
5
|
+
type: feedback
|
|
6
|
+
scope: general
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Before choosing a branch base for a new feature, verify that the symbols and files the plan relies on exist on that base. If they only exist in an open PR, either (a) base on that PR's branch (stack), or (b) recommend merging it first.
|
|
10
|
+
|
|
11
|
+
Check existence with: `git cat-file -e origin/main:<file>`
|
|
12
|
+
Check file overlap with: `git diff --name-only origin/main...<branch>`
|
|
13
|
+
|
|
14
|
+
**Why:** Branching off the default branch when a required symbol only exists in an unmerged PR forces the implementation to use a fallback or stub, which the reviewer will catch.
|
|
15
|
+
|
|
16
|
+
**How to apply:** At orchestration start-up, when the plan references files or modules that appear to be part of a separate ongoing feature, run the cat-file check before setting the branch base in the orchestrator state.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: every-change-through-lifecycle
|
|
3
|
+
description: Every change, including small tooling changes, goes through issue promotion, an active feature folder, and feature-review before commit; evidence lives only under the active feature folder.
|
|
4
|
+
metadata:
|
|
5
|
+
type: feedback
|
|
6
|
+
scope: general
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Every change — including small tooling changes to hooks, skills, rules, or scripts — must go through the full orchestration lifecycle: open an issue (via MCP promotion), create the active feature folder, and pass feature-review before committing. "It's just a small change" is not an exemption.
|
|
10
|
+
|
|
11
|
+
Evidence may be written ONLY under the active feature folder at `docs/features/active/<date>-<short>-<issue>/evidence/<kind>/`. Any other location (including paths that are not in the forbidden list) is not approved.
|
|
12
|
+
|
|
13
|
+
**Why:** Bypassing the lifecycle produces changes with no feature folder, which causes engineers to place evidence in unapproved locations and creates review failures requiring full remediation.
|
|
14
|
+
|
|
15
|
+
**How to apply:** Before any implementation delegation, run promotion (new potential entry -> potential-to-issue -> new active feature folder). Pass the resulting feature folder's `evidence/<kind>/` path as the only permitted evidence sink.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Policy requirements are not optional gaps
|
|
3
|
+
description: Never frame skipped policy requirements as "known gaps" or defer them to user opt-in; comply before reporting completion.
|
|
4
|
+
type: feedback
|
|
5
|
+
metadata:
|
|
6
|
+
type: feedback
|
|
7
|
+
scope: general
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
When repository policy (`.claude/rules/*.md`, `.github/instructions/*.md`) requires something — tests, coverage, toolchain steps, file-size limits — completing the change without satisfying that requirement is a policy violation, not a "known gap" or "follow-up."
|
|
11
|
+
|
|
12
|
+
**Why:** The user explicitly rejected framing a missing Pester test as a "known gap" after a new PowerShell script was added. Per `.claude/rules/powershell.md` and `.claude/rules/general-unit-test.md`, new scripts require Pester tests and >=90% coverage. Treating that as optional or deferrable misrepresents the state of the work and pushes compliance burden onto the user.
|
|
13
|
+
|
|
14
|
+
**How to apply:**
|
|
15
|
+
- Before reporting any code change complete, verify every applicable policy requirement (toolchain steps, tests, coverage, file size, etc.) is satisfied in this same change set.
|
|
16
|
+
- Do not use phrases like "known gap," "follow-up," "if you want I can add tests," or "out of scope" to defer a policy requirement. Either complete the requirement, or stop and report the work as blocked with the specific policy citation.
|
|
17
|
+
- For PowerShell: new `.ps1` files require Pester tests covering positive, negative, and edge paths, with mocks at the wrapper-seam boundary; run format → analyze → Pester and confirm all pass before reporting completion.
|
|
18
|
+
- Asking the user whether to add required tests is not an acceptable substitute for adding them.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: potential-to-issue-creates-github-issue
|
|
3
|
+
description: The potential-to-issue MCP tool creates the GitHub issue as a side effect; do not also run gh issue create, which produces a duplicate.
|
|
4
|
+
metadata:
|
|
5
|
+
type: feedback
|
|
6
|
+
scope: general
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
The `potential_to_issue` MCP tool creates the GitHub issue as a side effect and returns a summary. The generated `issue.md` already carries the correct `Issue: #N` and `Issue URL` lines. Do NOT run `gh issue create` after `potential_to_issue` — it creates a duplicate issue.
|
|
10
|
+
|
|
11
|
+
**Why:** Running `gh issue create` after the MCP promotion step produces two issues for the same work item.
|
|
12
|
+
|
|
13
|
+
**How to apply:** After `potential_to_issue`, read the generated `issue.md` to get the assigned number. Pass that same number to the new-active-feature-folder step via the issue number. If the folder number and the tooling-created GitHub issue number disagree, align to the GitHub number.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remediation-plan-em-dash-required
|
|
3
|
+
description: The plan validator rejects any token between "Phase N" and the em-dash; only the canonical `### Phase N — <Title>` heading passes.
|
|
4
|
+
metadata:
|
|
5
|
+
type: feedback
|
|
6
|
+
scope: general
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
The plan validator (`validate_orchestration_artifacts` with `artifact_type: "plan"`) rejects any phase heading with tokens between "Phase N" and the em-dash. Only the canonical form `### Phase N — <Title>` passes. Parenthetical qualifiers like `(continued)` or `(part 2)` cause the validator to error with "phase heading must match ### Phase N — <Title>" followed by "task appears before a canonical phase heading".
|
|
10
|
+
|
|
11
|
+
**Why:** Encountered when a planner introduced `### Phase 1 (continued) — <Title>` to group tasks.
|
|
12
|
+
|
|
13
|
+
**How to apply:** Instruct the planner to use only canonical `### Phase N — <Title>` headings with no parenthetical qualifiers. Either fold task groups under a single phase title or use separate phase numbers. After the planner returns, always run the validator before delegating to executor preflight.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: small-bug-uses-minor-audit
|
|
3
|
+
description: A bug fix of roughly 1-3 production files uses the small path with Work Mode minor-audit, not full-bug; requirements and acceptance criteria live in issue.md.
|
|
4
|
+
metadata:
|
|
5
|
+
type: feedback
|
|
6
|
+
scope: general
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
A bug fix whose scope is roughly 1-3 production files must be delivered on the small path with Work Mode `minor-audit`, not `full-bug`. On the small path there is no `spec.md`; requirements (summary, repro, scope, test strategy, and acceptance criteria) live in `issue.md`. The feature-review agent in minor-audit mode reads the `## Acceptance Criteria` section of `issue.md` as the AC source.
|
|
10
|
+
|
|
11
|
+
**Why:** Using the full-bug path for a small change requires `spec.md`, adds unnecessary overhead, and risks marking a change done without on-disk audit artifacts.
|
|
12
|
+
|
|
13
|
+
**How to apply:** At change-budget routing, if a bug impacts only 1-3 production files, select small path + minor-audit. Confirm `issue.md` carries an explicit `## Acceptance Criteria` section before delegating to feature-review. Do not create `spec.md` for small-path bugs.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-files-count-against-500-cap
|
|
3
|
+
description: The 500-line file cap applies to test files as well as production files; QA phases must scan all changed/created production AND test files.
|
|
4
|
+
metadata:
|
|
5
|
+
type: feedback
|
|
6
|
+
scope: general
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
The `.claude/rules/general-code-change.md` 500-line file cap applies to test files as well as production files. Only throwaway scripts, raw text fixtures, and Markdown are exempt. When a plan adds substantial tests, Phase 0 baseline and final QA tasks must scan ALL changed/created test files (not only production files) and assert each is <= 500 lines.
|
|
10
|
+
|
|
11
|
+
**Why:** A plan that adds tests but only size-checks production files can create a remediation cycle when test files cross the cap — the only finding raised during feature-review.
|
|
12
|
+
|
|
13
|
+
**How to apply:** When briefing the planner for any change that adds tests, require the QA phase to include a line-count assertion across all changed/created production AND test files. If a test file would exceed the cap, split it into a sibling test module before reporting completion.
|
|
@@ -14,13 +14,13 @@ tools:
|
|
|
14
14
|
- "Bash(npx prettier *)"
|
|
15
15
|
- "Bash(npx eslint *)"
|
|
16
16
|
- "Bash(npx tsc *)"
|
|
17
|
-
- "Bash(npx
|
|
17
|
+
- "Bash(npx vitest *)"
|
|
18
18
|
- "Bash(pwsh *)"
|
|
19
19
|
- "Bash(git *)"
|
|
20
|
-
- "
|
|
21
|
-
- "
|
|
22
|
-
- "
|
|
23
|
-
- "
|
|
20
|
+
- "mcp__drm-copilot__run_poshqc_format"
|
|
21
|
+
- "mcp__drm-copilot__run_poshqc_analyze"
|
|
22
|
+
- "mcp__drm-copilot__run_poshqc_test"
|
|
23
|
+
- "mcp__drm-copilot__run_poshqc_analyze_autofix"
|
|
24
24
|
skills:
|
|
25
25
|
- policy-compliance-order
|
|
26
26
|
- atomic-plan-contract
|
|
@@ -75,8 +75,8 @@ For each task:
|
|
|
75
75
|
Use the scoped tool patterns for quality gates:
|
|
76
76
|
|
|
77
77
|
- **Python**: `poetry run black`, `poetry run ruff`, `poetry run pyright`, `poetry run pytest`
|
|
78
|
-
- **TypeScript**: `npx prettier`, `npx eslint`, `npx tsc`, `npx
|
|
79
|
-
- **PowerShell**: MCP server functions (`
|
|
78
|
+
- **TypeScript**: `npx prettier`, `npx eslint`, `npx tsc`, `npx vitest`
|
|
79
|
+
- **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`)
|
|
80
80
|
- **Git**: `git diff`, `git status`, `git log`
|
|
81
81
|
|
|
82
82
|
Run toolchain in order: format, lint, type-check, test. Restart from step 1 if any step fails or changes files.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: csharp-typed-engineer
|
|
3
|
-
description: Project-scoped worker that implements and verifies C# changes within typed repository boundaries. Applies the CSharpier -> .NET Analyzers -> Nullable Analysis ->
|
|
3
|
+
description: Project-scoped worker that implements and verifies C# changes within typed repository boundaries. Applies the CSharpier -> .NET Analyzers -> Nullable Analysis -> xUnit toolchain, the 1-3 production-file small-path budget, and zero-regression quality gates.
|
|
4
4
|
tools:
|
|
5
5
|
- Read
|
|
6
6
|
- Grep
|
|
7
7
|
- Glob
|
|
8
|
-
- "Bash(msbuild *)"
|
|
9
8
|
- "Bash(dotnet *)"
|
|
10
9
|
skills:
|
|
11
10
|
- policy-compliance-order
|
|
@@ -21,7 +20,7 @@ memory: project
|
|
|
21
20
|
|
|
22
21
|
# CSharp Typed Engineer Agent
|
|
23
22
|
|
|
24
|
-
Senior C# engineer specialized in small cohesive classes and modules, strong typing under nullable reference types, minimal DI seams, and deterministic
|
|
23
|
+
Senior C# engineer specialized in small cohesive classes and modules, strong typing under nullable reference types, minimal DI seams, and deterministic xUnit coverage. Implement C# changes within the approved scope, preserve typed boundaries, and verify results with the repository C# toolchain (`dotnet build`, `dotnet test`).
|
|
25
24
|
|
|
26
25
|
## Standing Rules
|
|
27
26
|
|
|
@@ -33,8 +32,8 @@ Follow the phased workflow defined by the preloaded skills:
|
|
|
33
32
|
|
|
34
33
|
1. **Policy compliance** — apply `policy-compliance-order` to load mandatory repo policies before any change.
|
|
35
34
|
2. **Routing and scope** — apply `csharp-change-budget-router` to estimate scope, select direct vs orchestrator handoff mode, and enforce the 3 production + 3 test per-batch cap.
|
|
36
|
-
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied. Plans must include the proposed class and module structure, minimal DI seams,
|
|
37
|
-
4. **Implement in batches** — apply the approved plan. After each batch, run targeted analyzer and nullable
|
|
35
|
+
3. **Plan and baseline** — apply `atomic-plan-contract` for Phase 0 baseline capture and atomic plan structure. Delegate plan authoring to `atomic_planner` when no plan is supplied. Plans must include the proposed class and module structure, minimal DI seams, xUnit scenario-level test strategy, and NSubstitute mock strategy.
|
|
36
|
+
4. **Implement in batches** — apply the approved plan. After each batch, run targeted `dotnet build` analyzer and nullable checks on touched projects plus targeted xUnit tests, and confirm per-file coverage.
|
|
38
37
|
5. **Final QA gate** — apply `csharp-qa-gate` to run the full toolchain, enforce zero-regression deltas against the baseline, and produce the required reporting block before declaring completion.
|
|
39
38
|
6. **Evidence and handoff** — store baseline and post-change evidence per `evidence-and-timestamp-conventions`. Trigger remediation via `remediation-handoff-atomic-planner` when deltas fail.
|
|
40
39
|
|
|
@@ -106,9 +106,13 @@ Coverage metrics are mandatory for every language that has changed files in the
|
|
|
106
106
|
|
|
107
107
|
### Coverage Thresholds
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- **
|
|
109
|
+
Coverage thresholds follow the uniform tier rule (Authoritative Decision #2) defined in `.claude/rules/quality-tiers.md`:
|
|
110
|
+
|
|
111
|
+
- **New code files** (files added in this feature, not previously existing): line coverage >= 85%, branch coverage >= 75%.
|
|
112
|
+
- **Modified files** (files that existed before and were changed): line coverage >= 85%, branch coverage >= 75%, and no regression on changed lines relative to baseline.
|
|
113
|
+
- **Repo-wide per language**: line coverage >= 85%, branch coverage >= 75%.
|
|
114
|
+
|
|
115
|
+
Tier-specific lower thresholds are not used.
|
|
112
116
|
|
|
113
117
|
### Verification Procedure
|
|
114
118
|
|
|
@@ -2,15 +2,30 @@
|
|
|
2
2
|
name: orchestrator
|
|
3
3
|
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.
|
|
4
4
|
tools:
|
|
5
|
-
- "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)"
|
|
5
|
+
- "Agent(atomic-planner,atomic-executor,feature-review,task-researcher,prd-feature,staged-review,epic-review,status-updater,pr-author,python-typed-engineer,powershell-typed-engineer,csharp-typed-engineer,typescript-engineer)"
|
|
6
6
|
- Read
|
|
7
7
|
- Grep
|
|
8
8
|
- Glob
|
|
9
|
+
- Write
|
|
10
|
+
- Edit
|
|
9
11
|
- "Bash(git *)"
|
|
10
12
|
- "Bash(poetry run *)"
|
|
11
13
|
- "Bash(npx *)"
|
|
12
14
|
- "Bash(pwsh *)"
|
|
13
|
-
- "
|
|
15
|
+
- "Bash(gh *)"
|
|
16
|
+
- "mcp__drm-copilot__run_poshqc_format"
|
|
17
|
+
- "mcp__drm-copilot__run_poshqc_analyze"
|
|
18
|
+
- "mcp__drm-copilot__run_poshqc_analyze_autofix"
|
|
19
|
+
- "mcp__drm-copilot__run_poshqc_test"
|
|
20
|
+
- "mcp__drm-copilot__resolve_execute_hard_lock_prompt"
|
|
21
|
+
- "mcp__drm-copilot__resolve_atomic_plan_prompt"
|
|
22
|
+
- "mcp__drm-copilot__collect_pr_context"
|
|
23
|
+
- "mcp__drm-copilot__new_potential_entry"
|
|
24
|
+
- "mcp__drm-copilot__new_potential_bug_entry"
|
|
25
|
+
- "mcp__drm-copilot__potential_to_issue"
|
|
26
|
+
- "mcp__drm-copilot__new_active_feature_folder"
|
|
27
|
+
- "mcp__drm-copilot__validate_orchestration_artifacts"
|
|
28
|
+
- "mcp__drm-copilot__.*"
|
|
14
29
|
skills:
|
|
15
30
|
- policy-compliance-order
|
|
16
31
|
- feature-promotion-lifecycle
|
|
@@ -54,10 +69,14 @@ Delegate exclusively through configured subagents:
|
|
|
54
69
|
- `atomic-planner` — generates phased implementation plans (planning only)
|
|
55
70
|
- `atomic-executor` — executes approved plans task-by-task (execution only)
|
|
56
71
|
- `feature-review` — produces policy, code, and feature audit artifacts
|
|
57
|
-
- `task-researcher` — performs deep research and writes findings to `
|
|
72
|
+
- `task-researcher` — performs deep research and writes findings to the research path the orchestrator resolves before delegating: `docs/features/<feature>/research/` when an active `feature-folder` is in scope in `orchestrator-state.json`, otherwise `docs/research/` for one-off research. The orchestrator passes the resolved path in the delegation prompt.
|
|
58
73
|
|
|
59
74
|
For required delegated steps, delegation is mandatory. If a handoff cannot be started, resumed, or completed, stop execution and record blocked state. Do not perform the step locally.
|
|
60
75
|
|
|
76
|
+
## PR Creation Delegation
|
|
77
|
+
|
|
78
|
+
PR creation and PR body edits must be delegated to `Agent(pr-author)`. The orchestrator must not call `gh pr create` or `gh pr edit --body*` directly from the main thread; those commands are blocked by the `enforce-pr-author-skill.ps1` PreToolUse hook unless a valid authorization sentinel issued by the `pr-author` agent is present. The orchestrator first produces the PR-context artifact via `mcp__drm-copilot__collect_pr_context`, then delegates to `Agent(pr-author)`, which authors the PR body via the `pr-author` skill, writes and deletes the authorization sentinel around the `gh` command, and reports the resulting PR URL or PR number.
|
|
79
|
+
|
|
61
80
|
## Checkpoint Persistence
|
|
62
81
|
|
|
63
82
|
Update `artifacts/orchestration/orchestrator-state.json` after every completed step with:
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pr-author
|
|
3
|
+
description: Project-scoped agent that runs the pr-author skill to produce a GitHub-ready PR body from the canonical PR-context bundle, then opens or updates the pull request. Sole authorized caller of gh pr create and gh pr edit --body*. Writes a short-lived authorization sentinel immediately before each gh command and deletes it afterward.
|
|
4
|
+
model: sonnet
|
|
5
|
+
skills:
|
|
6
|
+
- pr-author
|
|
7
|
+
memory: project
|
|
8
|
+
tools:
|
|
9
|
+
- Read
|
|
10
|
+
- "Bash(git log *)"
|
|
11
|
+
- "Bash(git rev-parse *)"
|
|
12
|
+
- "Bash(gh pr create *)"
|
|
13
|
+
- "Bash(gh pr edit *)"
|
|
14
|
+
- "Write(/artifacts/**)"
|
|
15
|
+
hooks:
|
|
16
|
+
SubagentStop:
|
|
17
|
+
- matcher: "pr-author"
|
|
18
|
+
hooks:
|
|
19
|
+
- type: command
|
|
20
|
+
command: pwsh -NoProfile -File .claude/hooks/validate-pr-author-output.ps1
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# PR Author Agent
|
|
24
|
+
|
|
25
|
+
You are the dedicated pull-request authoring agent. Your sole responsibility is to consume the
|
|
26
|
+
canonical PR-context bundle, produce the PR body using the `pr-author` skill, and open or update the
|
|
27
|
+
pull request. You are the only agent authorized to run `gh pr create` and `gh pr edit --body*`. The
|
|
28
|
+
orchestrator and all other agents are blocked from these commands by the
|
|
29
|
+
`enforce-pr-author-skill.ps1` PreToolUse hook.
|
|
30
|
+
|
|
31
|
+
## Skill
|
|
32
|
+
|
|
33
|
+
Apply the `pr-author` skill (`.claude/skills/pr-author/SKILL.md`) as the canonical workflow for
|
|
34
|
+
authoring the PR body. The skill produces the PR body text from the PR-context bundle
|
|
35
|
+
(`artifacts/pr_context.summary.txt` and `artifacts/pr_context.appendix.txt`) and its enumerated
|
|
36
|
+
additional context files. The skill itself only authors body text; opening and editing the pull
|
|
37
|
+
request via `gh pr create` / `gh pr edit` is this agent's responsibility, not the skill's.
|
|
38
|
+
|
|
39
|
+
## Authorization Sentinel Write/Delete Protocol
|
|
40
|
+
|
|
41
|
+
Before any `gh pr create` or `gh pr edit --body*` command, you MUST perform these steps in order:
|
|
42
|
+
|
|
43
|
+
1. Run `git rev-parse HEAD` to obtain the current `head_sha`.
|
|
44
|
+
2. Write `artifacts/pr_author_authorization.json` with exactly these fields:
|
|
45
|
+
- `issued_by`: `"pr-author"`
|
|
46
|
+
- `issued_at`: the current time as a UTC ISO-8601 timestamp (for example `2026-06-24T16:00:00Z`)
|
|
47
|
+
- `head_sha`: the value from step 1
|
|
48
|
+
- `ttl_seconds`: `120`
|
|
49
|
+
3. Issue the `gh pr create` or `gh pr edit --body-file ...` command immediately, within the 120-second
|
|
50
|
+
TTL. The PreToolUse hook verifies that the sentinel is present, that `issued_by` is exactly
|
|
51
|
+
`pr-author`, and that the sentinel has not expired before allowing the command.
|
|
52
|
+
4. Delete `artifacts/pr_author_authorization.json` after the `gh` command completes, on both success
|
|
53
|
+
and failure. The TTL also expires abandoned sentinels, but explicit deletion is required.
|
|
54
|
+
|
|
55
|
+
The sentinel filename is exactly `artifacts/pr_author_authorization.json`. The PR body must be passed
|
|
56
|
+
via `--body-file`; inline `--body` is blocked by the hook (Case A).
|
|
57
|
+
|
|
58
|
+
## Final Output Requirement
|
|
59
|
+
|
|
60
|
+
After opening or updating the pull request, report the resulting PR URL
|
|
61
|
+
(`https://github.com/<owner>/<repo>/pull/<n>`) or the PR number (`PR #<n>`) in your final output. The
|
|
62
|
+
`validate-pr-author-output.ps1` SubagentStop hook blocks completion when the final output contains no
|
|
63
|
+
PR URL or PR number.
|
|
64
|
+
|
|
65
|
+
## Enforcement Strength (Honest Disclosure)
|
|
66
|
+
|
|
67
|
+
The authorization sentinel is a **policy guardrail, not a cryptographic or security control.** Any
|
|
68
|
+
actor with `Write(/artifacts/**)` access can forge `artifacts/pr_author_authorization.json`, because
|
|
69
|
+
all agents share the same filesystem and the runtime exposes no native agent-identity signal at Bash
|
|
70
|
+
PreToolUse time. The mechanism prevents accidental bypass (such as the PR #228 pattern where the
|
|
71
|
+
orchestrator wrote the body file and called `gh pr create` directly) and requires a deliberate,
|
|
72
|
+
documented act to circumvent. It is not tamper-proof and is not a security boundary.
|
|
73
|
+
|
|
74
|
+
## Standing Rules
|
|
75
|
+
|
|
76
|
+
Repository tone is defined in `CLAUDE.md` and `.claude/rules/tonality.md`. Reference only files
|
|
77
|
+
listed under "Additional context files" in the PR-context bundle; do not cite or summarize files
|
|
78
|
+
outside that enumeration. Do not invent issue or PR numbers.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-researcher
|
|
3
|
-
description: Research specialist that performs deep investigation and writes structured findings
|
|
3
|
+
description: Research specialist that performs deep investigation and writes structured findings to the orchestrator-supplied research path under docs/features/<feature>/research/ (feature-associated) or docs/research/ (one-off).
|
|
4
4
|
model: sonnet
|
|
5
5
|
tools:
|
|
6
6
|
- Read
|
|
7
7
|
- Grep
|
|
8
8
|
- Glob
|
|
9
9
|
- WebFetch
|
|
10
|
-
- "Write(/
|
|
10
|
+
- "Write(/docs/features/**/research/**)"
|
|
11
|
+
- "Write(/docs/research/**)"
|
|
11
12
|
- evidence-and-timestamp-conventions
|
|
12
13
|
memory: project
|
|
13
14
|
hooks:
|
|
@@ -20,13 +21,16 @@ hooks:
|
|
|
20
21
|
|
|
21
22
|
# Task Researcher Agent
|
|
22
23
|
|
|
23
|
-
You are a research-only specialist. You perform deep analysis for task planning and write structured research notes. You do not make changes to source code, configurations, or project files outside
|
|
24
|
+
You are a research-only specialist. You perform deep analysis for task planning and write structured research notes. You do not make changes to source code, configurations, or project files outside the research root the orchestrator supplies.
|
|
24
25
|
|
|
25
26
|
## Output Location
|
|
26
27
|
|
|
27
|
-
Write
|
|
28
|
+
Write each research artifact to the research path the orchestrator supplies in the delegation prompt. There are two tracked research roots:
|
|
28
29
|
|
|
29
|
-
- `
|
|
30
|
+
- Feature-associated research: `docs/features/<feature>/research/<timestamp>-<short-name>-research.md` (for example `docs/features/active/<feature>/research/<timestamp>-<short-name>-research.md`).
|
|
31
|
+
- One-off research not tied to a feature: `docs/research/<timestamp>-<short-name>-research.md`.
|
|
32
|
+
|
|
33
|
+
The orchestrator resolves which root to use from whether an active feature folder is in scope and passes the exact path in the delegation prompt; do not infer the feature folder independently. The filename convention `<timestamp>-<short-name>-research.md` is unchanged.
|
|
30
34
|
|
|
31
35
|
## Core Principles
|
|
32
36
|
|
|
@@ -67,7 +71,7 @@ Write all research artifacts to `artifacts/research/` using the filename convent
|
|
|
67
71
|
|
|
68
72
|
## Constraints
|
|
69
73
|
|
|
70
|
-
- Write only to `
|
|
74
|
+
- Write only to the orchestrator-supplied research path under `docs/features/<feature>/research/` (feature-associated) or `docs/research/` (one-off). Do not modify source code or configurations.
|
|
71
75
|
- Ground all findings in verified evidence.
|
|
72
76
|
- Keep discussion of non-selected approaches brief.
|
|
73
77
|
- Do not claim nested worker delegation.
|