@danmoisan/drm-copilot-mcp 1.0.1 → 1.0.8
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 +896 -202
- package/package.json +1 -1
- package/resources/claude-customizations/.claude/agents/atomic-executor.md +1 -0
- package/resources/claude-customizations/.claude/agents/atomic-planner.md +1 -0
- package/resources/claude-customizations/.claude/agents/commit-message.md +42 -0
- package/resources/claude-customizations/.claude/agents/csharp-typed-engineer.md +1 -0
- package/resources/claude-customizations/.claude/agents/epic-orchestrator.md +128 -0
- package/resources/claude-customizations/.claude/agents/epic-review.md +1 -0
- package/resources/claude-customizations/.claude/agents/feature-review.md +1 -0
- package/resources/claude-customizations/.claude/agents/human-exception-runbook.md +48 -0
- package/resources/claude-customizations/.claude/agents/orchestrator.md +80 -2
- package/resources/claude-customizations/.claude/agents/powershell-typed-engineer.md +1 -0
- package/resources/claude-customizations/.claude/agents/pr-author.md +37 -21
- package/resources/claude-customizations/.claude/agents/prd-feature.md +1 -0
- package/resources/claude-customizations/.claude/agents/python-typed-engineer.md +1 -0
- package/resources/claude-customizations/.claude/agents/staged-review.md +1 -0
- package/resources/claude-customizations/.claude/agents/status-updater.md +1 -0
- package/resources/claude-customizations/.claude/agents/typescript-engineer.md +1 -0
- package/resources/claude-customizations/.claude/hooks/check-powershell-test-purity.ps1 +103 -65
- package/resources/claude-customizations/.claude/hooks/check-python-test-purity.ps1 +12 -9
- package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +24 -16
- package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +19 -13
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +304 -0
- package/resources/claude-customizations/.claude/hooks/enforce-epic-wave-barrier.ps1 +304 -0
- package/resources/claude-customizations/.claude/hooks/enforce-epic-worktree-removal-gate.ps1 +237 -0
- package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +16 -12
- package/resources/claude-customizations/.claude/hooks/enforce-feature-folder-order.ps1 +14 -10
- package/resources/claude-customizations/.claude/hooks/enforce-model-routing-receipt.ps1 +182 -0
- package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +35 -8
- package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +17 -14
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1 +104 -0
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +268 -93
- package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner.ps1 +19 -11
- package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +28 -6
- package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +17 -14
- package/resources/claude-customizations/.claude/hooks/validate-bash.ps1 +146 -36
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +27 -7
- package/resources/claude-customizations/.claude/rules/orchestrator-state.md +53 -0
- package/resources/claude-customizations/.claude/settings.json +38 -1
- package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +252 -0
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +59 -13
- package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +28 -0
- package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +22 -18
- package/resources/claude-customizations/pack-manifests/core.json +9 -0
- package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +8 -2
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +24 -3
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +13 -0
- package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +1 -1
- package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp/SKILL.md +65 -0
- package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +79 -0
- package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +66 -0
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +15 -14
- package/resources/codex-and-agents-customizations/.codex/config.toml +1 -25
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +144 -28
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-helpers.ps1 +163 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-pr-author-skill.ps1 +257 -93
- package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +98 -0
- package/resources/codex-and-agents-customizations/pack-manifests/core.json +24 -0
- package/resources/codex-and-agents-customizations/pack-manifests/csharp-legacy.json +11 -0
- package/resources/codex-and-agents-customizations/pack-manifests/csharp-modern.json +10 -0
- package/resources/codex-and-agents-customizations/pack-manifests/powershell.json +15 -0
- package/resources/codex-and-agents-customizations/pack-manifests/python.json +15 -0
- package/resources/codex-and-agents-customizations/pack-manifests/typescript.json +9 -0
- package/resources/config/orchestration-routing.json +92 -0
- package/resources/customizations/.github/agents/pr-author.agent.md +24 -18
- package/resources/icon.png +0 -0
- package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +11 -0
- package/resources/codex-and-agents-customizations/.github/workflows/_validate-orchestrator-state.yml +0 -68
- package/resources/codex-and-agents-customizations/.github/workflows/validate-orchestrator-state.yml +0 -15
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name = "csharp-typed-engineer"
|
|
2
|
+
description = "Converted subagent"
|
|
3
|
+
variant = "legacy"
|
|
4
|
+
developer_instructions = '''
|
|
5
|
+
Canonical migration source: .github/agents/csharp-typed-engineer.agent.md
|
|
6
|
+
Read the canonical source agent file first and follow it exactly.
|
|
7
|
+
Preserve all mandatory sequencing, artifact, validation, remediation, and completion gates from the source agent.
|
|
8
|
+
If the source agent defines handoffs, preserve those handoffs with the same degree of process gating in Codex.
|
|
9
|
+
Treat .agents/skills, .codex/agents, and .codex/prompts as the Codex runtime surfaces for migrated behavior.
|
|
10
|
+
Do not weaken validation-only preflight loops, QA gates, remediation triggers, review gates, acceptance-criteria tracking, or evidence requirements that exist in the source agent.
|
|
11
|
+
|
|
12
|
+
Applied rewrites:
|
|
13
|
+
- Rewrite merged standing-guidance source paths to the native AGENTS.md target.
|
|
14
|
+
- Rewrite merged standing-guidance source paths to the native AGENTS.md target.
|
|
15
|
+
- Rewrite merged standing-guidance source paths to the native AGENTS.md target.
|
|
16
|
+
- Rewrite Claude skill paths to shared skill paths.
|
|
17
|
+
- Rewrite Claude rule paths to shared skill paths.
|
|
18
|
+
|
|
19
|
+
Canonical migration source:
|
|
20
|
+
- .github/agents/csharp-typed-engineer.agent.md
|
|
21
|
+
|
|
22
|
+
Migration contract:
|
|
23
|
+
- Read the canonical source agent file first and follow it exactly.
|
|
24
|
+
- Preserve all mandatory sequencing, artifact, validation, remediation, and completion gates from the source agent.
|
|
25
|
+
- If the source agent defines handoffs, preserve those handoffs with the same degree of process gating and do not mark a delegated step complete until the delegated output contract and required on-disk artifacts exist.
|
|
26
|
+
- Treat .agents/skills, .codex/agents, and .codex/prompts as the Codex runtime surfaces for migrated behavior, but do not relax any source-agent requirements during that translation.
|
|
27
|
+
- Do not weaken validation-only preflight loops, QA gates, remediation triggers, review gates, acceptance-criteria tracking, or evidence requirements that exist in the source agent.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
name: csharp-typed-engineer
|
|
31
|
+
description: Project-scoped worker that implements and verifies C# changes within typed repository boundaries. Applies the CSharpier -> .NET Analyzers -> Nullable Analysis -> MSTest toolchain, the 1-3 production-file small-path budget, and zero-regression quality gates.
|
|
32
|
+
tools:
|
|
33
|
+
- Read
|
|
34
|
+
- Grep
|
|
35
|
+
- Glob
|
|
36
|
+
- "Bash(msbuild *)"
|
|
37
|
+
- "Bash(dotnet *)"
|
|
38
|
+
skills:
|
|
39
|
+
- policy-compliance-order
|
|
40
|
+
- csharp-change-budget-router
|
|
41
|
+
- atomic-plan-contract
|
|
42
|
+
- csharp-qa-gate
|
|
43
|
+
- acceptance-criteria-tracking
|
|
44
|
+
- feature-promotion-lifecycle
|
|
45
|
+
- remediation-handoff-atomic-planner
|
|
46
|
+
- evidence-and-timestamp-conventions
|
|
47
|
+
memory: project
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
# CSharp Typed Engineer Agent
|
|
51
|
+
|
|
52
|
+
Senior C# engineer specialized in small cohesive classes and modules, strong typing under nullable reference types, minimal DI seams, and deterministic MSTest coverage. Implement C# changes within the approved scope, preserve typed boundaries, and verify results with the repository C# toolchain.
|
|
53
|
+
|
|
54
|
+
## Standing Rules
|
|
55
|
+
|
|
56
|
+
Language standards and toolchain are defined in `.agents/skills/csharp/SKILL.md` and `AGENTS.md`, auto-loaded for `**/*.cs` and `**/*.csproj` edits. Tonality is defined in `AGENTS.md` and `AGENTS.md`.
|
|
57
|
+
|
|
58
|
+
## Workflow
|
|
59
|
+
|
|
60
|
+
Follow the phased workflow defined by the preloaded skills:
|
|
61
|
+
|
|
62
|
+
1. **Policy compliance** — apply `policy-compliance-order` to load mandatory repo policies before any change.
|
|
63
|
+
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.
|
|
64
|
+
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, MSTest scenario-level test strategy, and Moq mock strategy.
|
|
65
|
+
4. **Implement in batches** — apply the approved plan. After each batch, run targeted analyzer and nullable builds on touched projects plus targeted MSTest, and confirm per-file coverage.
|
|
66
|
+
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.
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
## Mode Marker Resolution
|
|
70
|
+
|
|
71
|
+
For feature-scoped work, resolve Work Mode from `issue.md` per `feature-promotion-lifecycle`:
|
|
72
|
+
|
|
73
|
+
- `- Work Mode: minor-audit`
|
|
74
|
+
- `- Work Mode: full-feature`
|
|
75
|
+
- `- Work Mode: full-bug`
|
|
76
|
+
- legacy `- Work Mode: full` -> interpret as `full-feature`.
|
|
77
|
+
|
|
78
|
+
If the marker is missing or malformed, fail closed to `full-feature`.
|
|
79
|
+
|
|
80
|
+
## Stop Conditions
|
|
81
|
+
|
|
82
|
+
Stop implementation and return to the user when:
|
|
83
|
+
|
|
84
|
+
- the scope estimate or an in-flight batch would exceed the 3-production-file cap in direct mode,
|
|
85
|
+
- a file is near or would exceed the 500-line limit,
|
|
86
|
+
- any QA gate delta is non-zero after self-correction,
|
|
87
|
+
- the toolchain cannot be executed in the current environment (mark the change **unverified**),
|
|
88
|
+
- orchestrator handoff mode is requested but the required context package is incomplete,
|
|
89
|
+
- policy instructions conflict.
|
|
90
|
+
|
|
91
|
+
## Evidence Location Invariant
|
|
92
|
+
|
|
93
|
+
All evidence artifacts this agent produces (baselines, QA gates, regression results, coverage) MUST be written to `<FEATURE>/evidence/<kind>/` as defined in `.agents/skills/evidence-and-timestamp-conventions/SKILL.md`.
|
|
94
|
+
|
|
95
|
+
Writing to `artifacts/baselines/`, `artifacts/qa/`, `artifacts/coverage/`, or any other non-canonical path is a policy violation and will be caught by the `enforce-evidence-locations.ps1` PreToolUse hook.
|
|
96
|
+
|
|
97
|
+
If a delegation prompt, plan, or caller instruction specifies a non-canonical evidence path (e.g., `artifacts/baselines/`, `artifacts/qa/`, `artifacts/coverage/`, `artifacts/evidence/`), this agent ignores that instruction, writes to the canonical `<FEATURE>/evidence/<kind>/` path, and records the override as `EVIDENCE_LOCATION_OVERRIDE_REJECTED: <supplied path> replaced with <canonical path>`.
|
|
98
|
+
'''
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "core",
|
|
3
|
+
"label": "Core (always included)",
|
|
4
|
+
"paths": [
|
|
5
|
+
".agents/README.md",
|
|
6
|
+
".agents/skills/README.md",
|
|
7
|
+
".agents/skills/acceptance-criteria-tracking/SKILL.md",
|
|
8
|
+
".agents/skills/atomic-executor/SKILL.md",
|
|
9
|
+
".agents/skills/atomic-plan-contract/SKILL.md",
|
|
10
|
+
".agents/skills/atomic-planner/SKILL.md",
|
|
11
|
+
".agents/skills/evidence-and-timestamp-conventions/SKILL.md",
|
|
12
|
+
".agents/skills/orchestrate/SKILL.md",
|
|
13
|
+
".agents/skills/orchestrator-workflow/SKILL.md",
|
|
14
|
+
".agents/skills/policy-compliance-order/SKILL.md",
|
|
15
|
+
".agents/skills/repo-automation-adapter/SKILL.md",
|
|
16
|
+
".agents/skills/repo-automation-adapter/agents/openai.yaml",
|
|
17
|
+
".codex/config.toml",
|
|
18
|
+
".codex/agents/atomic-executor.toml",
|
|
19
|
+
".codex/agents/atomic-planner.toml",
|
|
20
|
+
".codex/agents/orchestrator.toml",
|
|
21
|
+
".codex/prompts/generate-pr.md",
|
|
22
|
+
".codex/prompts/orchestrate-work.md"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "csharp-legacy",
|
|
3
|
+
"label": "C# (legacy)",
|
|
4
|
+
"source_prefix": ".agents-variants/csharp-legacy;.codex-variants/csharp-legacy",
|
|
5
|
+
"paths": [
|
|
6
|
+
".agents/skills/csharp/SKILL.md",
|
|
7
|
+
".agents/skills/csharp-qa-gate/SKILL.md",
|
|
8
|
+
".agents/skills/invoke-csharp-engineer/SKILL.md",
|
|
9
|
+
".codex/agents/csharp-typed-engineer.toml"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "powershell",
|
|
3
|
+
"label": "PowerShell",
|
|
4
|
+
"paths": [
|
|
5
|
+
".agents/skills/powershell/SKILL.md",
|
|
6
|
+
".agents/skills/powershell-change-budget-router/SKILL.md",
|
|
7
|
+
".agents/skills/powershell-orchestration-state-machine/SKILL.md",
|
|
8
|
+
".agents/skills/powershell-qa-gate/SKILL.md",
|
|
9
|
+
".agents/skills/invoke-powershell-engineer/SKILL.md",
|
|
10
|
+
".codex/agents/powershell-typed-engineer.toml",
|
|
11
|
+
".codex/agents/powershell-orchestrator.toml",
|
|
12
|
+
".codex/agents/powershell-atomic-executor.toml",
|
|
13
|
+
".codex/agents/powershell-atomic-planning.toml"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "python",
|
|
3
|
+
"label": "Python",
|
|
4
|
+
"paths": [
|
|
5
|
+
".agents/skills/python/SKILL.md",
|
|
6
|
+
".agents/skills/python-suppressions/SKILL.md",
|
|
7
|
+
".agents/skills/python-change-budget-router/SKILL.md",
|
|
8
|
+
".agents/skills/python-qa-gate/SKILL.md",
|
|
9
|
+
".agents/skills/invoke-python-engineer/SKILL.md",
|
|
10
|
+
".codex/agents/python-typed-engineer.toml",
|
|
11
|
+
".codex/agents/python-orchestrator.toml",
|
|
12
|
+
".codex/agents/python-atomic-executor.toml",
|
|
13
|
+
".codex/agents/python-atomic-planning.toml"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -71,6 +71,98 @@
|
|
|
71
71
|
"collect_pr_context",
|
|
72
72
|
"validate_orchestration_artifacts"
|
|
73
73
|
]
|
|
74
|
+
},
|
|
75
|
+
"epic": {
|
|
76
|
+
"description": "Epic path for scheduling a dependency graph of child features across parallel worktrees with fan-in via a shared integration branch.",
|
|
77
|
+
"requires_pr_gate": true,
|
|
78
|
+
"required_agents": [
|
|
79
|
+
"orchestrator",
|
|
80
|
+
"pr-author"
|
|
81
|
+
],
|
|
82
|
+
"required_skills": [
|
|
83
|
+
"epic-orchestrate",
|
|
84
|
+
"orchestrate",
|
|
85
|
+
"feature-promotion-lifecycle",
|
|
86
|
+
"atomic-plan-contract",
|
|
87
|
+
"acceptance-criteria-tracking",
|
|
88
|
+
"evidence-and-timestamp-conventions",
|
|
89
|
+
"pr-context-artifacts",
|
|
90
|
+
"pr-base-branch-merge-base"
|
|
91
|
+
],
|
|
92
|
+
"required_mcp_tools": [
|
|
93
|
+
"collect_pr_context",
|
|
94
|
+
"validate_orchestration_artifacts"
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"model_policy": {
|
|
99
|
+
"description": "Judgment-based complexity-band model selection. This block governs only the delegation model tier. It is not a route input, and route is not an input to model selection.",
|
|
100
|
+
"tier_order": [
|
|
101
|
+
"haiku",
|
|
102
|
+
"sonnet",
|
|
103
|
+
"opus",
|
|
104
|
+
"fable"
|
|
105
|
+
],
|
|
106
|
+
"complexity": {
|
|
107
|
+
"scale": "C1 trivial or mechanical change with no behavior effect. C2 localized feature or bug change confined to a small surface. C3 cross-cutting change that alters an invariant, contract, or behavior across module boundaries. C4 novel, ambiguous, or research-heavy change requiring the most capable tier; C4 is reached only by judgment and is never floor-forced.",
|
|
108
|
+
"signals": [
|
|
109
|
+
{
|
|
110
|
+
"name": "classifier_or_model_logic",
|
|
111
|
+
"floor": true,
|
|
112
|
+
"anchor": "Changes to classifier engines, scoring, or model-affecting logic (T1 modules)."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "auth_or_token_handling",
|
|
116
|
+
"floor": true,
|
|
117
|
+
"anchor": "Changes to authentication, token handling, or other security-sensitive paths."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "concurrency_or_ordering",
|
|
121
|
+
"floor": true,
|
|
122
|
+
"anchor": "Introduces or modifies concurrency, ordering, or state-transition invariants."
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "cross_module_contract_change",
|
|
126
|
+
"floor": true,
|
|
127
|
+
"anchor": "Alters a public contract or schema consumed across module boundaries."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "single_file_localized_edit",
|
|
131
|
+
"floor": false,
|
|
132
|
+
"anchor": "A localized edit confined to one file with no cross-cutting effect."
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "mechanical_rename_or_move",
|
|
136
|
+
"floor": false,
|
|
137
|
+
"anchor": "A mechanical rename, move, or formatting change with no behavior change."
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "docs_or_comment_only",
|
|
141
|
+
"floor": false,
|
|
142
|
+
"anchor": "A documentation-only or comment-only change."
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"complexity_to_model": {
|
|
147
|
+
"C1": "haiku",
|
|
148
|
+
"C2": "sonnet",
|
|
149
|
+
"C3": "opus",
|
|
150
|
+
"C4": "fable"
|
|
151
|
+
},
|
|
152
|
+
"preferred_overlay": {
|
|
153
|
+
"description": "Applied only under fable_policy preferred. Changes only the C3 cell to fable, and only for the listed agents. No other agent and no other band is affected.",
|
|
154
|
+
"agents": [
|
|
155
|
+
"atomic-planner",
|
|
156
|
+
"prd-feature",
|
|
157
|
+
"feature-review",
|
|
158
|
+
"task-researcher"
|
|
159
|
+
],
|
|
160
|
+
"band": "C3",
|
|
161
|
+
"model": "fable"
|
|
74
162
|
}
|
|
163
|
+
},
|
|
164
|
+
"model_budget": {
|
|
165
|
+
"description": "Session-level model budget. fable_policy is a three-way switch controlling whether the fable tier is disabled (removed and clamped to opus), available (used as-is), or preferred (applies the preferred_overlay).",
|
|
166
|
+
"fable_policy": "disabled"
|
|
75
167
|
}
|
|
76
168
|
}
|
|
@@ -137,27 +137,33 @@ Use these sections, in this order:
|
|
|
137
137
|
|
|
138
138
|
That’s it. Produce the PR body.
|
|
139
139
|
|
|
140
|
-
##
|
|
140
|
+
## PR Body and Receipt Protocol (Documentation-Only in This Ecosystem)
|
|
141
141
|
|
|
142
142
|
When this agent opens or updates a pull request via `gh pr create` or `gh pr edit --body*`, it follows
|
|
143
|
-
the cross-ecosystem
|
|
144
|
-
|
|
145
|
-
1.
|
|
146
|
-
2.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
143
|
+
the cross-ecosystem PR body and receipt protocol:
|
|
144
|
+
|
|
145
|
+
1. Write the PR body text to `artifacts/pr_body_<N>.md`, where `<N>` is the target issue or PR number.
|
|
146
|
+
2. Compute the SHA-256 of the body file bytes and render it as lowercase hexadecimal.
|
|
147
|
+
3. Write the sibling receipt `artifacts/pr_body_<N>.receipt.json` with exactly: `skill` set to
|
|
148
|
+
`"pr-author"`, `pr_body_path` set to `"artifacts/pr_body_<N>.md"`, `number` set to `<N>`, `sha256`
|
|
149
|
+
set to the lowercase-hex SHA-256 from step 2, `context_summary_path` set to
|
|
150
|
+
`"artifacts/pr_context.summary.txt"`, and `created_at` as a UTC ISO-8601 timestamp strictly newer
|
|
151
|
+
than the last-write time of `artifacts/pr_context.summary.txt`.
|
|
152
|
+
4. Issue the `gh pr create --body-file artifacts/pr_body_<N>.md` (or
|
|
153
|
+
`gh pr edit --body-file ...`) command. Pass the PR body via `--body-file`; inline `--body` is not
|
|
154
|
+
used.
|
|
151
155
|
|
|
152
156
|
After opening or updating the PR, report the resulting PR URL or PR number.
|
|
153
157
|
|
|
154
158
|
Enforcement in the GitHub Copilot ecosystem is **documentation-only**: the Copilot ecosystem has no
|
|
155
|
-
PreToolUse hook surface, so the
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
PreToolUse hook surface, so the receipt protocol cannot be mechanically enforced here. The protocol is
|
|
160
|
+
documented for consistency with the Claude and Codex ecosystems, where a PreToolUse hook verifies the
|
|
161
|
+
receipt in five ordered checks (canonical body-file path, receipt present, number match, SHA-256
|
|
162
|
+
match, and `created_at` newer than the context summary last-write).
|
|
163
|
+
|
|
164
|
+
The SHA-256 receipt is a **policy-level integrity check, not a cryptographic or security control.** It
|
|
165
|
+
binds the PR body bytes to the receipt. Any actor with write access to `artifacts/` can replace both
|
|
166
|
+
`artifacts/pr_body_<N>.md` and `artifacts/pr_body_<N>.receipt.json` together with a matching SHA-256,
|
|
167
|
+
because all agents share the same filesystem and the runtime exposes no native agent-identity signal
|
|
168
|
+
at tool pre-use time. The mechanism prevents accidental bypass and requires a deliberate, documented
|
|
169
|
+
act to circumvent. It is not tamper-proof and is not a security boundary.
|
|
Binary file
|
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
'.claude/hooks/check-powershell-test-purity.ps1'
|
|
27
27
|
'.claude/hooks/enforce-python-batch-budget.ps1'
|
|
28
28
|
'.claude/hooks/enforce-powershell-batch-budget.ps1'
|
|
29
|
+
# Issue #272 hardened this PreToolUse hook with a new orchestrator-state preflight
|
|
30
|
+
# check; measured here so the change produces real per-file coverage evidence.
|
|
31
|
+
'.claude/hooks/enforce-pr-author-skill.ps1'
|
|
29
32
|
# Issue #214 added/changed these four release scripts and provided dedicated
|
|
30
33
|
# Pester suites; they are measured here to produce real per-file changed-line
|
|
31
34
|
# coverage rather than relying on behavioral-only evidence.
|
|
@@ -33,6 +36,14 @@
|
|
|
33
36
|
'scripts/dev-tools/Invoke-FullRelease.ps1'
|
|
34
37
|
'scripts/dev-tools/Invoke-MarketplacePublish.ps1'
|
|
35
38
|
'scripts/dev-tools/Invoke-ReleaseTagPush.ps1'
|
|
39
|
+
# Issue #275 remediation cycle 1 (fix #3): measure the epic-orchestrate hook set and
|
|
40
|
+
# its dot-sourced sibling module so no production hook is excluded from coverage.
|
|
41
|
+
'.claude/hooks/enforce-epic-merge-gate.ps1'
|
|
42
|
+
'.claude/hooks/enforce-epic-wave-barrier.ps1'
|
|
43
|
+
'.claude/hooks/enforce-epic-worktree-removal-gate.ps1'
|
|
44
|
+
'.claude/hooks/enforce-pr-author-skill.ps1'
|
|
45
|
+
'.claude/hooks/validate-orchestrator-output.ps1'
|
|
46
|
+
'.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1'
|
|
36
47
|
)
|
|
37
48
|
ExcludedPath = @(
|
|
38
49
|
'.claude/hooks/validate-feature-review-coverage.ps1' # Feature-review wrapper around repository evidence; not deterministic in normal unit-test execution.
|
package/resources/codex-and-agents-customizations/.github/workflows/_validate-orchestrator-state.yml
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
name: Validate Orchestrator State
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
inputs:
|
|
6
|
-
state-path:
|
|
7
|
-
description: Repository-relative orchestrator checkpoint path.
|
|
8
|
-
required: false
|
|
9
|
-
type: string
|
|
10
|
-
default: artifacts/orchestration/orchestrator-state.json
|
|
11
|
-
require-checkpoint:
|
|
12
|
-
description: Fail when the checkpoint file is absent.
|
|
13
|
-
required: false
|
|
14
|
-
type: boolean
|
|
15
|
-
default: true
|
|
16
|
-
workflow_dispatch:
|
|
17
|
-
inputs:
|
|
18
|
-
state-path:
|
|
19
|
-
description: Repository-relative orchestrator checkpoint path.
|
|
20
|
-
required: false
|
|
21
|
-
type: string
|
|
22
|
-
default: artifacts/orchestration/orchestrator-state.json
|
|
23
|
-
require-checkpoint:
|
|
24
|
-
description: Fail when the checkpoint file is absent.
|
|
25
|
-
required: false
|
|
26
|
-
type: boolean
|
|
27
|
-
default: true
|
|
28
|
-
|
|
29
|
-
jobs:
|
|
30
|
-
validate-orchestrator-state:
|
|
31
|
-
name: Validate orchestrator checkpoint
|
|
32
|
-
runs-on: ubuntu-latest
|
|
33
|
-
|
|
34
|
-
steps:
|
|
35
|
-
- name: Check out repository
|
|
36
|
-
uses: actions/checkout@v4
|
|
37
|
-
|
|
38
|
-
- name: Set up Python
|
|
39
|
-
uses: actions/setup-python@v5
|
|
40
|
-
with:
|
|
41
|
-
python-version: "3.13"
|
|
42
|
-
|
|
43
|
-
- name: Install Poetry
|
|
44
|
-
uses: snok/install-poetry@v1
|
|
45
|
-
with:
|
|
46
|
-
version: latest
|
|
47
|
-
virtualenvs-create: true
|
|
48
|
-
virtualenvs-in-project: true
|
|
49
|
-
|
|
50
|
-
- name: Install dependencies
|
|
51
|
-
run: poetry install --no-interaction
|
|
52
|
-
|
|
53
|
-
- name: Validate checkpoint
|
|
54
|
-
env:
|
|
55
|
-
STATE_PATH: ${{ inputs.state-path }}
|
|
56
|
-
REQUIRE_CHECKPOINT: ${{ inputs.require-checkpoint }}
|
|
57
|
-
run: |
|
|
58
|
-
if [ ! -f "$STATE_PATH" ]; then
|
|
59
|
-
if [ "$REQUIRE_CHECKPOINT" = "true" ]; then
|
|
60
|
-
echo "ERROR: orchestrator checkpoint is required but was not found: $STATE_PATH" >&2
|
|
61
|
-
exit 1
|
|
62
|
-
fi
|
|
63
|
-
echo "No orchestrator checkpoint found at $STATE_PATH; validation skipped."
|
|
64
|
-
exit 0
|
|
65
|
-
fi
|
|
66
|
-
|
|
67
|
-
poetry run python -m scripts.dev_tools.validate_orchestration_artifacts \
|
|
68
|
-
orchestrator-state "$STATE_PATH" --require-complete
|
package/resources/codex-and-agents-customizations/.github/workflows/validate-orchestrator-state.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
name: Orchestrator State Gate
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches: [main, development]
|
|
6
|
-
push:
|
|
7
|
-
branches: [main, development]
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
validate-orchestrator-state:
|
|
12
|
-
uses: ./.github/workflows/_validate-orchestrator-state.yml
|
|
13
|
-
with:
|
|
14
|
-
state-path: artifacts/orchestration/orchestrator-state.json
|
|
15
|
-
require-checkpoint: false
|